diff --git a/src/Login.vue b/src/Login.vue index 98461363..fc921259 100644 --- a/src/Login.vue +++ b/src/Login.vue @@ -25,18 +25,28 @@ > - + Checking License + + Login - + {{licenseStatusErrMsg}} @@ -80,11 +90,11 @@ export default { name: 'Login', data () { return { - loading: false, + loading: true, username: '', pin: '', language: '', - licenseStatus: 0, + licenseStatus: -1,//-1 未获取后台数据状态;0 获取后台数据且验证成功;1 获取后台数据且验证失败; licenseStatusErrMsg: '', downloadC2vUrl: api.downloadLicenseC2v, supportID: '' @@ -176,7 +186,7 @@ export default { if (file.status !== 'ready') return if (!_.endsWith(file.name, '.xml')) { this.fileList = [] - this.$message.error('Only support '+ this.fileTypeLimit + ' files') + this.$message.error('Only support ' + this.fileTypeLimit + ' files') } else { this.fileList = fileList.slice(-1) this.$refs.licenseUpload.submit() @@ -200,8 +210,13 @@ export default { axios.get(api.licenseStatus).then(res => { if (res.status === 200) { this.licenseStatus = res.data.data.status + } else { + this.licenseStatus = 1 } + this.loading = false }).catch(e => { + this.licenseStatus = 1 + this.loading = false this.licenseStatusErrMsg = this.errorMsgHandler(e) }) }, @@ -335,6 +350,7 @@ export default { flex-direction: row; align-items: center; justify-content: space-between; + width: 100%; .license__btn { height: 40px; padding-left:10px; diff --git a/src/assets/css/components/index.scss b/src/assets/css/components/index.scss index 3879a517..7761e294 100644 --- a/src/assets/css/components/index.scss +++ b/src/assets/css/components/index.scss @@ -44,6 +44,7 @@ @import './views/charts/chartMap'; @import 'views/charts/chartRelationShipList'; @import 'views/report/report'; +@import 'views/tag/tag'; @import 'components/rightBox/report/reportBox'; @import './views/charts2/panel'; diff --git a/src/assets/css/components/views/charts2/entityDetailSubscriberMap.scss b/src/assets/css/components/views/charts2/entityDetailSubscriberMap.scss index 527c60a0..022ab7bb 100644 --- a/src/assets/css/components/views/charts2/entityDetailSubscriberMap.scss +++ b/src/assets/css/components/views/charts2/entityDetailSubscriberMap.scss @@ -120,6 +120,15 @@ } .entity-subscriber-map { width: 100%; + .maplibregl-ctrl-attrib-button { + opacity: 0.3; + } + .maplibregl-ctrl-attrib-button:focus, .maplibregl-ctrl-group button:focus { + box-shadow: 0 0 2px 2px #A9CAE1; + } + .maplibregl-ctrl-attrib a { + color: #ababab; + } } .panel-chart__no-data { height: calc(100% - 46px); diff --git a/src/assets/css/components/views/tag/tag.scss b/src/assets/css/components/views/tag/tag.scss new file mode 100644 index 00000000..abb2c6eb --- /dev/null +++ b/src/assets/css/components/views/tag/tag.scss @@ -0,0 +1,261 @@ +.cn-tag { + background: #fff; + margin: 10px; + height: calc(100% - 20px) !important; + display: flex; + flex-direction: row; + .cn-tag-right { + flex: 1; + .list-page .main-container { + padding: 0; + + .cn-table { + height: calc(100% - 62px) !important; + + .el-table--fit.el-table--border { + height: calc(100% - 55px) !important; + } + .el-table__header th:first-of-type { + border-right: none; + } + .has-gutter .el-table-column--selection .el-checkbox { + border-left: none; + display: none; + } + .el-scrollbar__bar.is-vertical { + z-index: 1000; + } + .el-table__row .el-table-column--selection .cell { + padding: 0; + } + .el-table__row.expanded { + td { + border-bottom: none; + } + } + .el-table__body-wrapper { + .el-table__expanded-cell { + z-index: 100; + } + } + .el-table__fixed, + .el-table__fixed-right { + .el-table__expanded-cell { + visibility: hidden; + } + } + .el-table__expanded-cell { + .down { + margin-left: 32px; + height: 100%; + width: calc(100% - 32px); + background: #fff; //盖住fixed产生的阴影 + :deep .is-leaf { + color: #1b2e3b; + background: #ebeef5; + } + .el-range-editor--small.el-input__wrapper { + height: 32px; + line-height: 32px; + } + .cn-detection__footer { + text-align: center; + display: flex; + justify-content: center; + .el-pagination__jump { + margin-left: 3px; + } + .el-pagination__goto { + display: none; + } + .el-input--small { + width: 46px !important; + .el-input__wrapper { + height: 22px; + } + } + .el-pagination--small { + .btn-prev { + margin-right: 10px; + } + .btn-next { + margin-left: 10px; + } + &span { + color: $--color-text-primary; + } + } + } + } + .block.drop-down-time { + margin: 15px 0 14px 0; + .el-date-editor { + justify-content: center; + .el-range-separator { + width: 24px; + } + .el-input__icon.el-range__close-icon { + display: none; + } + } + } + .expand { + min-height: 95px; + display: flex; + flex-wrap: wrap; + position: relative; + .panel-chart__no-data { + line-height: 95px; + } + .expand-cell { + display: flex; + background: #FFFFFF; + border: 1px solid #E7EAED; + border-radius: 2px; + margin: 0 12px 16px 0; + width: 300px; + height: 97px; + .expand-right { + background: #F9F9F9; + border-radius: 2px; + width: 97px; + height: 94px; + position: relative; + .demo-progress { + position: absolute; + top: 21px; + left: 18.5px; + } + .demo-progress,.demo-progress .el-progress-circle { + width: 57px !important; + height: 57px !important; + } + } + .expand-left { + text-align: center; + width: calc(100% - 97px); + display: flex; + flex-direction: column; + justify-content: center; + .expand-name { + font-size: 12px; + color: #666666; + font-weight: 400; + margin-bottom: 4px; + display: flex; + align-items: center; + justify-content: center; + i { + padding: 2px 3px 0 0; + } + } + .expand-time { + font-size: 12px; + color: #666666; + margin-bottom: 4px; + div:nth-of-type(1) { + font-size: 12px; + color: #999999; + } + } + .expand-icon { + display: flex; + justify-content: space-evenly; + margin: 0 8px; + font-size: 14px; + .table-operation-item--no-border { + cursor: pointer; + position: relative; + font-size: 16px; + } + .table-operation-item--disabled { + cursor: not-allowed; + filter: grayscale(1); + opacity: .6; + } + } + } + } + } + } + } + } + .table-operation-all { + width: 300px; + position: absolute; + bottom: 17px; + z-index: 2; + left: 20px; + line-height: 24px; + height: 24px; + display: flex; + .el-checkbox { + width: 14px; + height: 14px; + padding: 0; + .el-checkbox__input,.el-checkbox__inner { + width: 100%; + height: 100%; + min-width: unset; + } + } + .table-operation-all-span { + height: 24px; + display: flex; + span { + margin: 0 10px; + font-size: 14px; + color: #666666; + letter-spacing: 0; + font-weight: 400; + } + .table-operation-back-down { + font-weight: 500; + height: 24px; + background: #D7D7D7; + border-radius: 2px; + cursor: not-allowed; + span { + margin: 3px 8px; + font-size: 12px; + color: #FFFFFF; + } + } + .table-operation-back-down div { + color: #FFFFFF; + height: 24px; + background: #D7D7D7; + border-radius: 2px; + i { + font-size: 25px; + top: calc(50% - 12px); + } + } + .table-operation-back-down.table-operation-all-checkbox { + background: #0091ff; + cursor: pointer; + } + .table-operation-back-down.table-operation-all-loading { + background: #D7D7D7; + } + } + } + .table-operation-items { + .table-operation-item--no-border { + margin-right: 16px; + cursor: pointer; + position: relative; + font-size: 16px; + } + .table-operation-item--no-border:last-of-type { + margin-right: 0; + } + .table-operation-item--no-border { + display: flex; + justify-content: center; + flex-direction: column; + position: relative; + } + } + } +} diff --git a/src/assets/css/font/iconfont.css b/src/assets/css/font/iconfont.css index ea502ed9..8abb4231 100644 --- a/src/assets/css/font/iconfont.css +++ b/src/assets/css/font/iconfont.css @@ -1,8 +1,8 @@ @font-face { font-family: "cn-icon"; /* Project id 2614877 */ - src: url('iconfont.woff2?t=1709781230670') format('woff2'), - url('iconfont.woff?t=1709781230670') format('woff'), - url('iconfont.ttf?t=1709781230670') format('truetype'); + src: url('iconfont.woff2?t=1711625913930') format('woff2'), + url('iconfont.woff?t=1711625913930') format('woff'), + url('iconfont.ttf?t=1711625913930') format('truetype'); } .cn-icon { @@ -13,6 +13,10 @@ -moz-osx-font-smoothing: grayscale; } +.cn-icon-tag-fill:before { + content: "\e775"; +} + .cn-icon-follow:before { content: "\e83b"; } diff --git a/src/assets/css/font/iconfont.js b/src/assets/css/font/iconfont.js index 928386ae..28d99d04 100644 --- a/src/assets/css/font/iconfont.js +++ b/src/assets/css/font/iconfont.js @@ -1 +1 @@ -window._iconfont_svg_string_2614877='',function(l){var a=(a=document.getElementsByTagName("script"))[a.length-1],c=a.getAttribute("data-injectcss"),a=a.getAttribute("data-disable-injectsvg");if(!a){var h,o,i,m,v,z=function(a,c){c.parentNode.insertBefore(a,c)};if(c&&!l.__iconfont__svg__cssinject__){l.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(a){console&&console.log(a)}}h=function(){var a,c=document.createElement("div");c.innerHTML=l._iconfont_svg_string_2614877,(c=c.getElementsByTagName("svg")[0])&&(c.setAttribute("aria-hidden","true"),c.style.position="absolute",c.style.width=0,c.style.height=0,c.style.overflow="hidden",c=c,(a=document.body).firstChild?z(c,a.firstChild):a.appendChild(c))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(h,0):(o=function(){document.removeEventListener("DOMContentLoaded",o,!1),h()},document.addEventListener("DOMContentLoaded",o,!1)):document.attachEvent&&(i=h,m=l.document,v=!1,s(),m.onreadystatechange=function(){"complete"==m.readyState&&(m.onreadystatechange=null,t())})}function t(){v||(v=!0,i())}function s(){try{m.documentElement.doScroll("left")}catch(a){return void setTimeout(s,50)}t()}}(window); +window._iconfont_svg_string_2614877='',function(l){var a=(a=document.getElementsByTagName("script"))[a.length-1],c=a.getAttribute("data-injectcss"),a=a.getAttribute("data-disable-injectsvg");if(!a){var h,o,i,m,v,z=function(a,c){c.parentNode.insertBefore(a,c)};if(c&&!l.__iconfont__svg__cssinject__){l.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(a){console&&console.log(a)}}h=function(){var a,c=document.createElement("div");c.innerHTML=l._iconfont_svg_string_2614877,(c=c.getElementsByTagName("svg")[0])&&(c.setAttribute("aria-hidden","true"),c.style.position="absolute",c.style.width=0,c.style.height=0,c.style.overflow="hidden",c=c,(a=document.body).firstChild?z(c,a.firstChild):a.appendChild(c))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(h,0):(o=function(){document.removeEventListener("DOMContentLoaded",o,!1),h()},document.addEventListener("DOMContentLoaded",o,!1)):document.attachEvent&&(i=h,m=l.document,v=!1,s(),m.onreadystatechange=function(){"complete"==m.readyState&&(m.onreadystatechange=null,t())})}function t(){v||(v=!0,i())}function s(){try{m.documentElement.doScroll("left")}catch(a){return void setTimeout(s,50)}t()}}(window); \ No newline at end of file diff --git a/src/assets/css/font/iconfont.ttf b/src/assets/css/font/iconfont.ttf index e8ae756d..1d9adb72 100644 Binary files a/src/assets/css/font/iconfont.ttf and b/src/assets/css/font/iconfont.ttf differ diff --git a/src/assets/css/font/iconfont.woff b/src/assets/css/font/iconfont.woff index b463d706..961aad24 100644 Binary files a/src/assets/css/font/iconfont.woff and b/src/assets/css/font/iconfont.woff differ diff --git a/src/assets/css/font/iconfont.woff2 b/src/assets/css/font/iconfont.woff2 index 6f39eb91..702dd23b 100644 Binary files a/src/assets/css/font/iconfont.woff2 and b/src/assets/css/font/iconfont.woff2 differ diff --git a/src/components/layout/Header.vue b/src/components/layout/Header.vue index 205f7156..a31dc21f 100644 --- a/src/components/layout/Header.vue +++ b/src/components/layout/Header.vue @@ -336,7 +336,7 @@ export default { logo: 'images/logo-header.svg', ZH, EN, - isDark: useDark() + // isDark: useDark() } }, computed: { diff --git a/src/components/table/tag/TagTable.vue b/src/components/table/tag/TagTable.vue new file mode 100644 index 00000000..15c9d83b --- /dev/null +++ b/src/components/table/tag/TagTable.vue @@ -0,0 +1,771 @@ + + + + + + + + + + + + + + + + + {{ percentage + '%' }} + {{ percentage }} + + + + + + {{ username }} + + {{ $t('tag.creationTime') }} + {{ dateFormatByAppearance(item.ctime) }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ item.label }} + + + + + {{ handleTimeRange(scope.row) }} + + + {{ getCategoryName(scope.row.categoryId) }} + + + + {{ $t('tag.always') }} + + + + + + + + {{ $t('tag.daily') }} + + + {{ $t('tag.weekly') }} + + + {{ $t('tag.monthly') }} + + + {{ $t('tag.oneTime') }} + + + - + + + + + + {{ $t('tag.period') }} + {{ configPeriod }} + + + {{ $t('tag.custom') }} + {{ configCustom }} + + + {{ $t('tag.startTime') }} + {{ dateFormatByAppearance(scope.row.schedulerStart) || '-' }} + + + {{ $t('tag.endTime') }} + {{ dateFormatByAppearance(scope.row.schedulerEnd) || '-' }} + + + + + - + + + + {{ (scope.row.sysUser && scope.row.sysUser.name) || '-' }} + + + {{ scope.row.lastTime ? dateFormatByAppearance(scope.row.lastTime) : '-' }} + + + {{ scope.row[item.prop] || 0 }} + + {{ scope.row[item.prop] || '-' }} + + + + + {{ $t('npm.noData') }} + + + + + + diff --git a/src/main.js b/src/main.js index d1ecece2..56336bca 100644 --- a/src/main.js +++ b/src/main.js @@ -6,10 +6,10 @@ import store from '@/store' import App from '@/App.vue' import '@/utils/http.js' import commonMixin from '@/mixins/common' -import { cancelWithChange, noData, myHighLight,selectLoadMore } from '@/utils/tools' +import { cancelWithChange, noData, myHighLight, selectLoadMore } from '@/utils/tools' import { ClickOutside } from 'element-plus/lib/directives' import i18n from '@/i18n' -//import '@/mock/index.js' +// import '@/mock/index.js' import hljsVuePlugin from '@highlightjs/vue-plugin' import 'highlight.js/styles/color-brewer.css' import '@/assets/css/main.scss' // 样式入口 diff --git a/src/permission.js b/src/permission.js index d18e9e32..d3ce16f5 100644 --- a/src/permission.js +++ b/src/permission.js @@ -162,6 +162,8 @@ export function handleComponent (code) { return () => import('@/views/detections/detectionPolicies/PolicyForm') case 'report': return () => import('@/views/report/Report') + //case 'tag': + //return () => import('@/views/tag/Tag') case 'knowledgeBase': return () => import('@/views/setting/KnowledgeBase') case 'userDefinedLibrary': diff --git a/src/utils/constants.js b/src/utils/constants.js index 547be9ad..fe474acd 100644 --- a/src/utils/constants.js +++ b/src/utils/constants.js @@ -311,6 +311,36 @@ export const metricOptions = [ } ] +export const tagIntentOptions = [ + { + value: 'Malicious', + label: 'tag.intent.malicious' + }, + { + value: 'Benign', + label: 'tag.intent.benign' + }, + { + value: 'Unknown', + label: 'tag.intent.unknown' + } +] + +export const tagCategoryOptions = [ + { + value: 'Malicious', + label: 'tag.intent.malicious' + }, + { + value: 'Benign', + label: 'tag.intent.benign' + }, + { + value: 'Unknown', + label: 'tag.intent.unknown' + } +] + export const metricType = { Bits: 'Bits/s', Packets: 'Packets/s', diff --git a/src/views/administration/License.vue b/src/views/administration/License.vue index 5ab92f82..aa8ca120 100644 --- a/src/views/administration/License.vue +++ b/src/views/administration/License.vue @@ -51,6 +51,7 @@ import { storageKey } from '@/utils/constants' import axios from 'axios' import { ref } from 'vue' import { dateFormat } from '@/utils/date-util' +import _ from 'lodash' export default { name: 'License', @@ -110,7 +111,7 @@ export default { downloadFile () { axios.get(this.downloadC2vUrl, { responseType: 'blob' }).then(res => { let fileName = '' - if(res.headers['content-disposition']) { + if (res.headers['content-disposition']) { fileName = res.headers['content-disposition'].split(';')[1].split('filename=')[1] } diff --git a/src/views/charts2/charts/networkOverview/NetworkOverviewPerformanceEvent.vue b/src/views/charts2/charts/networkOverview/NetworkOverviewPerformanceEvent.vue index b2f1d14a..e7987048 100644 --- a/src/views/charts2/charts/networkOverview/NetworkOverviewPerformanceEvent.vue +++ b/src/views/charts2/charts/networkOverview/NetworkOverviewPerformanceEvent.vue @@ -167,8 +167,12 @@ export default { }) }, resize () { - this.myChart.resize() - this.myChart2.resize() + if(this.myChart) { + this.myChart.resize() + } + if(this.myChart2) { + this.myChart2.resize() + } } }, computed: { diff --git a/src/views/entityExplorer/EntityExplorer.vue b/src/views/entityExplorer/EntityExplorer.vue index a9691977..e9d882d3 100644 --- a/src/views/entityExplorer/EntityExplorer.vue +++ b/src/views/entityExplorer/EntityExplorer.vue @@ -577,7 +577,7 @@ export default { }, /** 新版查询filter数据 */ queryFilterNew (params) { - const subscriberList = ['subscriber.phone_number', 'subscriber.imei', 'subscriber.imsi', 'subscriber.apn'] + const subscriberList = ['subscriber.id', 'subscriber.phone_number', 'subscriber.imei', 'subscriber.imsi', 'subscriber.apn'] let subscriberFlag = false subscriberList.forEach(item => { if (params.q.indexOf(item) > -1) { @@ -647,7 +647,6 @@ export default { }).finally(() => { this.newFilterData[index].loading = false this.newFilterData[index].firstLoad = false - console.log('查看loading', this.newFilterData) }) } }) @@ -675,7 +674,7 @@ export default { } else { this.$message.error(response.data.message) } - }).catch((e) => { + }).catch(() => { this.listData = [] }).finally(() => { this.listLoading = false diff --git a/src/views/entityExplorer/entityList/Row.vue b/src/views/entityExplorer/entityList/Row.vue index 428d3aac..ead654ce 100644 --- a/src/views/entityExplorer/entityList/Row.vue +++ b/src/views/entityExplorer/entityList/Row.vue @@ -293,16 +293,18 @@ export default { break } } - axios.get(`${url}?resource=${this.entity.entityValue}`).then(responese => { - const res = responese.data - if (responese.status === 200) { - formatTags(res.data, this.entity.entityType, this.levelTwoTags) - if (_.isArray(res.data.userDefinedTags)) { - this.levelTwoTags = _.concat(this.levelTwoTags, res.data.userDefinedTags.map(tag => ({ value: tag.tagValue, color: tag.knowledgeBase ? tag.knowledgeBase.color : entityDefaultColor }))) + if (this.entity.entityType !== 'subscriber_id') { + axios.get(`${url}?resource=${this.entity.entityValue}`).then(responese => { + const res = responese.data + if (responese.status === 200) { + formatTags(res.data, this.entity.entityType, this.levelTwoTags) + if (_.isArray(res.data.userDefinedTags)) { + this.levelTwoTags = _.concat(this.levelTwoTags, res.data.userDefinedTags.map(tag => ({ value: tag.tagValue, color: tag.knowledgeBase ? tag.knowledgeBase.color : entityDefaultColor }))) + } + this.hideTagArea = _.isEmpty(this.levelTwoTags) } - this.hideTagArea = _.isEmpty(this.levelTwoTags) - } - }) + }) + } }, /* 切换折叠状态 */ switchCollapse () { diff --git a/src/views/entityExplorer/entityList/detailOverview/Subscriber.vue b/src/views/entityExplorer/entityList/detailOverview/Subscriber.vue index 481632ee..42574694 100644 --- a/src/views/entityExplorer/entityList/detailOverview/Subscriber.vue +++ b/src/views/entityExplorer/entityList/detailOverview/Subscriber.vue @@ -103,7 +103,6 @@ import entityDetailMixin from './entityDetailMixin' import { unitTypes } from '@/utils/constants' import { valueToRangeValue } from '@/utils/unit-convert' import _ from 'lodash' -import axios from 'axios' import relatedServer from '@/mixins/relatedServer' import { dateFormatByAppearance, getMillisecond, getSecond, getNowTime } from '@/utils/date-util' import Loading from '@/components/common/Loading' diff --git a/src/views/entityExplorer/entityList/detailOverview/SubscriberMap.vue b/src/views/entityExplorer/entityList/detailOverview/SubscriberMap.vue index 46223dff..54f48892 100644 --- a/src/views/entityExplorer/entityList/detailOverview/SubscriberMap.vue +++ b/src/views/entityExplorer/entityList/detailOverview/SubscriberMap.vue @@ -690,8 +690,8 @@ export default { myChart, maxZoom: mapConfig.maxZoom, // 地图最小缩放比例 minZoom: mapConfig.minZoom, // 地图最大缩放比例 - mapLevel: 1, // 地图精度 1、2、3 - defaultZoom: mapConfig.defaultZoom, // 地图默认缩放比例 + mapLevel: mapConfig.mapLevel, // 地图精度 1、2、3 + defaultZoom: 11, // 地图默认缩放比例 center: mapConfig.center, // 地图默认中心点。北京:[116.38, 39.9] 纽约:[-73.94539, 40.841843] trackingSubscriber, trackingSubscriberList, diff --git a/src/views/tag/Tag.vue b/src/views/tag/Tag.vue new file mode 100644 index 00000000..9b79898a --- /dev/null +++ b/src/views/tag/Tag.vue @@ -0,0 +1,394 @@ + + + + + + + + {{$t('overall.create')}} + + + + {{$t('overall.edit')}} + + + + {{$t('overall.delete')}} + + + + {{$t('tag.intent')}}: + + + + + + {{$t('tag.category')}}: + + + + + + + + + + + + + + + + + + + +