This commit is contained in:
ann 2022-06-21 11:23:09 +08:00
parent 48219d62a2
commit b402befb67
5 changed files with 19 additions and 45 deletions

View File

@ -53,6 +53,9 @@
<el-dropdown-item v-if="menus.includes('permissionManagement')" @click.native="toAdmin">
权限管理
</el-dropdown-item>
<el-dropdown-item v-if="menus.includes('monitorManagement')" @click.native="toMonitorManagement">
告警中心
</el-dropdown-item>
<el-dropdown-item divided @click.native="logout">
<span style="display:block;">退出登录</span>
</el-dropdown-item>
@ -113,6 +116,10 @@ export default {
this.$store.dispatch('user/setRouteType', 'permissionManagement')
this.$router.push({ path: '/permissionManagement' })
},
toMonitorManagement() {
this.$store.dispatch('user/setRouteType', 'monitorManagement')
this.$router.push({ path: '/monitorManagement/warnList/podWarn' })
},
toggleSideBar() {
this.$store.dispatch('app/toggleSideBar')
},

View File

@ -3,7 +3,7 @@
<el-row>
<el-card class="basicInfo">
<img src="@/assets/images/node.png" class="sidebar-logo" alt="项目">
<h4>项目</h4>
<h4>告警列表</h4>
<span class="tips title-tips">
将根据项目资源进行分组, 可以按项目对资源进行查看管理</span>
</el-card>
@ -12,7 +12,7 @@
<el-row>
<el-card>
<el-tabs v-model="activeName" type="card" @tab-click="switchTab">
<el-tab-pane key="podWarn" label="用户项目">
<el-tab-pane key="podWarn" label="容器告警">
<List
ref="multipleTable1"
class="multipleTable"
@ -28,7 +28,7 @@
</template>
</List>
</el-tab-pane>
<el-tab-pane key="virtualWarn" label="系统项目">
<el-tab-pane key="virtualWarn" label="虚拟机告警">
<List
ref="multipleTable2"
class="multipleTable"
@ -73,16 +73,11 @@ export default {
},
columns: [
[
{ prop: 'name', label: '名称', formatter: (row) => { return <a onClick={() => this.viewUserProjectDetail(row)}>{row.metadata.name}</a> } },
{ prop: 'status', width: '150', label: '状态', formatter: (row, column) => { return row.status.phase === 'Active' ? '活跃' : '准备中' } },
// { prop: 'space', label: '', formatter: (row, column) => { return row.metadata.labels['kubesphere.io/workspace'] || '-' } },
{ prop: 'namespace_cpu_usage', label: 'CPU使用量', formatter: (row, column) => {
return formatCpuWithUnit(row.namespace_cpu_usage * 1000, 'm')
} },
{ prop: 'namespace_memory_usage_wo_cache', label: '内存使用量', formatter: (row, column) => {
{ prop: 'status', width: '150', label: '告警类型', formatter: (row, column) => { return row.status.phase === 'Active' ? '活跃' : '准备中' } },
{ prop: 'name', label: '内容', formatter: (row) => { return <a onClick={() => this.viewUserProjectDetail(row)}>{row.metadata.name}</a> } },
{ prop: 'namespace_memory_usage_wo_cache', label: '发生时间', formatter: (row, column) => {
return numberToStr(row.namespace_memory_usage_wo_cache, 'B')
} },
{ prop: 'namespace_pod_count', width: '150', label: 'Pods数量' },
{ prop: 'more', width: '80', label: '操作', formatter: (row) => {
return <div>
<el-dropdown>

View File

@ -3,7 +3,7 @@
<el-row>
<el-card class="basicInfo">
<img src="@/assets/images/node.png" class="sidebar-logo" alt="项目">
<h4>项目</h4>
<h4>告警设置</h4>
<span class="tips title-tips">
将根据项目资源进行分组, 可以按项目对资源进行查看管理</span>
</el-card>

View File

@ -211,7 +211,7 @@ export default {
this.dialogVisible = true
})
},
handleDialogConfirm(formName) {
handleDialogConfirm() {
this.$refs.menuFrom.validate((valid) => {
if (valid) {
this.$confirm('是否提交数据', '提示', {
@ -226,17 +226,18 @@ export default {
type: 'success',
duration: 1000
})
this.dialogVisible = false
this.getList()
})
} else {
createMenu(this.menu).then(response => {
this.$refs[formName].resetFields()
this.resetForm(formName)
this.$refs.menuFrom.resetFields()
this.$message({
message: '提交成功',
type: 'success',
duration: 1000
})
this.dialogVisible = false
this.getList()
})
}

View File

@ -37,11 +37,6 @@ module.exports = {
errors: true
},
proxy: {
'/jcc-admin': {
target: 'https://10.101.15.6/apis', /* 测试环境 */
changeOrigin: true,
secure: false
},
// '^/login': {
// ws: false,
// target: 'https://10.101.15.6/prod-api/'/* 测试环境 */
@ -60,31 +55,7 @@ module.exports = {
changeOrigin: true,
secure: false
},
'^/jcc-ks': {
ws: false,
target: 'https://10.101.15.6/apis', /* 测试环境 */
changeOrigin: true,
secure: false
},
'^/jcc-vm': {
ws: false,
target: 'https://10.101.15.6/apis', /* 测试环境 */
changeOrigin: true,
secure: false
},
'^/jcc-extend/': {
ws: false,
target: 'https://10.101.15.6/apis', /* 测试环境 */
changeOrigin: true,
secure: false
},
'^/jcc-faas-manager': {
ws: false,
target: 'https://10.101.15.6/apis', /* 测试环境 */
changeOrigin: true,
secure: false
},
'^/jcc-mall': {
'^/jcc-': {
ws: false,
target: 'https://10.101.15.6/apis', /* 测试环境 */
changeOrigin: true,