diff --git a/nezha-fronted/src/assets/css/components/common/table/asset/assetTable.scss b/nezha-fronted/src/assets/css/components/common/table/asset/assetTable.scss index 110bbb905..a9c279c72 100644 --- a/nezha-fronted/src/assets/css/components/common/table/asset/assetTable.scss +++ b/nezha-fronted/src/assets/css/components/common/table/asset/assetTable.scss @@ -30,3 +30,19 @@ } } } + +.licenseStatus{ + padding: 20px 15px; + background: $--background-color-empty; + border-radius: 3px; + transform: translate(0,20px); + .licenseStatus-title{ + color: $--color-text-regular; + } + .licenseStatus-date{ + color: $--color-text-primary; + i{ + color: $--color-primary; + } + } +} \ No newline at end of file diff --git a/nezha-fronted/src/components/chart/chart/uplot/chartTimeSeriesMixin.js b/nezha-fronted/src/components/chart/chart/uplot/chartTimeSeriesMixin.js index 14f294891..bdc8858f7 100644 --- a/nezha-fronted/src/components/chart/chart/uplot/chartTimeSeriesMixin.js +++ b/nezha-fronted/src/components/chart/chart/uplot/chartTimeSeriesMixin.js @@ -73,6 +73,9 @@ export default { if (typeof (itemValue) === 'string') { itemValue = Number(itemValue) } + // if (typeof (itemValue) !== 'undefined' && isNaN(itemValue)) { + // itemValue = null + // } if (itemValue === null && nullValueMode !== 'null') { if (nullValueMode === 'zero') { itemValue = 0 @@ -341,7 +344,10 @@ export default { paramsDot = 6 } const val = typeof (item.value[1]) == 'undefined' ? 0 : formatScientificNotation(item.value[1], paramsDot) - const showVal = typeof (item.value[1]) == 'undefined' ? '' : chartDataFormat.getUnit(unit).compute(val, null, -1, decimals) + let showVal = typeof (item.value[1]) == 'undefined' ? '' : chartDataFormat.getUnit(unit).compute(val, null, -1, decimals) + if ((item.value[1] + '') === 'NaN') { + showVal = 'NaN' + } sum += isNaN(self.numberWithEConvent(val)) ? 0 : parseFloat(self.numberWithEConvent(val)) let previousDom = '' if (previousItem) { diff --git a/nezha-fronted/src/components/chart/chart/uplot/stack.js b/nezha-fronted/src/components/chart/chart/uplot/stack.js index fb952bb01..626ed5edc 100644 --- a/nezha-fronted/src/components/chart/chart/uplot/stack.js +++ b/nezha-fronted/src/components/chart/chart/uplot/stack.js @@ -12,6 +12,9 @@ function stack (data, omit) { if (typeof (v) === 'undefined') { return accum[i] } + if (isNaN(v)) { + return accum[i] + } return (accum[i] += +v) })) } diff --git a/nezha-fronted/src/components/common/bottomBox/bottomBox.vue b/nezha-fronted/src/components/common/bottomBox/bottomBox.vue index 3223db222..ea8156082 100644 --- a/nezha-fronted/src/components/common/bottomBox/bottomBox.vue +++ b/nezha-fronted/src/components/common/bottomBox/bottomBox.vue @@ -83,11 +83,11 @@ - - + + - + @@ -126,7 +126,7 @@ import discoveryTab from '@/components/common/bottomBox/tabs/discoveryTab' import IpDetails from '@/components/common/bottomBox/tabs/IpDetails' import recordRuleEvalLog from '@/components/common/bottomBox/tabs/recordRuleEvalLog' import notebookTab from '@/components/common/bottomBox/tabs/notebookTab' -import softwareAsset from '@/components/common/bottomBox/tabs/softwareAsset' +import softwareAssetTab from '@/components/common/bottomBox/tabs/softwareAssetTab' import licenseManagementTab from '@/components/common/bottomBox/tabs/licenseManagementTab' export default { @@ -163,7 +163,7 @@ export default { vsysBottomTab, rolesTab, notebookTab, - softwareAsset, + softwareAssetTab, licenseManagementTab }, props: { diff --git a/nezha-fronted/src/components/common/bottomBox/tabs/softwareAsset.vue b/nezha-fronted/src/components/common/bottomBox/tabs/softwareAssetTab.vue similarity index 68% rename from nezha-fronted/src/components/common/bottomBox/tabs/softwareAsset.vue rename to nezha-fronted/src/components/common/bottomBox/tabs/softwareAssetTab.vue index 33e5b32d2..8c214fec5 100644 --- a/nezha-fronted/src/components/common/bottomBox/tabs/softwareAsset.vue +++ b/nezha-fronted/src/components/common/bottomBox/tabs/softwareAssetTab.vue @@ -1,57 +1,62 @@ diff --git a/nezha-fronted/src/components/common/table/settings/softwareTypeTable.vue b/nezha-fronted/src/components/common/table/settings/softwareTypeTable.vue index 77c311ae5..299c493f9 100644 --- a/nezha-fronted/src/components/common/table/settings/softwareTypeTable.vue +++ b/nezha-fronted/src/components/common/table/settings/softwareTypeTable.vue @@ -75,17 +75,15 @@ fixed="right">
{{$t('overall.option')}}
- - +
- {{$t('overall.edit')}} - {{$t('overall.duplicate')}} - {{$t('overall.delete')}} - {{$t('overall.syncChart')}} + {{$t('overall.edit')}} + {{$t('overall.duplicate')}} + {{$t('overall.delete')}}
diff --git a/nezha-fronted/src/components/page/asset/asset.vue b/nezha-fronted/src/components/page/asset/asset.vue index 80dda68c8..b8d59862d 100644 --- a/nezha-fronted/src/components/page/asset/asset.vue +++ b/nezha-fronted/src/components/page/asset/asset.vue @@ -336,6 +336,12 @@ export default { type: 'input', label: 'comment', disabled: false + }, { + name: this.$t('licenseMange.licenseStatus'), + type: 'select', + label: 'licenseStatus', + readonly: true, + disabled: false }] }, @@ -997,6 +1003,22 @@ export default { }, jsonKey: 'val' }, + licenseStatus: { + target: this.searchLabel, + isSearchInput: true, + propertyName: 'licenseStatus', + type: 'string', + defaultJson: { + disabled: false, + label: 'licenseStatus', + name: 'licenseStatus', + readonly: true, + type: 'select', + val: '', + listStr: 'licenseStatus' + }, + jsonKey: 'valnum' + }, dcIds: { target: this.searchCheckBox, propertyName: 'dcIds', type: 'string', target2: this.selectValue, type2: 'array' }, typeIds: { target: this.searchCheckBox, propertyName: 'typeIds', type: 'string', target2: this.selectValue, type2: 'array' }, ping: { target: this.searchCheckBox, propertyName: 'ping', type: 'string', target2: this.selectValue, type2: 'array' }, diff --git a/nezha-fronted/src/components/page/asset/software/softwareAsset.vue b/nezha-fronted/src/components/page/asset/software/softwareAsset.vue index b3449e6c7..7a94433a6 100644 --- a/nezha-fronted/src/components/page/asset/software/softwareAsset.vue +++ b/nezha-fronted/src/components/page/asset/software/softwareAsset.vue @@ -97,6 +97,7 @@ export default { data () { return { url: '/asset/software', + tableId: 'softwareAssetTable', blankObject: { // 空白对象 id: '', name: '', @@ -106,7 +107,6 @@ export default { params: {}, remark: '' }, - tableId: 'softwareAssetTable', searchMsg: { // 给搜索框子组件传递的信息 searchLabelList: [{ name: 'ID', @@ -123,7 +123,44 @@ export default { } }, created () { - + const searchKeys = { + // key: path 键 + // value: vue set 参数 + pageNo: { target: this.pageObj, propertyName: 'pageNo', type: 'number' }, + pageSize: { target: this.pageObj, propertyName: 'pageSize', type: 'number' }, + orderBy: { target: this.$data, propertyName: 'orderBy', type: 'string' }, + ids: { + target: this.searchLabel, + isSearchInput: true, + propertyName: 'ids', + type: 'string', + defaultJson: { + disabled: false, + id: 'ids', + label: 'ids', + name: 'ID', + type: 'input', + val: '' + }, + jsonKey: 'val' + }, + name: { + target: this.searchLabel, + isSearchInput: true, + propertyName: 'name', + type: 'string', + defaultJson: { + disabled: false, + id: 'name', + label: 'name', + name: 'Name', + type: 'input', + val: '' + }, + jsonKey: 'val' + } + } + this.initQueryFromPath(searchKeys) }, computed: { },