bugfix#任务列表-节点数量只能显示20个

pull/63/head
ouqiang 2018-06-26 20:23:14 +08:00
parent 50f08e996a
commit 8f547b7e8d
5 changed files with 9 additions and 4 deletions

View File

@ -99,6 +99,7 @@ func Register(m *macaron.Macaron) {
m.Get("/:id", host.Detail) m.Get("/:id", host.Detail)
m.Post("/store", binding.Bind(host.HostForm{}), host.Store) m.Post("/store", binding.Bind(host.HostForm{}), host.Store)
m.Get("", host.Index) m.Get("", host.Index)
m.Get("/all", host.All)
m.Get("/ping/:id", host.Ping) m.Get("/ping/:id", host.Ping)
m.Post("/remove/:id", host.Remove) m.Post("/remove/:id", host.Remove)
}) })

View File

@ -6,6 +6,10 @@ export default {
httpClient.get('/host', query, callback) httpClient.get('/host', query, callback)
}, },
all (query, callback) {
httpClient.get('/host/all', {}, callback)
},
detail (id, callback) { detail (id, callback) {
httpClient.get(`/host/${id}`, {}, callback) httpClient.get(`/host/${id}`, {}, callback)
}, },

View File

@ -9,7 +9,7 @@ export default {
params: query params: query
}, },
{ {
uri: '/host' uri: '/host/all'
} }
], callback) ], callback)
}, },
@ -20,7 +20,7 @@ export default {
uri: `/task/${id}` uri: `/task/${id}`
}, },
{ {
uri: '/host' uri: '/host/all'
} }
], callback) ], callback)
}, },

View File

@ -416,7 +416,7 @@ export default {
this.cancel() this.cancel()
return return
} }
this.hosts = hosts.data || [] this.hosts = hosts || []
if (!taskData) { if (!taskData) {
return return
} }

View File

@ -287,7 +287,7 @@ export default {
taskService.list(this.searchParams, (tasks, hosts) => { taskService.list(this.searchParams, (tasks, hosts) => {
this.tasks = tasks.data this.tasks = tasks.data
this.taskTotal = tasks.total this.taskTotal = tasks.total
this.hosts = hosts.data this.hosts = hosts
if (callback) { if (callback) {
callback() callback()
} }