update
This commit is contained in:
+19
-2
@@ -627,6 +627,23 @@ export const get_dashboard = () => dispatch => {
|
||||
.then(response => response.json())
|
||||
.then(json => {
|
||||
if(json.status != 1) return dispatch(add_dialog_msg(json.message));
|
||||
|
||||
let rt = json.data.rt;
|
||||
dispatch(dashboard(rt.ip[0]? rt.ip[0].ip : '', rt.version[0]? rt.version[0].version : '', rt.di, rt.leone))
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
const dashboard = (ip, version, di, leone) => ({
|
||||
type: 'dashboard',
|
||||
ip,
|
||||
version,
|
||||
di,
|
||||
leone
|
||||
})
|
||||
|
||||
export const toggle_dashboard = (flag) => ({
|
||||
type: flag ? 'ui_show_dashboard' : 'ui_hide_dashboard'
|
||||
})
|
||||
|
||||
export const clear_dashboard = () => ({
|
||||
type: 'clear_dashboard'
|
||||
})
|
||||
Reference in New Issue
Block a user