mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2026-05-27 01:28:37 +00:00
simplify
This commit is contained in:
@@ -12,7 +12,7 @@ distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License. -->
|
||||
<template>
|
||||
<template>
|
||||
<Dashboard v-if="dashboardStore.currentDashboard" />
|
||||
<div v-else class="no-root">
|
||||
{{ t("noRoot") }} {{ dashboardStore.layerId }}
|
||||
|
||||
@@ -229,6 +229,7 @@ export default defineComponent({
|
||||
.widget {
|
||||
font-size: 12px;
|
||||
height: 100%;
|
||||
//max-height: 300px;
|
||||
}
|
||||
|
||||
.header {
|
||||
|
||||
@@ -78,45 +78,45 @@ limitations under the License. -->
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-h tools" v-loading="loading">
|
||||
<div class="tool-icons flex-h" v-if="dashboardStore.editMode">
|
||||
<el-dropdown content="Controls" placement="bottom">
|
||||
<i>
|
||||
<Icon class="icon-btn" size="sm" iconName="control" />
|
||||
</i>
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu>
|
||||
<el-dropdown-item
|
||||
@click="clickIcons(t)"
|
||||
v-for="(t, index) in toolIcons"
|
||||
:key="index"
|
||||
:title="t.content"
|
||||
>
|
||||
<Icon class="mr-5" size="middle" :iconName="t.name" />
|
||||
<span>{{ t.content }}</span>
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</template>
|
||||
</el-dropdown>
|
||||
<el-tooltip content="Apply" placement="bottom" effect="light">
|
||||
<i @click="applyDashboard">
|
||||
<Icon class="icon-btn" size="sm" iconName="save" />
|
||||
</i>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
<div class="switch">
|
||||
<el-switch
|
||||
v-model="dashboardStore.editMode"
|
||||
active-text="Edit"
|
||||
inactive-text="View"
|
||||
size="small"
|
||||
inline-prompt
|
||||
active-color="#409eff"
|
||||
inactive-color="#999"
|
||||
@change="changeMode"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="flex-h tools" v-loading="loading">-->
|
||||
<!-- <div class="tool-icons flex-h" v-if="dashboardStore.editMode">-->
|
||||
<!-- <el-dropdown content="Controls" placement="bottom">-->
|
||||
<!-- <i>-->
|
||||
<!-- <Icon class="icon-btn" size="sm" iconName="control" />-->
|
||||
<!-- </i>-->
|
||||
<!-- <template #dropdown>-->
|
||||
<!-- <el-dropdown-menu>-->
|
||||
<!-- <el-dropdown-item-->
|
||||
<!-- @click="clickIcons(t)"-->
|
||||
<!-- v-for="(t, index) in toolIcons"-->
|
||||
<!-- :key="index"-->
|
||||
<!-- :title="t.content"-->
|
||||
<!-- >-->
|
||||
<!-- <Icon class="mr-5" size="middle" :iconName="t.name" />-->
|
||||
<!-- <span>{{ t.content }}</span>-->
|
||||
<!-- </el-dropdown-item>-->
|
||||
<!-- </el-dropdown-menu>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-dropdown>-->
|
||||
<!-- <el-tooltip content="Apply" placement="bottom" effect="light">-->
|
||||
<!-- <i @click="applyDashboard">-->
|
||||
<!-- <Icon class="icon-btn" size="sm" iconName="save" />-->
|
||||
<!-- </i>-->
|
||||
<!-- </el-tooltip>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="switch">-->
|
||||
<!-- <el-switch-->
|
||||
<!-- v-model="dashboardStore.editMode"-->
|
||||
<!-- active-text="Edit"-->
|
||||
<!-- inactive-text="View"-->
|
||||
<!-- size="small"-->
|
||||
<!-- inline-prompt-->
|
||||
<!-- active-color="#409eff"-->
|
||||
<!-- inactive-color="#999"-->
|
||||
<!-- @change="changeMode"-->
|
||||
<!-- />-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
@@ -147,9 +147,9 @@ const params = useRoute().params;
|
||||
const path = useRoute();
|
||||
const router = useRouter();
|
||||
if (!path.path.includes("fullview")) {
|
||||
dashboardStore.setViewMode(false)
|
||||
}else{
|
||||
dashboardStore.setViewMode(true)
|
||||
dashboardStore.setViewMode(false);
|
||||
} else {
|
||||
dashboardStore.setViewMode(true);
|
||||
}
|
||||
const toolIcons = ref<{ name: string; content: string; id: string }[]>(
|
||||
EndpointRelationTools
|
||||
|
||||
Reference in New Issue
Block a user