diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/package.json b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/package.json
index dd31508d39..14b66eaaac 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/package.json
+++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/package.json
@@ -14,6 +14,7 @@
"history": "^4.6.3",
"latest-version": "^3.1.0",
"material-ui": "^0.19.0",
+ "material-ui-datatables": "^0.18.2",
"react": "^15.6.1",
"react-dom": "^15.6.1",
"react-images-uploader": "^1.1.0",
@@ -23,7 +24,7 @@
"react-router-dom": "^4.1.2",
"react-scripts": "1.0.10",
"react-sliding-pane": "^1.2.3",
- "react-table": "^6.5.1"
+ "react-tap-event-plugin": "^2.0.1"
},
"devDependencies": {
"babel-core": "^6.24.1",
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/App.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/App.js
index 258af68b0d..ba5878f632 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/App.js
+++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/App.js
@@ -16,34 +16,44 @@
* under the License.
*/
-import React, { Component } from 'react';
-import {BrowserRouter as Router, Route, Switch, Redirect} from 'react-router-dom'
-import './App.css';
-import {Login, BaseLayout} from './components'
+import React, {Component} from 'react';
+import {BrowserRouter as Router, Redirect, Route, Switch} from 'react-router-dom'
+import './App.css'
+import {BaseLayout, Create, Login, NotFound} from './components'
+import createHistory from 'history/createBrowserHistory';
+
+const history = createHistory({basename:'/publisher'});
+
class Base extends Component {
constructor() {
super();
this.state = {
- user: ""
+ user: "m"
}
}
render() {
if (this.state.user) {
- return(
-
-
-
-
-
-
-
-
-
-
-
-
+ return(
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
)
}
@@ -55,7 +65,7 @@ class Publisher extends Component {
render() {
return (
-
+
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Base/BaseLayout.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Base/BaseLayout.js
index ba59103adb..6260aa6829 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Base/BaseLayout.js
+++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Base/BaseLayout.js
@@ -17,10 +17,70 @@
*/
import React, {Component} from 'react';
+import AppBar from 'material-ui/AppBar';
+import Drawer from 'material-ui/Drawer';
+import MenuItem from 'material-ui/MenuItem';
+import Menu from 'material-ui/Menu';
+import IconButton from 'material-ui/IconButton';
+import Notifications from 'material-ui/svg-icons/social/notifications';
+import ActionAccountCircle from 'material-ui/svg-icons/action/account-circle';
+import {withRouter} from 'react-router-dom'
+
+/**
+ * Base Layout:
+ * App bar
+ * Left Navigation
+ * Middle content.
+ * */
class BaseLayout extends Component {
+ handleApplicationClick() {
+ console.log("Application");
+ window.location = '/publisher/assets/apps';
+ }
+
+ render() {
+ return (
+
+
+
+
+
+ {
+ console.log("Clicked")
+ }}>
+
+
+
+ }
+ />
+
+
+
+
+
+
+ {this.props.children}
+
+ );
+ }
}
-export default BaseLayout;
\ No newline at end of file
+export default withRouter(BaseLayout);
\ No newline at end of file
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Error/NotFound.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Error/NotFound.js
new file mode 100644
index 0000000000..626642d663
--- /dev/null
+++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Error/NotFound.js
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+ *
+ * WSO2 Inc. 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 React, {Component} from 'react';
+
+class Error extends Component {
+
+ constructor() {
+ super();
+ }
+
+ componentWillMount() {
+ console.log("In Crate")
+ }
+
+ render() {
+
+ return (
+
+
+ 404 not found
+
+ );
+ }
+}
+
+export default Error;
\ No newline at end of file
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/User/Login/Login.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/User/Login/Login.js
index 4aab3b819e..f93c7b48ad 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/User/Login/Login.js
+++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/User/Login/Login.js
@@ -36,6 +36,7 @@ class Login extends Component {
handleLogin(event) {
console.log(this.state);
+
event.preventDefault();
}
@@ -66,8 +67,11 @@ class Login extends Component {
render() {
return (
+
+ {/*TODO: Style the components.*/}
+
-
+
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/index.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/index.js
index c82d9576ee..f166fc81be 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/index.js
+++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/index.js
@@ -18,9 +18,11 @@
import Login from './User/Login/Login'
import BaseLayout from './Base/BaseLayout'
+import Create from './Application/Create'
+import NotFound from './Error/NotFound'
/**
* Contains all UI components related to Application, Login and Platform
*/
-export {Login, BaseLayout};
\ No newline at end of file
+export {Login, BaseLayout, Create, NotFound};
\ No newline at end of file