represent webhooks on job lists

This commit is contained in:
Jake McDermott
2019-09-10 11:35:53 -04:00
committed by Jeff Bradberry
parent 5e9448a854
commit b96c03e456
4 changed files with 12 additions and 1 deletions

View File

@@ -14,6 +14,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'),
ROW_ITEM_LABEL_WEBHOOK: t.s('Webhook'),
NO_RUNNING: t.s('There are no running jobs.'), NO_RUNNING: t.s('There are no running jobs.'),
JOB: t.s('Job'), JOB: t.s('Job'),
STATUS_TOOLTIP: status => t.s('Job {{status}}. Click for details.', { status }), STATUS_TOOLTIP: status => t.s('Job {{status}}. Click for details.', { status }),

View File

@@ -158,6 +158,14 @@ function ListJobsController (
return null; return null;
}; };
vm.getWebhookDetails = (job) => {
if (!job.webhook_guid) {
return null;
}
return strings.get('list.ROW_ITEM_LABEL_WEBHOOK');
};
vm.getTranslatedStatusString = (status) => { vm.getTranslatedStatusString = (status) => {
switch (status) { switch (status) {
case 'new': case 'new':

View File

@@ -34,7 +34,7 @@
header-value="{{ job.id }} - {{ job.name }}" header-value="{{ job.id }} - {{ job.name }}"
header-state="{{ vm.getSref(job) }}" header-state="{{ vm.getSref(job) }}"
header-tag="{{ vm.jobTypes[job.type] }}" header-tag="{{ vm.jobTypes[job.type] }}"
secondary-tag="{{ vm.getSliceJobDetails(job) }}"> secondary-tag="{{ vm.getSliceJobDetails(job) || vm.getWebhookDetails(job) }}">
</at-row-item> </at-row-item>
<div class="at-Row-actions"> <div class="at-Row-actions">
<at-relaunch job="job" ng-show="job.summary_fields.user_capabilities.start"> <at-relaunch job="job" ng-show="job.summary_fields.user_capabilities.start">

View File

@@ -288,6 +288,8 @@
line-height: @at-line-height-list-row-item-tag; line-height: @at-line-height-list-row-item-tag;
word-break: keep-all; word-break: keep-all;
display: inline-flex; display: inline-flex;
margin-right: 10px;
margin-left: 10px;
} }
.at-RowItem-tag--primary { .at-RowItem-tag--primary {