portal view

This commit is contained in:
Brandon Fergerson 2022-04-30 10:51:41 +02:00
parent 887a4de628
commit 6b0c20e2f5
7 changed files with 83 additions and 158 deletions

View File

@ -12,42 +12,42 @@ distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. --> limitations under the License. -->
<!--<template>--> <template>
<!-- <div class="nav-bar flex-h" :class="{ dark: theme === 'dark' }">--> <div class="nav-bar flex-h" :class="{ dark: theme === 'dark' }" v-if="$route.query['portal'] !== 'true'">
<!-- <div class="title">{{ appStore.pageTitle || t(pageName) }}</div>--> <div class="title">{{ appStore.pageTitle || t(pageName) }}</div>
<!-- <div class="app-config">--> <div class="app-config">
<!-- <span class="red" v-show="timeRange">{{ t("timeTips") }}</span>--> <span class="red" v-show="timeRange">{{ t("timeTips") }}</span>
<!-- <TimePicker--> <TimePicker
<!-- :value="time"--> :value="time"
<!-- position="bottom"--> position="bottom"
<!-- format="YYYY-MM-DD HH:mm"--> format="YYYY-MM-DD HH:mm"
<!-- @input="changeTimeRange"--> @input="changeTimeRange"
<!-- />--> />
<!-- <span>--> <span>
<!-- UTC{{ appStore.utcHour >= 0 ? "+" : ""--> UTC{{ appStore.utcHour >= 0 ? "+" : ""
<!-- }}{{ `${appStore.utcHour}:${appStore.utcMin}` }}--> }}{{ `${appStore.utcHour}:${appStore.utcMin}` }}
<!-- </span>--> </span>
<!-- <span title="refresh" class="ghost ml-5 cp" @click="handleReload">--> <span title="refresh" class="ghost ml-5 cp" @click="handleReload">
<!-- <Icon iconName="retry" :loading="appStore.autoRefresh" class="middle" />--> <Icon iconName="retry" :loading="appStore.autoRefresh" class="middle" />
<!-- </span>--> </span>
<!-- <span class="version ml-5 cp">--> <span class="version ml-5 cp">
<!-- <el-popover--> <el-popover
<!-- trigger="hover"--> trigger="hover"
<!-- width="250"--> width="250"
<!-- placement="bottom"--> placement="bottom"
<!-- effect="light"--> effect="light"
<!-- :content="appStore.version"--> :content="appStore.version"
<!-- >--> >
<!-- <template #reference>--> <template #reference>
<!-- <span>--> <span>
<!-- <Icon iconName="info_outline" size="middle" />--> <Icon iconName="info_outline" size="middle" />
<!-- </span>--> </span>
<!-- </template>--> </template>
<!-- </el-popover>--> </el-popover>
<!-- </span>--> </span>
<!-- </div>--> </div>
<!-- </div>--> </div>
<!--</template>--> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { ref, watch, computed } from "vue"; import { ref, watch, computed } from "vue";
import { useRoute } from "vue-router"; import { useRoute } from "vue-router";

View File

@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. --> limitations under the License. -->
<template> <template>
<div class="side-bar" v-if="isFullview === false" :style="portalStyle"> <div class="side-bar" v-if="isPortalView === false" :style="portalStyle">
<div :class="isCollapse ? 'logo-icon-collapse' : 'logo-icon'"> <div :class="isCollapse ? 'logo-icon-collapse' : 'logo-icon'">
<Icon <Icon
:size="isCollapse ? 'xl' : 'logo'" :size="isCollapse ? 'xl' : 'logo'"
@ -123,8 +123,8 @@ if (query["portal"] === "true") {
}); });
} }
const isFullview = computed(() => { const isPortalView = computed(() => {
return path.includes("fullview"); return query["portal"] === "true";
}); });
const { t } = useI18n(); const { t } = useI18n();
const name = ref<any>(String(useRouter().currentRoute.value.name)); const name = ref<any>(String(useRouter().currentRoute.value.name));

View File

@ -66,19 +66,6 @@ export const routesDashboard: Array<RouteRecordRaw> = [
notShow: true, notShow: true,
}, },
}, },
{
path: "/fullview/:layerId/:entity/:name",
component: () =>
import(
/* webpackChunkName: "dashboards" */ "@/views/dashboard/Edit.vue"
),
name: "FullViewCreate",
meta: {
title: "dashboardEdit",
exact: false,
notShow: true,
},
},
{ {
path: "/dashboard/:layerId/:entity/:serviceId/:name", path: "/dashboard/:layerId/:entity/:serviceId/:name",
component: () => component: () =>
@ -92,19 +79,6 @@ export const routesDashboard: Array<RouteRecordRaw> = [
notShow: true, notShow: true,
}, },
}, },
{
path: "/fullview/:layerId/:entity/:serviceId/:name",
component: () =>
import(
/* webpackChunkName: "dashboards" */ "@/views/dashboard/Edit.vue"
),
name: "FullViewView",
meta: {
title: "dashboardEdit",
exact: false,
notShow: true,
},
},
{ {
path: "/dashboard/related/:layerId/:entity/:serviceId/:destServiceId/:name", path: "/dashboard/related/:layerId/:entity/:serviceId/:destServiceId/:name",
component: () => component: () =>
@ -118,19 +92,6 @@ export const routesDashboard: Array<RouteRecordRaw> = [
notShow: true, notShow: true,
}, },
}, },
{
path: "/fullview/related/:layerId/:entity/:serviceId/:destServiceId/:name",
component: () =>
import(
/* webpackChunkName: "FullViewdashboards" */ "@/views/dashboard/Edit.vue"
),
name: "FullViewViewServiceRelation",
meta: {
title: "dashboardEdit",
exact: false,
notShow: true,
},
},
{ {
path: "/dashboard/:layerId/:entity/:serviceId/:podId/:name", path: "/dashboard/:layerId/:entity/:serviceId/:podId/:name",
component: () => component: () =>
@ -144,19 +105,6 @@ export const routesDashboard: Array<RouteRecordRaw> = [
notShow: true, notShow: true,
}, },
}, },
{
path: "/fullview/:layerId/:entity/:serviceId/:podId/:name",
component: () =>
import(
/* webpackChunkName: "FullViewdashboards" */ "@/views/dashboard/Edit.vue"
),
name: "FullViewViewPod",
meta: {
title: "dashboardEdit",
exact: false,
notShow: true,
},
},
{ {
path: "/dashboard/:layerId/:entity/:serviceId/:podId/:destServiceId/:destPodId/:name", path: "/dashboard/:layerId/:entity/:serviceId/:podId/:destServiceId/:destPodId/:name",
component: () => component: () =>
@ -170,19 +118,6 @@ export const routesDashboard: Array<RouteRecordRaw> = [
notShow: true, notShow: true,
}, },
}, },
{
path: "/fullview/:layerId/:entity/:serviceId/:podId/:destServiceId/:destPodId/:name",
component: () =>
import(
/* webpackChunkName: "FullViewdashboards" */ "@/views/dashboard/Edit.vue"
),
name: "FullViewViewPodRelation",
meta: {
title: "dashboardEdit",
exact: true,
notShow: true,
},
},
], ],
}, },
]; ];

View File

@ -49,16 +49,6 @@ export const routesSelf: Array<RouteRecordRaw> = [
component: () => component: () =>
import(/* webpackChunkName: "layer" */ "@/views/Layer.vue"), import(/* webpackChunkName: "layer" */ "@/views/Layer.vue"),
}, },
{
path: "/self/fullScroll",
name: "FullScroll",
meta: {
title: "fullscreen-sample",
headPath: "/mesh/controlPanel",
},
component: () =>
import(/* webpackChunkName: "layer" */ "@/views/FullScroll.vue"),
},
], ],
}, },
]; ];

View File

@ -20,6 +20,6 @@ import "element-plus/es/components/notification/style/css";
import "./grid.scss"; import "./grid.scss";
import "./lib.scss"; import "./lib.scss";
import "./reset.scss"; import "./reset.scss";
//@import "./spp-light.scss"; //import "./spp-light.scss";
//@import "./spp-dark.scss"; //import "./spp-dark.scss";
@import "./jetbrains-dark.scss"; import "./jetbrains-dark.scss";

View File

@ -55,9 +55,9 @@ export default defineComponent({
name: "Layout", name: "Layout",
components: { ...controls, FullVue }, components: { ...controls, FullVue },
setup() { setup() {
const { path } = useRoute(); const { query } = useRoute();
const isFullview = computed(() => { const isFullview = computed(() => {
return path.includes("fullview"); return query["fullview"] === "true";
}); });
const { t } = useI18n(); const { t } = useI18n();
const dashboardStore = useDashboardStore(); const dashboardStore = useDashboardStore();

View File

@ -78,45 +78,45 @@ limitations under the License. -->
/> />
</div> </div>
</div> </div>
<!-- <div class="flex-h tools" v-loading="loading">--> <div class="flex-h tools" v-loading="loading" v-if="$route.query['portal'] !== 'true'">
<!-- <div class="tool-icons flex-h" v-if="dashboardStore.editMode">--> <div class="tool-icons flex-h" v-if="dashboardStore.editMode">
<!-- <el-dropdown content="Controls" placement="bottom">--> <el-dropdown content="Controls" placement="bottom">
<!-- <i>--> <i>
<!-- <Icon class="icon-btn" size="sm" iconName="control" />--> <Icon class="icon-btn" size="sm" iconName="control" />
<!-- </i>--> </i>
<!-- <template #dropdown>--> <template #dropdown>
<!-- <el-dropdown-menu>--> <el-dropdown-menu>
<!-- <el-dropdown-item--> <el-dropdown-item
<!-- @click="clickIcons(t)"--> @click="clickIcons(t)"
<!-- v-for="(t, index) in toolIcons"--> v-for="(t, index) in toolIcons"
<!-- :key="index"--> :key="index"
<!-- :title="t.content"--> :title="t.content"
<!-- >--> >
<!-- <Icon class="mr-5" size="middle" :iconName="t.name" />--> <Icon class="mr-5" size="middle" :iconName="t.name" />
<!-- <span>{{ t.content }}</span>--> <span>{{ t.content }}</span>
<!-- </el-dropdown-item>--> </el-dropdown-item>
<!-- </el-dropdown-menu>--> </el-dropdown-menu>
<!-- </template>--> </template>
<!-- </el-dropdown>--> </el-dropdown>
<!-- <el-tooltip content="Apply" placement="bottom" effect="light">--> <el-tooltip content="Apply" placement="bottom" effect="light">
<!-- <i @click="applyDashboard">--> <i @click="applyDashboard">
<!-- <Icon class="icon-btn" size="sm" iconName="save" />--> <Icon class="icon-btn" size="sm" iconName="save" />
<!-- </i>--> </i>
<!-- </el-tooltip>--> </el-tooltip>
<!-- </div>--> </div>
<!-- <div class="switch">--> <div class="switch">
<!-- <el-switch--> <el-switch
<!-- v-model="dashboardStore.editMode"--> v-model="dashboardStore.editMode"
<!-- active-text="Edit"--> active-text="Edit"
<!-- inactive-text="View"--> inactive-text="View"
<!-- size="small"--> size="small"
<!-- inline-prompt--> inline-prompt
<!-- active-color="#409eff"--> active-color="#409eff"
<!-- inactive-color="#999"--> inactive-color="#999"
<!-- @change="changeMode"--> @change="changeMode"
<!-- />--> />
<!-- </div>--> </div>
<!-- </div>--> </div>
</div> </div>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>