mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-14 17:05:10 +00:00
can toggle trace details when a list item is selected
This commit is contained in:
parent
c910a960ce
commit
bff5175674
@ -29,17 +29,18 @@ limitations under the License. -->
|
||||
<span>{{ t("delete") }}</span>
|
||||
</div>
|
||||
</el-popover>
|
||||
<div class="header">
|
||||
<!-- filter was here -->
|
||||
</div>
|
||||
<!-- <div class="header">
|
||||
</div> -->
|
||||
<div class="trace flex-h">
|
||||
<TraceList />
|
||||
<TraceDetail />
|
||||
<TraceList @show:trace="showTraceDetails" v-if="traceListActive" />
|
||||
|
||||
<TraceDetail v-if="!traceListActive" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import type { PropType } from "vue";
|
||||
import type { PropType, ref } from "vue";
|
||||
// import Filter from "../related/trace/Filter.vue";
|
||||
import TraceList from "../related/trace/TraceList.vue";
|
||||
import TraceDetail from "../related/trace/Detail.vue";
|
||||
@ -56,9 +57,14 @@ const props = defineProps({
|
||||
});
|
||||
const { t } = useI18n();
|
||||
const dashboardStore = useDashboardStore();
|
||||
const traceListActive = ref<boolean>(true);
|
||||
function removeWidget() {
|
||||
dashboardStore.removeControls(props.data);
|
||||
}
|
||||
function showTraceDetails(){
|
||||
console.log("SHow trace...")
|
||||
traceListActive.value = false
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.trace-wrapper {
|
||||
|
@ -71,7 +71,7 @@ limitations under the License. -->
|
||||
|
||||
<script lang="ts" setup>
|
||||
import dayjs from "dayjs";
|
||||
import { ref } from "vue";
|
||||
import { ref, defineEmits } from "vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { useTraceStore } from "@/store/modules/trace";
|
||||
import { ElMessage } from "element-plus";
|
||||
@ -88,6 +88,8 @@ const pageCount = ref<number>(5);
|
||||
const dateFormat = (date: number, pattern = "YYYY-MM-DD HH:mm:ss") =>
|
||||
dayjs(date).format(pattern);
|
||||
|
||||
const emit = defineEmits(["show:trace"]);
|
||||
|
||||
function searchTrace() {
|
||||
loading.value = true;
|
||||
queryTraces();
|
||||
@ -110,6 +112,7 @@ function changeSort(opt: Option[] | any) {
|
||||
}
|
||||
|
||||
async function selectTrace(i: Trace) {
|
||||
emit("show:trace");
|
||||
traceStore.setCurrentTrace(i);
|
||||
selectedKey.value = i.key;
|
||||
if (i.traceIds.length) {
|
||||
@ -163,11 +166,13 @@ async function queryTraces() {
|
||||
}
|
||||
|
||||
.trace-t {
|
||||
width: 420px;
|
||||
width: 100%;
|
||||
// width: 420px;
|
||||
}
|
||||
|
||||
.list {
|
||||
width: 400px;
|
||||
// width: 400px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.trace-tr {
|
||||
|
Loading…
Reference in New Issue
Block a user