Skip to content

Commit

Permalink
Remove live logs support from UI (#3451)
Browse files Browse the repository at this point in the history
  • Loading branch information
reivaj05 authored Oct 9, 2024
1 parent 78aceb2 commit 0192084
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 36 deletions.
26 changes: 2 additions & 24 deletions web-app/src/screens/Console/Support/CallHome.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ const CallHome = () => {
const [showConfirmation, setShowConfirmation] = useState<boolean>(false);
const [diagEnabled, setDiagEnabled] = useState<boolean>(false);
const [oDiagEnabled, setODiagEnabled] = useState<boolean>(false);
const [oLogsEnabled, setOLogsEnabled] = useState<boolean>(false);
const [logsEnabled, setLogsEnabled] = useState<boolean>(false);
const [disableMode, setDisableMode] = useState<boolean>(false);

const clusterRegistered = registeredCluster();
Expand All @@ -59,10 +57,8 @@ const CallHome = () => {
setLoading(false);

setDiagEnabled(!!res.diagnosticsStatus);
setLogsEnabled(!!res.logsStatus);

setODiagEnabled(!!res.diagnosticsStatus);
setOLogsEnabled(!!res.logsStatus);
})
.catch((err: ErrorResponseHandler) => {
setLoading(false);
Expand Down Expand Up @@ -94,10 +90,7 @@ const CallHome = () => {

let mainVariant: "regular" | "callAction" = "regular";

if (
clusterRegistered &&
(diagEnabled !== oDiagEnabled || logsEnabled !== oLogsEnabled)
) {
if (clusterRegistered && diagEnabled !== oDiagEnabled) {
mainVariant = "callAction";
}

Expand All @@ -112,7 +105,6 @@ const CallHome = () => {
<CallHomeConfirmation
onClose={callHomeClose}
open={showConfirmation}
logsStatus={logsEnabled}
diagStatus={diagEnabled}
disable={disableMode}
/>
Expand Down Expand Up @@ -178,20 +170,6 @@ const CallHome = () => {
"Daily Health Report enables you to proactively identify potential issues in your deployment before they escalate."
}
/>
<Switch
value="enableLogs"
id="enableLogs"
name="enableLogs"
checked={logsEnabled}
onChange={(event: React.ChangeEvent<HTMLInputElement>) => {
setLogsEnabled(event.target.checked);
}}
label={"Live Error Logs"}
disabled={!clusterRegistered}
description={
"Live Error Logs will enable MinIO's support team and automatic diagnostics system to catch failures early."
}
/>
<Box
sx={{
display: "flex",
Expand All @@ -201,7 +179,7 @@ const CallHome = () => {
gap: "0px 10px",
}}
>
{(oDiagEnabled || oLogsEnabled) && (
{oDiagEnabled && (
<Button
id={"callhome-action"}
variant={"secondary"}
Expand Down
13 changes: 1 addition & 12 deletions web-app/src/screens/Console/Support/CallHomeConfirmation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,12 @@ interface ICallHomeConfirmation {
onClose: (refresh: boolean) => any;
open: boolean;
diagStatus: boolean;
logsStatus: boolean;
disable?: boolean;
}

const CallHomeConfirmation = ({
onClose,
diagStatus,
logsStatus,
open,
disable = false,
}: ICallHomeConfirmation) => {
Expand All @@ -48,7 +46,7 @@ const CallHomeConfirmation = ({
api
.invoke("PUT", `/api/v1/support/callhome`, {
diagState: disable ? false : diagStatus,
logsState: disable ? false : logsStatus,
logsState: false,
})
.then((res: ICallHomeResponse) => {
dispatch(setSnackBarMessage("Configuration saved successfully"));
Expand Down Expand Up @@ -140,15 +138,6 @@ const CallHomeConfirmation = ({
Diagnostics Information to SUBNET
</span>
</Grid>
<Grid item sx={{ display: "flex", alignItems: "center", gap: 10 }}>
<CircleIcon
style={{ fill: logsStatus ? "#4CCB92" : "#C83B51", width: 20 }}
/>
<span>
<strong>{logsStatus ? "Enable" : "Disable"}</strong> - Send Logs
Information to SUBNET
</span>
</Grid>
</Grid>
<Grid item xs={12} sx={{ margin: "15px 0" }}>
Please Acknowledge that the information provided will only be
Expand Down

0 comments on commit 0192084

Please sign in to comment.