index.vue 730 B

123456789101112131415161718192021222324252627282930313233
  1. <script lang="ts" setup>
  2. import { onMounted, ref } from 'vue'
  3. import { IFrame } from '@/components/IFrame'
  4. import { getConfigKey } from '@/api/infra/config'
  5. import { DocAlert } from '@/components/DocAlert'
  6. defineOptions({ name: 'InfraAdminServer' })
  7. const src = ref(`${import.meta.env.VITE_GLOB_BASE_URL}/admin/applications`)
  8. const loading = ref(true)
  9. async function getInfo() {
  10. const res = await getConfigKey('url.spring-boot-admin')
  11. if (res && res.length !== 0)
  12. src.value = res
  13. loading.value = false
  14. }
  15. onMounted(() => {
  16. getInfo()
  17. })
  18. </script>
  19. <template>
  20. <div>
  21. <DocAlert title="服务监控" url="https://doc.iocoder.cn/server-monitor/" />
  22. <IFrame v-if="!loading" :src="src" />
  23. </div>
  24. </template>