mirror of
https://github.com/ansible/awx.git
synced 2024-11-02 09:51:09 +03:00
Merge pull request #1264 from mabashian/1059-job-results-resource-tooltips
Updated job results related resources tooltips
This commit is contained in:
commit
ac29e5d299
@ -106,8 +106,9 @@ function getSourceWorkflowJobDetails () {
|
||||
}
|
||||
|
||||
const link = `/#/workflows/${sourceWorkflowJob.id}`;
|
||||
const tooltip = strings.get('resourceTooltips.SOURCE_WORKFLOW_JOB');
|
||||
|
||||
return { link };
|
||||
return { link, tooltip };
|
||||
}
|
||||
|
||||
function getJobTemplateDetails () {
|
||||
@ -120,8 +121,9 @@ function getJobTemplateDetails () {
|
||||
const label = 'Job Template';
|
||||
const link = `/#/templates/job_template/${jobTemplate.id}`;
|
||||
const value = $filter('sanitize')(jobTemplate.name);
|
||||
const tooltip = strings.get('resourceTooltips.JOB_TEMPLATE');
|
||||
|
||||
return { label, link, value };
|
||||
return { label, link, value, tooltip };
|
||||
}
|
||||
|
||||
function getLaunchedByDetails () {
|
||||
@ -142,11 +144,11 @@ function getLaunchedByDetails () {
|
||||
let value;
|
||||
|
||||
if (createdBy) {
|
||||
tooltip = 'Edit the User';
|
||||
tooltip = strings.get('resourceTooltips.USER');
|
||||
link = `/#/users/${createdBy.id}`;
|
||||
value = $filter('sanitize')(createdBy.username);
|
||||
} else if (relatedSchedule && jobTemplate) {
|
||||
tooltip = 'Edit the Schedule';
|
||||
tooltip = strings.get('resourceTooltips.SCHEDULE');
|
||||
link = `/#/templates/job_template/${jobTemplate.id}/schedules/${schedule.id}`;
|
||||
value = $filter('sanitize')(schedule.name);
|
||||
} else {
|
||||
@ -166,7 +168,7 @@ function getInventoryDetails () {
|
||||
}
|
||||
|
||||
const label = 'Inventory';
|
||||
const tooltip = 'Edit the inventory';
|
||||
const tooltip = strings.get('resourceTooltips.INVENTORY');
|
||||
const value = $filter('sanitize')(inventory.name);
|
||||
|
||||
let link;
|
||||
@ -191,18 +193,19 @@ function getProjectDetails () {
|
||||
const label = 'Project';
|
||||
const link = `/#/projects/${project.id}`;
|
||||
const value = $filter('sanitize')(project.name);
|
||||
const tooltip = strings.get('resourceTooltips.PROJECT');
|
||||
|
||||
if (projectUpdate) {
|
||||
const update = {
|
||||
link: `/#/jobz/project/${projectUpdate.id}`,
|
||||
tooltip: 'View project checkout results',
|
||||
tooltip: strings.get('resourceTooltips.PROJECT_UPDATE'),
|
||||
status: projectUpdate.status,
|
||||
};
|
||||
|
||||
return { label, link, value, update };
|
||||
return { label, link, value, tooltip, update };
|
||||
}
|
||||
|
||||
return { label, link, value };
|
||||
return { label, link, value, tooltip };
|
||||
}
|
||||
|
||||
function getSCMRevisionDetails () {
|
||||
@ -275,7 +278,7 @@ function getCredentialDetails () {
|
||||
}
|
||||
|
||||
const link = `/#/credentials/${credential.id}`;
|
||||
const tooltip = 'Edit the Credential';
|
||||
const tooltip = strings.get('resourceTooltips.CREDENTIAL');
|
||||
const value = $filter('sanitize')(credential.name);
|
||||
|
||||
return { label, link, tooltip, value };
|
||||
|
@ -70,14 +70,17 @@
|
||||
</div>
|
||||
|
||||
<!-- TEMPLATE DETAIL -->
|
||||
<div class="JobResults-resultRow" ng-show="vm.jobTemplate">
|
||||
<div class="JobResults-resultRow" if="vm.jobTemplate">
|
||||
<label class="JobResults-resultRowLabel">{{ vm.jobTemplate.label }}</label>
|
||||
<div class="JobResults-resultRowText">
|
||||
<a href="{{ vm.jobTemplate.link }}" aw-tool-tip="{{'Edit the job template' | translate}}" data-placement="top">
|
||||
<a href="{{ vm.jobTemplate.link }}"
|
||||
aw-tool-tip="{{ vm.jobTemplate.tooltip }}"
|
||||
data-placement="top"
|
||||
data-tip-watch="vm.jobTemplate.tooltip">
|
||||
{{ vm.jobTemplate.value }}
|
||||
</a>
|
||||
|
||||
<a href="{{ vm.sourceWorkflowJob.link }}" ng-if="vm.sourceWorkflowJob" aw-tool-tip="{{'View workflow results' | translate}}" data-placement="top" data-original-title="" title="">
|
||||
<a href="{{ vm.sourceWorkflowJob.link }}" ng-if="vm.sourceWorkflowJob" aw-tool-tip="{{ vm.sourceWorkflowJob.tooltip }}" data-placement="top">
|
||||
<i class="WorkflowBadge"> W</i>
|
||||
</a>
|
||||
</div>
|
||||
@ -143,12 +146,13 @@
|
||||
</div>
|
||||
|
||||
<!-- CREDENTIAL DETAIL -->
|
||||
<div class="JobResults-resultRow" ng-show="vm.credential">
|
||||
<div class="JobResults-resultRow" if="vm.credential">
|
||||
<label class="JobResults-resultRowLabel">{{ vm.credential.label }}</label>
|
||||
<div class="JobResults-resultRowText">
|
||||
<a href="{{ vm.credential.link }}"
|
||||
aw-tool-tip="{{ vm.credential.tooltip }}"
|
||||
data-placement="top">
|
||||
data-placement="top"
|
||||
data-tip-watch="vm.credential.tooltip">
|
||||
{{ vm.credential.value }}
|
||||
</a>
|
||||
</div>
|
||||
|
@ -20,6 +20,17 @@ function JobsStrings (BaseString) {
|
||||
RUNNING: t.s('The host status bar will update when the job is complete.'),
|
||||
UNAVAILABLE: t.s('Host status information for this job unavailable.'),
|
||||
};
|
||||
|
||||
ns.resourceTooltips = {
|
||||
USER: t.s('View the User'),
|
||||
SCHEDULE: t.s('View the Schedule'),
|
||||
INVENTORY: t.s('View the Inventory'),
|
||||
CREDENTIAL: t.s('View the Credential'),
|
||||
JOB_TEMPLATE: t.s('View the Job Template'),
|
||||
SOURCE_WORKFLOW_JOB: t.s('View the source Workflow Job'),
|
||||
PROJECT: t.s('View the Project'),
|
||||
PROJECT_UPDATE: t.s('View Project checkout results')
|
||||
};
|
||||
}
|
||||
|
||||
JobsStrings.$inject = ['BaseStringService'];
|
||||
|
Loading…
Reference in New Issue
Block a user