Merge branch 'apache:main' into main

This commit is contained in:
Brandon Fergerson 2022-05-10 08:09:12 +04:00 committed by GitHub
commit 81fef701c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
22 changed files with 139 additions and 491 deletions

View File

@ -19,5 +19,7 @@ limitations under the License. -->
#app { #app {
color: #2c3e50; color: #2c3e50;
height: 100%; height: 100%;
overflow: auto;
min-width: 1024px;
} }
</style> </style>

View File

@ -53,9 +53,6 @@ const available = computed(
(Array.isArray(props.option.series.data) && props.option.series.data[0]) (Array.isArray(props.option.series.data) && props.option.series.data[0])
); );
onMounted(async () => { onMounted(async () => {
if (!available.value) {
return;
}
await setOptions(props.option); await setOptions(props.option);
chartRef.value && addResizeListener(unref(chartRef), resize); chartRef.value && addResizeListener(unref(chartRef), resize);
setTimeout(() => { setTimeout(() => {

View File

@ -109,14 +109,21 @@ import { ref } from "vue";
import { useRouter, RouteRecordRaw } from "vue-router"; import { useRouter, RouteRecordRaw } from "vue-router";
import { useI18n } from "vue-i18n"; import { useI18n } from "vue-i18n";
import Icon from "@/components/Icon.vue"; import Icon from "@/components/Icon.vue";
import { useAppStoreWithOut } from "@/store/modules/app";
const appStore = useAppStoreWithOut();
const { t } = useI18n(); const { t } = useI18n();
const name = ref<any>(String(useRouter().currentRoute.value.name)); const name = ref<any>(String(useRouter().currentRoute.value.name));
const theme = ["VirtualMachine", "Kubernetes"].includes(name.value || "") const theme = ["VirtualMachine", "Kubernetes"].includes(name.value || "")
? ref("light") ? ref("light")
: ref("black"); : ref("black");
const routes = ref<any>(useRouter().options.routes); const routes = ref<any>(useRouter().options.routes);
const isCollapse = ref(false); if (/Android|webOS|iPhone|iPod|iPad|BlackBerry/i.test(navigator.userAgent)) {
appStore.setIsMobile(true);
} else {
appStore.setIsMobile(false);
}
const isCollapse = ref(appStore.isMobile ? true : false);
const controlMenu = () => { const controlMenu = () => {
isCollapse.value = !isCollapse.value; isCollapse.value = !isCollapse.value;
}; };

View File

@ -33,6 +33,7 @@ interface AppState {
autoRefresh: boolean; autoRefresh: boolean;
pageTitle: string; pageTitle: string;
version: string; version: string;
isMobile: boolean;
} }
export const appStore = defineStore({ export const appStore = defineStore({
@ -51,6 +52,7 @@ export const appStore = defineStore({
autoRefresh: false, autoRefresh: false,
pageTitle: "", pageTitle: "",
version: "", version: "",
isMobile: false,
}), }),
getters: { getters: {
duration(): Duration { duration(): Duration {
@ -121,6 +123,9 @@ export const appStore = defineStore({
this.utcHour = utcHour; this.utcHour = utcHour;
this.utc = `${utcHour}:${utcMin}`; this.utc = `${utcHour}:${utcMin}`;
}, },
setIsMobile(mode: boolean) {
this.isMobile = mode;
},
setEventStack(funcs: (() => void)[]): void { setEventStack(funcs: (() => void)[]): void {
this.eventStack = funcs; this.eventStack = funcs;
}, },

View File

@ -85,6 +85,9 @@ export const ebpfStore = defineStore({
return res.data; return res.data;
}, },
async getTaskList(serviceId: string) { async getTaskList(serviceId: string) {
if (!serviceId) {
return new Promise((resolve) => resolve({}));
}
const res: AxiosResponse = await graphql const res: AxiosResponse = await graphql
.query("getEBPFTasks") .query("getEBPFTasks")
.params({ serviceId }); .params({ serviceId });
@ -101,6 +104,9 @@ export const ebpfStore = defineStore({
return res.data; return res.data;
}, },
async getEBPFSchedules(params: { taskId: string; duration?: Duration }) { async getEBPFSchedules(params: { taskId: string; duration?: Duration }) {
if (!params.taskId) {
return new Promise((resolve) => resolve({}));
}
const duration = useAppStoreWithOut().durationTime; const duration = useAppStoreWithOut().durationTime;
const res: AxiosResponse = await graphql const res: AxiosResponse = await graphql
.query("getEBPFSchedules") .query("getEBPFSchedules")
@ -124,6 +130,12 @@ export const ebpfStore = defineStore({
scheduleIdList: string[]; scheduleIdList: string[];
timeRanges: Array<{ start: number; end: number }>; timeRanges: Array<{ start: number; end: number }>;
}) { }) {
if (!params.scheduleIdList.length) {
return new Promise((resolve) => resolve({}));
}
if (!params.timeRanges.length) {
return new Promise((resolve) => resolve({}));
}
const res: AxiosResponse = await graphql const res: AxiosResponse = await graphql
.query("getEBPFResult") .query("getEBPFResult")
.params(params); .params(params);

View File

@ -122,6 +122,9 @@ export const profileStore = defineStore({
return res.data; return res.data;
}, },
async getSegmentList(params: { taskID: string }) { async getSegmentList(params: { taskID: string }) {
if (!params.taskID) {
return new Promise((resolve) => resolve({}));
}
const res: AxiosResponse = await graphql const res: AxiosResponse = await graphql
.query("getProfileTaskSegmentList") .query("getProfileTaskSegmentList")
.params(params); .params(params);
@ -148,6 +151,9 @@ export const profileStore = defineStore({
return res.data; return res.data;
}, },
async getSegmentSpans(params: { segmentId: string }) { async getSegmentSpans(params: { segmentId: string }) {
if (!params.segmentId) {
return new Promise((resolve) => resolve({}));
}
const res: AxiosResponse = await graphql const res: AxiosResponse = await graphql
.query("queryProfileSegment") .query("queryProfileSegment")
.params(params); .params(params);
@ -180,6 +186,12 @@ export const profileStore = defineStore({
segmentId: string; segmentId: string;
timeRanges: Array<{ start: number; end: number }>; timeRanges: Array<{ start: number; end: number }>;
}) { }) {
if (!params.segmentId) {
return new Promise((resolve) => resolve({}));
}
if (!params.timeRanges.length) {
return new Promise((resolve) => resolve({}));
}
const res: AxiosResponse = await graphql const res: AxiosResponse = await graphql
.query("getProfileAnalyze") .query("getProfileAnalyze")
.params(params); .params(params);

View File

@ -15,10 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
.show-xs, .show-xs {
.show-sm,
.show-md,
.show-lg {
display: none !important; display: none !important;
} }
@media (max-width: 767px) { @media (max-width: 767px) {
@ -30,145 +27,6 @@
display: none !important; display: none !important;
} }
} }
@media (min-width: 768px) and (max-width: 1023px) {
.show-sm {
display: block !important;
}
.hide-sm {
display: none !important;
}
}
@media (min-width: 1024px) and (max-width: 1279px) {
.show-md {
display: block !important;
}
.hide-md {
display: none !important;
}
}
@media (min-width: 1280px) {
.show-lg {
display: block !important;
}
.hide-lg {
display: none !important;
}
}
.g-xs-1,
.g-xs-2,
.g-xs-3,
.g-xs-4,
.g-xs-5,
.g-xs-6,
.g-xs-7,
.g-xs-8,
.g-xs-9,
.g-xs-10,
.g-xs-11,
.g-xs-12 {
float: left;
min-height: 1px;
}
.g-xs-12 {
width: 100%;
}
.g-xs-11 {
width: 91.666%;
}
.g-xs-10 {
width: 83.333%;
}
.g-xs-9 {
width: 75%;
}
.g-xs-8 {
width: 66.666%;
}
.g-xs-7 {
width: 58.333%;
}
.g-xs-6 {
width: 50%;
}
.g-xs-5 {
width: 41.666%;
}
.g-xs-4 {
width: 33.333%;
}
.g-xs-3 {
width: 25%;
}
.g-xs-2 {
width: 16.666%;
}
.g-xs-1 {
width: 8.333%;
}
.g-xs-space-12 {
margin-left: 100%;
}
.g-xs-space-11 {
margin-left: 91.666%;
}
.g-xs-space-10 {
margin-left: 83.333%;
}
.g-xs-space-9 {
margin-left: 75%;
}
.g-xs-space-8 {
margin-left: 66.666%;
}
.g-xs-space-7 {
margin-left: 58.333%;
}
.g-xs-space-6 {
margin-left: 50%;
}
.g-xs-space-5 {
margin-left: 41.666%;
}
.g-xs-space-4 {
margin-left: 33.333%;
}
.g-xs-space-3 {
margin-left: 25%;
}
.g-xs-space-2 {
margin-left: 16.666%;
}
.g-xs-space-1 {
margin-left: 8.333%;
}
@media (min-width: 768px) { @media (min-width: 768px) {
.g-sm-1, .g-sm-1,
.g-sm-2, .g-sm-2,
@ -233,278 +91,4 @@
.g-sm-1 { .g-sm-1 {
width: 8.333%; width: 8.333%;
} }
.g-sm-space-12 {
margin-left: 100%;
}
.g-sm-space-11 {
margin-left: 91.666%;
}
.g-sm-space-10 {
margin-left: 83.333%;
}
.g-sm-space-9 {
margin-left: 75%;
}
.g-sm-space-8 {
margin-left: 66.666%;
}
.g-sm-space-7 {
margin-left: 58.333%;
}
.g-sm-space-6 {
margin-left: 50%;
}
.g-sm-space-5 {
margin-left: 41.666%;
}
.g-sm-space-4 {
margin-left: 33.333%;
}
.g-sm-space-3 {
margin-left: 25%;
}
.g-sm-space-2 {
margin-left: 16.666%;
}
.g-sm-space-1 {
margin-left: 8.333%;
}
}
@media (min-width: 1024px) {
.g-md-1,
.g-md-2,
.g-md-3,
.g-md-4,
.g-md-5,
.g-md-6,
.g-md-7,
.g-md-8,
.g-md-9,
.g-md-10,
.g-md-11,
.g-md-12 {
float: left;
min-height: 1px;
}
.g-md-12 {
width: 100%;
}
.g-md-11 {
width: 91.666%;
}
.g-md-10 {
width: 83.333%;
}
.g-md-9 {
width: 75%;
}
.g-md-8 {
width: 66.666%;
}
.g-md-7 {
width: 58.333%;
}
.g-md-6 {
width: 50%;
}
.g-md-5 {
width: 41.666%;
}
.g-md-4 {
width: 33.333%;
}
.g-md-3 {
width: 25%;
}
.g-md-2 {
width: 16.666%;
}
.g-md-1 {
width: 8.333%;
}
.g-md-space-12 {
margin-left: 100%;
}
.g-md-space-11 {
margin-left: 91.666%;
}
.g-md-space-10 {
margin-left: 83.333%;
}
.g-md-space-9 {
margin-left: 75%;
}
.g-md-space-8 {
margin-left: 66.666%;
}
.g-md-space-7 {
margin-left: 58.333%;
}
.g-md-space-6 {
margin-left: 50%;
}
.g-md-space-5 {
margin-left: 41.666%;
}
.g-md-space-4 {
margin-left: 33.333%;
}
.g-md-space-3 {
margin-left: 25%;
}
.g-md-space-2 {
margin-left: 16.666%;
}
.g-md-space-1 {
margin-left: 8.333%;
}
}
@media (min-width: 1280px) {
.g-lg-1,
.g-lg-2,
.g-lg-3,
.g-lg-4,
.g-lg-5,
.g-lg-6,
.g-lg-7,
.g-lg-8,
.g-lg-9,
.g-lg-10,
.g-lg-11,
.g-lg-12 {
float: left;
min-height: 1px;
}
.g-lg-12 {
width: 100%;
}
.g-lg-11 {
width: 91.666%;
}
.g-lg-10 {
width: 83.333%;
}
.g-lg-9 {
width: 75%;
}
.g-lg-8 {
width: 66.666%;
}
.g-lg-7 {
width: 58.333%;
}
.g-lg-6 {
width: 50%;
}
.g-lg-5 {
width: 41.666%;
}
.g-lg-4 {
width: 33.333%;
}
.g-lg-3 {
width: 25%;
}
.g-lg-2 {
width: 16.666%;
}
.g-lg-1 {
width: 8.333%;
}
.g-lg-space-12 {
margin-left: 100%;
}
.g-lg-space-11 {
margin-left: 91.666%;
}
.g-lg-space-10 {
margin-left: 83.333%;
}
.g-lg-space-9 {
margin-left: 75%;
}
.g-lg-space-8 {
margin-left: 66.666%;
}
.g-lg-space-7 {
margin-left: 58.333%;
}
.g-lg-space-6 {
margin-left: 50%;
}
.g-lg-space-5 {
margin-left: 41.666%;
}
.g-lg-space-4 {
margin-left: 33.333%;
}
.g-lg-space-3 {
margin-left: 25%;
}
.g-lg-space-2 {
margin-left: 16.666%;
}
.g-lg-space-1 {
margin-left: 8.333%;
}
} }

View File

@ -171,3 +171,21 @@
color: #ddd; color: #ddd;
} }
} }
.scroll_bar_style::-webkit-scrollbar {
width: 9px;
height: 4px;
background-color: #eee;
}
.scroll_bar_style::-webkit-scrollbar-track {
background-color: #eee;
border-radius: 3px;
box-shadow: inset 0 0 6px #ccc;
}
.scroll_bar_style::-webkit-scrollbar-thumb {
border-radius: 3px;
box-shadow: inset 0 0 6px #ccc;
background-color: #aaa;
}

View File

@ -29,6 +29,7 @@ body {
html, html,
body { body {
height: 100%; height: 100%;
overflow-y: hidden;
} }
div, div,

View File

@ -41,7 +41,6 @@ import { useDashboardStore } from "@/store/modules/dashboard";
const { t } = useI18n(); const { t } = useI18n();
const dashboardStore = useDashboardStore(); const dashboardStore = useDashboardStore();
const { selectedGrid } = dashboardStore;
const widget = dashboardStore.selectedGrid.widget || {}; const widget = dashboardStore.selectedGrid.widget || {};
const title = ref<string>(widget.title || ""); const title = ref<string>(widget.title || "");
const tips = ref<string>(widget.tips || ""); const tips = ref<string>(widget.tips || "");
@ -51,6 +50,7 @@ function updateWidgetConfig(param: { [key: string]: string }) {
if (!key) { if (!key) {
return; return;
} }
const { selectedGrid } = dashboardStore;
const widget = { const widget = {
...dashboardStore.selectedGrid.widget, ...dashboardStore.selectedGrid.widget,
[key]: decodeURIComponent(param[key]), [key]: decodeURIComponent(param[key]),

View File

@ -64,6 +64,7 @@ function removeWidget() {
height: 100%; height: 100%;
font-size: 12px; font-size: 12px;
position: relative; position: relative;
overflow: auto;
} }
.delete { .delete {
@ -76,6 +77,7 @@ function removeWidget() {
padding: 10px; padding: 10px;
font-size: 12px; font-size: 12px;
border-bottom: 1px solid #dcdfe6; border-bottom: 1px solid #dcdfe6;
min-width: 1024px;
} }
.tools { .tools {
@ -93,6 +95,5 @@ function removeWidget() {
.log { .log {
width: 100%; width: 100%;
overflow: auto;
} }
</style> </style>

View File

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License. --> limitations under the License. -->
<template> <template>
<div class="flex-h tab-header"> <div class="flex-h tab-header">
<div class="tabs"> <div class="tabs scroll_bar_style" @click="handleClick">
<span <span
v-for="(child, idx) in data.children || []" v-for="(child, idx) in data.children || []"
:key="idx" :key="idx"
@ -26,15 +26,15 @@ limitations under the License. -->
v-model="child.name" v-model="child.name"
placeholder="Please input" placeholder="Please input"
class="tab-name" class="tab-name"
:readonly="isNaN(editTabIndex)" :readonly="isNaN(editTabIndex) && !canEditTabName"
:class="{ view: isNaN(editTabIndex) }" :class="{ view: !canEditTabName }"
/> />
<Icon <Icon
v-show="activeTabIndex === idx" v-show="activeTabIndex === idx"
size="sm" size="sm"
iconName="cancel" iconName="cancel"
@click="deleteTabItem($event, idx)" @click="deleteTabItem($event, idx)"
v-if="dashboardStore.editMode" v-if="dashboardStore.editMode && canEditTabName"
/> />
</span> </span>
<span class="tab-icons" v-if="dashboardStore.editMode"> <span class="tab-icons" v-if="dashboardStore.editMode">
@ -46,35 +46,21 @@ limitations under the License. -->
</span> </span>
</div> </div>
<div class="operations" v-if="dashboardStore.editMode"> <div class="operations" v-if="dashboardStore.editMode">
<el-popover <el-dropdown placement="bottom" trigger="click" :width="200">
placement="bottom" <span class="icon-operation">
trigger="click" <Icon iconName="ellipsis_v" size="middle" />
:width="200"
v-model:visible="showTools"
>
<template #reference>
<span>
<Icon
iconName="ellipsis_v"
size="middle"
class="operation"
@click="showTools = true"
/>
</span> </span>
</template> <template #dropdown>
<div <el-dropdown-menu>
class="tools" <el-dropdown-item @click="canEditTabName = true">
@click="
canEditTabName = true;
showTools = false;
"
>
<span class="edit-tab">{{ t("editTab") }}</span> <span class="edit-tab">{{ t("editTab") }}</span>
</div> </el-dropdown-item>
<div class="tools" @click="removeTab"> <el-dropdown-item @click="removeTab">
<span>{{ t("delete") }}</span> <span>{{ t("delete") }}</span>
</div> </el-dropdown-item>
</el-popover> </el-dropdown-menu>
</template>
</el-dropdown>
</div> </div>
</div> </div>
<div class="tab-layout" @click="handleClick"> <div class="tab-layout" @click="handleClick">
@ -144,7 +130,6 @@ export default defineComponent({
const editTabIndex = ref<number>(NaN); // edit tab item name const editTabIndex = ref<number>(NaN); // edit tab item name
const canEditTabName = ref<boolean>(false); const canEditTabName = ref<boolean>(false);
const needQuery = ref<boolean>(false); const needQuery = ref<boolean>(false);
const showTools = ref<boolean>(false);
const l = dashboardStore.layout.findIndex( const l = dashboardStore.layout.findIndex(
(d: LayoutConfig) => d.i === props.data.i (d: LayoutConfig) => d.i === props.data.i
); );
@ -248,7 +233,6 @@ export default defineComponent({
editTabIndex, editTabIndex,
needQuery, needQuery,
canEditTabName, canEditTabName,
showTools,
t, t,
dragIgnoreFrom, dragIgnoreFrom,
}; };
@ -259,6 +243,10 @@ export default defineComponent({
.tabs { .tabs {
height: 40px; height: 40px;
color: #ccc; color: #ccc;
width: 100%;
overflow-x: auto;
white-space: nowrap;
overflow-y: hidden;
span { span {
display: inline-block; display: inline-block;
@ -297,9 +285,12 @@ export default defineComponent({
span.active { span.active {
border-bottom: 1px solid #409eff; border-bottom: 1px solid #409eff;
.tab-name {
color: #409eff; color: #409eff;
} }
} }
}
.operations { .operations {
color: #aaa; color: #aaa;
@ -309,6 +300,11 @@ export default defineComponent({
padding-right: 10px; padding-right: 10px;
} }
.icon-operation {
display: inline-block;
margin-top: 8px;
}
.tab-header { .tab-header {
justify-content: space-between; justify-content: space-between;
width: 100%; width: 100%;
@ -342,17 +338,4 @@ export default defineComponent({
padding-top: 30px; padding-top: 30px;
color: #888; color: #888;
} }
.tools {
padding: 5px 0;
color: #999;
cursor: pointer;
position: relative;
text-align: center;
&:hover {
color: #409eff;
background-color: #eee;
}
}
</style> </style>

View File

@ -66,6 +66,7 @@ function removeWidget() {
height: 100%; height: 100%;
font-size: 12px; font-size: 12px;
position: relative; position: relative;
overflow: auto;
} }
.delete { .delete {
@ -78,6 +79,7 @@ function removeWidget() {
padding: 10px; padding: 10px;
font-size: 12px; font-size: 12px;
border-bottom: 1px solid #dcdfe6; border-bottom: 1px solid #dcdfe6;
min-width: 1200px;
} }
.tools { .tools {
@ -96,5 +98,6 @@ function removeWidget() {
.trace { .trace {
width: 100%; width: 100%;
overflow: auto; overflow: auto;
min-width: 1200px;
} }
</style> </style>

View File

@ -78,7 +78,7 @@ limitations under the License. -->
/> />
</div> </div>
</div> </div>
<div class="flex-h tools" v-loading="loading"> <div class="flex-h tools" v-loading="loading" v-if="!appStore.isMobile">
<div class="tool-icons flex-h" v-if="dashboardStore.editMode"> <div class="tool-icons flex-h" v-if="dashboardStore.editMode">
<el-dropdown content="Controls" placement="bottom"> <el-dropdown content="Controls" placement="bottom">
<i> <i>
@ -342,7 +342,12 @@ async function getServices() {
states.currentService = selectorStore.currentService.value; states.currentService = selectorStore.currentService.value;
const e = dashboardStore.entity.split("Relation")[0]; const e = dashboardStore.entity.split("Relation")[0];
if ( if (
[EntityType[2].value, EntityType[3].value].includes(dashboardStore.entity) [
EntityType[2].value,
EntityType[3].value,
EntityType[5].value,
EntityType[6].value,
].includes(dashboardStore.entity)
) { ) {
fetchPods(e, selectorStore.currentService.id, true); fetchPods(e, selectorStore.currentService.id, true);
} }
@ -361,7 +366,10 @@ async function changeService(service: any) {
if (service[0]) { if (service[0]) {
states.currentService = service[0].value; states.currentService = service[0].value;
selectorStore.setCurrentService(service[0]); selectorStore.setCurrentService(service[0]);
fetchPods(dashboardStore.entity, selectorStore.currentService.id, true); const e = dashboardStore.entity.split("Relation")[0];
selectorStore.setCurrentPod(null);
states.currentPod = "";
fetchPods(e, selectorStore.currentService.id, true);
} else { } else {
selectorStore.setCurrentService(null); selectorStore.setCurrentService(null);
} }
@ -371,6 +379,9 @@ function changeDestService(service: any) {
if (service[0]) { if (service[0]) {
states.currentDestService = service[0].value; states.currentDestService = service[0].value;
selectorStore.setCurrentDestService(service[0]); selectorStore.setCurrentDestService(service[0]);
selectorStore.setCurrentDestPod(null);
states.currentDestPod = "";
fetchPods(dashboardStore.entity, selectorStore.currentDestService.id, true);
} else { } else {
selectorStore.setCurrentDestService(null); selectorStore.setCurrentDestService(null);
} }
@ -532,11 +543,11 @@ async function fetchPods(
if (setPod) { if (setPod) {
let p; let p;
if (states.currentDestPod) { if (states.currentDestPod) {
p = selectorStore.pods.find( p = selectorStore.destPods.find(
(d: { label: string }) => d.label === states.currentDestPod (d: { label: string }) => d.label === states.currentDestPod
); );
} else { } else {
p = selectorStore.pods.find( p = selectorStore.destPods.find(
(d: { label: string }, index: number) => index === 0 (d: { label: string }, index: number) => index === 0
); );
} }
@ -552,11 +563,11 @@ async function fetchPods(
if (setPod) { if (setPod) {
let p; let p;
if (states.currentDestPod) { if (states.currentDestPod) {
p = selectorStore.pods.find( p = selectorStore.destPods.find(
(d: { label: string }) => d.label === states.currentDestPod (d: { label: string }) => d.label === states.currentDestPod
); );
} else { } else {
p = selectorStore.pods.find( p = selectorStore.destPods.find(
(d: { label: string }, index: number) => index === 0 (d: { label: string }, index: number) => index === 0
); );
} }

View File

@ -93,7 +93,7 @@ function setCurrentLog(log: any) {
.log { .log {
font-size: 12px; font-size: 12px;
height: 100%; height: 100%;
overflow: auto; border-bottom: 1px solid #eee;
} }
.log-header { .log-header {

View File

@ -220,6 +220,8 @@ watch(
<style lang="scss" scoped> <style lang="scss" scoped>
.filters { .filters {
margin: 5px 0; margin: 5px 0;
width: 100%;
min-width: 560px;
} }
.schedules { .schedules {

View File

@ -57,6 +57,7 @@ function loadTrees(l: boolean) {
.item { .item {
height: 100%; height: 100%;
width: calc(100% - 300px); width: calc(100% - 300px);
overflow: auto;
} }
.list { .list {

View File

@ -161,6 +161,7 @@ function updateTimeRange() {
flex-shrink: 0; flex-shrink: 0;
height: 50%; height: 50%;
width: 100%; width: 100%;
min-width: 800px;
} }
.profile-table { .profile-table {
@ -171,6 +172,7 @@ function updateTimeRange() {
.profile-trace-detail-wrapper { .profile-trace-detail-wrapper {
padding: 5px 0; padding: 5px 0;
border-bottom: 1px solid rgba(0, 0, 0, 0.1); border-bottom: 1px solid rgba(0, 0, 0, 0.1);
width: 100%;
} }
.profile-trace-detail-ids { .profile-trace-detail-ids {

View File

@ -140,6 +140,7 @@ const selectedTask = ref<TaskListItem | Record<string, never>>({});
const instanceLogs = ref<TaskLog | any>({}); const instanceLogs = ref<TaskLog | any>({});
async function changeTask(item: TaskListItem) { async function changeTask(item: TaskListItem) {
profileStore.setCurrentSegment({});
selectedTask.value = item; selectedTask.value = item;
const res = await profileStore.getSegmentList({ taskID: item.id }); const res = await profileStore.getSegmentList({ taskID: item.id });
if (res.errors) { if (res.errors) {

View File

@ -277,6 +277,12 @@ function handleLinkClick(event: any, d: Call) {
layer: dashboardStore.layerId, layer: dashboardStore.layerId,
entity: `${e}Relation`, entity: `${e}Relation`,
}); });
if (!p) {
ElMessage.error(
`The dashboard named ${settings.value.linkDashboard} doesn't exist`
);
return;
}
dashboardStore.setEntity(p.entity); dashboardStore.setEntity(p.entity);
const path = `/dashboard/related/${p.layer}/${e}Relation/${d.source.id}/${d.target.id}/${p.name}`; const path = `/dashboard/related/${p.layer}/${e}Relation/${d.source.id}/${d.target.id}/${p.name}`;
const routeUrl = router.resolve({ path }); const routeUrl = router.resolve({ path });

View File

@ -178,8 +178,12 @@ function goDashboard() {
layer: dashboardStore.layerId, layer: dashboardStore.layerId,
entity, entity,
}); });
dashboardStore.setEntity(entity); if (!d) {
dashboardStore.setCurrentDashboard(d); ElMessage.error(
`The dashboard named ${settings.value.nodeDashboard} doesn't exist`
);
return;
}
const path = `/dashboard/${d.layer}/${entity}/${topologyStore.node.serviceId}/${topologyStore.node.id}/${d.name}`; const path = `/dashboard/${d.layer}/${entity}/${topologyStore.node.serviceId}/${topologyStore.node.id}/${d.name}`;
const routeUrl = router.resolve({ path }); const routeUrl = router.resolve({ path });
window.open(routeUrl.href, "_blank"); window.open(routeUrl.href, "_blank");
@ -218,7 +222,12 @@ function selectNodeLink(d: any) {
layer: dashboardStore.layerId, layer: dashboardStore.layerId,
entity, entity,
}); });
dashboardStore.setEntity(entity); if (!p) {
ElMessage.error(
`The dashboard named ${settings.value.linkDashboard} doesn't exist`
);
return;
}
const path = `/dashboard/${p.layer}/${entity}/${sourceObj.serviceId}/${sourceObj.id}/${targetObj.serviceId}/${targetObj.id}/${p.name}`; const path = `/dashboard/${p.layer}/${entity}/${sourceObj.serviceId}/${sourceObj.id}/${targetObj.serviceId}/${targetObj.id}/${p.name}`;
const routeUrl = router.resolve({ path }); const routeUrl = router.resolve({ path });
window.open(routeUrl.href, "_blank"); window.open(routeUrl.href, "_blank");

View File

@ -62,15 +62,6 @@ limitations under the License. -->
</div> </div>
</div> </div>
<div class="flex-h"> <div class="flex-h">
<!-- <div class="mr-5">
<span class="grey mr-5">{{ t("timeRange") }}:</span>
<TimePicker
:value="dateTime"
position="bottom"
format="YYYY-MM-DD HH:mm"
@input="changeTimeRange"
/>
</div> -->
<div class="mr-5"> <div class="mr-5">
<span class="sm b grey mr-5">{{ t("duration") }}:</span> <span class="sm b grey mr-5">{{ t("duration") }}:</span>
<el-input size="small" class="inputs mr-5" v-model="minTraceDuration" /> <el-input size="small" class="inputs mr-5" v-model="minTraceDuration" />