Skip to content

Commit

Permalink
Merge pull request #144 from Sanketika-Obsrv/test-fixes
Browse files Browse the repository at this point in the history
#OBS-l304: ui updates
  • Loading branch information
HarishGangula authored Nov 15, 2024
2 parents 6b75825 + 89a0830 commit 3a07f1f
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ const DatasetMetricsCard: React.FC<any> = (props: any) => {
</Box>
</Tooltip>
:
<ApexWithFilters title={label} filters={_.get(filters, 'variant1')}>
<ApexWithFilters title={label} filters={_.get(filters, 'variant1')} description={description}>
<ApexChart metadata={getQueryByType(queryType, datasetId, isMasterDataset, interval)} interval={1140}></ApexChart>
</ApexWithFilters>
);
Expand Down
4 changes: 2 additions & 2 deletions web-console-v2/src/data/chartsV1/storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ export default {
parse: (response: any) => {
const result = _.get(response, 'data.result[0].value[1]');
if (!result) throw new Error();
const date = dayjs().subtract(result * 1000, 'milliseconds');
const date = dayjs(result * 1000);
const timeAgo = date.fromNow();
return timeAgo
},
Expand All @@ -227,7 +227,7 @@ export default {
parse: (response: any) => {
const result = _.get(response, 'data.result[0].value[1]');
if (!result) throw new Error();
const date = dayjs().subtract(result * 1000, 'milliseconds');
const date = dayjs(result * 1000);
const timeAgo = date.fromNow();
return timeAgo
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ const IndividualMetricDashboards = (props: any) => {
}

return (
<Box sx={{padding: datasetId && 3}}>
<Box sx={{px: datasetId && 3, py: datasetId && 1 }}>
{datasetId && <Box>
<Button
variant="back"
Expand Down
2 changes: 2 additions & 0 deletions web-console-v2/src/pages/Dashboard/metrics.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -686,6 +686,7 @@ export const metricsMetadata = [
},
{
id: "storageDeepStorageDataGrowth",
description: "This is a graphical representation of the deep storage data growth",
chart: <ApexWithFilters title="Deep Storage Usage Growth" filters={_.get(filters, 'default')} id="deepStorageDataGrowth">
<ApexChart metadata={_.get(chartMeta, 'data_growth_over_time')} interval={1440}></ApexChart>
</ApexWithFilters>
Expand Down Expand Up @@ -853,6 +854,7 @@ export const metricsMetadata = [
},
{
id: "Events Processing Time (ms)",
description: "This is a graphical representation of the processing time of events in milliseconds",
chart: <DatasetMetricsCard label="Events Processing Time (ms)" queryType={'events_processing_time_apex_charts'} isApexChart={true}/>
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ const LabelComponent = (props: any) => {
}
}
})
subscribe({ label: "", value: "" })
subscribe({})
setFormErrors(true)
setIsEdit(false);
}

Expand All @@ -109,7 +110,8 @@ const LabelComponent = (props: any) => {
}
}
})
subscribe({ label: "", value: "" })
subscribe({})
setFormErrors(true)
setIsEdit(false);
}

Expand Down
36 changes: 19 additions & 17 deletions web-console-v2/src/pages/dashboardV1/createEvents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,31 +138,33 @@ const DatasetCreateEvents = () => {
</Grid>
</MainCard >
}
{files && _.size(files) > 0 &&
{!loading && (files && _.size(files) > 0 &&
<GenericCard elevation={1}>
<Box display="flex" justifyContent="space-between">
<Typography variant="h5" gutterBottom>Files Uploaded</Typography>
<Button onClick={onRemoveAll}>Remove all</Button>
</Box>
<FilesPreview files={files} showList={false} onRemove={onFileRemove} />
</GenericCard>
</GenericCard>)
}
{formErrors?.length > 0 && <RejectionFiles fileRejections={formErrors} />}
<Box display="flex" justifyContent="flex-end">
<AnimateButton>
<Button
data-edataid={`${interactIds.create_events}${params.datasetName}`}
data-objectid={params.datasetId}
data-objecttype="dataset"
disabled={_.isEmpty(data) ? true : loading}
variant="contained"
sx={{ my: 2, ml: 1, mr: 2.5 }}
onClick={(e: any) => pushEvents()}
>
Send Events
</Button>
</AnimateButton>
</Box>
{!loading &&
<Box display="flex" justifyContent="flex-end">
<AnimateButton>
<Button
data-edataid={`${interactIds.create_events}${params.datasetName}`}
data-objectid={params.datasetId}
data-objecttype="dataset"
disabled={_.isEmpty(data) ? true : loading}
variant="contained"
sx={{ my: 2, ml: 1, mr: 2.5 }}
onClick={(e: any) => pushEvents()}
>
Send Events
</Button>
</AnimateButton>
</Box>
}
</>
};

Expand Down

0 comments on commit 3a07f1f

Please sign in to comment.