Merge pull request #2180 from ajhollid/fix/comment-out-distributed-uptime
fix: comment out distributed uptime
This commit is contained in:
6 files changed
+147
-13694
No files matched your search
Generated
+71
-13627
File diff suppressed because it is too large.
Load diff
+8
-6
@@ -22,12 +22,6 @@
|
|||||||
"@mui/lab": "6.0.0-dev.240424162023-9968b4889d",
|
"@mui/lab": "6.0.0-dev.240424162023-9968b4889d",
|
||||||
"@mui/material": "6.4.11",
|
"@mui/material": "6.4.11",
|
||||||
"@reduxjs/toolkit": "2.7.0",
|
"@reduxjs/toolkit": "2.7.0",
|
||||||
"@solana/wallet-adapter-base": "0.9.25",
|
|
||||||
"@solana/wallet-adapter-material-ui": "0.16.35",
|
|
||||||
"@solana/wallet-adapter-react": "0.15.37",
|
|
||||||
"@solana/wallet-adapter-react-ui": "0.9.37",
|
|
||||||
"@solana/wallet-adapter-wallets": "0.19.34",
|
|
||||||
"@solana/web3.js": "1.98.0",
|
|
||||||
"axios": "^1.7.4",
|
"axios": "^1.7.4",
|
||||||
"dayjs": "1.11.13",
|
"dayjs": "1.11.13",
|
||||||
"flag-icons": "7.3.2",
|
"flag-icons": "7.3.2",
|
||||||
@@ -52,6 +46,14 @@
|
|||||||
"redux-persist": "6.0.0",
|
"redux-persist": "6.0.0",
|
||||||
"vite-plugin-svgr": "^4.2.0"
|
"vite-plugin-svgr": "^4.2.0"
|
||||||
},
|
},
|
||||||
|
"unusedDepencies": {
|
||||||
|
"@solana/wallet-adapter-base": "0.9.25",
|
||||||
|
"@solana/wallet-adapter-material-ui": "0.16.35",
|
||||||
|
"@solana/wallet-adapter-react": "0.15.37",
|
||||||
|
"@solana/wallet-adapter-react-ui": "0.9.37",
|
||||||
|
"@solana/wallet-adapter-wallets": "0.19.34",
|
||||||
|
"@solana/web3.js": "1.98.0"
|
||||||
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/react": "^18.2.66",
|
"@types/react": "^18.2.66",
|
||||||
"@types/react-dom": "^18.2.22",
|
"@types/react-dom": "^18.2.22",
|
||||||
|
|||||||
@@ -1,46 +1,50 @@
|
|||||||
import { useMemo } from "react";
|
// import { useMemo } from "react";
|
||||||
import { ConnectionProvider, WalletProvider } from "@solana/wallet-adapter-react";
|
// import { ConnectionProvider, WalletProvider } from "@solana/wallet-adapter-react";
|
||||||
import { WalletAdapterNetwork } from "@solana/wallet-adapter-base";
|
// import { WalletAdapterNetwork } from "@solana/wallet-adapter-base";
|
||||||
import {
|
// import {
|
||||||
UnsafeBurnerWalletAdapter,
|
// UnsafeBurnerWalletAdapter,
|
||||||
PhantomWalletAdapter,
|
// PhantomWalletAdapter,
|
||||||
} from "@solana/wallet-adapter-wallets";
|
// } from "@solana/wallet-adapter-wallets";
|
||||||
|
|
||||||
import { WalletModalProvider } from "@solana/wallet-adapter-react-ui";
|
// import { WalletModalProvider } from "@solana/wallet-adapter-react-ui";
|
||||||
import { clusterApiUrl } from "@solana/web3.js";
|
// import { clusterApiUrl } from "@solana/web3.js";
|
||||||
import PropTypes from "prop-types";
|
// import PropTypes from "prop-types";
|
||||||
import "./index.css";
|
// import "./index.css";
|
||||||
|
|
||||||
// Default styles that can be overridden by your app
|
// // Default styles that can be overridden by your app
|
||||||
import "@solana/wallet-adapter-react-ui/styles.css";
|
// import "@solana/wallet-adapter-react-ui/styles.css";
|
||||||
|
|
||||||
export const Wallet = ({ children }) => {
|
// export const Wallet = ({ children }) => {
|
||||||
// The network can be set to 'devnet', 'testnet', or 'mainnet-beta'.
|
// // The network can be set to 'devnet', 'testnet', or 'mainnet-beta'.
|
||||||
const network = WalletAdapterNetwork.Mainnet;
|
// const network = WalletAdapterNetwork.Mainnet;
|
||||||
|
|
||||||
// You can also provide a custom RPC endpoint.
|
// // You can also provide a custom RPC endpoint.
|
||||||
const endpoint = useMemo(() => clusterApiUrl(network), [network]);
|
// const endpoint = useMemo(() => clusterApiUrl(network), [network]);
|
||||||
|
|
||||||
const wallets = useMemo(
|
// const wallets = useMemo(
|
||||||
() => [new PhantomWalletAdapter()],
|
// () => [new PhantomWalletAdapter()],
|
||||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
// // eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
[network]
|
// [network]
|
||||||
);
|
// );
|
||||||
|
|
||||||
return (
|
// return (
|
||||||
<ConnectionProvider endpoint={endpoint}>
|
// <ConnectionProvider endpoint={endpoint}>
|
||||||
<WalletProvider
|
// <WalletProvider
|
||||||
wallets={wallets}
|
// wallets={wallets}
|
||||||
autoConnect
|
// autoConnect
|
||||||
>
|
// >
|
||||||
<WalletModalProvider>{children}</WalletModalProvider>
|
// <WalletModalProvider>{children}</WalletModalProvider>
|
||||||
</WalletProvider>
|
// </WalletProvider>
|
||||||
</ConnectionProvider>
|
// </ConnectionProvider>
|
||||||
);
|
// );
|
||||||
};
|
// };
|
||||||
|
|
||||||
Wallet.propTypes = {
|
// Wallet.propTypes = {
|
||||||
children: PropTypes.node,
|
// children: PropTypes.node,
|
||||||
|
// };
|
||||||
|
|
||||||
|
const Wallet = ({ children }) => {
|
||||||
|
return children;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default Wallet;
|
export default Wallet;
|
||||||
@@ -6,10 +6,10 @@ import Select from "../../Components/Inputs/Select";
|
|||||||
import { useIsAdmin } from "../../Hooks/useIsAdmin";
|
import { useIsAdmin } from "../../Hooks/useIsAdmin";
|
||||||
import Dialog from "../../Components/Dialog";
|
import Dialog from "../../Components/Dialog";
|
||||||
import ConfigBox from "../../Components/ConfigBox";
|
import ConfigBox from "../../Components/ConfigBox";
|
||||||
import {
|
// import {
|
||||||
WalletMultiButton,
|
// WalletMultiButton,
|
||||||
WalletDisconnectButton,
|
// WalletDisconnectButton,
|
||||||
} from "@solana/wallet-adapter-react-ui";
|
// } from "@solana/wallet-adapter-react-ui";
|
||||||
|
|
||||||
//Utils
|
//Utils
|
||||||
import { useTheme } from "@emotion/react";
|
import { useTheme } from "@emotion/react";
|
||||||
@@ -254,7 +254,7 @@ const Settings = () => {
|
|||||||
></Select>
|
></Select>
|
||||||
</Stack>
|
</Stack>
|
||||||
</ConfigBox>
|
</ConfigBox>
|
||||||
{isAdmin && (
|
{/* {isAdmin && (
|
||||||
<ConfigBox>
|
<ConfigBox>
|
||||||
<Box>
|
<Box>
|
||||||
<Typography component="h1">{t("settingsDistributedUptime")}</Typography>
|
<Typography component="h1">{t("settingsDistributedUptime")}</Typography>
|
||||||
@@ -276,8 +276,8 @@ const Settings = () => {
|
|||||||
: t("settingsDisabled")}
|
: t("settingsDisabled")}
|
||||||
</Box>
|
</Box>
|
||||||
</ConfigBox>
|
</ConfigBox>
|
||||||
)}
|
)} */}
|
||||||
{isAdmin && (
|
{/* {isAdmin && (
|
||||||
<ConfigBox>
|
<ConfigBox>
|
||||||
<Box>
|
<Box>
|
||||||
<Typography component="h1">{t("settingsWallet")}</Typography>
|
<Typography component="h1">{t("settingsWallet")}</Typography>
|
||||||
@@ -302,7 +302,7 @@ const Settings = () => {
|
|||||||
</Stack>
|
</Stack>
|
||||||
</Box>
|
</Box>
|
||||||
</ConfigBox>
|
</ConfigBox>
|
||||||
)}
|
)} */}
|
||||||
{isAdmin && (
|
{isAdmin && (
|
||||||
<ConfigBox>
|
<ConfigBox>
|
||||||
<Box>
|
<Box>
|
||||||
|
|||||||
+17
-17
@@ -96,16 +96,16 @@ const Routes = () => {
|
|||||||
path="/uptime/configure/:monitorId/"
|
path="/uptime/configure/:monitorId/"
|
||||||
element={<UptimeConfigure />}
|
element={<UptimeConfigure />}
|
||||||
/>
|
/>
|
||||||
<Route
|
{/* <Route
|
||||||
path="/distributed-uptime"
|
path="/distributed-uptime"
|
||||||
element={
|
element={
|
||||||
<ProtectedDistributedUptimeRoute>
|
<ProtectedDistributedUptimeRoute>
|
||||||
<DistributedUptimeMonitors />{" "}
|
<DistributedUptimeMonitors />{" "}
|
||||||
</ProtectedDistributedUptimeRoute>
|
</ProtectedDistributedUptimeRoute>
|
||||||
}
|
}
|
||||||
/>
|
/> */}
|
||||||
|
|
||||||
<Route
|
{/* <Route
|
||||||
path="/distributed-uptime/create"
|
path="/distributed-uptime/create"
|
||||||
element={
|
element={
|
||||||
<ProtectedDistributedUptimeRoute>
|
<ProtectedDistributedUptimeRoute>
|
||||||
@@ -120,15 +120,15 @@ const Routes = () => {
|
|||||||
<CreateDistributedUptime />
|
<CreateDistributedUptime />
|
||||||
</ProtectedDistributedUptimeRoute>
|
</ProtectedDistributedUptimeRoute>
|
||||||
}
|
}
|
||||||
/>
|
/> */}
|
||||||
<Route
|
{/* <Route
|
||||||
path="/distributed-uptime/:monitorId"
|
path="/distributed-uptime/:monitorId"
|
||||||
element={
|
element={
|
||||||
<ProtectedDistributedUptimeRoute>
|
<ProtectedDistributedUptimeRoute>
|
||||||
<DistributedUptimeDetails />
|
<DistributedUptimeDetails />
|
||||||
</ProtectedDistributedUptimeRoute>
|
</ProtectedDistributedUptimeRoute>
|
||||||
}
|
}
|
||||||
/>
|
/> */}
|
||||||
|
|
||||||
<Route
|
<Route
|
||||||
path="pagespeed"
|
path="pagespeed"
|
||||||
@@ -154,9 +154,9 @@ const Routes = () => {
|
|||||||
path="infrastructure/create"
|
path="infrastructure/create"
|
||||||
element={<InfrastructureCreate />}
|
element={<InfrastructureCreate />}
|
||||||
/>
|
/>
|
||||||
<Route
|
<Route
|
||||||
path="/infrastructure/configure/:monitorId"
|
path="/infrastructure/configure/:monitorId"
|
||||||
element={<InfrastructureCreate />}
|
element={<InfrastructureCreate />}
|
||||||
/>
|
/>
|
||||||
<Route
|
<Route
|
||||||
path="infrastructure/:monitorId"
|
path="infrastructure/:monitorId"
|
||||||
@@ -177,42 +177,42 @@ const Routes = () => {
|
|||||||
element={<Status />}
|
element={<Status />}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Route
|
{/* <Route
|
||||||
path="/status/distributed/:url"
|
path="/status/distributed/:url"
|
||||||
element={
|
element={
|
||||||
<ProtectedDistributedUptimeRoute>
|
<ProtectedDistributedUptimeRoute>
|
||||||
<DistributedUptimeStatus />
|
<DistributedUptimeStatus />
|
||||||
</ProtectedDistributedUptimeRoute>
|
</ProtectedDistributedUptimeRoute>
|
||||||
}
|
}
|
||||||
/>
|
/> */}
|
||||||
|
|
||||||
<Route
|
<Route
|
||||||
path="status/uptime/create"
|
path="status/uptime/create"
|
||||||
element={<CreateStatus />}
|
element={<CreateStatus />}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Route
|
{/* <Route
|
||||||
path="/status/distributed/create/:monitorId"
|
path="/status/distributed/create/:monitorId"
|
||||||
element={
|
element={
|
||||||
<ProtectedDistributedUptimeRoute>
|
<ProtectedDistributedUptimeRoute>
|
||||||
<CreateDistributedUptimeStatus />
|
<CreateDistributedUptimeStatus />
|
||||||
</ProtectedDistributedUptimeRoute>
|
</ProtectedDistributedUptimeRoute>
|
||||||
}
|
}
|
||||||
/>
|
/> */}
|
||||||
|
|
||||||
<Route
|
<Route
|
||||||
path="status/uptime/configure/:url"
|
path="status/uptime/configure/:url"
|
||||||
element={<CreateStatus />}
|
element={<CreateStatus />}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Route
|
{/* <Route
|
||||||
path="/status/distributed/configure/:url"
|
path="/status/distributed/configure/:url"
|
||||||
element={
|
element={
|
||||||
<ProtectedDistributedUptimeRoute>
|
<ProtectedDistributedUptimeRoute>
|
||||||
<CreateDistributedUptimeStatus />
|
<CreateDistributedUptimeStatus />
|
||||||
</ProtectedDistributedUptimeRoute>
|
</ProtectedDistributedUptimeRoute>
|
||||||
}
|
}
|
||||||
/>
|
/> */}
|
||||||
|
|
||||||
<Route
|
<Route
|
||||||
path="integrations"
|
path="integrations"
|
||||||
@@ -280,10 +280,10 @@ const Routes = () => {
|
|||||||
path="/status/uptime/public/:url"
|
path="/status/uptime/public/:url"
|
||||||
element={<Status />}
|
element={<Status />}
|
||||||
/>
|
/>
|
||||||
<Route
|
{/* <Route
|
||||||
path="/status/distributed/public/:url"
|
path="/status/distributed/public/:url"
|
||||||
element={<DistributedUptimeStatus />}
|
element={<DistributedUptimeStatus />}
|
||||||
/>
|
/> */}
|
||||||
|
|
||||||
<Route
|
<Route
|
||||||
path="*"
|
path="*"
|
||||||
|
|||||||
@@ -45,6 +45,9 @@ class NetworkService {
|
|||||||
this.axiosInstance.interceptors.response.use(
|
this.axiosInstance.interceptors.response.use(
|
||||||
(response) => response,
|
(response) => response,
|
||||||
(error) => {
|
(error) => {
|
||||||
|
if (error.code === "ERR_NETWORK") {
|
||||||
|
// Do error handling here
|
||||||
|
}
|
||||||
if (error.response && error.response.status === 401) {
|
if (error.response && error.response.status === 401) {
|
||||||
dispatch(clearAuthState());
|
dispatch(clearAuthState());
|
||||||
dispatch(clearUptimeMonitorState());
|
dispatch(clearUptimeMonitorState());
|
||||||
|
|||||||
Reference in new issue
Block a user