1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-05 05:45:22 +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

@ -139,7 +139,7 @@ class CreateConfigController {
const resourceControl = data.Portainer.ResourceControl;
const userId = userDetails.ID;
await this.ResourceControlService.applyResourceControl(userId, accessControlData, resourceControl);
this.Notifications.success('Config successfully created');
this.Notifications.success('Success', 'Configuration successfully created');
this.state.isEditorDirty = false;
this.$state.go('docker.configs', {}, { reload: true });
} catch (err) {

View file

@ -16,7 +16,7 @@ angular.module('portainer.docker').controller('ConfigController', [
$scope.removeConfig = function removeConfig(configId) {
ConfigService.remove(configId)
.then(function success() {
Notifications.success('Config successfully removed');
Notifications.success('Success', 'Configuration successfully removed');
$state.go('docker.configs', {});
})
.catch(function error(err) {

View file

@ -883,7 +883,7 @@ angular.module('portainer.docker').controller('CreateContainerController', [
} else {
await ContainerService.updateLimits($transition$.params().from, config);
$scope.config = config;
Notifications.success('Limits updated');
Notifications.success('Success', 'Limits updated');
}
} catch (err) {
Notifications.error('Failure', err, 'Update Limits fail');
@ -1090,7 +1090,7 @@ angular.module('portainer.docker').controller('CreateContainerController', [
}
function onSuccess() {
Notifications.success('Container successfully created');
Notifications.success('Success', 'Container successfully created');
$state.go('docker.containers', {}, { reload: true });
}
}

View file

@ -290,7 +290,7 @@ angular.module('portainer.docker').controller('ContainerController', [
function removeContainer(cleanAssociatedVolumes) {
ContainerService.remove($scope.container, cleanAssociatedVolumes)
.then(function success() {
Notifications.success('Container successfully removed');
Notifications.success('Success', 'Container successfully removed');
$state.go('docker.containers', {}, { reload: true });
})
.catch(function error(err) {
@ -380,7 +380,7 @@ angular.module('portainer.docker').controller('ContainerController', [
}
function notifyAndChangeView() {
Notifications.success('Container successfully re-created');
Notifications.success('Success', 'Container successfully re-created');
$state.go('docker.containers', {}, { reload: true });
}
@ -414,7 +414,7 @@ angular.module('portainer.docker').controller('ContainerController', [
Name: restartPolicy,
MaximumRetryCount: maximumRetryCount,
};
Notifications.success('Restart policy updated');
Notifications.success('Success', 'Restart policy updated');
}
function notifyOnError(err) {

View file

@ -106,7 +106,7 @@ export default class DockerFeaturesConfigurationController {
await this.EndpointService.updateSecuritySettings(this.endpoint.Id, securitySettings);
this.endpoint.SecuritySettings = securitySettings;
this.Notifications.success('Saved settings successfully');
this.Notifications.success('Success', 'Saved settings successfully');
} catch (e) {
this.Notifications.error('Failure', e, 'Failed saving settings');
}

View file

@ -76,7 +76,7 @@ angular.module('portainer.docker').controller('ImageController', [
ImageService.tagImage($transition$.params().id, image.fromImage)
.then(function success() {
Notifications.success('Image successfully tagged');
Notifications.success('Success', 'Image successfully tagged');
$state.go('docker.images.image', { id: $transition$.params().id }, { reload: true });
})
.catch(function error(err) {
@ -155,7 +155,7 @@ angular.module('portainer.docker').controller('ImageController', [
.then(function success(data) {
var downloadData = new Blob([data.file], { type: 'application/x-tar' });
FileSaver.saveAs(downloadData, 'images.tar');
Notifications.success('Image successfully downloaded');
Notifications.success('Success', 'Image successfully downloaded');
})
.catch(function error(err) {
Notifications.error('Failure', err, 'Unable to download image');

View file

@ -90,7 +90,7 @@ angular.module('portainer.docker').controller('ImagesController', [
.then(function success(data) {
var downloadData = new Blob([data.file], { type: 'application/x-tar' });
FileSaver.saveAs(downloadData, 'images.tar');
Notifications.success('Image(s) successfully downloaded');
Notifications.success('Success', 'Image(s) successfully downloaded');
})
.catch(function error(err) {
Notifications.error('Failure', err, 'Unable to download image(s)');

View file

@ -58,9 +58,9 @@ angular.module('portainer.docker').controller('ImportImageController', [
await tagImage(imageIds[1]);
$state.go('docker.images.image', { id: imageIds[1] }, { reload: true });
}
Notifications.success('Images successfully uploaded');
Notifications.success('Success', 'Images successfully uploaded');
} else {
Notifications.success('The uploaded tar file contained multiple images. The provided tag therefore has been ignored.');
Notifications.success('Success', 'The uploaded tar file contained multiple images. The provided tag therefore has been ignored.');
}
} catch (err) {
Notifications.error('Failure', err, 'Unable to upload image');

View file

@ -239,7 +239,7 @@ angular.module('portainer.docker').controller('CreateNetworkController', [
return ResourceControlService.applyResourceControl(userId, accessControlData, resourceControl);
})
.then(function success() {
Notifications.success('Network successfully created');
Notifications.success('Success', 'Network successfully created');
if (context.reload) {
$state.go(
'docker.networks',

View file

@ -19,7 +19,7 @@ class DockerRegistryAccessController {
this.state.actionInProgress = true;
try {
await this.EndpointService.updateRegistryAccess(this.state.endpointId, this.state.registryId, this.registryEndpointAccesses);
this.Notifications.success('Access successfully updated');
this.Notifications.success('Success', 'Access successfully updated');
this.$state.reload();
} catch (err) {
this.state.actionInProgress = false;

View file

@ -89,7 +89,7 @@ angular.module('portainer.docker').controller('CreateSecretController', [
return ResourceControlService.applyResourceControl(userId, accessControlData, resourceControl);
})
.then(function success() {
Notifications.success('Secret successfully created');
Notifications.success('Success', 'Secret successfully created');
$state.go('docker.secrets', {}, { reload: true });
})
.catch(function error(err) {

View file

@ -16,7 +16,7 @@ angular.module('portainer.docker').controller('SecretController', [
$scope.removeSecret = function removeSecret(secretId) {
SecretService.remove(secretId)
.then(function success() {
Notifications.success('Secret successfully removed');
Notifications.success('Success', 'Secret successfully removed');
$state.go('docker.secrets', {});
})
.catch(function error(err) {

View file

@ -537,7 +537,7 @@ angular.module('portainer.docker').controller('CreateServiceController', [
return $q.all([rcPromise, webhookPromise]);
})
.then(function success() {
Notifications.success('Service successfully created');
Notifications.success('Success', 'Service successfully created');
$state.go('docker.services', {}, { reload: true });
})
.catch(function error(err) {

View file

@ -609,7 +609,7 @@ angular.module('portainer.docker').controller('ServiceController', [
return $q.when($scope.webhookID && WebhookService.deleteWebhook($scope.webhookID));
})
.then(function success() {
Notifications.success('Service successfully deleted');
Notifications.success('Success', 'Service successfully deleted');
$state.go('docker.services', {});
})
.catch(function error(err) {

View file

@ -133,7 +133,7 @@ angular.module('portainer.docker').controller('CreateVolumeController', [
return ResourceControlService.applyResourceControl(userId, accessControlData, resourceControl);
})
.then(function success() {
Notifications.success('Volume successfully created');
Notifications.success('Success', 'Volume successfully created');
$state.go('docker.volumes', {}, { reload: true });
})
.catch(function error(err) {