This commit is contained in:
Jay
2017-03-24 16:14:30 +08:00
parent c5236f9ad3
commit d6250577fe
14 changed files with 261 additions and 153257 deletions
+19 -2
View File
@@ -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'
})