Skip to content

Commit

Permalink
- remove invite code screen from console
Browse files Browse the repository at this point in the history
- update devdoc documentation
  • Loading branch information
nxtCoder19 committed Jun 27, 2024
1 parent 4ac600b commit ce70028
Show file tree
Hide file tree
Showing 19 changed files with 74 additions and 147 deletions.
4 changes: 0 additions & 4 deletions gql-queries-generator/doc/queries.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -1924,10 +1924,6 @@ mutation consoleDeleteAccountMembership($accountName: String!, $memberId: ID!) {
accounts_removeAccountMembership(accountName: $accountName, memberId: $memberId)
}

mutation consoleVerifyInviteCode($invitationCode: String!) {
auth_verifyInviteCode(invitationCode: $invitationCode)
}

query consoleGetCredToken($username: String!) {
cr_getCredToken(username: $username)
}
Expand Down
4 changes: 0 additions & 4 deletions lib/server/helpers/minimal-auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,6 @@ export const minimalAuth = async (ctx: IExtRemixCtx) => {
return redirect(`${authBaseUrl}/verify-email`);
}

if (whoAmI.data && !whoAmI.data.approved) {
return redirect(`${consoleBaseUrl}/invite-code`);
}

ctx.authProps = (props: MapType) => {
return {
...props,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"@jengaicons/react": "1.6.0",
"@mdx-js/react": "^2.3.0",
"@monaco-editor/react": "^4.6.0",
"@oshq/react-select": "^1.4.2",
"@oshq/react-select": "^1.4.4",
"@radix-ui/primitive": "^1.0.1",
"@radix-ui/react-alert-dialog": "1.0.4",
"@radix-ui/react-checkbox": "^1.0.4",
Expand Down
8 changes: 4 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ const ExposedRoute = () => {
// error={!!portError}
// message={portError}
disableWhileLoading
createLabel="Exposed Domains"
/>
</div>
);
Expand Down Expand Up @@ -219,6 +220,7 @@ export const ExposedPorts = () => {
error={!!portError}
message={portError}
disableWhileLoading
createLabel="Exposed ports"
/>
</div>
</div>
Expand Down
8 changes: 1 addition & 7 deletions src/apps/console/routes/_main+/_index.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
import { redirect } from '@remix-run/node';
import { GQLServerHandler } from '~/root/lib/server/gql/saved-queries';
import { IRemixCtx } from '~/root/lib/types/common';

export const loader = async (ctx: IRemixCtx) => {
const { data } = await GQLServerHandler(ctx.request).whoAmI();
if (data && !data.approved) {
return redirect(`/invite-code`);
}
export const loader = async () => {
return redirect('/teams');
};
91 changes: 0 additions & 91 deletions src/apps/console/routes/invite-code.tsx

This file was deleted.

15 changes: 0 additions & 15 deletions src/apps/console/server/gql/queries/access-queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ import {
ConsoleRejectInvitationMutationVariables,
ConsoleDeleteAccountMembershipMutation,
ConsoleDeleteAccountMembershipMutationVariables,
ConsoleVerifyInviteCodeMutation,
ConsoleVerifyInviteCodeMutationVariables,
} from '~/root/src/generated/gql/server';

export type IInvites = NN<
Expand Down Expand Up @@ -210,17 +208,4 @@ export const accessQueries = (executor: IExecutor) => ({
vars(_: ConsoleDeleteAccountMembershipMutationVariables) {},
}
),

verifyInviteCode: executor(
gql`
mutation Auth_verifyInviteCode($invitationCode: String!) {
auth_verifyInviteCode(invitationCode: $invitationCode)
}
`,
{
transformer: (data: ConsoleVerifyInviteCodeMutation) =>
data.auth_verifyInviteCode,
vars(_: ConsoleVerifyInviteCodeMutationVariables) {},
}
),
});
17 changes: 11 additions & 6 deletions src/apps/devdoc/pages/docs/_meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,13 @@
"title":"Getting Started"
},
"--reference--":{
"title":"Features",
"title":"Remote Env",
"type":"separator"
},
"managed-services":{
"title":"Managed Services"
},
"local-devices":{
"title":"Local Dev Containers"
"integrated-services":{
"title":"Integrated Services"
},

"any-wireguard":{
"title":"Wireguard devices"
},
Expand All @@ -34,6 +32,13 @@
"work-in-progress":{
"title":"Work in progress.."
},
"--develop-environment--":{
"title":"Dev Env",
"type":"separator"
},
"local-devices":{
"title":"Dev Containers"
},
"---references-":{
"title":"Reference",
"type":"separator"
Expand Down
2 changes: 1 addition & 1 deletion src/apps/devdoc/pages/docs/architecture.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Architecture

<img src="/arch.png" alt="dev-hell" className="wb-p-3xl wb-mt-3xl wb-bg-white" />
<img src="/arch1.png" alt="dev-hell" className="wb-p-3xl wb-mt-3xl wb-bg-white" />
36 changes: 32 additions & 4 deletions src/apps/devdoc/pages/docs/getting-started.mdx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import Steps from "~/app/components/steps";

## 4 Steps to Get Started
## 5 Steps to Get Started

<Steps>
### Attach Your Cluster
Attach your cluster to Kloudlite using a Helm chart. First, create a cluster reference in Kloudlite, then follow the steps to attach the cluster.
First, create a cluster reference in Kloudlite, then follow the steps to attach the cluster.
<img src="/attach-cluster-1.png" alt="" className="wb-p-3xl wb-mt-3xl wb-bg-white" />

<img src="/attach-cluster-2.png" alt="" className="wb-p-3xl wb-mt-3xl wb-bg-white" />
Expand All @@ -22,12 +22,40 @@ and import resources into the environment.
Once environment is created you can add configs, secrets, apps to it. You can also import
managed resources of managed services.

### Setup Kloudlite CLI
Kloudlite CLI is a command line tool that allows you to interact with Kloudlite. It provides a set of commands to manage clusters, environments, and other resources.

Setup kloudlite cli. Follow the below instructions or click [here](https://github.com/kloudlite/kl).
```bash
# Prerequisites:
docker run

# Install latest with curl
curl 'https://kl.kloudlite.io/kloudlite/kl!?select=kl' | bash

# Install latest with wget
wget -qO- 'https://kl.kloudlite.io/kloudlite/kl!?select=kl' | bash

# Install specific version
curl 'https://kl.kloudlite.io/kloudlite/[email protected]!?select=kl' | bash
```

Authentication:
```bash
# Login to Kloudlite
kl auth login

# Logout from Kloudlite
kl auth logout

# Status of Kloudlite authentication
kl auth status
```

### Set Up Your Local Machine
Once enviroment is created you can set up your local machine to connect to the environment
using the Kloudlite CLI.

Setup kloudlite cli. Follow the instructions [here](https://github.com/kloudlite/kl).

Choose your workspace directory and create a `kl.yaml` file with the following command:
```bash
kl init
Expand Down
8 changes: 8 additions & 0 deletions src/apps/devdoc/pages/docs/integrated-services/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"supported-services":{
"title": "Supported Services"
},
"kompose":{
"title": "Kompose"
}
}
2 changes: 2 additions & 0 deletions src/apps/devdoc/pages/docs/integrated-services/kompose.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Kompose
coming soon...
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Supported Services
Currently these are the list of services that are supported by kloudlite.

- PostgreSQL
- MySQL
- MongoDB
- Redis

You can create these services and respective resources seamlessly from kloudlite dashboard.
You will be able to import resources of the services inside your environment.
2 changes: 0 additions & 2 deletions src/apps/devdoc/pages/docs/managed-services.mdx

This file was deleted.

Binary file removed src/apps/devdoc/public/arch.png
Binary file not shown.
Binary file added src/apps/devdoc/public/arch1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions src/design-system/components/atoms/select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ const Select = <T, U extends boolean | undefined = undefined>(
noOptionMessage,
open,
disableWhileLoading,
createLabel,
} = props;

return (
Expand Down Expand Up @@ -161,6 +162,7 @@ const Select = <T, U extends boolean | undefined = undefined>(
searchable={searchable}
noOptionMessage={noOptionMessage}
disableWhileLoading={disableWhileLoading}
createLabel={createLabel}
/>
</div>
</div>
Expand Down
8 changes: 0 additions & 8 deletions src/generated/gql/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3633,14 +3633,6 @@ export type ConsoleDeleteAccountMembershipMutation = {
accounts_removeAccountMembership: boolean;
};

export type ConsoleVerifyInviteCodeMutationVariables = Exact<{
invitationCode: Scalars['String']['input'];
}>;

export type ConsoleVerifyInviteCodeMutation = {
auth_verifyInviteCode: boolean;
};

export type ConsoleGetCredTokenQueryVariables = Exact<{
username: Scalars['String']['input'];
}>;
Expand Down

0 comments on commit ce70028

Please sign in to comment.