Skip to content

Commit

Permalink
4205 // Update antd props
Browse files Browse the repository at this point in the history
Signed-off-by: Dinika Saxena <dinikasaxenas@gmail.com>
  • Loading branch information
Dinika committed Oct 4, 2023
1 parent 4050968 commit 2f07049
Show file tree
Hide file tree
Showing 48 changed files with 2,035 additions and 1,694 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ cypress.env.json
.idea
*.sops*
.sops-*.*
*.key
*.key
1 change: 0 additions & 1 deletion dist_refresh/manifest.json

This file was deleted.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"ajv": "^8.10.0",
"ajv-errors": "^3.0.0",
"ajv-formats": "^2.1.1",
"antd": "^5.8.3",
"antd": "^5.9.4",
"bodybuilder": "^2.2.25",
"clsx": "^1.2.1",
"codemirror": "^5.58.2",
Expand Down Expand Up @@ -85,7 +85,7 @@
"react-device-detect": "^2.2.3",
"react-dom": "^18.2.0",
"react-draggable": "^4.4.3",
"react-helmet": "^5.2.0",
"react-helmet": "^6.1.0",
"react-infinite-scroll-component": "^4.5.3",
"react-json-view": "^1.21.3",
"react-mde": "^11.0.0",
Expand Down Expand Up @@ -148,7 +148,7 @@
"@types/query-string": "^6.3.0",
"@types/react": "^18.2.18",
"@types/react-dom": "^18.2.7",
"@types/react-helmet": "^5.0.7",
"@types/react-helmet": "^6.1.7",
"@types/react-infinite-scroll-component": "^4.2.5",
"@types/react-input-mask": "^3.0.2",
"@types/react-redux": "^7.1.24",
Expand Down
269 changes: 145 additions & 124 deletions src/pages/ProjectPage/ProjectPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ const ProjectView: React.FunctionComponent = () => {
const location = useLocation();
const history = useHistory();
const subapp = useOrganisationsSubappContext();
const { TabPane } = Tabs;

const match = useRouteMatch<{
orgLabel: string;
Expand Down Expand Up @@ -264,132 +263,154 @@ const ProjectView: React.FunctionComponent = () => {
/>
)}
<div className="tabs-container">
<Tabs onChange={handleTabChange} activeKey={activeKey}>
<TabPane tab="Browse" key="browse">
<div className="list-board">
<div className="wrapper">
<ResourceListBoardContainer
orgLabel={orgLabel}
projectLabel={projectLabel}
refreshLists={refreshLists}
<Tabs
onChange={handleTabChange}
activeKey={activeKey}
items={[
{
key: 'browse',
label: 'Browse',
children: (
<div className="list-board">
<div className="wrapper">
<ResourceListBoardContainer
orgLabel={orgLabel}
projectLabel={projectLabel}
refreshLists={refreshLists}
/>
</div>
</div>
),
},
{
key: 'query',
label: 'Query',
children: (
<div style={{ flexGrow: 1 }}>
<QueryEditor
orgLabel={orgLabel}
projectLabel={projectLabel}
onUpdate={() => {
setRefreshLists(!refreshLists);
// Statistics aren't immediately updated so pause polling briefly
pauseStatisticsPolling(5000);
}}
/>
</div>
),
},
{
key: 'create_upload',
label: 'Create and Upload',
children: (
<AccessControl
path={`/${orgLabel}/${projectLabel}`}
permissions={['files/write']}
noAccessComponent={() => (
<Empty>
You don't have the access to create/upload. Please
contact the Administrator for access.
</Empty>
)}
>
<ResourceCreateUploadContainer
orgLabel={orgLabel}
projectLabel={projectLabel}
/>
</AccessControl>
),
},
{
key: 'stats',
label: 'Statistics',
children: (
<AccessControl
key="quotas-access-control"
path={`/${orgLabel}/${projectLabel}`}
permissions={['test']}
noAccessComponent={() => (
<Empty>
You don't have read access to quotas. Please contact
the Administrator for access.
</Empty>
)}
>
<QuotasContainer
orgLabel={orgLabel}
projectLabel={projectLabel}
/>
<StoragesContainer
orgLabel={orgLabel}
projectLabel={projectLabel}
/>
</AccessControl>
),
},
{
key: 'settings',
label: 'Settings',
children: (
<SettingsContainer
project={{
_label: project._label,
_rev: project._rev,
description: project.description || '',
base: project.base,
vocab: project.vocab,
_deprecated: project._deprecated,
}}
apiMappings={project.apiMappings}
mode="edit"
/>
</div>
</div>
</TabPane>
<TabPane tab="Query" key="query">
<div style={{ flexGrow: 1 }}>
<QueryEditor
orgLabel={orgLabel}
projectLabel={projectLabel}
onUpdate={() => {
setRefreshLists(!refreshLists);
// Statistics aren't immediately updated so pause polling briefly
pauseStatisticsPolling(5000);
}}
/>
</div>
</TabPane>
<TabPane tab="Create and Upload" key="create_upload">
<AccessControl
path={`/${orgLabel}/${projectLabel}`}
permissions={['files/write']}
noAccessComponent={() => (
<Empty>
You don't have the access to create/upload. Please contact
the Administrator for access.
</Empty>
)}
>
<ResourceCreateUploadContainer
orgLabel={orgLabel}
projectLabel={projectLabel}
/>
</AccessControl>
</TabPane>
<TabPane tab="Statistics" key="stats">
<AccessControl
key="quotas-access-control"
path={`/${orgLabel}/${projectLabel}`}
permissions={['test']}
noAccessComponent={() => (
<Empty>
You don't have read access to quotas. Please contact the
Administrator for access.
</Empty>
)}
>
<QuotasContainer
orgLabel={orgLabel}
projectLabel={projectLabel}
/>
<StoragesContainer
orgLabel={orgLabel}
projectLabel={projectLabel}
/>
</AccessControl>
</TabPane>
<TabPane tab="Settings" key="settings">
<SettingsContainer
project={{
_label: project._label,
_rev: project._rev,
description: project.description || '',
base: project.base,
vocab: project.vocab,
_deprecated: project._deprecated,
}}
apiMappings={project.apiMappings}
mode="edit"
/>
</TabPane>
{deltaPlugins &&
),
},
...(deltaPlugins &&
'jira' in deltaPlugins &&
isUserInSupportedJiraRealm &&
!jiraInaccessibleBecauseOfVPN && (
<TabPane tab="Jira" key="jira">
<JiraPluginProjectContainer
orgLabel={orgLabel}
projectLabel={projectLabel}
/>
</TabPane>
)}
{deltaPlugins && 'graph-analytics' in deltaPlugins && (
<TabPane tab="Graph Analytics" key="graph-analytics">
<ProjectStatsContainer
orgLabel={orgLabel}
projectLabel={projectLabel}
/>
</TabPane>
)}
<TabPane
tab={
<span>
<Link
target="_blank"
rel="noopener noreferrer"
to={`/studios/${orgLabel}/${projectLabel}/studios`}
>
<SelectOutlined /> Studios
</Link>
</span>
}
key="studios"
></TabPane>
{/* <TabPane
tab={
<span>
<Link
target="_blank"
rel="noopener noreferrer"
to={`/workflow/${orgLabel}/${projectLabel}`}
>
<SelectOutlined /> Workflows
</Link>
</span>
}
key="workflows"
></TabPane> */}
</Tabs>
!jiraInaccessibleBecauseOfVPN
? [
{
key: 'jira',
label: 'Jira',
children: (
<JiraPluginProjectContainer
orgLabel={orgLabel}
projectLabel={projectLabel}
/>
),
},
]
: []),
...(deltaPlugins && 'graph-analytics' in deltaPlugins
? [
{
key: 'graph-analytics',
label: 'Graph Analytics',
children: (
<ProjectStatsContainer
orgLabel={orgLabel}
projectLabel={projectLabel}
/>
),
},
]
: []),
{
key: 'studios',
label: (
<span>
<Link
target="_blank"
rel="noopener noreferrer"
to={`/studios/${orgLabel}/${projectLabel}/studios`}
>
<SelectOutlined /> Studios
</Link>
</span>
),
},
]}
/>
</div>
</>
)}
Expand Down
Loading

0 comments on commit 2f07049

Please sign in to comment.