Merge pull request #2279 from coreos-inc/superuser-warning

Superuser config tool warnings
This commit is contained in:
josephschorr 2017-01-13 15:54:18 -05:00 committed by GitHub
commit 570543aa17
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>