Fixed license status to display correct icon and color.

This commit is contained in:
Chris Houseknecht 2013-12-28 20:03:14 +00:00
parent 5c42b88e27
commit 9accfa872f
3 changed files with 3 additions and 93 deletions

View File

@ -67,7 +67,6 @@ angular.module('ansible', [
'md5Helper',
'AccessHelper',
'SelectionHelper',
'LicenseFormDefinition',
'License',
'HostGroupsFormDefinition',
'JobStatusWidget',

View File

@ -1,88 +0,0 @@
/*********************************************
* Copyright (c) 2013 AnsibleWorks, Inc.
*
* License.js
* Form definition for LIcense model
*
*
*/
angular.module('LicenseFormDefinition', [])
.value(
'LicenseForm', {
name: 'license',
well: false,
well: false,
forceListeners: true,
'class': 'horizontal-narrow',
fields: {
license_status: {
label: 'Status',
type: 'custom',
control: '<div ng-class=\"status_color\" class=\"license-status\"><i class="icon-circle"></i> \{\{ license_status \}\}</div>',
readonly: true,
section: 'License'
},
license_key: {
label: 'Key',
type: 'textarea',
section: 'License',
'class': 'modal-input-xlarge',
readonly: true
},
license_date: {
label: 'Expires On',
type: 'text',
readonly: true,
section: 'License'
},
time_remaining: {
label: 'Time Left',
type: 'text',
readonly: true,
section: 'License'
},
available_instances: {
label: 'Available',
type: 'text',
readonly: true,
section: 'Managed Hosts'
},
current_instances: {
label: 'Used',
type: 'text',
readonly: true,
section: 'Managed Hosts'
},
free_instances: {
label: 'Remaining',
type: 'text',
readonly: true,
section: 'Managed Hosts',
controlNGClass: 'free_instances_class',
labelNGClass: 'free_instances_class'
},
company_name: {
label: 'Company',
type: 'text',
readonly: true,
section: 'Contact Info'
},
contact_name: {
label: 'Contact',
type: 'text',
readonly: true,
section: 'Contact Info'
},
contact_email: {
label: 'Contact Email',
type: 'text',
readonly: true,
section: 'Contact Info'
}
}
}); //form

View File

@ -22,18 +22,17 @@ angular.module('License', ['RestServices', 'Utilities', 'FormGenerator', 'Prompt
forceListeners: true,
fields: {
license_status: {
label: 'Status',
type: 'custom',
control: '<div ng-class=\"status_color\" class=\"license-status\"><i class="icon-circle"></i> \{\{ license_status \}\}</div>',
control: '<div class=\"license-status\" ng-class=\"status_color\"><i class="fa fa-circle"></i> \{\{ license_status \}\}</span></div>',
readonly: true,
section: 'License'
},
license_key: {
label: 'Key',
type: 'textarea',
section: 'License',
'class': 'modal-input-xlarge',
readonly: true
readonly: true,
section: 'License'
},
license_date: {
label: 'Expires On',