Merge remote-tracking branch 'origin/dev-ele-update' into dev

# Conflicts:
#	package.json
This commit is contained in:
chenjinsong
2024-03-07 15:58:35 +08:00
84 changed files with 1303 additions and 514 deletions

View File

@@ -51,7 +51,7 @@
<button style="position: relative;" :class="{'footer__btn--disabled': blockOperation.save}" :disabled="blockOperation.save" class="footer__btn" @click="save"
v-if="hasPermission('editAppearence')"
>
<loading size="small" :loading="blockOperation.save"></loading>
<el-loading size="small" :loading="blockOperation.save"></el-loading>
<span>{{$t('overall.save')}}</span>
</button>
</div>

View File

@@ -51,7 +51,7 @@
<el-drawer
v-model="rightBox.show"
direction="rtl"
custom-class="common-right-box"
class="common-right-box"
:size="700"
:with-header="false"
destroy-on-close>

View File

@@ -55,7 +55,7 @@
<el-drawer
v-model="rightBox.show"
direction="rtl"
custom-class="common-right-box"
class="common-right-box"
:with-header="false"
:size="700"
destroy-on-close>

View File

@@ -52,7 +52,7 @@
<el-drawer
v-model="rightBox.show"
direction="rtl"
custom-class="common-right-box"
class="common-right-box"
:size="700"
:with-header="false"
destroy-on-close>

View File

@@ -1,8 +1,8 @@
<template>
<div v-if="activeTab !== 709 && activeTab !== 710" class="panel-chart__no-data">{{ $t('npm.noData') }}</div>
<div v-else class="panel-chart__no-data all-clear">
<div class="no-recent-alerts">
<i class="el-icon-circle-check"></i>
<div class="no-recent-alerts" style="align-items: center">
<el-icon><CircleCheck /></el-icon>
<span>{{$t('detection.allClear')}}</span>
</div>
<div class="no-detection">{{$t('detection.noDetection')}}</div>

View File

@@ -111,7 +111,7 @@
</el-tab-pane>
</el-tabs>
<div class="body__searcher">
<el-input v-model="searcherApp" @input="searcherAppChange" size="mini" :placeholder="$t('networkOverview.search')" prefix-icon="el-icon-search" test-id="search-input"></el-input>
<el-input v-model="searcherApp" @input="searcherAppChange" size="mini" :placeholder="$t('networkOverview.search')" prefix-icon="Search" test-id="search-input"></el-input>
</div>
<div class="body__loading"><loading :loading="loading"></loading></div>
</div>

View File

@@ -53,7 +53,7 @@
</div>
<div style="height: calc(100% - 74px); position: relative">
<chart-no-data v-if="isNoData && !showError"></chart-no-data>
<div class="chart-drawing" v-show="showMarkLine && !isNoData && !showError" ref="overviewLineChart"></div>
<div class="chart-drawing" v-show="showMarkLine && !isNoData && !showError" ref="overviewLineChart" id="overviewLineChart"></div>
</div>
</div>
</template>
@@ -353,7 +353,8 @@ export default {
if (this.myChart) {
this.myChart.dispose()
}
this.myChart = echarts.init(this.$refs.overviewLineChart)
// this.myChart = echarts.init(this.$refs.overviewLineChart)
this.myChart = echarts.init(document.getElementById('overviewLineChart'))
this.myChart.setOption(this.chartOption)
this.myChart.dispatchAction({

View File

@@ -61,14 +61,14 @@
<div :ref="`tabSearchRef${tab.prop}`">
<div class="tab-search-button" :id="`tabSearchButton${tab.prop}`" v-show="showSearchButton"
@click="handlePopoverShow(item.prop,tab.prop)">
<i class="el-icon-search" style="color:#575757;" ></i>
<el-icon style="color:#575757;"><Search /></el-icon>
<!--<i class="el-icon-search" style="color:#575757;" ></i>-->
</div>
<div class="tab-search-input" v-show="showSearchInput">
<el-input :id="`tabSearchValue${tab.prop}`"
name="tabSearchValue"
size="mini"
readonly
prefix-icon="cn-icon cn-icon-search"
@click="showListPopover(item.prop)"
>
<template v-if="curTabProp === 'qtype'">
@@ -1854,20 +1854,18 @@ export default {
this.activeCustomize = tab.paneName
},
tableCellStyle ({ row, column, rowIndex, columnIndex }) {
let style = 'border-right:0px;font-size:12px;padding:7px 0 !important;border-bottom: 1px solid #ECECEC;height:39px !important;'
if (rowIndex === this.tableData.length - 1) {
// style = style + 'border-bottom:0px !important;'
}
// element-plus 2.5以上版本表头样式支持对象而不是字符串
let style = { 'border-right': '0px', 'font-size': '12px', padding: '7px 0 7px 1px !important', 'border-bottom': '1px solid var(--el-table-border-color)', height: '39.54px !important' }
if (columnIndex === 0) {
style = style + 'color:#046ECA;text-align:left;'
style = { ...style, color: '#046ECA', 'text-align': 'left' }
}
return style
},
tableHeaderCellStyle ({ row, column, rowIndex, columnIndex }) {
if (columnIndex === 0) {
return 'text-align:left;border-right:0px;font-size:12px;font-weight:500;padding:5px 0 !important;border-bottom: 1px solid #E2E5EC;'
return { 'text-align': 'left', 'border-right': '0px', 'font-size': '12px', 'font-weight': 500, padding: '5px 0 !important', 'border-bottom': '1px solid var(--el-table-border-color)' }
} else {
return 'border-right:0px;font-size:12px;font-weight:500;padding:4px 0 !important;border-bottom: 1px solid #E2E5EC;'
return { 'border-right': 0, 'font-size': '12px', 'font-weight': 500, padding: '4px 0 !important', 'border-bottom': '1px solid var(--el-table-border-color)' }
}
},
getQueryCondition () {

View File

@@ -27,7 +27,7 @@
<template v-for="(item, index) in customTableTitles" :key="index">
<el-table-column class="data-column">
<template #header>
<span class="data-column__span">{{$t(item.label)}}</span>
<span class="data-column__span" style="margin-left: -2px;">{{$t(item.label)}}</span>
</template>
<template #default="scope" :column="item">
<div class="data-total">

View File

@@ -13,7 +13,7 @@
:popper-append-to-body="false"
@change="metricChange"
>
<el-option v-for="item in metricOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
<el-option v-for="item in metricOptions" :key="item.value" :label="$t(item.label)" :value="item.value"></el-option>
</el-select>
</div>
</div>

View File

@@ -7,7 +7,7 @@
<div class="filter__header">{{filter.title}}</div>
<div class="filter__body" style="position: relative">
<loading :loading="loadingLeft" style="top: -5px;"></loading>
<!-- <loading :loading="false" style="top: -5px;"></loading>-->
<div class="filter__body-item"
v-for="(data, i) in filter.data.slice(0, filter.showIndex)"

View File

@@ -38,7 +38,7 @@
<div class="no-data detection__event-severity-bar" >{{ $t('npm.noData') }}</div>
</template>
<template v-if="!isEventSeverityNoData">
<div class="detection__event-severity-bar detection-border" :id="`eventSeverityTrendBar${pageType}`">
<div class="detection__event-severity-bar detection-border" :id="`eventSeverityTrendBar${pageType}`" :ref="`eventSeverityTrendBar${pageType}`">
</div>
</template>
<div style="display: flex; flex-grow: 1; height: 100%;">
@@ -322,7 +322,8 @@ export default {
}
})
const chartDom = document.getElementById(`eventSeverityTrendBar${this.pageType}`)
// const chartDom = document.getElementById(`eventSeverityTrendBar${this.pageType}`)
const chartDom = this.$refs.eventSeverityTrendBarsecurityEvent
const eventSeverityTrendOption = this.$_.cloneDeep(multipleBarOption)
const key = changeI18nOfSeverity(data[0].severity)

View File

@@ -163,13 +163,14 @@ import { ref } from 'vue'
import { getDurationsTimeByType, getTimeByDurations } from '@/utils/date-util'
import Loading from '@/components/common/Loading'
import { storageKey, detectionUnitList, ZH, EN } from '@/utils/constants'
import { ElMessageBox } from 'element-plus'
export default {
name: 'DetectionForm',
data () {
const intervalValidator = (rule, value, callback) => {
const obj = this.handleIntervalByDateType(rule, value, this.triggerObj.intervalVal)
if (!obj.flag && obj.msg) {
if (obj && !obj.flag && obj.msg) {
callback(new Error(obj.msg))
} else {
callback()
@@ -177,7 +178,7 @@ export default {
}
const intervalValValidator = (rule, value, callback) => {
const obj = this.handleIntervalByDateType(rule, this.triggerObj.intervalVal, value)
if (!obj.flag && obj.msg) {
if (obj && !obj.flag && obj.msg) {
this.$refs.form3.validateField('interval')
callback()
} else {
@@ -186,7 +187,7 @@ export default {
}
const resetIntervalValidator = (rule, value, callback) => {
const obj = this.handleIntervalByDateType(rule, value, this.triggerObj.resetIntervalVal)
if (!obj.flag && obj.msg) {
if (obj && !obj.flag && obj.msg) {
callback(new Error(obj.msg))
} else {
callback()
@@ -194,7 +195,7 @@ export default {
}
const resetIntervalValValidator = (rule, value, callback) => {
const obj = this.handleIntervalByDateType(rule, this.triggerObj.resetIntervalVal, value)
if (!obj.flag && obj.msg) {
if (obj && !obj.flag && obj.msg) {
this.$refs.form3.validateField('resetInterval')
callback()
} else {
@@ -548,12 +549,12 @@ export default {
}
},
confirmMessage (queryInfo) {
this.$confirm(this.$t('tip.leavePage'), {
ElMessageBox.confirm(this.$t('tip.leavePage'), {
confirmButtonText: this.$t('tip.confirm'),
cancelButtonText: this.$t('overall.cancel'),
message: this.$t('tip.leavePageTips'),
title: this.$t('tip.leavePage'),
type: 'warning',
// type: 'warning',
iconClass: 'width:0px;height:0px;',
customClass: 'del-model'
}).then(() => {
@@ -571,7 +572,22 @@ export default {
</script>
<style lang="scss">
.el-overlay-message-box, .el-message-box {
padding: 0 !important;
}
.el-overlay-message-box {
text-align: center !important;
}
.is-message-box .el-overlay-message-box {
display: flex;
justify-content: center;
align-items: center;
}
.del-model {
&.el-message-box {
max-width: 480px !important;
}
display: flex;
flex-direction: column;
padding-bottom: 0 !important;
@@ -585,8 +601,8 @@ export default {
height: 42px;
background: #F7F7F7;
box-shadow: 0 1px 0 0 rgba(53, 54, 54, 0.08);
padding-left: 20px;
padding-top: 14px;
padding-left: 21px;
padding-top: 10px;
padding-bottom: 14px;
.el-message-box__headerbtn {
@@ -596,7 +612,7 @@ export default {
align-items: center;
font-size: 10px;
line-height: 10px;
padding-right: 5px !important;
padding-right: 10px !important;
i {
width: 10px;
@@ -619,9 +635,9 @@ export default {
letter-spacing: 0;
line-height: 22px;
font-weight: 400;
padding-top: 8px;
padding-top: 9px;
padding-right: 20px;
padding-left: 20px;
padding-left: 21px;
.el-message-box__message {
padding-left: 0 !important;
@@ -633,8 +649,11 @@ export default {
height: 52px;
border-top: 1px solid #eee;
box-shadow: inset 0 -1px 0 0 rgba(0, 0, 0, 0.07);
padding: 11px 0 12px !important;
padding: 13px 1px 12px 0 !important;
.el-button {
font-size: 12px;
}
.el-button--small {
padding: 8px 21px !important;
line-height: 12px;

View File

@@ -42,7 +42,8 @@
class="top-tool-btn top-tool-btn--search"
style="border-radius: 0 2px 2px 0 !important;"
@click="onSearch">
<i class="el-icon-search"></i>
<el-icon><Search /></el-icon>
<!-- <i class="el-icon-search"></i>-->
</button>
</div>
</div>

View File

@@ -41,11 +41,11 @@
></explorer-search>
<div style="display: flex;flex-direction: column;height: calc(100% - 42px);">
<div class="explorer-result" v-if="showList" style="position: relative;">
<div class="explorer-result" v-if="showList" style="position: relative;display: flex">
<loading :loading="loadingCount" style="width: 240px"></loading>
<span>{{ summaryCount.totalCount }}&nbsp;</span>{{$t('overall.results')}}IP
<span>{{ summaryCount.ipCount }}</span>{{$t('overall.domain')}}
<span>{{ summaryCount.domainCount }}</span>APP
<span>{{ summaryCount.totalCount }}&nbsp;</span>{{$t('overall.results')}}IP<span class="margin-r-3"></span>
<span>{{ summaryCount.ipCount }}</span>{{$t('overall.domain')}}<span class="margin-r-3"></span>
<span>{{ summaryCount.domainCount }}</span>APP<span class="margin-r-3"></span>
<span>{{ summaryCount.appCount }}</span>
<span class="entity-hide-entity" v-if="q">

View File

@@ -7,6 +7,7 @@
v-model="rightBox.show"
direction="rtl"
custom-class="entity-graph__detail"
class="entity-graph__detail"
:close-on-click-modal="true"
:modal="false"
:size="400"

View File

@@ -138,7 +138,7 @@
<div class="overview__content overview__content-loading">
<loading :loading="loadingAlert" size="small" inner-style="left: 10rem"></loading>
<div class="overview__row" v-if="performanceData.length === 0">
<span class="no-recent-alerts"><i class="el-icon-success"></i>{{$t('relationShip.noRecentAlerts')}}</span>
<span class="no-recent-alerts"><el-icon><SuccessFilled /></el-icon>{{$t('relationShip.noRecentAlerts')}}</span>
</div>
<div class="overview__row" v-if="performanceData.length > 0">
<div class="row__label row__label--width130">{{$t('entities.recentAlert')}}</div>
@@ -164,7 +164,7 @@
<div class="overview__content overview__content-loading">
<loading :loading="loadingSecurityEvents" size="small" inner-style="left: 10rem"></loading>
<div class="overview__row" v-if="securityData.length === 0">
<span class="no-recent-alerts"><i class="el-icon-success"></i>{{$t('relationShip.noRecentAlerts')}}</span>
<span class="no-recent-alerts"><el-icon><SuccessFilled /></el-icon>{{$t('relationShip.noRecentAlerts')}}</span>
</div>
<div class="overview__row" v-if="securityData.length > 0">
<div class="row__label row__label--width130">{{$t('entities.recentSecurity')}}</div>

View File

@@ -142,7 +142,7 @@
<div class="overview__content overview__content-loading">
<loading :loading="loadingAlert" size="small" inner-style="left: 10rem"></loading>
<div class="overview__row" v-if="performanceData.length === 0">
<span class="no-recent-alerts"><i class="el-icon-success"></i>{{$t('relationShip.noRecentAlerts')}}</span>
<span class="no-recent-alerts"><el-icon><SuccessFilled /></el-icon>{{$t('relationShip.noRecentAlerts')}}</span>
</div>
<div class="overview__row" v-if="performanceData.length > 0">
<div class="row__label row__label--width130">{{$t('entities.recentAlert')}}</div>
@@ -168,7 +168,7 @@
<div class="overview__content overview__content-loading">
<loading :loading="loadingSecurityEvents" size="small" inner-style="left: 10rem"></loading>
<div class="overview__row" v-if="securityData.length === 0">
<span class="no-recent-alerts"><i class="el-icon-success"></i>{{$t('relationShip.noRecentAlerts')}}</span>
<span class="no-recent-alerts"><el-icon><SuccessFilled /></el-icon>{{$t('relationShip.noRecentAlerts')}}</span>
</div>
<div class="overview__row" v-if="securityData.length > 0">
<div class="row__label row__label--width130">{{$t('entities.recentSecurity')}}</div>

View File

@@ -178,7 +178,7 @@
<div class="overview__content overview__content-loading">
<loading :loading="loadingAlert" size="small" inner-style="left: 10rem"></loading>
<div class="overview__row" v-if="performanceData.length === 0">
<span class="no-recent-alerts"><i class="el-icon-success"></i>{{$t('relationShip.noRecentAlerts')}}</span>
<span class="no-recent-alerts"><el-icon><SuccessFilled /></el-icon>{{$t('relationShip.noRecentAlerts')}}</span>
</div>
<div class="overview__row" v-if="performanceData.length > 0">
<div class="row__label row__label--width130">{{$t('entities.recentAlert')}}</div>
@@ -204,7 +204,7 @@
<div class="overview__content overview__content-loading">
<loading :loading="loadingSecurityEvents" size="small" inner-style="left: 10rem"></loading>
<div class="overview__row" v-if="securityData.length === 0">
<span class="no-recent-alerts"><i class="el-icon-success"></i>{{$t('relationShip.noRecentAlerts')}}</span>
<span class="no-recent-alerts"><el-icon><SuccessFilled /></el-icon>{{$t('relationShip.noRecentAlerts')}}</span>
</div>
<div class="overview__row" v-if="securityData.length > 0">
<div class="row__label row__label--width130">{{$t('entities.recentSecurity')}}</div>

View File

@@ -70,6 +70,7 @@
v-model="rightBox.show"
direction="rtl"
custom-class="common-right-box"
class="common-right-box"
:size="700"
:with-header="false"
destroy-on-close>

View File

@@ -170,13 +170,13 @@
<td v-else-if="(addEditFlag && editIndex === i) || (addEditFlag && d.tagName === '' && d.tagValue === '')" class="imported-data-btn">
<i class="cn-icon cn-icon-save imported-data-save" style="margin: 0 7px"
@click="saveImportedData(i)"></i>
<i class="el-icon-close" @click="removeImportedData(i)"></i>
<el-icon @click="removeImportedData(i)"><Close /></el-icon>
</td>
<!--编辑和删除按钮进入修改记录状态-->
<td v-else class="imported-data-btn">
<i class="cn-icon cn-icon-edit1 imported-data-left-btn"
@click="editImportedData(i)"></i>
<i class="el-icon-close" @click="removeImportedData(i)"></i>
<el-icon @click="removeImportedData(i)"><Close /></el-icon>
</td>
</tr>
</table>
@@ -244,6 +244,7 @@ import { api } from '@/utils/api'
import { regular } from '@/utils/regular'
import unitConvert from '@/utils/unit-convert'
import Loading from '@/components/common/Loading'
import { ElMessageBox } from 'element-plus'
export default {
name: 'CreateKnowledgeBase',
@@ -653,12 +654,12 @@ export default {
this.isShowUploadTips = true
const self = this
if (this.importedData.length > 0) {
this.$confirm(this.$t('tip.uploadFile'), {
ElMessageBox.confirm(this.$t('tip.uploadFile'), {
confirmButtonText: this.$t('tip.confirm'),
cancelButtonText: this.$t('overall.cancel'),
message: this.$t('tip.uploadFileTips'),
title: this.$t('tip.uploadFile'),
type: 'warning',
// type: 'warning',
iconClass: 'width:0px;height:0px;',
customClass: 'del-model'
}).then(() => {
@@ -670,6 +671,7 @@ export default {
} else {
this.isClick = true
this.isShowUploadTips = false
self.$refs.upload.submit()
self.$refs.upload.$refs.uploadRef.handleClick()
}
}
@@ -693,12 +695,12 @@ export default {
} else {
if (!this.isClick) {
if (this.importedData.length > 0) {
this.$confirm(this.$t('tip.uploadFile'), {
ElMessageBox.confirm(this.$t('tip.uploadFile'), {
confirmButtonText: this.$t('tip.confirm'),
cancelButtonText: this.$t('overall.cancel'),
message: this.$t('tip.uploadFileTips'),
title: this.$t('tip.uploadFile'),
type: 'warning',
// type: 'warning',
iconClass: 'width:0px;height:0px;',
customClass: 'del-model'
}).then(() => {
@@ -797,12 +799,12 @@ export default {
cancel () {
const self = this
if (this.isPreviewChange) {
this.$confirm(this.$t('tip.leavePage'), {
ElMessageBox.confirm(this.$t('tip.leavePage'), {
confirmButtonText: this.$t('tip.confirm'),
cancelButtonText: this.$t('overall.cancel'),
message: this.$t('tip.leavePageTips'),
title: this.$t('tip.leavePage'),
type: 'warning',
// type: 'warning',
iconClass: 'width:0px;height:0px;',
customClass: 'del-model'
}).then(() => {
@@ -1441,7 +1443,22 @@ export default {
</script>
<style lang="scss">
.el-overlay-message-box, .el-message-box {
padding: 0 !important;
}
.el-overlay-message-box {
text-align: center !important;
}
.is-message-box .el-overlay-message-box {
display: flex;
justify-content: center;
align-items: center;
}
.del-model {
&.el-message-box {
max-width: 480px !important;
}
display: flex;
flex-direction: column;
padding-bottom: 0 !important;
@@ -1455,8 +1472,8 @@ export default {
height: 42px;
background: #F7F7F7;
box-shadow: 0 1px 0 0 rgba(53, 54, 54, 0.08);
padding-left: 20px;
padding-top: 14px;
padding-left: 21px;
padding-top: 10px;
padding-bottom: 14px;
.el-message-box__headerbtn {
@@ -1466,7 +1483,7 @@ export default {
align-items: center;
font-size: 10px;
line-height: 10px;
padding-right: 5px !important;
padding-right: 10px !important;
i {
width: 10px;
@@ -1489,9 +1506,9 @@ export default {
letter-spacing: 0;
line-height: 22px;
font-weight: 400;
padding-top: 8px;
padding-top: 9px;
padding-right: 20px;
padding-left: 20px;
padding-left: 21px;
.el-message-box__message {
padding-left: 0 !important;
@@ -1503,8 +1520,11 @@ export default {
height: 52px;
border-top: 1px solid #eee;
box-shadow: inset 0 -1px 0 0 rgba(0, 0, 0, 0.07);
padding: 11px 0 12px !important;
padding: 13px 1px 12px 0;
.el-button {
font-size: 12px;
}
.el-button--small {
padding: 8px 21px !important;
line-height: 12px;

View File

@@ -33,8 +33,9 @@
</button>
<div class="top-tool-search margin-l-10" >
<el-input v-model="keyWord" size="small" @keyup.enter="onSearch"></el-input>
<button class="top-tool-btn top-tool-btn--search" style="border-radius: 0 2px 2px 0 !important;" @click="onSearch">
<i class="el-icon-search"></i>
<button class="top-tool-btn top-tool-btn--search" style="border-radius: 0 2px 2px 0 !important;" @click="onSearch">
<el-icon><Search /></el-icon>
<!--<i class="el-icon-search"></i>-->
</button>
</div>
</div>
@@ -67,6 +68,7 @@
:title="$t('overall.hint')"
width="480px"
custom-class="del-model-hint"
class="del-model-hint"
:before-close="handleClose">
<div class="dialog-message">{{$t('knowledge.deleteDataHint')}}</div>
<el-table v-model="delItemList"