mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-07-18 20:45:24 +00:00
update nav bar
This commit is contained in:
parent
4ed22ffa23
commit
f08ae5a484
@ -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="nav-bar flex-h" :class="{ dark: theme === 'dark' }">
|
<div class="nav-bar flex-h">
|
||||||
<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>
|
||||||
@ -61,22 +61,17 @@ const appStore = useAppStoreWithOut();
|
|||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const pageName = ref<string>("");
|
const pageName = ref<string>("");
|
||||||
const timeRange = ref<number>(0);
|
const timeRange = ref<number>(0);
|
||||||
const theme = ref<string>("light");
|
|
||||||
|
|
||||||
getVersion();
|
getVersion();
|
||||||
const setConfig = (value: string) => {
|
const setConfig = (value: string) => {
|
||||||
pageName.value = value || "";
|
pageName.value = value || "";
|
||||||
// theme.value = route.path.includes("/infrastructure/") ? "dark" : "light";
|
|
||||||
};
|
};
|
||||||
const time = computed(() => [
|
const time = computed(() => [appStore.duration.start, appStore.duration.end]);
|
||||||
appStore.durationRow.start,
|
|
||||||
appStore.durationRow.end,
|
|
||||||
]);
|
|
||||||
const handleReload = () => {
|
const handleReload = () => {
|
||||||
const gap =
|
const gap =
|
||||||
appStore.duration.end.getTime() - appStore.duration.start.getTime();
|
appStore.duration.end.getTime() - appStore.duration.start.getTime();
|
||||||
const time: Date[] = [new Date(new Date().getTime() - gap), new Date()];
|
const dates: Date[] = [new Date(new Date().getTime() - gap), new Date()];
|
||||||
appStore.setDuration(timeFormat(time));
|
appStore.setDuration(timeFormat(dates));
|
||||||
};
|
};
|
||||||
function changeTimeRange(val: Date[] | any) {
|
function changeTimeRange(val: Date[] | any) {
|
||||||
timeRange.value =
|
timeRange.value =
|
||||||
|
Loading…
Reference in New Issue
Block a user