After purging or destroying OSDs the details component would stay open and try
to fetch data related to a non existent OSDs.
This would result in error notifications and frontend exceptions.
Signed-off-by: Tiago Melo <tmelo@suse.com>
this.i18n('Purge'),
this.i18n('OSD'),
this.i18n('purged'),
- this.osdService.purge
+ (id) => {
+ this.selection = new CdTableSelection();
+ return this.osdService.purge(id);
+ }
),
disable: () => this.isNotSelectedOrInState('up'),
icon: Icons.erase
this.i18n('destroy'),
this.i18n('OSD'),
this.i18n('destroyed'),
- this.osdService.destroy
+ (id) => {
+ this.selection = new CdTableSelection();
+ return this.osdService.destroy(id);
+ }
),
disable: () => this.isNotSelectedOrInState('up'),
icon: Icons.destroy
this.getSelectedIds().map((osd: any) => action.call(this.osdService, osd))
).subscribe(
() => {
+ this.getOsdList();
modalRef.hide();
},
() => modalRef.hide()