Skip to content

Commit

Permalink
FIX: remove debug logs
Browse files Browse the repository at this point in the history
  • Loading branch information
silvareal committed Jan 3, 2023
1 parent 61a715d commit f18df72
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 19 deletions.
6 changes: 2 additions & 4 deletions web/src/hooks/useSocket.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ export default function useSocket(options = {}) {
process.env.NODE_ENV === "production" ? wssMetricsURL : wssMetricsBaseURL;

const { sendJsonMessage, readyState } = useWebSocket(socketUrl, {
onOpen: () => console.log("WebSocket connection opened."),
onClose: () => console.log("WebSocket connection closed."),
onOpen: () => console.info("WebSocket connection opened."),
onClose: () => console.info("WebSocket connection closed."),
shouldReconnect: (closeEvent) => true,
onMessage: (event: WebSocketEventMap["message"]) => {
const newMessage: ServerResponseType = JSON.parse(event.data);
Expand All @@ -66,8 +66,6 @@ export default function useSocket(options = {}) {
}
}, [jsonMessage]);

console.log("servers", servers);

const connectionStatus: string = {
[ReadyState.CONNECTING]: "Connecting",
[ReadyState.OPEN]: "Open",
Expand Down
1 change: 0 additions & 1 deletion web/src/server/ServerDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ export default function ServerDetail({
setJsonMessage: (arg0: any) => void;
}) {
const { host } = useParams<{ host: string }>();
console.log("servicesGroupedByName", servicesGroupedByName);

const [tabIndex, setTabIndex] = React.useState<number>(0);

Expand Down
26 changes: 12 additions & 14 deletions web/src/server/ServerDetailServicesTabPanelMemory.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import styled from '@emotion/styled';
import React from 'react';
import styled from "@emotion/styled";
import React from "react";
import {
BarChart,
Bar,
Expand All @@ -8,22 +8,21 @@ import {
CartesianGrid,
Tooltip,
Legend,
} from 'recharts';
} from "recharts";
import {
MemoryData,
ServerResponseType,
ServerServiceNameType,
} from './ServerType';
} from "./ServerType";

interface ServerDetailServicesTabPanelMemoryType {
serverName: ServerServiceNameType;
serverData: ServerResponseType<MemoryData>;
}


const Div = styled.div`
margin-top:2rem;
`
margin-top: 2rem;
`;

export default function ServerDetailServicesTabPanelMemory(
props: ServerDetailServicesTabPanelMemoryType
Expand All @@ -33,22 +32,21 @@ export default function ServerDetailServicesTabPanelMemory(
Message: { Data },
},
} = props;
console.log({ Data });
return (
<Div>
{
/* <ServicesTabPanel /> */
// <ResponsiveContainer width='100%' height='100%'>
<BarChart width={900} height={500} data={[Data]}>
<CartesianGrid strokeDasharray='3 3' />
<XAxis dataKey='FileSystem' />
<CartesianGrid strokeDasharray="3 3" />
<XAxis dataKey="FileSystem" />
<YAxis />
<Tooltip />
<Legend />
<Bar dataKey='MemFree' fill='#003f5c' />
<Bar dataKey='MemTotal' fill='#58508d' />
<Bar dataKey='SwapFree' fill='#bc5090' />
<Bar dataKey='SwapTotal' fill='#ff6361' />
<Bar dataKey="MemFree" fill="#003f5c" />
<Bar dataKey="MemTotal" fill="#58508d" />
<Bar dataKey="SwapFree" fill="#bc5090" />
<Bar dataKey="SwapTotal" fill="#ff6361" />
</BarChart>
// </ResponsiveContainer>
}
Expand Down

0 comments on commit f18df72

Please sign in to comment.