mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-06-29 03:07:35 +00:00
init duration
This commit is contained in:
parent
3ecf2afa1c
commit
5394e1eca8
@ -86,7 +86,7 @@ limitations under the License. -->
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { Themes } from "@/constants/data";
|
import { Themes } from "@/constants/data";
|
||||||
import router from "@/router";
|
import router from "@/router";
|
||||||
import { useAppStoreWithOut } from "@/store/modules/app";
|
import { useAppStoreWithOut, InitializationDurationRow } from "@/store/modules/app";
|
||||||
import { useDashboardStore } from "@/store/modules/dashboard";
|
import { useDashboardStore } from "@/store/modules/dashboard";
|
||||||
import type { DashboardItem } from "@/types/dashboard";
|
import type { DashboardItem } from "@/types/dashboard";
|
||||||
import timeFormat from "@/utils/timeFormat";
|
import timeFormat from "@/utils/timeFormat";
|
||||||
@ -154,6 +154,7 @@ limitations under the License. -->
|
|||||||
day: appStore.metricsTTL.day,
|
day: appStore.metricsTTL.day,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
appStore.setDuration(InitializationDurationRow);
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleChangeTheme() {
|
function handleChangeTheme() {
|
||||||
|
@ -43,14 +43,16 @@ interface AppState {
|
|||||||
recordsTTL: Recordable<RecordsTTL>;
|
recordsTTL: Recordable<RecordsTTL>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const InitializationDurationRow = {
|
||||||
|
start: new Date(new Date().getTime() - 1800000),
|
||||||
|
end: new Date(),
|
||||||
|
step: TimeType.MINUTE_TIME,
|
||||||
|
};
|
||||||
|
|
||||||
export const appStore = defineStore({
|
export const appStore = defineStore({
|
||||||
id: "app",
|
id: "app",
|
||||||
state: (): AppState => ({
|
state: (): AppState => ({
|
||||||
durationRow: {
|
durationRow: InitializationDurationRow,
|
||||||
start: new Date(new Date().getTime() - 1800000),
|
|
||||||
end: new Date(),
|
|
||||||
step: TimeType.MINUTE_TIME,
|
|
||||||
},
|
|
||||||
utc: "",
|
utc: "",
|
||||||
utcHour: 0,
|
utcHour: 0,
|
||||||
utcMin: 0,
|
utcMin: 0,
|
||||||
|
Loading…
Reference in New Issue
Block a user