diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/components/apps/release/edit-release/EditRelease.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/components/apps/release/edit-release/EditRelease.js
index 9ad5f239f05..ecc6000ffe9 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/components/apps/release/edit-release/EditRelease.js
+++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/components/apps/release/edit-release/EditRelease.js
@@ -117,7 +117,7 @@ class EditReleaseModal extends React.Component {
showModal = () => {
- const {release} = this.props;
+ const {app, release} = this.props;
const {formConfig} = this.state;
const {specificElements} = formConfig;
let metaData = [];
@@ -143,6 +143,14 @@ class EditReleaseModal extends React.Component {
}
});
+ // if (specificElements.hasOwnProperty("packageName")) {
+ // this.props.form.setFields({
+ // packageName: {
+ // value: app.packageName
+ // }
+ // });
+ // }
+
if (specificElements.hasOwnProperty("version")) {
this.props.form.setFields({
version: {
@@ -238,10 +246,10 @@ class EditReleaseModal extends React.Component {
if (specificElements.hasOwnProperty("url")) {
release.url = values.url;
}
-
- if (specificElements.hasOwnProperty("packageName")) {
- release.packageName = values.packageName;
- }
+ //
+ // if (specificElements.hasOwnProperty("packageName")) {
+ // release.packageName = values.packageName;
+ // }
if (icons.length === 1) {
data.append('icon', icons[0].originFileObj);
@@ -362,18 +370,18 @@ class EditReleaseModal extends React.Component {
)}
- {formConfig.specificElements.hasOwnProperty("packageName") && (
-
- {getFieldDecorator('packageName', {
- rules: [{
- required: true,
- message: 'Please input the package name'
- }],
- })(
-
- )}
-
- )}
+ {/*{formConfig.specificElements.hasOwnProperty("packageName") && (*/}
+ {/* */}
+ {/* {getFieldDecorator('packageName', {*/}
+ {/* rules: [{*/}
+ {/* required: true,*/}
+ {/* message: 'Please input the package name'*/}
+ {/* }],*/}
+ {/* })(*/}
+ {/* */}
+ {/* )}*/}
+ {/* */}
+ {/*)}*/}
{formConfig.specificElements.hasOwnProperty("url") && (
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/js/Utils.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/js/Utils.js
index 9cbc439bba7..2ef4f8bf0f6 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/js/Utils.js
+++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/js/Utils.js
@@ -16,11 +16,12 @@
* under the License.
*/
-import {message, notification} from "antd";
+import {notification} from "antd";
export const handleApiError = (error, message) => {
if (error.hasOwnProperty("response") && error.response.status === 401) {
- window.location.href = window.location.origin + '/publisher/login';
+ const redirectUrl = encodeURI(window.location.href);
+ window.location.href = window.location.origin + `/publisher/login?redirect=${redirectUrl}`;
} else {
notification["error"]({
message: "There was a problem",
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/pages/Login.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/pages/Login.js
index 1973099955a..63ea79f8ca1 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/pages/Login.js
+++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/pages/Login.js
@@ -99,7 +99,12 @@ class NormalLoginForm extends React.Component {
axios.post(window.location.origin+ config.serverConfig.loginUri, request
).then(res=>{
if (res.status === 200) {
- window.location = window.location.origin+"/publisher";
+ let redirectUrl = window.location.origin+"/publisher";
+ const searchParams = new URLSearchParams(window.location.search);
+ if(searchParams.has("redirect")){
+ redirectUrl = searchParams.get("redirect");
+ }
+ window.location = redirectUrl;
}
}).catch(function (error) {
handleApiError(error, "Error occurred while trying to login.");
@@ -152,7 +157,7 @@ class NormalLoginForm extends React.Component {
)}
Forgot password
-
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/pages/dashboard/Dashboard.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/pages/dashboard/Dashboard.js
index 5cd6ce5de52..044851a503a 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/pages/dashboard/Dashboard.js
+++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/pages/dashboard/Dashboard.js
@@ -81,12 +81,12 @@ class Dashboard extends React.Component {
>
- Public APP
+ Public App
- Enterprise APP
+ Enterprise App
@@ -94,6 +94,11 @@ class Dashboard extends React.Component {
Web Clip
+
+
+ Custom App
+
+
*/}
- {app.name}
+ {app.name}
{app.subMethod.toLowerCase()}
{
} else {
notification["error"]({
message: "There was a problem",
- duration: 0,
+ duration: 10,
description: message,
});
}