- Update to add status page subdomain as env variable
- Adjust Server lists and Add new layout etc - Adjust Save button
This commit is contained in:
1 parent
8b72f8447d
commit
5226f3c9b1
8 files changed
+21
-10
No files matched your search
@@ -1 +1,2 @@
|
|||||||
VITE_APP_API_BASE_URL=UPTIME_APP_API_BASE_URL
|
VITE_APP_API_BASE_URL=UPTIME_APP_API_BASE_URL
|
||||||
|
VITE_STATUS_PAGE_SUBDOMAIN_PREFIX=UPTIME_STATUS_PAGE_SUBDOMAIN_PREFIX
|
||||||
@@ -150,7 +150,7 @@ const ContentPanel = () => {
|
|||||||
>
|
>
|
||||||
<Stack
|
<Stack
|
||||||
direction="row"
|
direction="row"
|
||||||
justifyContent="space-around"
|
justifyContent="space-between"
|
||||||
>
|
>
|
||||||
<Typography
|
<Typography
|
||||||
component="p"
|
component="p"
|
||||||
@@ -163,7 +163,7 @@ const ContentPanel = () => {
|
|||||||
onClick={handleAddNew}
|
onClick={handleAddNew}
|
||||||
disabled={monitors.length === 0 || monitors.length <= cards.length}
|
disabled={monitors.length === 0 || monitors.length <= cards.length}
|
||||||
>
|
>
|
||||||
Add New
|
Add new
|
||||||
</Button>
|
</Button>
|
||||||
</Stack>
|
</Stack>
|
||||||
{cards.length > 0 && (
|
{cards.length > 0 && (
|
||||||
|
|||||||
@@ -29,6 +29,8 @@ const GeneralSettingsPanel = () => {
|
|||||||
|
|
||||||
const [progress, setProgress] = useState({ value: 0, isLoading: false });
|
const [progress, setProgress] = useState({ value: 0, isLoading: false });
|
||||||
const intervalRef = useRef(null);
|
const intervalRef = useRef(null);
|
||||||
|
const SUBDOAMIN_PREFIX =
|
||||||
|
import.meta.env.VITE_STATUS_PAGE_SUBDOMAIN_PREFIX ?? "http://localhost/";
|
||||||
|
|
||||||
// Clears specific error from errors state
|
// Clears specific error from errors state
|
||||||
const clearError = (err) => {
|
const clearError = (err) => {
|
||||||
@@ -178,7 +180,7 @@ const GeneralSettingsPanel = () => {
|
|||||||
value={form.url}
|
value={form.url}
|
||||||
startAdornment={
|
startAdornment={
|
||||||
<HttpAdornment
|
<HttpAdornment
|
||||||
prefix={"http://uptimegenie.com/"}
|
prefix={SUBDOAMIN_PREFIX}
|
||||||
https={false}
|
https={false}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,11 +23,12 @@ import { networkService } from "../../../main";
|
|||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const mode = useSelector((state) => state.ui.mode);
|
const mode = useSelector((state) => state.ui.mode);
|
||||||
const { authToken } = useSelector((state) => state.auth);
|
const { authToken } = useSelector((state) => state.auth);
|
||||||
const {apiBaseUrl} = useSelector((state) => state.settings);
|
|
||||||
const [tabIdx, setTabIdx] = useState(0);
|
const [tabIdx, setTabIdx] = useState(0);
|
||||||
const [errors, setErrors] = useState({});
|
const [errors, setErrors] = useState({});
|
||||||
const error_tab_maping = [["companyName","url","timezone","color","publish","logo"],["monitors",
|
const error_tab_maping = [
|
||||||
"showUptimePercentage", "showBarcode"]]
|
["companyName", "url", "timezone", "color", "publish", "logo"],
|
||||||
|
["monitors", "showUptimePercentage", "showBarcode"],
|
||||||
|
];
|
||||||
const tabList = ["General Settings", "Contents"];
|
const tabList = ["General Settings", "Contents"];
|
||||||
const hasInitForm = initForm && Object.keys(initForm).length > 0;
|
const hasInitForm = initForm && Object.keys(initForm).length > 0;
|
||||||
const [form, setForm] = useState(
|
const [form, setForm] = useState(
|
||||||
@@ -77,7 +78,9 @@ import { networkService } from "../../../main";
|
|||||||
logo: { type: form.logo?.type ?? "", size: form.logo?.size ?? "" },
|
logo: { type: form.logo?.type ?? "", size: form.logo?.size ?? "" },
|
||||||
};
|
};
|
||||||
//delete localData.logo
|
//delete localData.logo
|
||||||
if (hasValidationErrors(localData, publicPageGeneralSettingsValidation, setErrors)) {
|
if (
|
||||||
|
hasValidationErrors(localData, publicPageGeneralSettingsValidation, setErrors)
|
||||||
|
) {
|
||||||
setActiveTabOnErrors();
|
setActiveTabOnErrors();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -96,10 +99,11 @@ import { networkService } from "../../../main";
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Box
|
<Stack
|
||||||
className="status"
|
className="status"
|
||||||
px={theme.spacing(20)}
|
px={theme.spacing(20)}
|
||||||
py={theme.spacing(12)}
|
py={theme.spacing(12)}
|
||||||
|
gap={theme.spacing(12)}
|
||||||
border={1}
|
border={1}
|
||||||
borderColor={theme.palette.border.light}
|
borderColor={theme.palette.border.light}
|
||||||
borderRadius={theme.shape.borderRadius}
|
borderRadius={theme.shape.borderRadius}
|
||||||
@@ -161,9 +165,9 @@ import { networkService } from "../../../main";
|
|||||||
Save
|
Save
|
||||||
</Button>
|
</Button>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Box>
|
</Stack>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
CreateStatus.propTypes = {
|
CreateStatus.propTypes = {
|
||||||
initForm: PropTypes.object
|
initForm: PropTypes.object
|
||||||
|
|||||||
Vendored
+1
@@ -4,6 +4,7 @@ services:
|
|||||||
restart: always
|
restart: always
|
||||||
environment:
|
environment:
|
||||||
UPTIME_APP_API_BASE_URL: "http://localhost:5000/api/v1"
|
UPTIME_APP_API_BASE_URL: "http://localhost:5000/api/v1"
|
||||||
|
UPTIME_STATUS_PAGE_SUBDOMAIN_PREFIX: "http://uptimegenie.com/"
|
||||||
ports:
|
ports:
|
||||||
- "80:80"
|
- "80:80"
|
||||||
- "443:443"
|
- "443:443"
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ services:
|
|||||||
restart: always
|
restart: always
|
||||||
environment:
|
environment:
|
||||||
UPTIME_APP_API_BASE_URL: "https://checkmate-demo.bluewavelabs.ca/api/v1"
|
UPTIME_APP_API_BASE_URL: "https://checkmate-demo.bluewavelabs.ca/api/v1"
|
||||||
|
UPTIME_STATUS_PAGE_SUBDOMAIN_PREFIX: "http://uptimegenie.com/"
|
||||||
ports:
|
ports:
|
||||||
- "80:80"
|
- "80:80"
|
||||||
- "443:443"
|
- "443:443"
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ services:
|
|||||||
restart: always
|
restart: always
|
||||||
environment:
|
environment:
|
||||||
UPTIME_APP_API_BASE_URL: "https://checkmate-test.bluewavelabs.ca/api/v1"
|
UPTIME_APP_API_BASE_URL: "https://checkmate-test.bluewavelabs.ca/api/v1"
|
||||||
|
UPTIME_STATUS_PAGE_SUBDOMAIN_PREFIX: "http://uptimegenie.com/"
|
||||||
ports:
|
ports:
|
||||||
- "80:80"
|
- "80:80"
|
||||||
- "443:443"
|
- "443:443"
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ services:
|
|||||||
image: uptime_client:latest
|
image: uptime_client:latest
|
||||||
environment:
|
environment:
|
||||||
UPTIME_APP_API_BASE_URL: "https://checkmate-demo.bluewavelabs.ca/api/v1"
|
UPTIME_APP_API_BASE_URL: "https://checkmate-demo.bluewavelabs.ca/api/v1"
|
||||||
|
UPTIME_STATUS_PAGE_SUBDOMAIN_PREFIX: "http://uptimegenie.com/"
|
||||||
ports:
|
ports:
|
||||||
- "80:80"
|
- "80:80"
|
||||||
- "443:443"
|
- "443:443"
|
||||||
|
|||||||
Reference in new issue
Block a user