index.vue 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <template>
  2. <base-side-page
  3. @cancel="cancelSidePage"
  4. :title="$t('k8s.text_239')"
  5. icon="res-k8s-ingress"
  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 :options="singleActions" :row="detailData" button-type="link" button-size="small" />
  14. </template>
  15. <component :is="params.windowData.currentTab" :id="listId" :res-id="data.id" :data="detailData" :onManager="onManager" resource="ingresses" />
  16. </base-side-page>
  17. </template>
  18. <script>
  19. import ColumnsMixin from '../mixins/columns'
  20. import SingleActionsMixin from '../mixins/singleActions'
  21. import Detail from './Detail'
  22. import ServiceList from '@K8S/views/service/components/List'
  23. import SourceInformationSidepage from '@K8S/sections/SourceInformationSidepage'
  24. import SidePageMixin from '@/mixins/sidePage'
  25. import WindowsMixin from '@/mixins/windows'
  26. import Actions from '@/components/PageList/Actions'
  27. export default {
  28. name: 'K8SIngressSidePage',
  29. components: {
  30. Actions,
  31. Detail,
  32. SourceInformationSidepage,
  33. ServiceList,
  34. },
  35. mixins: [SidePageMixin, WindowsMixin, ColumnsMixin, SingleActionsMixin],
  36. data () {
  37. return {
  38. detailTabs: [
  39. { label: this.$t('k8s.text_217'), key: 'detail' },
  40. { label: this.$t('k8s.text_13'), key: 'service-list' },
  41. { label: this.$t('k8s.text_219'), key: 'source-information-sidepage' },
  42. { label: this.$t('compute.text_240'), key: 'event-drawer' },
  43. ],
  44. }
  45. },
  46. computed: {
  47. listId () {
  48. switch (this.params.windowData.currentTab) {
  49. case 'event-drawer':
  50. return 'EventListForK8SIngressSidePage'
  51. case 'service-list':
  52. return 'ServiceListForK8SIngressSidePage'
  53. case 'events-sidepage':
  54. return 'EventsForK8SIngressSidePage'
  55. default:
  56. return ''
  57. }
  58. },
  59. },
  60. }
  61. </script>