Skip to content

Commit

Permalink
Features/faq page (#23)
Browse files Browse the repository at this point in the history
* Keep last created when removing duplicates

* Add FAQ page

* .

* .
  • Loading branch information
Redm4x authored Sep 29, 2023
1 parent a060c28 commit 6f9b78e
Show file tree
Hide file tree
Showing 9 changed files with 134 additions and 7 deletions.
4 changes: 2 additions & 2 deletions api/src/providers/providerStatusProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { ProviderSnapshot } from "@shared/dbSchemas/akash/providerSnapshot";
import { toUTC } from "@src/utils/date";
import { add } from "date-fns";
import { Op } from "sequelize";
import semver from "semver";
import { mapProviderToList } from "@src/utils/map/provider";
import { getAuditors, getProviderAttributesSchema } from "./githubProvider";
import { ProviderDetail } from "@src/types/provider";
Expand Down Expand Up @@ -47,6 +46,7 @@ export const getProviderList = async () => {
where: {
deletedHeight: null
},
order: [["createdHeight", "ASC"]],
include: [
{
model: ProviderAttribute
Expand All @@ -56,7 +56,7 @@ export const getProviderList = async () => {
}
]
});
const filteredProviders = providers.filter((value, index, self) => self.map((x) => x.hostUri).indexOf(value.hostUri) === index);
const filteredProviders = providers.filter((value, index, self) => self.map((x) => x.hostUri).lastIndexOf(value.hostUri) === index);
const providerAttributeSchemaQuery = getProviderAttributesSchema();
const auditorsQuery = getAuditors();

Expand Down
Binary file added deploy-web/public/images/faq/change-node.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 10 additions & 4 deletions deploy-web/src/components/layout/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export const useStyles = makeStyles()(theme => ({
marginBottom: "1rem"
}
},
privacyLink: {
footerLink: {
color: "inherit"
}
}));
Expand Down Expand Up @@ -176,18 +176,24 @@ export const Footer: React.FunctionComponent<IFooterProps> = ({}) => {
</ul>

<Box sx={{ margin: { xs: ".5rem 0 1rem", sm: 0 }, display: "flex", alignItems: "center" }}>
<Link href={UrlService.termsOfService()} className={classes.privacyLink}>
<Link href={UrlService.termsOfService()} className={classes.footerLink}>
<Typography variant="caption">Terms of Service</Typography>
</Link>

<Box sx={{ marginLeft: "1rem" }}>
<Link href={UrlService.privacyPolicy()} className={classes.privacyLink}>
<Link href={UrlService.privacyPolicy()} className={classes.footerLink}>
<Typography variant="caption">Privacy Policy</Typography>
</Link>
</Box>

<Box sx={{ marginLeft: "1rem" }}>
<Link href={UrlService.contact()} className={classes.privacyLink}>
<Link href={UrlService.faq()} className={classes.footerLink}>
<Typography variant="caption">FAQ</Typography>
</Link>
</Box>

<Box sx={{ marginLeft: "1rem" }}>
<Link href={UrlService.contact()} className={classes.footerLink}>
<Typography variant="caption">Contact</Typography>
</Link>
</Box>
Expand Down
2 changes: 2 additions & 0 deletions deploy-web/src/components/layout/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import MenuIcon from "@mui/icons-material/Menu";
import SavingsIcon from "@mui/icons-material/Savings";
import ConstructionIcon from "@mui/icons-material/Construction";
import InsightsIcon from "@mui/icons-material/Insights";
import HelpIcon from "@mui/icons-material/Help";
import { useAtom } from "jotai";
import sdlStore from "@src/store/sdlStore";
import { MobileSidebarUser } from "./MobileSidebarUser";
Expand Down Expand Up @@ -132,6 +133,7 @@ export const Sidebar: React.FunctionComponent<Props> = ({ isMobileOpen, handleDr
url: UrlService.priceCompare(),
activeRoutes: [UrlService.priceCompare()]
},
{ title: "FAQ", icon: props => <HelpIcon {...props} />, url: UrlService.faq(), activeRoutes: [UrlService.faq()] },
{ title: "Settings", icon: props => <SettingsIcon {...props} />, url: UrlService.settings(), activeRoutes: [UrlService.settings()] }
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ const getDesignTokens = (mode: PaletteMode): ThemeOptions => ({
MuiCssBaseline: {
styleOverrides: {
html: {
scrollPaddingTop: `${accountBarHeight}px`,
WebkitFontSmoothing: "auto",
height: "100%",
width: "100%"
Expand Down
117 changes: 117 additions & 0 deletions deploy-web/src/pages/faq/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
import Layout from "@src/components/layout/Layout";
import PageContainer from "@src/components/shared/PageContainer";
import { Title } from "@src/components/shared/Title";
import { NextSeo } from "next-seo";
import Image from "next/image";
import Link from "next/link";

export default function FaqPage() {
return (
<Layout>
<NextSeo title={`Frequently Asked Questions`} />

<PageContainer>
<Title value="Frequently Asked Questions" />

<ul>
<li>
<Link href="#lease-closed">My lease is closed, but the deployment isn't.</Link>
</li>
<li>
<Link href="#shell-lost">Can't access shell: "The connection to your Cloudmos Shell was lost."</Link>
</li>
<li>
<Link href="#send-manifest-resources-mismatch">
Error while sending manifest to provider. Error: manifest cross-validation error: group "X": service "X": CPU/Memory resources mismatch for ID 1
</Link>
</li>
<li>
<Link href="#other-issues">My issue is not listed</Link>
</li>
</ul>

<h2 id="lease-closed">My lease is closed, but the deployment isn't.</h2>
<p>
If your lease is closed, but your deployment isn't, that means your provider closed it. You will need to close your deployment and create a new one.
You can try deploying on a different provider to see if that helps.
<br />
<br />
Here's some possible reasons why a provider could close your lease:
</p>
<ul>
<li>Your docker image was not able to be downloaded or crashed on launch.</li>
<li>Your deployment was using more resources than what was specified in your sdl. For example, you used more disk space than allowed.</li>
<li>Your deployment did not meet the terms of service of the provider. Ultimately, each provider can choose what workload they allow.</li>
<li>The provider had to close your lease due to some outage or maintenance on their servers.</li>
</ul>
<p>
To know the exact cause you can try contacting your provider in the{" "}
<Link href="https://discord.com/channels/747885925232672829/1111749310325981315" target="_blank">
#provider
</Link>{" "}
discord channel.
</p>

<h2 id="shell-lost">Can't access shell: "The connection to your Cloudmos Shell was lost."</h2>
<p>
There is a{" "}
<a href="https://github.com/akash-network/support/issues/87" target="_blank">
known issue
</a>{" "}
where the shell access will stop working if the provider pod gets restarted. Here's two workarounds you can try:
</p>
<ul>
<li>
You can try the "UPDATE DEPLOYMENT" button in the "UPDATE" tab of your deployment. Even without changing your SDL, this should temporarily restore
the shell access.
<br />
<Image src="/images/faq/update-deployment-btn.png" alt="Update Deployment" width={500} height={116} />
</li>
<li>
A permanent solution would be to add your own ssh access to your deployment, here is an{" "}
<Link href="https://gist.github.com/arno01/f33b7c618ecf090108a33deea38c3c10" target="_blank">
example SDL
</Link>{" "}
with ssh.
</li>
</ul>

<h2 id="send-manifest-resources-mismatch">
Error while sending manifest to provider. Error: manifest cross-validation error: group "X": service "X": CPU/Memory resources mismatch for ID 1
</h2>
<p>
This commonly happen if you try to change the hardware specs of your deployment. For example, if you try to increase the amount of memory or cpu. If
you need to change the hardware spec you will need to close your deployment and create a new one.
</p>
<p>
This can also happen if your deployment has multiple services and was created before the Mainnet 6 upgrade on August 31st, 2023. In this case, you
will also need to close your deployment and create a new one.
</p>

<h2 id="other-issues">My issue is not listed</h2>
<p>Here are some actions you can take to fix most of the errors you may encounter:</p>
<ul>
<li>
<strong>Change the selected node in the settings.</strong> Nodes are public services and can have outages and rate limiting.
<br />
<Image src={"/images/faq/change-node.png"} alt="Change Node" width={400} height={294} />
</li>
<li>
<strong>Try using another provider.</strong> The provider may be misconfigured or suffering from an outage.
</li>
<li>
<strong>Wait a bit and try again later.</strong> Some problem are temporary and simply waiting a bit and trying again will work.
</li>
</ul>
<p>
If you still have an issue after taking these steps, please ask your question in the{" "}
<Link href="https://discord.com/channels/747885925232672829/1111749073322660034" target="_blank">
#ecosystem-cloudmos
</Link>{" "}
channel. If you have issue creating or updating a deployment, it can help to include your SDL. Make sure to remove any sensitive information from it
before sharing (ex: secrets in your env variables).
</p>
</PageContainer>
</Layout>
);
}
2 changes: 1 addition & 1 deletion deploy-web/src/styles/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@
font-size: 85%;
background-color: rgba(175, 184, 193, 0.2);
border-radius: 6px;
}
}
1 change: 1 addition & 0 deletions deploy-web/src/utils/urlUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export class UrlService {
static priceCompareCustom = (cpu: number, memory: number, storage: number, memoryUnit: string, storageUnit: string) =>
`/price-compare${appendSearchParams({ cpu, memory, storage, memoryUnit, storageUnit })}`;
static contact = () => "/contact";
static faq = () => "/faq";
static privacyPolicy = () => "/privacy-policy";
static termsOfService = () => "/terms-of-service";
static blocks = () => `/blocks`;
Expand Down

0 comments on commit 6f9b78e

Please sign in to comment.