From 4db58c57c58eeadf56843876ef9a40ac7889e5e8 Mon Sep 17 00:00:00 2001 From: robsongajunior Date: Wed, 25 Sep 2024 12:05:26 -0300 Subject: [PATCH 01/11] fix: link variable name --- src/services/compare-with-azion/get-test.js | 16 +- src/views/CompareWithAzion/CompareView.vue | 224 ++++++++++-------- .../CompareWithAzion/blocks/data-block.vue | 44 ++++ .../CompareWithAzion/blocks/grade-block.vue | 2 +- .../CompareWithAzion/blocks/retry-message.vue | 103 ++++++++ .../CompareWithAzion/utils/convert-ms-sec.js | 2 +- .../utils/result-data-parse.js | 114 +-------- 7 files changed, 278 insertions(+), 227 deletions(-) create mode 100644 src/views/CompareWithAzion/blocks/data-block.vue create mode 100644 src/views/CompareWithAzion/blocks/retry-message.vue diff --git a/src/services/compare-with-azion/get-test.js b/src/services/compare-with-azion/get-test.js index de901f4a0..037178377 100644 --- a/src/services/compare-with-azion/get-test.js +++ b/src/services/compare-with-azion/get-test.js @@ -2,14 +2,7 @@ import { AxiosHttpClientAdapter } from '../axios/AxiosHttpClientAdapter' import makeCompareWithAzionApi from '../axios/makeCompareWithAzionApi' import { makeWebpagetestBaseUrl } from './make-base-url' -export const getTestById = async (id, clientId = undefined) => { - if (!id) { - return { - status: 400, - error: `Invalid testId param.` - } - } - +export const getTestById = async (id, clientId) => { let url = `${makeWebpagetestBaseUrl()}/db/test?id=${id}` if (clientId) { @@ -28,13 +21,6 @@ export const getTestById = async (id, clientId = undefined) => { } export const getAllTestsByClientId = async (clientId) => { - if (!clientId) { - return { - status: 400, - error: `Invalid clientId param.` - } - } - let httpResponse = await AxiosHttpClientAdapter.request( { url: `${makeWebpagetestBaseUrl()}/db/all-clientid-tests?clientId=${clientId}`, diff --git a/src/views/CompareWithAzion/CompareView.vue b/src/views/CompareWithAzion/CompareView.vue index c07fdafe3..e8d6871fc 100644 --- a/src/views/CompareWithAzion/CompareView.vue +++ b/src/views/CompareWithAzion/CompareView.vue @@ -1,81 +1,60 @@