fix(app/namespace): allow default-ns registries edit from namespace page (#5554)

pull/5575/head
LP B 2021-09-03 15:47:37 +02:00 committed by GitHub
parent 70602cf7c8
commit b8e6c5ea91
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 8 deletions

View File

@ -317,16 +317,16 @@
Registries Registries
</div> </div>
<div class="form-group" ng-if="!ctrl.isAdmin"> <div class="form-group" ng-if="!ctrl.isAdmin || ctrl.isSystem">
<label class="col-sm-3 col-lg-2 control-label text-left" style="padding-top: 0;"> <label class="col-sm-3 col-lg-2 control-label text-left" style="padding-top: 0;">
Selected registries Selected registries
</label> </label>
<div class="col-sm-9 col-lg-4"> <div class="col-sm-9 col-lg-4">
{{ ctrl.selectedRegistries }} {{ ctrl.selectedRegistries ? ctrl.selectedRegistries : 'None' }}
</div> </div>
</div> </div>
<div ng-if="ctrl.isAdmin"> <div ng-if="ctrl.isAdmin && !ctrl.isSystem">
<div class="form-group"> <div class="form-group">
<div class="col-sm-12 small text-muted"> <div class="col-sm-12 small text-muted">
<p> <p>
@ -405,14 +405,14 @@
<!-- !summary --> <!-- !summary -->
<!-- actions --> <!-- actions -->
<div ng-if="ctrl.isAdmin && !ctrl.isDefaultNamespace" class="col-sm-12 form-section-title"> <div ng-if="ctrl.isAdmin" class="col-sm-12 form-section-title">
Actions Actions
</div> </div>
<div ng-if="ctrl.isAdmin && !ctrl.isDefaultNamespace" class="form-group"> <div ng-if="ctrl.isAdmin" class="form-group">
<div class="col-sm-12"> <div class="col-sm-12">
<button <button
type="button" type="button"
ng-if="ctrl.isEditable" ng-if="!ctrl.isSystem"
class="btn btn-primary btn-sm" class="btn btn-primary btn-sm"
ng-disabled="!resourcePoolEditForm.$valid || ctrl.isUpdateButtonDisabled()" ng-disabled="!resourcePoolEditForm.$valid || ctrl.isUpdateButtonDisabled()"
ng-click="ctrl.updateResourcePool()" ng-click="ctrl.updateResourcePool()"
@ -421,7 +421,13 @@
<span ng-hide="ctrl.state.actionInProgress" data-cy="k8sNamespaceEdit-updateNamespaceButton">Update namespace</span> <span ng-hide="ctrl.state.actionInProgress" data-cy="k8sNamespaceEdit-updateNamespaceButton">Update namespace</span>
<span ng-show="ctrl.state.actionInProgress">Update in progress...</span> <span ng-show="ctrl.state.actionInProgress">Update in progress...</span>
</button> </button>
<button type="button" class="btn btn-primary btn-sm" ng-click="ctrl.markUnmarkAsSystem()" button-spinner="ctrl.state.actionInProgress"> <button
ng-if="!ctrl.isDefaultNamespace"
type="button"
class="btn btn-primary btn-sm"
ng-click="ctrl.markUnmarkAsSystem()"
button-spinner="ctrl.state.actionInProgress"
>
<span ng-if="ctrl.isSystem">Unmark as system</span> <span ng-if="ctrl.isSystem">Unmark as system</span>
<span ng-if="!ctrl.isSystem">Mark as system</span> <span ng-if="!ctrl.isSystem">Mark as system</span>
</button> </button>

View File

@ -325,7 +325,7 @@ class KubernetesResourcePoolController {
this.formValues.Registries.push(reg); this.formValues.Registries.push(reg);
} }
}); });
this.selectedRegistries = this.formValues.Registries.map((r) => r.Name).join(', ');
return; return;
} }