mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-14 09:00:50 +00:00
add network proifing config
This commit is contained in:
parent
e2fcee588b
commit
6fdbdcde34
@ -113,7 +113,16 @@ export const dashboardStore = defineStore({
|
|||||||
: 3,
|
: 3,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
if (["Trace", "Profile", "Log", "DemandLog", "Ebpf"].includes(type)) {
|
if (
|
||||||
|
[
|
||||||
|
"Trace",
|
||||||
|
"Profile",
|
||||||
|
"Log",
|
||||||
|
"DemandLog",
|
||||||
|
"Ebpf",
|
||||||
|
"NetworkProfiling",
|
||||||
|
].includes(type)
|
||||||
|
) {
|
||||||
newItem.h = 36;
|
newItem.h = 36;
|
||||||
}
|
}
|
||||||
if (type === "Text") {
|
if (type === "Text") {
|
||||||
@ -170,7 +179,16 @@ export const dashboardStore = defineStore({
|
|||||||
showDepth: true,
|
showDepth: true,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
if (["Trace", "Profile", "Log", "DemandLog", "Ebpf"].includes(type)) {
|
if (
|
||||||
|
[
|
||||||
|
"Trace",
|
||||||
|
"Profile",
|
||||||
|
"Log",
|
||||||
|
"DemandLog",
|
||||||
|
"Ebpf",
|
||||||
|
"NetworkProfiling",
|
||||||
|
].includes(type)
|
||||||
|
) {
|
||||||
newItem.h = 32;
|
newItem.h = 32;
|
||||||
}
|
}
|
||||||
if (type === "Text") {
|
if (type === "Text") {
|
||||||
|
94
src/views/dashboard/controls/NetworkProfiling.vue
Normal file
94
src/views/dashboard/controls/NetworkProfiling.vue
Normal file
@ -0,0 +1,94 @@
|
|||||||
|
<!-- Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
contributor license agreements. See the NOTICE file distributed with
|
||||||
|
this work for additional information regarding copyright ownership.
|
||||||
|
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
(the "License"); you may not use this file except in compliance with
|
||||||
|
the License. You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License. -->
|
||||||
|
<template>
|
||||||
|
<div class="profile-wrapper flex-v">
|
||||||
|
<el-popover
|
||||||
|
placement="bottom"
|
||||||
|
trigger="click"
|
||||||
|
:width="100"
|
||||||
|
v-if="dashboardStore.editMode"
|
||||||
|
>
|
||||||
|
<template #reference>
|
||||||
|
<span class="delete cp">
|
||||||
|
<Icon iconName="ellipsis_v" size="middle" class="operation" />
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
<div class="tools" @click="removeWidget">
|
||||||
|
<span>{{ t("delete") }}</span>
|
||||||
|
</div>
|
||||||
|
</el-popover>
|
||||||
|
<Content />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import type { PropType } from "vue";
|
||||||
|
import { useI18n } from "vue-i18n";
|
||||||
|
import { useDashboardStore } from "@/store/modules/dashboard";
|
||||||
|
import Content from "../related/network-profiling/Content.vue";
|
||||||
|
|
||||||
|
/*global defineProps */
|
||||||
|
const props = defineProps({
|
||||||
|
data: {
|
||||||
|
type: Object as PropType<any>,
|
||||||
|
default: () => ({ graph: {} }),
|
||||||
|
},
|
||||||
|
activeIndex: { type: String, default: "" },
|
||||||
|
needQuery: { type: Boolean, default: true },
|
||||||
|
});
|
||||||
|
const { t } = useI18n();
|
||||||
|
const dashboardStore = useDashboardStore();
|
||||||
|
console.log("enter");
|
||||||
|
function removeWidget() {
|
||||||
|
dashboardStore.removeControls(props.data);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.profile-wrapper {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
font-size: 12px;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.delete {
|
||||||
|
position: absolute;
|
||||||
|
top: 5px;
|
||||||
|
right: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header {
|
||||||
|
padding: 10px;
|
||||||
|
font-size: 12px;
|
||||||
|
border-bottom: 1px solid #dcdfe6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tools {
|
||||||
|
padding: 5px 0;
|
||||||
|
color: #999;
|
||||||
|
cursor: pointer;
|
||||||
|
position: relative;
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
color: #409eff;
|
||||||
|
background-color: #eee;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.trace {
|
||||||
|
width: 100%;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
</style>
|
@ -118,6 +118,7 @@ import Log from "./Log.vue";
|
|||||||
import Text from "./Text.vue";
|
import Text from "./Text.vue";
|
||||||
import Ebpf from "./Ebpf.vue";
|
import Ebpf from "./Ebpf.vue";
|
||||||
import Event from "./Event.vue";
|
import Event from "./Event.vue";
|
||||||
|
import NetworkProfiling from "./NetworkProfiling.vue";
|
||||||
import { dragIgnoreFrom } from "../data";
|
import { dragIgnoreFrom } from "../data";
|
||||||
import DemandLog from "./DemandLog.vue";
|
import DemandLog from "./DemandLog.vue";
|
||||||
import copy from "@/utils/copy";
|
import copy from "@/utils/copy";
|
||||||
@ -141,6 +142,7 @@ export default defineComponent({
|
|||||||
Ebpf,
|
Ebpf,
|
||||||
DemandLog,
|
DemandLog,
|
||||||
Event,
|
Event,
|
||||||
|
NetworkProfiling,
|
||||||
},
|
},
|
||||||
props,
|
props,
|
||||||
setup(props) {
|
setup(props) {
|
||||||
|
@ -24,6 +24,7 @@ import Text from "./Text.vue";
|
|||||||
import Ebpf from "./Ebpf.vue";
|
import Ebpf from "./Ebpf.vue";
|
||||||
import DemandLog from "./DemandLog.vue";
|
import DemandLog from "./DemandLog.vue";
|
||||||
import Event from "./Event.vue";
|
import Event from "./Event.vue";
|
||||||
|
import NetworkProfiling from "./NetworkProfiling.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
Tab,
|
Tab,
|
||||||
@ -36,4 +37,5 @@ export default {
|
|||||||
Ebpf,
|
Ebpf,
|
||||||
DemandLog,
|
DemandLog,
|
||||||
Event,
|
Event,
|
||||||
|
NetworkProfiling,
|
||||||
};
|
};
|
||||||
|
@ -197,6 +197,11 @@ export const InstanceTools = [
|
|||||||
{ name: "assignment", content: "Add Log", id: "addLog" },
|
{ name: "assignment", content: "Add Log", id: "addLog" },
|
||||||
{ name: "demand", content: "Add On Demand Log", id: "addDemandLog" },
|
{ name: "demand", content: "Add On Demand Log", id: "addDemandLog" },
|
||||||
{ name: "event", content: "Add Event", id: "addEvent" },
|
{ name: "event", content: "Add Event", id: "addEvent" },
|
||||||
|
{
|
||||||
|
name: "timeline",
|
||||||
|
content: "Add Network Profiling",
|
||||||
|
id: "addNetworkProfiling",
|
||||||
|
},
|
||||||
];
|
];
|
||||||
export const EndpointTools = [
|
export const EndpointTools = [
|
||||||
{ name: "playlist_add", content: "Add Widget", id: "addWidget" },
|
{ name: "playlist_add", content: "Add Widget", id: "addWidget" },
|
||||||
|
@ -144,9 +144,8 @@ const dashboardStore = useDashboardStore();
|
|||||||
const selectorStore = useSelectorStore();
|
const selectorStore = useSelectorStore();
|
||||||
const appStore = useAppStoreWithOut();
|
const appStore = useAppStoreWithOut();
|
||||||
const params = useRoute().params;
|
const params = useRoute().params;
|
||||||
const toolIcons = ref<{ name: string; content: string; id: string }[]>(
|
const toolIcons =
|
||||||
EndpointRelationTools
|
ref<{ name: string; content: string; id: string }[]>(AllTools);
|
||||||
);
|
|
||||||
const loading = ref<boolean>(false);
|
const loading = ref<boolean>(false);
|
||||||
const states = reactive<{
|
const states = reactive<{
|
||||||
destService: string;
|
destService: string;
|
||||||
@ -461,6 +460,9 @@ function setTabControls(id: string) {
|
|||||||
case "addEvent":
|
case "addEvent":
|
||||||
dashboardStore.addTabControls("Event");
|
dashboardStore.addTabControls("Event");
|
||||||
break;
|
break;
|
||||||
|
case "addNetworkProfiling":
|
||||||
|
dashboardStore.addTabControls("NetworkProfiling");
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
ElMessage.info("Don't support this control");
|
ElMessage.info("Don't support this control");
|
||||||
break;
|
break;
|
||||||
@ -499,6 +501,9 @@ function setControls(id: string) {
|
|||||||
case "addEvent":
|
case "addEvent":
|
||||||
dashboardStore.addControl("Event");
|
dashboardStore.addControl("Event");
|
||||||
break;
|
break;
|
||||||
|
case "addNetworkProfiling":
|
||||||
|
dashboardStore.addControl("NetworkProfiling");
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
dashboardStore.addControl("Widget");
|
dashboardStore.addControl("Widget");
|
||||||
}
|
}
|
||||||
@ -618,7 +623,7 @@ function getTools() {
|
|||||||
toolIcons.value = EndpointRelationTools;
|
toolIcons.value = EndpointRelationTools;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
toolIcons.value = EndpointRelationTools;
|
toolIcons.value = AllTools;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function searchPods(query: string) {
|
function searchPods(query: string) {
|
||||||
|
17
src/views/dashboard/related/network-profiling/Content.vue
Normal file
17
src/views/dashboard/related/network-profiling/Content.vue
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
<!-- Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
contributor license agreements. See the NOTICE file distributed with
|
||||||
|
this work for additional information regarding copyright ownership.
|
||||||
|
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
(the "License"); you may not use this file except in compliance with
|
||||||
|
the License. You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License. -->
|
||||||
|
<template>
|
||||||
|
<div>network profiling</div>
|
||||||
|
</template>
|
Loading…
Reference in New Issue
Block a user