AC-734 Finished off form styling changes with requird * as red and help icon now a light grey (much more soothing).

This commit is contained in:
chris Houseknecht
2014-01-15 22:03:48 -05:00
parent b93a7d9636
commit 14acf18f47
6 changed files with 26 additions and 5 deletions

View File

@@ -167,6 +167,7 @@ function JobTemplatesAdd ($scope, $rootScope, $compile, $location, $log, $routeP
var selectPlaybook = function(oldValue, newValue) { var selectPlaybook = function(oldValue, newValue) {
if (oldValue != newValue) { if (oldValue != newValue) {
if (scope.project) { if (scope.project) {
Wait('start');
var url = GetBasePath('projects') + scope.project + '/playbooks/'; var url = GetBasePath('projects') + scope.project + '/playbooks/';
Rest.setUrl(url); Rest.setUrl(url);
Rest.get() Rest.get()
@@ -176,8 +177,10 @@ function JobTemplatesAdd ($scope, $rootScope, $compile, $location, $log, $routeP
opts.push(data[i]); opts.push(data[i]);
} }
scope.playbook_options = opts; scope.playbook_options = opts;
Wait('stop');
}) })
.error( function(data, status, headers, config) { .error( function(data, status, headers, config) {
Wait('stop');
ProcessErrors(scope, data, status, form, ProcessErrors(scope, data, status, form,
{ hdr: 'Error!', msg: 'Failed to get playbook list for ' + url +'. GET returned status: ' + status }); { hdr: 'Error!', msg: 'Failed to get playbook list for ' + url +'. GET returned status: ' + status });
}); });
@@ -343,6 +346,7 @@ function JobTemplatesEdit ($scope, $rootScope, $compile, $location, $log, $route
function getPlaybooks(project) { function getPlaybooks(project) {
if (project !== null && project !== '' && project !== undefined) { if (project !== null && project !== '' && project !== undefined) {
var url = GetBasePath('projects') + project + '/playbooks/'; var url = GetBasePath('projects') + project + '/playbooks/';
Wait('start');
Rest.setUrl(url); Rest.setUrl(url);
Rest.get() Rest.get()
.success( function(data, status, headers, config) { .success( function(data, status, headers, config) {
@@ -353,15 +357,20 @@ function JobTemplatesEdit ($scope, $rootScope, $compile, $location, $log, $route
scope['job_templates_form']['playbook'].$setValidity('required',true); scope['job_templates_form']['playbook'].$setValidity('required',true);
} }
} }
Wait('stop');
if (!scope.$$phase) { if (!scope.$$phase) {
scope.$digest(); scope.$digest();
} }
}) })
.error( function(data, status, headers, config) { .error( function(data, status, headers, config) {
Wait('stop');
Alert('Missing Playbooks', 'Unable to retrieve the list of playbooks for this project. Choose a different ' + Alert('Missing Playbooks', 'Unable to retrieve the list of playbooks for this project. Choose a different ' +
' project or make the playbooks available on the file system.', 'alert-info'); ' project or make the playbooks available on the file system.', 'alert-info');
}); });
} }
else {
Wait('stop');
}
} }
// Detect and alert user to potential SCM status issues // Detect and alert user to potential SCM status issues
@@ -479,6 +488,7 @@ function JobTemplatesEdit ($scope, $rootScope, $compile, $location, $log, $route
scope.$emit('cloudCredentialReady', data.name); scope.$emit('cloudCredentialReady', data.name);
}) })
.error( function(data, status, headers, config) { .error( function(data, status, headers, config) {
Wait('stop');
ProcessErrors(scope, data, status, null, ProcessErrors(scope, data, status, null,
{ hdr: 'Error!', msg: 'Failed to related cloud credential. GET returned status: ' + status }); { hdr: 'Error!', msg: 'Failed to related cloud credential. GET returned status: ' + status });
}); });
@@ -489,6 +499,7 @@ function JobTemplatesEdit ($scope, $rootScope, $compile, $location, $log, $route
} }
}); });
Wait('start');
// Retrieve detail record and prepopulate the form // Retrieve detail record and prepopulate the form
Rest.setUrl(defaultUrl + ':id/'); Rest.setUrl(defaultUrl + ':id/');
Rest.get({ params: {id: id} }) Rest.get({ params: {id: id} })
@@ -575,6 +586,7 @@ function JobTemplatesEdit ($scope, $rootScope, $compile, $location, $log, $route
scope.$emit('jobTemplateLoaded', data.related.cloud_credential); scope.$emit('jobTemplateLoaded', data.related.cloud_credential);
}) })
.error( function(data, status, headers, config) { .error( function(data, status, headers, config) {
Wait('stop');
ProcessErrors(scope, data, status, form, ProcessErrors(scope, data, status, form,
{ hdr: 'Error!', msg: 'Failed to retrieve job template: ' + $routeParams.id + '. GET status: ' + status }); { hdr: 'Error!', msg: 'Failed to retrieve job template: ' + $routeParams.id + '. GET status: ' + status });
}); });

View File

@@ -30,7 +30,8 @@ angular.module('PermissionFormDefinition', [])
fields: { fields: {
category: { category: {
label: '* Permission Type', label: 'Permission Type',
labelClass: 'prepend-asterisk',
type: 'radio_group', type: 'radio_group',
options: [ options: [
{ label: 'Inventory', value: 'Inventory', selected: true }, { label: 'Inventory', value: 'Inventory', selected: true },
@@ -77,7 +78,8 @@ angular.module('PermissionFormDefinition', [])
awRequiredWhen: {variable: "inventoryrequired", init: "true" } awRequiredWhen: {variable: "inventoryrequired", init: "true" }
}, },
permission_type: { permission_type: {
label: '* Permission', label: 'Permission',
labelClass: 'prepend-asterisk',
type: 'radio_group', type: 'radio_group',
options: [ options: [
{label: 'Read', value: 'read', ngShow: "category == 'Inventory'" }, {label: 'Read', value: 'read', ngShow: "category == 'Inventory'" },

View File

@@ -39,7 +39,9 @@ angular.module('InventorySyncStatusWidget', ['RestServices', 'Utilities'])
html += "<td><a href=\"" + link + "\""; html += "<td><a href=\"" + link + "\"";
html += (label == 'Hosts' || label == 'Groups') ? " class=\"pad-left-sm\" " : ""; html += (label == 'Hosts' || label == 'Groups') ? " class=\"pad-left-sm\" " : "";
html += ">" + label + "</a></td>\n"; html += ">" + label + "</a></td>\n";
html += "<td class=\"failed-column text-right\">"; html += "<td class=\"";
html += (fail > 0) ? 'failed-column' : 'zero-column';
html += " text-right\">";
html += "<a href=\"" + fail_link + "\">" + fail + "</a>"; html += "<a href=\"" + fail_link + "\">" + fail + "</a>";
html += "</td>\n"; html += "</td>\n";
html += "<td class=\"text-right\">"; html += "<td class=\"text-right\">";

View File

@@ -41,7 +41,9 @@ angular.module('JobStatusWidget', ['RestServices', 'Utilities'])
html += "<td><a href=\"" + link + "\""; html += "<td><a href=\"" + link + "\"";
html += (label == 'Hosts' || label == 'Groups') ? " class=\"pad-left-sm\" " : ""; html += (label == 'Hosts' || label == 'Groups') ? " class=\"pad-left-sm\" " : "";
html += ">" + label + "</a></td>\n"; html += ">" + label + "</a></td>\n";
html += "<td class=\"failed-column text-right\">"; html += "<td class=\"";
html += (fail > 0) ? 'failed-column' : 'zero-column';
html += " text-right\">";
html += "<a href=\"" + fail_link + "\">" + fail + "</a>"; html += "<a href=\"" + fail_link + "\">" + fail + "</a>";
html += "</td>\n"; html += "</td>\n";
html += "<td class=\"text-right\">" html += "<td class=\"text-right\">"

View File

@@ -38,7 +38,9 @@ angular.module('SCMSyncStatusWidget', ['RestServices', 'Utilities'])
var fail = params.fail; var fail = params.fail;
html += "<tr>\n"; html += "<tr>\n";
html += "<td><a href=\"" + link + "\">" + label + "</a></td>\n"; html += "<td><a href=\"" + link + "\">" + label + "</a></td>\n";
html += "<td class=\"failed-column text-right\">"; html += "<td class=\"";
html += (fail > 0) ? 'failed-column' : 'zero-column';
html += " text-right\">";
html += "<a href=\"" + fail_link + "\">" + fail + "</a>"; html += "<a href=\"" + fail_link + "\">" + fail + "</a>";
html += "</td>\n"; html += "</td>\n";
html += "<td class=\"text-right\">" html += "<td class=\"text-right\">"

View File

@@ -155,6 +155,7 @@ textarea {
.prepend-asterisk:before { .prepend-asterisk:before {
content: "\002A\00A0"; content: "\002A\00A0";
color: @red;
} }
.subtitle { .subtitle {