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

tanvipenumudy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git


The following commit(s) were added to refs/heads/master by this push:
     new 2eed61cdfa HDDS-11188. Initial setup for new UI layout and enable 
users to switch to new UI (#6953)
2eed61cdfa is described below

commit 2eed61cdfa05adef71d35fab08efdc157d77a0f4
Author: Abhishek Pal <[email protected]>
AuthorDate: Tue Jul 23 18:08:15 2024 +0530

    HDDS-11188. Initial setup for new UI layout and enable users to switch to 
new UI (#6953)
---
 .../webapps/recon/ozone-recon-web/src/app.tsx      | 27 ++++++++++++++++------
 1 file changed, 20 insertions(+), 7 deletions(-)

diff --git 
a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/app.tsx
 
b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/app.tsx
index d0f498505b..3fec211e7e 100644
--- 
a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/app.tsx
+++ 
b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/app.tsx
@@ -18,15 +18,15 @@
 
 import React from 'react';
 
-import { Layout } from 'antd';
-import './app.less';
+import { Switch as AntDSwitch, Layout } from 'antd';
 import NavBar from './components/navBar/navBar';
 import Breadcrumbs from './components/breadcrumbs/breadcrumbs';
 import { HashRouter as Router, Switch, Route, Redirect } from 
'react-router-dom';
-import { routes } from './routes';
-import { MakeRouteWithSubRoutes } from './makeRouteWithSubRoutes';
+import { routes } from '@/routes';
+import { MakeRouteWithSubRoutes } from '@/makeRouteWithSubRoutes';
 import classNames from 'classnames';
 
+import './app.less';
 
 const {
   Header, Content, Footer
@@ -34,12 +34,16 @@ const {
 
 interface IAppState {
   collapsed: boolean;
+  enableNewUI: boolean;
 }
 
 class App extends React.Component<Record<string, object>, IAppState> {
   constructor(props = {}) {
     super(props);
-    this.state = { collapsed: false };
+    this.state = {
+      collapsed: false,
+      enableNewUI: false
+    };
   }
 
   onCollapse = (collapsed: boolean) => {
@@ -50,14 +54,23 @@ class App extends React.Component<Record<string, object>, 
IAppState> {
     const { collapsed } = this.state;
     const layoutClass = classNames('content-layout', { 'sidebar-collapsed': 
collapsed });
 
+
     return (
       <Router>
         <Layout style={{ minHeight: '100vh' }}>
           <NavBar collapsed={collapsed} onCollapse={this.onCollapse} />
           <Layout className={layoutClass}>
             <Header>
-              <div style={{ margin: '16px 0' }}>
+              <div style={{ margin: '16px 0', display: 'flex', justifyContent: 
'space-between' }}>
                 <Breadcrumbs />
+                <AntDSwitch
+                  disabled={true}
+                  checkedChildren={<div style={{ paddingLeft: '2px' }}>New 
UI</div>}
+                  onChange={(checked: boolean) => {
+                    this.setState({
+                      enableNewUI: checked
+                    });
+                  }} />
               </div>
             </Header>
             <Content style={{ margin: '0 16px 0', overflow: 'initial' }}>
@@ -80,4 +93,4 @@ class App extends React.Component<Record<string, object>, 
IAppState> {
   }
 }
 
-export default App;
+export default App;
\ No newline at end of file


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to