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
7c3a9407c2
commit
699057b6ed
@ -117,20 +117,14 @@ export const networkProfilingStore = defineStore({
|
||||
when4xx: string;
|
||||
when5xx: string;
|
||||
minDuration: number;
|
||||
}
|
||||
}[]
|
||||
) {
|
||||
const res: AxiosResponse = await graphql
|
||||
.query("newNetworkProfiling")
|
||||
.params({
|
||||
request: {
|
||||
instanceId,
|
||||
samplings: {
|
||||
...params,
|
||||
settings: {
|
||||
requireCompleteRequest: true,
|
||||
requireCompleteResponse: true,
|
||||
},
|
||||
},
|
||||
samplings: params,
|
||||
},
|
||||
});
|
||||
|
||||
|
@ -35,7 +35,7 @@ limitations under the License. -->
|
||||
class="mb-5"
|
||||
:value="states.when4xx"
|
||||
:options="InitTaskField.Whenxx"
|
||||
@change="changeConfig({ when4xx: states.when4xx })"
|
||||
@change="changeWhen4xx"
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
@ -44,7 +44,7 @@ limitations under the License. -->
|
||||
class="mb-5"
|
||||
:value="states.when5xx"
|
||||
:options="InitTaskField.Whenxx"
|
||||
@change="changeConfig({ when5xx: states.when5xx })"
|
||||
@change="changeWhen5xx"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
@ -71,9 +71,12 @@ const props = defineProps({
|
||||
const { t } = useI18n();
|
||||
const states = reactive<NetworkProfilingRequest>(props.condition);
|
||||
|
||||
function changeConfig(params: { [key: string]: number | string }) {
|
||||
const key: string = Object.keys(params)[0];
|
||||
(states as any)[key] = params[key];
|
||||
function changeWhen5xx(value: string) {
|
||||
states.when5xx = value;
|
||||
emits("change", states, props.key);
|
||||
}
|
||||
function changeWhen4xx(value: string) {
|
||||
states.when4xx = value;
|
||||
emits("change", states, props.key);
|
||||
}
|
||||
</script>
|
||||
|
@ -91,6 +91,10 @@ function createTask() {
|
||||
minDuration: isNaN(Number(d.minDuration))
|
||||
? undefined
|
||||
: Number(d.minDuration),
|
||||
settings: {
|
||||
requireCompleteRequest: true,
|
||||
requireCompleteResponse: true,
|
||||
},
|
||||
};
|
||||
});
|
||||
emits("create", list);
|
||||
|
@ -176,11 +176,10 @@ async function saveNewTask(
|
||||
minDuration: number;
|
||||
}[]
|
||||
) {
|
||||
console.log(params);
|
||||
newTask.value = false;
|
||||
const instanceId =
|
||||
(selectorStore.currentPod && selectorStore.currentPod.id) || "";
|
||||
if (instanceId) {
|
||||
if (!instanceId) {
|
||||
return ElMessage.error("No Instance ID");
|
||||
}
|
||||
const res = await networkProfilingStore.createNetworkTask(instanceId, params);
|
||||
|
Loading…
Reference in New Issue
Block a user