mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-07-18 20:45:24 +00:00
link dashboard
This commit is contained in:
parent
1ad7cabcd4
commit
cce1f08719
@ -287,7 +287,7 @@ async function setSourceSelector() {
|
|||||||
await selectorStore.getService(String(params.serviceId));
|
await selectorStore.getService(String(params.serviceId));
|
||||||
states.currentService = selectorStore.currentService.value;
|
states.currentService = selectorStore.currentService.value;
|
||||||
const e = String(params.entity).split("Relation")[0];
|
const e = String(params.entity).split("Relation")[0];
|
||||||
await fetchPods(e, selectorStore.currentService.id, false);
|
await fetchPods(e, selectorStore.currentService.id, true);
|
||||||
if (!(selectorStore.pods.length && selectorStore.pods[0])) {
|
if (!(selectorStore.pods.length && selectorStore.pods[0])) {
|
||||||
selectorStore.setCurrentPod(null);
|
selectorStore.setCurrentPod(null);
|
||||||
states.currentPod = "";
|
states.currentPod = "";
|
||||||
@ -336,7 +336,7 @@ async function setDestSelector() {
|
|||||||
await fetchPods(
|
await fetchPods(
|
||||||
String(params.entity),
|
String(params.entity),
|
||||||
selectorStore.currentDestService.id,
|
selectorStore.currentDestService.id,
|
||||||
false
|
true
|
||||||
);
|
);
|
||||||
if (!(selectorStore.destPods.length && selectorStore.destPods[0])) {
|
if (!(selectorStore.destPods.length && selectorStore.destPods[0])) {
|
||||||
selectorStore.setCurrentDestPod(null);
|
selectorStore.setCurrentDestPod(null);
|
||||||
|
@ -23,7 +23,7 @@ limitations under the License. -->
|
|||||||
<Icon size="middle" iconName="settings" />
|
<Icon size="middle" iconName="settings" />
|
||||||
</div>
|
</div>
|
||||||
<div class="process-setting" v-if="showSettings && dashboardStore.editMode">
|
<div class="process-setting" v-if="showSettings && dashboardStore.editMode">
|
||||||
<Settings @update="updateSettings" @updateNodes="freshNodes" />
|
<Settings @update="updateSettings" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
@ -342,16 +342,9 @@ function shuffleArray(array: number[][]) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function handleLinkClick(event: any, d: Call) {
|
function handleLinkClick(event: any, d: Call) {
|
||||||
if (
|
|
||||||
d.source.layer !== dashboardStore.layerId ||
|
|
||||||
d.target.layer !== dashboardStore.layerId
|
|
||||||
) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
networkProfilingStore.setNode(null);
|
networkProfilingStore.setNode(null);
|
||||||
networkProfilingStore.setLink(d);
|
networkProfilingStore.setLink(d);
|
||||||
console.log(config.value);
|
|
||||||
if (!config.value.linkDashboard) {
|
if (!config.value.linkDashboard) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -366,13 +359,13 @@ function handleLinkClick(event: any, d: Call) {
|
|||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const path = `/dashboard/related/${dashboard.layer}/${EntityType[7].value}/${d.source.id}/${d.target.id}/${dashboard.name}`;
|
const path = `/dashboard/${dashboard.layer}/${EntityType[7].value}/${d.source.serviceId}/${d.source.serviceInstanceId}/${d.source.id}/${d.target.serviceId}/${d.target.serviceInstanceId}/${d.target.id}/${dashboard.name}`;
|
||||||
const routeUrl = router.resolve({ path });
|
const routeUrl = router.resolve({ path });
|
||||||
window.open(routeUrl.href, "_blank");
|
window.open(routeUrl.href, "_blank");
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateSettings(config: any) {
|
function updateSettings(param: any) {
|
||||||
config.value = config;
|
config.value = param;
|
||||||
}
|
}
|
||||||
|
|
||||||
function setConfig() {
|
function setConfig() {
|
||||||
@ -438,13 +431,13 @@ watch(
|
|||||||
padding: 5px;
|
padding: 5px;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 20px;
|
top: 10px;
|
||||||
right: 10px;
|
right: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.process-setting {
|
.process-setting {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 65px;
|
top: 45px;
|
||||||
right: 10px;
|
right: 10px;
|
||||||
width: 300px;
|
width: 300px;
|
||||||
height: 160px;
|
height: 160px;
|
||||||
|
@ -65,13 +65,13 @@ function getDashboards() {
|
|||||||
|
|
||||||
function changeLinkDashboard(opt: { value: string }[]) {
|
function changeLinkDashboard(opt: { value: string }[]) {
|
||||||
linkDashboard.value = opt[0].value;
|
linkDashboard.value = opt[0].value;
|
||||||
const param = {
|
const p = {
|
||||||
...dashboardStore.selectedGrid,
|
...dashboardStore.selectedGrid,
|
||||||
linkDashboard: linkDashboard.value,
|
linkDashboard: opt[0].value,
|
||||||
};
|
};
|
||||||
dashboardStore.selectWidget(param);
|
dashboardStore.selectWidget(p);
|
||||||
dashboardStore.setConfigs(param);
|
dashboardStore.setConfigs(p);
|
||||||
emits("update", param);
|
emits("update", p);
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
Loading…
Reference in New Issue
Block a user