Skip to content

Commit

Permalink
fix(app/project/cluster):
Browse files Browse the repository at this point in the history
- add image pull policy of app in advanced options
- change project review page as per figma
- removes vms from infra and make cluster tab flat
  • Loading branch information
nxtcoder19 committed Mar 15, 2024
1 parent 94293fd commit 0e0e036
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 55 deletions.
12 changes: 5 additions & 7 deletions src/apps/console/page-components/new-project.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -181,18 +181,16 @@ const NewProject = () => {
jumpStep(1);
}}
>
<div className="flex flex-col p-xl gap-lg rounded border border-border-default flex-1 overflow-hidden">
<div className="flex flex-col gap-md pb-lg border-b border-border-default">
<div className="flex flex-row justify-between p-xl gap-lg rounded border border-border-default flex-1 overflow-hidden">
<div className="flex flex-col gap-md">
<div className="bodySm text-text-soft">Project name</div>
<div className="bodyMd-semibold text-text-default">
Project name
{values.name}
</div>
<div className="bodySm text-text-soft">{values.name}</div>
</div>
<div className="flex flex-col gap-md">
<div className="bodySm text-text-soft">Cluster</div>
<div className="bodyMd-semibold text-text-default">
Cluster
</div>
<div className="bodySm text-text-soft">
{values.clusterName}
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { ensureAccountSet } from '~/console/server/utils/auth-utils';
import logger from '~/root/lib/client/helpers/log';
import { IRemixCtx } from '~/root/lib/types/common';


const _NewProject = () => {
return <NewProject />;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -334,15 +334,17 @@ const AppCompute = () => {
/>
)}

<Checkbox
label="Image Pull Policy"
checked={values.imagePullPolicy === 'Always'}
onChange={(val) => {
const imagePullPolicy = val ? 'Always' : 'IfNotPresent';
console.log(imagePullPolicy);
handleChange('imagePullPolicy')(dummyEvent(imagePullPolicy));
}}
/>
{advancedOptions && (
<Checkbox
label="Image Pull Policy"
checked={values.imagePullPolicy === 'Always'}
onChange={(val) => {
const imagePullPolicy = val ? 'Always' : 'IfNotPresent';
console.log(imagePullPolicy);
handleChange('imagePullPolicy')(dummyEvent(imagePullPolicy));
}}
/>
)}
</div>

<div className="flex flex-col">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,16 +114,20 @@ const AppReview = () => {
</div>
</div>
</ReviewComponent>
<ReviewComponent title="Nodepool Details" onEdit={() => {}}>
<div className="flex flex-col p-xl gap-md rounded border border-border-default">
<div className="bodyMd-semibold text-text-default">
Nodepool Selector
</div>
<div className="bodySm text-text-soft">
{app.spec.nodeSelector[keyconstants.nodepoolName]}

{app.spec.nodeSelector[keyconstants.nodepoolName] !== '' && (
<ReviewComponent title="Nodepool Details" onEdit={() => {}}>
<div className="flex flex-col p-xl gap-md rounded border border-border-default">
<div className="bodyMd-semibold text-text-default">
Nodepool Selector
</div>
<div className="bodySm text-text-soft">
{app.spec.nodeSelector[keyconstants.nodepoolName]}
</div>
</div>
</div>
</ReviewComponent>
</ReviewComponent>
)}

<ReviewComponent
title="Environment"
onEdit={() => {
Expand Down
22 changes: 1 addition & 21 deletions src/apps/console/routes/_main+/$account+/infra+/_layout.tsx
Original file line number Diff line number Diff line change
@@ -1,28 +1,8 @@
import { Outlet, useOutletContext } from '@remix-run/react';
import SidebarLayout from '~/console/components/sidebar-layout';
import { useSubNavData } from '~/root/lib/client/hooks/use-create-subnav-action';
import { useHandleFromMatches } from '~/root/lib/client/hooks/use-custom-matches';

const Infra = () => {
const rootContext = useOutletContext();
const subNavAction = useSubNavData();
const noLayout = useHandleFromMatches('noLayout', null);

if (noLayout) {
return <Outlet context={rootContext} />;
}
return (
<SidebarLayout
navItems={[
{ label: 'Clusters', value: 'clusters' },
{ label: 'VM instances', value: 'vms' },
]}
parentPath="/infra"
headerActions={subNavAction.data}
>
<Outlet context={rootContext} />
</SidebarLayout>
);
return <Outlet context={rootContext} />;
};

export default Infra;
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ const Clusters = () => {
const { pageInfo, totalCount } = clustersData;
return (
<Wrapper
secondaryHeader={{
header={{
title: 'Clusters',
action: clusters.length > 0 && (
<Button
Expand Down
7 changes: 0 additions & 7 deletions src/apps/console/routes/_main+/$account+/infra+/vms.tsx

This file was deleted.

0 comments on commit 0e0e036

Please sign in to comment.