Skip to content

Commit

Permalink
bugfix#任务列表-节点数量只能显示20个
Browse files Browse the repository at this point in the history
  • Loading branch information
ouqiang committed Jun 26, 2018
1 parent 50f08e9 commit 8f547b7
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
1 change: 1 addition & 0 deletions internal/routers/routers.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
})
Expand Down
4 changes: 4 additions & 0 deletions web/vue/src/api/host.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
},
Expand Down
4 changes: 2 additions & 2 deletions web/vue/src/api/task.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default {
params: query
},
{
uri: '/host'
uri: '/host/all'
}
], callback)
},
Expand All @@ -20,7 +20,7 @@ export default {
uri: `/task/${id}`
},
{
uri: '/host'
uri: '/host/all'
}
], callback)
},
Expand Down
2 changes: 1 addition & 1 deletion web/vue/src/pages/task/edit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ export default {
this.cancel()
return
}
this.hosts = hosts.data || []
this.hosts = hosts || []
if (!taskData) {
return
}
Expand Down
2 changes: 1 addition & 1 deletion web/vue/src/pages/task/list.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand Down

0 comments on commit 8f547b7

Please sign in to comment.