fix: css details (#391)
This commit is contained in:
parent
731d652a7d
commit
13b2693f29
|
@ -183,7 +183,7 @@ limitations under the License. -->
|
|||
.trace-line {
|
||||
position: relative;
|
||||
width: 2px;
|
||||
height: 900px;
|
||||
height: 100%;
|
||||
background-color: #e8e8e8;
|
||||
cursor: ew-resize;
|
||||
|
||||
|
|
|
@ -25,11 +25,14 @@ limitations under the License. -->
|
|||
<script lang="ts" setup>
|
||||
import { onMounted, ref, onUnmounted, watch, toRaw } from "vue";
|
||||
import { useDemandLogStore } from "@/store/modules/demand-log";
|
||||
import { useAppStoreWithOut } from "@/store/modules/app";
|
||||
import { Themes } from "@/constants/data";
|
||||
|
||||
/*global Nullable */
|
||||
const demandLogStore = useDemandLogStore();
|
||||
const monacoInstance = ref();
|
||||
const logContent = ref<Nullable<HTMLDivElement>>(null);
|
||||
const appStore = useAppStoreWithOut();
|
||||
|
||||
onMounted(() => {
|
||||
init();
|
||||
|
@ -50,6 +53,7 @@ limitations under the License. -->
|
|||
wordWrap: true,
|
||||
minimap: { enabled: false },
|
||||
readonly: true,
|
||||
theme: getTheme(),
|
||||
});
|
||||
toRaw(monacoInstance.value).updateOptions({ readOnly: true });
|
||||
editorLayout();
|
||||
|
@ -64,6 +68,9 @@ limitations under the License. -->
|
|||
width: width,
|
||||
});
|
||||
}
|
||||
function getTheme() {
|
||||
return appStore.theme === Themes.Dark ? "vs-dark" : "vs";
|
||||
}
|
||||
onUnmounted(() => {
|
||||
if (!toRaw(monacoInstance.value)) {
|
||||
return;
|
||||
|
@ -72,6 +79,12 @@ limitations under the License. -->
|
|||
monacoInstance.value = null;
|
||||
demandLogStore.setLogs("");
|
||||
});
|
||||
watch(
|
||||
() => appStore.theme,
|
||||
() => {
|
||||
toRaw(monacoInstance.value).updateOptions({ theme: getTheme() });
|
||||
},
|
||||
);
|
||||
watch(
|
||||
() => demandLogStore.logs,
|
||||
() => {
|
||||
|
|
|
@ -164,7 +164,8 @@ limitations under the License. -->
|
|||
}
|
||||
|
||||
.trace-t-wrapper {
|
||||
overflow: hidden;
|
||||
overflow-x: hidden;
|
||||
overflow-y: scroll;
|
||||
border-right: 1px solid var(--sw-trace-list-border);
|
||||
}
|
||||
|
||||
|
|
|
@ -75,6 +75,7 @@ limitations under the License. -->
|
|||
if (!traceGraph.value) {
|
||||
return;
|
||||
}
|
||||
d3.selectAll(".d3-tip").remove();
|
||||
if (props.type === "List") {
|
||||
tree.value = new ListGraph(traceGraph.value, handleSelectSpan);
|
||||
tree.value.init({ label: "TRACE_ROOT", children: segmentId.value }, props.data, fixSpansSize.value);
|
||||
|
|
Loading…
Reference in New Issue