fix alert formatting throughout app

This commit is contained in:
John Mitchell 2016-06-27 13:33:51 -04:00
parent 6bc025c86f
commit 8fd0d899b3
6 changed files with 45 additions and 43 deletions

View File

@ -294,8 +294,8 @@ export function ProjectsList ($scope, $rootScope, $location, $log, $stateParams,
if (data.can_cancel) {
$scope.$emit('Cancel_Update', url);
} else {
Alert('Cancel Not Allowed', 'Either you do not have access or the SCM update process completed. ' +
'Click the <em>Refresh</em> button to view the latest status.', 'alert-info', null, null, null, null, true);
Alert('Cancel Not Allowed', '<div>Either you do not have access or the SCM update process completed. ' +
'Click the <em>Refresh</em> button to view the latest status.</div>', 'alert-info', null, null, null, null, true);
}
})
.error(function (data, status) {
@ -318,8 +318,8 @@ export function ProjectsList ($scope, $rootScope, $location, $log, $stateParams,
msg: 'Call to ' + data.related.current_update + ' failed. GET status: ' + status });
});
} else {
Alert('Update Not Found', 'An SCM update does not appear to be running for project: ' + $filter('sanitize')(name) + '. Click the <em>Refresh</em> ' +
'button to view the latest status.', 'alert-info',undefined,undefined,undefined,undefined,true);
Alert('Update Not Found', '<div>An SCM update does not appear to be running for project: ' + $filter('sanitize')(name) + '. Click the <em>Refresh</em> ' +
'button to view the latest status.</div>', 'alert-info',undefined,undefined,undefined,undefined,true);
}
})
.error(function (data, status) {
@ -716,7 +716,7 @@ export function ProjectsEdit($scope, $rootScope, $compile, $location, $log,
element: '#local-path-select',
multiple: false
});
$scope.scmBranchLabel = ($scope.scm_type.value === 'svn') ? 'Revision #' : 'SCM Branch';
// Initialize related search functions. Doing it here to make sure relatedSets object is populated.

View File

@ -89,8 +89,8 @@ angular.module('GroupsHelper', [ 'RestServices', 'Utilities', listGenerator.name
if (Empty(group.source)) {
// do nothing
} else if (Empty(group.status) || group.status === "never updated") {
Alert('No Status Available', 'An inventory sync has not been performed for the selected group. Start the process by ' +
'clicking the <i class="fa fa-refresh"></i> button.', 'alert-info', null, null, null, null, true);
Alert('No Status Available', '<div>An inventory sync has not been performed for the selected group. Start the process by ' +
'clicking the <i class="fa fa-refresh"></i> button.</div>', 'alert-info', null, null, null, null, true);
} else {
Wait('start');
Rest.setUrl(group.related.inventory_source);
@ -1012,8 +1012,8 @@ angular.module('GroupsHelper', [ 'RestServices', 'Utilities', listGenerator.name
Alert('Missing Configuration', 'The selected group is not configured for updates. You must first edit the group, provide Source settings, ' +
'and then run an update.', 'alert-info');
} else if (sources_scope.status === 'updating') {
Alert('Update in Progress', 'The inventory update process is currently running for group <em>' +
$filter('sanitize')(sources_scope.summary_fields.group.name) + '</em>. Use the Refresh button to monitor the status.', 'alert-info', null, null, null, null, true);
Alert('Update in Progress', '<div>The inventory update process is currently running for group <em>' +
$filter('sanitize')(sources_scope.summary_fields.group.name) + '</em>. Use the Refresh button to monitor the status.</div>', 'alert-info', null, null, null, null, true);
} else {
InventoryUpdate({
scope: parent_scope,

View File

@ -216,8 +216,8 @@ function($compile, CreateDialog, Wait, ParseTypeChange) {
$location.path('/projects');
}
if (scope.socketStatus === 'error') {
Alert('Update Started', 'The request to start the SCM update process was submitted. ' +
'To monitor the update status, refresh the page by clicking the <i class="fa fa-refresh"></i> button.', 'alert-info', null, null, null, null, true);
Alert('Update Started', '<div>The request to start the SCM update process was submitted. ' +
'To monitor the update status, refresh the page by clicking the <i class="fa fa-refresh"></i> button.</div>', 'alert-info', null, null, null, null, true);
if (scope.refresh) {
scope.refresh();
}
@ -281,8 +281,8 @@ function($compile, CreateDialog, Wait, ParseTypeChange) {
scope.removeUpdateSubmitted = scope.$on('UpdateSubmitted', function () {
Wait('stop');
if (scope.socketStatus === 'error') {
Alert('Sync Started', 'The request to start the inventory sync process was submitted. ' +
'To monitor the status refresh the page by clicking the <i class="fa fa-refresh"></i> button.', 'alert-info', null, null, null, null, true);
Alert('Sync Started', '<div>The request to start the inventory sync process was submitted. ' +
'To monitor the status refresh the page by clicking the <i class="fa fa-refresh"></i> button.</div>', 'alert-info', null, null, null, null, true);
if (scope.refreshGroups) {
// inventory detail page
scope.refreshGroups();

View File

@ -345,20 +345,20 @@
if (data.related &&
data.related.callback) {
Alert('Callback URL',
`
<p>Host callbacks are enabled for this template. The callback URL is:</p>
<p style=\"padding: 10px 0;\">
<strong>
${$scope.callback_server_path}
${data.related.callback}
</string>
</p>
<p>The host configuration key is:
<strong>
${$filter('sanitize')(data.host_config_key)}
</string>
</p>
`,
`<div>
<p>Host callbacks are enabled for this template. The callback URL is:</p>
<p style=\"padding: 10px 0;\">
<strong>
${$scope.callback_server_path}
${data.related.callback}
</string>
</p>
<p>The host configuration key is:
<strong>
${$filter('sanitize')(data.host_config_key)}
</string>
</p>
</div>`,
'alert-info', saveCompleted, null, null,
null, true);
}

View File

@ -492,18 +492,20 @@ export default
data.related.callback) {
Alert('Callback URL',
`
<p>Host callbacks are enabled for this template. The callback URL is:</p>
<p style=\"padding: 10px 0;\">
<strong>
${$scope.callback_server_path}
${data.related.callback}
</string>
</p>
<p>The host configuration key is:
<strong>
${$filter('sanitize')(data.host_config_key)}
</string>
</p>
<div>
<p>Host callbacks are enabled for this template. The callback URL is:</p>
<p style=\"padding: 10px 0;\">
<strong>
${$scope.callback_server_path}
${data.related.callback}
</string>
</p>
<p>The host configuration key is:
<strong>
${$filter('sanitize')(data.host_config_key)}
</string>
</p>
</div>
`,
'alert-info', saveCompleted, null, null,
null, true);

View File

@ -270,8 +270,8 @@ export default ['$scope', '$rootScope', '$location', '$log',
if (data.can_cancel) {
$scope.$emit('Cancel_Update', url);
} else {
Alert('Cancel Not Allowed', 'Either you do not have access or the SCM update process completed. ' +
'Click the <em>Refresh</em> button to view the latest status.', 'alert-info', null, null, null, null, true);
Alert('Cancel Not Allowed', '<div>Either you do not have access or the SCM update process completed. ' +
'Click the <em>Refresh</em> button to view the latest status.</div>', 'alert-info', null, null, null, null, true);
}
})
.error(function (data, status) {
@ -294,8 +294,8 @@ export default ['$scope', '$rootScope', '$location', '$log',
msg: 'Call to ' + data.related.current_update + ' failed. GET status: ' + status });
});
} else {
Alert('Update Not Found', 'An SCM update does not appear to be running for project: ' + $filter('sanitize')(name) + '. Click the <em>Refresh</em> ' +
'button to view the latest status.', 'alert-info',undefined,undefined,undefined,undefined,true);
Alert('Update Not Found', '<div>An SCM update does not appear to be running for project: ' + $filter('sanitize')(name) + '. Click the <em>Refresh</em> ' +
'button to view the latest status.</div>', 'alert-info',undefined,undefined,undefined,undefined,true);
}
})
.error(function (data, status) {