1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-02 20:35:25 +02:00

fix(toast): update styles and custom button (#7450)

EE-3829
This commit is contained in:
Ali 2022-08-10 17:07:35 +12:00 committed by GitHub
parent c3ce4d8b53
commit 7bd971f838
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
65 changed files with 115 additions and 92 deletions

View file

@ -1019,7 +1019,7 @@ class KubernetesCreateApplicationController {
try {
this.state.actionInProgress = true;
await this.KubernetesApplicationService.patch(this.savedFormValues, this.formValues);
this.Notifications.success('Application successfully updated');
this.Notifications.success('Success', 'Application successfully updated');
this.$state.go('kubernetes.applications.application', { name: this.application.Name, namespace: this.application.ResourcePool });
} catch (err) {
this.Notifications.error('Failure', err, 'Unable to update application');

View file

@ -213,7 +213,7 @@ class KubernetesApplicationController {
// await this.KubernetesApplicationService.rollback(this.application, this.formValues.SelectedRevision);
const revision = _.nth(this.application.Revisions, -2);
await this.KubernetesApplicationService.rollback(this.application, revision);
this.Notifications.success('Application successfully rolled back');
this.Notifications.success('Success', 'Application successfully rolled back');
this.$state.reload(this.$state.current);
} catch (err) {
this.Notifications.error('Failure', err, 'Unable to rollback the application');
@ -234,7 +234,7 @@ class KubernetesApplicationController {
try {
const promises = _.map(this.application.Pods, (item) => this.KubernetesPodService.delete(item));
await Promise.all(promises);
this.Notifications.success('Application successfully redeployed');
this.Notifications.success('Success', 'Application successfully redeployed');
this.$state.reload(this.$state.current);
} catch (err) {
this.Notifications.error('Failure', err, 'Unable to redeploy the application');
@ -257,7 +257,7 @@ class KubernetesApplicationController {
const application = angular.copy(this.application);
application.Note = this.formValues.Note;
await this.KubernetesApplicationService.patch(this.application, application, true);
this.Notifications.success('Application successfully updated');
this.Notifications.success('Success', 'Application successfully updated');
this.$state.reload(this.$state.current);
} catch (err) {
this.Notifications.error('Failure', err, 'Unable to update application');

View file

@ -252,7 +252,7 @@ class KubernetesNodeController {
if (this.formValues.Availability === 'Drain') {
await this.drainNode();
}
this.Notifications.success('Node updated successfully');
this.Notifications.success('Success', 'Node updated successfully');
this.$state.reload(this.$state.current);
} catch (err) {
this.Notifications.error('Failure', err, 'Unable to update node');

View file

@ -48,7 +48,7 @@ class KubernetesCreateConfigurationController {
this.formValues.Data = KubernetesConfigurationHelper.parseYaml(this.formValues);
}
await this.KubernetesConfigurationService.create(this.formValues);
this.Notifications.success('Configuration succesfully created');
this.Notifications.success('Success', 'Configuration succesfully created');
this.state.isEditorDirty = false;
this.$state.go('kubernetes.configurations');
} catch (err) {

View file

@ -95,7 +95,7 @@ class KubernetesConfigurationController {
) {
await this.KubernetesConfigurationService.create(this.formValues);
await this.KubernetesConfigurationService.delete(this.configuration);
this.Notifications.success('Configuration succesfully updated');
this.Notifications.success('Success', 'Configuration succesfully updated');
this.$state.go(
'kubernetes.configurations.configuration',
{
@ -106,7 +106,7 @@ class KubernetesConfigurationController {
);
} else {
await this.KubernetesConfigurationService.update(this.formValues, this.configuration);
this.Notifications.success('Configuration succesfully updated');
this.Notifications.success('Success', 'Configuration succesfully updated');
this.$state.reload(this.$state.current);
}
} catch (err) {

View file

@ -227,7 +227,7 @@ class KubernetesConfigureController {
this.assignFormValuesToEndpoint(modifiedEndpoint, storageClasses, ingressClasses);
this.EndpointProvider.setEndpoints(endpoints);
}
this.Notifications.success('Configuration successfully applied');
this.Notifications.success('Success', 'Configuration successfully applied');
this.$state.go('portainer.home');
} catch (err) {
this.Notifications.error('Failure', err, 'Unable to apply configuration');

View file

@ -280,7 +280,7 @@ class KubernetesDeployController {
await this.StackService.kubernetesDeploy(this.endpoint.Id, method, payload);
this.Notifications.success('Manifest successfully deployed');
this.Notifications.success('Success', 'Manifest successfully deployed');
this.state.isEditorDirty = false;
this.$state.go('kubernetes.applications');
} catch (err) {

View file

@ -93,7 +93,7 @@ class KubernetesResourcePoolAccessController {
const newAccesses = _.concat(this.authorizedUsersAndTeams, this.formValues.multiselectOutput);
const accessConfigMap = KubernetesConfigMapHelper.modifiyNamespaceAccesses(angular.copy(this.accessConfigMap), this.pool.Namespace.Name, newAccesses);
await this.KubernetesConfigMapService.updateAccess(accessConfigMap);
this.Notifications.success('Access successfully created');
this.Notifications.success('Success', 'Access successfully created');
this.$state.reload(this.$state.current);
} catch (err) {
this.Notifications.error('Failure', err, 'Unable to create accesses');
@ -113,7 +113,7 @@ class KubernetesResourcePoolAccessController {
const newAccesses = _.without(this.authorizedUsersAndTeams, ...selectedItems);
const accessConfigMap = KubernetesConfigMapHelper.modifiyNamespaceAccesses(angular.copy(this.accessConfigMap), this.pool.Namespace.Name, newAccesses);
await this.KubernetesConfigMapService.updateAccess(accessConfigMap);
this.Notifications.success('Access successfully removed');
this.Notifications.success('Success', 'Access successfully removed');
this.$state.reload(this.$state.current);
} catch (err) {
this.Notifications.error('Failure', err, 'Unable to remove accesses');

View file

@ -84,7 +84,7 @@ class KubernetesVolumeController {
try {
this.volume.PersistentVolumeClaim.Storage = this.state.volumeSize + this.state.volumeSizeUnit.charAt(0);
await this.KubernetesPersistentVolumeClaimService.patch(this.oldVolume.PersistentVolumeClaim, this.volume.PersistentVolumeClaim);
this.Notifications.success('Volume successfully updated');
this.Notifications.success('Success', 'Volume successfully updated');
if (redeploy) {
const promises = _.flatten(
@ -93,7 +93,7 @@ class KubernetesVolumeController {
})
);
await Promise.all(promises);
this.Notifications.success('Applications successfully redeployed');
this.Notifications.success('Success', 'Applications successfully redeployed');
}
this.$state.reload(this.$state.current);