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 [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();
|
||||
@@ -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);
|
||||
@@ -94,10 +90,7 @@ const CallHome = () => {
|
||||
|
||||
let mainVariant: "regular" | "callAction" = "regular";
|
||||
|
||||
if (
|
||||
clusterRegistered &&
|
||||
(diagEnabled !== oDiagEnabled || logsEnabled !== oLogsEnabled)
|
||||
) {
|
||||
if (clusterRegistered && diagEnabled !== oDiagEnabled) {
|
||||
mainVariant = "callAction";
|
||||
}
|
||||
|
||||
@@ -112,7 +105,6 @@ const CallHome = () => {
|
||||
<CallHomeConfirmation
|
||||
onClose={callHomeClose}
|
||||
open={showConfirmation}
|
||||
logsStatus={logsEnabled}
|
||||
diagStatus={diagEnabled}
|
||||
disable={disableMode}
|
||||
/>
|
||||
@@ -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",
|
||||
@@ -201,7 +179,7 @@ const CallHome = () => {
|
||||
gap: "0px 10px",
|
||||
}}
|
||||
>
|
||||
{(oDiagEnabled || oLogsEnabled) && (
|
||||
{oDiagEnabled && (
|
||||
<Button
|
||||
id={"callhome-action"}
|
||||
variant={"secondary"}
|
||||
|
||||
@@ -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) => {
|
||||
@@ -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"));
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user