mirror of
https://github.com/ansible/awx.git
synced 2026-05-07 17:37:37 -02:30
fixes based on search tags permissions breakage
This commit is contained in:
@@ -366,6 +366,7 @@ export default
|
|||||||
|
|
||||||
related: {
|
related: {
|
||||||
permissions: {
|
permissions: {
|
||||||
|
basePath: 'credentials/:id/access_list/',
|
||||||
type: 'collection',
|
type: 'collection',
|
||||||
title: 'Permissions',
|
title: 'Permissions',
|
||||||
iterator: 'permission',
|
iterator: 'permission',
|
||||||
|
|||||||
@@ -153,6 +153,7 @@ export default
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
permissions: {
|
permissions: {
|
||||||
|
basePath: 'projects/:id/access_list/',
|
||||||
type: 'collection',
|
type: 'collection',
|
||||||
title: 'Permissions',
|
title: 'Permissions',
|
||||||
iterator: 'permission',
|
iterator: 'permission',
|
||||||
|
|||||||
@@ -292,85 +292,11 @@ export default
|
|||||||
},
|
},
|
||||||
|
|
||||||
related: {
|
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": {
|
"completed_jobs": {
|
||||||
include: "CompletedJobsList"
|
include: "CompletedJobsList"
|
||||||
},
|
},
|
||||||
permissions: {
|
permissions: {
|
||||||
|
basePath: 'job_templates/:id/access_list/',
|
||||||
type: 'collection',
|
type: 'collection',
|
||||||
title: 'Permissions',
|
title: 'Permissions',
|
||||||
iterator: 'permission',
|
iterator: 'permission',
|
||||||
@@ -410,10 +336,6 @@ export default
|
|||||||
iterator: 'completed_job',
|
iterator: 'completed_job',
|
||||||
url: urls.jobs + '?or__status=successful&or__status=failed&or__status=error&or__status=canceled'
|
url: urls.jobs + '?or__status=successful&or__status=failed&or__status=error&or__status=canceled'
|
||||||
},
|
},
|
||||||
schedules: {
|
|
||||||
iterator: 'schedule',
|
|
||||||
url: urls.schedules
|
|
||||||
},
|
|
||||||
permissions: {
|
permissions: {
|
||||||
iterator: 'permission',
|
iterator: 'permission',
|
||||||
url: urls.access_list
|
url: urls.access_list
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ export default
|
|||||||
.value( 'CompletedJobsList', {
|
.value( 'CompletedJobsList', {
|
||||||
|
|
||||||
name: 'completed_jobs',
|
name: 'completed_jobs',
|
||||||
|
basePath: 'job_templates/:id/jobs/?or__status=successful&or__status=failed&or__status=error&or__status=canceled',
|
||||||
iterator: 'completed_job',
|
iterator: 'completed_job',
|
||||||
editTitle: 'Completed Jobs',
|
editTitle: 'Completed Jobs',
|
||||||
index: false,
|
index: false,
|
||||||
@@ -21,6 +22,7 @@ export default
|
|||||||
fields: {
|
fields: {
|
||||||
status: {
|
status: {
|
||||||
label: '',
|
label: '',
|
||||||
|
searchLabel: 'Status',
|
||||||
columnClass: 'List-staticColumn--smallStatus',
|
columnClass: 'List-staticColumn--smallStatus',
|
||||||
awToolTip: "{{ completed_job.status_tip }}",
|
awToolTip: "{{ completed_job.status_tip }}",
|
||||||
awTipPlacement: "right",
|
awTipPlacement: "right",
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ export default ['GetBasePath', function(GetBasePath) {
|
|||||||
}).map(function(i) {
|
}).map(function(i) {
|
||||||
delete f[i].awToolTip;
|
delete f[i].awToolTip;
|
||||||
delete f[i].ngClass;
|
delete f[i].ngClass;
|
||||||
|
delete f[i].ngClick;
|
||||||
return {[i]: f[i]};
|
return {[i]: f[i]};
|
||||||
}).reduce(function (acc, i) {
|
}).reduce(function (acc, i) {
|
||||||
var key = Object.keys(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;
|
var collection;
|
||||||
html += "<div class=\"Form-tabHolder\">";
|
html += "<div class=\"Form-tabHolder\">";
|
||||||
|
|
||||||
@@ -1442,7 +1442,7 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat
|
|||||||
html += "</div>";//tabHolder
|
html += "</div>";//tabHolder
|
||||||
}
|
}
|
||||||
|
|
||||||
if(this.form.tabs && this.mode === "edit"){
|
if(!_.isEmpty(this.form.related) && this.mode === "edit"){
|
||||||
html += "<div class=\"Form-tabSection\" "+
|
html += "<div class=\"Form-tabSection\" "+
|
||||||
"ng-class=\"{'is-selected': " + this.form.name + "Selected }\">";
|
"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 += "<div class=\"buttons Form-buttons\" ";
|
||||||
html += "id=\"" + this.form.name + "_controls\" ";
|
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 += "ng-show=\"" + this.form.name + "Selected\"; "
|
||||||
}
|
}
|
||||||
html += ">\n";
|
html += ">\n";
|
||||||
@@ -1622,7 +1622,7 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat
|
|||||||
html += "</div>\n";
|
html += "</div>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
if(this.form.tabs && this.mode === "edit"){
|
if(!_.isEmpty(this.form.related) && this.mode === "edit"){
|
||||||
var collection1;
|
var collection1;
|
||||||
html += "</div>\n"; // end of form's Form-tabSection
|
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\" "+
|
html += "<div class=\"Form-tabSection\" "+
|
||||||
"ng-class=\"{'is-selected': " + itm + "Selected }\">";
|
"ng-class=\"{'is-selected': " + itm + "Selected }\">";
|
||||||
if (collection1.generateList) {
|
html += this.GenerateCollection({ form: this.form, related: itm }, options);
|
||||||
html += GenerateList.buildHTML(collection1, { mode: 'edit' });
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
html += this.GenerateCollection({ form: this.form, related: itm }, options);
|
|
||||||
}
|
|
||||||
html += "</div>\n";
|
html += "</div>\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1694,8 +1689,9 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat
|
|||||||
html += "</div>\n";
|
html += "</div>\n";
|
||||||
}
|
}
|
||||||
var rootID = $location.$$path.split("/")[2];
|
var rootID = $location.$$path.split("/")[2];
|
||||||
var endpoint = "/api/v1/" + collection.basePath
|
var endpoint = (collection.basePath) ? "/api/v1/" +
|
||||||
.replace(":id", rootID);
|
collection.basePath
|
||||||
|
.replace(":id", rootID) : "";
|
||||||
var tagSearch = getSearchHtml
|
var tagSearch = getSearchHtml
|
||||||
.inject(getSearchHtml.getList(collection),
|
.inject(getSearchHtml.getList(collection),
|
||||||
endpoint, itm, collection.iterator);
|
endpoint, itm, collection.iterator);
|
||||||
|
|||||||
Reference in New Issue
Block a user