index.vue 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <template>
  2. <base-side-page
  3. @cancel="cancelSidePage"
  4. :title="$t('storage.text_18')"
  5. icon="res-bucket"
  6. :res-name="detailData.name"
  7. :tabs="detailTabs"
  8. :current-tab="params.windowData.currentTab"
  9. :loaded="loaded"
  10. @tab-change="handleTabChange">
  11. <template v-slot:actions v-if="showActions">
  12. <actions :options="singleActions" :row="detailData" button-type="link" button-size="small" />
  13. </template>
  14. <component :columns="columns" :is="params.windowData.currentTab" :data="detailData" :on-manager="onManager" :refresh="refresh" :getParams="getParams" :params="getParams" :res-id="getParams.storage" :id="listId" taskResource="compute-tasks" />
  15. </base-side-page>
  16. </template>
  17. <script>
  18. import SidePageMixin from '@/mixins/sidePage'
  19. import WindowsMixin from '@/mixins/windows'
  20. import Actions from '@/components/PageList/Actions'
  21. import ColumnsMixin from '../mixins/columns'
  22. import SingleActionsMixin from '../mixins/singleActions'
  23. import Detail from './Detail'
  24. import Objects from './Objects'
  25. import Monitor from './Monitor'
  26. import Rules from './CrossDomainRules'
  27. import Policies from './Policies'
  28. export default {
  29. name: 'BucketStorageSidePage',
  30. components: {
  31. Actions,
  32. Detail,
  33. Objects,
  34. Monitor,
  35. Rules,
  36. Policies,
  37. },
  38. mixins: [SidePageMixin, WindowsMixin, ColumnsMixin, SingleActionsMixin],
  39. data () {
  40. return {
  41. detailTabs: [
  42. { label: this.$t('storage.text_81'), key: 'detail' },
  43. { label: this.$t('storage.text_169'), key: 'objects' },
  44. { label: this.$t('storage.text_211'), key: 'rules' },
  45. { label: this.$t('storage.text_259'), key: 'Policies' },
  46. { label: this.$t('storage.text_170'), key: 'monitor' },
  47. { label: this.$t('table.title.task'), key: 'task-drawer' },
  48. { label: this.$t('storage.text_85'), key: 'event-drawer' },
  49. ],
  50. }
  51. },
  52. computed: {
  53. getParams () {
  54. return {
  55. storage: this.data.id,
  56. details: true,
  57. }
  58. },
  59. showActions () {
  60. return !this.$isScopedPolicyMenuHidden('oss_hidden_columns.perform_action')
  61. },
  62. listId () {
  63. switch (this.params.windowData.currentTab) {
  64. case 'event-drawer':
  65. return 'EventListForBucketStorageSidePage'
  66. default:
  67. return ''
  68. }
  69. },
  70. },
  71. }
  72. </script>