vipsingleActions.js 812 B

123456789101112131415161718192021222324252627282930
  1. import i18n from '@/locales'
  2. export default {
  3. created () {
  4. this.singleActions = [
  5. {
  6. label: i18n.t('compute.instancegroup_detach_network'),
  7. permission: 'instancegroups_perform_detach_network',
  8. action: (obj) => {
  9. this.createDialog('InstanceGroupDetachVipNetworkDialog', {
  10. data: [obj],
  11. columns: this.columns,
  12. refresh: this.refresh,
  13. })
  14. },
  15. meta: (obj) => {
  16. const ret = {
  17. validate: true,
  18. }
  19. if (obj.eip_id) {
  20. ret.validate = false
  21. ret.tooltip = this.$t('compute.detach_eip')
  22. }
  23. return ret
  24. },
  25. hidden: this.$isScopedPolicyMenuHidden('vminstance_hidden_menus.instancegroup_detach_network'),
  26. },
  27. ]
  28. },
  29. }