diff --git a/src/components/Radio.vue b/src/components/Radio.vue
index 7eafaa4e..2cd786fb 100644
--- a/src/components/Radio.vue
+++ b/src/components/Radio.vue
@@ -24,8 +24,8 @@ import { ref } from "vue";
import type { PropType } from "vue";
interface Option {
- label: string;
- value: string;
+ label: string | number;
+ value: string | number;
}
/*global defineProps, defineEmits */
diff --git a/src/components/Selector.vue b/src/components/Selector.vue
index f0d25a06..ea1ccd7a 100644
--- a/src/components/Selector.vue
+++ b/src/components/Selector.vue
@@ -42,7 +42,7 @@ import type { PropType } from "vue";
interface Option {
label: string | number;
- value: string | number | boolean;
+ value: string | number;
}
/*global defineProps, defineEmits*/
diff --git a/src/store/modules/network-profiling.ts b/src/store/modules/network-profiling.ts
index 2c45208c..3f62a1a9 100644
--- a/src/store/modules/network-profiling.ts
+++ b/src/store/modules/network-profiling.ts
@@ -110,13 +110,29 @@ export const networkProfilingStore = defineStore({
this.calls = calls;
this.nodes = data.nodes;
},
- async createNetworkTask(param: {
- serviceId: string;
- serviceInstanceId: string;
- }) {
+ async createNetworkTask(
+ instanceId: string,
+ params: {
+ uriRegex: string;
+ when4xx: string;
+ when5xx: string;
+ minDuration: number;
+ }
+ ) {
const res: AxiosResponse = await graphql
.query("newNetworkProfiling")
- .params({ request: { instanceId: param.serviceInstanceId } });
+ .params({
+ request: {
+ instanceId,
+ samplings: {
+ ...params,
+ settings: {
+ requireCompleteRequest: true,
+ requireCompleteResponse: true,
+ },
+ },
+ },
+ });
if (res.data.errors) {
return res.data;
diff --git a/src/views/dashboard/related/network-profiling/components/NewTask.vue b/src/views/dashboard/related/network-profiling/components/NewTask.vue
index fa1ba1a9..a9feb870 100644
--- a/src/views/dashboard/related/network-profiling/components/NewTask.vue
+++ b/src/views/dashboard/related/network-profiling/components/NewTask.vue
@@ -20,34 +20,31 @@ limitations under the License. -->