Merge branch 'application-mgt-new' of https://gitlab.com/entgra/carbon-device-mgt into application-mgt-new

feature/appm-store/pbac
nipunnadeen 5 years ago
commit 95b1b1e4fd

@ -1,17 +1,11 @@
{ {
"theme": { "theme": {
"type": "default", "logo" : "https://localhost:9443/entgra/public/images/logo.svg",
"value": "lightBaseTheme",
"logo" : "https://entgra.io/assets/images/svg/logo.svg",
"primaryColor": "rgb(24, 144, 255)" "primaryColor": "rgb(24, 144, 255)"
}, },
"serverConfig": { "serverConfig": {
"invokerUri": "/ui-request-handler/invoke/application-mgt-entgra/v1.0",
"invoker": { "invoker": {
"uri": "/entgra-ui-request-handler/invoke", "uri": "/entgra-ui-request-handler/invoke",
"publisher": "/application-mgt-publisher/v1.0",
"entgra": "/application-mgt-entgra/v1.0",
"admin" : "",
"deviceMgt" : "/device-mgt/v1.0" "deviceMgt" : "/device-mgt/v1.0"
}, },
"loginUri": "/entgra-ui-request-handler/login", "loginUri": "/entgra-ui-request-handler/login",

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 42 KiB

@ -17,51 +17,85 @@
*/ */
.ant-upload.ant-upload-drag { .ant-upload.ant-upload-drag {
height: 170px; height: 170px;
} }
.release .release-icon{ .release .release-icon {
margin-right: 15px; margin-right: 15px;
} }
.release .release-icon img{ .release .release-icon img {
width: 100%; width: 100%;
border-radius: 28%; border-radius: 28%;
} }
.release .release-title{ .release .release-title {
margin-left: 15px; margin-left: 15px;
} }
.release .release-screenshot img{ .release .release-screenshot img {
width: 100%; width: 100%;
border-radius: 15px; border-radius: 15px;
padding: 5px; padding: 5px;
} }
.logo-image { /*.logo-image {*/
/*width: 120px;*/ /*!*width: 120px;*!*/
height: 31px; /*height: 31px;*/
margin: 0 5px 16px 24px; /*margin: 0 5px 16px 24px;*/
float: left; /*float: left;*/
/*}*/
.main-container {
background: #f0f2f5;
min-height: 780px
} }
.logo-image img{ .profile {
height: 35px; float: right;
margin-right: 2%;
} }
.main-container{ @media only screen and (min-width: 768px) {
background: #f0f2f5; .main-container {
min-height: 780px padding: 24px;
}
} }
.profile{ .layout .trigger {
float:right; font-size: 18px;
margin-right: 2%; /*line-height: 64px;*/
padding: 0 24px;
cursor: pointer;
transition: color 0.3s;
float: left;
} }
@media only screen and (min-width: 768px) { .layout .trigger:hover {
.main-container{ color: #1890ff;
padding: 24px; }
}
.layout .logo-image {
position: relative;
height: 64px;
padding-left: 8px;
overflow: hidden;
line-height: 64px;
background: #001529;
transition: all .3s;
}
.layout .brand{
display: inline-block;
color: #fff;
font-weight: 600;
font-size: 20px;
font-family: Avenir,Helvetica Neue,Arial,Helvetica,sans-serif;
vertical-align: middle;
}
.layout .logo-image img {
height: 32px;
margin: 16px;
} }

@ -17,7 +17,7 @@
*/ */
import React from "react"; import React from "react";
import {Layout, Menu, Icon} from 'antd'; import {Layout, Menu, Icon, Typography} from 'antd';
import {Switch, Link} from "react-router-dom"; import {Switch, Link} from "react-router-dom";
import RouteWithSubRoutes from "../../components/RouteWithSubRoutes" import RouteWithSubRoutes from "../../components/RouteWithSubRoutes"
import {Redirect} from 'react-router' import {Redirect} from 'react-router'
@ -25,9 +25,10 @@ import "../../App.css";
import {withConfigContext} from "../../context/ConfigContext"; import {withConfigContext} from "../../context/ConfigContext";
import Logout from "./Logout/Logout"; import Logout from "./Logout/Logout";
const {Header, Content, Footer} = Layout; const {Header, Content, Footer, Sider} = Layout;
const {SubMenu} = Menu; const {SubMenu} = Menu;
const {Title} = Typography;
class Dashboard extends React.Component { class Dashboard extends React.Component {
constructor(props) { constructor(props) {
@ -35,56 +36,92 @@ class Dashboard extends React.Component {
this.state = { this.state = {
routes: props.routes, routes: props.routes,
selectedKeys: [], selectedKeys: [],
deviceTypes: [] deviceTypes: [],
isNavBarCollapsed: false,
}; };
this.logo = this.props.context.theme.logo; this.logo = this.props.context.theme.logo;
} }
toggle = () => {
this.setState({
isNavBarCollapsed: !this.state.isNavBarCollapsed,
});
};
render() { render() {
return ( return (
<div> <div>
<Layout className="layout"> <Layout className="layout" >
<Header style={{paddingLeft: 0, paddingRight: 0}}> <Sider
trigger={null}
collapsible
collapsed={this.state.isNavBarCollapsed}>
<div className="logo-image"> <div className="logo-image">
<img alt="logo" src={this.logo}/> <img alt="logo" src={this.logo}/>
<span className="brand">Entgra</span>
</div> </div>
<Menu <Menu theme="dark" mode="inline" defaultSelectedKeys={['devices']}>
theme="light" <Menu.Item key="devices">
mode="horizontal" <Link to="/entgra/devices">
defaultSelectedKeys={['1']} <Icon type="appstore"/>
style={{lineHeight: '64px'}} <span>Devices</span>
> </Link>
<Menu.Item key="devices"><Link to="/entgra/devices"><Icon type="appstore"/>Devices</Link></Menu.Item> </Menu.Item>
<Menu.Item key="geo"><Link to="/entgra/geo"><Icon type="environment"/>Geo</Link></Menu.Item> <Menu.Item key="geo">
<Menu.Item key="reports"><Link to="/entgra/reports"><Icon type="bar-chart"/>Reports</Link></Menu.Item> <Link to="/entgra/geo">
<Icon type="environment"/>
<span>Geo</span>
</Link>
</Menu.Item>
<Menu.Item key="reports">
<Link to="/entgra/reports">
<Icon type="bar-chart"/>
<span>Reports</span>
</Link>
</Menu.Item>
</Menu>
</Sider>
<Layout>
<Header style={{background: '#fff', padding: 0}}>
<div className="trigger">
<Icon
type={this.state.isNavBarCollapsed ? 'menu-unfold' : 'menu-fold'}
onClick={this.toggle}
/>
</div>
<Menu
theme="light"
mode="horizontal"
style={{lineHeight: '64px'}}
>
<Menu.Item key="trigger">
<SubMenu className="profile" </Menu.Item>
title={ <SubMenu className="profile"
<span className="submenu-title-wrapper"> title={
<span className="submenu-title-wrapper">
<Icon type="user"/> <Icon type="user"/>
Profile Profile
</span> </span>
} }
> >
<Logout/> <Logout/>
</SubMenu> </SubMenu>
</Menu> </Menu>
</Header>
</Header> <Content style={{marginTop: 2}}>
</Layout> <Switch>
<Layout> <Redirect exact from="/entgra" to="/entgra/devices"/>
<Content style={{marginTop: 2}}> {this.state.routes.map((route) => (
<Switch> <RouteWithSubRoutes key={route.path} {...route} />
<Redirect exact from="/entgra" to="/entgra/devices"/> ))}
{this.state.routes.map((route) => ( </Switch>
<RouteWithSubRoutes key={route.path} {...route} /> </Content>
))} <Footer style={{textAlign: 'center'}}>
</Switch> ©2019 entgra.io
</Content> </Footer>
<Footer style={{textAlign: 'center'}}> </Layout>
©2019 entgra.io
</Footer>
</Layout> </Layout>
</div> </div>
); );

Loading…
Cancel
Save