responsive design
parent
50d8e225e2
commit
20afb9d415
|
@ -11,8 +11,6 @@ export default function LogCard({
|
||||||
logApiAddress = Constants.LOG_API_ADDRESS,
|
logApiAddress = Constants.LOG_API_ADDRESS,
|
||||||
}) {
|
}) {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
// const [checkboxAutoScrollChecked, setCheckboxAutoScrollChecked] =
|
|
||||||
// useState(true);
|
|
||||||
const [checkboxInfoChecked, setCheckboxInfoChecked] = useState(true);
|
const [checkboxInfoChecked, setCheckboxInfoChecked] = useState(true);
|
||||||
const [checkboxWarningChecked, setCheckboxWarningChecked] = useState(true);
|
const [checkboxWarningChecked, setCheckboxWarningChecked] = useState(true);
|
||||||
const [checkboxErrorChecked, setCheckboxErrorChecked] = useState(true);
|
const [checkboxErrorChecked, setCheckboxErrorChecked] = useState(true);
|
||||||
|
@ -116,37 +114,6 @@ export default function LogCard({
|
||||||
}
|
}
|
||||||
}, [type, selectedDate]);
|
}, [type, selectedDate]);
|
||||||
|
|
||||||
/*
|
|
||||||
useEffect(() => {
|
|
||||||
// scroll to bottom
|
|
||||||
if (
|
|
||||||
checkboxAutoScrollChecked &&
|
|
||||||
virtuosoRef.current !== undefined &&
|
|
||||||
virtuosoRef.current.scrollToIndex !== null
|
|
||||||
) {
|
|
||||||
console.log("scrolltobottom", logs.length);
|
|
||||||
/*
|
|
||||||
virtuosoRef.current.scrollToIndex({
|
|
||||||
index: logs.length - 1,
|
|
||||||
align: "start",
|
|
||||||
behavior: "auto",
|
|
||||||
});*/ /*
|
|
||||||
}
|
|
||||||
}, [logs]); */
|
|
||||||
|
|
||||||
/*
|
|
||||||
<Col>
|
|
||||||
<Checkbox
|
|
||||||
checked={checkboxAutoScrollChecked}
|
|
||||||
onChange={(e) =>
|
|
||||||
setCheckboxAutoScrollChecked(e.target.checked)
|
|
||||||
}
|
|
||||||
>
|
|
||||||
{t("logCard.card.checkbox.autoScroll")}
|
|
||||||
</Checkbox>
|
|
||||||
</Col>
|
|
||||||
*/
|
|
||||||
|
|
||||||
const filteredLogs = logs.filter((log) => {
|
const filteredLogs = logs.filter((log) => {
|
||||||
const logType = log.charAt(0);
|
const logType = log.charAt(0);
|
||||||
|
|
||||||
|
@ -166,11 +133,11 @@ export default function LogCard({
|
||||||
<Card
|
<Card
|
||||||
title={
|
title={
|
||||||
<Row>
|
<Row>
|
||||||
<Col xs={24} md={{ span: 10, offset: 0 }}>
|
<Col xs={24} xl={12}>
|
||||||
{title}
|
{title}
|
||||||
</Col>
|
</Col>
|
||||||
|
|
||||||
<Col xs={24} xl={{ span: 10, offset: 4 }}>
|
<Col xs={24} xl={12}>
|
||||||
<Row xs={24} justify="end" align="middle">
|
<Row xs={24} justify="end" align="middle">
|
||||||
<Col>
|
<Col>
|
||||||
<Checkbox
|
<Checkbox
|
||||||
|
|
|
@ -1,4 +1,13 @@
|
||||||
import { Button, Card, Popconfirm, Space, Table, Typography } from "antd";
|
import {
|
||||||
|
Button,
|
||||||
|
Card,
|
||||||
|
Col,
|
||||||
|
Popconfirm,
|
||||||
|
Row,
|
||||||
|
Space,
|
||||||
|
Table,
|
||||||
|
Typography,
|
||||||
|
} from "antd";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { useWebSocketContext } from "../../../Contexts/WebSocketContext";
|
import { useWebSocketContext } from "../../../Contexts/WebSocketContext";
|
||||||
import { SentMessagesCommands } from "../../../Handlers/WebSocketMessageHandler";
|
import { SentMessagesCommands } from "../../../Handlers/WebSocketMessageHandler";
|
||||||
|
@ -149,31 +158,35 @@ function LogManagerServersTable({ t, webSocketContext, appContext }) {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div
|
<Row style={{ marginTop: AppStyle.app.margin }}>
|
||||||
style={{
|
<Col xs={24} md={12}>
|
||||||
display: "flex",
|
|
||||||
justifyContent: "space-between",
|
|
||||||
marginTop: AppStyle.app.margin,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Typography.Title level={4}>
|
<Typography.Title level={4}>
|
||||||
{t("adminArea.manage.logManagers.header")} (
|
{t("adminArea.manage.logManagers.header")} (
|
||||||
{consolesContext.connectedLogManagerServers.length})
|
{consolesContext.connectedLogManagerServers.length})
|
||||||
</Typography.Title>
|
</Typography.Title>
|
||||||
|
</Col>
|
||||||
|
|
||||||
|
<Col
|
||||||
|
xs={24}
|
||||||
|
md={{ span: 10, offset: 2 }}
|
||||||
|
xl={{ span: 8, offset: 4 }}
|
||||||
|
xxl={{ span: 6, offset: 6 }}
|
||||||
|
>
|
||||||
{hasPermission(
|
{hasPermission(
|
||||||
appContext.userPermissions,
|
appContext.userPermissions,
|
||||||
Constants.PERMISSIONS.ADMIN_AREA.MANAGE
|
Constants.PERMISSIONS.ADMIN_AREA.MANAGE
|
||||||
.ADD_LOG_MANAGER_SERVER_CONNECTION
|
.ADD_LOG_MANAGER_SERVER_CONNECTION
|
||||||
) && (
|
) && (
|
||||||
<Button
|
<Button
|
||||||
|
block
|
||||||
icon={<PlusOutlined />}
|
icon={<PlusOutlined />}
|
||||||
onClick={() => setIsAddLogManagerServerConnectionModalOpen(true)}
|
onClick={() => setIsAddLogManagerServerConnectionModalOpen(true)}
|
||||||
>
|
>
|
||||||
{t("adminArea.manage.logManagers.addLogManagerServerConnection")}
|
{t("adminArea.manage.logManagers.addLogManagerServerConnection")}
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
</div>
|
</Col>
|
||||||
|
</Row>
|
||||||
|
|
||||||
<Table
|
<Table
|
||||||
scroll={{ x: "max-content" }}
|
scroll={{ x: "max-content" }}
|
||||||
|
|
|
@ -336,8 +336,8 @@ export default function GroupTaskTableList({
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<Table
|
<Table
|
||||||
style={{ marginTop: AppStyle.app.margin }}
|
|
||||||
scroll={{ x: "max-content" }}
|
scroll={{ x: "max-content" }}
|
||||||
|
style={{ marginTop: AppStyle.app.margin }}
|
||||||
columns={getTableColumns()}
|
columns={getTableColumns()}
|
||||||
dataSource={getTableItems()}
|
dataSource={getTableItems()}
|
||||||
pagination={false}
|
pagination={false}
|
||||||
|
|
Loading…
Reference in New Issue