Disallow deleting controller or isolated instance groups

Added two new properties to the InstanceGroup model - `is_controller`
and `is_isolated`. Used these properties to hide the trash icon for
instance groups that are either controller or isolated.

Signed-off-by: Vismay Golwala <vgolwala@redhat.com>
This commit is contained in:
Vismay Golwala
2019-04-11 15:53:08 -04:00
parent f23b4e7b9a
commit e0c4fd4b3a
4 changed files with 39 additions and 2 deletions

View File

@@ -83,7 +83,7 @@ export default ['$scope', '$filter', '$state', 'Alert', 'resolvedModels', 'Datas
vm.rowAction = {
trash: instance_group => {
return vm.isSuperuser && instance_group.name !== 'tower';
return vm.isSuperuser && instance_group.name !== 'tower' && !instance_group.is_controller && !instance_group.is_isolated;
}
};