Merge branch 'dev-3.3' of https://git.mesalab.cn/nezha/nezha-fronted into dev-3.4
This commit is contained in:
@@ -374,3 +374,13 @@
|
|||||||
.meta-option-box {
|
.meta-option-box {
|
||||||
color: $--color-text-regular;
|
color: $--color-text-regular;
|
||||||
}
|
}
|
||||||
|
.el-range-input{
|
||||||
|
background: $--background-color-empty;
|
||||||
|
}
|
||||||
|
.ql-toolbar {
|
||||||
|
line-height: 22px;
|
||||||
|
.ql-picker-options{
|
||||||
|
background-color: $--background-color-empty;
|
||||||
|
color: $--color-text-primary;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -571,3 +571,11 @@
|
|||||||
overflow: auto;
|
overflow: auto;
|
||||||
background-color: $--table-body-background-color;
|
background-color: $--table-body-background-color;
|
||||||
}
|
}
|
||||||
|
.el-checkbox.is-disabled{
|
||||||
|
line-height: 1;
|
||||||
|
height: 16px;
|
||||||
|
}
|
||||||
|
.el-checkbox__input.is-disabled{
|
||||||
|
line-height: 1;
|
||||||
|
height: 16px;
|
||||||
|
}
|
||||||
|
|||||||
@@ -215,16 +215,16 @@
|
|||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
text-transform: Capitalize;
|
text-transform: Capitalize;
|
||||||
}
|
}
|
||||||
.pipeline-option {
|
|
||||||
i {
|
|
||||||
color: $--color-text-regular;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
.el-input-group__append {
|
.el-input-group__append {
|
||||||
background-color: $--border-color-light;
|
background-color: $--border-color-light;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.pipeline-option {
|
||||||
|
i {
|
||||||
|
color: $--color-text-regular;
|
||||||
|
}
|
||||||
|
}
|
||||||
.sub-label {
|
.sub-label {
|
||||||
padding-right: 15px;
|
padding-right: 15px;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
|
|||||||
@@ -15,7 +15,8 @@ export default {
|
|||||||
// labelLoading:{},
|
// labelLoading:{},
|
||||||
that: {},
|
that: {},
|
||||||
detailList: Boolean,
|
detailList: Boolean,
|
||||||
alertTableDialog: Boolean
|
alertTableDialog: Boolean,
|
||||||
|
isTopoInfo: Boolean
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
@@ -31,9 +32,10 @@ export default {
|
|||||||
const leftOffSetView = this.detailList ? -80 : 10
|
const leftOffSetView = this.detailList ? -80 : 10
|
||||||
const leftOffSet = this.detailList ? -80 : 10
|
const leftOffSet = this.detailList ? -80 : 10
|
||||||
const topOffSet = this.detailList ? 60 : 22
|
const topOffSet = this.detailList ? 60 : 22
|
||||||
|
const topoOffset = this.isTopoInfo ? 155 : 0
|
||||||
if (position.top + this.heightList > clientHeight) {
|
if (position.top + this.heightList > clientHeight) {
|
||||||
return {
|
return {
|
||||||
left: `${position.left + position.width + leftOffSet}px`,
|
left: `${position.left + position.width + leftOffSet - topoOffset}px`,
|
||||||
top: `${position.top - this.heightList + topOffSet}px`
|
top: `${position.top - this.heightList + topOffSet}px`
|
||||||
}
|
}
|
||||||
} else if (this.alertTableDialog) {
|
} else if (this.alertTableDialog) {
|
||||||
@@ -47,7 +49,7 @@ export default {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return {
|
return {
|
||||||
left: `${position.left + position.width + leftOffSetView}px`,
|
left: `${position.left + position.width + leftOffSetView - topoOffset}px`,
|
||||||
top: `${position.top}px`
|
top: `${position.top}px`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -150,7 +150,7 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
detailViewRightObj = this.tableData[0]
|
detailViewRightObj = this.tableData[0]
|
||||||
}
|
}
|
||||||
this.detailViewRightObj = detailViewRightObj
|
this.detailViewRightObj = this.$loadsh.cloneDeep(detailViewRightObj)
|
||||||
this.inputDateQuery = this.handlerTableData(this.tableData)
|
this.inputDateQuery = this.handlerTableData(this.tableData)
|
||||||
this.pageObj.total = this.tableData.length
|
this.pageObj.total = this.tableData.length
|
||||||
if (!this.scrollbarWrap) {
|
if (!this.scrollbarWrap) {
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
detailViewRightObj = this.tableData[0]
|
detailViewRightObj = this.tableData[0]
|
||||||
}
|
}
|
||||||
this.detailViewRightObj = detailViewRightObj
|
this.detailViewRightObj = this.$loadsh.cloneDeep(detailViewRightObj)
|
||||||
this.pageObj.total = response.data.total
|
this.pageObj.total = response.data.total
|
||||||
this.pageObj.pages = response.data.pages
|
this.pageObj.pages = response.data.pages
|
||||||
if (!this.scrollbarWrap && this.$refs.dataTable && this.$refs.dataTable.$refs.dataTable) {
|
if (!this.scrollbarWrap && this.$refs.dataTable && this.$refs.dataTable.$refs.dataTable) {
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ export default {
|
|||||||
}, 100)
|
}, 100)
|
||||||
},
|
},
|
||||||
detailViewRightShow (item) {
|
detailViewRightShow (item) {
|
||||||
this.detailViewRightObj = item
|
this.detailViewRightObj = this.$loadsh.cloneDeep(item)
|
||||||
},
|
},
|
||||||
orderDetail (order, orderType) {
|
orderDetail (order, orderType) {
|
||||||
if (orderType === 'ascending') {
|
if (orderType === 'ascending') {
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
<template v-slot:default="slotProps">
|
<template v-slot:default="slotProps">
|
||||||
<endpoint-table
|
<endpoint-table
|
||||||
style="height: 100%"
|
style="height: 100%"
|
||||||
|
:isTopoInfo="true"
|
||||||
ref="dataTable"
|
ref="dataTable"
|
||||||
:orderByFa="orderBy"
|
:orderByFa="orderBy"
|
||||||
v-my-loading="tools.loading"
|
v-my-loading="tools.loading"
|
||||||
|
|||||||
@@ -153,11 +153,11 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.editCredential.type === 3) {
|
if (this.editCredential.type === 3) {
|
||||||
if (this.editCredential.config.authProtocol && !this.editCredential.config.privProtocol) {
|
if (this.editCredential.config.authProtocol && !this.editCredential.config.privProtocol) {
|
||||||
this.editCredential.securityLevel = 'authNoPriv'
|
this.editCredential.config.securityLevel = 'authNoPriv'
|
||||||
} else if (this.editCredential.config.authProtocol && this.editCredential.config.privProtocol) {
|
} else if (this.editCredential.config.authProtocol && this.editCredential.config.privProtocol) {
|
||||||
this.editCredential.securityLevel = 'authPriv'
|
this.editCredential.config.securityLevel = 'authPriv'
|
||||||
} else {
|
} else {
|
||||||
this.editCredential.securityLevel = 'noAuthNoPriv'
|
this.editCredential.config.securityLevel = 'noAuthNoPriv'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const param = JSON.parse(JSON.stringify(this.editCredential))
|
const param = JSON.parse(JSON.stringify(this.editCredential))
|
||||||
|
|||||||
@@ -146,7 +146,7 @@
|
|||||||
<span class="active-icon gray-bg inline-block"></span>
|
<span class="active-icon gray-bg inline-block"></span>
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
<nz-tooltip :that="scope.row.configs[1]" v-if="scope.row.configs[1] && scope.row.configs[1].loading && scope.row.configs[1].state > 1" :type="'configs[1]'">
|
<nz-tooltip :that="scope.row.configs[1]" v-if="scope.row.configs[1] && scope.row.configs[1].loading && scope.row.configs[1].state > 1" :type="'configs[1]'" :isTopoInfo="isTopoInfo">
|
||||||
<div name="default">
|
<div name="default">
|
||||||
<div v-html="suspendedStr(scope.row.configs[1].state)"></div>
|
<div v-html="suspendedStr(scope.row.configs[1].state)"></div>
|
||||||
</div>
|
</div>
|
||||||
@@ -220,6 +220,10 @@ export default {
|
|||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: true
|
default: true
|
||||||
},
|
},
|
||||||
|
isTopoInfo: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
endpointTab: Boolean,
|
endpointTab: Boolean,
|
||||||
loading: Boolean
|
loading: Boolean
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -317,7 +317,7 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
detailViewRightObj = this.tableData[0]
|
detailViewRightObj = this.tableData[0]
|
||||||
}
|
}
|
||||||
this.detailViewRightObj = detailViewRightObj
|
this.detailViewRightObj = this.$loadsh.cloneDeep(detailViewRightObj)
|
||||||
this.pageObj.total = response.data.total
|
this.pageObj.total = response.data.total
|
||||||
this.pageObj.pages = response.data.pages
|
this.pageObj.pages = response.data.pages
|
||||||
if (!this.scrollbarWrap && this.$refs.dataTable && this.$refs.dataTable.$refs.dataTable) {
|
if (!this.scrollbarWrap && this.$refs.dataTable && this.$refs.dataTable.$refs.dataTable) {
|
||||||
|
|||||||
@@ -750,7 +750,7 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
detailViewRightObj = this.tableData[0]
|
detailViewRightObj = this.tableData[0]
|
||||||
}
|
}
|
||||||
this.detailViewRightObj = detailViewRightObj
|
this.detailViewRightObj = this.$loadsh.cloneDeep(detailViewRightObj)
|
||||||
this.pageObj.total = response.data.total
|
this.pageObj.total = response.data.total
|
||||||
this.pageObj.pages = response.data.pages
|
this.pageObj.pages = response.data.pages
|
||||||
if (!this.scrollbarWrap && this.$refs.dataTable && this.$refs.dataTable.$refs.dataTable) {
|
if (!this.scrollbarWrap && this.$refs.dataTable && this.$refs.dataTable.$refs.dataTable) {
|
||||||
|
|||||||
@@ -195,7 +195,7 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
detailViewRightObj = this.tableData[0]
|
detailViewRightObj = this.tableData[0]
|
||||||
}
|
}
|
||||||
this.detailViewRightObj = detailViewRightObj
|
this.detailViewRightObj = this.$loadsh.cloneDeep(detailViewRightObj)
|
||||||
this.pageObj.total = response.data.total
|
this.pageObj.total = response.data.total
|
||||||
this.pageObj.pages = response.data.pages
|
this.pageObj.pages = response.data.pages
|
||||||
if (!this.scrollbarWrap && this.$refs.dataTable && this.$refs.dataTable.$refs.dataTable) {
|
if (!this.scrollbarWrap && this.$refs.dataTable && this.$refs.dataTable.$refs.dataTable) {
|
||||||
|
|||||||
@@ -668,7 +668,7 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
detailViewRightObj = this.tableData[0]
|
detailViewRightObj = this.tableData[0]
|
||||||
}
|
}
|
||||||
this.detailViewRightObj = detailViewRightObj
|
this.detailViewRightObj = this.$loadsh.cloneDeep(detailViewRightObj)
|
||||||
this.pageObj.total = response.data.total
|
this.pageObj.total = response.data.total
|
||||||
this.pageObj.pages = response.data.pages
|
this.pageObj.pages = response.data.pages
|
||||||
if (!this.scrollbarWrap && this.$refs.dataTable && this.$refs.dataTable.$refs.dataTable) {
|
if (!this.scrollbarWrap && this.$refs.dataTable && this.$refs.dataTable.$refs.dataTable) {
|
||||||
|
|||||||
@@ -440,7 +440,7 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
detailViewRightObj = this.tableData[0]
|
detailViewRightObj = this.tableData[0]
|
||||||
}
|
}
|
||||||
this.detailViewRightObj = detailViewRightObj
|
this.detailViewRightObj = this.$loadsh.cloneDeep(detailViewRightObj)
|
||||||
this.pageObj.total = response.data.total
|
this.pageObj.total = response.data.total
|
||||||
this.pageObj.pages = response.data.pages
|
this.pageObj.pages = response.data.pages
|
||||||
if (!this.scrollbarWrap && this.$refs.dataTable && this.$refs.dataTable.$refs.dataTable) {
|
if (!this.scrollbarWrap && this.$refs.dataTable && this.$refs.dataTable.$refs.dataTable) {
|
||||||
|
|||||||
@@ -1,22 +1,40 @@
|
|||||||
|
import { getUUID } from './components/common/js/common'
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
const CancelToken = axios.CancelToken // 申明CancelToken
|
const CancelToken = axios.CancelToken // 申明CancelToken
|
||||||
|
|
||||||
export const requestsArr = []
|
export const requestsArr = []
|
||||||
axios.interceptors.request.use(config => {
|
// 清除掉请求完成的实例 防止占用内存
|
||||||
const source = CancelToken.source() // 申明CancelToken,也可new CancelToken.source()实例一个
|
const removePending = (config) => {
|
||||||
config.cancelToken = source.token // 讲实例对象的token赋予该请求
|
if (!config) {
|
||||||
requestsArr.push(source) // 将该实例添加到队列中
|
return false
|
||||||
const token = localStorage.getItem('nz-token')
|
|
||||||
if (token) {
|
|
||||||
config.headers.Authorization = token // 请求头token
|
|
||||||
}
|
}
|
||||||
const lang = localStorage.getItem('nz-language')
|
for (const i in requestsArr) {
|
||||||
if (lang) {
|
if (requestsArr[i].id === config.id) {
|
||||||
config.headers.Language = lang // 请求头token
|
requestsArr.splice(i, 1)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
axios.interceptors.request.use(
|
||||||
|
config => {
|
||||||
|
const source = CancelToken.source() // 申明CancelToken,也可new CancelToken.source()实例一个
|
||||||
|
config.cancelToken = source.token // 将实例对象的token赋予该请求
|
||||||
|
const id = getUUID() // 添加唯一识别id 在请求完成时清除requestsArr
|
||||||
|
config.id = id
|
||||||
|
requestsArr.push({
|
||||||
|
id,
|
||||||
|
cancel: source.cancel
|
||||||
|
}) // 将该实例添加到队列中
|
||||||
|
const token = localStorage.getItem('nz-token')
|
||||||
|
if (token) {
|
||||||
|
config.headers.Authorization = token // 请求头token
|
||||||
|
}
|
||||||
|
const lang = localStorage.getItem('nz-language')
|
||||||
|
if (lang) {
|
||||||
|
config.headers.Language = lang // 请求头token
|
||||||
|
}
|
||||||
|
return config
|
||||||
|
}, err => {
|
||||||
|
Promise.reject(err)
|
||||||
}
|
}
|
||||||
return config
|
|
||||||
},
|
|
||||||
err => Promise.reject(err)
|
|
||||||
)
|
)
|
||||||
const accountErrorCode = [518003, 518004, 518005, 518006, 518007, 518008] // 账号锁定等
|
const accountErrorCode = [518003, 518004, 518005, 518006, 518007, 518008] // 账号锁定等
|
||||||
const licenceErrorCode = [711001]
|
const licenceErrorCode = [711001]
|
||||||
@@ -66,9 +84,13 @@ axios.interceptors.response.use(
|
|||||||
} else {
|
} else {
|
||||||
return response
|
return response
|
||||||
}
|
}
|
||||||
|
// 请求完成在数组中移除
|
||||||
|
removePending(response.config)
|
||||||
return response
|
return response
|
||||||
},
|
},
|
||||||
error => {
|
error => {
|
||||||
|
// 请求完成在数组中移除
|
||||||
|
removePending(error.config)
|
||||||
return Promise.reject(error)
|
return Promise.reject(error)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user