1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-28 10:55:30 +03:00

AC-616 Fixed date warning vs. date expired message. The CheckLicense routine now looks for date_expired flag.

This commit is contained in:
Chris Houseknecht 2013-11-08 18:16:52 +00:00
parent 5a3977495a
commit 1d27f666e4

View File

@ -73,9 +73,10 @@ angular.module('AccessHelper', ['RestServices', 'Utilities', 'ngCookies'])
'contact <a href="mailto:info@ansibleworks.com"><strong>info@ansibleworks.com</strong></a> for assistance.';
Alert(hdr, msg, status);
}
if (license['date_warning'] !== undefined && license['date_warning'] == true) {
if (license['date_expired'] !== undefined && license['date_expired'] == true) {
// expired
status = 'alert-info';
hdr = 'License Expired';
hdr = 'AWX License Expired';
msg = 'Your AnsibleWorks AWX License has expired and is no longer compliant. ' +
'You can continue, but you will be unable to add any additional hosts. Please ' +
'<a href="http://store.ansibleworks.com" target="_blank"><strong>visit the AnsibleWorks online store</strong></a> ' +
@ -83,6 +84,14 @@ angular.module('AccessHelper', ['RestServices', 'Utilities', 'ngCookies'])
'for assistance.';
Alert(hdr, msg, status);
}
else if (license['date_warning'] !== undefined && license['date_warning'] == true) {
status = 'alert-info';
hdr = 'AWX License Warning';
msg = 'Your AnsibleWorks AWX License is about to expire. To extend your license, please ' +
'<a href="http://store.ansibleworks.com" target="_blank"><strong>visit the AnsibleWorks online store</strong></a>, or ' +
'contact <a href="mailto:info@ansibleworks.com"><strong>info@ansibleworks.com</strong></a> for more information.';
Alert(hdr, msg, status);
}
if (license['free_instances'] !== undefined && parseInt(license['free_instances']) <= 0) {
status = 'alert-info';
hdr = 'License Warning';