|
|
@ -41,14 +41,6 @@ export function ConfigureIRM() { |
|
|
|
const styles = useStyles2(getStyles); |
|
|
|
const styles = useStyles2(getStyles); |
|
|
|
const history = useHistory(); |
|
|
|
const history = useHistory(); |
|
|
|
|
|
|
|
|
|
|
|
// track only once when the component is mounted
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
|
|
|
|
trackIrmConfigurationTrackerEvent(IRMInteractionNames.ViewIRMMainPage, { |
|
|
|
|
|
|
|
essentialStepsDone: 0, |
|
|
|
|
|
|
|
essentialStepsToDo: 0, |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}, []); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// get all the configuration data
|
|
|
|
// get all the configuration data
|
|
|
|
const dataSourceConfigurationData = useGetDataSourceConfiguration(); |
|
|
|
const dataSourceConfigurationData = useGetDataSourceConfiguration(); |
|
|
|
const essentialsConfigurationData = useGetEssentialsConfiguration(); |
|
|
|
const essentialsConfigurationData = useGetEssentialsConfiguration(); |
|
|
@ -57,9 +49,23 @@ export function ConfigureIRM() { |
|
|
|
essentialsConfigurationData, |
|
|
|
essentialsConfigurationData, |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// track only once when the component is mounted
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
|
|
|
|
trackIrmConfigurationTrackerEvent(IRMInteractionNames.ViewIRMMainPage, { |
|
|
|
|
|
|
|
essentialStepsDone: 0, |
|
|
|
|
|
|
|
essentialStepsToDo: 0, |
|
|
|
|
|
|
|
dataSourceCompatibleWithAlerting: dataSourceConfigurationData.dataSourceCompatibleWithAlerting, |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}, [dataSourceConfigurationData.dataSourceCompatibleWithAlerting]); |
|
|
|
|
|
|
|
|
|
|
|
const [essentialsOpen, setEssentialsOpen] = useState(false); |
|
|
|
const [essentialsOpen, setEssentialsOpen] = useState(false); |
|
|
|
|
|
|
|
|
|
|
|
const handleActionClick = (configID: number, isDone?: boolean) => { |
|
|
|
const handleActionClick = (configID: number, isDone?: boolean) => { |
|
|
|
|
|
|
|
trackIrmConfigurationTrackerEvent(IRMInteractionNames.ClickDataSources, { |
|
|
|
|
|
|
|
essentialStepsDone: essentialsConfigurationData.stepsDone, |
|
|
|
|
|
|
|
essentialStepsToDo: essentialsConfigurationData.totalStepsToDo, |
|
|
|
|
|
|
|
dataSourceCompatibleWithAlerting: dataSourceConfigurationData.dataSourceCompatibleWithAlerting, |
|
|
|
|
|
|
|
}); |
|
|
|
switch (configID) { |
|
|
|
switch (configID) { |
|
|
|
case ConfigurationStepsEnum.CONNECT_DATASOURCE: |
|
|
|
case ConfigurationStepsEnum.CONNECT_DATASOURCE: |
|
|
|
if (isDone) { |
|
|
|
if (isDone) { |
|
|
@ -73,6 +79,7 @@ export function ConfigureIRM() { |
|
|
|
trackIrmConfigurationTrackerEvent(IRMInteractionNames.OpenEssentials, { |
|
|
|
trackIrmConfigurationTrackerEvent(IRMInteractionNames.OpenEssentials, { |
|
|
|
essentialStepsDone: essentialsConfigurationData.stepsDone, |
|
|
|
essentialStepsDone: essentialsConfigurationData.stepsDone, |
|
|
|
essentialStepsToDo: essentialsConfigurationData.totalStepsToDo, |
|
|
|
essentialStepsToDo: essentialsConfigurationData.totalStepsToDo, |
|
|
|
|
|
|
|
dataSourceCompatibleWithAlerting: dataSourceConfigurationData.dataSourceCompatibleWithAlerting, |
|
|
|
}); |
|
|
|
}); |
|
|
|
break; |
|
|
|
break; |
|
|
|
default: |
|
|
|
default: |
|
|
@ -85,6 +92,7 @@ export function ConfigureIRM() { |
|
|
|
trackIrmConfigurationTrackerEvent(IRMInteractionNames.CloseEssentials, { |
|
|
|
trackIrmConfigurationTrackerEvent(IRMInteractionNames.CloseEssentials, { |
|
|
|
essentialStepsDone: essentialsConfigurationData.stepsDone, |
|
|
|
essentialStepsDone: essentialsConfigurationData.stepsDone, |
|
|
|
essentialStepsToDo: essentialsConfigurationData.totalStepsToDo, |
|
|
|
essentialStepsToDo: essentialsConfigurationData.totalStepsToDo, |
|
|
|
|
|
|
|
dataSourceCompatibleWithAlerting: dataSourceConfigurationData.dataSourceCompatibleWithAlerting, |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|