@@ -94,13 +120,10 @@ class Step1 extends Component {
+
+
{/*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 d4230f44d3..c9640bab15 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 9eb827eb70..0928586b5a 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 9eb827eb70..e51137e453 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 9eb827eb70..dce6e9f716 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 9eb827eb70..2575b736f7 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 9eb827eb70..da5bdac607 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 9eb827eb70..649d93f32b 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 9eb827eb70..0000000000
--- 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 67b4e31719..72255be8dd 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 e69de29bb2..0000000000
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 dde690556b..3ed7d23ef6 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 d5ab4c3fe2..e94b572737 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 e69de29bb2..8d3763b6f0 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 9eb827eb70..51babc360d 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 9eb827eb70..08ce7b2504 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 cc77f8a78c..7416155217 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 c03279bd3d..c6483f4aaa 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 = {