This commit is contained in:
Brandon Fergerson
2022-04-29 13:10:59 +02:00
parent e746d4638e
commit aed98fb2b2
10 changed files with 188 additions and 181 deletions

View File

@@ -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 }}

View File

@@ -229,6 +229,7 @@ export default defineComponent({
.widget {
font-size: 12px;
height: 100%;
//max-height: 300px;
}
.header {

View File

@@ -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