Skip to content

Commit

Permalink
clean up + CHANGELOG.md update
Browse files Browse the repository at this point in the history
  • Loading branch information
archeoss committed Jan 31, 2024
1 parent 3a38d33 commit 1616651
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 10 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ Bob Management GUI changelog
- Login Page, backend (#16)
- Login Page, frontend (#17)
- Home page, backend (#18)
- Home page, frontend (#22)
3 changes: 0 additions & 3 deletions frontend/src/components/clusterRpsChart/clusterRpsChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import React from 'react';
import { Line } from 'react-chartjs-2';
ChartJS.register(CategoryScale, LinearScale, PointElement, LineElement, Title, Tooltip, Legend);

//FIXME: Изменить цвет шрифта, осей
const options = {
maintainAspectRatio: false,
responsive: true,
Expand All @@ -29,7 +28,6 @@ const options = {
usePointStyle: true,
},
},
//NOTE: Отстутсвует паддинг у тайтла при алайне слева
title: {
display: true,
text: 'Общий RPS кластера',
Expand All @@ -40,7 +38,6 @@ const options = {
},
},

//FIXME: не работает
scales: {
yAxes: [
{
Expand Down
1 change: 0 additions & 1 deletion frontend/src/components/crudChart/crudChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ const options = {
usePointStyle: true,
},
},
//NOTE: Отстутсвует паддинг у тайтла при алайне слева
title: {
display: true,
text: 'RPS breakdown',
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/dashboard/Dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import { useStore } from '@nanostores/react';
import axios from 'axios';
import React, { useEffect, useMemo, useState } from 'react';

import FetchingBackdrop from '../backdrop/backdrop.tsx';
import ClusterRpsChart from '../clusterRpsChart/clusterRpsChart.tsx';
import CrudChart from '../crudChart/crudChart.tsx';
import DiskPie from '../diskPie/diskPie.tsx';
import DiskBreakdown from '../diskState/diskState.tsx';
import TotalNodes from '../totalNodes/totalNodes.tsx';
import FetchingBackdrop from '@components/backdrop/backdrop.tsx';

interface DashboardState {
diskSpace: SpaceInfo;
Expand Down Expand Up @@ -72,7 +72,7 @@ const Dashboard = () => {
]);

/// Don't think we need to preserve time state?..
// eslint-disable-next-line react-hooks/exhaustive-deps

// time += Context.get().refreshTime * 60;

dashboard.timeList.push(new Date().toLocaleTimeString());
Expand Down
1 change: 0 additions & 1 deletion frontend/src/components/diskPie/diskPie.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ function formatBytes(bytes: number, decimals = 0) {
return `${parseFloat((bytes / Math.pow(k, i)).toFixed(dm))}${sizes[i]}`;
}

// const DiskPie = ({ diskSpace: { used_disk: usedSpace, total_disk: totalSpace } }: { diskSpace: SpaceInfo }) => {
const DiskPie = ({ spaceInfo: { used_disk: usedSpace, total_disk: totalSpace } }: { spaceInfo: SpaceInfo }) => {
const textCenter = {
id: 'textCenter',
Expand Down
4 changes: 1 addition & 3 deletions frontend/src/components/navbar/Navbar.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { cookieAuthId, eraseCookie, getCookie } from '@appTypes/common.ts';
import { Context, refreshTimes } from '@appTypes/context.ts';
// import type { RefreshTimes } from '../../env.d.ts';
import { isLocation, type NavLocation } from '@appTypes/navigation.ts';
import defaultTheme from '@layouts/DefaultTheme.ts';
import { ExitToApp } from '@mui/icons-material';
Expand All @@ -21,15 +20,14 @@ import {
} from '@mui/material';
import { ThemeProvider } from '@mui/material/styles';
import { useStore } from '@nanostores/react';
// import type { locations } from '@appTypes/navbar.d.ts';
import BrandMark from 'public/brandmark.svg';
import React, { useEffect, useState } from 'react';

const Navbar = ({ logoutRedirectTo }: { logoutRedirectTo: string }) => {
const context = useStore(Context);
const [tab, setTab] = useState('/dashboard' as NavLocation);
const [refresh, setRefresh] = useState(context.refreshTime);
// FIXME: button's render is not on the same state as the context
// FIXME: button's render is not on the same state on page refresh as the context (always on)
// I hate react....
const [switchButton, setSwitchButton] = useState(context.enabled);

Expand Down

0 comments on commit 1616651

Please sign in to comment.