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.Post("/store", binding.Bind(host.HostForm{}), host.Store)
m.Get("", host.Index)
m.Get("/all", host.All)
m.Get("/ping/:id", host.Ping)
m.Post("/remove/:id", host.Remove)
})

View File

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

View File

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

View File

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

View File

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