mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-13 16:27:33 +00:00
update
This commit is contained in:
parent
d1c5ab7377
commit
f40e0f76b2
@ -22,7 +22,7 @@ limitations under the License. -->
|
|||||||
<div
|
<div
|
||||||
class="tools"
|
class="tools"
|
||||||
@click="viewTrace"
|
@click="viewTrace"
|
||||||
v-if="props.relatedTrace && props.relatedTrace.enableRelate"
|
v-if="relatedTrace && relatedTrace.enableRelate"
|
||||||
>
|
>
|
||||||
{{ t("viewTrace") }}
|
{{ t("viewTrace") }}
|
||||||
</div>
|
</div>
|
||||||
@ -118,15 +118,15 @@ function instanceEvent() {
|
|||||||
visMenus.value = true;
|
visMenus.value = true;
|
||||||
const w = chartRef.value.getBoundingClientRect().width || 0;
|
const w = chartRef.value.getBoundingClientRect().width || 0;
|
||||||
const h = chartRef.value.getBoundingClientRect().height || 0;
|
const h = chartRef.value.getBoundingClientRect().height || 0;
|
||||||
if (w - params.event.offsetX > 125) {
|
if (w - params.event.offsetX > 120) {
|
||||||
menus.value.style.left = params.event.offsetX + "px";
|
menus.value.style.left = params.event.offsetX + "px";
|
||||||
} else {
|
} else {
|
||||||
menus.value.style.left = params.event.offsetX - 125 + "px";
|
menus.value.style.left = params.event.offsetX - 120 + "px";
|
||||||
}
|
}
|
||||||
if (h - params.event.offsetY < 60) {
|
if (h - params.event.offsetY < 50) {
|
||||||
menus.value.style.top = params.event.offsetY - 60 + "px";
|
menus.value.style.top = params.event.offsetY - 40 + "px";
|
||||||
} else {
|
} else {
|
||||||
menus.value.style.top = params.event.offsetY + 5 + "px";
|
menus.value.style.top = params.event.offsetY + 2 + "px";
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
document.addEventListener(
|
document.addEventListener(
|
||||||
@ -149,10 +149,11 @@ function instanceEvent() {
|
|||||||
function associateMetrics() {
|
function associateMetrics() {
|
||||||
emits("select", currentParams.value);
|
emits("select", currentParams.value);
|
||||||
visMenus.value = true;
|
visMenus.value = true;
|
||||||
updateOptions();
|
const dataIndex = currentParams.value?.dataIndex;
|
||||||
|
updateOptions(dataIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateOptions() {
|
function updateOptions(dataIndex?: number) {
|
||||||
const instance = getInstance();
|
const instance = getInstance();
|
||||||
if (!instance) {
|
if (!instance) {
|
||||||
return;
|
return;
|
||||||
@ -160,7 +161,6 @@ function updateOptions() {
|
|||||||
if (!props.filters) {
|
if (!props.filters) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
console.log(props.filters);
|
|
||||||
if (props.filters.isRange) {
|
if (props.filters.isRange) {
|
||||||
const { eventAssociate } = associateProcessor(props);
|
const { eventAssociate } = associateProcessor(props);
|
||||||
const options = eventAssociate();
|
const options = eventAssociate();
|
||||||
@ -168,7 +168,7 @@ function updateOptions() {
|
|||||||
} else {
|
} else {
|
||||||
instance.dispatchAction({
|
instance.dispatchAction({
|
||||||
type: "updateAxisPointer",
|
type: "updateAxisPointer",
|
||||||
dataIndex: props.filters.dataIndex,
|
dataIndex: dataIndex || props.filters.dataIndex,
|
||||||
seriesIndex: 0,
|
seriesIndex: 0,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user