index.vue 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <template>
  2. <base-side-page
  3. @cancel="cancelSidePage"
  4. :title="$t('compute.text_108')"
  5. icon="res-keypair"
  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" :data="detailData" :res-id="data.id" :id="listId" :on-manager="onManager" />
  16. </base-side-page>
  17. </template>
  18. <script>
  19. import SingleActionsMixin from '../mixins/singleActions'
  20. import ColumnsMixin from '../mixins/columns'
  21. import KeyPairDetail from './Detail'
  22. import SidePageMixin from '@/mixins/sidePage'
  23. import WindowsMixin from '@/mixins/windows'
  24. import Actions from '@/components/PageList/Actions'
  25. export default {
  26. name: 'KeyPairSidePage',
  27. components: {
  28. Actions,
  29. KeyPairDetail,
  30. },
  31. mixins: [SidePageMixin, WindowsMixin, ColumnsMixin, SingleActionsMixin],
  32. data () {
  33. return {
  34. detailTabs: [
  35. { label: this.$t('compute.text_238'), key: 'key-pair-detail' },
  36. { label: this.$t('compute.text_240'), key: 'event-drawer' },
  37. ],
  38. }
  39. },
  40. computed: {
  41. listId () {
  42. switch (this.params.windowData.currentTab) {
  43. case 'event-drawer':
  44. return 'EventListForKeyPairSidePage'
  45. default:
  46. return ''
  47. }
  48. },
  49. },
  50. }
  51. </script>