fix:调整页面边距
This commit is contained in:
@@ -1,18 +1,17 @@
|
|||||||
.explores {
|
.explores {
|
||||||
display: flex;
|
display: flex;
|
||||||
padding: 0px 0 10px 0px;
|
|
||||||
background-color: $--background-color-base;
|
background-color: $--background-color-base;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
.main-list::after{
|
// .main-list::after{
|
||||||
content: '';
|
// content: '';
|
||||||
display: block;
|
// display: block;
|
||||||
position: absolute;
|
// position: absolute;
|
||||||
bottom: -10px;
|
// bottom: -10px;
|
||||||
left: 0;
|
// left: 0;
|
||||||
right: 14px;
|
// right: 14px;
|
||||||
height: 10px;
|
// height: 10px;
|
||||||
background-color: $--background-color-empty;
|
// background-color: $--background-color-empty;
|
||||||
}
|
// }
|
||||||
pre {
|
pre {
|
||||||
border: 1px solid $--border-color-base;
|
border: 1px solid $--border-color-base;
|
||||||
border-left: 4px solid #e6522c;
|
border-left: 4px solid #e6522c;
|
||||||
|
|||||||
@@ -113,7 +113,7 @@
|
|||||||
></promql-input>
|
></promql-input>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
<div ref="scrollWrap" style="position: relative;z-index: 1;height: auto; padding: 0 20px 4px;">
|
<div style="position: relative;z-index: 1;height: auto;padding: 0px 20px 10px;">
|
||||||
<el-collapse v-show="!showIntroduce" v-model="collapseValue" class="explore-collapse" @change="logsCollapseChange">
|
<el-collapse v-show="!showIntroduce" v-model="collapseValue" class="explore-collapse" @change="logsCollapseChange">
|
||||||
<!--metric-->
|
<!--metric-->
|
||||||
<template v-if="showMetrics">
|
<template v-if="showMetrics">
|
||||||
@@ -3452,7 +3452,7 @@ level=info ts=2020-10-23T20:32:18.068866235Z caller=metrics.go:81 org_id=29 trac
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<button :class="{'to-top-is-hover': tableHover}" @click="toTop(scrollbarWrap)" class="to-top" style="position:absolute;bottom: -20px;" v-show="showTopBtn" :title="$t('overall.backToTop')"><i class="nz-icon nz-icon-top"></i></button>
|
<button :class="{'to-top-is-hover': tableHover}" @click="toTop(scrollbarWrap)" class="to-top" style="position:absolute;bottom: -10px;" v-show="showTopBtn" :title="$t('overall.backToTop')"><i class="nz-icon nz-icon-top"></i></button>
|
||||||
<transition name="right-box">
|
<transition name="right-box">
|
||||||
<chartRightBox v-if="rightBox.show" ref="addChartModal" :chart="chartData" :from="$CONSTANTS.fromRoute.explore" :panel-data="panelData" :show-panel="{id: -1, name: '', type: 'explore'}" @close="handleBox(false)" @on-create-success="createSuccess"></chartRightBox>
|
<chartRightBox v-if="rightBox.show" ref="addChartModal" :chart="chartData" :from="$CONSTANTS.fromRoute.explore" :panel-data="panelData" :show-panel="{id: -1, name: '', type: 'explore'}" @close="handleBox(false)" @on-create-success="createSuccess"></chartRightBox>
|
||||||
</transition>
|
</transition>
|
||||||
|
|||||||
@@ -1,107 +1,109 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="explore list-page" style="background: #fffffe;padding: 10px 15px;">
|
<div style="height:100%;position:relative;">
|
||||||
<div style="display: flex;justify-content: space-between;align-items: center;margin-bottom: 10px;">
|
<div class="explore list-page" style="background: #fffffe;padding: 10px 15px;overflow-x: hidden;overflow-y: auto;">
|
||||||
<span>{{dataJson.type == 1 ? 'Metric expression' : 'Log expression'}}</span>
|
<div style="display: flex;justify-content: space-between;align-items: center;margin-bottom: 10px;">
|
||||||
<span>
|
<span>{{dataJson.type == 1 ? 'Metric expression' : 'Log expression'}}</span>
|
||||||
<chart-unit v-if="showMetrics" v-model="chartUnitType" ref="chartUnit" class="margin-r-10"></chart-unit>
|
<span>
|
||||||
</span>
|
<chart-unit v-if="showMetrics" v-model="chartUnitType" ref="chartUnit" class="margin-r-10"></chart-unit>
|
||||||
</div>
|
</span>
|
||||||
<div v-for="(item, index) in dataJson.data" :key = 'index' style="display: flex;margin-bottom: 10px">
|
</div>
|
||||||
<div style="flex: 1;margin-right: 10px;border: 1px solid #ddd;border-radius: 2px;padding: 0 8px;line-height: 30px;width: calc(100% - 30px);word-break: break-word;">{{item.expression}}</div>
|
<div v-for="(item, index) in dataJson.data" :key = 'index' style="display: flex;margin-bottom: 10px">
|
||||||
<button
|
<div style="flex: 1;margin-right: 10px;border: 1px solid #ddd;border-radius: 2px;padding: 0 8px;line-height: 30px;width: calc(100% - 30px);word-break: break-word;">{{item.expression}}</div>
|
||||||
class="top-tool-btn"
|
<button
|
||||||
:title="item.state?$t('overall.enabled'):$t('profile.close')"
|
class="top-tool-btn"
|
||||||
@click="stateChange(index)"
|
:title="item.state?$t('overall.enabled'):$t('profile.close')"
|
||||||
>
|
@click="stateChange(index)"
|
||||||
<i v-if="item.state" class="nz-icon nz-icon-mimakejian"></i>
|
>
|
||||||
<i v-else class="nz-icon nz-icon-mimabukejian" style="fontSize:16px"></i>
|
<i v-if="item.state" class="nz-icon nz-icon-mimakejian"></i>
|
||||||
</button>
|
<i v-else class="nz-icon nz-icon-mimabukejian" style="fontSize:16px"></i>
|
||||||
</div>
|
</button>
|
||||||
<el-collapse v-model="collapseValue" class="explore-collapse" @change="logsCollapseChange">
|
</div>
|
||||||
<!--metric-->
|
<el-collapse v-model="collapseValue" class="explore-collapse" @change="logsCollapseChange">
|
||||||
<template v-if="showMetrics">
|
<!--metric-->
|
||||||
<el-collapse-item name="1" :title="$t('explore.graph')" class="el-collapse-item__height">
|
<template v-if="showMetrics">
|
||||||
<div class="chart-room">
|
<el-collapse-item name="1" :title="$t('explore.graph')" class="el-collapse-item__height">
|
||||||
<chart ref="exploreChart" :unit="chartUnitType" :timeRange="filterTime"></chart>
|
<div class="chart-room">
|
||||||
</div>
|
<chart ref="exploreChart" :unit="chartUnitType" :timeRange="filterTime"></chart>
|
||||||
</el-collapse-item>
|
</div>
|
||||||
<el-collapse-item class="el-collapse-item__height" name="2" title="Table">
|
</el-collapse-item>
|
||||||
<div slot="title" class="explore-table-title">
|
<el-collapse-item class="el-collapse-item__height" name="2" title="Table">
|
||||||
{{$t('dashboard.dashboard.chartForm.typeVal.table.label')}}
|
<div slot="title" class="explore-table-title">
|
||||||
<i
|
{{$t('dashboard.dashboard.chartForm.typeVal.table.label')}}
|
||||||
class="nz-icon-gear nz-icon"
|
<i
|
||||||
style="position: absolute;right: 10px;top: 8px"
|
class="nz-icon-gear nz-icon"
|
||||||
@click.stop="tools.showCustomTableTitle = true"
|
style="position: absolute;right: 10px;top: 8px"
|
||||||
:title="$t('overall.selectColumns')"
|
@click.stop="tools.showCustomTableTitle = true"
|
||||||
>
|
:title="$t('overall.selectColumns')"
|
||||||
</i>
|
|
||||||
<!-- 自定义table列 -->
|
|
||||||
<transition name="el-zoom-in-top">
|
|
||||||
<element-set
|
|
||||||
@click.stop
|
|
||||||
v-if="tools.showCustomTableTitle"
|
|
||||||
:tableId="tableId"
|
|
||||||
ref="customTableTitle"
|
|
||||||
:custom-table-title="tools.customTableTitle"
|
|
||||||
:original-table-title="tableTitle"
|
|
||||||
:operation-true="true"
|
|
||||||
@close="tools.showCustomTableTitle = false"
|
|
||||||
@update="updateCustomTableTitle"
|
|
||||||
></element-set>
|
|
||||||
</transition>
|
|
||||||
</div>
|
|
||||||
<!-- 自定义table列 -->
|
|
||||||
<div class="nz-table-list explore-table">
|
|
||||||
<el-table
|
|
||||||
ref="exploreTable"
|
|
||||||
v-my-loading="tools.loading"
|
|
||||||
class="metric-table"
|
|
||||||
:data="tableData"
|
|
||||||
border
|
|
||||||
:header-cell-class-name="({ column }) => column.property === 'gear' ? 'explore-table-gear' : ''"
|
|
||||||
tooltip-effect="light">
|
|
||||||
<el-table-column
|
|
||||||
v-for="(item, index) in tools.customTableTitle"
|
|
||||||
v-if="item.show"
|
|
||||||
:key="`col-${index}`"
|
|
||||||
:label="item.label"
|
|
||||||
:prop="item.prop"
|
|
||||||
:resizable="false"
|
|
||||||
min-width="110px"
|
|
||||||
show-overflow-tooltip
|
|
||||||
>
|
>
|
||||||
<template slot-scope="scope" :column="item">
|
</i>
|
||||||
<template v-if="item.prop === 'time'">{{timeFormate(scope.row.time)}}</template>
|
<!-- 自定义table列 -->
|
||||||
<span v-else-if="scope.row[item.prop]">{{scope.row[item.prop]}}</span>
|
<transition name="el-zoom-in-top">
|
||||||
<template v-else>-</template>
|
<element-set
|
||||||
|
@click.stop
|
||||||
|
v-if="tools.showCustomTableTitle"
|
||||||
|
:tableId="tableId"
|
||||||
|
ref="customTableTitle"
|
||||||
|
:custom-table-title="tools.customTableTitle"
|
||||||
|
:original-table-title="tableTitle"
|
||||||
|
:operation-true="true"
|
||||||
|
@close="tools.showCustomTableTitle = false"
|
||||||
|
@update="updateCustomTableTitle"
|
||||||
|
></element-set>
|
||||||
|
</transition>
|
||||||
|
</div>
|
||||||
|
<!-- 自定义table列 -->
|
||||||
|
<div class="nz-table-list explore-table">
|
||||||
|
<el-table
|
||||||
|
ref="exploreTable"
|
||||||
|
v-my-loading="tools.loading"
|
||||||
|
class="metric-table"
|
||||||
|
:data="tableData"
|
||||||
|
border
|
||||||
|
:header-cell-class-name="({ column }) => column.property === 'gear' ? 'explore-table-gear' : ''"
|
||||||
|
tooltip-effect="light">
|
||||||
|
<el-table-column
|
||||||
|
v-for="(item, index) in tools.customTableTitle"
|
||||||
|
v-if="item.show"
|
||||||
|
:key="`col-${index}`"
|
||||||
|
:label="item.label"
|
||||||
|
:prop="item.prop"
|
||||||
|
:resizable="false"
|
||||||
|
min-width="110px"
|
||||||
|
show-overflow-tooltip
|
||||||
|
>
|
||||||
|
<template slot-scope="scope" :column="item">
|
||||||
|
<template v-if="item.prop === 'time'">{{timeFormate(scope.row.time)}}</template>
|
||||||
|
<span v-else-if="scope.row[item.prop]">{{scope.row[item.prop]}}</span>
|
||||||
|
<template v-else>-</template>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<template slot="empty">
|
||||||
|
<div v-if="!tools.loading" class="table-no-data">
|
||||||
|
<svg class="icon" aria-hidden="true">
|
||||||
|
<use xlink:href="#nz-icon-no-data-list"></use>
|
||||||
|
</svg>
|
||||||
|
<div class="table-no-data__title">No results found</div>
|
||||||
|
</div>
|
||||||
|
<div v-else> </div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table>
|
||||||
<template slot="empty">
|
</div>
|
||||||
<div v-if="!tools.loading" class="table-no-data">
|
<pagination ref="Pagination" :page-obj="pageObj" @pageNo='pageNo' @pageSize='pageSize'></pagination>
|
||||||
<svg class="icon" aria-hidden="true">
|
</el-collapse-item>
|
||||||
<use xlink:href="#nz-icon-no-data-list"></use>
|
</template>
|
||||||
</svg>
|
<!--log-->
|
||||||
<div class="table-no-data__title">No results found</div>
|
<template v-else>
|
||||||
</div>
|
<el-collapse-item v-if="showTab.indexOf('1') > -1" name="1" :title="$t('explore.graph')" class="el-collapse-item__height">
|
||||||
<div v-else> </div>
|
<div class="chart-room">
|
||||||
</template>
|
<chart ref="logChart" :unit="chartUnitType" v-my-loading="chartLoading" :timeRange="filterTime"></chart>
|
||||||
</el-table>
|
</div>
|
||||||
</div>
|
</el-collapse-item>
|
||||||
<pagination ref="Pagination" :page-obj="pageObj" @pageNo='pageNo' @pageSize='pageSize'></pagination>
|
<el-collapse-item v-if="showTab.indexOf('2') > -1" name="2" title="Logs">
|
||||||
</el-collapse-item>
|
<log-tab ref="logDetail" :timeRange="filterTime" :log-data="logData" :explore-log-table="logTabNoData" :explore-item="true" :tab-index="0" v-my-loading="chartLoading"></log-tab>
|
||||||
</template>
|
</el-collapse-item>
|
||||||
<!--log-->
|
</template>
|
||||||
<template v-else>
|
</el-collapse>
|
||||||
<el-collapse-item v-if="showTab.indexOf('1') > -1" name="1" :title="$t('explore.graph')" class="el-collapse-item__height">
|
</div>
|
||||||
<div class="chart-room">
|
|
||||||
<chart ref="logChart" :unit="chartUnitType" v-my-loading="chartLoading" :timeRange="filterTime"></chart>
|
|
||||||
</div>
|
|
||||||
</el-collapse-item>
|
|
||||||
<el-collapse-item v-if="showTab.indexOf('2') > -1" name="2" title="Logs">
|
|
||||||
<log-tab ref="logDetail" :timeRange="filterTime" :log-data="logData" :explore-log-table="logTabNoData" :explore-item="true" :tab-index="0" v-my-loading="chartLoading"></log-tab>
|
|
||||||
</el-collapse-item>
|
|
||||||
</template>
|
|
||||||
</el-collapse>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -119,7 +121,8 @@ export default {
|
|||||||
triggerButtonClass: { // 触发下拉事件的按钮的class
|
triggerButtonClass: { // 触发下拉事件的按钮的class
|
||||||
type: String,
|
type: String,
|
||||||
default: 'top-tool-btn'
|
default: 'top-tool-btn'
|
||||||
}
|
},
|
||||||
|
tabIndex: Number
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
chart,
|
chart,
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
<span> {{dateFormat(dataJson.start * 1000)}} - {{dateFormat(dataJson.end * 1000)}} ({{dataJson.timezone}})</span>
|
<span> {{dateFormat(dataJson.start * 1000)}} - {{dateFormat(dataJson.end * 1000)}} ({{dataJson.timezone}})</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="!dataJson.type" id="dashboardScrollbar" class="box-content" ref="dashboardScrollbar" style='overflow:hidden; overflow-y: auto;height: calc(100% - 60px);display: flex;flex-direction: column'>
|
<div v-if="!dataJson.type" id="dashboardScrollbar" class="box-content" ref="dashboardScrollbar" style='overflow:hidden; overflow-y: auto;height: calc(100% - 72px);display: flex;flex-direction: column'>
|
||||||
<chartList
|
<chartList
|
||||||
ref="chartList"
|
ref="chartList"
|
||||||
name="dashboard"
|
name="dashboard"
|
||||||
@@ -38,7 +38,7 @@
|
|||||||
:loading="chartListLoading"
|
:loading="chartListLoading"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="dataJson.type" id="explore" class="explores" style='overflow:hidden;background: #fffffe; overflow-y: auto;height: calc(100% - 60px);display: flex;flex-direction: column'>
|
<div v-if="dataJson.type" id="explore" class="explores" style='overflow:hidden;background: #fffffe; height: calc(100% - 72px);display: flex;flex-direction: column'>
|
||||||
<exploreItem
|
<exploreItem
|
||||||
ref="exploreItem"
|
ref="exploreItem"
|
||||||
:key="dataJson.type"
|
:key="dataJson.type"
|
||||||
@@ -137,6 +137,5 @@ export default {
|
|||||||
text-align: left;
|
text-align: left;
|
||||||
color: #2c3e50;
|
color: #2c3e50;
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
padding-bottom: 20px;
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user