update instance groups to only be running jobs

This commit is contained in:
John Mitchell
2018-04-19 18:15:35 -04:00
parent 60e3dfe22c
commit b042beeef7
5 changed files with 9 additions and 2 deletions

View File

@@ -13,6 +13,7 @@ function JobsStrings (BaseString) {
ROW_ITEM_LABEL_INVENTORY: t.s('Inventory'), ROW_ITEM_LABEL_INVENTORY: t.s('Inventory'),
ROW_ITEM_LABEL_PROJECT: t.s('Project'), ROW_ITEM_LABEL_PROJECT: t.s('Project'),
ROW_ITEM_LABEL_CREDENTIALS: t.s('Credentials'), ROW_ITEM_LABEL_CREDENTIALS: t.s('Credentials'),
NO_RUNNING: t.s('There are no running jobs.')
}; };
} }

View File

@@ -44,6 +44,10 @@ function ListJobsController (
}); });
}); });
if ($state.includes('instanceGroups')) {
vm.emptyListReason = strings.get('list.NO_RUNNING');
}
vm.jobTypes = mapChoices(unifiedJob vm.jobTypes = mapChoices(unifiedJob
.options('actions.GET.type.choices')); .options('actions.GET.type.choices'));

View File

@@ -12,7 +12,7 @@
query-set="querySet"> query-set="querySet">
</smart-search> </smart-search>
</div> </div>
<at-list results="jobs"> <at-list results="jobs" empty-list-reason="{{ vm.emptyListReason }}">
<!-- TODO: implement resources are missing red indicator as present in mockup --> <!-- TODO: implement resources are missing red indicator as present in mockup -->
<at-row ng-repeat="job in jobs" job-id="{{ job.id }}"> <at-row ng-repeat="job in jobs" job-id="{{ job.id }}">
<div class="at-Row-items"> <div class="at-Row-items">

View File

@@ -16,7 +16,8 @@ export default {
job_search: { job_search: {
value: { value: {
page_size: '10', page_size: '10',
order_by: '-finished' order_by: '-id',
status: 'running'
}, },
dynamic: true dynamic: true
} }

View File

@@ -20,6 +20,7 @@ function atList () {
templateUrl, templateUrl,
scope: { scope: {
results: '=', results: '=',
emptyListReason: '@'
}, },
link: atListLink, link: atListLink,
controller: AtListController, controller: AtListController,