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 link = `/#/workflows/${sourceWorkflowJob.id}`;
|
||||||
|
const tooltip = strings.get('resourceTooltips.SOURCE_WORKFLOW_JOB');
|
||||||
|
|
||||||
return { link };
|
return { link, tooltip };
|
||||||
}
|
}
|
||||||
|
|
||||||
function getJobTemplateDetails () {
|
function getJobTemplateDetails () {
|
||||||
@ -120,8 +121,9 @@ function getJobTemplateDetails () {
|
|||||||
const label = 'Job Template';
|
const label = 'Job Template';
|
||||||
const link = `/#/templates/job_template/${jobTemplate.id}`;
|
const link = `/#/templates/job_template/${jobTemplate.id}`;
|
||||||
const value = $filter('sanitize')(jobTemplate.name);
|
const value = $filter('sanitize')(jobTemplate.name);
|
||||||
|
const tooltip = strings.get('resourceTooltips.JOB_TEMPLATE');
|
||||||
|
|
||||||
return { label, link, value };
|
return { label, link, value, tooltip };
|
||||||
}
|
}
|
||||||
|
|
||||||
function getLaunchedByDetails () {
|
function getLaunchedByDetails () {
|
||||||
@ -142,11 +144,11 @@ function getLaunchedByDetails () {
|
|||||||
let value;
|
let value;
|
||||||
|
|
||||||
if (createdBy) {
|
if (createdBy) {
|
||||||
tooltip = 'Edit the User';
|
tooltip = strings.get('resourceTooltips.USER');
|
||||||
link = `/#/users/${createdBy.id}`;
|
link = `/#/users/${createdBy.id}`;
|
||||||
value = $filter('sanitize')(createdBy.username);
|
value = $filter('sanitize')(createdBy.username);
|
||||||
} else if (relatedSchedule && jobTemplate) {
|
} else if (relatedSchedule && jobTemplate) {
|
||||||
tooltip = 'Edit the Schedule';
|
tooltip = strings.get('resourceTooltips.SCHEDULE');
|
||||||
link = `/#/templates/job_template/${jobTemplate.id}/schedules/${schedule.id}`;
|
link = `/#/templates/job_template/${jobTemplate.id}/schedules/${schedule.id}`;
|
||||||
value = $filter('sanitize')(schedule.name);
|
value = $filter('sanitize')(schedule.name);
|
||||||
} else {
|
} else {
|
||||||
@ -166,7 +168,7 @@ function getInventoryDetails () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const label = 'Inventory';
|
const label = 'Inventory';
|
||||||
const tooltip = 'Edit the inventory';
|
const tooltip = strings.get('resourceTooltips.INVENTORY');
|
||||||
const value = $filter('sanitize')(inventory.name);
|
const value = $filter('sanitize')(inventory.name);
|
||||||
|
|
||||||
let link;
|
let link;
|
||||||
@ -191,18 +193,19 @@ function getProjectDetails () {
|
|||||||
const label = 'Project';
|
const label = 'Project';
|
||||||
const link = `/#/projects/${project.id}`;
|
const link = `/#/projects/${project.id}`;
|
||||||
const value = $filter('sanitize')(project.name);
|
const value = $filter('sanitize')(project.name);
|
||||||
|
const tooltip = strings.get('resourceTooltips.PROJECT');
|
||||||
|
|
||||||
if (projectUpdate) {
|
if (projectUpdate) {
|
||||||
const update = {
|
const update = {
|
||||||
link: `/#/jobz/project/${projectUpdate.id}`,
|
link: `/#/jobz/project/${projectUpdate.id}`,
|
||||||
tooltip: 'View project checkout results',
|
tooltip: strings.get('resourceTooltips.PROJECT_UPDATE'),
|
||||||
status: projectUpdate.status,
|
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 () {
|
function getSCMRevisionDetails () {
|
||||||
@ -275,7 +278,7 @@ function getCredentialDetails () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const link = `/#/credentials/${credential.id}`;
|
const link = `/#/credentials/${credential.id}`;
|
||||||
const tooltip = 'Edit the Credential';
|
const tooltip = strings.get('resourceTooltips.CREDENTIAL');
|
||||||
const value = $filter('sanitize')(credential.name);
|
const value = $filter('sanitize')(credential.name);
|
||||||
|
|
||||||
return { label, link, tooltip, value };
|
return { label, link, tooltip, value };
|
||||||
|
@ -70,14 +70,17 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- TEMPLATE DETAIL -->
|
<!-- 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>
|
<label class="JobResults-resultRowLabel">{{ vm.jobTemplate.label }}</label>
|
||||||
<div class="JobResults-resultRowText">
|
<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 }}
|
{{ vm.jobTemplate.value }}
|
||||||
</a>
|
</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>
|
<i class="WorkflowBadge"> W</i>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@ -143,12 +146,13 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- CREDENTIAL DETAIL -->
|
<!-- 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>
|
<label class="JobResults-resultRowLabel">{{ vm.credential.label }}</label>
|
||||||
<div class="JobResults-resultRowText">
|
<div class="JobResults-resultRowText">
|
||||||
<a href="{{ vm.credential.link }}"
|
<a href="{{ vm.credential.link }}"
|
||||||
aw-tool-tip="{{ vm.credential.tooltip }}"
|
aw-tool-tip="{{ vm.credential.tooltip }}"
|
||||||
data-placement="top">
|
data-placement="top"
|
||||||
|
data-tip-watch="vm.credential.tooltip">
|
||||||
{{ vm.credential.value }}
|
{{ vm.credential.value }}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -20,6 +20,17 @@ function JobsStrings (BaseString) {
|
|||||||
RUNNING: t.s('The host status bar will update when the job is complete.'),
|
RUNNING: t.s('The host status bar will update when the job is complete.'),
|
||||||
UNAVAILABLE: t.s('Host status information for this job unavailable.'),
|
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'];
|
JobsStrings.$inject = ['BaseStringService'];
|
||||||
|
Loading…
Reference in New Issue
Block a user