mirror of
https://github.com/DI0IK/homepage-plus.git
synced 2025-07-19 02:59:50 +00:00
mini-non-chart charts
This commit is contained in:
parent
c2058f353d
commit
17b0f635d8
12 changed files with 437 additions and 245 deletions
|
@ -19,6 +19,8 @@ const statusMap = {
|
|||
|
||||
export default function Component({ service }) {
|
||||
const { t } = useTranslation();
|
||||
const { widget } = service;
|
||||
const { chart } = widget;
|
||||
|
||||
const { data, error } = useWidgetAPI(service.widget, 'processlist', {
|
||||
refreshInterval: 1000,
|
||||
|
@ -32,10 +34,10 @@ export default function Component({ service }) {
|
|||
return <Container><Block position="bottom-3 left-3">-</Block></Container>;
|
||||
}
|
||||
|
||||
data.splice(5);
|
||||
data.splice(chart ? 5 : 1);
|
||||
|
||||
return (
|
||||
<Container>
|
||||
<Container chart={chart}>
|
||||
<Block position="top-4 right-3 left-3">
|
||||
<div className="flex items-center text-xs">
|
||||
<div className="grow" />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue