From d948d85bbb1529e202ad3d1cb58e615a820d94cd Mon Sep 17 00:00:00 2001 From: Menaka Jayawardena Date: Tue, 15 Aug 2017 14:57:52 +0530 Subject: [PATCH 1/9] App Publisher React application. Initial Commit. --- .gitignore | 1 + .../pom.xml | 169 ++++++++++++++++++ .../src/main/resources/publisher/.babelrc | 5 + .../src/main/resources/publisher/package.json | 51 ++++++ .../publisher/public/images/favicon.png | Bin 0 -> 1923 bytes .../resources/publisher/public/index.html | 42 +++++ .../resources/publisher/public/manifest.json | 15 ++ .../src/main/resources/publisher/src/App.css | 0 .../src/main/resources/publisher/src/App.js | 33 ++++ .../main/resources/publisher/src/App.test.js | 26 +++ .../main/resources/publisher/src/index.css | 5 + .../src/main/resources/publisher/src/index.js | 26 +++ .../publisher/src/registerServiceWorker.js | 126 +++++++++++++ .../resources/publisher/webpack.config.js | 51 ++++++ .../pom.xml | 168 +++++++++++++++++ components/application-mgt/pom.xml | 2 +- .../pom.xml | 16 ++ .../pom.xml | 16 ++ features/application-mgt/pom.xml | 3 +- 19 files changed, 753 insertions(+), 2 deletions(-) create mode 100644 components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/pom.xml create mode 100644 components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/.babelrc create mode 100644 components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/package.json create mode 100644 components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/public/images/favicon.png create mode 100644 components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/public/index.html create mode 100644 components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/public/manifest.json create mode 100644 components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/App.css create mode 100644 components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/App.js create mode 100644 components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/App.test.js create mode 100644 components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/index.css create mode 100644 components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/index.js create mode 100644 components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/registerServiceWorker.js create mode 100644 components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/webpack.config.js create mode 100644 components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/pom.xml create mode 100644 features/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui.feature/pom.xml create mode 100644 features/application-mgt/org.wso2.carbon.device.application.mgt.store.ui.feature/pom.xml diff --git a/.gitignore b/.gitignore index 9c3d08d3c06..b720258a6a6 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,4 @@ target # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml hs_err_pid* +components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/node_modules/ diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/pom.xml b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/pom.xml new file mode 100644 index 00000000000..cb06ef09800 --- /dev/null +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/pom.xml @@ -0,0 +1,169 @@ + + + 4.0.0 + + + org.wso2.carbon.devicemgt + application-mgt + 3.0.46-SNAPSHOT + + + org.wso2.carbon.device.application.mgt.publisher.ui + 3.0.46-SNAPSHOT + + + + + + + + + + + + + org.wso2.maven + carbon-p2-plugin + ${carbon.p2.plugin.version} + + + 4-p2-feature-generation + package + + p2-feature-gen + + + org.wso2.carbon.device.application.mgt + ../../etc/feature.properties + + + org.wso2.carbon.p2.category.type:server + + org.eclipse.equinox.p2.type.group:false + + + + + + + + + + + + + + + + + + org.codehaus.mojo + exec-maven-plugin + 1.5.0 + + + npm install (initialize) + + exec + + initialize + + ${basedir}/src/main/resources/publisher + ${npm.executable} + + install + + + + + + + + npm run build (compile) + + exec + + compile + + ${basedir}/src/main/resources/publisher + ${npm.executable} + + run + ${npm.build.command} + + + + + + + + + + + + + + + + + + + + + ${npm.working.dir} + + + + + + + + platform-windows + + + windows + + + + + npm.cmd + + + + + false + npm + build_prod + ./src/main/ + + + \ No newline at end of file diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/.babelrc b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/.babelrc new file mode 100644 index 00000000000..02f08fb6c0f --- /dev/null +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/.babelrc @@ -0,0 +1,5 @@ +{ + "presets": [ + "es2015" + ] +} \ No newline at end of file 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 new file mode 100644 index 00000000000..c2513e64c52 --- /dev/null +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/package.json @@ -0,0 +1,51 @@ +{ + "name": "wso2_iot_app_publisher", + "version": "1.0.0", + "description": "WSO2 IoT Server App Publisher", + "main": "App.js", + "repository": { + "type": "git", + "url": "git://github.com/wso2/carbon-devicemgt" + }, + "author": "WSO2 Org", + "license": "Apache License 2.0", + "dependencies": { + "antd": "^2.12.3", + "axios": "^0.16.2", + "flux": "^3.1.3", + "history": "^4.6.3", + "react": "^15.6.1", + "react-dom": "^15.6.1", + "react-images-uploader": "^1.1.0", + "react-modal": "^2.2.2", + "react-router": "^4.1.2", + "react-router-dom": "^4.1.2", + "react-scripts": "1.0.10", + "react-sliding-pane": "^1.2.3", + "react-table": "^6.5.1" + }, + "devDependencies": { + "babel-core": "^6.24.1", + "babel-loader": "^7.0.0", + "babel-plugin-transform-class-properties": "^6.24.1", + "babel-preset-es2015": "^6.24.1", + "chai": "^4.0.2", + "babel-preset-react": "^6.24.1", + "babel-register": "^6.24.1", + "css-loader": "^0.28.2", + "less": "^2.7.2", + "less-loader": "^4.0.4", + "mocha": "^3.4.1", + "mock-local-storage": "^1.0.2", + "style-loader": "^0.18.1", + "webpack": "^2.5.0" + }, + "scripts": { + "start": "react-scripts start", + "build": "react-scripts build --history-api-fallback", + "test": "react-scripts test --env=jsdom", + "eject": "react-scripts eject", + "build_prod": "NODE_ENV=production webpack -p --progress --colors --config webpack.config.js", + "build_dev": "NODE_ENV=development webpack -d --config webpack.config.js --watch " + } +} \ No newline at end of file diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/public/images/favicon.png b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/public/images/favicon.png new file mode 100644 index 0000000000000000000000000000000000000000..a1deab3581b3fc53b7177d653228cda8d079bc3f GIT binary patch literal 1923 zcmbVNX;c$u6pf0YSQJqy3J1sF0u+)=_Cx}NNg`2DNI>F3HDm^iA(=24NCJvWMPyS- zRa~$F6~(IH#tCW>)T*E&f{4_$3W`fb#N8@%qG0>Oh3?T_&GzI~rT4fv}LzJ*Np$_pQ zkp{u)2nDVP4dJU$Ek$Xyp_sIK0!aNG=GJX08Te>|YXsy^ zq790eKOQ>-kiw(P*R?859(Yqk=ph&&olk`w|wu2D1)VntXKzkA4ObVo+gfJ+4M| zfR#}hgC^nvGNJU-5w!Zy(9gs=LtmhXkWo!aJr$(Ts9LS{Tpz6sxD5GM#uu#(5oSF? zl_3T+5mOQQi1p|P6S4ccBdZ~yhCd5a6G>6Vi%?af7SZ8Sk$_Bmp}=aGFJVF4ARz?t zSZt9P1VJvyrimF4Q^Ek*ARUDIIlhDq67fKuLA+Q8PwZO;d^3`AP4l=nMh{0tEMG!+wXcuz1keJ54p*clmAbYWG%F$|;VO9Y2e3qUud22v+-MCAV`VhUmt#xB5 z!)Zef=yOnf?IOjdsLJ8-qju+W3U!qpU1yp2eB!L``+^Sh#lQVKej9x@VU39F@~)dX z{|Uur*Dlv7<#yY%e7oG+XS)Tuhp9WpUyF6Gm=}7xb+PvHzWROoBL$8&1J+1>adCA$ zb$RL1)|W#CKb!W@Oiw6z4=*_Loqm3N zU?bS7mI2j1D|UJX&b3qN-iBn`-kP#o!BH)KKQPFaxgovQx9~W3XbMORSa!BP#v}S> zc)1NG9rDnxo3}Y$lNq@CxVZDeU$q*>nE02kE_-?p`rRRSZT?bPL^n;JPt1pVB=0+5x4-Sa61(v31_9qX%4`c+c)g zn5uzHX{Tn!LCartKJ8JooZJ&Nw(y|SVrWd*-ux>FBjbIJdaiS0U?o!zZ5ZMPs_PD?44YNU4z*f(Yf6s%vAGP&nPf7SyC=>=mJRbxs}R;aBd_h!sOed2c?XGMN?co{q>lw0gpavhGlP)0o~7a>#JKgX-p={p?x7 z=5Ot0oELQajgaPby+738HdNsYjk*fi?UK!T-TWj{Q#5S + + + + + + + + + + + + WSO2 IoT App Publisher + + + +
+ + + diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/public/manifest.json b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/public/manifest.json new file mode 100644 index 00000000000..2a700bb50e7 --- /dev/null +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/public/manifest.json @@ -0,0 +1,15 @@ +{ + "short_name": "App Publisher", + "name": "WSO2 IoT App Publisher", + "icons": [ + { + "src": "images/favicon.png", + "sizes": "16x16", + "type": "image/png" + } + ], + "start_url": "./index.html", + "display": "standalone", + "theme_color": "#000000", + "background_color": "#ffffff" +} diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/App.css b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/App.css new file mode 100644 index 00000000000..e69de29bb2d 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 new file mode 100644 index 00000000000..27c65444b7f --- /dev/null +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/App.js @@ -0,0 +1,33 @@ +/* + * 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'; +import './App.css'; + +class App extends Component { + render() { + return ( +
+
+
+
+ ); + } +} + +export default App; diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/App.test.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/App.test.js new file mode 100644 index 00000000000..79b7f3f6659 --- /dev/null +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/App.test.js @@ -0,0 +1,26 @@ +/* + * 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 from 'react'; +import ReactDOM from 'react-dom'; +import App from './App'; + +it('renders without crashing', () => { + const div = document.createElement('div'); + ReactDOM.render(, div); +}); diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/index.css b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/index.css new file mode 100644 index 00000000000..b4cc7250b98 --- /dev/null +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/index.css @@ -0,0 +1,5 @@ +body { + margin: 0; + padding: 0; + font-family: sans-serif; +} diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/index.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/index.js new file mode 100644 index 00000000000..369f8d3d362 --- /dev/null +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/index.js @@ -0,0 +1,26 @@ +/* + * 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 from 'react'; +import ReactDOM from 'react-dom'; +import './index.css'; +import App from './App'; +import registerServiceWorker from './registerServiceWorker'; + +ReactDOM.render(, document.getElementById('root')); +registerServiceWorker(); diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/registerServiceWorker.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/registerServiceWorker.js new file mode 100644 index 00000000000..94bc5f9982c --- /dev/null +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/registerServiceWorker.js @@ -0,0 +1,126 @@ +/* + * 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. + */ + +// In production, we register a service worker to serve assets from local cache. + +// This lets the app load faster on subsequent visits in production, and gives +// it offline capabilities. However, it also means that developers (and users) +// will only see deployed updates on the "N+1" visit to a page, since previously +// cached resources are updated in the background. + +// To learn more about the benefits of this model, read https://goo.gl/KwvDNy. +// This link also includes instructions on opting out of this behavior. + +const isLocalhost = Boolean( + window.location.hostname === 'localhost' || + // [::1] is the IPv6 localhost address. + window.location.hostname === '[::1]' || + // 127.0.0.1/8 is considered localhost for IPv4. + window.location.hostname.match( + /^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/ + ) +); + +export default function register() { + if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) { + // The URL constructor is available in all browsers that support SW. + const publicUrl = new URL(process.env.PUBLIC_URL, window.location); + if (publicUrl.origin !== window.location.origin) { + // Our service worker won't work if PUBLIC_URL is on a different origin + // from what our page is served on. This might happen if a CDN is used to + // serve assets; see https://github.com/facebookincubator/create-react-app/issues/2374 + return; + } + + window.addEventListener('load', () => { + const swUrl = `${process.env.PUBLIC_URL}/publisher/service-worker.js`; + + if (!isLocalhost) { + // Is not local host. Just register service worker + registerValidSW(swUrl); + } else { + // This is running on localhost. Lets check if a service worker still exists or not. + checkValidServiceWorker(swUrl); + } + }); + } +} + +function registerValidSW(swUrl) { + navigator.serviceWorker + .register(swUrl) + .then(registration => { + registration.onupdatefound = () => { + const installingWorker = registration.installing; + installingWorker.onstatechange = () => { + if (installingWorker.state === 'installed') { + if (navigator.serviceWorker.controller) { + // At this point, the old content will have been purged and + // the fresh content will have been added to the cache. + // It's the perfect time to display a "New content is + // available; please refresh." message in your web app. + console.log('New content is available; please refresh.'); + } else { + // At this point, everything has been precached. + // It's the perfect time to display a + // "Content is cached for offline use." message. + console.log('Content is cached for offline use.'); + } + } + }; + }; + }) + .catch(error => { + console.error('Error during service worker registration:', error); + }); +} + +function checkValidServiceWorker(swUrl) { + // Check if the service worker can be found. If it can't reload the page. + fetch(swUrl) + .then(response => { + // Ensure service worker exists, and that we really are getting a JS file. + if ( + response.status === 404 || + response.headers.get('content-type').indexOf('javascript') === -1 + ) { + // No service worker found. Probably a different app. Reload the page. + navigator.serviceWorker.ready.then(registration => { + registration.unregister().then(() => { + window.location.reload(); + }); + }); + } else { + // Service worker found. Proceed as normal. + registerValidSW(swUrl); + } + }) + .catch(() => { + console.log( + 'No internet connection found. App is running in offline mode.' + ); + }); +} + +export function unregister() { + if ('serviceWorker' in navigator) { + navigator.serviceWorker.ready.then(registration => { + registration.unregister(); + }); + } +} diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/webpack.config.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/webpack.config.js new file mode 100644 index 00000000000..c03279bd3df --- /dev/null +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/webpack.config.js @@ -0,0 +1,51 @@ +var path = require('path'); + +const config = { + entry: { + index: './src/index.js' + }, + output: { + path: path.resolve(__dirname, 'public/dist'), + filename: '[name].js' + }, + devtool: "source-map", + plugins: [], + watch: false, + module: { + rules: [ + { + test: /\.(js|jsx)$/, + exclude: /node_modules/, + use: [ + { + loader: 'babel-loader', + options: { + presets: ['es2015', 'react'], + plugins: ['transform-class-properties'] + } + } + ] + }, + { + test: /\.css$/, + use: [ 'style-loader', 'css-loader' ] + }, + { + test: /\.less$/, + use: [{ + loader: "style-loader" // creates style nodes from JS strings + }, { + loader: "css-loader" // translates CSS into CommonJS + }, { + loader: "less-loader" // compiles Less to CSS + }] + } + ] + } +}; + +if (process.env.NODE_ENV === "development") { + config.watch = true; +} + +module.exports = config; diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/pom.xml b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/pom.xml new file mode 100644 index 00000000000..9cee98dd925 --- /dev/null +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/pom.xml @@ -0,0 +1,168 @@ + + + 4.0.0 + + + org.wso2.carbon.devicemgt + application-mgt + 3.0.46-SNAPSHOT + + org.wso2.carbon.device.application.mgt.store.ui + 3.0.46-SNAPSHOT + + + + + + + + + + + + + org.wso2.maven + carbon-p2-plugin + ${carbon.p2.plugin.version} + + + 4-p2-feature-generation + package + + p2-feature-gen + + + org.wso2.carbon.device.application.mgt.store + ../../etc/feature.properties + + + org.wso2.carbon.p2.category.type:server + + org.eclipse.equinox.p2.type.group:false + + + + + + + + + + + + + + + + + + org.codehaus.mojo + exec-maven-plugin + 1.5.0 + + + npm install (initialize) + + exec + + initialize + + ${basedir}/src/main/resources/store + ${npm.executable} + + install + + + + + + + + npm run build (compile) + + exec + + compile + + ${basedir}/src/main/resources/publisher + ${npm.executable} + + run + ${npm.build.command} + + + + + + + + + + + + + + + + + + + + + ${npm.working.dir} + + + + + + + + platform-windows + + + windows + + + + + npm.cmd + + + + + false + npm + build_prod + ./src/main/ + + + \ No newline at end of file diff --git a/components/application-mgt/pom.xml b/components/application-mgt/pom.xml index 9770fd06432..61523a4ba9f 100644 --- a/components/application-mgt/pom.xml +++ b/components/application-mgt/pom.xml @@ -37,7 +37,7 @@ org.wso2.carbon.device.application.mgt.core org.wso2.carbon.device.application.mgt.common org.wso2.carbon.device.application.mgt.api - org.wso2.carbon.device.application.mgt.ui + org.wso2.carbon.device.application.mgt.publisher.ui diff --git a/features/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui.feature/pom.xml b/features/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui.feature/pom.xml new file mode 100644 index 00000000000..e9da7bcff09 --- /dev/null +++ b/features/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui.feature/pom.xml @@ -0,0 +1,16 @@ + + + 4.0.0 + + + org.wso2.carbon.devicemgt + application-mgt-feature + 3.0.46-SNAPSHOT + + org.wso2.carbon.device.application.mgt.publisher.ui.feature + 3.0.46-SNAPSHOT + + + \ No newline at end of file diff --git a/features/application-mgt/org.wso2.carbon.device.application.mgt.store.ui.feature/pom.xml b/features/application-mgt/org.wso2.carbon.device.application.mgt.store.ui.feature/pom.xml new file mode 100644 index 00000000000..33f45fc1e08 --- /dev/null +++ b/features/application-mgt/org.wso2.carbon.device.application.mgt.store.ui.feature/pom.xml @@ -0,0 +1,16 @@ + + + 4.0.0 + + + org.wso2.carbon.devicemgt + application-mgt-feature + 3.0.46-SNAPSHOT + + org.wso2.carbon.device.application.mgt.store.ui.feature + 3.0.46-SNAPSHOT + + + \ No newline at end of file diff --git a/features/application-mgt/pom.xml b/features/application-mgt/pom.xml index 4a39791ffc3..f70cb75863b 100644 --- a/features/application-mgt/pom.xml +++ b/features/application-mgt/pom.xml @@ -35,9 +35,10 @@ org.wso2.carbon.device.application.mgt.api.feature - org.wso2.carbon.device.application.mgt.ui.feature + org.wso2.carbon.device.application.mgt.feature org.wso2.carbon.device.application.mgt.server.feature + org.wso2.carbon.device.application.mgt.publisher.ui.feature \ No newline at end of file From 72f0e195b7651ee1e1525957554f79e80a531780 Mon Sep 17 00:00:00 2001 From: Menaka Jayawardena Date: Tue, 15 Aug 2017 16:04:42 +0530 Subject: [PATCH 2/9] Created basic directory structure --- .../src/main/resources/publisher/src/App.js | 27 ++++++++++++++++--- .../src/actions/ApplicationActions.js | 17 ++++++++++++ .../publisher/src/actions/PlatformActions.js | 17 ++++++++++++ .../publisher/src/common/constants.js | 17 ++++++++++++ .../publisher/src/common/dispatcher.js | 22 +++++++++++++++ .../publisher/src/components/index.js | 21 +++++++++++++++ .../src/main/resources/publisher/src/index.js | 6 +++-- .../publisher/src/stores/ApplicationStore.js | 0 .../publisher/src/stores/PlatformStore.js | 17 ++++++++++++ .../resources/publisher/src/stores/index.js | 17 ++++++++++++ 10 files changed, 155 insertions(+), 6 deletions(-) create mode 100644 components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/actions/ApplicationActions.js create mode 100644 components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/actions/PlatformActions.js create mode 100644 components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/common/constants.js create mode 100644 components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/common/dispatcher.js create mode 100644 components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/index.js create mode 100644 components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/stores/ApplicationStore.js create mode 100644 components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/stores/PlatformStore.js create mode 100644 components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/stores/index.js 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 27c65444b7f..c59fb756931 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 @@ -17,17 +17,36 @@ */ import React, { Component } from 'react'; +import {BrowserRouter as Router, Route, Switch, Redirect} from 'react-router-dom' import './App.css'; -class App extends Component { +class Base extends Component { + constructor() { + super(); + this.state = { + + } + } + + render() { + return (); + } +} + +class Publisher extends Component { render() { return (
-
-
+ + + + + + +
); } } -export default App; +export default Publisher; diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/actions/ApplicationActions.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/actions/ApplicationActions.js new file mode 100644 index 00000000000..9eb827eb700 --- /dev/null +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/actions/ApplicationActions.js @@ -0,0 +1,17 @@ +/* + * 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. + */ diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/actions/PlatformActions.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/actions/PlatformActions.js new file mode 100644 index 00000000000..9eb827eb700 --- /dev/null +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/actions/PlatformActions.js @@ -0,0 +1,17 @@ +/* + * 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. + */ diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/common/constants.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/common/constants.js new file mode 100644 index 00000000000..9eb827eb700 --- /dev/null +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/common/constants.js @@ -0,0 +1,17 @@ +/* + * 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. + */ diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/common/dispatcher.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/common/dispatcher.js new file mode 100644 index 00000000000..96803dfb203 --- /dev/null +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/common/dispatcher.js @@ -0,0 +1,22 @@ +/* + * 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 {Dispatcher} from 'flux'; + +export default new Dispatcher(); + 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 new file mode 100644 index 00000000000..e1efb92d1b4 --- /dev/null +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/index.js @@ -0,0 +1,21 @@ +/* + * 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. + */ + +/** + * Contains all UI components related to Application, Login and Platform + */ \ 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/index.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/index.js index 369f8d3d362..70161b9b064 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/index.js +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/index.js @@ -19,8 +19,10 @@ import React from 'react'; import ReactDOM from 'react-dom'; import './index.css'; -import App from './App'; +import Publisher from './App'; +import { LocaleProvider } from 'antd'; import registerServiceWorker from './registerServiceWorker'; +import enUS from 'antd/lib/locale-provider/en_US'; -ReactDOM.render(, document.getElementById('root')); +ReactDOM.render(, document.getElementById('root')); registerServiceWorker(); diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/stores/ApplicationStore.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/stores/ApplicationStore.js new file mode 100644 index 00000000000..e69de29bb2d diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/stores/PlatformStore.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/stores/PlatformStore.js new file mode 100644 index 00000000000..9eb827eb700 --- /dev/null +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/stores/PlatformStore.js @@ -0,0 +1,17 @@ +/* + * 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. + */ diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/stores/index.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/stores/index.js new file mode 100644 index 00000000000..cc77f8a78c0 --- /dev/null +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/stores/index.js @@ -0,0 +1,17 @@ +/* + * 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. + */ \ No newline at end of file From 03b6faa7c21fe6e60dd968066f3667dc2521b851 Mon Sep 17 00:00:00 2001 From: Menaka Jayawardena Date: Wed, 16 Aug 2017 21:07:14 +0530 Subject: [PATCH 3/9] Created the project file structure. --- .gitignore | 1 + .../src/main/resources/publisher/package.json | 9 ++++--- .../resources/publisher/public/index.html | 2 -- .../src/main/resources/publisher/src/App.js | 26 ++++++++++++++++--- .../publisher/src/actions/ReviewActions.js | 17 ++++++++++++ .../publisher/src/api/AuthHandler.js | 17 ++++++++++++ .../resources/publisher/src/api/Endpoints.js | 21 +++++++++++++++ .../src/components/Application/AppView.js | 17 ++++++++++++ .../Application/ApplicationListing.js | 17 ++++++++++++ .../src/components/Application/Create.js | 17 ++++++++++++ .../src/components/Base/BaseLayout.js | 26 +++++++++++++++++++ .../src/components/Platform/Create.js | 17 ++++++++++++ .../components/Platform/PlatformListing.js | 17 ++++++++++++ .../src/components/Platform/PlatformView.js | 17 ++++++++++++ .../src/components/Reviews/ReviewListing.js | 17 ++++++++++++ .../src/components/Reviews/ReviewView.js | 17 ++++++++++++ .../src/components/UIComponents/DataTable.js | 17 ++++++++++++ .../src/components/UIComponents/SimpleForm.js | 17 ++++++++++++ .../src/components/User/Logout/Logout.js | 0 .../publisher/src/components/index.js | 7 ++++- .../src/main/resources/publisher/src/index.js | 5 ++-- .../publisher/src/stores/ReviewStore.js | 17 ++++++++++++ 22 files changed, 304 insertions(+), 14 deletions(-) create mode 100644 components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/actions/ReviewActions.js create mode 100644 components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/api/AuthHandler.js create mode 100644 components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/api/Endpoints.js create mode 100644 components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/AppView.js create mode 100644 components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/ApplicationListing.js create mode 100644 components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Create.js create mode 100644 components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Base/BaseLayout.js create mode 100644 components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Platform/Create.js create mode 100644 components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Platform/PlatformListing.js create mode 100644 components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Platform/PlatformView.js create mode 100644 components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Reviews/ReviewListing.js create mode 100644 components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Reviews/ReviewView.js create mode 100644 components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/UIComponents/DataTable.js create mode 100644 components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/UIComponents/SimpleForm.js create mode 100644 components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/User/Logout/Logout.js create mode 100644 components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/stores/ReviewStore.js diff --git a/.gitignore b/.gitignore index b720258a6a6..b385911f898 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,4 @@ target # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml hs_err_pid* components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/node_modules/ +components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/build/ 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 c2513e64c52..dd31508d390 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 @@ -1,5 +1,5 @@ { - "name": "wso2_iot_app_publisher", + "name": "publisher", "version": "1.0.0", "description": "WSO2 IoT Server App Publisher", "main": "App.js", @@ -7,16 +7,17 @@ "type": "git", "url": "git://github.com/wso2/carbon-devicemgt" }, - "author": "WSO2 Org", "license": "Apache License 2.0", "dependencies": { - "antd": "^2.12.3", "axios": "^0.16.2", "flux": "^3.1.3", "history": "^4.6.3", + "latest-version": "^3.1.0", + "material-ui": "^0.19.0", "react": "^15.6.1", "react-dom": "^15.6.1", "react-images-uploader": "^1.1.0", + "react-material-ui-form-validator": "^0.5.0", "react-modal": "^2.2.2", "react-router": "^4.1.2", "react-router-dom": "^4.1.2", @@ -48,4 +49,4 @@ "build_prod": "NODE_ENV=production webpack -p --progress --colors --config webpack.config.js", "build_dev": "NODE_ENV=development webpack -d --config webpack.config.js --watch " } -} \ No newline at end of file +} diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/public/index.html b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/public/index.html index 7739ff27086..e684fd6f875 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/public/index.html +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/public/index.html @@ -1,6 +1,4 @@ - - 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 c59fb756931..258af68b0d7 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 @@ -19,17 +19,35 @@ import React, { Component } from 'react'; import {BrowserRouter as Router, Route, Switch, Redirect} from 'react-router-dom' import './App.css'; +import {Login, BaseLayout} from './components' class Base extends Component { constructor() { super(); this.state = { - + user: "" } } render() { - return (); + if (this.state.user) { + return( + + + + + + + + + + + + + ) + } + + return () } } @@ -39,8 +57,8 @@ class Publisher extends Component {
- - + + diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/actions/ReviewActions.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/actions/ReviewActions.js new file mode 100644 index 00000000000..9eb827eb700 --- /dev/null +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/actions/ReviewActions.js @@ -0,0 +1,17 @@ +/* + * 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. + */ diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/api/AuthHandler.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/api/AuthHandler.js new file mode 100644 index 00000000000..9eb827eb700 --- /dev/null +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/api/AuthHandler.js @@ -0,0 +1,17 @@ +/* + * 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. + */ diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/api/Endpoints.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/api/Endpoints.js new file mode 100644 index 00000000000..e3e76b69c23 --- /dev/null +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/api/Endpoints.js @@ -0,0 +1,21 @@ +/* + * 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. + */ + +/** + * Defines the list of App Manager APIs. + * */ \ 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/Application/AppView.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/AppView.js new file mode 100644 index 00000000000..9eb827eb700 --- /dev/null +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/AppView.js @@ -0,0 +1,17 @@ +/* + * 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. + */ diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/ApplicationListing.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/ApplicationListing.js new file mode 100644 index 00000000000..9eb827eb700 --- /dev/null +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/ApplicationListing.js @@ -0,0 +1,17 @@ +/* + * 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. + */ diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Create.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Create.js new file mode 100644 index 00000000000..9eb827eb700 --- /dev/null +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Create.js @@ -0,0 +1,17 @@ +/* + * 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. + */ 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 new file mode 100644 index 00000000000..ba59103adb3 --- /dev/null +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Base/BaseLayout.js @@ -0,0 +1,26 @@ +/* + * 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 BaseLayout extends Component { + + +} + +export default 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/Platform/Create.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Platform/Create.js new file mode 100644 index 00000000000..9eb827eb700 --- /dev/null +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Platform/Create.js @@ -0,0 +1,17 @@ +/* + * 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. + */ diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Platform/PlatformListing.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Platform/PlatformListing.js new file mode 100644 index 00000000000..9eb827eb700 --- /dev/null +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Platform/PlatformListing.js @@ -0,0 +1,17 @@ +/* + * 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. + */ diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Platform/PlatformView.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Platform/PlatformView.js new file mode 100644 index 00000000000..9eb827eb700 --- /dev/null +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Platform/PlatformView.js @@ -0,0 +1,17 @@ +/* + * 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. + */ diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Reviews/ReviewListing.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Reviews/ReviewListing.js new file mode 100644 index 00000000000..9eb827eb700 --- /dev/null +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Reviews/ReviewListing.js @@ -0,0 +1,17 @@ +/* + * 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. + */ diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Reviews/ReviewView.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Reviews/ReviewView.js new file mode 100644 index 00000000000..9eb827eb700 --- /dev/null +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Reviews/ReviewView.js @@ -0,0 +1,17 @@ +/* + * 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. + */ diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/UIComponents/DataTable.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/UIComponents/DataTable.js new file mode 100644 index 00000000000..9eb827eb700 --- /dev/null +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/UIComponents/DataTable.js @@ -0,0 +1,17 @@ +/* + * 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. + */ diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/UIComponents/SimpleForm.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/UIComponents/SimpleForm.js new file mode 100644 index 00000000000..9eb827eb700 --- /dev/null +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/UIComponents/SimpleForm.js @@ -0,0 +1,17 @@ +/* + * 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. + */ diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/User/Logout/Logout.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/User/Logout/Logout.js new file mode 100644 index 00000000000..e69de29bb2d 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 e1efb92d1b4..c82d9576eec 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 @@ -16,6 +16,11 @@ * under the License. */ +import Login from './User/Login/Login' +import BaseLayout from './Base/BaseLayout' + /** * Contains all UI components related to Application, Login and Platform - */ \ No newline at end of file + */ + +export {Login, 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/index.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/index.js index 70161b9b064..d5ab4c3fe28 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/index.js +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/index.js @@ -20,9 +20,8 @@ import React from 'react'; import ReactDOM from 'react-dom'; import './index.css'; import Publisher from './App'; -import { LocaleProvider } from 'antd'; import registerServiceWorker from './registerServiceWorker'; -import enUS from 'antd/lib/locale-provider/en_US'; +import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider'; -ReactDOM.render(, document.getElementById('root')); +ReactDOM.render(, document.getElementById('root')); registerServiceWorker(); diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/stores/ReviewStore.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/stores/ReviewStore.js new file mode 100644 index 00000000000..9eb827eb700 --- /dev/null +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/stores/ReviewStore.js @@ -0,0 +1,17 @@ +/* + * 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. + */ From 44737750b85aab4ed999a5affb64f3d8df554444 Mon Sep 17 00:00:00 2001 From: Menaka Jayawardena Date: Wed, 16 Aug 2017 21:07:57 +0530 Subject: [PATCH 4/9] Created the login page. --- .../src/components/User/Login/Login.js | 116 ++++++++++++++++++ 1 file changed, 116 insertions(+) create mode 100644 components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/User/Login/Login.js 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 new file mode 100644 index 00000000000..4aab3b819ed --- /dev/null +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/User/Login/Login.js @@ -0,0 +1,116 @@ +/* + * 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'; +import {Card, CardTitle, CardActions, CardMedia} from 'material-ui/Card'; +import RaisedButton from 'material-ui/RaisedButton'; +import { ValidatorForm, TextValidator} from 'react-material-ui-form-validator'; +import Checkbox from 'material-ui/Checkbox'; + +class Login extends Component { + constructor() { + super(); + this.state = { + userName: "", + password: "", + rememberMe: true + } + } + + + handleLogin(event) { + console.log(this.state); + + event.preventDefault(); + } + + onUserNameChange(event) { + this.setState( + { + userName: event.target.value + } + ); + } + + onPasswordChange(event) { + this.setState( + { + password: event.target.value + } + ); + } + + rememberMe() { + this.setState( + { + rememberMe: !this.state.rememberMe + } + ) + } + + render() { + return ( +
+ + + + + + + + console.log(errors)}> + + +
+ +
+ +
+ +
+ +
+
+
); + } +} + + +export default Login; \ No newline at end of file From c7c0f62ca2c094168b5a30f359cec3780b44e27f Mon Sep 17 00:00:00 2001 From: Menaka Jayawardena Date: Thu, 17 Aug 2017 23:59:01 +0530 Subject: [PATCH 5/9] The base layout completed. --- .../src/main/resources/publisher/package.json | 3 +- .../src/main/resources/publisher/src/App.js | 48 ++++++++------ .../src/components/Base/BaseLayout.js | 62 ++++++++++++++++++- .../src/components/Error/NotFound.js | 41 ++++++++++++ .../src/components/User/Login/Login.js | 6 +- .../publisher/src/components/index.js | 4 +- 6 files changed, 141 insertions(+), 23 deletions(-) create mode 100644 components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Error/NotFound.js 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 dd31508d390..14b66eaaac1 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 258af68b0d7..ba5878f6326 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 ba59103adb3..6260aa6829b 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") + }}> + + +
+ } + /> +
+ + + Applications + Platforms + Reviews + + +
+
+ {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 00000000000..626642d663f --- /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 4aab3b819ed..f93c7b48ad2 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 c82d9576eec..f166fc81be0 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 From d2705b14279283434fcf0c79bce8bfe8087e249e Mon Sep 17 00:00:00 2001 From: Menaka Jayawardena Date: Sun, 20 Aug 2017 01:44:12 +0530 Subject: [PATCH 6/9] Added the stepper and App creation first step. --- .../src/main/resources/publisher/package.json | 1 + .../src/main/resources/publisher/src/App.js | 61 ++++--- .../src/components/Application/Create.js | 168 ++++++++++++++++++ .../src/components/Application/Forms/Step1.js | 117 ++++++++++++ .../src/components/Application/Forms/Step2.js | 61 +++++++ .../src/components/Application/Forms/Step3.js | 61 +++++++ .../src/components/Application/Forms/index.js | 23 +++ .../src/components/Base/BaseLayout.js | 107 +++++++++-- .../components/Overview/PublisherOverview.js | 41 +++++ .../src/components/User/Login/Login.js | 133 ++++++++------ .../publisher/src/components/index.js | 3 +- 11 files changed, 673 insertions(+), 103 deletions(-) create mode 100644 components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Forms/Step1.js create mode 100644 components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Forms/Step2.js create mode 100644 components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Forms/Step3.js create mode 100644 components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Forms/index.js create mode 100644 components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Overview/PublisherOverview.js 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 14b66eaaac1..fe5f46e4210 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 @@ -15,6 +15,7 @@ "latest-version": "^3.1.0", "material-ui": "^0.19.0", "material-ui-datatables": "^0.18.2", + "qs": "^6.5.0", "react": "^15.6.1", "react-dom": "^15.6.1", "react-images-uploader": "^1.1.0", 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 ba5878f6326..771422d0c14 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,41 +16,40 @@ * under the License. */ -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'}); +import React, {Component} from 'react'; +import createHistory from 'history/createHashHistory'; +import {HashRouter as Router, Redirect, Route, Switch} from 'react-router-dom' +import {BaseLayout, Create, Login, NotFound, PublisherOverview} from './components' +const history = createHistory({basename: '/publisher'}); class Base extends Component { constructor() { super(); this.state = { - user: "m" + user: "s" } } render() { if (this.state.user) { - return( + return (
- - - - - - - - - + + + {/**/} + {/**/} + + {/**/} + + + - +
@@ -62,19 +61,19 @@ class Base extends Component { } class Publisher extends Component { - render() { - return ( -
- - - - - - - -
- ); - } + render() { + return ( +
+ + + + + + + +
+ ); + } } export default Publisher; diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Create.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Create.js index 9eb827eb700..58fa7aa8ecb 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Create.js +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Create.js @@ -15,3 +15,171 @@ * specific language governing permissions and limitations * under the License. */ + +import React, {Component} from 'react'; +import Dialog from 'material-ui/Dialog'; +import {withRouter} from 'react-router-dom'; +import {Step1, Step2, Step3} from './Forms'; +import FlatButton from 'material-ui/FlatButton'; +import RaisedButton from 'material-ui/RaisedButton'; +import {Card, CardActions, CardTitle} from 'material-ui/Card'; +import {Step, StepLabel, Stepper,} from 'material-ui/Stepper'; + +class Create extends Component { + constructor() { + super(); + this.setStepData.bind(this); + this.removeStepData.bind(this); + this.handleSubmit.bind(this); + this.handleCancel.bind(this); + this.handleYes.bind(this); + this.handleNo.bind(this); + this.state = { + finished: false, + stepIndex: 0, + stepData: [], + isDialogOpen: false + }; + } + + handleNext = () => { + const {stepIndex} = this.state; + this.setState({ + stepIndex: stepIndex + 1, + finished: stepIndex >= 2, + }); + }; + + handleSubmit = () => { + console.log(this.state.stepData); + }; + + handleCancel = () => { + this.setState({isDialogOpen: true}); + }; + + handlePrev = () => { + const {stepIndex} = this.state; + if (stepIndex > 0) { + this.removeStepData(); + this.setState({stepIndex: stepIndex - 1}); + } + }; + + setStepData = (step, data) => { + console.log(step, data, this.state.stepData); + let tmpStepData = this.state.stepData; + tmpStepData.push({step: step, data: data}); + + this.setState({stepData: tmpStepData}) + }; + + /** + * Remove the last data point + * */ + removeStepData = () => { + let tempData = this.state.stepData; + tempData.pop(); + this.setState({stepData: tempData}); + }; + + handleYes = () => { + this.setState({finished: false, stepIndex: 0, stepData: [], isDialogOpen: false}); + }; + + handleNo = () => { + this.setState({isDialogOpen: false}); + }; + + getStepContent(stepIndex) { + switch (stepIndex) { + case 0: + return ; + case 1: + return ; + case 2: + return ; + default: + return 'You\'re a long way from home sonny jim!'; + } + } + + + render() { + const {finished, stepIndex} = this.state; + const contentStyle = {margin: '0 16px'}; + + const actions = [ + , + , + ]; + + + return ( +
+ + + + {/** + * The stepper goes here. + */} + +
+ + + Select Application Platform + + + Enter Application Details + + + Release + + +
+ {finished ? ( +
+

Create App?

+
+ + + +
+ ) : ( +
+ {this.getStepContent(stepIndex)} +
+ )} +
+
+
+
+ + Do you really want to cancel? + +
); + } +} + +export default withRouter(Create); diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Forms/Step1.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Forms/Step1.js new file mode 100644 index 00000000000..a8fbec5e844 --- /dev/null +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Forms/Step1.js @@ -0,0 +1,117 @@ +/* + * 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'; +import RaisedButton from 'material-ui/RaisedButton'; +import FlatButton from 'material-ui/FlatButton'; +import TextField from 'material-ui/TextField'; +import SelectField from 'material-ui/SelectField'; +import MenuItem from 'material-ui/MenuItem'; + +class Step1 extends Component { + constructor() { + super(); + this.state = { + finished: false, + stepIndex: 0, + store: 1, + platform: 1, + stepData: [] + }; + } + + handleNext = () => { + this.props.handleNext(); + }; + + setStepData() { + this.props.setData("step1", {step:"Dfds"}); + this.handleNext.bind(this); + } + + handleClick() { + this.setStepData(); + this.handleNext(); + } + + handlePrev() { + this.props.handlePrev(); + } + + onChangePlatform = (event, index, value) => { + this.setState({platform: value}); + }; + + onChangeStore = (event, index, value) => { + this.setState({store: value}); + }; + + render() { + const {finished, stepIndex} = this.state; + const contentStyle = {margin: '0 16px'}; + return ( +
+
+
+
+
+ + + +
+ + + + + +
+
+ + +
+
+
+
+ ); + } +} + +export default Step1; \ 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/Application/Forms/Step2.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Forms/Step2.js new file mode 100644 index 00000000000..166e3e1c688 --- /dev/null +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Forms/Step2.js @@ -0,0 +1,61 @@ +/* + * 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'; +import RaisedButton from 'material-ui/RaisedButton'; +import FlatButton from 'material-ui/FlatButton'; + +class Step2 extends Component { + constructor() { + super(); + } + + handleNext() { + this.props.handleNext(); + } + + handlePrev() { + this.props.handlePrev(); + } + + render() { + const contentStyle = {margin: '0 16px'}; + return ( +
+ Step2 +
+
+ + +
+
+
+ ); + } +} + +export default Step2; \ 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/Application/Forms/Step3.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Forms/Step3.js new file mode 100644 index 00000000000..305c55d688f --- /dev/null +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Forms/Step3.js @@ -0,0 +1,61 @@ +/* + * 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'; +import RaisedButton from 'material-ui/RaisedButton'; +import FlatButton from 'material-ui/FlatButton'; + +class Step3 extends Component { + constructor() { + super(); + } + + handleFinish() { + this.props.handleFinish(); + } + + handlePrev() { + this.props.handlePrev(); + } + + render() { + const contentStyle = {margin: '0 16px'}; + return ( +
+ Step3 +
+
+ + +
+
+
+ ); + } +} + +export default Step3; \ 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/Application/Forms/index.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Forms/index.js new file mode 100644 index 00000000000..9f5ad0bdacd --- /dev/null +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Forms/index.js @@ -0,0 +1,23 @@ +/* + * 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 Step1 from './Step1'; +import Step2 from './Step2'; +import Step3 from './Step3'; + +export {Step1, Step2, Step3}; \ 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/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 6260aa6829b..c6b218464c2 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 @@ -19,12 +19,17 @@ 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 NotificationsIcon from 'material-ui/svg-icons/social/notifications'; +import Apps from 'material-ui/svg-icons/navigation/apps'; +import DevicesOther from 'material-ui/svg-icons/hardware/devices-other'; import ActionAccountCircle from 'material-ui/svg-icons/action/account-circle'; +import Dashboard from 'material-ui/svg-icons/action/dashboard'; +import Add from 'material-ui/svg-icons/content/add-circle'; +import Feedback from 'material-ui/svg-icons/action/feedback'; import {withRouter} from 'react-router-dom' +import Badge from 'material-ui/Badge'; +import {List, ListItem} from 'material-ui/List'; /** @@ -35,9 +40,48 @@ import {withRouter} from 'react-router-dom' * */ class BaseLayout extends Component { + constructor() { + super(); + this.state = { + notifications: 0, + user: 'Admin' + } + } + + componentWillMount() { + + } + handleApplicationClick() { - console.log("Application"); - window.location = '/publisher/assets/apps'; + this.handleHistory('/assets/apps'); + } + + handleOverviewClick() { + this.handleHistory('/overview'); + } + + handleApplicationCreateClick() { + this.handleHistory('/assets/apps/create'); + } + + handlePlatformClick() { + this.handleHistory('/assets/platforms'); + } + + handlePlatformCreateClick() { + this.handleHistory('/assets/platforms/create'); + } + + handleReviewClick() { + this.handleHistory('/assets/reviews'); + } + + /** + * The method to update the history. + * to: The URL to route. + * */ + handleHistory(to) { + this.props.history.push(to); } render() { @@ -46,9 +90,15 @@ class BaseLayout extends Component { - - - + + + + + { console.log("Clicked") }}> @@ -58,12 +108,41 @@ class BaseLayout extends Component { } />
- - - Applications - Platforms - Reviews - + + + }/> + } + initiallyOpen={false} + primaryTogglesNestedList={true} + onClick={this.handleApplicationClick.bind(this)} + nestedItems={[ + } + />]} + /> + } + initiallyOpen={false} + primaryTogglesNestedList={true} + onClick={this.handlePlatformClick.bind(this)} + nestedItems={[ + } + />]} + /> + }/> +
+ Overview +
+ ); + } +} + +export default PublisherOverview; \ 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 f93c7b48ad2..c9197de1041 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 @@ -16,27 +16,40 @@ * under the License. */ -import React, { Component } from 'react'; -import {Card, CardTitle, CardActions, CardMedia} from 'material-ui/Card'; +import React, {Component} from 'react'; +import {Redirect, Switch} from 'react-router-dom'; +import {Card, CardActions, CardMedia, CardTitle} from 'material-ui/Card'; import RaisedButton from 'material-ui/RaisedButton'; -import { ValidatorForm, TextValidator} from 'react-material-ui-form-validator'; +import {TextValidator, ValidatorForm} from 'react-material-ui-form-validator'; import Checkbox from 'material-ui/Checkbox'; +import qs from 'qs'; + +//todo: remove the {TextValidator, ValidatorForm} and implement it manually. class Login extends Component { constructor() { super(); this.state = { + isLoggedIn: true, + referrer: "/", userName: "", password: "", rememberMe: true } } + componentDidMount() { + let queryString = this.props.location.search; + console.log(queryString); + queryString = queryString.replace(/^\?/, ''); + /* With QS version up we can directly use {ignoreQueryPrefix: true} option */ + let params = qs.parse(queryString); + if (params.referrer) { + this.setState({referrer: params.referrer}); + } + } handleLogin(event) { - console.log(this.state); - - event.preventDefault(); } @@ -45,7 +58,7 @@ class Login extends Component { { userName: event.target.value } - ); + ); } onPasswordChange(event) { @@ -65,56 +78,62 @@ class Login extends Component { } render() { - return ( -
- - {/*TODO: Style the components.*/} - - - - - - - - - console.log(errors)}> - - -
- -
- -
- -
- -
-
-
); + + if (!this.state.isLoggedIn) { + return ( +
+ + {/*TODO: Style the components.*/} + + + + + + console.log(errors)}> + + +
+ +
+ +
+ +
+ +
+
+
); + } else { + return ( + + + + ); + } + } } - -export default Login; \ No newline at end of file +export default Login; 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 f166fc81be0..dde690556be 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 @@ -20,9 +20,10 @@ import Login from './User/Login/Login' import BaseLayout from './Base/BaseLayout' import Create from './Application/Create' import NotFound from './Error/NotFound' +import PublisherOverview from './Overview/PublisherOverview' /** * Contains all UI components related to Application, Login and Platform */ -export {Login, BaseLayout, Create, NotFound}; \ No newline at end of file +export {Login, BaseLayout, Create, NotFound, PublisherOverview}; \ No newline at end of file From 4d16d73b232cf0e6d2cf2dea95afbd404f1d75ab Mon Sep 17 00:00:00 2001 From: Menaka Jayawardena Date: Sun, 20 Aug 2017 13:39:37 +0530 Subject: [PATCH 7/9] Created the Step 2 and 3 basic forms. Code Formatting. --- .../src/components/Application/Forms/Step1.js | 24 ++-- .../src/components/Application/Forms/Step2.js | 136 ++++++++++++++++-- .../src/components/Application/Forms/Step3.js | 72 +++++++--- .../src/components/Base/BaseLayout.js | 14 +- .../src/components/User/Login/Login.js | 6 +- 5 files changed, 198 insertions(+), 54 deletions(-) diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Forms/Step1.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Forms/Step1.js index a8fbec5e844..ca3e050c1c8 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Forms/Step1.js +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Forms/Step1.js @@ -17,11 +17,11 @@ */ import React, {Component} from 'react'; -import RaisedButton from 'material-ui/RaisedButton'; -import FlatButton from 'material-ui/FlatButton'; +import MenuItem from 'material-ui/MenuItem'; import TextField from 'material-ui/TextField'; +import FlatButton from 'material-ui/FlatButton'; import SelectField from 'material-ui/SelectField'; -import MenuItem from 'material-ui/MenuItem'; +import RaisedButton from 'material-ui/RaisedButton'; class Step1 extends Component { constructor() { @@ -40,7 +40,7 @@ class Step1 extends Component { }; setStepData() { - this.props.setData("step1", {step:"Dfds"}); + this.props.setData("step1", {step: "Dfds"}); this.handleNext.bind(this); } @@ -73,31 +73,31 @@ class Step1 extends Component { hintText="Enter a title for your application." floatingLabelText="Title*" floatingLabelFixed={true} - />
+ />
- - -
+ + +
- - - + + +
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Forms/Step2.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Forms/Step2.js index 166e3e1c688..7b89a6bc0c7 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Forms/Step2.js +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Forms/Step2.js @@ -16,13 +16,48 @@ * under the License. */ +import Chip from 'material-ui/Chip'; import React, {Component} from 'react'; -import RaisedButton from 'material-ui/RaisedButton'; +import MenuItem from 'material-ui/MenuItem'; +import TextField from 'material-ui/TextField'; import FlatButton from 'material-ui/FlatButton'; +import SelectField from 'material-ui/SelectField'; +import RaisedButton from 'material-ui/RaisedButton'; class Step2 extends Component { constructor() { super(); + this.state = { + tags: [], + defValue: "", + category: 1 + }; + + this.styles = { + chip: { + margin: 4, + }, + wrapper: { + display: 'flex', + flexWrap: 'wrap', + }, + }; + + } + + addTags(event) { + let tags = this.state.tags; + if (event.charCode === 13) { + event.preventDefault(); + tags.push({key: Math.floor(Math.random() * 1000), value: event.target.value}); + this.setState({tags, defValue: ""}, console.log(this.state.tags)); + } + } + + handleTagChange(event) { + let defaultValue = this.state.defValue; + defaultValue = event.target.value; + this.setState({defValue: defaultValue}) } handleNext() { @@ -33,27 +68,98 @@ class Step2 extends Component { this.props.handlePrev(); } + + handleRequestDelete = (key) => { + if (key === 3) { + alert('Why would you want to delete React?! :)'); + return; + } + + this.chipData = this.state.tags; + const chipToDelete = this.chipData.map((chip) => chip.key).indexOf(key); + this.chipData.splice(chipToDelete, 1); + this.setState({tags: this.chipData}); + }; + + renderChip(data) { + console.log(data); + return ( + this.handleRequestDelete(data.key)} + style={this.styles.chip} + > + {data.value} + + ); + } + render() { const contentStyle = {margin: '0 16px'}; return ( -
- Step2 +
+
-
- - +
+
+
+
+
+
+ {this.state.tags.map(this.renderChip, this)}
+
+ + +
+
+ +
+ +
+
); } } diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Forms/Step3.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Forms/Step3.js index 305c55d688f..fb46507d06f 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Forms/Step3.js +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Forms/Step3.js @@ -17,12 +17,20 @@ */ import React, {Component} from 'react'; -import RaisedButton from 'material-ui/RaisedButton'; +import Toggle from 'material-ui/Toggle'; +import MenuItem from 'material-ui/MenuItem'; +import TextField from 'material-ui/TextField'; import FlatButton from 'material-ui/FlatButton'; +import SelectField from 'material-ui/SelectField'; +import RaisedButton from 'material-ui/RaisedButton'; class Step3 extends Component { constructor() { super(); + this.state = { + showForm: false, + releaseChannel: 1 + } } handleFinish() { @@ -33,27 +41,57 @@ class Step3 extends Component { this.props.handlePrev(); } + handleToggle() { + let hide = this.state.showForm; + this.setState({showForm: !hide}); + } + + render() { const contentStyle = {margin: '0 16px'}; return ( -
- Step3 -
-
- - -
+
+
+ + + {/*If toggle is true, the release form will be shown.*/} + {!this.state.showForm ?
:
+ + + + +
+
+
} + +
+ +
+
); } } 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 c6b218464c2..cfea271a83c 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 @@ -16,20 +16,20 @@ * under the License. */ +import Badge from 'material-ui/Badge'; import React, {Component} from 'react'; import AppBar from 'material-ui/AppBar'; import Drawer from 'material-ui/Drawer'; +import {withRouter} from 'react-router-dom'; import IconButton from 'material-ui/IconButton'; -import NotificationsIcon from 'material-ui/svg-icons/social/notifications'; +import {List, ListItem} from 'material-ui/List'; import Apps from 'material-ui/svg-icons/navigation/apps'; -import DevicesOther from 'material-ui/svg-icons/hardware/devices-other'; -import ActionAccountCircle from 'material-ui/svg-icons/action/account-circle'; -import Dashboard from 'material-ui/svg-icons/action/dashboard'; import Add from 'material-ui/svg-icons/content/add-circle'; import Feedback from 'material-ui/svg-icons/action/feedback'; -import {withRouter} from 'react-router-dom' -import Badge from 'material-ui/Badge'; -import {List, ListItem} from 'material-ui/List'; +import Dashboard from 'material-ui/svg-icons/action/dashboard'; +import DevicesOther from 'material-ui/svg-icons/hardware/devices-other'; +import NotificationsIcon from 'material-ui/svg-icons/social/notifications'; +import ActionAccountCircle from 'material-ui/svg-icons/action/account-circle'; /** 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 c9197de1041..67b4e317192 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 @@ -16,13 +16,13 @@ * under the License. */ +import qs from 'qs'; import React, {Component} from 'react'; +import Checkbox from 'material-ui/Checkbox'; import {Redirect, Switch} from 'react-router-dom'; -import {Card, CardActions, CardMedia, CardTitle} from 'material-ui/Card'; import RaisedButton from 'material-ui/RaisedButton'; +import {Card, CardActions, CardTitle} from 'material-ui/Card'; import {TextValidator, ValidatorForm} from 'react-material-ui-form-validator'; -import Checkbox from 'material-ui/Checkbox'; -import qs from 'qs'; //todo: remove the {TextValidator, ValidatorForm} and implement it manually. From cbc061f739128dae9ba2cbda65eefb503b47eeb5 Mon Sep 17 00:00:00 2001 From: Menaka Jayawardena Date: Mon, 21 Aug 2017 14:14:34 +0530 Subject: [PATCH 8/9] Changes as per the comments. --- .../pom.xml | 74 +++++-------------- .../src/main/resources/publisher/.babelrc | 2 +- .../src/main/resources/publisher/package.json | 2 + .../resources/publisher/public/index.html | 17 +++++ .../src/main/resources/publisher/src/App.js | 40 +++++++--- .../{Create.js => ApplicationCreate.js} | 52 ++++++++++++- .../Application/ApplicationListing.js | 13 ++++ .../{AppView.js => ApplicationView.js} | 13 ++++ .../src/components/Application/Forms/Step1.js | 47 +++++++++--- .../src/components/Application/Forms/Step2.js | 56 ++++++++++++-- .../src/components/Application/Forms/Step3.js | 36 ++++++++- .../src/components/Base/BaseLayout.js | 3 +- .../src/components/Error/NotFound.js | 13 ++-- .../components/Overview/PublisherOverview.js | 8 +- .../Platform/{Create.js => PlatformCreate.js} | 21 ++++++ .../components/Platform/PlatformListing.js | 21 ++++++ .../src/components/Platform/PlatformView.js | 21 ++++++ .../src/components/Reviews/ReviewListing.js | 21 ++++++ .../src/components/Reviews/ReviewView.js | 21 ++++++ .../src/components/UIComponents/DataTable.js | 21 ++++++ .../src/components/UIComponents/SimpleForm.js | 17 ----- .../src/components/User/Login/Login.js | 28 +++++-- .../src/components/User/Logout/Logout.js | 0 .../publisher/src/components/index.js | 13 ++-- .../src/main/resources/publisher/src/index.js | 7 +- .../publisher/src/stores/ApplicationStore.js | 19 +++++ .../publisher/src/stores/PlatformStore.js | 1 + .../publisher/src/stores/ReviewStore.js | 2 + .../resources/publisher/src/stores/index.js | 9 ++- .../resources/publisher/webpack.config.js | 17 +++++ 30 files changed, 479 insertions(+), 136 deletions(-) rename components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/{Create.js => ApplicationCreate.js} (79%) rename components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/{AppView.js => ApplicationView.js} (72%) rename components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Platform/{Create.js => PlatformCreate.js} (67%) delete mode 100644 components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/UIComponents/SimpleForm.js delete mode 100644 components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/User/Logout/Logout.js diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/pom.xml b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/pom.xml index cb06ef09800..8f8412c9afe 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/pom.xml +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/pom.xml @@ -1,4 +1,21 @@ + @@ -9,18 +26,9 @@ application-mgt 3.0.46-SNAPSHOT - org.wso2.carbon.device.application.mgt.publisher.ui 3.0.46-SNAPSHOT - - - - - - - - @@ -77,36 +85,6 @@ - - - npm run build (compile) @@ -122,21 +100,6 @@ - - - - - - - - - - - - - - - ${npm.working.dir} @@ -165,5 +128,4 @@ build_prod ./src/main/ - - \ No newline at end of file + diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/.babelrc b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/.babelrc index 02f08fb6c0f..3c078e9f990 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/.babelrc +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/.babelrc @@ -2,4 +2,4 @@ "presets": [ "es2015" ] -} \ No newline at end of file +} 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 fe5f46e4210..804eea3d0de 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 @@ -15,9 +15,11 @@ "latest-version": "^3.1.0", "material-ui": "^0.19.0", "material-ui-datatables": "^0.18.2", + "prop-types": "^15.5.10", "qs": "^6.5.0", "react": "^15.6.1", "react-dom": "^15.6.1", + "react-dropzone": "^4.1.0", "react-images-uploader": "^1.1.0", "react-material-ui-form-validator": "^0.5.0", "react-modal": "^2.2.2", diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/public/index.html b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/public/index.html index e684fd6f875..b7e1fc8d4d8 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/public/index.html +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/public/index.html @@ -1,4 +1,21 @@ + 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 771422d0c14..faa4e14359d 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 @@ -20,15 +20,26 @@ import './App.css' import React, {Component} from 'react'; import createHistory from 'history/createHashHistory'; import {HashRouter as Router, Redirect, Route, Switch} from 'react-router-dom' -import {BaseLayout, Create, Login, NotFound, PublisherOverview} from './components' +import {BaseLayout, ApplicationCreate, Login, NotFound, PublisherOverview, PlatformCreate} from './components' const history = createHistory({basename: '/publisher'}); +/** + * This component defines the layout and the routes for the app. + * All the content will be loaded inside the Base component. + * The base component includes the Core layout and the routers according to which the content will be displayed. + * + * The Router and Route components. + * The Router and Route is used for navigation. + * We specify the component which needs to be rendered for an URL. + * Ex: When navigate to publisher/overview, the overview component will be rendered inside the main layout. + * */ + class Base extends Component { constructor() { super(); this.state = { - user: "s" + user: "admin" } } @@ -40,15 +51,15 @@ class Base extends Component { - {/**/} - {/**/} - - {/**/} - - - - - + + + + + + + + + @@ -60,6 +71,9 @@ class Base extends Component { } } +/** + * This component is referred by the index.js to initiate the application. + * */ class Publisher extends Component { render() { return ( @@ -76,4 +90,8 @@ class Publisher extends Component { } } +Publisher.propTypes = { + user: Object +}; + export default Publisher; diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Create.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/ApplicationCreate.js similarity index 79% rename from components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Create.js rename to components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/ApplicationCreate.js index 58fa7aa8ecb..849a994663f 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Create.js +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/ApplicationCreate.js @@ -25,7 +25,16 @@ import RaisedButton from 'material-ui/RaisedButton'; import {Card, CardActions, CardTitle} from 'material-ui/Card'; import {Step, StepLabel, Stepper,} from 'material-ui/Stepper'; -class Create extends Component { + +/** + * The App Create Component. + * + * Application creation is handled through a Wizard. (We use Material UI Stepper.) + * + * In each step, data will be set to the state separately. + * When the wizard is completed, data will be arranged and sent to the api. + * */ +class ApplicationCreate extends Component { constructor() { super(); this.setStepData.bind(this); @@ -42,6 +51,9 @@ class Create extends Component { }; } + /** + * Handles next button click event. + * */ handleNext = () => { const {stepIndex} = this.state; this.setState({ @@ -50,14 +62,25 @@ class Create extends Component { }); }; + /** + * Handles form submit. + * */ handleSubmit = () => { console.log(this.state.stepData); }; + /** + * Handles cancel button click event. + * This will show a confirmation dialog to cancel the application creation process. + * */ handleCancel = () => { this.setState({isDialogOpen: true}); }; + /** + * Handled [ < Prev ] button click. + * This clears the data in the current step and returns to the previous step. + * */ handlePrev = () => { const {stepIndex} = this.state; if (stepIndex > 0) { @@ -66,6 +89,9 @@ class Create extends Component { } }; + /** + * Saves form data in each step in to the state. + * */ setStepData = (step, data) => { console.log(step, data, this.state.stepData); let tmpStepData = this.state.stepData; @@ -83,14 +109,31 @@ class Create extends Component { this.setState({stepData: tempData}); }; + /** + * Handles the Yes button in app creation cancellation dialog. + * Clears all the form data and reset the wizard. + * */ handleYes = () => { this.setState({finished: false, stepIndex: 0, stepData: [], isDialogOpen: false}); }; + /** + * Handles No button in app creation cancellation dialog. + * Returns to the same step. + * */ handleNo = () => { this.setState({isDialogOpen: false}); }; + /** + * Defines all the Steps in the stepper. (Wizard) + * + * Extension Point: If any extra steps needed, follow the instructions below. + * 1. Create the required form ./Forms directory. + * 2. Add defined case statements. + * 3. Define the Step in render function. + * + * */ getStepContent(stepIndex) { switch (stepIndex) { case 0: @@ -117,6 +160,9 @@ class Create extends Component { const {finished, stepIndex} = this.state; const contentStyle = {margin: '0 16px'}; + /** + * Defines the dialog box actions. [Yes][No] + * */ const actions = [

Create App?

-
+ @@ -182,4 +228,4 @@ class Create extends Component { } } -export default withRouter(Create); +export default withRouter(ApplicationCreate); diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/ApplicationListing.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/ApplicationListing.js index 9eb827eb700..d81c32a7905 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/ApplicationListing.js +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/ApplicationListing.js @@ -15,3 +15,16 @@ * specific language governing permissions and limitations * under the License. */ + +import React, {Component} from 'react'; +import {withRouter} from 'react-router-dom'; + + +/** + * Application List Component. + * */ +class ApplicationListing extends Component{ + +} + +export default withRouter(ApplicationListing); \ 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/Application/AppView.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/ApplicationView.js similarity index 72% rename from components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/AppView.js rename to components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/ApplicationView.js index 9eb827eb700..3959357f2ec 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/AppView.js +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/ApplicationView.js @@ -15,3 +15,16 @@ * specific language governing permissions and limitations * under the License. */ + +import React, {Component} from 'react'; +import {withRouter} from 'react-router-dom'; + +/** + * Application view component. + * Shows the details of the application. + * */ +class ApplicationView extends Component{ + +} + +export default withRouter(ApplicationView); diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Forms/Step1.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Forms/Step1.js index ca3e050c1c8..8ce132ba24d 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Forms/Step1.js +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/Forms/Step1.js @@ -23,6 +23,19 @@ import FlatButton from 'material-ui/FlatButton'; import SelectField from 'material-ui/SelectField'; import RaisedButton from 'material-ui/RaisedButton'; +/** + * The first step of the application creation wizard. + * This contains following components: + * * Application Title + * * Store Type + * * Application Platform + * + * Parent Component: Create + * Props: + * 1. handleNext: {type: function, Invokes handleNext function of parent component} + * 2. setData : {type: function, Sets current form data to the state of the parent component} + * 3. removeData: {type: function, Invokes the removeStepData function click of parent} + * */ class Step1 extends Component { constructor() { super(); @@ -35,34 +48,47 @@ class Step1 extends Component { }; } + /** + * Invokes the handleNext function in Create component. + * */ handleNext = () => { this.props.handleNext(); }; + /** + * Persist the current form data to the state. + * */ setStepData() { this.props.setData("step1", {step: "Dfds"}); this.handleNext.bind(this); } + /** + * Handles Next button click. + * Validates the form. + * Sets the data to the state. + * Invokes the handleNext method of Create component. + * */ handleClick() { this.setStepData(); this.handleNext(); } - handlePrev() { - this.props.handlePrev(); - } - + /** + * Triggers when changing the Platform selection. + * */ onChangePlatform = (event, index, value) => { this.setState({platform: value}); }; + /** + * Triggers when changing the Store selection. + * */ onChangeStore = (event, index, value) => { this.setState({store: value}); }; render() { - const {finished, stepIndex} = this.state; const contentStyle = {margin: '0 16px'}; return (
@@ -94,13 +120,10 @@ class Step1 extends Component {
+ +
+
- { - if (key === 3) { - alert('Why would you want to delete React?! :)'); - return; - } - this.chipData = this.state.tags; const chipToDelete = this.chipData.map((chip) => chip.key).indexOf(key); this.chipData.splice(chipToDelete, 1); this.setState({tags: this.chipData}); }; + /** + * Creates Chip array from state.tags. + * */ renderChip(data) { console.log(data); return ( @@ -143,8 +179,14 @@ class Step2 extends Component { >
+ {/*Platform Specific Properties.*/} +
+ fdfdfd +
+
+
{/*If toggle is true, the release form will be shown.*/} - {!this.state.showForm ?
:
+ {!this.state.showForm ?
:
- 404 not found + 404 not found
); } } -export default Error; \ No newline at end of file +export default Error; diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Overview/PublisherOverview.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Overview/PublisherOverview.js index d4230f44d35..c9640bab151 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Overview/PublisherOverview.js +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Overview/PublisherOverview.js @@ -17,6 +17,13 @@ */ import React, {Component} from 'react'; +/** + * + * ***NEW*** + * The Publisher overview component. + * This component could be used to view app analytics. + * i.e number of overall downloads, ratings ect. + * */ class PublisherOverview extends Component { constructor() { @@ -24,7 +31,6 @@ class PublisherOverview extends Component { } componentWillMount() { - console.log("In Crate") } render() { diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Platform/Create.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Platform/PlatformCreate.js similarity index 67% rename from components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Platform/Create.js rename to components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Platform/PlatformCreate.js index 9eb827eb700..0928586b5af 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Platform/Create.js +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Platform/PlatformCreate.js @@ -15,3 +15,24 @@ * specific language governing permissions and limitations * under the License. */ +import React, {Component} from 'react'; + +/** + * Platform Create component + * */ +class PlatformCreate extends Component { + + constructor() { + super(); + } + + render() { + return ( +
+ Create Platform +
+ ); + } +} + +export default PlatformCreate; diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Platform/PlatformListing.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Platform/PlatformListing.js index 9eb827eb700..e51137e453a 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Platform/PlatformListing.js +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Platform/PlatformListing.js @@ -15,3 +15,24 @@ * specific language governing permissions and limitations * under the License. */ +import React, {Component} from 'react'; + +/** + * Platform Listing component. + * */ +class PlatformListing extends Component { + + constructor() { + super(); + } + + render() { + return ( +
+ Platform View +
+ ); + } +} + +export default PlatformListing; diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Platform/PlatformView.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Platform/PlatformView.js index 9eb827eb700..dce6e9f716d 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Platform/PlatformView.js +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Platform/PlatformView.js @@ -15,3 +15,24 @@ * specific language governing permissions and limitations * under the License. */ +import React, {Component} from 'react'; + +/** + * Platform view component. + * */ +class PlatformView extends Component { + + constructor() { + super(); + } + + render() { + return ( +
+ Platform View +
+ ); + } +} + +export default PlatformView; diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Reviews/ReviewListing.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Reviews/ReviewListing.js index 9eb827eb700..2575b736f7b 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Reviews/ReviewListing.js +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Reviews/ReviewListing.js @@ -15,3 +15,24 @@ * specific language governing permissions and limitations * under the License. */ +import React, {Component} from 'react'; + +/** + * Review Listing. + * */ +class ReviewListing extends Component { + + constructor() { + super(); + } + + render() { + return ( +
+ Reviews List +
+ ); + } +} + +export default ReviewListing; diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Reviews/ReviewView.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Reviews/ReviewView.js index 9eb827eb700..da5bdac6070 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Reviews/ReviewView.js +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Reviews/ReviewView.js @@ -15,3 +15,24 @@ * specific language governing permissions and limitations * under the License. */ +import React, {Component} from 'react'; + +/** + * Review details view. + * */ +class ReviewView extends Component { + + constructor() { + super(); + } + + render() { + return ( +
+ Review +
+ ); + } +} + +export default ReviewView; diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/UIComponents/DataTable.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/UIComponents/DataTable.js index 9eb827eb700..649d93f32be 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/UIComponents/DataTable.js +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/UIComponents/DataTable.js @@ -15,3 +15,24 @@ * specific language governing permissions and limitations * under the License. */ +import React, {Component} from 'react'; + +/** + * Error page. + * */ +class DataTable extends Component { + + constructor() { + super(); + } + + render() { + return ( +
+ Data Table +
+ ); + } +} + +export default DataTable; diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/UIComponents/SimpleForm.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/UIComponents/SimpleForm.js deleted file mode 100644 index 9eb827eb700..00000000000 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/UIComponents/SimpleForm.js +++ /dev/null @@ -1,17 +0,0 @@ -/* - * 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. - */ 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 67b4e317192..72255be8dd5 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 @@ -26,6 +26,15 @@ import {TextValidator, ValidatorForm} from 'react-material-ui-form-validator'; //todo: remove the {TextValidator, ValidatorForm} and implement it manually. + +/** + * The Login Component. + * + * This component contains the Login form and methods to handle field change events. + * The user name and password will be set to the state and sent to the api. + * + * If the user is already logged in, it will redirect to the last point where the user was. + * */ class Login extends Component { constructor() { super(); @@ -53,6 +62,9 @@ class Login extends Component { event.preventDefault(); } + /** + * Handles the username field change event. + * */ onUserNameChange(event) { this.setState( { @@ -61,6 +73,9 @@ class Login extends Component { ); } + /** + * Handles the password field change event. + * */ onPasswordChange(event) { this.setState( { @@ -69,12 +84,15 @@ class Login extends Component { ); } - rememberMe() { + /** + * Handles the remember me check. + * */ + handleRememberMe() { this.setState( { rememberMe: !this.state.rememberMe } - ) + ); } render() { @@ -87,13 +105,11 @@ class Login extends Component { - console.log(errors)}> -

-
); @@ -132,7 +147,6 @@ class Login extends Component { ); } - } } diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/User/Logout/Logout.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/User/Logout/Logout.js deleted file mode 100644 index e69de29bb2d..00000000000 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 dde690556be..3ed7d23ef64 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 @@ -16,14 +16,15 @@ * under the License. */ -import Login from './User/Login/Login' -import BaseLayout from './Base/BaseLayout' -import Create from './Application/Create' -import NotFound from './Error/NotFound' -import PublisherOverview from './Overview/PublisherOverview' +import Login from './User/Login/Login'; +import NotFound from './Error/NotFound'; +import BaseLayout from './Base/BaseLayout'; +import PlatformCreate from './Platform/PlatformCreate'; +import PublisherOverview from './Overview/PublisherOverview'; +import ApplicationCreate from './Application/ApplicationCreate'; /** * Contains all UI components related to Application, Login and Platform */ -export {Login, BaseLayout, Create, NotFound, PublisherOverview}; \ No newline at end of file +export {Login, BaseLayout, ApplicationCreate, NotFound, PublisherOverview, PlatformCreate}; diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/index.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/index.js index d5ab4c3fe28..e94b5727376 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/index.js +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/index.js @@ -16,12 +16,15 @@ * under the License. */ -import React from 'react'; -import ReactDOM from 'react-dom'; import './index.css'; +import React from 'react'; import Publisher from './App'; +import ReactDOM from 'react-dom'; import registerServiceWorker from './registerServiceWorker'; import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider'; +/** + * This is the base js file of the app. All the content will be rendered in the root element. + * */ ReactDOM.render(, document.getElementById('root')); registerServiceWorker(); diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/stores/ApplicationStore.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/stores/ApplicationStore.js index e69de29bb2d..8d3763b6f00 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/stores/ApplicationStore.js +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/stores/ApplicationStore.js @@ -0,0 +1,19 @@ +/* + * 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. + */ + +export class ApplicationStore {}; diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/stores/PlatformStore.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/stores/PlatformStore.js index 9eb827eb700..51babc360d5 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/stores/PlatformStore.js +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/stores/PlatformStore.js @@ -15,3 +15,4 @@ * specific language governing permissions and limitations * under the License. */ +export class PlatformStore{}; diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/stores/ReviewStore.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/stores/ReviewStore.js index 9eb827eb700..08ce7b2504f 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/stores/ReviewStore.js +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/stores/ReviewStore.js @@ -15,3 +15,5 @@ * specific language governing permissions and limitations * under the License. */ + +export class ReviewStore{}; diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/stores/index.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/stores/index.js index cc77f8a78c0..74161552173 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/stores/index.js +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/stores/index.js @@ -14,4 +14,11 @@ * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. - */ \ No newline at end of file + */ + +import ReviewStore from './ReviewStore'; +import PlatformStore from './PlatformStore'; +import ApplicationStore from './ApplicationStore'; + + +export {ApplicationStore, PlatformStore, ReviewStore}; \ No newline at end of file diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/webpack.config.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/webpack.config.js index c03279bd3df..c6483f4aaa0 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/webpack.config.js +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/webpack.config.js @@ -1,3 +1,20 @@ +/* + * 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. + */ var path = require('path'); const config = { From dc2aa386bfa6561a3273bafe1355f7ae5a3a0811 Mon Sep 17 00:00:00 2001 From: Menaka Jayawardena Date: Tue, 22 Aug 2017 01:42:16 +0530 Subject: [PATCH 9/9] Fixed license header and removed empty tags. --- .../pom.xml | 9 --- .../resources/publisher/public/index.html | 2 +- .../pom.xml | 76 +++++-------------- .../pom.xml | 17 +++++ .../pom.xml | 17 +++++ 5 files changed, 52 insertions(+), 69 deletions(-) diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/pom.xml b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/pom.xml index 8f8412c9afe..e7d27b5f748 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/pom.xml +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/pom.xml @@ -53,15 +53,6 @@ - - - - - - - - - diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/public/index.html b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/public/index.html index b7e1fc8d4d8..39ac2df1c60 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/public/index.html +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/public/index.html @@ -1,6 +1,6 @@ @@ -13,11 +30,6 @@ 3.0.46-SNAPSHOT - - - - - @@ -44,15 +56,6 @@ - - - - - - - - - @@ -76,36 +79,6 @@ - - - npm run build (compile) @@ -121,21 +94,6 @@ - - - - - - - - - - - - - - - ${npm.working.dir} diff --git a/features/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui.feature/pom.xml b/features/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui.feature/pom.xml index e9da7bcff09..3bb9936115d 100644 --- a/features/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui.feature/pom.xml +++ b/features/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui.feature/pom.xml @@ -1,4 +1,21 @@ + diff --git a/features/application-mgt/org.wso2.carbon.device.application.mgt.store.ui.feature/pom.xml b/features/application-mgt/org.wso2.carbon.device.application.mgt.store.ui.feature/pom.xml index 33f45fc1e08..521c1665051 100644 --- a/features/application-mgt/org.wso2.carbon.device.application.mgt.store.ui.feature/pom.xml +++ b/features/application-mgt/org.wso2.carbon.device.application.mgt.store.ui.feature/pom.xml @@ -1,4 +1,21 @@ +