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 a79fbbc55a..21457feb39 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 @@ -67,28 +67,7 @@ "text": "The final state of an application, where no transition of states will be allowed after this." } }, - "installationTypes": { - "ENTERPRISE": { - "deviceTypes": [ - "android", - "ios" - ] - }, - "PUBLIC": { - "deviceTypes": [ - "android", - "ios" - ] - }, - "WEB_CLIP": { - "deviceTypes": [ - "android", - "ios" - ] - }, - "CUSTOM": { - "deviceTypes": [ - ] - } + "deviceTypes": { + "mobileTypes": ["android", "ios"] } } diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/components/apps/list-apps/AppDetailsDrawer/AppDetailsDrawer.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/components/apps/list-apps/AppDetailsDrawer/AppDetailsDrawer.js index c6c24fea28..841e9215cb 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/components/apps/list-apps/AppDetailsDrawer/AppDetailsDrawer.js +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/components/apps/list-apps/AppDetailsDrawer/AppDetailsDrawer.js @@ -414,6 +414,7 @@ class AppDetailsDrawer extends React.Component { } }; + render() { const config = this.props.context; const {app, visible, onClose} = this.props; @@ -459,12 +460,11 @@ class AppDetailsDrawer extends React.Component {
-
{avatar} @@ -555,7 +555,6 @@ class AppDetailsDrawer extends React.Component { )} - Categories {!isCategoriesEditEnabled && ( )} - + Tags {!isTagsEditEnabled && ( { const config = this.props.context; const {formConfig} = this.props; - console.log("test"); - + const {installationType} = formConfig; axios.get( window.location.origin + config.serverConfig.invoker.uri + config.serverConfig.invoker.deviceMgt + "/device-types" ).then(res => { if (res.status === 200) { const allDeviceTypes = JSON.parse(res.data.data); - const whitelistedDeviceTypes = config.installationTypes[formConfig.installationType].deviceTypes; + const mobileDeviceTypes = config.deviceTypes.mobileTypes; const allowedDeviceTypes = []; - allDeviceTypes.forEach(deviceType=>{ - if(whitelistedDeviceTypes.includes(deviceType.name)){ - allowedDeviceTypes.push(deviceType); - } - }); + + // exclude mobile device types if installation type is custom + if(installationType==="CUSTOM"){ + allDeviceTypes.forEach(deviceType=>{ + if(!mobileDeviceTypes.includes(deviceType.name)){ + allowedDeviceTypes.push(deviceType); + } + }); + }else{ + allDeviceTypes.forEach(deviceType=>{ + if(mobileDeviceTypes.includes(deviceType.name)){ + allowedDeviceTypes.push(deviceType); + } + }); + } + this.setState({ deviceTypes: allowedDeviceTypes, loading: false,