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

pull/5575/head
LP B 3 years ago committed by GitHub
parent 70602cf7c8
commit b8e6c5ea91
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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

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

Loading…
Cancel
Save