Skip to content

Commit

Permalink
Features/deploy rebrand (#149)
Browse files Browse the repository at this point in the history
* small fixes stats app

* decimal increase stats dashboard

* styles copy from stats

* added shadcd components + layout

* shadcn import cleanup

* Layout component with home page setup

* layout setup tailwind nextjs

* update stats app nextjs 14.1

* tailwind css app layout render

* fix layout sidebar

* mobile sidebar user components

* added wallet provider

* account menu

* nav improvements

* sidebar styling

* fix linear loading

* added certificate provider context

* added form components

* refactor popup component

* sidebar fix ux

* added the new deployment page container

* added custom stepper

* added/refactored template list

* small fixes

* refactor simple service form control

* Env form modal refactor

* command form modal

* textarea auto resize

* expose form modal refactor

* placement modal refactor

* sdl builder resources form components refactor

* Update placement form labels and add token form control

* successful rendering of sdl builder/manifest edit

* fix pino pretty error

* fix dynamic monaco editor

* fix styling deployment name

* Update tooltips and input component

* cpu + gpu form controls

* resources form controls

* Update z-index and pointer-events in index.css, fix import in GranteeDepositMenuItem.tsx, update class names in CommandList.tsx and EnvVarList.tsx, adjust z-index in dialog.tsx

* token form control sdl builder

* fix placement form modal

* end form modal

* command form control

* expose form modal + fix dialog scrolling

* hasSecretOption false for sdl builder in create deployment

* refactor components inside create lease

* added radio button + fix bid row/group

* refactor create lease

* typing

* fix

* remove manifest error snackabar

* spec detail refactoring

* spec detail refactor

* bid group refactor

* create lease page refactor styling

* remove comments wallet provider

* api version for server side rendered pages

* added leases + provider to list of address deployments

* added mui + deployment list refactor

* fixes

* move new deployment components in app folder

* move pre-requisites list

* fix errors post rebase

* move deployment detail components into app folder

* deployment detail head

* deployment detail refactor + manifest update

* refactor LeaseRow component

* refactor deployment logs component

* deployment lease shell refactor 1

* refactor deployment lease shell component

* fixes

* provider list refactor

* provider list refactor

* added useTailwind hook for config in js

* provier list page

* fix provider map markers

* provider detail page

* provider graph fixes

* refactor provider lease list

* refactor provider raw data page

* provider edit form

* fix gpu form after rebase

* fix provider edit form

* fix edit provider form

* rent gpu page

* rent gpu form

* temp fix region select

* update metadata
  • Loading branch information
baktun14 authored Apr 3, 2024
1 parent d2b4a38 commit 883ce79
Show file tree
Hide file tree
Showing 300 changed files with 28,478 additions and 42,724 deletions.
29 changes: 27 additions & 2 deletions api/src/services/external/apiNodeService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@ import { CosmosBankSupplyResponse } from "@src/types/rest/cosmosBankSupplyRespon
import { CosmosMintInflationResponse } from "@src/types/rest/cosmosMintInflationResponse";
import { CosmosDistributionParamsResponse } from "@src/types/rest/cosmosDistributionParamsResponse";
import { CosmosDistributionValidatorsCommissionResponse } from "@src/types/rest/cosmosDistributionValidatorsCommissionResponse";
import { getProviderList } from "../db/providerStatusService";

const defaultNodeUrlMapping: { [key: string]: string } = {
mainnet: "https://rest.cosmos.directory/akash",
mainnet: "https://api.akashnet.net:443",
sandbox: "https://api.sandbox-01.aksh.pw",
testnet: "https://api.testnet-02.aksh.pw"
};
Expand Down Expand Up @@ -456,13 +457,22 @@ export async function getAddressDeployments(owner: string, skip: number, limit:
}
});

const leaseResponse = await axios.get<RestAkashLeaseListResponse>(`${apiNodeUrl}/akash/market/${betaTypeVersionMarket}/leases/list`, {
params: {
"filters.owner": owner,
"filters.state": "active"
}
});
const providers = await getProviderList();

return {
count: parseInt(response.data.pagination.total),
results: response.data.deployments.map((x) => ({
owner: x.deployment.deployment_id.owner,
dseq: x.deployment.deployment_id.dseq,
status: x.deployment.state,
createdHeight: parseInt(x.deployment.created_at),
escrowAccount: x.escrow_account,
cpuUnits: x.groups
.map((g) => g.group_spec.resources.map((r) => parseInt(r.resource.cpu.units.val) * r.count).reduce((a, b) => a + b, 0))
.reduce((a, b) => a + b, 0),
Expand All @@ -478,7 +488,22 @@ export async function getAddressDeployments(owner: string, skip: number, limit:
.map((r) => r.resource.storage.map((s) => parseInt(s.quantity.val)).reduce((a, b) => a + b, 0) * r.count)
.reduce((a, b) => a + b, 0)
)
.reduce((a, b) => a + b, 0)
.reduce((a, b) => a + b, 0),
leases: leaseResponse.data.leases
.filter((l) => l.lease.lease_id.dseq === x.deployment.deployment_id.dseq)
.map((lease) => {
const provider = providers.find((p) => p.owner === lease.lease.lease_id.provider);
return {
id: lease.lease.lease_id.dseq + lease.lease.lease_id.gseq + lease.lease.lease_id.oseq,
owner: lease.lease.lease_id.owner,
provider: provider,
dseq: lease.lease.lease_id.dseq,
gseq: lease.lease.lease_id.gseq,
oseq: lease.lease.lease_id.oseq,
state: lease.lease.state,
price: lease.lease.price
};
})
}))
};
}
3 changes: 3 additions & 0 deletions deploy-web/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "next/core-web-vitals"
}
4 changes: 2 additions & 2 deletions deploy-web/components.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"cssVariables": true
},
"aliases": {
"components": "@/components",
"utils": "@/lib/utils"
"components": "@src/components",
"utils": "@src/utils/styleUtils"
}
}
1 change: 1 addition & 0 deletions deploy-web/next-env.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
/// <reference types="next/navigation-types/compat/navigation" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
1 change: 1 addition & 0 deletions deploy-web/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ const moduleExports = {
config.externals.push({
"node:crypto": "crypto"
});
config.externals.push("pino-pretty");
return config;
},
redirects: async () => {
Expand Down
Loading

0 comments on commit 883ce79

Please sign in to comment.