Skip to content

Commit

Permalink
#I319: resolved conflicts
Browse files Browse the repository at this point in the history
Refactor web console
  • Loading branch information
HarishGangula committed Dec 2, 2024
1 parent 1b4729a commit e4acd7c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion web-console-v2/src/services/datasetState.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -258,3 +257,5 @@ export const generateDatasetState = async (state: Record<string, any>, createAct
}
}
}

const transform = (response: any) => _.get(response, 'data.result')
3 changes: 2 additions & 1 deletion web-console-v2/src/services/datasetV1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions web-console-v2/src/services/http.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -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 !!');
Expand Down

0 comments on commit e4acd7c

Please sign in to comment.