Remove live logs support from UI (#3451)
This commit is contained in:
@@ -45,8 +45,6 @@ const CallHome = () => {
|
|||||||
const [showConfirmation, setShowConfirmation] = useState<boolean>(false);
|
const [showConfirmation, setShowConfirmation] = useState<boolean>(false);
|
||||||
const [diagEnabled, setDiagEnabled] = useState<boolean>(false);
|
const [diagEnabled, setDiagEnabled] = useState<boolean>(false);
|
||||||
const [oDiagEnabled, setODiagEnabled] = 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 [disableMode, setDisableMode] = useState<boolean>(false);
|
||||||
|
|
||||||
const clusterRegistered = registeredCluster();
|
const clusterRegistered = registeredCluster();
|
||||||
@@ -59,10 +57,8 @@ const CallHome = () => {
|
|||||||
setLoading(false);
|
setLoading(false);
|
||||||
|
|
||||||
setDiagEnabled(!!res.diagnosticsStatus);
|
setDiagEnabled(!!res.diagnosticsStatus);
|
||||||
setLogsEnabled(!!res.logsStatus);
|
|
||||||
|
|
||||||
setODiagEnabled(!!res.diagnosticsStatus);
|
setODiagEnabled(!!res.diagnosticsStatus);
|
||||||
setOLogsEnabled(!!res.logsStatus);
|
|
||||||
})
|
})
|
||||||
.catch((err: ErrorResponseHandler) => {
|
.catch((err: ErrorResponseHandler) => {
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
@@ -94,10 +90,7 @@ const CallHome = () => {
|
|||||||
|
|
||||||
let mainVariant: "regular" | "callAction" = "regular";
|
let mainVariant: "regular" | "callAction" = "regular";
|
||||||
|
|
||||||
if (
|
if (clusterRegistered && diagEnabled !== oDiagEnabled) {
|
||||||
clusterRegistered &&
|
|
||||||
(diagEnabled !== oDiagEnabled || logsEnabled !== oLogsEnabled)
|
|
||||||
) {
|
|
||||||
mainVariant = "callAction";
|
mainVariant = "callAction";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -112,7 +105,6 @@ const CallHome = () => {
|
|||||||
<CallHomeConfirmation
|
<CallHomeConfirmation
|
||||||
onClose={callHomeClose}
|
onClose={callHomeClose}
|
||||||
open={showConfirmation}
|
open={showConfirmation}
|
||||||
logsStatus={logsEnabled}
|
|
||||||
diagStatus={diagEnabled}
|
diagStatus={diagEnabled}
|
||||||
disable={disableMode}
|
disable={disableMode}
|
||||||
/>
|
/>
|
||||||
@@ -178,20 +170,6 @@ const CallHome = () => {
|
|||||||
"Daily Health Report enables you to proactively identify potential issues in your deployment before they escalate."
|
"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
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
display: "flex",
|
display: "flex",
|
||||||
@@ -201,7 +179,7 @@ const CallHome = () => {
|
|||||||
gap: "0px 10px",
|
gap: "0px 10px",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{(oDiagEnabled || oLogsEnabled) && (
|
{oDiagEnabled && (
|
||||||
<Button
|
<Button
|
||||||
id={"callhome-action"}
|
id={"callhome-action"}
|
||||||
variant={"secondary"}
|
variant={"secondary"}
|
||||||
|
|||||||
@@ -28,14 +28,12 @@ interface ICallHomeConfirmation {
|
|||||||
onClose: (refresh: boolean) => any;
|
onClose: (refresh: boolean) => any;
|
||||||
open: boolean;
|
open: boolean;
|
||||||
diagStatus: boolean;
|
diagStatus: boolean;
|
||||||
logsStatus: boolean;
|
|
||||||
disable?: boolean;
|
disable?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
const CallHomeConfirmation = ({
|
const CallHomeConfirmation = ({
|
||||||
onClose,
|
onClose,
|
||||||
diagStatus,
|
diagStatus,
|
||||||
logsStatus,
|
|
||||||
open,
|
open,
|
||||||
disable = false,
|
disable = false,
|
||||||
}: ICallHomeConfirmation) => {
|
}: ICallHomeConfirmation) => {
|
||||||
@@ -48,7 +46,7 @@ const CallHomeConfirmation = ({
|
|||||||
api
|
api
|
||||||
.invoke("PUT", `/api/v1/support/callhome`, {
|
.invoke("PUT", `/api/v1/support/callhome`, {
|
||||||
diagState: disable ? false : diagStatus,
|
diagState: disable ? false : diagStatus,
|
||||||
logsState: disable ? false : logsStatus,
|
logsState: false,
|
||||||
})
|
})
|
||||||
.then((res: ICallHomeResponse) => {
|
.then((res: ICallHomeResponse) => {
|
||||||
dispatch(setSnackBarMessage("Configuration saved successfully"));
|
dispatch(setSnackBarMessage("Configuration saved successfully"));
|
||||||
@@ -140,15 +138,6 @@ const CallHomeConfirmation = ({
|
|||||||
Diagnostics Information to SUBNET
|
Diagnostics Information to SUBNET
|
||||||
</span>
|
</span>
|
||||||
</Grid>
|
</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>
|
||||||
<Grid item xs={12} sx={{ margin: "15px 0" }}>
|
<Grid item xs={12} sx={{ margin: "15px 0" }}>
|
||||||
Please Acknowledge that the information provided will only be
|
Please Acknowledge that the information provided will only be
|
||||||
|
|||||||
Reference in New Issue
Block a user