AccessInfo.vue 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <template>
  2. <base-dialog @cancel="cancelDialog">
  3. <div slot="header">{{ $t('storage.text_91') }}</div>
  4. <div slot="body">
  5. <a-spin :spinning="loading" />
  6. <template v-if="!loading">
  7. <a-row v-for="(value, key) in infoData" :key="key" class="pb-2">
  8. <a-col :span="7">
  9. {{key}}:
  10. </a-col>
  11. <a-col :span="16" style="word-break:break-all;">
  12. {{value}}
  13. <copy :message="value" />
  14. </a-col>
  15. </a-row>
  16. </template>
  17. </div>
  18. <div slot="footer">
  19. <a-button @click="cancelDialog">{{ $t('dialog.cancel') }}</a-button>
  20. </div>
  21. </base-dialog>
  22. </template>
  23. <script>
  24. import DialogMixin from '@/mixins/dialog'
  25. import WindowsMixin from '@/mixins/windows'
  26. export default {
  27. name: 'BucketAccessInfoDialog',
  28. mixins: [DialogMixin, WindowsMixin],
  29. data () {
  30. return {
  31. loading: false,
  32. infoData: {},
  33. }
  34. },
  35. created () {
  36. this.fetchAccessInfo()
  37. },
  38. methods: {
  39. async fetchAccessInfo () {
  40. const manager = new this.$Manager('buckets')
  41. try {
  42. this.loading = true
  43. const { data } = await manager.getSpecific({
  44. id: this.params.data[0].id,
  45. spec: 'access-info',
  46. })
  47. this.infoData = data
  48. this.loading = false
  49. } catch (err) {
  50. this.loading = false
  51. throw err
  52. }
  53. },
  54. },
  55. }
  56. </script>