diff --git a/web-console-v2/src/services/datasetState.ts b/web-console-v2/src/services/datasetState.ts index e93033a1..e8054311 100644 --- a/web-console-v2/src/services/datasetState.ts +++ b/web-console-v2/src/services/datasetState.ts @@ -1,5 +1,4 @@ import { DatasetType } from "types/datasets"; -import { generateJsonSchema } from "./dataset"; import _ from "lodash"; import moment from "moment"; import { v4 as uuid } from 'uuid'; @@ -258,3 +257,5 @@ export const generateDatasetState = async (state: Record, createAct } } } + +const transform = (response: any) => _.get(response, 'data.result') \ No newline at end of file diff --git a/web-console-v2/src/services/datasetV1.ts b/web-console-v2/src/services/datasetV1.ts index c4042d47..4be8428d 100644 --- a/web-console-v2/src/services/datasetV1.ts +++ b/web-console-v2/src/services/datasetV1.ts @@ -6,9 +6,10 @@ import apiEndpoints from 'constants/Endpoints'; import { DatasetStatus, DatasetType } from 'types/datasets'; import { aggregationFunctions, allowedSegmentGranurality } from './commonUtils'; import { generateRequestBody } from './utils'; -import { fetchDataset, generateDatasetState } from './datasetState'; +import { generateDatasetState } from './datasetState'; import moment from 'moment'; import { v4 as uuid } from 'uuid'; +import { fetchDataset } from './dataset'; export const DEFAULT_TIMESTAMP = { indexValue: "obsrv_meta.syncts", diff --git a/web-console-v2/src/services/http.ts b/web-console-v2/src/services/http.ts index 5f35d714..70ed9ad5 100644 --- a/web-console-v2/src/services/http.ts +++ b/web-console-v2/src/services/http.ts @@ -1,5 +1,5 @@ import axios from 'axios'; -import { getBaseURL, getConfigValueV1 } from './configData'; +import { getBaseURL, getSystemSetting } from './configData'; axios.defaults.headers.common['Cache-Control'] = 'no-store'; axios.defaults.headers.common['Pragma'] = 'no-store'; @@ -10,7 +10,7 @@ const responseInterceptor = (response: any) => response; const checkForSessionExpiry = (config: any) => { const { navigate, status } = config; if (status === 401) { - if (getConfigValueV1("AUTHENTICATION_TYPE") !== 'basic') { + if (getSystemSetting("AUTHENTICATION_TYPE") !== 'basic') { window.location.href = '/console/logout'; } else { // alert('Unauthorized access !!');