index.vue 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <template>
  2. <base-side-page
  3. @cancel="cancelSidePage"
  4. :title="$t('k8s.text_377')"
  5. icon="res-k8s-rbacclusterrolebinding"
  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. :data="detailData"
  21. resource="rbacclusterrolebindings"
  22. :serverColumns="columns"
  23. :id="listId"
  24. :res-id="data.id"
  25. :getParams="getParams"
  26. :on-manager="onManager"
  27. @refresh="refresh"
  28. @single-refresh="singleRefresh"
  29. @tab-change="handleTabChange" />
  30. </base-side-page>
  31. </template>
  32. <script>
  33. import SingleActionsMixin from '../mixins/singleActions'
  34. import ColumnsMixin from '../mixins/columns'
  35. import Detail from './Detail'
  36. import SourceInformationSidepage from '@K8S/sections/SourceInformationSidepage'
  37. import SidePageMixin from '@/mixins/sidePage'
  38. import WindowsMixin from '@/mixins/windows'
  39. import Actions from '@/components/PageList/Actions'
  40. export default {
  41. name: 'K8SRbacclusterrolebindingSidePage',
  42. components: {
  43. Actions,
  44. Detail,
  45. SourceInformationSidepage,
  46. },
  47. mixins: [SidePageMixin, WindowsMixin, ColumnsMixin, SingleActionsMixin],
  48. data () {
  49. return {
  50. detailTabs: [
  51. { label: this.$t('k8s.text_217'), key: 'detail' },
  52. { label: this.$t('k8s.text_219'), key: 'source-information-sidepage' },
  53. { label: this.$t('compute.text_240'), key: 'event-drawer' },
  54. ],
  55. }
  56. },
  57. computed: {
  58. getParams () {
  59. return null
  60. },
  61. listId () {
  62. switch (this.params.windowData.currentTab) {
  63. case 'event-drawer':
  64. return 'EventListForK8SRbacclusterrolebindingSidePage'
  65. default:
  66. return ''
  67. }
  68. },
  69. },
  70. }
  71. </script>