fix(striker-ui): rename PanelHeader->InnerPanelHeader

main
Tsu-ba-me 3 years ago
parent 3dff61b966
commit d0b36e9f99
  1. 6
      striker-ui/components/FileSystem/FileSystems.tsx
  2. 6
      striker-ui/components/Hosts/AnvilHost.tsx
  3. 10
      striker-ui/components/Panels/InnerPanelHeader.tsx
  4. 4
      striker-ui/components/Panels/index.tsx
  5. 6
      striker-ui/components/Resource/ResourceVolumes.tsx
  6. 6
      striker-ui/components/SharedStorage/SharedStorage.tsx

@ -3,7 +3,7 @@ import { useContext } from 'react';
import { Box } from '@mui/material';
import { styled } from '@mui/material/styles';
import { BodyText, HeaderText } from '../Text';
import { Panel, InnerPanel, PanelHeader } from '../Panels';
import { Panel, InnerPanel, InnerPanelHeader } from '../Panels';
import SharedStorageHost from './FileSystemsHost';
import PeriodicFetch from '../../lib/fetchers/periodicFetch';
import { AnvilContext } from '../AnvilContext';
@ -48,7 +48,7 @@ const SharedStorage = ({ anvil }: { anvil: AnvilListItem[] }): JSX.Element => {
data.file_systems.map(
(fs: AnvilFileSystem): JSX.Element => (
<InnerPanel key={fs.mount_point}>
<PanelHeader>
<InnerPanelHeader>
<Box
display="flex"
width="100%"
@ -58,7 +58,7 @@ const SharedStorage = ({ anvil }: { anvil: AnvilListItem[] }): JSX.Element => {
<BodyText text={fs.mount_point} />
</Box>
</Box>
</PanelHeader>
</InnerPanelHeader>
{fs?.hosts &&
fs.hosts.map(
(

@ -1,6 +1,6 @@
import { Box, Switch } from '@mui/material';
import { styled } from '@mui/material/styles';
import { InnerPanel, PanelHeader } from '../Panels';
import { InnerPanel, InnerPanelHeader } from '../Panels';
import { ProgressBar } from '../Bars';
import { BodyText } from '../Text';
import Decorator, { Colours } from '../Decorator';
@ -91,7 +91,7 @@ const AnvilHost = ({
// TODO: figure out why there are undefined host entries.
return host ? (
<InnerPanel key={host.host_uuid}>
<PanelHeader>
<InnerPanelHeader>
<Box display="flex" width="100%" className={classes.header}>
<Box flexGrow={1}>
<BodyText text={host.host_name} />
@ -109,7 +109,7 @@ const AnvilHost = ({
/>
</Box>
</Box>
</PanelHeader>
</InnerPanelHeader>
<Box display="flex" className={classes.state}>
<Box className={classes.label}>
<BodyText text="Power: " />

@ -1,9 +1,9 @@
import { ReactNode } from 'react';
import { Box } from '@mui/material';
import { styled } from '@mui/material/styles';
import { Box, styled } from '@mui/material';
import { BORDER_RADIUS, DIVIDER } from '../../lib/consts/DEFAULT_THEME';
const PREFIX = 'PanelHeader';
const PREFIX = 'InnerPanelHeader';
const classes = {
header: `${PREFIX}-header`,
@ -32,7 +32,7 @@ type Props = {
children: ReactNode;
};
const PanelHeader = ({ children }: Props): JSX.Element => {
const InnerPanelHeader = ({ children }: Props): JSX.Element => {
return (
<StyledBox>
<div className={classes.header} />
@ -41,4 +41,4 @@ const PanelHeader = ({ children }: Props): JSX.Element => {
);
};
export default PanelHeader;
export default InnerPanelHeader;

@ -1,5 +1,5 @@
import PanelHeader from './PanelHeader';
import InnerPanel from './InnerPanel';
import InnerPanelHeader from './InnerPanelHeader';
import Panel from './Panel';
export { Panel, PanelHeader, InnerPanel };
export { InnerPanel, InnerPanelHeader, Panel };

@ -2,7 +2,7 @@ import * as prettyBytes from 'pretty-bytes';
import { Box, Divider } from '@mui/material';
import { styled } from '@mui/material/styles';
import InsertLinkIcon from '@mui/icons-material/InsertLink';
import { InnerPanel, PanelHeader } from '../Panels';
import { InnerPanel, InnerPanelHeader } from '../Panels';
import { BodyText } from '../Text';
import Decorator, { Colours } from '../Decorator';
import { DIVIDER } from '../../lib/consts/DEFAULT_THEME';
@ -78,7 +78,7 @@ const ResourceVolumes = ({
resource.volumes.map((volume) => {
return (
<InnerPanel key={volume.drbd_device_minor}>
<PanelHeader>
<InnerPanelHeader>
<Box display="flex" width="100%" className={classes.header}>
<Box flexGrow={1}>
<BodyText text={`Volume: ${volume.number}`} />
@ -91,7 +91,7 @@ const ResourceVolumes = ({
/>
</Box>
</Box>
</PanelHeader>
</InnerPanelHeader>
{volume.connections.map(
(connection, index): JSX.Element => {
return (

@ -3,7 +3,7 @@ import { useContext } from 'react';
import { Box } from '@mui/material';
import { styled } from '@mui/material/styles';
import { BodyText, HeaderText } from '../Text';
import { Panel, InnerPanel, PanelHeader } from '../Panels';
import { Panel, InnerPanel, InnerPanelHeader } from '../Panels';
import SharedStorageHost from './SharedStorageHost';
import PeriodicFetch from '../../lib/fetchers/periodicFetch';
import { AnvilContext } from '../AnvilContext';
@ -49,7 +49,7 @@ const SharedStorage = (): JSX.Element => {
data.storage_groups.map(
(storageGroup: AnvilSharedStorageGroup): JSX.Element => (
<InnerPanel key={storageGroup.storage_group_uuid}>
<PanelHeader>
<InnerPanelHeader>
<Box
display="flex"
width="100%"
@ -59,7 +59,7 @@ const SharedStorage = (): JSX.Element => {
<BodyText text={storageGroup.storage_group_name} />
</Box>
</Box>
</PanelHeader>
</InnerPanelHeader>
<SharedStorageHost
group={storageGroup}
key={storageGroup.storage_group_uuid}

Loading…
Cancel
Save