Skip to content

Commit

Permalink
fix(ui): Changes for Alert editor dropdown in header
Browse files Browse the repository at this point in the history
  • Loading branch information
harshilvelotio committed Jan 16, 2025
1 parent 5f16229 commit 0d3d7ce
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 52 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import { FormHelperText, Grid, TextField } from "@material-ui/core";
import React, { useState } from "react";
import { useTranslation } from "react-i18next";
import { NavigateAlertCreationFlowsDropdown } from "../../alert-wizard-v3/navigate-alert-creation-flows-dropdown/navigate-alert-creation-flows-dropdown-v2";
import { InputSectionV2 } from "../../form-basics/input-section-v2/input-section-v2.component";
import { AlertDetailsProps } from "./alert-details.interfaces";
import { AlertFrequency } from "./alert-frequency-v2/alert-frequency.component";
Expand Down Expand Up @@ -48,13 +47,6 @@ function AlertDetails({

return (
<Grid container>
<Grid item xs={12}>
<Grid container alignContent="center" justifyContent="flex-end">
<Grid item>
<NavigateAlertCreationFlowsDropdown />
</Grid>
</Grid>
</Grid>
<Grid item xs={4}>
<InputSectionV2
inputComponent={
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import { THIRDEYE_DOC_LINK } from "../../../utils/constants/constants.util";
import { validateJSON } from "../../../utils/validation/validation.util";
import { HelpDrawerV1 } from "../../help-drawer-v1/help-drawer-v1.component";
import { AlertJsonProps } from "./alert-json.interfaces";
import { NavigateAlertCreationFlowsDropdown } from "../../alert-wizard-v3/navigate-alert-creation-flows-dropdown/navigate-alert-creation-flows-dropdown-v2";

export const AlertJson: FunctionComponent<AlertJsonProps> = ({
alert,
Expand Down Expand Up @@ -64,13 +63,6 @@ export const AlertJson: FunctionComponent<AlertJsonProps> = ({

return (
<Grid container>
<Grid item xs={12}>
<Grid container alignContent="center" justifyContent="flex-end">
<Grid item>
<NavigateAlertCreationFlowsDropdown />
</Grid>
</Grid>
</Grid>
<Grid item xs={12}>
<Grid
container
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ import { AlertCreatedGuidedPageOutletContext } from "../../alerts-create-guided-
import { SETUP_DETAILS_TEST_IDS } from "../../alerts-create-guided-page/setup-details/setup-details-page.interface";
import { easyAlertStyles } from "./alerts-create-easy-page.styles";
import { generateInputFieldConfigsForAlertTemplate } from "../../../components/alert-wizard-v3/threshold-setup/threshold-setup.utils";
import { NavigateAlertCreationFlowsDropdown } from "../../../components/alert-wizard-v3/navigate-alert-creation-flows-dropdown/navigate-alert-creation-flows-dropdown-v2";

const PROPERTIES_TO_COPY = [
"dataSource",
Expand Down Expand Up @@ -978,17 +977,6 @@ export const AlertsCreateEasyPage: FunctionComponent = () => {
<Grid item xs={12}>
<PageContentsCardV1 className={classes.container}>
<Grid container>
<Grid item xs={12}>
<Grid
container
alignContent="center"
justifyContent="flex-end"
>
<Grid item>
<NavigateAlertCreationFlowsDropdown />
</Grid>
</Grid>
</Grid>
<Grid item xs={12}>
<Box marginBottom={2}>
<Grid
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import React, { FunctionComponent } from "react";
import { useTranslation } from "react-i18next";
import { useNavigate } from "react-router-dom";
import { createNewStartingAlert } from "../../components/alert-wizard-v2/alert-template/alert-template.utils";
import { NavigateAlertCreationFlowsDropdown } from "../../components/alert-wizard-v3/navigate-alert-creation-flows-dropdown/navigate-alert-creation-flows-dropdown-v2";
import { alertsBasicHelpCards } from "../../components/help-drawer-v1/help-drawer-card-contents.utils";
import { HelpDrawerV1 } from "../../components/help-drawer-v1/help-drawer-v1.component";
import { PageHeader } from "../../components/page-header/page-header.component";
Expand Down Expand Up @@ -89,30 +90,38 @@ export const AlertsEditCreateBasePageComponent: FunctionComponent<AlertsEditCrea
<PageV1>
<PageHeader
customActions={
<PageHeaderActionsV1>
<HelpDrawerV1
cards={alertsBasicHelpCards}
title={`${t("label.need-help")}?`}
trigger={(handleOpen) => (
<Button
color="primary"
size="small"
variant="outlined"
onClick={handleOpen}
>
<Box component="span" mr={1}>
{t("label.need-help")}
</Box>
<Box component="span" display="flex">
<Icon
fontSize={24}
icon="mdi:question-mark-circle-outline"
/>
</Box>
</Button>
)}
/>
</PageHeaderActionsV1>
pageTitle === t("label.advanced-alert") ||
pageTitle === t("label.json-alert-setup") ? (
<NavigateAlertCreationFlowsDropdown />
) : (
<PageHeaderActionsV1>
<HelpDrawerV1
cards={alertsBasicHelpCards}
title={`${t("label.need-help")}?`}
trigger={(handleOpen) => (
<Button
color="primary"
size="small"
variant="outlined"
onClick={handleOpen}
>
<Box component="span" mr={1}>
{t("label.need-help")}
</Box>
<Box
component="span"
display="flex"
>
<Icon
fontSize={24}
icon="mdi:question-mark-circle-outline"
/>
</Box>
</Button>
)}
/>
</PageHeaderActionsV1>
)
}
>
<PageHeaderTextV1>{pageTitle}</PageHeaderTextV1>
Expand Down

0 comments on commit 0d3d7ce

Please sign in to comment.