diff --git a/awx/ui/client/src/notifications/add/add.controller.js b/awx/ui/client/src/notifications/add/add.controller.js
index e7940a1fe4..35511adf44 100644
--- a/awx/ui/client/src/notifications/add/add.controller.js
+++ b/awx/ui/client/src/notifications/add/add.controller.js
@@ -36,7 +36,6 @@ export default
for (i = 0; i < $scope.notification_type_options.length; i++) {
if ($scope.notification_type_options[i].value === '') {
$scope.notification_type_options[i].value="manual";
- // $scope.scm_type = $scope.scm_type_options[i];
break;
}
}
@@ -79,7 +78,6 @@ export default
// Save
$scope.formSave = function () {
var params,
- // config,
v = $scope.notification_type.value;
generator.clearApiErrors();
diff --git a/awx/ui/client/src/notifications/edit/edit.controller.js b/awx/ui/client/src/notifications/edit/edit.controller.js
index d1fc1102e6..2e500b4b94 100644
--- a/awx/ui/client/src/notifications/edit/edit.controller.js
+++ b/awx/ui/client/src/notifications/edit/edit.controller.js
@@ -39,7 +39,6 @@ export default
for (i = 0; i < $scope.notification_type_options.length; i++) {
if ($scope.notification_type_options[i].value === '') {
$scope.notification_type_options[i].value="manual";
- // $scope.scm_type = $scope.scm_type_options[i];
break;
}
}
@@ -80,14 +79,6 @@ export default
}
}
- // if ($scope.notification_type.value !== 'manual') {
- // $scope.pathRequired = false;
- // $scope.scmRequired = true;
- // } else {
- // $scope.pathRequired = true;
- // $scope.scmRequired = false;
- // }
-
master.notification_type = $scope.notification_type;
CreateSelect2({
element: '#notifier_notification_type',
@@ -135,7 +126,6 @@ export default
$scope.formSave = function(){
var params,
- // config,
v = $scope.notification_type.value;
generator.clearApiErrors();
diff --git a/awx/ui/client/src/notifications/notification-templates-list/list.controller.js b/awx/ui/client/src/notifications/notification-templates-list/list.controller.js
index c6041b891a..f099d6520e 100644
--- a/awx/ui/client/src/notifications/notification-templates-list/list.controller.js
+++ b/awx/ui/client/src/notifications/notification-templates-list/list.controller.js
@@ -102,7 +102,7 @@ export default
$compile(elem)(scope);
elem.on('shown.bs.popover', function() {
$('.popover').each(function() {
- // $compile($(this))(scope); //make nested directives work!
+ $compile($(this))(scope); //make nested directives work!
});
$('.popover-content, .popover-title').click(function() {
elem.popover('hide');
@@ -135,8 +135,7 @@ export default
recent_notifications.forEach(function(row) {
html += "
\n";
- html += " | \n";
+ html += " | \n";
html += "" + ($filter('longDate')(row.created)).replace(/ /,' ') + " | \n";
html += "
\n";
});
@@ -150,9 +149,6 @@ export default
}
};
-
-
-
scope.testNotification = function(){
var name = this.notifier.name;
Rest.setUrl(defaultUrl + this.notifier.id +'/test/');
@@ -182,7 +178,6 @@ export default
};
scope.deleteNotification = function(id, name){
-
var action = function () {
$('#prompt-modal').modal('hide');
Wait('start');
@@ -197,7 +192,6 @@ export default
msg: 'Call to ' + url + ' failed. DELETE returned status: ' + status });
});
};
-
var bodyHtml = 'Are you sure you want to delete the inventory below?
' + name + '
';
Prompt({
hdr: 'Delete',
@@ -206,7 +200,5 @@ export default
actionText: 'DELETE'
});
};
-
-
}
];
diff --git a/awx/ui/client/src/notifications/notificationTemplates.form.js b/awx/ui/client/src/notifications/notificationTemplates.form.js
index eeef07d1c7..16f4acb54c 100644
--- a/awx/ui/client/src/notifications/notificationTemplates.form.js
+++ b/awx/ui/client/src/notifications/notificationTemplates.form.js
@@ -116,7 +116,6 @@ export default function() {
variable: "password_required" ,
init: "false"
},
- // ngRequired:"notification_type.value == 'email' || notification_type.value == 'irc'",
ngShow: "notification_type.value == 'email' || notification_type.value == 'irc' ",
subForm: 'typeSubForm'
},
@@ -164,7 +163,6 @@ export default function() {
variable: "token_required",
init: "false"
},
- // ngRequired:"notification_type.value == 'slack' || notification_type.value == 'pagerduty' || notification_type.value == 'hipchat'",
ngShow: "notification_type.value == 'slack' || notification_type.value == 'pagerduty' || notification_type.value == 'hipchat'",
subForm: 'typeSubForm'
},
diff --git a/awx/ui/client/src/notifications/notifications.list.js b/awx/ui/client/src/notifications/notifications.list.js
index 4f53fbb2cf..cb249fd73b 100644
--- a/awx/ui/client/src/notifications/notifications.list.js
+++ b/awx/ui/client/src/notifications/notifications.list.js
@@ -4,8 +4,6 @@
* All Rights Reserved
*************************************************/
-
-
export default function(){
return {
name: 'notifications' ,
@@ -24,13 +22,12 @@ export default function(){
notification_type: {
label: 'Type',
searchType: 'select',
- searchOptions: [], // will be set by Options call to projects resource
+ searchOptions: [],
excludeModal: true,
columnClass: 'col-md-4 hidden-sm hidden-xs'
},
notifiers_success: {
label: 'Successful',
- // columnClass: 'List-staticColumn--toggle',
flag: 'notifiers_success',
type: "toggle",
ngClick: "toggleNotification($event, notification.id, \"notifiers_success\")",
diff --git a/awx/ui/client/src/notifications/shared/toggle-notification.factory.js b/awx/ui/client/src/notifications/shared/toggle-notification.factory.js
index 7369140843..85d8c41822 100644
--- a/awx/ui/client/src/notifications/shared/toggle-notification.factory.js
+++ b/awx/ui/client/src/notifications/shared/toggle-notification.factory.js
@@ -23,68 +23,33 @@ export default ['Wait', 'GetBasePath', 'ProcessErrors', 'Rest',
notifier_id = params.notifier.id,
callback = params.callback,
column = params.column, // notifiers_success/notifiers_error
- url = params.url;
+ url = params.url+ id+ "/"+ column + '/';
-
- url = url + id+ "/"+ column + '/';
- if(!notifier[column]){
- params = {
- id: notifier_id
- };
- }
- else {
- params = {
- id: notifier_id,
- disassociate: 1
- };
- }
- Rest.setUrl(url);
- Rest.post(params)
- .success( function(data) {
- if (callback) {
- scope.$emit(callback, data.id);
- notifier[column] = !notifier[column];
- }
- else {
- Wait('stop');
- }
- })
- .error( function(data, status) {
- ProcessErrors(scope, data, status, null, { hdr: 'Error!',
- msg: 'Failed to update notification ' + data.id + ' PUT returned: ' + status });
- });
- // // Perform the update
- // if (scope.removeScheduleFound) {
- // scope.removeScheduleFound();
- // }
- // scope.removeScheduleFound = scope.$on('ScheduleFound', function(e, data) {
- // data.id = (data.enabled) ? false : true;
- // Rest.put(data)
- // .success( function() {
- // if (callback) {
- // scope.$emit(callback, id);
- // }
- // else {
- // Wait('stop');
- // }
- // })
- // .error( function(data, status) {
- // ProcessErrors(scope, data, status, null, { hdr: 'Error!',
- // msg: 'Failed to update schedule ' + id + ' PUT returned: ' + status });
- // });
- // });
- //
- // Wait('start');
- //
- // // Get the schedule
- // Rest.setUrl(url);
- // Rest.get()
- // .success(function(data) {
- // scope.$emit('ScheduleFound', data);
- // })
- // .error(function(data,status){
- // ProcessErrors(scope, data, status, null, { hdr: 'Error!',
- // msg: 'Failed to retrieve schedule ' + id + ' GET returned: ' + status });
- // });
+ if(!notifier[column]){
+ params = {
+ id: notifier_id
+ };
+ }
+ else {
+ params = {
+ id: notifier_id,
+ disassociate: 1
+ };
+ }
+ Rest.setUrl(url);
+ Rest.post(params)
+ .success( function(data) {
+ if (callback) {
+ scope.$emit(callback, data.id);
+ notifier[column] = !notifier[column];
+ }
+ else {
+ Wait('stop');
+ }
+ })
+ .error( function(data, status) {
+ ProcessErrors(scope, data, status, null, { hdr: 'Error!',
+ msg: 'Failed to update notification ' + data.id + ' PUT returned: ' + status });
+ });
};
}];
diff --git a/awx/ui/client/src/shared/form-generator.js b/awx/ui/client/src/shared/form-generator.js
index 25685ef74c..192644d391 100644
--- a/awx/ui/client/src/shared/form-generator.js
+++ b/awx/ui/client/src/shared/form-generator.js
@@ -1227,9 +1227,6 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat
} else {
html += "" + field.label + "";
}
- // html += '' + field.label + "";
-
- // html += (field.labelBind) ? "ng-bind=\"" + field.labelBind + "\" " : "";
html += (field.awPopOver) ? this.attr(field, 'awPopOver', fld) : "";
html += "\n";