1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-24 07:49:41 +02:00

feat(k8s): replace resource pool with name space

This commit is contained in:
Chaim Lev-Ari 2021-04-27 11:12:34 +03:00
parent 3e60167aeb
commit 6734f0ab74
27 changed files with 78 additions and 78 deletions

View file

@ -179,16 +179,16 @@ class KubernetesResourcePoolController {
return false;
}
/* #region UPDATE RESOURCE POOL */
/* #region UPDATE NAMESPACE */
async updateResourcePoolAsync() {
this.state.actionInProgress = true;
try {
this.checkDefaults();
await this.KubernetesResourcePoolService.patch(this.savedFormValues, this.formValues);
this.Notifications.success('Resource pool successfully updated', this.pool.Namespace.Name);
this.Notifications.success('Namespace successfully updated', this.pool.Namespace.Name);
this.$state.reload();
} catch (err) {
this.Notifications.error('Failure', err, 'Unable to create resource pool');
this.Notifications.error('Failure', err, 'Unable to create namespace');
} finally {
this.state.actionInProgress = false;
}
@ -204,7 +204,7 @@ class KubernetesResourcePoolController {
if (warnings.quota || warnings.ingress) {
const messages = {
quota:
'Reducing the quota assigned to an "in-use" resource pool may have unintended consequences, including preventing running applications from functioning correctly and potentially even blocking them from running at all.',
'Reducing the quota assigned to an "in-use" namespace may have unintended consequences, including preventing running applications from functioning correctly and potentially even blocking them from running at all.',
ingress: 'Deactivating ingresses may cause applications to be unaccessible. All ingress configurations from affected applications will be removed.',
};
const displayedMessage = `${warnings.quota ? messages.quota : ''}${warnings.quota && warnings.ingress ? '<br/><br/>' : ''}
@ -232,7 +232,7 @@ class KubernetesResourcePoolController {
this.events = await this.KubernetesEventService.get(this.pool.Namespace.Name);
this.state.eventWarningCount = KubernetesEventHelper.warningCount(this.events);
} catch (err) {
this.Notifications.error('Failure', err, 'Unable to retrieve resource pool related events');
this.Notifications.error('Failure', err, 'Unable to retrieve namespace related events');
} finally {
this.state.eventsLoading = false;
}