Trim the parent job prefix off the child job names when displaying them
This commit is contained in:
parent
1f5e9998e9
commit
40c8149520
|
@ -13,7 +13,7 @@ export default AbstractJobPage.extend({
|
|||
args: ['jobs.job', parent],
|
||||
},
|
||||
{
|
||||
label: job.get('name'),
|
||||
label: job.get('trimmedName'),
|
||||
args: ['jobs.job', job],
|
||||
},
|
||||
];
|
||||
|
|
|
@ -34,6 +34,11 @@ export default Model.extend({
|
|||
parent: belongsTo('job', { inverse: 'children' }),
|
||||
children: hasMany('job', { inverse: 'parent' }),
|
||||
|
||||
// The parent job name is prepended to child launch job names
|
||||
trimmedName: computed('name', 'parent', function() {
|
||||
return this.get('parent.content') ? this.get('name').replace(/.+?\//, '') : this.get('name');
|
||||
}),
|
||||
|
||||
// A composite of type and other job attributes to determine
|
||||
// a better type descriptor for human interpretation rather
|
||||
// than for scheduling.
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
{{/global-header}}
|
||||
{{#job-page/parts/body job=job onNamespaceChange=onNamespaceChange}}
|
||||
<h1 class="title">
|
||||
{{job.name}}
|
||||
{{job.trimmedName}}
|
||||
<span class="bumper-left tag {{job.statusClass}}" data-test-job-status>{{job.status}}</span>
|
||||
</h1>
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
{{/global-header}}
|
||||
{{#job-page/parts/body job=job onNamespaceChange=onNamespaceChange}}
|
||||
<h1 class="title">
|
||||
{{job.name}}
|
||||
{{job.trimmedName}}
|
||||
<span class="bumper-left tag {{job.statusClass}}" data-test-job-status>{{job.status}}</span>
|
||||
</h1>
|
||||
|
||||
|
|
Loading…
Reference in New Issue