This is an automated email from the ASF dual-hosted git repository.

jbonofre pushed a commit to branch ui
in repository https://gitbox.apache.org/repos/asf/polaris-tools.git


The following commit(s) were added to refs/heads/ui by this push:
     new bd25e5d  Update
bd25e5d is described below

commit bd25e5d1950b185cb6e42fe5842a58c624e972f3
Author: JB Onofré <[email protected]>
AuthorDate: Sat Oct 25 15:48:32 2025 +0200

    Update
---
 ui/src/catalog.tsx   | 85 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 ui/src/login.tsx     |  2 +-
 ui/src/workspace.tsx | 16 ++++++----
 3 files changed, 96 insertions(+), 7 deletions(-)

diff --git a/ui/src/catalog.tsx b/ui/src/catalog.tsx
new file mode 100644
index 0000000..ad058de
--- /dev/null
+++ b/ui/src/catalog.tsx
@@ -0,0 +1,85 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+*/
+import { Link } from 'react-router-dom';
+import { Breadcrumb, Card, Form, Input, Tabs, Collapse, Divider, Button, Space 
} from 'antd';
+import { HomeOutlined, ApartmentOutlined, AmazonOutlined, GoogleOutlined, 
CloudOutlined, FileSyncOutlined, SaveOutlined, PauseCircleOutlined } from 
'@ant-design/icons';
+
+export default function Catalog(props) {
+
+    const [ catalogForm ] = Form.useForm();
+
+    const tabItems = [
+        {
+            key: 's3',
+            label: 'AWS S3',
+            icon: <AmazonOutlined/>,
+            children: <p>S3</p>
+        },
+        {
+            key: 'gcp',
+            label: 'GCP',
+            icon: <GoogleOutlined/>,
+            children: <p>GCP</p>
+        },
+        {
+            key: 'azure',
+            label: 'Azure',
+            icon: <CloudOutlined/>,
+            children: <p>Azure</p>
+        },
+        {
+            key: 'local',
+            label: 'Local',
+            icon: <FileSyncOutlined/>,
+            children: <p>File</p>
+        }
+    ];
+
+    return(
+      <>
+      <Breadcrumb items={[ { title: <Link to="/"><HomeOutlined/></Link> }, { 
title: <ApartmentOutlined/> } ]} />
+      <Card title="Create Catalog" style={{ width: '100%' }}>
+        <Form name="catalog" form={catalogForm} labelCol={{ span: 8 }}
+            wrapperCol={{ span: 16 }}
+            style={{ width: '100%' }}>
+            <Form.Item name="name" label="Name">
+                <Input allowClear={true} />
+            </Form.Item>
+            <Form.Item name="location" label="Default Base Location">
+                <Input allowClear={true} />
+            </Form.Item>
+            <Divider/>
+            <Tabs centered items={tabItems} />
+            <Divider/>
+            <Collapse items={[
+                { key: '1', label: 'Properties', children: <p>Properties</p> }
+            ]}/>
+            <Divider/>
+            <Form.Item label={null}>
+                <Space>
+                    <Button type="primary" icon={<SaveOutlined/>}>Save</Button>
+                    <Button icon={<PauseCircleOutlined/>}>Cancel</Button>
+                </Space>
+            </Form.Item>
+        </Form>
+      </Card>
+      </>
+    );
+
+}
\ No newline at end of file
diff --git a/ui/src/login.tsx b/ui/src/login.tsx
index d06b938..22bffe0 100644
--- a/ui/src/login.tsx
+++ b/ui/src/login.tsx
@@ -32,7 +32,7 @@ export default function Login(props) {
                 console.log(values);
 
                 const fetchUser = () => {
-                    fetch('./api/catalog/v1/oauth/tokens', {
+                    fetch('/api/catalog/v1/oauth/tokens', {
                         method: 'POST',
                         headers: {
                             "Content-Type": "application/x-www-form-urlencoded"
diff --git a/ui/src/workspace.tsx b/ui/src/workspace.tsx
index 5c2d51e..b81d467 100644
--- a/ui/src/workspace.tsx
+++ b/ui/src/workspace.tsx
@@ -22,8 +22,9 @@ import { Layout, Input, Col, Row, Image, Menu, Space, Spin, 
message } from 'antd
 import { Route, Switch } from 'react-router';
 import { BrowserRouter as Router } from 'react-router-dom';
 import { Link } from 'react-router-dom';
-import { UserOutlined, BlockOutlined, SettingOutlined, DeleteOutlined, 
PlayCircleOutlined, LogoutOutlined, ApartmentOutlined, DashboardOutlined, 
AreaChartOutlined, NotificationOutlined, SafetyOutlined, TeamOutlined, 
BuildOutlined, CrownOutlined, ProfileOutlined, CheckSquareOutlined, 
PlusCircleOutlined } from '@ant-design/icons';
+import { HomeOutlined, UserOutlined, BlockOutlined, SettingOutlined, 
DeleteOutlined, PlayCircleOutlined, LogoutOutlined, ApartmentOutlined, 
DashboardOutlined, AreaChartOutlined, NotificationOutlined, SafetyOutlined, 
TeamOutlined, BuildOutlined, CrownOutlined, ProfileOutlined, 
CheckSquareOutlined, PlusCircleOutlined } from '@ant-design/icons';
 import Home from './home.tsx';
+import Catalog from './catalog.tsx';
 
 function SideMenu(props) {
 
@@ -33,7 +34,7 @@ function SideMenu(props) {
     const bearer = 'Bearer ' + props.token;
 
     const fetchCatalogs = () => {
-        fetch('./api/management/v1/catalogs', {
+        fetch('/api/management/v1/catalogs', {
             method: 'GET',
             headers: {
                 'Content-Type': 'application/json',
@@ -62,14 +63,14 @@ function SideMenu(props) {
     const catalogElementsMenu = catalogs.map((element) => {
         return({
            key: element.name,
-           label:element.name,
+           label: element.name,
            icon: <ApartmentOutlined/>
         });
     });
     const newCatalogMenu = [
         {
             key: 'catalog/create',
-            label: 'Create New',
+            label: <Link to="/catalog/create">Create</Link>,
             icon: <PlusCircleOutlined/>,
         }
     ];
@@ -77,6 +78,7 @@ function SideMenu(props) {
     const catalogMenu = newCatalogMenu.concat(catalogElementsMenu);
 
     const mainMenu = [
+        { key: 'home', label: <Link to="/">Home</Link>, icon: <HomeOutlined/> 
},
         { key: 'catalogs', label: 'Catalogs', icon: <BlockOutlined/>, 
children: catalogMenu },
         { key: 'governance', label: 'Governance', icon: <SafetyOutlined/>, 
children: [
             { key: 'principals', label: 'Principals', icon: <UserOutlined/> },
@@ -118,7 +120,7 @@ function Header(props) {
     return(
         <Layout.Header style={{ height: "80px", background: "#fff", padding: 
"5px", margin: "10px" }}>
             <Row align="middle" justify="center" wrap="false">
-                <Col span={3}><Image src="./logo.png" preview={false} 
width={60}/></Col>
+                <Col span={3}><Image src="/logo.png" preview={false} 
width={50}/></Col>
                 <Col span={19}><Search /></Col>
                 <Col span={2}><Menu items={userMenu} onClick={(e) => {
                     if (e.key === 'logout') {
@@ -135,7 +137,6 @@ function Header(props) {
 }
 
 export default function Workspace(props) {
-
     return(
         <Layout style={{ height: "105vh" }}>
             <Header user={props.user} setUser={props.setUser} />
@@ -147,6 +148,9 @@ export default function Workspace(props) {
                         <Route path="/" key="home" exact={true}>
                             <Home user={props.user} token={props.token} />
                         </Route>
+                        <Route path="/catalog/create" key="catalog-create" 
exact={true}>
+                            <Catalog token={props.token} />
+                        </Route>
                     </Switch>
                 </Layout.Content>
                 </Router>

Reply via email to