From 111ba8f7ee679bcc83bdb01ab2c38239b8ca1058 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Tue, 27 Mar 2018 16:18:56 -0400 Subject: [PATCH] Changes missing from the license removal code --- static/css/core-ui.css | 35 -------- static/js/core-config-setup.js | 95 +--------------------- static/js/services/notification-service.js | 6 -- 3 files changed, 1 insertion(+), 135 deletions(-) diff --git a/static/css/core-ui.css b/static/css/core-ui.css index 76e6ca859..2a7fdaf15 100644 --- a/static/css/core-ui.css +++ b/static/css/core-ui.css @@ -450,41 +450,6 @@ a:focus { margin-right: 4px; } -.config-license-field-element .required { - background-color: #f5f5f5; - color: #333; -} - -.config-license-field-element textarea { - padding: 10px; - margin-bottom: 10px; - height: 250px; -} - -.config-license-field-element .license-status { - margin-bottom: 26px; -} - -.config-license-field-element table { - margin-top: 20px; -} - -.config-license-field-element .fa { - margin-right: 6px; -} - -.config-license-field-element .license-valid h4 { - color: #2FC98E; -} - -.config-license-field-element .license-invalid h4 { - color: #D64456; -} - -.config-license-field-element li { - padding: 4px; -} - .co-checkbox { position: relative; } diff --git a/static/js/core-config-setup.js b/static/js/core-config-setup.js index b2ab62383..f4bace735 100644 --- a/static/js/core-config-setup.js +++ b/static/js/core-config-setup.js @@ -19,8 +19,6 @@ angular.module("core-config-setup", ['angularFileUpload']) $scope.GITHOST_REGEX = '^https?://([a-zA-Z0-9]+\.?\/?)+$'; $scope.SERVICES = [ - {'id': 'license', 'title': 'License'}, - {'id': 'redis', 'title': 'Redis'}, {'id': 'registry-storage', 'title': 'Registry Storage'}, @@ -1435,95 +1433,4 @@ angular.module("core-config-setup", ['angularFileUpload']) } }; return directiveDefinitionObject; - }) - - .directive('configLicenseField', function () { - var directiveDefinitionObject = { - priority: 0, - templateUrl: '/static/directives/config/config-license-field.html', - replace: false, - transclude: false, - restrict: 'C', - scope: { - 'isValid': '=?isValid', - 'forSetup': '@forSetup' - }, - controller: function($scope, $element, ApiService, UserService) { - $scope.LicenseStates = { - none: 'no-license', - loading: 'license-loading', - valid: 'license-valid', - invalid: 'license-error', - validating: 'validating-license' - }; - - $scope.state = $scope.forSetup == 'true' ? $scope.LicenseStates.none : $scope.LicenseStates.loading; - $scope.showingEditor = $scope.forSetup == 'true'; - $scope.requiredBox = ''; - - $scope.requirementTitles = { - 'software.quay': 'Quay Enterprise', - 'software.quay.deployments': 'Quay Enterprise Deployments' - }; - - var handleLicenseSuccess = function(resp) { - $scope.state = resp['success'] ? $scope.LicenseStates.valid : $scope.LicenseStates.invalid; - $scope.requiredBox = resp['success'] ? 'filled' : ''; - $scope.showingEditor = !resp['success']; - $scope.licenseStatus = resp['status']; - $scope.licenseError = null; - $scope.isValid = resp['success']; - }; - - var handleLicenseError = function(resp) { - $scope.licenseError = ApiService.getErrorMessage(resp); - $scope.licenseStatus = null; - $scope.state = 'license-error'; - $scope.showingEditor = true; - $scope.requiredBox = ''; - $scope.isValid = false; - }; - - var loadLicense = function() { - if ($scope.forSetup == 'true') { - $scope.state = $scope.LicenseStates.none; - return; - } - - ApiService.getLicense().then(handleLicenseSuccess, handleLicenseError); - }; - - UserService.updateUserIn($scope, function(user) { - if (!user.anonymous) { - loadLicense(); - } - }); - - $scope.showEditor = function($event) { - $event.preventDefault(); - $event.stopPropagation(); - - $scope.showingEditor = true; - }; - - $scope.validateAndUpdate = function($event) { - $event.preventDefault(); - $event.stopPropagation(); - - $scope.state = $scope.LicenseStates.validating; - - var data = { - 'license': $scope.licenseContents - }; - - if ($scope.forSetup == 'true') { - ApiService.suSetAndValidateLicense(data).then(handleLicenseSuccess, handleLicenseError); - } else { - ApiService.updateLicense(data).then(handleLicenseSuccess, handleLicenseError); - } - }; - } - }; - return directiveDefinitionObject; - }); - + }); diff --git a/static/js/services/notification-service.js b/static/js/services/notification-service.js index dc9ee3603..ff337542e 100644 --- a/static/js/services/notification-service.js +++ b/static/js/services/notification-service.js @@ -66,12 +66,6 @@ function($rootScope, $interval, UserService, ApiService, StringBuilderService, P } } }, - 'expiring_license': { - 'level': 'error', - 'message': 'Your license will expire at: {expires_at} ' + - '

Please contact support to purchase a new license.', - 'page': '/contact/' - }, 'maintenance': { 'level': 'warning', 'message': 'We will be down for schedule maintenance from {from_date} to {to_date} ' +