Skip to content

Commit d30c0c8

Browse files
authored
Migrated Metrics pages and components to mds (#3042)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
1 parent 1697c82 commit d30c0c8

35 files changed

+1509
-1884
lines changed

portal-ui/src/screens/Console/Common/FormComponents/common/styleLibrary.ts

Lines changed: 15 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
// This object contains variables that will be used across form components.
1818

1919
import { breakPoints } from "mds";
20+
import get from "lodash/get";
2021

2122
const inputLabelBase = {
2223
fontWeight: 600,
@@ -416,55 +417,55 @@ export const typesSelection = {
416417
},
417418
};
418419

419-
export const widgetCommon = {
420-
singleValueContainer: {
420+
export const widgetCommon = (theme: any) => ({
421+
"& .singleValueContainer": {
421422
height: 200,
422-
border: "#eaeaea 1px solid",
423-
backgroundColor: "#fff",
424-
borderRadius: "3px",
423+
border: `${get(theme, "borderColor", "#eaeaea")} 1px solid`,
424+
borderRadius: 2,
425+
backgroundColor: get(theme, "bgColor", "#fff"),
425426
padding: 16,
426427
},
427-
titleContainer: {
428-
color: "#404143",
428+
"& .titleContainer": {
429+
color: get(theme, "mutedText", "#87888d"),
429430
fontSize: 16,
430431
fontWeight: 600,
431432
paddingBottom: 14,
432433
marginBottom: 5,
433434
display: "flex" as const,
434435
justifyContent: "space-between" as const,
435436
},
436-
contentContainer: {
437+
"& .contentContainer": {
437438
justifyContent: "center" as const,
438439
alignItems: "center" as const,
439440
display: "flex" as const,
440441
width: "100%",
441442
height: 140,
442443
},
443-
singleLegendContainer: {
444+
"& .singleLegendContainer": {
444445
display: "flex",
445446
alignItems: "center",
446447
padding: "0 10px",
447448
maxWidth: "100%",
448449
},
449-
colorContainer: {
450+
"& .colorContainer": {
450451
width: 8,
451452
height: 8,
452453
minWidth: 8,
453454
marginRight: 5,
454455
},
455-
legendLabel: {
456+
"& .legendLabel": {
456457
fontSize: "80%",
457-
color: "#393939",
458+
color: get(theme, "mutedText", "#87888d"),
458459
whiteSpace: "nowrap" as const,
459460
overflow: "hidden" as const,
460461
textOverflow: "ellipsis" as const,
461462
},
462-
zoomChartCont: {
463+
"& .zoomChartCont": {
463464
position: "relative" as const,
464465
height: 340,
465466
width: "100%",
466467
},
467-
};
468+
});
468469

469470
export const tooltipCommon = {
470471
customTooltip: {
@@ -646,44 +647,6 @@ export const inputFieldStyles = {
646647
},
647648
};
648649

649-
const commonStateIcon = {
650-
marginRight: 10,
651-
lineHeight: 1,
652-
display: "inline-flex",
653-
marginTop: 6,
654-
};
655-
656-
export const commonDashboardInfocard: any = {
657-
redState: {
658-
color: "#F55B5B",
659-
...commonStateIcon,
660-
},
661-
greenState: {
662-
color: "#9FF281",
663-
...commonStateIcon,
664-
},
665-
yellowState: {
666-
color: "#F7A25A",
667-
...commonStateIcon,
668-
},
669-
greyState: {
670-
color: "grey",
671-
...commonStateIcon,
672-
},
673-
healthStatusIcon: {
674-
position: "absolute" as const,
675-
fontSize: 8,
676-
left: 18,
677-
height: 10,
678-
bottom: 2,
679-
marginRight: 10,
680-
"& .min-icon": {
681-
width: 5,
682-
height: 5,
683-
},
684-
},
685-
};
686-
687650
export const tableStyles: any = {
688651
tableBlock: {
689652
display: "flex",

portal-ui/src/screens/Console/Common/TabSelector/TabSelector.tsx

Lines changed: 0 additions & 123 deletions
This file was deleted.

portal-ui/src/screens/Console/Common/TabSelector/types.ts

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)