Superuser config tool warnings

Adds warnings displayed in the superuser config tool that the changes made will only be applied to the local instance (in non-k8s case) or that a deployment is required (in the k8s case)

[Delivers #137537413]
This commit is contained in:
Joseph Schorr 2017-01-13 15:50:50 -05:00
parent d20b20ae2a
commit efdedba2ae
3 changed files with 14 additions and 1 deletions

View file

@ -61,6 +61,7 @@ class SuperUserRegistryStatus(ApiResource):
# If we have SETUP_COMPLETE, then we're ready to go!
if app.config.get('SETUP_COMPLETE', False):
return {
'provider_id': config_provider.provider_id,
'requires_restart': config_provider.requires_restart(app.config),
'status': 'ready'
}

View file

@ -197,6 +197,7 @@
$('#restartingContainerModal').modal('hide');
$scope.configStatus = resp['status'];
$scope.requiresRestart = resp['requires_restart'];
$scope.configProviderId = resp['provider_id'];
if ($scope.configStatus == 'ready') {
$scope.currentConfig = null;

View file

@ -1,7 +1,7 @@
<div class="super-user">
<div class="cor-loader" ng-show="!configStatus"></div>
<div class="page-content" quay-show="Features.SUPER_USERS && configStatus == 'ready'">
<div ng-if="requiresRestart" class="alert alert-warning restart-required">
<div ng-if="requiresRestart && configProviderId == 'file'" class="alert alert-warning restart-required">
<button class="btn btn-warning" ng-click="restartContainer()">
<i class="fa fa-refresh"></i>Restart Now
</button>
@ -9,6 +9,14 @@
<div><strong>Container restart required!</strong></div>
Configuration changes have been made but the container hasn't been restarted yet.
</div>
<div ng-if="requiresRestart && configProviderId == 'k8s'" class="alert alert-warning restart-required">
<i class="fa fa-lg fa-warning"></i>
<div><strong>Container restarts required!</strong></div>
Configuration changes have been made to the Kubernetes secret but they will not be applied to
your cluster until the containers are restarted. Please issue a rolling deployment now to apply
these changes to the cluster.
</div>
<div class="cor-title">
<span class="cor-title-link"></span>
<span class="cor-title-content">Quay Enterprise Management</span>
@ -51,6 +59,9 @@
<div class="cor-tab-content">
<!-- Setup tab -->
<div id="setup" class="tab-pane">
<div class="co-alert co-alert-warning" ng-if="configProviderId != 'k8s'">
<strong>Warning:</strong> If you are running Quay Enterprise under multiple containers, additional actions are necessary in order to apply any configuration changes made here to the entire cluster. It is recommended to make (and validate) configuration changes here, then copy your configuration to all instances and restart them.
</div>
<div class="config-setup-tool" is-active="configStatus == 'ready'"
configuration-saved="configurationSaved(config)"></div>
</div>