Merge branch 'develop' into fix/placeholder-center-align
This commit is contained in:
commit
2bb76a1b2f
18 files changed
+979
-721
No files matched your search
@@ -83,23 +83,24 @@ const MonitorDetailsControlHeader = ({
|
||||
>
|
||||
{t("menu.incidents")}
|
||||
</Button>
|
||||
<Button
|
||||
variant="contained"
|
||||
color="secondary"
|
||||
loading={isPausing}
|
||||
startIcon={
|
||||
monitor?.isActive ? <PauseOutlinedIcon /> : <PlayArrowOutlinedIcon />
|
||||
}
|
||||
onClick={() => {
|
||||
pauseMonitor({
|
||||
monitorId: monitor?._id,
|
||||
triggerUpdate,
|
||||
});
|
||||
}}
|
||||
>
|
||||
{monitor?.isActive ? "Pause" : "Resume"}
|
||||
</Button>
|
||||
|
||||
{isAdmin && (
|
||||
<Button
|
||||
variant="contained"
|
||||
color="secondary"
|
||||
loading={isPausing}
|
||||
startIcon={
|
||||
monitor?.isActive ? <PauseOutlinedIcon /> : <PlayArrowOutlinedIcon />
|
||||
}
|
||||
onClick={() => {
|
||||
pauseMonitor({
|
||||
monitorId: monitor?._id,
|
||||
triggerUpdate,
|
||||
});
|
||||
}}
|
||||
>
|
||||
{monitor?.isActive ? "Pause" : "Resume"}
|
||||
</Button>
|
||||
)}
|
||||
{isAdmin && (
|
||||
<Button
|
||||
variant="contained"
|
||||
|
||||
@@ -8,6 +8,7 @@ const useFetchChecksTeam = ({
|
||||
limit,
|
||||
dateRange,
|
||||
filter,
|
||||
ack,
|
||||
page,
|
||||
rowsPerPage,
|
||||
enabled = true,
|
||||
@@ -29,6 +30,7 @@ const useFetchChecksTeam = ({
|
||||
limit,
|
||||
dateRange,
|
||||
filter,
|
||||
ack,
|
||||
page,
|
||||
rowsPerPage,
|
||||
};
|
||||
@@ -47,7 +49,7 @@ const useFetchChecksTeam = ({
|
||||
};
|
||||
|
||||
fetchChecks();
|
||||
}, [status, sortOrder, limit, dateRange, filter, page, rowsPerPage, enabled]);
|
||||
}, [status, sortOrder, limit, dateRange, filter, ack, page, rowsPerPage, enabled]);
|
||||
|
||||
return [checks, checksCount, isLoading, networkError];
|
||||
};
|
||||
@@ -60,6 +62,7 @@ const useFetchChecksByMonitor = ({
|
||||
limit,
|
||||
dateRange,
|
||||
filter,
|
||||
ack,
|
||||
page,
|
||||
rowsPerPage,
|
||||
enabled = true,
|
||||
@@ -83,6 +86,7 @@ const useFetchChecksByMonitor = ({
|
||||
limit,
|
||||
dateRange,
|
||||
filter,
|
||||
ack,
|
||||
page,
|
||||
rowsPerPage,
|
||||
};
|
||||
@@ -109,6 +113,7 @@ const useFetchChecksByMonitor = ({
|
||||
limit,
|
||||
dateRange,
|
||||
filter,
|
||||
ack,
|
||||
page,
|
||||
rowsPerPage,
|
||||
enabled,
|
||||
|
||||
@@ -40,7 +40,8 @@ const IncidentTable = ({
|
||||
sortOrder: "desc",
|
||||
limit: null,
|
||||
dateRange,
|
||||
filter: filter,
|
||||
filter: filter === "resolved" ? "all" : filter,
|
||||
ack: filter === "resolved" ? true : false,
|
||||
page: page,
|
||||
rowsPerPage: rowsPerPage,
|
||||
enabled: selectedMonitor !== "0",
|
||||
@@ -52,7 +53,8 @@ const IncidentTable = ({
|
||||
sortOrder: "desc",
|
||||
limit: null,
|
||||
dateRange,
|
||||
filter: filter,
|
||||
filter: filter === "resolved" ? "all" : filter,
|
||||
ack: filter === "resolved" ? true : false,
|
||||
page: page,
|
||||
rowsPerPage: rowsPerPage,
|
||||
enabled: selectedMonitor === "0",
|
||||
|
||||
@@ -87,6 +87,13 @@ const OptionsHeader = ({
|
||||
>
|
||||
{t("incidentsOptionsHeaderFilterCannotResolve")}
|
||||
</Button>
|
||||
{/* <Button
|
||||
variant="group"
|
||||
filled={(filter === "resolved").toString()}
|
||||
onClick={() => setFilter("resolved")}
|
||||
>
|
||||
{t("incidentsOptionsHeaderFilterResolved")}
|
||||
</Button> */}
|
||||
</ButtonGroup>
|
||||
</Stack>
|
||||
<Stack {...stackStyles}>
|
||||
|
||||
@@ -18,6 +18,7 @@ const ActionMenu = ({ notification, onDelete }) => {
|
||||
|
||||
// Handlers
|
||||
const handleClick = (event) => {
|
||||
event.stopPropagation();
|
||||
setAnchorEl(event.currentTarget);
|
||||
};
|
||||
|
||||
@@ -25,7 +26,8 @@ const ActionMenu = ({ notification, onDelete }) => {
|
||||
setAnchorEl(null);
|
||||
};
|
||||
|
||||
const handleRemove = () => {
|
||||
const handleRemove = (e) => {
|
||||
e.stopPropagation();
|
||||
onDelete(notification._id);
|
||||
handleClose();
|
||||
};
|
||||
|
||||
@@ -117,7 +117,7 @@ const TabSettings = ({
|
||||
component="h2"
|
||||
variant="h2"
|
||||
>
|
||||
{t("settingsAppearance")}
|
||||
{t("statusPageCreateAppearanceTitle")}
|
||||
</Typography>
|
||||
<Typography component="p">
|
||||
{t("statusPageCreateAppearanceDescription")}
|
||||
|
||||
@@ -60,6 +60,7 @@ const CreateStatusPage = () => {
|
||||
const [statusPage, statusPageMonitors, statusPageIsLoading, statusPageNetworkError] =
|
||||
useStatusPageFetch(isCreate, url);
|
||||
|
||||
console.log(JSON.stringify(form, null, 2));
|
||||
// Handlers
|
||||
const handleFormChange = (e) => {
|
||||
let { type, name, value, checked } = e.target;
|
||||
@@ -177,7 +178,7 @@ const CreateStatusPage = () => {
|
||||
}
|
||||
|
||||
let newLogo = undefined;
|
||||
if (statusPage.logo) {
|
||||
if (statusPage.logo && Object.keys(statusPage.logo).length > 0) {
|
||||
newLogo = {
|
||||
src: `data:${statusPage.logo.contentType};base64,${statusPage.logo.data}`,
|
||||
name: "logo",
|
||||
@@ -246,7 +247,7 @@ const CreateStatusPage = () => {
|
||||
color="accent"
|
||||
onClick={handleSubmit}
|
||||
>
|
||||
{t("settingsSave")}
|
||||
{t("statusPageCreate.buttonSave")}
|
||||
</Button>
|
||||
</Stack>
|
||||
</Stack>
|
||||
|
||||
@@ -62,7 +62,7 @@ const PublicStatus = () => {
|
||||
return <SkeletonLayout />;
|
||||
}
|
||||
|
||||
if (monitors.length === 0) {
|
||||
if (monitors?.length === 0) {
|
||||
return (
|
||||
<GenericFallback>
|
||||
<Typography
|
||||
|
||||
@@ -549,6 +549,7 @@ class NetworkService {
|
||||
* @param {number} config.limit - The maximum number of checks to retrieve.
|
||||
* @param {string} config.dateRange - The range of dates for which to retrieve checks.
|
||||
* @param {string} config.filter - The filter to apply to the checks.
|
||||
* @param {boolean} config.ack - The acknowledgment status to apply to the checks.
|
||||
* @param {number} config.page - The page number to retrieve in a paginated list.
|
||||
* @param {number} config.rowsPerPage - The number of rows per page in a paginated list.
|
||||
* @returns {Promise<AxiosResponse>} The response from the axios GET request.
|
||||
@@ -562,6 +563,7 @@ class NetworkService {
|
||||
if (config.limit) params.append("limit", config.limit);
|
||||
if (config.dateRange) params.append("dateRange", config.dateRange);
|
||||
if (config.filter) params.append("filter", config.filter);
|
||||
if (config.ack !== undefined) params.append("ack", config.ack);
|
||||
if (config.page) params.append("page", config.page);
|
||||
if (config.rowsPerPage) params.append("rowsPerPage", config.rowsPerPage);
|
||||
if (config.status !== undefined) params.append("status", config.status);
|
||||
@@ -581,6 +583,7 @@ class NetworkService {
|
||||
* @param {number} config.limit - The maximum number of checks to retrieve.
|
||||
* @param {string} config.dateRange - The range of dates for which to retrieve checks.
|
||||
* @param {string} config.filter - The filter to apply to the checks.
|
||||
* @param {boolean} config.ack - The acknowledgment status to apply to the checks.
|
||||
* @param {number} config.page - The page number to retrieve in a paginated list.
|
||||
* @param {number} config.rowsPerPage - The number of rows per page in a paginated list.
|
||||
* @returns {Promise<AxiosResponse>} The response from the axios GET request.
|
||||
@@ -592,12 +595,30 @@ class NetworkService {
|
||||
if (config.limit) params.append("limit", config.limit);
|
||||
if (config.dateRange) params.append("dateRange", config.dateRange);
|
||||
if (config.filter) params.append("filter", config.filter);
|
||||
if (config.ack !== undefined) params.append("ack", config.ack);
|
||||
if (config.page) params.append("page", config.page);
|
||||
if (config.rowsPerPage) params.append("rowsPerPage", config.rowsPerPage);
|
||||
if (config.status !== undefined) params.append("status", config.status);
|
||||
return this.axiosInstance.get(`/checks/team?${params.toString()}`);
|
||||
};
|
||||
|
||||
/**
|
||||
* ************************************
|
||||
* Update the status of a check
|
||||
* ************************************
|
||||
*
|
||||
* @async
|
||||
* @param {Object} config - The configuration object.
|
||||
* @param {string} config.checkId - The ID of the check to update.
|
||||
* @param {boolean} config.ack - The acknowledgment to update the check to.
|
||||
* @returns {Promise<AxiosResponse>} The response from the axios PUT request.
|
||||
*
|
||||
*/
|
||||
async updateCheckStatus(config) {
|
||||
return this.axiosInstance.put(`/checks/check/${config.checkId}`, {
|
||||
ack: config.ack,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* ************************************
|
||||
* Get all checks for a given user
|
||||
|
||||
+696
-690
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user