mirror of
https://github.com/portainer/portainer.git
synced 2025-07-22 23:09:41 +02:00
fix(template) add notification when delete (#6675)
This commit is contained in:
parent
4ddd6663f5
commit
ee90fffce1
2 changed files with 4 additions and 0 deletions
|
@ -61,7 +61,9 @@ export default class KubeCustomTemplatesViewController {
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
var template = _.find(this.templates, { Id: templateId });
|
||||||
await this.CustomTemplateService.remove(templateId);
|
await this.CustomTemplateService.remove(templateId);
|
||||||
|
this.Notifications.success('Template successfully deleted', template && template.Title);
|
||||||
_.remove(this.templates, { Id: templateId });
|
_.remove(this.templates, { Id: templateId });
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
this.Notifications.error('Failure', err, 'Failed to delete template');
|
this.Notifications.error('Failure', err, 'Failed to delete template');
|
||||||
|
|
|
@ -213,7 +213,9 @@ class CustomTemplatesViewController {
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
var template = _.find(this.templates, { Id: templateId });
|
||||||
await this.CustomTemplateService.remove(templateId);
|
await this.CustomTemplateService.remove(templateId);
|
||||||
|
this.Notifications.success('Template successfully deleted', template && template.Title);
|
||||||
_.remove(this.templates, { Id: templateId });
|
_.remove(this.templates, { Id: templateId });
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
this.Notifications.error('Failure', err, 'Failed to delete template');
|
this.Notifications.error('Failure', err, 'Failed to delete template');
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue