diff --git a/nezha-fronted/src/assets/css/components/index.scss b/nezha-fronted/src/assets/css/components/index.scss index 7fe5b2d04..7b2c315d5 100644 --- a/nezha-fronted/src/assets/css/components/index.scss +++ b/nezha-fronted/src/assets/css/components/index.scss @@ -120,6 +120,7 @@ @import './page/monitor/project/project.scss'; @import './page/tool/ping.scss'; @import './page/tool/trace.scss'; +@import './page/integration/integration.scss'; @import './common/v-selectpagenew/selectpage.scss'; @import './common/selectTable.scss'; diff --git a/nezha-fronted/src/assets/css/components/page/integration/integration.scss b/nezha-fronted/src/assets/css/components/page/integration/integration.scss new file mode 100644 index 000000000..fcf3512aa --- /dev/null +++ b/nezha-fronted/src/assets/css/components/page/integration/integration.scss @@ -0,0 +1,284 @@ +.integration{ + width: 100%; + height: 100%; + background-color: $--background-color-empty; + padding: 20px; + box-sizing: border-box; + overflow-y: auto; + .integration-title{ + font-family: Roboto-Medium; + font-size: 16px; + color: $--color-text-primary; + letter-spacing: 0; + font-weight: 600; + line-height: 100%; + } + .integration-list{ + display: flex; + flex-wrap: wrap; + margin-left: -16px; + .integration-item{ + margin-top: 16px; + margin-left: 16px; + width: 260px; + height: 214px; + border: 1px solid $--border-color-light; + border-radius: 4px; + padding: 0 20px; + box-sizing: border-box; + cursor: pointer; + display: flex; + flex-direction: column; + align-items: center; + position: relative; + transition: all 0.2s; + &:hover{ + border: 1px solid $--color-primary; + background: rgba(250, 144, 28, 0.02); + } + .integration-icon{ + margin-top: 30px; + width: 50px; + height: 50px; + } + .integration-name{ + margin-top: 15px; + font-family: Roboto-Medium; + font-size: 14px; + color: $--color-text-primary; + letter-spacing: 0; + font-weight: 600; + width: 100%; + text-align: center; + line-height: 16px; + word-break: break-all; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; + } + .integration-remark{ + margin-top: 20px; + font-family: Roboto-Regular; + font-size: 12px; + color: $--color-text-secondary; + letter-spacing: 0; + line-height: 16px; + font-weight: 400; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 4; + overflow: hidden; + } + .integration-internal{ + padding: 0 8px; + border: 1px solid $--color-primary; + border-radius: 4px; + box-sizing: border-box; + height: 24px; + line-height: 24px; + text-align: center; + position: absolute; + right: 12px; + top: 12px; + color: $--color-primary; + font-size: 12px; + } + } + } +} + +.integration-dialog{ + &>.el-dialog{ + width: 95%; + max-width: 1200px; + height: 90%; + max-height: 1024px; + transform: none; + left: 0; + right: 0; + top: 0; + bottom: 0; + margin: auto !important; + } + .el-dialog__header{ + padding-top: 20px; + padding-bottom: 12px; + } + .el-dialog__body{ + height: calc(100% - 32px); + display: flex; + flex-direction: column; + box-sizing: border-box; + padding: 0; + .integration-dialog-top{ + display: flex; + align-items: center; + padding-bottom: 20px; + margin: 0 30px; + .integration-dialog-top-logo{ + line-height: 0; + img{ + width: 72px; + height: 72px; + } + } + .integration-dialog-introduce{ + width: calc(100% - 72px); + padding-left: 25px; + box-sizing: border-box; + .integration-name{ + font-family: Roboto-Medium; + font-size: 16px; + color: $--color-text-primary; + letter-spacing: 0; + font-weight: 600; + line-height: 20px; + } + .integration-remark{ + margin-top: 8px; + font-family: Roboto-Regular; + font-size: 14px; + color: $--color-text-secondary; + letter-spacing: 0; + line-height: 16px; + font-weight: 400; + } + } + } + .integration-dialog-content{ + flex: 1; + overflow: hidden; + } + } +} + +.integration-tabs{ + width: 100%; + height: 100%; + .integration-tabs-nav{ + margin:0 30px; + height: 42px; + box-sizing: border-box; + border-bottom: 1px solid $--border-color-light; + display: flex; + .integration-tabs-nav-item{ + width: 120px; + text-align: center; + cursor: pointer; + font-family: Roboto-Regular; + font-size: 14px; + color: $--color-text-regular; + font-weight: 400; + line-height: 42px; + position: relative; + } + .integration-tabs-nav-item.active{ + color: $--color-primary; + &::after{ + position: absolute; + left: 0; + right: 0; + bottom: 0; + content: ""; + display: block; + height: 2px; + background-color: $--color-primary; + } + } + } + .integration-tabs-content{ + height: calc(100% - 42px); + .integration-tool{ + height: 60px; + display: flex; + justify-content: space-between; + align-items: center; + h3{ + font-family: Roboto-Medium; + font-size: 14px; + color: $--color-text-primary; + font-weight: 600; + } + .nz-btn{ + height: 30px; + padding: 0 10px; + border-radius: 4px; + i{ + font-size: 16px; + } + span{ + font-size: 14px; + } + } + } + .integration-configuration{ + box-sizing: border-box; + padding: 30px; + padding-top: 15px; + height: 100%; + overflow-y: auto; + .integration-configuration-title{ + font-family: Roboto-Medium; + font-size: 14px; + color: $--color-text-primary; + line-height: 20px; + font-weight: 600; + margin-top: 10px; + } + .integration-configuration-msg{ + font-family: Roboto-Regular; + font-size: 14px; + color: $--color-text-regular; + line-height: 20px; + font-weight: 400; + margin-top: 6px; + &+p{ + margin-top: 0; + } + } + .integration-configuration-pre{ + width: 100%; + // max-height: 295px; + overflow-y: auto; + box-sizing: border-box; + padding: 14px; + background: $--select-page-hover-background-color; + border: 1px solid $--border-color-light; + opacity: 0.9; + border-radius: 2px; + overflow-wrap: break-word; + word-break: break-word; + white-space: pre-wrap; + margin-top: 6px; + } + } + + .integration-dashboard{ + box-sizing: border-box; + padding: 20px; + padding-top: 0; + padding-bottom: 30px; + height: 100%; + .dashboard-container{ + height: calc(100% - 60px); + .table-list{ + height: 100%; + .no-data { + text-align: center; + position: absolute; + width: 100%; + top: 50%; + margin-top: -54px; + .no-data-div { + color: $--color-text-regular; + } + } + } + } + .right-box.right-box-chart{ + top: 0; + height: 100%; + } + } + } +} \ No newline at end of file diff --git a/nezha-fronted/src/assets/stylus/main.scss b/nezha-fronted/src/assets/stylus/main.scss index 50a751175..f22b40105 100644 --- a/nezha-fronted/src/assets/stylus/main.scss +++ b/nezha-fronted/src/assets/stylus/main.scss @@ -1273,7 +1273,7 @@ li { &>span{ margin-right: 12px; } - .exists-select{ + .select-auto{ top: auto !important; left: auto !important; } diff --git a/nezha-fronted/src/components/chart/chart.vue b/nezha-fronted/src/components/chart/chart.vue index 0f4d97750..001baa6ff 100644 --- a/nezha-fronted/src/components/chart/chart.vue +++ b/nezha-fronted/src/components/chart/chart.vue @@ -16,6 +16,7 @@ :multipleTime="multipleTime" :showAllData="showAllData" @chartIsNoData="chartIsNoData" + :from="from" > \ No newline at end of file + diff --git a/nezha-fronted/src/components/chart/chartList.vue b/nezha-fronted/src/components/chart/chartList.vue index 1c071a09d..417d100c8 100644 --- a/nezha-fronted/src/components/chart/chartList.vue +++ b/nezha-fronted/src/components/chart/chartList.vue @@ -69,13 +69,13 @@ { this.chartData = [chartTempData.data.result] this.chartData.forEach(item => { @@ -669,6 +669,9 @@ export default { if (this.chartInfo.type === 'group' && !flag) { this.chartData = lodash.get(this, 'chartInfo.children', []) } + if (!this.chartInfo.param) { + this.chartInfo.param = {} + } this.chartInfo.param.collapse = flag this.groupInit() bus.$emit('groupMove', '', '', true) diff --git a/nezha-fronted/src/components/common/bottomBox/tabs/panelTabNew.vue b/nezha-fronted/src/components/common/bottomBox/tabs/panelTabNew.vue index 39e447d36..1ba8a0826 100644 --- a/nezha-fronted/src/components/common/bottomBox/tabs/panelTabNew.vue +++ b/nezha-fronted/src/components/common/bottomBox/tabs/panelTabNew.vue @@ -138,7 +138,6 @@ - @@ -279,13 +276,11 @@ export default { searchLabel: {}, // 搜索参数 // ---图表相关参数--start dataList: [], // 数据列表 - // searchName: '', // 搜索名称 filter: { // 过滤条件 // productId: 0, panelId: 0, start_time: '', - end_time: '', - searchName: '' + end_time: '' }, showPanel: { name: '', @@ -505,10 +500,9 @@ export default { this.chart.panelId = this.showPanel.id this.chart.panelName = this.showPanel.name this.chart.isGroup = true - this.rightBox.chart.show = true - }, - delChartOk () { - this.getData(this.filter) + this.$nextTick(() => { + this.$refs.addChartModal.isStable = 'stable' + }) }, // 图表创建成功,回调panel页面,进行图表的刷新 createSuccess (msg, data, params) { @@ -535,7 +529,6 @@ export default { this.dataList = response.data.list.map(item => { return { ...item, - hide: item.name.indexOf(this.filter.searchName) === -1, // 搜索条件 loaded: false } }) @@ -596,13 +589,10 @@ export default { }, // 公用操作 getTableData (linkId) { - this.variablesInit = false if (this.from === this.fromRoute.alertRule) { - this.variablesInit = true this.getData(this.filter) } else { if (this.from === this.fromRoute.chartTemp) { - this.variablesInit = true if (this.obj.type === 'group') { this.$get('/visual/panel/chart', { ids: this.obj.id }).then(res => { this.panelDataList = res.data.list @@ -706,11 +696,6 @@ export default { this.pageObj.pageSize = val this.getTableData(this.obj.id) }, - search () { - if (this.$refs.chartList) { - this.$refs.chartList.searchCharts(this.filter.searchName) - } - }, // 滚动事件触发下拉加载 onScroll () { const _self = this @@ -720,24 +705,6 @@ export default { _self.$refs.chartList.onScroll(_self.scrollbarWrap.scrollTop) }, 300)) }, - focusInput () { - let classVal = document.getElementById('queryPanel').parentElement.getAttribute('class') - classVal = classVal.replace('query-input-inactive', 'query-input-active') - document.getElementById('queryPanel').parentElement.setAttribute('class', classVal) - this.$refs.queryPanel.focus() - }, - blurInput () { - if (!this.filter.searchName || this.filter.searchName == '') { - setTimeout(function () { - let classVal = document.getElementById('queryPanel').parentElement.getAttribute('class') - classVal = classVal.replace('query-input-active', 'query-input-inactive') - document.getElementById('queryPanel').parentElement.setAttribute('class', classVal) - }, 100) - } - }, - clearInput () { - this.$refs.queryPanel.focus() - }, syncChart () { if (this.from == this.fromRoute.asset || this.from == this.fromRoute.model) { this.$confirm(this.$t('tip.syncTip'), { @@ -891,12 +858,6 @@ export default { }) }, watch: { - 'filter.searchName' (n, o) { - const temp = this - setTimeout(function () { - temp.search() - }, 1000) - }, obj: { immediate: true, handler (n, o) { diff --git a/nezha-fronted/src/components/common/js/constants.js b/nezha-fronted/src/components/common/js/constants.js index 8517ab29e..3f1dc7eb4 100644 --- a/nezha-fronted/src/components/common/js/constants.js +++ b/nezha-fronted/src/components/common/js/constants.js @@ -446,7 +446,8 @@ export const fromRoute = { expressionTemplate: 'expressionTemplate', backups: 'backups', ping: 'ping', - trace: 'trace' + trace: 'trace', + integration: 'integration' } export const chartdatasource = [ diff --git a/nezha-fronted/src/components/common/popBox/topToolMoreOptions.vue b/nezha-fronted/src/components/common/popBox/topToolMoreOptions.vue index cc02744c7..934b82adc 100644 --- a/nezha-fronted/src/components/common/popBox/topToolMoreOptions.vue +++ b/nezha-fronted/src/components/common/popBox/topToolMoreOptions.vue @@ -1,6 +1,6 @@ + - + - -
-
- - -
{{$t('overall.dragFileTip')}},{{$t('overall.or')}} {{$t('overall.clickUpload')}}
-
{{!isDashboard?$t('overall.importSupport'):$t('overall.supportJson')}}
-
-
-
-
- {{$t('overall.existed')}} - - - - -
-
    -
  • - {{$t('overall.ignoreError')}} -
  • -
  • - {{$t('overall.syncDashboard')}} -
  • -
  • - {{$t('overall.syncEndpoint')}} -
  • -
-
- + + + +
+
+ + +
{{$t('overall.dragFileTip')}},{{$t('overall.or')}} {{$t('overall.clickUpload')}}
+
{{!isDashboard?$t('overall.importSupport'):$t('overall.supportJson')}}
+
- - -
-
-
- {{$t('export.records')}} - - - {{item.name}} - ({{deleteObjs.length}}) - - -
-
- {{$t('export.fileFormat')}} - - {{item.name}} - -
-
-