Skip to content

Commit

Permalink
Merge pull request #11 from Sanketika-Obsrv/merging-console
Browse files Browse the repository at this point in the history
#OBS-I280 : added v2 console to open-source
  • Loading branch information
HarishGangula authored Oct 22, 2024
2 parents 59058db + 5dc69be commit e4151f2
Show file tree
Hide file tree
Showing 250 changed files with 54,091 additions and 28,945 deletions.
4 changes: 0 additions & 4 deletions .env.sample

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ lerna-debug.log*

# production
/build
/buildV2
/dist

# Logs
Expand Down
10 changes: 10 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ RUN npm install --legacy-peer-deps
COPY ./client/ .
RUN npm run build

# Stage 2 - Build the React client v2
FROM --platform=linux/amd64 node:20.10-alpine AS clientv2-build
WORKDIR /opt/app/web-console-v2
COPY ./web-console-v2/package.json .
RUN npm install --legacy-peer-deps
COPY ./web-console-v2/ .
RUN npm run build

# Stage 2 - Run the Node.js server
FROM --platform=linux/amd64 node:20.10-alpine AS server-build
WORKDIR /opt/app/server
Expand All @@ -14,5 +22,7 @@ RUN npm install
COPY . .
COPY LICENSE /opt/app/LICENSE
COPY --from=client-build /opt/app/client/build ./src/build
COPY --from=clientv2-build /opt/app/web-console-v2/build ./src/buildV2
RUN rm -rf /opt/app/server/client
RUN rm -rf /opt/app/server/web-console-v2
CMD ["npm", "run", "start"]
32,649 changes: 13,257 additions & 19,392 deletions client/package-lock.json

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "1.2.0",
"private": true,
"homepage": "/console",
"proxy": "http://localhost:3000/",
"dependencies": {
"@ant-design/colors": "^6.0.0",
"@ant-design/icons": "^4.7.0",
Expand Down Expand Up @@ -125,4 +126,4 @@
"semver": "^7.5.3",
"lodash": "^4.17.21"
}
}
}
2 changes: 1 addition & 1 deletion client/src/components/MainCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const MainCard = forwardRef(
tagLine,
modal = false,
...others
}: MainCardProps,
}: any,
ref: Ref<HTMLDivElement>
) => {
const theme = useTheme();
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/third-party/dropzone/Avatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ const AvatarUpload = ({ error, file, setFieldValue, sx, ...other }: UploadProps)
</PlaceholderWrapper>
</DropzoneWrapper>
</RootWrapper>
{fileRejections.length > 0 && <RejectionFiles fileRejections={fileRejections} />}
{fileRejections.length > 0 && <RejectionFiles fileRejections={[...fileRejections]} />}
</>
);
};
Expand Down
4 changes: 2 additions & 2 deletions client/src/menu-items/datasets.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const other: NavItemType = {
id: 'new',
title: <FormattedMessage id="new-dataset" />,
type: 'item',
url: '/dataset/new',
url: '/home/new-dataset',
icon: icons.PlusCircleOutlined
},
{
Expand All @@ -37,4 +37,4 @@ const other: NavItemType = {
]
};

export default other;
export default other;
4 changes: 2 additions & 2 deletions client/src/pages/alertManager/services/utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ export const renderStatusChip = (payload: Record<string, any>) => {
export const getSilenceComponent = (props: any) => {
return () => {
const { silenceData, setAlertStatus, fetchDataHandler, toggleFilter, removeFilter } = props;
return _.map(silenceData, (value, state) => (
return _.map(silenceData, (value: any, state: any) => (
<Chip
key={state}
size="small"
Expand All @@ -162,7 +162,7 @@ export const getSilenceComponent = (props: any) => {
export const getStatusComponent = (props: any) => {
return () => {
const { statusData, setSilenceStatus, fetchDataHandler, toggleFilter, removeFilter } = props;
return _.map(statusData, (value, status) => (
return _.map(statusData, (value:any, status:any) => (
<Chip
key={status}
size="small"
Expand Down
10 changes: 8 additions & 2 deletions client/src/pages/dashboard/ReadyToPublishDatasets.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,13 @@ const ReadyToPublishDatasetsList = ({ setDatasetType, sourceConfigs }: any) => {
data-objecttype={row?.type === DatasetType.MasterDataset ? 'masterDataset' : 'dataset'}
color="primary"
size="large"
onClick={_ => navigateToPath(`/datasets/edit/${row.dataset_id}?master=${row.type === DatasetType.MasterDataset}&status=${row.status}`)}>
onClick={() => {
const datasetId = row?.dataset_id;
const master = row?.type === DatasetType.MasterDataset;
const status = row?.status;
const url = `/home/ingestion/schema-details/${datasetId}`;
window.location.href = url;
}}>
<EditOutlined />
</IconButton>
</Tooltip>
Expand Down Expand Up @@ -426,4 +432,4 @@ const ReadyToPublishDatasetsList = ({ setDatasetType, sourceConfigs }: any) => {
);
};

export default ReadyToPublishDatasetsList;
export default ReadyToPublishDatasetsList;
10 changes: 8 additions & 2 deletions client/src/pages/dashboard/draftDatasetsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,13 @@ const DraftDatasetsList = (props: any) => {
data-objecttype={row?.type === DatasetType.MasterDataset ? DatasetType.MasterDataset : DatasetType.Dataset}
color="primary"
size="large"
onClick={_ => navigateToPath(`/datasets/edit/${row.dataset_id}?master=${row.type === DatasetType.MasterDataset}&status=${row.status}`)}>
onClick={() => {
const datasetId = row?.dataset_id;
const master = row?.type === DatasetType.MasterDataset;
const status = row?.status;
const url = `/home/ingestion/schema-details/${datasetId}`;
window.location.href = url;
}}>
<EditOutlined />
</IconButton>
</Tooltip>
Expand Down Expand Up @@ -336,4 +342,4 @@ const DraftDatasetsList = (props: any) => {
);
};

export default DraftDatasetsList;
export default DraftDatasetsList;
6 changes: 5 additions & 1 deletion client/src/pages/dataset/wizard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,10 @@ const DatasetOnboarding = ({ edit = false, master = false, key = Math.random(),
</Stepper>
);

useEffect(() => {
window.location.href = "/home/new-dataset"
}, [])

return (
<>
<Box>
Expand Down Expand Up @@ -181,4 +185,4 @@ const DatasetOnboarding = ({ edit = false, master = false, key = Math.random(),
);
};

export default DatasetOnboarding;
export default DatasetOnboarding;
Loading

0 comments on commit e4151f2

Please sign in to comment.