diff --git a/src/components/AccordionBox/index.js b/src/components/AccordionBox/index.js
index 12e4724ef..09174f45c 100644
--- a/src/components/AccordionBox/index.js
+++ b/src/components/AccordionBox/index.js
@@ -18,18 +18,20 @@ export function AccordionBox({ content, hiddenContent, ...rest }) {
>
{hiddenContent}
-
-
-
+ {hiddenContent && (
+
+
+
+ )}
);
}
diff --git a/src/components/Canary/CanaryPopup/index.js b/src/components/Canary/CanaryPopup/index.js
index 07aa0e1b6..29fb939f5 100644
--- a/src/components/Canary/CanaryPopup/index.js
+++ b/src/components/Canary/CanaryPopup/index.js
@@ -1,4 +1,4 @@
-import React from "react";
+import React, { useState } from "react";
import { format } from "timeago.js";
import { usePrevious } from "../../../utils/hooks";
import { Badge } from "../../Badge";
@@ -12,6 +12,7 @@ import {
capitalizeFirstLetter,
toFixedIfNecessary
} from "../../../utils/common";
+import styles from "../index.module.css";
export function CheckTitle({ check, className, ...rest }) {
const prevCheck = usePrevious(check);
@@ -86,10 +87,7 @@ export function CheckDetails({ check, ...rest }) {
})}
>
),
- Owner: validCheck?.owner || "-"
- };
-
- const hiddenDetails = {
+ Owner: validCheck?.owner || "-",
Interval: validCheck?.interval || "-",
Location: validCheck?.location || "-",
Schedule: validCheck?.schedule || "-"
@@ -133,52 +131,51 @@ export function CheckDetails({ check, ...rest }) {
/>
{/* chart section */}
-
+
Health overview
(time dropdown)
- {/* check details section */}
-
-
- Check details
-
-
- {Object.entries(details).map(([label, value]) => (
-
- ))}
-
- }
- hiddenContent={
-
- {Object.entries(hiddenDetails).map(([label, value]) => (
-
+
+
+ )
+ },
+ checkDetails: {
+ label: "Check details",
+ content: (
+
+
+ {Object.entries(details).map(([label, value]) => (
+
+ ))}
+
+ }
/>
- ))}
-
+
+ )
}
- />
-
- {/* status history section */}
-
+ }}
+ />
);
}
@@ -219,7 +216,7 @@ function DetailField({ label, value, className, ...rest }) {
);
}
-function StatusHistory({ check }) {
+function StatusHistory({ check, sticky = "false" }) {
const statii = check
? check.checkStatuses != null
? check.checkStatuses
@@ -252,7 +249,37 @@ function StatusHistory({ check }) {
id={`${check.key}-table`}
data={data}
columns={["Age", "Duration", "Message"]}
+ sticky={sticky}
/>
)
);
}
+
+export function PopupTabs({ tabs, contentStyle, ...rest }) {
+ const [selected, setSelected] = useState(Object.keys(tabs)[0]);
+ return (
+
+
+ {Object.entries(tabs).map(([key, tab]) => (
+
+ ))}
+
+
+ {Object.entries(tabs).map(
+ ([key, tab]) => selected === key &&
{tab.content}
+ )}
+
+
+ );
+}
diff --git a/src/components/Canary/index.js b/src/components/Canary/index.js
index baeddce76..51f82a30a 100644
--- a/src/components/Canary/index.js
+++ b/src/components/Canary/index.js
@@ -28,6 +28,8 @@ import { getLocalItem, setLocalItem } from "../../utils/storage";
import { Modal } from "../Modal";
import { CheckDetails, CheckTitle } from "./CanaryPopup";
+import styles from "./index.module.css";
+
export class Canary extends React.Component {
constructor(props) {
super(props);
@@ -382,13 +384,23 @@ export class Canary extends React.Component {
}
- body={}
- cardClass="px-8 py-6 my-12"
- cardStyle={{ width: "100%", maxWidth: "730px" }}
+ onClose={this.handleModalClose}
+ title={}
+ body={
+
+ }
+ containerClass="py-4 h-full"
+ cardClass="w-full h-full flex flex-col"
+ cardStyle={{
+ maxWidth: "820px",
+ maxHeight: "900px"
+ }}
+ contentClass="flex flex-col h-full p-8"
+ closeButtonPadding={8}
/>
);
diff --git a/src/components/Canary/index.module.css b/src/components/Canary/index.module.css
index 56caeadab..324ed9ba5 100644
--- a/src/components/Canary/index.module.css
+++ b/src/components/Canary/index.module.css
@@ -8,3 +8,27 @@
background: linear-gradient(90deg, transparent calc(100% - 26px), white);
pointer-events: none;
}
+
+/* width */
+.appleScrollbar::-webkit-scrollbar {
+ -webkit-appearance: none;
+ width: 7px;
+}
+
+/* Track */
+.appleScrollbar::-webkit-scrollbar-track {
+ background: #f1f1f1;
+ border-radius: 4px;
+}
+
+/* Handle */
+.appleScrollbar::-webkit-scrollbar-thumb {
+ border-radius: 4px;
+ background: rgb(160, 160, 160);
+ box-shadow: 0 0 1px rgba(255, 255, 255, 0.5);
+}
+
+/* Handle on hover */
+.appleScrollbar::-webkit-scrollbar-thumb:hover {
+ background-color: rgba(0, 0, 0, 0.5);
+}
diff --git a/src/components/Canary/table.js b/src/components/Canary/table.js
index 3a57137d7..da3b825b2 100644
--- a/src/components/Canary/table.js
+++ b/src/components/Canary/table.js
@@ -12,7 +12,7 @@ import { useCheckSetEqualityForPreviousVsCurrent } from "../Hooks/useCheckSetEqu
const styles = {
outerDivClass: "border-l border-r border-gray-300",
topBgClass: "bg-red-500",
- tableClass: "min-w-full border-separate",
+ tableClass: "min-w-full border-separate",
theadClass: "bg-white z-10",
theadRowClass: "z-10",
theadHeaderClass:
diff --git a/src/components/Modal/index.js b/src/components/Modal/index.js
index a007363e2..7b7b35873 100644
--- a/src/components/Modal/index.js
+++ b/src/components/Modal/index.js
@@ -10,6 +10,7 @@ export function Modal({
onClose,
closeButtonPadding,
containerClass,
+ contentClass,
cardClass = "p-4",
cancelText = "Close",
hideActions,
@@ -21,12 +22,14 @@ export function Modal({