mirror of
https://github.com/ansible/awx.git
synced 2026-05-23 00:37:37 -02:30
Inserting ADD NOTIFICATION TEMPLATE button for tabs
with notification templates
This commit is contained in:
@@ -3,8 +3,10 @@
|
|||||||
*
|
*
|
||||||
* All Rights Reserved
|
* All Rights Reserved
|
||||||
*************************************************/
|
*************************************************/
|
||||||
|
/**
|
||||||
|
* This is the list definition for the notification templates list
|
||||||
|
* off of the settings page
|
||||||
|
*/
|
||||||
|
|
||||||
export default function(){
|
export default function(){
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -3,6 +3,10 @@
|
|||||||
*
|
*
|
||||||
* All Rights Reserved
|
* All Rights Reserved
|
||||||
*************************************************/
|
*************************************************/
|
||||||
|
/**
|
||||||
|
* This is the list definition for the notification templates list
|
||||||
|
* used in the related tabs
|
||||||
|
*/
|
||||||
|
|
||||||
export default function(){
|
export default function(){
|
||||||
return {
|
return {
|
||||||
@@ -53,6 +57,16 @@ export default function(){
|
|||||||
searchable: false,
|
searchable: false,
|
||||||
nosort: true,
|
nosort: true,
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
actions: {
|
||||||
|
add: {
|
||||||
|
label: 'Add Notification',
|
||||||
|
mode: 'all', // One of: edit, select, all
|
||||||
|
ngClick: 'addNotificationTemplate()',
|
||||||
|
awToolTip: 'Create a new notification template',
|
||||||
|
actionClass: 'btn List-buttonSubmit',
|
||||||
|
buttonContent: '+ ADD NOTIFICATION TEMPLATE'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -15,12 +15,17 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
export default ['Wait', 'GetBasePath', 'ProcessErrors', 'Rest', 'GetChoices',
|
export default ['Wait', 'GetBasePath', 'ProcessErrors', 'Rest', 'GetChoices',
|
||||||
function(Wait, GetBasePath, ProcessErrors, Rest, GetChoices) {
|
'$state',
|
||||||
|
function(Wait, GetBasePath, ProcessErrors, Rest, GetChoices, $state) {
|
||||||
return function(params) {
|
return function(params) {
|
||||||
var scope = params.scope,
|
var scope = params.scope,
|
||||||
url = params.url,
|
url = params.url,
|
||||||
id = params.id;
|
id = params.id;
|
||||||
|
|
||||||
|
scope.addNotificationTemplate = function(){
|
||||||
|
$state.go('notifications.add');
|
||||||
|
}
|
||||||
|
|
||||||
if (scope.relatednotificationsRemove) {
|
if (scope.relatednotificationsRemove) {
|
||||||
scope.relatednotificationsRemove();
|
scope.relatednotificationsRemove();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user