Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
7cc8d906
authored
Apr 07, 2023
by
YunaiV
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加 swagger、druid、skywalking、admin 的自定义路径
parent
5fb61f8c
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
96 additions
and
39 deletions
+96
-39
src/types/auto-components.d.ts
+4
-0
src/views/infra/dbDoc/index.vue
+23
-29
src/views/infra/druid/index.vue
+17
-3
src/views/infra/server/index.vue
+18
-3
src/views/infra/skywalking/index.vue
+17
-1
src/views/infra/swagger/index.vue
+17
-3
No files found.
src/types/auto-components.d.ts
View file @
7cc8d906
...
@@ -56,10 +56,14 @@ declare module '@vue/runtime-core' {
...
@@ -56,10 +56,14 @@ declare module '@vue/runtime-core' {
ElIcon
:
typeof
import
(
'element-plus/es'
)[
'ElIcon'
]
ElIcon
:
typeof
import
(
'element-plus/es'
)[
'ElIcon'
]
ElImageViewer
:
typeof
import
(
'element-plus/es'
)[
'ElImageViewer'
]
ElImageViewer
:
typeof
import
(
'element-plus/es'
)[
'ElImageViewer'
]
ElInput
:
typeof
import
(
'element-plus/es'
)[
'ElInput'
]
ElInput
:
typeof
import
(
'element-plus/es'
)[
'ElInput'
]
ElInputNumber
:
typeof
import
(
'element-plus/es'
)[
'ElInputNumber'
]
ElLink
:
typeof
import
(
'element-plus/es'
)[
'ElLink'
]
ElLink
:
typeof
import
(
'element-plus/es'
)[
'ElLink'
]
ElOption
:
typeof
import
(
'element-plus/es'
)[
'ElOption'
]
ElOption
:
typeof
import
(
'element-plus/es'
)[
'ElOption'
]
ElPagination
:
typeof
import
(
'element-plus/es'
)[
'ElPagination'
]
ElPagination
:
typeof
import
(
'element-plus/es'
)[
'ElPagination'
]
ElPopover
:
typeof
import
(
'element-plus/es'
)[
'ElPopover'
]
ElPopover
:
typeof
import
(
'element-plus/es'
)[
'ElPopover'
]
ElRadio
:
typeof
import
(
'element-plus/es'
)[
'ElRadio'
]
ElRadioButton
:
typeof
import
(
'element-plus/es'
)[
'ElRadioButton'
]
ElRadioGroup
:
typeof
import
(
'element-plus/es'
)[
'ElRadioGroup'
]
ElRow
:
typeof
import
(
'element-plus/es'
)[
'ElRow'
]
ElRow
:
typeof
import
(
'element-plus/es'
)[
'ElRow'
]
ElScrollbar
:
typeof
import
(
'element-plus/es'
)[
'ElScrollbar'
]
ElScrollbar
:
typeof
import
(
'element-plus/es'
)[
'ElScrollbar'
]
ElSelect
:
typeof
import
(
'element-plus/es'
)[
'ElSelect'
]
ElSelect
:
typeof
import
(
'element-plus/es'
)[
'ElSelect'
]
...
...
src/views/infra/dbDoc/index.vue
View file @
7cc8d906
...
@@ -2,46 +2,38 @@
...
@@ -2,46 +2,38 @@
<doc-alert
title=
"数据库文档"
url=
"https://doc.iocoder.cn/db-doc/"
/>
<doc-alert
title=
"数据库文档"
url=
"https://doc.iocoder.cn/db-doc/"
/>
<ContentWrap
title=
"数据库文档"
>
<ContentWrap
title=
"数据库文档"
>
<!-- 操作工具栏 -->
<div
class=
"mb-10px"
>
<div
class=
"mb-10px"
>
<XButton
<el-button
type=
"primary"
plain
@
click=
"handleExport('HTML')"
>
type=
"primary"
<Icon
icon=
"ep:download"
/>
导出 HTML
preIcon=
"ep:download"
</el-button>
:title=
"t('action.export') + ' HTML'"
<el-button
type=
"primary"
plain
@
click=
"handleExport('Word')"
>
@
click=
"handleExport('HTML')"
<Icon
icon=
"ep:download"
/>
导出 Word
/>
</el-button>
<XButton
<el-button
type=
"primary"
plain
@
click=
"handleExport('Markdown')"
>
type=
"primary"
<Icon
icon=
"ep:download"
/>
导出 Markdown
preIcon=
"ep:download"
</el-button>
:title=
"t('action.export') + ' Word'"
@
click=
"handleExport('Word')"
/>
<XButton
type=
"primary"
preIcon=
"ep:download"
:title=
"t('action.export') + ' Markdown'"
@
click=
"handleExport('Markdown')"
/>
</div>
</div>
<IFrame
v-if=
"!lo
ding"
v-loading=
"lo
ding"
:src=
"src"
/>
<IFrame
v-if=
"!lo
ading"
v-loading=
"loa
ding"
:src=
"src"
/>
</ContentWrap>
</ContentWrap>
</
template
>
</
template
>
<
script
setup
lang=
"ts"
name=
"DbDoc"
>
<
script
setup
lang=
"ts"
name=
"DbDoc"
>
import
download
from
'@/utils/download'
import
download
from
'@/utils/download'
import
*
as
DbDocApi
from
'@/api/infra/dbDoc'
import
*
as
DbDocApi
from
'@/api/infra/dbDoc'
const
{
t
}
=
useI18n
()
// 国际化
const
loading
=
ref
(
true
)
// 是否加载中
const
src
=
ref
(
''
)
const
src
=
ref
(
''
)
// HTML 的地址
const
loding
=
ref
(
true
)
/** 页面加载 */
/** 页面加载 */
const
init
=
async
()
=>
{
const
init
=
async
()
=>
{
const
res
=
await
DbDocApi
.
exportHtml
()
try
{
let
blob
=
new
Blob
([
res
],
{
type
:
'text/html'
})
const
data
=
await
DbDocApi
.
exportHtml
()
let
blobUrl
=
window
.
URL
.
createObjectURL
(
blob
)
const
blob
=
new
Blob
([
data
],
{
type
:
'text/html'
})
src
.
value
=
blobUrl
src
.
value
=
window
.
URL
.
createObjectURL
(
blob
)
loding
.
value
=
false
}
finally
{
loading
.
value
=
false
}
}
}
/** 处理导出 */
/** 处理导出 */
const
handleExport
=
async
(
type
:
string
)
=>
{
const
handleExport
=
async
(
type
:
string
)
=>
{
if
(
type
===
'HTML'
)
{
if
(
type
===
'HTML'
)
{
...
@@ -57,6 +49,8 @@ const handleExport = async (type: string) => {
...
@@ -57,6 +49,8 @@ const handleExport = async (type: string) => {
download
.
markdown
(
res
,
'数据库文档.md'
)
download
.
markdown
(
res
,
'数据库文档.md'
)
}
}
}
}
/** 初始化 */
onMounted
(
async
()
=>
{
onMounted
(
async
()
=>
{
await
init
()
await
init
()
})
})
...
...
src/views/infra/druid/index.vue
View file @
7cc8d906
...
@@ -3,10 +3,24 @@
...
@@ -3,10 +3,24 @@
<doc-alert
title=
"多数据源(读写分离)"
url=
"https://doc.iocoder.cn/dynamic-datasource/"
/>
<doc-alert
title=
"多数据源(读写分离)"
url=
"https://doc.iocoder.cn/dynamic-datasource/"
/>
<ContentWrap>
<ContentWrap>
<IFrame
:src=
"src
"
/>
<IFrame
v-if=
"!loading"
:src=
"url
"
/>
</ContentWrap>
</ContentWrap>
</
template
>
</
template
>
<
script
setup
lang=
"ts"
name=
"Druid"
>
<
script
setup
lang=
"ts"
name=
"Druid"
>
const
BASE_URL
=
import
.
meta
.
env
.
VITE_BASE_URL
import
*
as
ConfigApi
from
'@/api/infra/config'
const
src
=
ref
(
BASE_URL
+
'/druid/index.html'
)
const
loading
=
ref
(
true
)
// 是否加载中
const
url
=
ref
(
import
.
meta
.
env
.
VITE_BASE_URL
+
'/druid/index.html'
)
/** 初始化 */
onMounted
(
async
()
=>
{
try
{
const
data
=
await
ConfigApi
.
getConfigKey
(
'url.druid'
)
if
(
data
&&
data
.
length
>
0
)
{
url
.
value
=
data
}
}
finally
{
loading
.
value
=
false
}
})
</
script
>
</
script
>
src/views/infra/server/index.vue
View file @
7cc8d906
<
template
>
<
template
>
<doc-alert
title=
"服务监控"
url=
"https://doc.iocoder.cn/server-monitor/"
/>
<doc-alert
title=
"服务监控"
url=
"https://doc.iocoder.cn/server-monitor/"
/>
<ContentWrap>
<ContentWrap>
<IFrame
:src=
"src"
/>
<IFrame
v-if=
"!loading"
v-loading=
"loading"
:src=
"src"
/>
</ContentWrap>
</ContentWrap>
</
template
>
</
template
>
<
script
setup
lang=
"ts"
name=
"AdminServer"
>
<
script
setup
lang=
"ts"
name=
"AdminServer"
>
const
BASE_URL
=
import
.
meta
.
env
.
VITE_BASE_URL
import
*
as
ConfigApi
from
'@/api/infra/config'
const
src
=
ref
(
BASE_URL
+
'/admin/applications'
)
const
loading
=
ref
(
true
)
// 是否加载中
const
src
=
ref
(
import
.
meta
.
env
.
VITE_BASE_URL
+
'/admin/applications'
)
/** 初始化 */
onMounted
(
async
()
=>
{
try
{
const
data
=
await
ConfigApi
.
getConfigKey
(
'url.spring-boot-admin'
)
if
(
data
&&
data
.
length
>
0
)
{
src
.
value
=
data
}
}
finally
{
loading
.
value
=
false
}
})
</
script
>
</
script
>
src/views/infra/skywalking/index.vue
View file @
7cc8d906
<
template
>
<
template
>
<doc-alert
title=
"服务监控"
url=
"https://doc.iocoder.cn/server-monitor/"
/>
<doc-alert
title=
"服务监控"
url=
"https://doc.iocoder.cn/server-monitor/"
/>
<ContentWrap>
<ContentWrap>
<IFrame
:src=
"src"
/>
<IFrame
v-if=
"!loading"
v-loading=
"loading"
:src=
"src"
/>
</ContentWrap>
</ContentWrap>
</
template
>
</
template
>
<
script
setup
lang=
"ts"
name=
"Skywalking"
>
<
script
setup
lang=
"ts"
name=
"Skywalking"
>
import
*
as
ConfigApi
from
'@/api/infra/config'
const
loading
=
ref
(
true
)
// 是否加载中
const
src
=
ref
(
'http://skywalking.shop.iocoder.cn'
)
const
src
=
ref
(
'http://skywalking.shop.iocoder.cn'
)
/** 初始化 */
onMounted
(
async
()
=>
{
try
{
const
data
=
await
ConfigApi
.
getConfigKey
(
'url.skywalking'
)
if
(
data
&&
data
.
length
>
0
)
{
src
.
value
=
data
}
}
finally
{
loading
.
value
=
false
}
})
</
script
>
</
script
>
src/views/infra/swagger/index.vue
View file @
7cc8d906
...
@@ -6,7 +6,21 @@
...
@@ -6,7 +6,21 @@
</ContentWrap>
</ContentWrap>
</
template
>
</
template
>
<
script
setup
lang=
"ts"
name=
"Swagger"
>
<
script
setup
lang=
"ts"
name=
"Swagger"
>
const
BASE_URL
=
import
.
meta
.
env
.
VITE_BASE_URL
import
*
as
ConfigApi
from
'@/api/infra/config'
// const src = ref(BASE_URL + '/doc.html')
const
src
=
ref
(
BASE_URL
+
'/swagger-ui'
)
const
loading
=
ref
(
true
)
// 是否加载中
const
src
=
ref
(
import
.
meta
.
env
.
VITE_BASE_URL
+
'/doc.html'
)
// Knife4j UI
// const src = ref(import.meta.env.VITE_BASE_URL + '/swagger-ui') // Swagger UI
/** 初始化 */
onMounted
(
async
()
=>
{
try
{
const
data
=
await
ConfigApi
.
getConfigKey
(
'url.swagger'
)
if
(
data
&&
data
.
length
>
0
)
{
src
.
value
=
data
}
}
finally
{
loading
.
value
=
false
}
})
</
script
>
</
script
>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment