style: 去除无用属性名,调整metrics,logs页面主题颜色

This commit is contained in:
@changcode
2021-11-30 16:08:02 +08:00
parent 1f0fc53526
commit 8bdfd769ec
23 changed files with 49 additions and 78 deletions

View File

@@ -317,10 +317,10 @@ td .nz-icon-gear:before{
border-color: $--color-warning;
}
}
.switch-open {
.el-switch.is-checked .el-switch__core {
background-color: $--color-primary;
}
.switch-shut {
.el-switch .el-switch__core {
background-color: $--switch-background-color;
}
//.editor-core {

View File

@@ -34,11 +34,15 @@
line-height: 38px;
flex-direction: row-reverse;
justify-content: flex-end;
background-color: $--background-color-empty;
i {
margin: 0 8px;
}
}
.el-collapse-item__wrap {
background-color: $--background-color-empty;
border-bottom: 1px solid $--border-color-light;
}
.el-collapse-item__content {
padding: 0 30px 20px;
}

View File

@@ -18,10 +18,13 @@
.log-table .nz-table2 {
padding: 10px 0 0 0;
position: relative;
background-color: $--background-color-empty;
.el-table__body {
border-collapse: separate;
border-spacing: 0 6px;
tr {
background-color: $--background-color-empty;
}
td {
vertical-align: top;
padding: 1px 0;
@@ -29,7 +32,19 @@
}
td.el-table__expanded-cell {
padding: 0 0 0 60px;
background-color: $--background-color-base;
background-color: $--popover-background-color !important;
}
pre {
border: none;
background: none;
}
td.el-table__expanded-cell:hover {
padding: 0 0 0 60px;
background-color: $--background-color-base !important;
}
pre:hover {
background: none;
border: none;
}
// 左侧边框
td:first-child {

View File

@@ -48,7 +48,9 @@
width: 105px;
margin-left: 1px;
}
.el-cascader-menu {
width: 200px;
}
.metric-btn:hover, .metric-btn:focus {
background-image: linear-gradient(180deg, rgb(247, 248, 250) 0%, rgb(247, 248, 250) 100%);
color: $--color-text-regular;
@@ -59,7 +61,6 @@
position: absolute;
z-index: 2100;
background-color: $--background-color-empty;
width: 450px;
.el-cascader-menu__wrap {
height: 100%;
.el-scrollbar__view.el-cascader-menu__list {
@@ -82,12 +83,10 @@
letter-spacing: 0;
line-height: 22px;
}
/deep/ .el-cascader-node {
.el-cascader-node {
padding: 0;
}
/deep/ .el-cascader-menu:last-child .el-cascader-node, /deep/ .el-cascader-node__label {
.el-cascader-menu:last-child .el-cascader-node, /deep/ .el-cascader-node__label {
padding: 0;
}
.metric-selector-title{

View File

@@ -719,10 +719,10 @@ export default {
.show-tab-icon .nz-icon.is-active-icon{
color: #BDE3FD;
}
/deep/ .chart-no-data{
.chart-no-data{
width: calc(100% - 30px);
}
/deep/ .log-detail .log-table .nz-table2 {
.log-detail .log-table .nz-table2 {
padding: 0;
}
.logs-box{

View File

@@ -42,7 +42,7 @@
<transition name="el-zoom-in-top">
<div v-if="dropdownShow" class="endpoint-query-dropdown el-popover" style="right: 11px;top: 33px;">
<span style="padding-top: 2px">{{$t('project.endpoint.hideSameLabels')}}</span>
<el-switch v-model="hideSameLabels" active-icon-class="switch-open" inactive-icon-class="switch-shut" size="small"></el-switch>
<el-switch v-model="hideSameLabels" size="small"></el-switch>
</div>
</transition>
</button>

View File

@@ -53,7 +53,7 @@
<transition name="el-zoom-in-top">
<div v-if="dropdownShow" class="endpoint-query-dropdown el-popover">
<span style="padding-top: 2px">{{$t('project.endpoint.hideSameLabels')}}</span>
<el-switch v-model="hideSameLabels" active-icon-class="switch-open" inactive-icon-class="switch-shut" size="small"></el-switch>
<el-switch v-model="hideSameLabels" size="small"></el-switch>
</div>
</transition>
</button>

View File

@@ -36,8 +36,6 @@
v-model="selection.pen.data.valueMappingShow"
:active-value="true"
:inactive-value="false"
active-icon-class="switch-open"
inactive-icon-class="switch-shut"
/>
</el-form-item>
</el-row>

View File

@@ -31,8 +31,6 @@
v-model="option.grid"
:active-value="true"
:inactive-value="false"
active-icon-class="switch-open"
inactive-icon-class="switch-shut"
@change="changeOption('grid')">
</el-switch>
</div>
@@ -42,8 +40,6 @@
v-model="option.rule"
:active-value="true"
:inactive-value="false"
active-icon-class="switch-open"
inactive-icon-class="switch-shut"
@change="changeOption('rule')">
</el-switch>
</div>

View File

@@ -17,8 +17,6 @@
<el-form-item :label='$t("config.assetType.vm")' prop="vm">
<el-switch
v-model="editAssetType.vm"
active-icon-class="switch-open"
inactive-icon-class="switch-shut"
:active-value="1"
:inactive-value="0">
</el-switch>
@@ -27,8 +25,6 @@
<el-form-item :label='$t("config.assetType.vmh")' prop="vmh">
<el-switch
v-model="editAssetType.vmh"
active-icon-class="switch-open"
inactive-icon-class="switch-shut"
:active-value="1"
:inactive-value="0">
</el-switch>
@@ -43,8 +39,6 @@
<el-form-item :label='$t("config.assetType.snmpEnable")' prop="snmpEnable">
<el-switch
v-model="editAssetType.snmpEnable"
active-icon-class="switch-open"
inactive-icon-class="switch-shut"
:active-value="1"
:inactive-value="0">
</el-switch>
@@ -53,8 +47,6 @@
<el-form-item :label='$t("config.assetType.snmpCollect")' prop="snmpCollect">
<el-switch
v-model="editAssetType.snmpCollect"
active-icon-class="switch-open"
inactive-icon-class="switch-shut"
:active-value="1"
:inactive-value="0">
</el-switch>
@@ -63,8 +55,6 @@
<el-form-item :label='$t("config.assetType.sshCollect")' prop="sshCollect">
<el-switch
v-model="editAssetType.sshCollect"
active-icon-class="switch-open"
inactive-icon-class="switch-shut"
:active-value="1"
:inactive-value="0">
</el-switch>

View File

@@ -87,7 +87,7 @@
</el-form-item>
<!--enable-->
<el-form-item :label="$t('config.user.state')">
<el-switch id="account-input-status" v-model="editUser.status" :disabled="isCurrentUser(editUser.username) || (editUser.username==='admin' && editUser.id==1) " active-icon-class="switch-open" inactive-icon-class="switch-shut" active-value="1"
<el-switch id="account-input-status" v-model="editUser.status" :disabled="isCurrentUser(editUser.username) || (editUser.username==='admin' && editUser.id==1) " active-value="1"
inactive-value="0">
</el-switch>
</el-form-item>

View File

@@ -248,7 +248,7 @@
</el-popover>
</div>
<div>
<el-switch v-model="editAsset.clientEnable" :active-value="1" :inactive-value="0" active-icon-class="switch-open" inactive-icon-class="switch-shut" size="small"></el-switch>
<el-switch v-model="editAsset.clientEnable" :active-value="1" :inactive-value="0" size="small"></el-switch>
</div>
</div>
<transition name="el-zoom-in-top">

View File

@@ -28,8 +28,6 @@
<el-switch
@change="switchSearch"
v-model="editAssetMeta.search"
active-icon-class="switch-open"
inactive-icon-class="switch-shut"
active-value="1"
inactive-value="0">
</el-switch>
@@ -37,8 +35,6 @@
<el-form-item :label='$t("config.assetLabel.display")' prop="display">
<el-switch
v-model="editAssetMeta.display"
active-icon-class="switch-open"
inactive-icon-class="switch-shut"
active-value="1"
inactive-value="0">
</el-switch>
@@ -104,9 +100,7 @@
<span class="datetime-header">{{$t('config.assetLabel.interval')}}: </span>
<el-switch
v-model="editAssetMeta.param.interval"
@change="$forceUpdate()"
active-icon-class="switch-open"
inactive-icon-class="switch-shut">
@change="$forceUpdate()">
</el-switch>
</el-row>
</div>

View File

@@ -24,19 +24,19 @@
</el-form-item>
<!--ping-->
<el-form-item label="Ping">
<el-switch :active-value="1" :inactive-value="0" active-icon-class="switch-open" inactive-icon-class="switch-shut" id="asset-state-ping-status"
<el-switch :active-value="1" :inactive-value="0" id="asset-state-ping-status"
v-model="editAssetState.ping">
</el-switch>
</el-form-item>
<!--monitor-->
<el-form-item :label="$t('config.assetState.monitor')">
<el-switch :active-value="1" :inactive-value="0" active-icon-class="switch-open" inactive-icon-class="switch-shut" id="asset-state-monitor-status"
<el-switch :active-value="1" :inactive-value="0" id="asset-state-monitor-status"
v-model="editAssetState.monitor">
</el-switch>
</el-form-item>
<!--alert-->
<el-form-item :label="$t('config.assetState.alert')">
<el-switch :active-value="1" :inactive-value="0" active-icon-class="switch-open" inactive-icon-class="switch-shut" id="asset-state-alert-status"
<el-switch :active-value="1" :inactive-value="0" id="asset-state-alert-status"
v-model="editAssetState.alert">
</el-switch>
</el-form-item>

View File

@@ -44,10 +44,7 @@
id="dc-box-input-name"
v-model="editDc.state"
active-value="ON"
inactive-value="OFF"
active-icon-class="switch-open"
inactive-icon-class="switch-shut"
>
inactive-value="OFF">
</el-switch>
</el-form-item>
</el-form>

View File

@@ -105,7 +105,7 @@
<i class="nz-icon nz-icon-arrow-down" :class="metricsShow?'':'is-active'" @click="metricsShow = !metricsShow"></i>
{{$t('project.endpoint.metrics')}}
</span>
<el-switch v-model="editEndpoint.configs[0].enable" active-icon-class="switch-open" inactive-icon-class="switch-shut" size="small" :active-value="1" :inactive-value="0"></el-switch>
<el-switch v-model="editEndpoint.configs[0].enable" size="small" :active-value="1" :inactive-value="0"></el-switch>
</div>
<transition name="el-zoom-in-top">
<el-tabs v-model="activeName" v-show="metricsShow" v-if="editEndpoint.configs[0].enable">
@@ -346,7 +346,7 @@
<i class="nz-icon nz-icon-arrow-down" :class="logsShow?'':'is-active'" @click="logsShow = !logsShow"></i>
{{$t('project.endpoint.logs')}}
</span>
<el-switch v-model="editEndpoint.configs[1].enable" active-icon-class="switch-open" inactive-icon-class="switch-shut" size="small" :active-value="1" :inactive-value="0"></el-switch>
<el-switch v-model="editEndpoint.configs[1].enable" size="small" :active-value="1" :inactive-value="0"></el-switch>
</div>
<transition name="el-zoom-in-top">
<div v-show="logsShow" v-if="editEndpoint.configs[1].enable">

View File

@@ -86,7 +86,7 @@
<i class="nz-icon nz-icon-arrow-down" :class="metricsShow?'':'is-active'" @click="metricsShow = !metricsShow"></i>
{{$t('project.endpoint.metrics')}}
</span>
<el-switch v-model="editModule.configs[0].enable" active-icon-class="switch-open" inactive-icon-class="switch-shut" size="small" :active-value="1" :inactive-value="0"></el-switch>
<el-switch v-model="editModule.configs[0].enable" size="small" :active-value="1" :inactive-value="0"></el-switch>
</div>
<transition name="el-zoom-in-top">
<el-tabs v-model="activeName" v-show="metricsShow" v-if="editModule.configs[0].enable">
@@ -326,7 +326,7 @@
<i class="nz-icon nz-icon-arrow-down" :class="logsShow?'':'is-active'" @click="logsShow = !logsShow"></i>
{{$t('project.endpoint.logs')}}
</span>
<el-switch v-model="editModule.configs[1].enable" active-icon-class="switch-open" inactive-icon-class="switch-shut" size="small" :active-value="1" :inactive-value="0"></el-switch>
<el-switch v-model="editModule.configs[1].enable" size="small" :active-value="1" :inactive-value="0"></el-switch>
</div>
<transition name="el-zoom-in-top">
<div v-show="logsShow" v-if="editModule.configs[1].enable">

View File

@@ -75,8 +75,6 @@
style="margin-left: 14px"
slot="reference"
v-model="scope.row.schedEnable"
active-icon-class="switch-open"
inactive-icon-class="switch-shut"
:active-value="1"
:inactive-value="0"
@change="(val)=>{$emit('statusChange', scope.row)}"

View File

@@ -61,8 +61,6 @@
:active-value="1"
:disabled="!hasButton('assetState_toEdit')"
:inactive-value="0"
active-icon-class="switch-open"
inactive-icon-class="switch-shut"
@change="(val)=>{statusChange(scope.row)}">
</el-switch>
<el-switch
@@ -71,8 +69,6 @@
:active-value="1"
:disabled="!hasButton('assetState_toEdit')"
:inactive-value="0"
active-icon-class="switch-open"
inactive-icon-class="switch-shut"
@change="(val)=>{statusChange(scope.row)}">
</el-switch>
<el-switch
@@ -81,8 +77,6 @@
:active-value="1"
:disabled="!hasButton('assetState_toEdit')"
:inactive-value="0"
active-icon-class="switch-open"
inactive-icon-class="switch-shut"
@change="(val)=>{statusChange(scope.row)}">
</el-switch>
<span v-else>{{scope.row[item.prop]}}</span>

View File

@@ -68,17 +68,17 @@
<el-input v-model.number="basic.default_cabinet_usize" id="system-baisc-default_cabinet_usize"></el-input>
</el-form-item>
<el-form-item :label="$t('config.system.basic.unsaved')" prop="unsaved_change">
<el-switch v-model="basic.unsaved_change" active-icon-class="switch-open" inactive-icon-class="switch-shut" active-value='on' inactive-value='off' id="system-baisc-unsaved_change">
<el-switch v-model="basic.unsaved_change" active-value='on' inactive-value='off' id="system-baisc-unsaved_change">
</el-switch>
</el-form-item>
<div class="system-title">{{$t('config.system.basic.pinPolicy')}}&nbsp;<span class="el-form-item__tip">({{$t('config.system.basic.pinPolicyValue')}})</span></div>
<el-form-item :label="$t('config.system.basic.gloEnable')" prop="mfa_auth_enable">
<el-switch v-model="basic.mfa_auth_enable" active-icon-class="switch-open" inactive-icon-class="switch-shut" :active-value='"1"' :inactive-value='"0"' id="system-basic-mfs_change">
<el-switch v-model="basic.mfa_auth_enable" :active-value='"1"' :inactive-value='"0"' id="system-basic-mfs_change">
</el-switch>
<!-- <div class="el-form-item__tip">{{$t('config.system.basic.TwoFactorAuthentication')}}</div>-->
</el-form-item>
<el-form-item :label="$t('config.system.basic.enable')" prop="enable">
<el-switch v-model="basic.pin_policy.enable" active-icon-class="switch-open" inactive-icon-class="switch-shut" active-value='1' inactive-value='0' id="system-basic-enable">
<el-switch v-model="basic.pin_policy.enable" active-value='1' inactive-value='0' id="system-basic-enable">
</el-switch>
</el-form-item>
<el-form-item :label="$t('config.system.basic.length')" prop="length">

View File

@@ -53,11 +53,11 @@
</el-select>
</el-popover>
</template>
<template v-if="item.prop == 'state'"><el-switch v-model="scope.row.state" active-icon-class="switch-open" inactive-icon-class="switch-shut" active-color="#ee9d3f" :active-value="1" :inactive-value="0" /></template>
<template v-if="item.prop == 'state'"><el-switch v-model="scope.row.state" active-color="#ee9d3f" :active-value="1" :inactive-value="0" /></template>
</template>
<template v-else>
<template v-if="item.prop == 'state'">
<el-switch :disabled="true" v-model="scope.row.state" active-icon-class="switch-open" inactive-icon-class="switch-shut" :active-value="1" :inactive-value="0" />
<el-switch :disabled="true" v-model="scope.row.state" :active-value="1" :inactive-value="0" />
</template>
<template v-else-if="scope.row[item.prop]">{{scope.row[item.prop]}}</template>
<template v-else>-</template>

View File

@@ -165,8 +165,6 @@
v-model="editChart.param.time"
:active-value="true"
:inactive-value="false"
active-icon-class="switch-open"
inactive-icon-class="switch-shut"
size="small"></el-switch>
</el-form-item>
<el-form-item class="form-item--half-width" v-if="editChart.type == 'logs'" :label='$t("dashboard.panel.chartForm.descending")' prop="param.descending">
@@ -174,8 +172,6 @@
v-model="editChart.param.descending"
:active-value="true"
:inactive-value="false"
active-icon-class="switch-open"
inactive-icon-class="switch-shut"
size="small"></el-switch>
</el-form-item>
<el-form-item class="form-item--half-width" v-if="editChart.type == 'logs'" :label='$t("dashboard.panel.chartForm.wrapLines")' prop="param.wrapLines">
@@ -183,8 +179,6 @@
v-model="editChart.param.wrapLines"
:active-value="true"
:inactive-value="false"
active-icon-class="switch-open"
inactive-icon-class="switch-shut"
size="small"></el-switch>
</el-form-item>
</div>
@@ -328,8 +322,6 @@
<el-switch
:id="'chart-box-legendValue-'+item.label"
v-model="editChart.param.legendValue[item.key]"
active-icon-class="switch-open"
inactive-icon-class="switch-shut"
active-value="on"
inactive-value="off"
>

View File

@@ -7,8 +7,6 @@
<span class="operation-label">{{$t('overall.time')}}</span>
<el-switch
v-model="time"
active-icon-class="switch-open"
inactive-icon-class="switch-shut"
>
</el-switch>
</div>
@@ -16,8 +14,6 @@
<span class="operation-label">{{$t('dashboard.explore.descending')}}</span>
<el-switch
v-model="operations.descending"
active-icon-class="switch-open"
inactive-icon-class="switch-shut"
>
</el-switch>
</div>
@@ -25,8 +21,6 @@
<span class="operation-label">{{$t('dashboard.explore.wrapLines')}}</span>
<el-switch
v-model="wrapLines"
active-icon-class="switch-open"
inactive-icon-class="switch-shut"
>
</el-switch>
</div>