index.vue 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <template>
  2. <base-side-page
  3. @cancel="cancelSidePage"
  4. :title="$t('network.ssh-proxy.endpoints')"
  5. icon="res-ssh-proxy"
  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 :options="singleActions" :row="detailData" button-type="link" button-size="small" />
  13. </template>
  14. <component
  15. :is="params.windowData.currentTab"
  16. :id="listId"
  17. :res-id="detailData.id"
  18. :data="detailData"
  19. :getParams="getParams"
  20. :on-manager="onManager"
  21. :columns="columns"
  22. @side-page-trigger-handle="sidePageTriggerHandle"
  23. @init-side-page-tab="initSidePageTab"
  24. @refresh="refresh"
  25. @single-refresh="singleRefresh"
  26. @tab-change="handleTabChange" />
  27. </base-side-page>
  28. </template>
  29. <script>
  30. import SidePageMixin from '@/mixins/sidePage'
  31. import WindowsMixin from '@/mixins/windows'
  32. import Actions from '@/components/PageList/Actions'
  33. import SingleActionsMixin from '../mixins/singleActions'
  34. import ColumnsMixin from '../mixins/columns'
  35. import SshProxyDetail from './Detail'
  36. import SshProxyScopeSidePage from './Scope'
  37. export default {
  38. name: 'SshProxySidePage',
  39. components: {
  40. SshProxyDetail,
  41. SshProxyScopeSidePage,
  42. Actions,
  43. },
  44. mixins: [SidePageMixin, WindowsMixin, ColumnsMixin, SingleActionsMixin],
  45. data () {
  46. return {
  47. detailTabs: [
  48. { label: this.$t('network.text_67'), key: 'SshProxy-detail' },
  49. { label: this.$t('network.ssh-proxy.scope'), key: 'SshProxy-scope-side-page' },
  50. { label: this.$t('network.text_150'), key: 'event-drawer' },
  51. ],
  52. }
  53. },
  54. computed: {
  55. getParams () {
  56. return {
  57. proxy_endpoint: this.detailData.id,
  58. }
  59. },
  60. listId () {
  61. switch (this.params.windowData.currentTab) {
  62. case 'SshProxy-scope-side-page':
  63. return 'SshProxyScopeSidePage'
  64. default:
  65. return ''
  66. }
  67. },
  68. },
  69. }
  70. </script>