index.vue 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <template>
  2. <base-side-page
  3. @cancel="cancelSidePage"
  4. :title="$t('k8s.text_158')"
  5. icon="res-k8s-repos"
  6. :res-name="detailData.name"
  7. :current-tab="params.windowData.currentTab"
  8. :tabs="detailTabs"
  9. :loaded="loaded"
  10. @tab-change="handleTabChange">
  11. <template v-slot:actions>
  12. <actions
  13. :options="singleActions"
  14. :row="detailData"
  15. button-type="link"
  16. button-size="small" />
  17. </template>
  18. <component
  19. :is="params.windowData.currentTab"
  20. :res-id="data.id"
  21. :id="listId"
  22. :data="detailData"
  23. :getParams="getParams"
  24. :on-manager="onManager"
  25. :columns="columns" />
  26. </base-side-page>
  27. </template>
  28. <script>
  29. import SidePageMixin from '@/mixins/sidePage'
  30. import WindowsMixin from '@/mixins/windows'
  31. import Actions from '@/components/PageList/Actions'
  32. import SingleActionsMixin from '../mixins/singleActions'
  33. import ColumnsMixin from '../mixins/columns'
  34. import Detail from './Detail'
  35. import ContainerRegistry from './ContainerRegistry'
  36. export default {
  37. name: 'K8sReposSidePage',
  38. components: {
  39. Detail,
  40. ContainerRegistry,
  41. Actions,
  42. },
  43. mixins: [SidePageMixin, WindowsMixin, ColumnsMixin, SingleActionsMixin],
  44. data () {
  45. return {
  46. detailTabs: [
  47. { label: this.$t('compute.text_238'), key: 'detail' },
  48. { label: this.$t('k8s.text_42'), key: 'container-registry' },
  49. { label: this.$t('compute.text_240'), key: 'event-drawer' },
  50. ],
  51. }
  52. },
  53. computed: {
  54. getParams () {
  55. return {}
  56. },
  57. listId () {
  58. switch (this.params.windowData.currentTab) {
  59. case 'event-drawer':
  60. return 'EventListForNotifySidePage'
  61. default:
  62. return ''
  63. }
  64. },
  65. },
  66. }
  67. </script>