From 241392fa2cd987a8ab0a1a1e1afd4540e51b2f1c Mon Sep 17 00:00:00 2001 From: sinthuja Date: Mon, 9 Oct 2017 09:23:28 +0530 Subject: [PATCH] Adding store features and adding internationalization for the User Options component. --- .../resources/store/public/locales/en.json | 4 +- .../UIComponents/UserOptions/UserOptions.jsx | 6 +- .../src/main/resources/p2.inf | 6 +- .../pom.xml | 91 ++++++++++++- .../src/main/resources/build.properties | 0 .../src/main/resources/p2.inf | 4 + .../pom.xml | 120 ------------------ .../src/main/resources/p2.inf | 9 -- features/application-mgt/pom.xml | 3 +- .../src/main/resources/build.properties | 1 + .../src/main/resources/p2.inf | 4 + 11 files changed, 109 insertions(+), 139 deletions(-) rename features/application-mgt/{org.wso2.carbon.device.application.mgt.ui.feature => org.wso2.carbon.device.application.mgt.store.ui.feature}/src/main/resources/build.properties (100%) create mode 100644 features/application-mgt/org.wso2.carbon.device.application.mgt.store.ui.feature/src/main/resources/p2.inf delete mode 100644 features/application-mgt/org.wso2.carbon.device.application.mgt.ui.feature/pom.xml delete mode 100644 features/application-mgt/org.wso2.carbon.device.application.mgt.ui.feature/src/main/resources/p2.inf create mode 100644 features/org.wso2.carbon.device.application.mgt.store.ui.feature/src/main/resources/build.properties create mode 100644 features/org.wso2.carbon.device.application.mgt.store.ui.feature/src/main/resources/p2.inf diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/src/main/resources/store/public/locales/en.json b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/src/main/resources/store/public/locales/en.json index 5e4c21af11..aff57f632b 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/src/main/resources/store/public/locales/en.json +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/src/main/resources/store/public/locales/en.json @@ -37,5 +37,7 @@ "Alpha.Releases" : "Alpha Releases", "Version" : "Version", "Status" : "Status", - "App.Publisher" : "Application Publisher" + "App.Publisher" : "Application Publisher", + "Login": "Login", + "Logout" : "Logout" } diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/src/main/resources/store/src/components/UIComponents/UserOptions/UserOptions.jsx b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/src/main/resources/store/src/components/UIComponents/UserOptions/UserOptions.jsx index 5ebdcfb0e4..549b949237 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/src/main/resources/store/src/components/UIComponents/UserOptions/UserOptions.jsx +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/src/main/resources/store/src/components/UIComponents/UserOptions/UserOptions.jsx @@ -19,6 +19,8 @@ import React, {Component} from 'react'; import './user-options.css'; import AuthHandler from '../../../api/authHandler'; +import {FormattedMessage} from 'react-intl'; + class UserOptions extends Component { @@ -43,13 +45,13 @@ class UserOptions extends Component { if (this.state.user) { return (
- Logout +
); } else { return (
- Login +
); } diff --git a/features/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui.feature/src/main/resources/p2.inf b/features/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui.feature/src/main/resources/p2.inf index 7240587940..47bccfcdb7 100644 --- a/features/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui.feature/src/main/resources/p2.inf +++ b/features/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui.feature/src/main/resources/p2.inf @@ -1,4 +1,4 @@ instructions.configure = \ -org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../deployment/server/webapps);\ -org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../deployment/server/webapps/publisher/);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.application.mgt.publisher.ui_${feature.version}/publisher/public/,target:${installFolder}/../../deployment/server/webapps/publisher/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../deployment/server/jaggeryapp);\ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../deployment/server/jaggeryapps/publisher/);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.application.mgt.publisher.ui_${feature.version}/publisher/public/,target:${installFolder}/../../deployment/server/jaggeryapps/publisher/,overwrite:true);\ 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 521c166505..a21a57348e 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 @@ -19,15 +19,102 @@ - 4.0.0 org.wso2.carbon.devicemgt application-mgt-feature 3.0.46-SNAPSHOT + + 4.0.0 org.wso2.carbon.device.application.mgt.store.ui.feature 3.0.46-SNAPSHOT + pom + WSO2 Carbon - Application Management Store UI Feature + http://wso2.org + This feature contains Application Management Store UI - + + + + org.apache.maven.plugins + maven-dependency-plugin + + + unpack + package + + unpack + + + + + org.wso2.carbon.devicemgt + org.wso2.carbon.device.application.mgt.store.ui + ${project.version} + jar + true + + ${project.build.directory}/maven-shared-archive-resources + + **/* + + + + + + + + org.apache.maven.plugins + maven-resources-plugin + + + copy-resources + generate-resources + + copy-resources + + + src/main/resources + + + resources + + build.properties + p2.inf + + + + + + + + + org.wso2.maven + carbon-p2-plugin + + + p2-feature-generation + package + + p2-feature-gen + + + org.wso2.carbon.device.application.mgt.store.ui + ../../../features/etc/feature.properties + + + + org.wso2.carbon.p2.category.type:server + + org.eclipse.equinox.p2.type.group:false + + + + + + + + + \ No newline at end of file diff --git a/features/application-mgt/org.wso2.carbon.device.application.mgt.ui.feature/src/main/resources/build.properties b/features/application-mgt/org.wso2.carbon.device.application.mgt.store.ui.feature/src/main/resources/build.properties similarity index 100% rename from features/application-mgt/org.wso2.carbon.device.application.mgt.ui.feature/src/main/resources/build.properties rename to features/application-mgt/org.wso2.carbon.device.application.mgt.store.ui.feature/src/main/resources/build.properties diff --git a/features/application-mgt/org.wso2.carbon.device.application.mgt.store.ui.feature/src/main/resources/p2.inf b/features/application-mgt/org.wso2.carbon.device.application.mgt.store.ui.feature/src/main/resources/p2.inf new file mode 100644 index 0000000000..fe5d20809c --- /dev/null +++ b/features/application-mgt/org.wso2.carbon.device.application.mgt.store.ui.feature/src/main/resources/p2.inf @@ -0,0 +1,4 @@ +instructions.configure = \ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../deployment/server/jaggeryapps);\ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../deployment/server/jaggeryapps/store/);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.application.mgt.store.ui_${feature.version}/store/public/,target:${installFolder}/../../deployment/server/jaggeryapps/store/,overwrite:true);\ diff --git a/features/application-mgt/org.wso2.carbon.device.application.mgt.ui.feature/pom.xml b/features/application-mgt/org.wso2.carbon.device.application.mgt.ui.feature/pom.xml deleted file mode 100644 index bee84d4f64..0000000000 --- a/features/application-mgt/org.wso2.carbon.device.application.mgt.ui.feature/pom.xml +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - org.wso2.carbon.devicemgt - application-mgt-feature - 3.0.46-SNAPSHOT - ../pom.xml - - - 4.0.0 - org.wso2.carbon.device.application.mgt.ui.feature - 3.0.46-SNAPSHOT - pom - WSO2 Carbon - Application Management UI Feature - http://wso2.org - This feature contains Application Management console UI - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - unpack - package - - unpack - - - - - org.wso2.carbon.devicemgt - org.wso2.carbon.device.application.mgt.ui - ${project.version} - zip - true - - ${project.build.directory}/maven-shared-archive-resources - - **/* - - - - - - - - org.apache.maven.plugins - maven-resources-plugin - - - copy-resources - generate-resources - - copy-resources - - - src/main/resources - - - resources - - build.properties - p2.inf - - - - - - - - - org.wso2.maven - carbon-p2-plugin - - - p2-feature-generation - package - - p2-feature-gen - - - org.wso2.carbon.device.application.mgt.ui - ../../../features/etc/feature.properties - - - - org.wso2.carbon.p2.category.type:server - - org.eclipse.equinox.p2.type.group:false - - - - - - - - - - \ No newline at end of file diff --git a/features/application-mgt/org.wso2.carbon.device.application.mgt.ui.feature/src/main/resources/p2.inf b/features/application-mgt/org.wso2.carbon.device.application.mgt.ui.feature/src/main/resources/p2.inf deleted file mode 100644 index 529f8f8e7a..0000000000 --- a/features/application-mgt/org.wso2.carbon.device.application.mgt.ui.feature/src/main/resources/p2.inf +++ /dev/null @@ -1,9 +0,0 @@ -instructions.configure = \ -org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../deployment/server/jaggeryapps/application-mgt);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.application.mgt.ui_${feature.version}/jaggeryapps/application-mgt,target:${installFolder}/../../deployment/server/jaggeryapps/application-mgt,overwrite:true);\ -org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../deployment/server/jaggeryapps/appmgt-uuf-template-app);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.application.mgt.ui_${feature.version}/jaggeryapps/appmgt-uuf-template-app,target:${installFolder}/../../deployment/server/jaggeryapps/appmgt-uuf-template-app,overwrite:true);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.application.mgt.ui_${feature.version}/jaggery-modules/utils/,target:${installFolder}/../../modules/utils,overwrite:true);\ - -instructions.unconfigure = \ -org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../deployment/server/jaggeryapps/application-mgt);\ diff --git a/features/application-mgt/pom.xml b/features/application-mgt/pom.xml index 4f542af90b..6dad143b10 100644 --- a/features/application-mgt/pom.xml +++ b/features/application-mgt/pom.xml @@ -36,10 +36,9 @@ org.wso2.carbon.device.application.mgt.api.feature org.wso2.carbon.device.application.mgt.auth.handler.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 + org.wso2.carbon.device.application.mgt.store.ui.feature diff --git a/features/org.wso2.carbon.device.application.mgt.store.ui.feature/src/main/resources/build.properties b/features/org.wso2.carbon.device.application.mgt.store.ui.feature/src/main/resources/build.properties new file mode 100644 index 0000000000..9c86577d76 --- /dev/null +++ b/features/org.wso2.carbon.device.application.mgt.store.ui.feature/src/main/resources/build.properties @@ -0,0 +1 @@ +custom = true diff --git a/features/org.wso2.carbon.device.application.mgt.store.ui.feature/src/main/resources/p2.inf b/features/org.wso2.carbon.device.application.mgt.store.ui.feature/src/main/resources/p2.inf new file mode 100644 index 0000000000..7240587940 --- /dev/null +++ b/features/org.wso2.carbon.device.application.mgt.store.ui.feature/src/main/resources/p2.inf @@ -0,0 +1,4 @@ +instructions.configure = \ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../deployment/server/webapps);\ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../deployment/server/webapps/publisher/);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.application.mgt.publisher.ui_${feature.version}/publisher/public/,target:${installFolder}/../../deployment/server/webapps/publisher/,overwrite:true);\