mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-07-03 19:05:24 +00:00
fix: encode params
This commit is contained in:
parent
4124c568b0
commit
e80774cf94
@ -65,13 +65,13 @@ limitations under the License. -->
|
|||||||
const appStoreWithOut = useAppStoreWithOut();
|
const appStoreWithOut = useAppStoreWithOut();
|
||||||
const selectorStore = useSelectorStore();
|
const selectorStore = useSelectorStore();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const config = computed<any>(() => JSON.parse(route.params.config as string));
|
const config = computed<any>(() => JSON.parse(decodeURIComponent(route.params.config as string) as string));
|
||||||
const graph = computed(() => config.value.graph || {});
|
const graph = computed(() => config.value.graph || {});
|
||||||
const source = ref<unknown>({});
|
const source = ref<unknown>({});
|
||||||
const loading = ref<boolean>(false);
|
const loading = ref<boolean>(false);
|
||||||
const dashboardStore = useDashboardStore();
|
const dashboardStore = useDashboardStore();
|
||||||
const title = computed(() => encodeURIComponent((config.value.widget && config.value.widget.title) || ""));
|
const title = computed(() => (config.value.widget && config.value.widget.title) || "");
|
||||||
const tips = computed(() => encodeURIComponent((config.value.widget && config.value.widget.tips) || ""));
|
const tips = computed(() => (config.value.widget && config.value.widget.tips) || "");
|
||||||
|
|
||||||
init();
|
init();
|
||||||
async function init() {
|
async function init() {
|
||||||
|
@ -97,8 +97,10 @@ limitations under the License. -->
|
|||||||
metricConfig: metricConfig,
|
metricConfig: metricConfig,
|
||||||
height: dashboardStore.selectedGrid.h * 20,
|
height: dashboardStore.selectedGrid.h * 20,
|
||||||
});
|
});
|
||||||
const path = `/page/${dashboardStore.layerId}/${dashboardStore.entity}/${serviceId}/${podId}/${processId}/${destServiceId}/${destPodId}/${destProcessId}/${config}`;
|
const path = `/page/${dashboardStore.layerId}/${
|
||||||
widgetLink.value = hasDuration.value ? `${path}/${duration}` : path;
|
dashboardStore.entity
|
||||||
|
}/${serviceId}/${podId}/${processId}/${destServiceId}/${destPodId}/${destProcessId}/${encodeURIComponent(config)}`;
|
||||||
|
widgetLink.value = hasDuration.value ? `${path}/${encodeURIComponent(duration)}` : path;
|
||||||
}
|
}
|
||||||
function viewPage() {
|
function viewPage() {
|
||||||
const routeUrl = router.resolve({ path: widgetLink.value });
|
const routeUrl = router.resolve({ path: widgetLink.value });
|
||||||
|
Loading…
Reference in New Issue
Block a user