diff --git a/striker-ui/components/AllocationBar.tsx b/striker-ui/components/AllocationBar.tsx
new file mode 100644
index 00000000..15871a30
--- /dev/null
+++ b/striker-ui/components/AllocationBar.tsx
@@ -0,0 +1,28 @@
+import { withStyles } from '@material-ui/core/styles';
+import { LinearProgress } from '@material-ui/core';
+import { PURPLE_OFF, RED_ON } from '../lib/consts/DEFAULT_THEME';
+
+const BorderLinearProgress = withStyles({
+ root: {
+ height: 10,
+ borderRadius: 5,
+ },
+ colorPrimary: {
+ backgroundColor: PURPLE_OFF,
+ },
+ bar: {
+ borderRadius: 5,
+ backgroundColor: RED_ON,
+ },
+})(LinearProgress);
+
+const AllocationBar = ({ allocated }: { allocated: number }): JSX.Element => {
+ return (
+ <>
+
+
+ >
+ );
+};
+
+export default AllocationBar;
diff --git a/striker-ui/components/CPU.tsx b/striker-ui/components/CPU.tsx
index cfb04936..2be7fabb 100644
--- a/striker-ui/components/CPU.tsx
+++ b/striker-ui/components/CPU.tsx
@@ -1,22 +1,7 @@
-import { withStyles } from '@material-ui/core/styles';
-import { Grid, LinearProgress } from '@material-ui/core';
+import { Grid } from '@material-ui/core';
import Panel from './Panel';
+import AllocationBar from './AllocationBar';
import { HeaderText, BodyText } from './Text';
-import { PURPLE_OFF, RED_ON } from '../lib/consts/DEFAULT_THEME';
-
-const BorderLinearProgress = withStyles({
- root: {
- height: 10,
- borderRadius: 5,
- },
- colorPrimary: {
- backgroundColor: PURPLE_OFF,
- },
- bar: {
- borderRadius: 5,
- backgroundColor: RED_ON,
- },
-})(LinearProgress);
const CPU = (): JSX.Element => {
return (
@@ -32,8 +17,13 @@ const CPU = (): JSX.Element => {
-
-
+
+
+
+
+
+
+
diff --git a/striker-ui/components/Memory.tsx b/striker-ui/components/Memory.tsx
index b1c291b0..07661ea1 100644
--- a/striker-ui/components/Memory.tsx
+++ b/striker-ui/components/Memory.tsx
@@ -1,22 +1,7 @@
-import { withStyles } from '@material-ui/core/styles';
-import { Grid, LinearProgress } from '@material-ui/core';
+import { Grid } from '@material-ui/core';
import Panel from './Panel';
+import AllocationBar from './AllocationBar';
import { HeaderText, BodyText } from './Text';
-import { PURPLE_OFF, RED_ON } from '../lib/consts/DEFAULT_THEME';
-
-const BorderLinearProgress = withStyles({
- root: {
- height: 10,
- borderRadius: 5,
- },
- colorPrimary: {
- backgroundColor: PURPLE_OFF,
- },
- bar: {
- borderRadius: 5,
- backgroundColor: RED_ON,
- },
-})(LinearProgress);
const Memory = (): JSX.Element => {
return (
@@ -26,14 +11,16 @@ const Memory = (): JSX.Element => {
-
+
-
+
-
-
+
+
+
+