index.vue 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <template>
  2. <base-side-page
  3. @cancel="cancelSidePage"
  4. :title="$t('dictionary.kafka')"
  5. icon="res-kafka"
  6. :res-name="detailData.name"
  7. :actions="params.actions"
  8. :current-tab="params.windowData.currentTab"
  9. :tabs="detailTabs"
  10. :loaded="loaded"
  11. @tab-change="handleTabChange">
  12. <template v-slot:actions>
  13. <actions
  14. :options="singleActions"
  15. :row="detailData"
  16. button-type="link"
  17. button-size="small" />
  18. </template>
  19. <component
  20. :is="params.windowData.currentTab"
  21. :id="listId"
  22. :res-id="detailData.id"
  23. :data="detailData"
  24. :getParams="getParams"
  25. :on-manager="onManager"
  26. taskResource="compute-tasks"
  27. @side-page-trigger-handle="sidePageTriggerHandle"
  28. @init-side-page-tab="initSidePageTab"
  29. @refresh="refresh"
  30. @single-refresh="singleRefresh"
  31. @tab-change="handleTabChange" />
  32. </base-side-page>
  33. </template>
  34. <script>
  35. import SidePageMixin from '@/mixins/sidePage'
  36. import WindowsMixin from '@/mixins/windows'
  37. import Actions from '@/components/PageList/Actions'
  38. import SingleActionsMixin from '../mixins/singleActions'
  39. import ColumnsMixin from '../mixins/columns'
  40. import KafkaDetail from './Detail'
  41. export default {
  42. name: 'KafkaSidePage',
  43. components: {
  44. KafkaDetail,
  45. Actions,
  46. },
  47. mixins: [SidePageMixin, WindowsMixin, ColumnsMixin, SingleActionsMixin],
  48. data () {
  49. return {
  50. detailTabs: [
  51. { label: this.$t('middleware.properties'), key: 'kafka-detail' },
  52. { label: this.$t('table.title.task'), key: 'task-drawer' },
  53. { label: this.$t('middleware.operations'), 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 'EventListForKafkaSidePage'
  65. default:
  66. return ''
  67. }
  68. },
  69. },
  70. }
  71. </script>