diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/public/conf/config.json b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/public/conf/config.json index edd76448fe..c2e66dda14 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/public/conf/config.json +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/public/conf/config.json @@ -3,10 +3,11 @@ "type": "default", "value": "lightBaseTheme" }, - "config": { + "serverConfig": { "hostname": "localhost", "httpsPort": "9443", - "apiPort": "8243" + "invokerUri": "/api/application-mgt-handler/v1.0/invoke", + "loginUri": "/api/application-mgt-handler/v1.0/login" }, "serverUrl" : "https://localhost:9443", "defaultPlatformIcons": { diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/components/AppCard.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/components/AppCard.js index 7ae50e0c90..d965e05d7f 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/components/AppCard.js +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/components/AppCard.js @@ -20,9 +20,13 @@ class AppCard extends React.Component { if(defaultPlatformIcons.hasOwnProperty(this.props.platform)){ icon = defaultPlatformIcons[this.props.platform]; } + let descriptionText = this.props.description; + if(descriptionText.length>50){ + descriptionText = descriptionText.substring(0,50)+"..."; + } const description = (
-

{this.props.description}

+

{descriptionText}

{this.props.type} {this.props.subType}
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/js/actions/index.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/js/actions/index.js index 1649e3e31e..05da75eb70 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/js/actions/index.js +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/js/actions/index.js @@ -1,12 +1,13 @@ import axios from "axios"; import {GET_APPS} from "../constants/action-types"; +import config from "../../../public/conf/config.json"; export function getApps() { return (dispatch) => { const request = "method=post&content-type=application/json&payload={}&api-endpoint=/application-mgt-publisher/v1.0/applications"; - return axios.post('https://localhost:9443/api/application-mgt-handler/v1.0/invoke', request + return axios.post('https://'+config.serverConfig.hostname+':'+config.serverConfig.httpsPort+config.serverConfig.invokerUri, request ).then(res => { if (res.status === 200) { let apps = []; 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 e49b031118..8953e32352 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 @@ -2,6 +2,7 @@ import React from "react"; import {Typography, Row, Col, Form, Icon, Input, Button, Checkbox} from 'antd'; import styles from './Login.less'; import axios from 'axios'; +import config from "../../public/conf/config.json"; const {Title} = Typography; const {Text} = Typography; @@ -58,7 +59,7 @@ class NormalLoginForm extends React.Component { }); console.log('Received values of form: ', values); let data = "username=" + values.username + "&password=" + values.password + "&platform=publisher"; - axios.post('https://localhost:9443/api/application-mgt-handler/v1.0/login', data + axios.post('https://'+config.serverConfig.hostname+':'+config.serverConfig.httpsPort+config.serverConfig.loginUri, data ).then(res => { if (res.status === 200) { window.location = res.data.url;