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

fix(kube): updated kube terminology for configmaps/secrets [EE-4816] (#8770)

This commit is contained in:
Matt Hook 2023-05-16 09:21:50 +12:00 committed by GitHub
parent 8fa49d47f4
commit 0743f26ab8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 38 additions and 25 deletions

View file

@ -140,6 +140,11 @@ class KubernetesCreateConfigurationController {
}
async createConfigurationAsync() {
let kind = 'ConfigMap';
if (this.formValues.Kind === this.KubernetesConfigurationKinds.SECRET) {
kind = 'Secret';
}
try {
this.state.actionInProgress = true;
this.formValues.ConfigurationOwner = this.Authentication.getUserDetails().username;
@ -148,11 +153,12 @@ class KubernetesCreateConfigurationController {
}
await this.KubernetesConfigurationService.create(this.formValues);
this.Notifications.success('Success', 'Configuration succesfully created');
this.Notifications.success('Success', `${kind} successfully created`);
this.state.isEditorDirty = false;
this.$state.go('kubernetes.configurations');
} catch (err) {
this.Notifications.error('Failure', err, 'Unable to create configuration');
this.Notifications.error('Failure', err, `Unable to create ${kind}`);
} finally {
this.state.actionInProgress = false;
}
@ -166,7 +172,7 @@ class KubernetesCreateConfigurationController {
try {
this.configurations = await this.KubernetesConfigurationService.get();
} catch (err) {
this.Notifications.error('Failure', err, 'Unable to retrieve configurations');
this.Notifications.error('Failure', err, 'Unable to retrieve ConfigMaps and Secrets');
}
}