mirror of
https://github.com/ansible/awx.git
synced 2026-01-18 05:01:19 -03:30
fixes based on search tags permissions breakage
This commit is contained in:
parent
d6c2b931f9
commit
d5fb4b306d
@ -366,6 +366,7 @@ export default
|
||||
|
||||
related: {
|
||||
permissions: {
|
||||
basePath: 'credentials/:id/access_list/',
|
||||
type: 'collection',
|
||||
title: 'Permissions',
|
||||
iterator: 'permission',
|
||||
|
||||
@ -153,6 +153,7 @@ export default
|
||||
}
|
||||
},
|
||||
permissions: {
|
||||
basePath: 'projects/:id/access_list/',
|
||||
type: 'collection',
|
||||
title: 'Permissions',
|
||||
iterator: 'permission',
|
||||
|
||||
@ -292,85 +292,11 @@ export default
|
||||
},
|
||||
|
||||
related: {
|
||||
schedules: {
|
||||
type: 'collection',
|
||||
title: 'Schedules',
|
||||
iterator: 'schedule',
|
||||
index: false,
|
||||
open: false,
|
||||
|
||||
actions: {
|
||||
refresh: {
|
||||
mode: 'all',
|
||||
awToolTip: "Refresh the page",
|
||||
ngClick: "refreshSchedules()",
|
||||
actionClass: 'btn List-buttonDefault',
|
||||
buttonContent: 'REFRESH',
|
||||
ngHide: 'scheduleLoading == false && schedule_active_search == false && schedule_total_rows < 1'
|
||||
},
|
||||
add: {
|
||||
mode: 'all',
|
||||
ngClick: 'addSchedule()',
|
||||
awToolTip: 'Add a new schedule',
|
||||
actionClass: 'btn List-buttonSubmit',
|
||||
buttonContent: '+ ADD'
|
||||
}
|
||||
},
|
||||
fields: {
|
||||
name: {
|
||||
key: true,
|
||||
label: 'Name',
|
||||
ngClick: "editSchedule(schedule.id)",
|
||||
columnClass: "col-md-3 col-sm-3 col-xs-3"
|
||||
},
|
||||
dtstart: {
|
||||
label: 'First Run',
|
||||
filter: "longDate",
|
||||
searchable: false,
|
||||
columnClass: "col-md-2 col-sm-3 hidden-xs"
|
||||
},
|
||||
next_run: {
|
||||
label: 'Next Run',
|
||||
filter: "longDate",
|
||||
searchable: false,
|
||||
columnClass: "col-md-2 col-sm-3 col-xs-3"
|
||||
},
|
||||
dtend: {
|
||||
label: 'Final Run',
|
||||
filter: "longDate",
|
||||
searchable: false,
|
||||
columnClass: "col-md-2 col-sm-3 hidden-xs"
|
||||
}
|
||||
},
|
||||
fieldActions: {
|
||||
"play": {
|
||||
mode: "all",
|
||||
ngClick: "toggleSchedule($event, schedule.id)",
|
||||
awToolTip: "{{ schedule.play_tip }}",
|
||||
dataTipWatch: "schedule.play_tip",
|
||||
iconClass: "{{ 'fa icon-schedule-enabled-' + schedule.enabled }}",
|
||||
dataPlacement: "top"
|
||||
},
|
||||
edit: {
|
||||
label: 'Edit',
|
||||
ngClick: "editSchedule(schedule.id)",
|
||||
icon: 'icon-edit',
|
||||
awToolTip: 'Edit schedule',
|
||||
dataPlacement: 'top'
|
||||
},
|
||||
"delete": {
|
||||
label: 'Delete',
|
||||
ngClick: "deleteSchedule(schedule.id)",
|
||||
icon: 'icon-trash',
|
||||
awToolTip: 'Delete schedule',
|
||||
dataPlacement: 'top'
|
||||
}
|
||||
}
|
||||
},
|
||||
"completed_jobs": {
|
||||
include: "CompletedJobsList"
|
||||
},
|
||||
permissions: {
|
||||
basePath: 'job_templates/:id/access_list/',
|
||||
type: 'collection',
|
||||
title: 'Permissions',
|
||||
iterator: 'permission',
|
||||
@ -410,10 +336,6 @@ export default
|
||||
iterator: 'completed_job',
|
||||
url: urls.jobs + '?or__status=successful&or__status=failed&or__status=error&or__status=canceled'
|
||||
},
|
||||
schedules: {
|
||||
iterator: 'schedule',
|
||||
url: urls.schedules
|
||||
},
|
||||
permissions: {
|
||||
iterator: 'permission',
|
||||
url: urls.access_list
|
||||
|
||||
@ -12,6 +12,7 @@ export default
|
||||
.value( 'CompletedJobsList', {
|
||||
|
||||
name: 'completed_jobs',
|
||||
basePath: 'job_templates/:id/jobs/?or__status=successful&or__status=failed&or__status=error&or__status=canceled',
|
||||
iterator: 'completed_job',
|
||||
editTitle: 'Completed Jobs',
|
||||
index: false,
|
||||
@ -21,6 +22,7 @@ export default
|
||||
fields: {
|
||||
status: {
|
||||
label: '',
|
||||
searchLabel: 'Status',
|
||||
columnClass: 'List-staticColumn--smallStatus',
|
||||
awToolTip: "{{ completed_job.status_tip }}",
|
||||
awTipPlacement: "right",
|
||||
|
||||
@ -10,6 +10,7 @@ export default ['GetBasePath', function(GetBasePath) {
|
||||
}).map(function(i) {
|
||||
delete f[i].awToolTip;
|
||||
delete f[i].ngClass;
|
||||
delete f[i].ngClick;
|
||||
return {[i]: f[i]};
|
||||
}).reduce(function (acc, i) {
|
||||
var key = Object.keys(i);
|
||||
|
||||
@ -1408,7 +1408,7 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat
|
||||
|
||||
|
||||
|
||||
if (this.form.tabs) {
|
||||
if (!_.isEmpty(this.form.related)) {
|
||||
var collection;
|
||||
html += "<div class=\"Form-tabHolder\">";
|
||||
|
||||
@ -1442,7 +1442,7 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat
|
||||
html += "</div>";//tabHolder
|
||||
}
|
||||
|
||||
if(this.form.tabs && this.mode === "edit"){
|
||||
if(!_.isEmpty(this.form.related) && this.mode === "edit"){
|
||||
html += "<div class=\"Form-tabSection\" "+
|
||||
"ng-class=\"{'is-selected': " + this.form.name + "Selected }\">";
|
||||
}
|
||||
@ -1554,7 +1554,7 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat
|
||||
|
||||
html += "<div class=\"buttons Form-buttons\" ";
|
||||
html += "id=\"" + this.form.name + "_controls\" ";
|
||||
if (options.mode === 'edit' && this.form.tabs) {
|
||||
if (options.mode === 'edit' && !_.isEmpty(this.form.related)) {
|
||||
html += "ng-show=\"" + this.form.name + "Selected\"; "
|
||||
}
|
||||
html += ">\n";
|
||||
@ -1622,7 +1622,7 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat
|
||||
html += "</div>\n";
|
||||
}
|
||||
|
||||
if(this.form.tabs && this.mode === "edit"){
|
||||
if(!_.isEmpty(this.form.related) && this.mode === "edit"){
|
||||
var collection1;
|
||||
html += "</div>\n"; // end of form's Form-tabSection
|
||||
|
||||
@ -1631,12 +1631,7 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat
|
||||
|
||||
html += "<div class=\"Form-tabSection\" "+
|
||||
"ng-class=\"{'is-selected': " + itm + "Selected }\">";
|
||||
if (collection1.generateList) {
|
||||
html += GenerateList.buildHTML(collection1, { mode: 'edit' });
|
||||
}
|
||||
else {
|
||||
html += this.GenerateCollection({ form: this.form, related: itm }, options);
|
||||
}
|
||||
html += this.GenerateCollection({ form: this.form, related: itm }, options);
|
||||
html += "</div>\n";
|
||||
}
|
||||
}
|
||||
@ -1694,8 +1689,9 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat
|
||||
html += "</div>\n";
|
||||
}
|
||||
var rootID = $location.$$path.split("/")[2];
|
||||
var endpoint = "/api/v1/" + collection.basePath
|
||||
.replace(":id", rootID);
|
||||
var endpoint = (collection.basePath) ? "/api/v1/" +
|
||||
collection.basePath
|
||||
.replace(":id", rootID) : "";
|
||||
var tagSearch = getSearchHtml
|
||||
.inject(getSearchHtml.getList(collection),
|
||||
endpoint, itm, collection.iterator);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user