mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-15 01:23:48 +00:00
trace tool toggled from component
This commit is contained in:
parent
ae3a312538
commit
185bc55450
@ -37,10 +37,11 @@ interface DashboardState {
|
|||||||
activedGridItem: string;
|
activedGridItem: string;
|
||||||
durationTime: Duration;
|
durationTime: Duration;
|
||||||
selectorStore: any;
|
selectorStore: any;
|
||||||
showTopology: boolean;
|
|
||||||
fullView: boolean;
|
fullView: boolean;
|
||||||
currentTabItems: LayoutConfig[];
|
currentTabItems: LayoutConfig[];
|
||||||
currentTabName: string;
|
currentTabName: string; // TODO: remove before commit
|
||||||
|
showTraceTools: boolean;
|
||||||
|
showTopologyTools: boolean;
|
||||||
dashboards: DashboardItem[];
|
dashboards: DashboardItem[];
|
||||||
currentDashboard: Nullable<DashboardItem>;
|
currentDashboard: Nullable<DashboardItem>;
|
||||||
editMode: boolean;
|
editMode: boolean;
|
||||||
@ -57,7 +58,8 @@ export const dashboardStore = defineStore({
|
|||||||
activedGridItem: "",
|
activedGridItem: "",
|
||||||
durationTime: useAppStoreWithOut().durationTime,
|
durationTime: useAppStoreWithOut().durationTime,
|
||||||
selectorStore: useSelectorStore(),
|
selectorStore: useSelectorStore(),
|
||||||
showTopology: false,
|
showTopologyTools: false,
|
||||||
|
showTraceTools: false,
|
||||||
fullView: false,
|
fullView: false,
|
||||||
currentTabItems: [],
|
currentTabItems: [],
|
||||||
currentTabName: '',
|
currentTabName: '',
|
||||||
@ -265,8 +267,11 @@ export const dashboardStore = defineStore({
|
|||||||
setEntity(type: string) {
|
setEntity(type: string) {
|
||||||
this.entity = type;
|
this.entity = type;
|
||||||
},
|
},
|
||||||
setTopology(show: boolean) {
|
setTraceTools(show: boolean) {
|
||||||
this.showTopology = show;
|
this.showTraceTools = show;
|
||||||
|
},
|
||||||
|
setTopologyTools(show: boolean) {
|
||||||
|
this.showTopologyTools = show;
|
||||||
},
|
},
|
||||||
setConfigs(param: { [key: string]: unknown }) {
|
setConfigs(param: { [key: string]: unknown }) {
|
||||||
const actived = this.activedGridItem.split("-");
|
const actived = this.activedGridItem.split("-");
|
||||||
|
@ -38,11 +38,13 @@ limitations under the License. -->
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import type { PropType } from "vue";
|
import type { PropType, onMounted } from "vue";
|
||||||
import { useI18n } from "vue-i18n";
|
import { useI18n } from "vue-i18n";
|
||||||
import { useDashboardStore } from "@/store/modules/dashboard";
|
import { useDashboardStore } from "@/store/modules/dashboard";
|
||||||
import Topology from "../related/topology/Index.vue";
|
import Topology from "../related/topology/Index.vue";
|
||||||
|
onMounted(() => {
|
||||||
|
console.log("TOPOLOGY COMPONENT!!!");
|
||||||
|
});
|
||||||
/*global defineProps */
|
/*global defineProps */
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
data: {
|
data: {
|
||||||
|
@ -39,12 +39,13 @@ limitations under the License. -->
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import type { PropType, ref, computed } from "vue";
|
import type { PropType, computed, onMounted, onBeforeUnmount } from "vue";
|
||||||
import TraceList from "../related/trace/TraceList.vue";
|
import TraceList from "../related/trace/TraceList.vue";
|
||||||
import TraceDetail from "../related/trace/Detail.vue";
|
import TraceDetail from "../related/trace/Detail.vue";
|
||||||
import { useI18n } from "vue-i18n";
|
import { useI18n } from "vue-i18n";
|
||||||
import { useDashboardStore } from "@/store/modules/dashboard";
|
import { useDashboardStore } from "@/store/modules/dashboard";
|
||||||
import { useTraceStore } from "@/store/modules/trace";
|
import { useTraceStore } from "@/store/modules/trace";
|
||||||
|
|
||||||
/*global defineProps */
|
/*global defineProps */
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
data: {
|
data: {
|
||||||
@ -65,6 +66,13 @@ function removeWidget() {
|
|||||||
function showTraceDetails() {
|
function showTraceDetails() {
|
||||||
traceListActive.value = false;
|
traceListActive.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
dashboardStore.setTraceTools(true)
|
||||||
|
});
|
||||||
|
onBeforeUnmount(() => {
|
||||||
|
dashboardStore.setTraceTools(false)
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.trace-wrapper {
|
.trace-wrapper {
|
||||||
|
@ -186,7 +186,7 @@ limitations under the License. -->
|
|||||||
import Filter from "../related/trace/Filter.vue";
|
import Filter from "../related/trace/Filter.vue";
|
||||||
import Header from "../related/log/Header.vue";
|
import Header from "../related/log/Header.vue";
|
||||||
|
|
||||||
import { reactive, ref, computed, watch } from "vue";
|
import { reactive, ref, computed, watch, onMounted } from "vue";
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
import { useDashboardStore } from "@/store/modules/dashboard";
|
import { useDashboardStore } from "@/store/modules/dashboard";
|
||||||
import { useAppStoreWithOut } from "@/store/modules/app";
|
import { useAppStoreWithOut } from "@/store/modules/app";
|
||||||
@ -213,12 +213,18 @@ const appStore = useAppStoreWithOut();
|
|||||||
const traceStore = useTraceStore();
|
const traceStore = useTraceStore();
|
||||||
const params = useRoute().params;
|
const params = useRoute().params;
|
||||||
const selectedSelector = ref<string>("");
|
const selectedSelector = ref<string>("");
|
||||||
const showFilter = computed(() => dashboardStore.currentTabName === "Trace");
|
const showFilter = computed(() =>dashboardStore.showTraceTools);
|
||||||
const showLogHeader = computed(() => dashboardStore.currentTabName === "Log");
|
const showLogHeader = computed(() => dashboardStore.currentTabName === "Log");
|
||||||
const currentTraceView = computed(() => traceStore.currentView);
|
const currentTraceView = computed(() => traceStore.currentView);
|
||||||
const { query } = useRoute();
|
const { query } = useRoute();
|
||||||
dashboardStore.setViewMode(query["fullview"] === "true");
|
dashboardStore.setViewMode(query["fullview"] === "true");
|
||||||
|
onMounted(() => {
|
||||||
|
setTimeout(() => {
|
||||||
|
console.log(
|
||||||
|
showFilter.value
|
||||||
|
);
|
||||||
|
}, 1000)
|
||||||
|
})
|
||||||
const toolIcons = ref<{ name: string; content: string; id: string }[]>(
|
const toolIcons = ref<{ name: string; content: string; id: string }[]>(
|
||||||
EndpointRelationTools
|
EndpointRelationTools
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user