bug 13726

Don't show destroy action on network details for shared networks or
networks w/o Source NAT service

status 13726: resolved fixed
This commit is contained in:
Brian Federle 2012-02-17 14:54:46 -08:00
parent 313659d730
commit 8f273b0fac

View File

@ -684,6 +684,13 @@
if (args.context.networks[0].state == 'Destroyed')
return [];
if (args.context.networks[0].type == 'Shared' ||
!$.grep(args.context.networks[0].service, function(service) {
return service.name == 'SourceNat';
}).length) {
return ['edit', 'restart'];
}
return args.context.actions;
},
data: args.context.networks[0]