From f8ec1be9b899cdfbc5f21ba4ef8fc5ccb18cf653 Mon Sep 17 00:00:00 2001 From: Jayasanka Date: Wed, 27 Mar 2019 19:17:07 +0530 Subject: [PATCH 1/5] Overrided css class for header --- .../react-app/src/index.css | 6 +++++ .../react-app/src/index.js | 22 +++++++++++---- .../src/pages/dashboard/Dashboard.js | 27 +++++++------------ 3 files changed, 32 insertions(+), 23 deletions(-) diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/index.css b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/index.css index 8b45ed5931f..99e53ee5b4d 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/index.css +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/index.css @@ -1,3 +1,9 @@ .App { padding: 20px; +} + +.ant-layout-header{ + padding: 0; + height: auto; + box-shadow: 0 2px 8px #f0f1f2; } \ No newline at end of file diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/index.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/index.js index 7ccba02f0c2..166528a210c 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/index.js +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/index.js @@ -1,10 +1,12 @@ import React from 'react'; import ReactDOM from 'react-dom'; -import './index.css'; import * as serviceWorker from './serviceWorker'; -import App from "./App" -import Login from "./pages/Login" -import Dashboard from "./pages/dashboard/Dashboard" +import App from "./App"; +import Login from "./pages/Login"; +import Dashboard from "./pages/dashboard/Dashboard"; +import Apps from "./pages/dashboard/apps/Apps"; +import AddNewApp from "./pages/dashboard/add-new-app/AddNewApp"; +import './index.css'; @@ -15,7 +17,17 @@ const routes = [ }, { path: '/publisher/dashboard', - component: Dashboard + component: Dashboard, + routes: [ + { + path: '/publisher/dashboard/apps', + component: Apps + }, + { + path: '/publisher/dashboard/new-app', + component: AddNewApp + } + ] } ] diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/pages/dashboard/Dashboard.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/pages/dashboard/Dashboard.js index cca9ef97b55..02815546af7 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/pages/dashboard/Dashboard.js +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/pages/dashboard/Dashboard.js @@ -1,5 +1,5 @@ import React from "react"; -import { Layout, Menu, Breadcrumb, PageHeader } from 'antd'; +import { Layout, Menu, Icon } from 'antd'; const { Header, Content, Footer } = Layout; @@ -7,7 +7,7 @@ import styles from './Dashboard.less'; import Logo from "../../../public/images/logo.svg"; import Login from "../Login"; import {renderRoutes} from "react-router-config"; -import {NavLink} from "react-router-dom"; +import {Link, NavLink} from "react-router-dom"; import RouteWithSubRoutes from "../../components/RouteWithSubRoutes" @@ -30,25 +30,16 @@ class Dashboard extends React.Component { defaultSelectedKeys={['2']} style={{ lineHeight: '64px' }} > - nav 1 - nav 2 - nav 3 + Apps + Apps + Add New App - - Home - List - App - - -
- {this.state.routes.map((route) => ( - - ))} -
+ {this.state.routes.map((route) => ( + + ))} +