From 137d970fc7af388b361e1ece1d0f4175a86a77c1 Mon Sep 17 00:00:00 2001 From: amalhub Date: Mon, 11 Sep 2017 15:40:30 +0530 Subject: [PATCH 01/12] App-mgt store response refactor --- .../impl/SubscriptionManagementAPIImpl.java | 18 +++++++++++------- .../common/services/SubscriptionManager.java | 8 ++++---- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.api/src/main/java/org/wso2/carbon/device/application/mgt/api/services/impl/SubscriptionManagementAPIImpl.java b/components/application-mgt/org.wso2.carbon.device.application.mgt.api/src/main/java/org/wso2/carbon/device/application/mgt/api/services/impl/SubscriptionManagementAPIImpl.java index 881da552bc..5c3797e82d 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.api/src/main/java/org/wso2/carbon/device/application/mgt/api/services/impl/SubscriptionManagementAPIImpl.java +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.api/src/main/java/org/wso2/carbon/device/application/mgt/api/services/impl/SubscriptionManagementAPIImpl.java @@ -31,6 +31,8 @@ import javax.validation.Valid; import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.core.Response; +import javax.ws.rs.core.Variant; +import java.util.HashMap; import java.util.List; /** @@ -45,23 +47,25 @@ public class SubscriptionManagementAPIImpl implements SubscriptionManagementAPI{ @Override public Response installApplication(@ApiParam(name = "installationDetails", value = "The application ID and list" + " the devices/users/roles", required = true) @Valid InstallationDetails installationDetails) { - Object response; + Object result; SubscriptionManager subscriptionManager = APIUtil.getSubscriptionManager(); try { - String applicationUUTD = installationDetails.getApplicationUUID(); + String applicationUUID = installationDetails.getApplicationUUID(); if (!installationDetails.getDeviceIdentifiers().isEmpty()) { List deviceList = installationDetails.getDeviceIdentifiers(); - response = subscriptionManager.installApplicationForDevices(applicationUUTD, deviceList); + result = subscriptionManager.installApplicationForDevices(applicationUUID, deviceList); } else if (!installationDetails.getUserNameList().isEmpty()) { List userList = installationDetails.getUserNameList(); - response = subscriptionManager.installApplicationForUsers(applicationUUTD, userList); + result = subscriptionManager.installApplicationForUsers(applicationUUID, userList); } else if (!installationDetails.getRoleNameList().isEmpty()) { List roleList = installationDetails.getRoleNameList(); - response = subscriptionManager.installApplicationForRoles(applicationUUTD, roleList); + result = subscriptionManager.installApplicationForRoles(applicationUUID, roleList); } else { - response = "Missing request data!"; - return Response.status(Response.Status.BAD_REQUEST).entity(response).build(); + result = "Missing request data!"; + return Response.status(Response.Status.BAD_REQUEST).entity(result).build(); } + HashMap response = new HashMap<>(); + response.put("failedDevices", result); return Response.status(Response.Status.OK).entity(response).build(); } catch (ApplicationManagementException e) { String msg = "Error occurred while installing the application"; diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/services/SubscriptionManager.java b/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/services/SubscriptionManager.java index 43ecf89ed8..6f207e3f4d 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/services/SubscriptionManager.java +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/services/SubscriptionManager.java @@ -31,7 +31,7 @@ public interface SubscriptionManager { * To install an application to given list of devices. * @param applicationUUID Application ID * @param deviceList Device list - * @return DeviceList which the application has been installed + * @return Failed Device List which the application was unable to install * @throws ApplicationManagementException Application Management Exception */ List installApplicationForDevices(String applicationUUID, @@ -42,7 +42,7 @@ public interface SubscriptionManager { * To install an application to given list of users. * @param applicationUUID Application ID * @param userList User list - * @return User list which the application has been installed + * @return Failed User List which the application was unable to install * @throws ApplicationManagementException Application Management Exception */ List installApplicationForUsers(String applicationUUID, @@ -53,7 +53,7 @@ public interface SubscriptionManager { * To install an application to given list of users. * @param applicationUUID Application ID * @param roleList Role list - * @return Role list which the application has been installed + * @return Failed Role List which the application was unable to install * @throws ApplicationManagementException Application Management Exception */ List installApplicationForRoles(String applicationUUID, @@ -64,7 +64,7 @@ public interface SubscriptionManager { * To uninstall an application from a given list of devices. * @param applicationUUID Application ID * @param deviceList Device list - * @return DeviceList which the application has been uninstalled + * @return Failed Device List which the application was unable to uninstall * @throws ApplicationManagementException Application Management Exception */ List uninstallApplication(String applicationUUID, From 5beb2b21d723cab1155dcd9cab80d2e9606bfb2e Mon Sep 17 00:00:00 2001 From: amalhub Date: Tue, 12 Sep 2017 16:05:12 +0530 Subject: [PATCH 02/12] Adding App-Mgt store implementations --- .../common/services/SubscriptionManager.java | 8 +- .../core/impl/SubscriptionManagerImpl.java | 99 +++++++++++++------ 2 files changed, 72 insertions(+), 35 deletions(-) diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/services/SubscriptionManager.java b/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/services/SubscriptionManager.java index 6f207e3f4d..fbfa32a2c8 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/services/SubscriptionManager.java +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/services/SubscriptionManager.java @@ -42,10 +42,10 @@ public interface SubscriptionManager { * To install an application to given list of users. * @param applicationUUID Application ID * @param userList User list - * @return Failed User List which the application was unable to install + * @return Failed Device List which the application was unable to install * @throws ApplicationManagementException Application Management Exception */ - List installApplicationForUsers(String applicationUUID, + List installApplicationForUsers(String applicationUUID, List userList) throws ApplicationManagementException; @@ -53,10 +53,10 @@ public interface SubscriptionManager { * To install an application to given list of users. * @param applicationUUID Application ID * @param roleList Role list - * @return Failed Role List which the application was unable to install + * @return Failed Device List which the application was unable to install * @throws ApplicationManagementException Application Management Exception */ - List installApplicationForRoles(String applicationUUID, + List installApplicationForRoles(String applicationUUID, List roleList) throws ApplicationManagementException; diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/impl/SubscriptionManagerImpl.java b/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/impl/SubscriptionManagerImpl.java index 07eedb1980..ed103814b2 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/impl/SubscriptionManagerImpl.java +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/impl/SubscriptionManagerImpl.java @@ -19,16 +19,21 @@ package org.wso2.carbon.device.application.mgt.core.impl; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +import org.wso2.carbon.context.PrivilegedCarbonContext; import org.wso2.carbon.device.application.mgt.common.DeviceIdentifier; import org.wso2.carbon.device.application.mgt.common.exception.ApplicationManagementException; import org.wso2.carbon.device.application.mgt.common.services.SubscriptionManager; import org.wso2.carbon.device.application.mgt.core.dao.common.DAOFactory; +import org.wso2.carbon.device.application.mgt.core.internal.DataHolder; +import org.wso2.carbon.device.mgt.common.Device; +import org.wso2.carbon.device.mgt.common.DeviceManagementException; import org.wso2.carbon.device.mgt.core.dao.DeviceManagementDAOException; import org.wso2.carbon.device.mgt.core.dao.DeviceManagementDAOFactory; import java.sql.SQLException; import java.util.ArrayList; import java.util.List; +import java.util.stream.Collectors; /** * This is the default implementation for the Subscription Manager. @@ -36,13 +41,69 @@ import java.util.List; public class SubscriptionManagerImpl implements SubscriptionManager { private static final Log log = LogFactory.getLog(SubscriptionManagerImpl.class); + final private String ANDROID = "android"; + final private String IOS = "ios"; @Override public List installApplicationForDevices(String applicationUUID, List deviceList) throws ApplicationManagementException { log.info("Install application: " + applicationUUID + " to: " + deviceList.size() + " devices."); + List failedDevices = installApplication(applicationUUID, deviceList); + return failedDevices; + } + + @Override + public List installApplicationForUsers(String applicationUUID, List userList) + throws ApplicationManagementException { + log.info("Install application: " + applicationUUID + " to: " + userList.size() + " users."); + List deviceList = new ArrayList<>(); + int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId(); + for (String user : userList) { + try { + List devicesOfUser = DeviceManagementDAOFactory.getDeviceDAO().getDevicesOfUser(user, tenantId); + for (Device device : devicesOfUser) { + deviceList.add(new DeviceIdentifier(device + .getDeviceIdentifier(), device.getType())); + } + } catch (DeviceManagementDAOException e) { + log.error("Error when extracting the device list from user[" + user + "].", e); + } + } + return installApplication(applicationUUID, deviceList); + } + + @Override + public List installApplicationForRoles(String applicationUUID, List roleList) + throws ApplicationManagementException { + log.info("Install application: " + applicationUUID + " to: " + roleList.size() + " roles."); + List deviceList = new ArrayList<>(); + for (String role : roleList) { + try { + List devicesOfRole = DataHolder.getInstance().getDeviceManagementService().getAllDevicesOfRole(role); + for (Device device : devicesOfRole) { + deviceList.add(new DeviceIdentifier(device + .getDeviceIdentifier(), device.getType())); + } + } catch (DeviceManagementException e) { + log.error("Error when extracting the device list from role[" + role + "].", e); + } + } + return installApplication(applicationUUID, deviceList); + } + + @Override + public List uninstallApplication(String applicationUUID, + List deviceList) + throws ApplicationManagementException { + return null; + } + + private List installApplication(String applicationUUID, List deviceList) + throws ApplicationManagementException { List failedDeviceList = new ArrayList<>(deviceList); + List androidDevices = new ArrayList<>(); + List iosDevices = new ArrayList<>(); for (DeviceIdentifier device : deviceList) { org.wso2.carbon.device.mgt.common.DeviceIdentifier deviceIdentifier = new org.wso2.carbon.device.mgt .common.DeviceIdentifier(device.getId(), device.getType()); @@ -52,9 +113,13 @@ public class SubscriptionManagerImpl implements SubscriptionManager { log.error("Device with ID: " + device.getId() + " not found to install the application."); } else { if (log.isDebugEnabled()) { - log.debug("Installing application to : " + device.getId()); + log.debug("Prepare application install to : " + device.getId()); + } + if (device.getType().equals(ANDROID)) { + androidDevices.add(deviceIdentifier); + } else { + iosDevices.add(deviceIdentifier); } - //Todo: generating one time download link for the application and put install operation to device. DAOFactory.getSubscriptionDAO().addDeviceApplicationMapping(device.getId(), applicationUUID, false); failedDeviceList.remove(device); } @@ -64,35 +129,7 @@ public class SubscriptionManagerImpl implements SubscriptionManager { DeviceManagementDAOFactory.closeConnection(); } } + //Todo: generating one time download link for the application and put install operation to devices. return failedDeviceList; } - - @Override - public List installApplicationForUsers(String applicationUUID, List userList) - throws ApplicationManagementException { - log.info("Install application: " + applicationUUID + " to: " + userList.size() + " users."); - for (String user : userList) { - //Todo: implementation - //Todo: get the device list and call installApplicationForDevices - } - return userList; - } - - @Override - public List installApplicationForRoles(String applicationUUID, List roleList) - throws ApplicationManagementException { - log.info("Install application: " + applicationUUID + " to: " + roleList.size() + " users."); - for (String role : roleList) { - //Todo: implementation - //Todo: get the device list and call installApplicationForDevices - } - return roleList; - } - - @Override - public List uninstallApplication(String applicationUUID, - List deviceList) - throws ApplicationManagementException { - return null; - } } From 8186f6754eae3bc2f35e2e2ba8ec199945d3edc9 Mon Sep 17 00:00:00 2001 From: amalhub Date: Tue, 12 Sep 2017 16:08:25 +0530 Subject: [PATCH 03/12] App-mgt store code refactors --- .../mgt/api/services/impl/SubscriptionManagementAPIImpl.java | 1 - .../application/mgt/core/impl/SubscriptionManagerImpl.java | 1 - 2 files changed, 2 deletions(-) diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.api/src/main/java/org/wso2/carbon/device/application/mgt/api/services/impl/SubscriptionManagementAPIImpl.java b/components/application-mgt/org.wso2.carbon.device.application.mgt.api/src/main/java/org/wso2/carbon/device/application/mgt/api/services/impl/SubscriptionManagementAPIImpl.java index 5c3797e82d..09b46f0444 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.api/src/main/java/org/wso2/carbon/device/application/mgt/api/services/impl/SubscriptionManagementAPIImpl.java +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.api/src/main/java/org/wso2/carbon/device/application/mgt/api/services/impl/SubscriptionManagementAPIImpl.java @@ -31,7 +31,6 @@ import javax.validation.Valid; import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.core.Response; -import javax.ws.rs.core.Variant; import java.util.HashMap; import java.util.List; diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/impl/SubscriptionManagerImpl.java b/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/impl/SubscriptionManagerImpl.java index ed103814b2..ebd0b65b61 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/impl/SubscriptionManagerImpl.java +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/impl/SubscriptionManagerImpl.java @@ -33,7 +33,6 @@ import org.wso2.carbon.device.mgt.core.dao.DeviceManagementDAOFactory; import java.sql.SQLException; import java.util.ArrayList; import java.util.List; -import java.util.stream.Collectors; /** * This is the default implementation for the Subscription Manager. From 9c490d1989fe63a9091778534f45a1670b45e803 Mon Sep 17 00:00:00 2001 From: megala21 Date: Tue, 12 Sep 2017 16:55:15 +0530 Subject: [PATCH 04/12] Adding the flexibility to change the css files --- .../src/main/resources/publisher/src/App.jsx | 13 +- .../Application/ApplicationCreate.jsx | 24 +++- .../Application/ApplicationListing.jsx | 22 +++- .../Application/CreateSteps/Step1.jsx | 19 ++- .../Application/CreateSteps/Step2.jsx | 83 ++++++------ .../Application/CreateSteps/Step3.jsx | 28 ++-- .../src/components/Base/BaseLayout.jsx | 25 ++-- .../components/Platform/PlatformCreate.jsx | 42 +++--- .../components/Platform/PlatformListing.jsx | 23 +++- .../src/components/UIComponents/DataTable.jsx | 18 ++- .../UIComponents/DataTableHeader.jsx | 28 ++-- .../components/UIComponents/DataTableRow.jsx | 16 ++- .../main/resources/publisher/src/config.json | 9 +- .../publisher/src/themes/custom-theme.js | 12 -- .../src/themes/custom-theme/theme.js | 39 ++++++ .../default/application-create-step1.css | 25 ++++ .../default/application-create-step2.css | 120 ++++++++++++++++++ .../default/application-create-step3.css | 29 +++++ .../src/themes/default/application-create.css | 36 ++++++ .../themes/default/application-listing.css | 38 ++++++ .../src/themes/default/basic-layout.css | 26 ++++ .../src/themes/default/data-table.css | 44 +++++++ .../src/themes/default/platform-create.css | 68 ++++++++++ .../src/themes/default/platform-listing.css | 39 ++++++ .../resources/publisher/src/themes/theme.js | 35 +++++ 25 files changed, 721 insertions(+), 140 deletions(-) delete mode 100644 components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/custom-theme.js create mode 100644 components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/custom-theme/theme.js create mode 100644 components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/default/application-create-step1.css create mode 100644 components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/default/application-create-step2.css create mode 100644 components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/default/application-create-step3.css create mode 100644 components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/default/application-create.css create mode 100644 components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/default/application-listing.css create mode 100644 components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/default/basic-layout.css create mode 100644 components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/default/data-table.css create mode 100644 components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/default/platform-create.css create mode 100644 components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/default/platform-listing.css create mode 100644 components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/theme.js diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/App.jsx b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/App.jsx index 58002cfb62..8859f1897f 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/App.jsx +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/App.jsx @@ -31,18 +31,21 @@ import { PlatformCreate, PlatformListing } from './components'; +import Theme from './themes/theme'; + + const history = createHistory({basename: '/publisher'}); /** - * User can define the themes in the config.json. The themes will be loaded based on the user preference. + *Loading the theme files based on the the user-preference. */ -const theme = require("./config.json").theme; let muiTheme = null; -if (theme.current === "default") { - let defaultTheme = require("material-ui/styles/baseThemes/" + theme.default); +let selected = Theme.selectedTheme; +if (Theme.currentTheme === "default") { + let defaultTheme = require("material-ui/styles/baseThemes/" + selected); muiTheme = getMuiTheme(defaultTheme.default); } else { - let customTheme = require("./themes/" + theme.custom); + let customTheme = require("./themes/" + selected + "/theme.js"); muiTheme = getMuiTheme(customTheme.default); } diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/ApplicationCreate.jsx b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/ApplicationCreate.jsx index 86ad0961ff..afb03ffbaa 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/ApplicationCreate.jsx +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/ApplicationCreate.jsx @@ -24,7 +24,7 @@ import {Step1, Step2, Step3} from './CreateSteps'; import RaisedButton from 'material-ui/RaisedButton'; import {Card, CardActions, CardTitle} from 'material-ui/Card'; import {Step, StepLabel, Stepper,} from 'material-ui/Stepper'; - +import Theme from '../../themes/theme'; /** * The App Create Component. @@ -51,6 +51,20 @@ class ApplicationCreate extends Component { }; } + componentWillMount() { + let selected = Theme.selectedTheme; + if (Theme.currentTheme === "default") { + require("../../themes/default/application-create.css"); + } else { + try { + require("../../themes/" + selected + "/application-create.css"); + } catch (ex){ + // If the particular customized file does not exist, use the default one. + require("../../themes/default/application-create.css"); + } + } + } + /** * Handles next button click event. * */ @@ -179,15 +193,15 @@ class ApplicationCreate extends Component { return ( -
- +
+ {/** * The stepper goes here. */} -
+
Select Application Platform @@ -199,7 +213,7 @@ class ApplicationCreate extends Component { Release -
+
{finished ? (

Create App?

diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/ApplicationListing.jsx b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/ApplicationListing.jsx index d0df14fb18..2b33e409f2 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/ApplicationListing.jsx +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/ApplicationListing.jsx @@ -21,6 +21,7 @@ import {withRouter} from 'react-router-dom'; import TextField from 'material-ui/TextField'; import DataTable from '../UIComponents/DataTable'; import {Card, CardActions, CardTitle} from 'material-ui/Card'; +import Theme from '../../themes/theme'; /** * The App Create Component. @@ -112,6 +113,18 @@ class ApplicationListing extends Component { componentWillMount() { //Fetch all the applications from backend and create application objects. this.setState({data: this.data}); + + let selected = Theme.selectedTheme; + if (Theme.currentTheme === "default") { + require("../../themes/default/application-listing.css"); + } else { + try { + require("../../themes/" + selected + "/application-listing.css"); + } catch (ex) { + // If the particular customized file does not exist, use the default one. + require("../../themes/default/application-listing.css"); + } + } } /** @@ -156,12 +169,11 @@ class ApplicationListing extends Component { render() { return ( -
- - + + - + diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/CreateSteps/Step1.jsx b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/CreateSteps/Step1.jsx index 971821d063..63ee4eb6b1 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/CreateSteps/Step1.jsx +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/CreateSteps/Step1.jsx @@ -22,6 +22,9 @@ import MenuItem from 'material-ui/MenuItem'; import TextField from 'material-ui/TextField'; import SelectField from 'material-ui/SelectField'; import RaisedButton from 'material-ui/RaisedButton'; +import Theme from '../../../themes/theme'; + + /** * The first step of the application creation wizard. @@ -51,6 +54,17 @@ class Step1 extends Component { } componentWillMount() { + let selected = Theme.selectedTheme; + if (Theme.currentTheme === "default") { + require("../../../themes/default/application-create-step1.css"); + } else { + try { + require("../../../themes/" + selected + "/application-create-step1.css"); + } catch (ex){ + // If the particular customized file does not exist, use the default one. + require("../../../themes/default/application-create-step1.css"); + } + } //Get the list of available platforms and set to the state. } @@ -105,10 +119,9 @@ class Step1 extends Component { }; render() { - const contentStyle = {margin: '0 16px'}; return (
-
+

-
+
this._handleRequestDelete(data.key)} - style={this.styles.chip} - > + className="applicationCreateChip"> {data.value} ); @@ -299,9 +302,8 @@ class Step2 extends Component { render() { console.log(this.state.visibilityComponent); - const contentStyle = {margin: '0 16px'}; return ( -
+

-
+
{this.state.tags.map(this._renderChip, this)}

@@ -365,18 +367,14 @@ class Step2 extends Component {
{/*Platform Specific Properties.*/} -
-

Platform Specific Properties

+
+

Platform Specific Properties


-

{this.state.errors["Banner"]}

-

Banner*:

- +

{this.state.errors["Banner"]}

+

Banner*:

+ {this.state.banner.map((tile) => ( ))} {this.state.banner.length === 0 ? - { this.setState({banner, rejected}); }}> -

+

+

+

:
} @@ -400,13 +397,9 @@ class Step2 extends Component {

-

{this.state.errors["Screenshots"]}

-

Screenshots*:

- +

{this.state.errors["Screenshots"]}

+

Screenshots*:

+ {this.state.screenshots.map((file) => ( ))} {this.state.screenshots.length < 3 ? - { let tmpScreenshots = this.state.screenshots; @@ -425,19 +418,15 @@ class Step2 extends Component { this.setState({ screenshots: tmpScreenshots}); }}> -

+

+

+

:
}

-

{this.state.errors["Icon"]}

-

Icon*:

- +

{this.state.errors["Icon"]}

+

Icon*:

+ {this.state.icon.map((tile) => ( ))} {this.state.icon.length === 0 ? - {this.setState({icon, rejected});}}> -

+

+

+

:
}
@@ -460,12 +449,12 @@ class Step2 extends Component {

-
+
+

} -
- +
+
-
+
{this.props.children}
); diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Platform/PlatformCreate.jsx b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Platform/PlatformCreate.jsx index c6604187a8..fc6663f7f4 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Platform/PlatformCreate.jsx +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Platform/PlatformCreate.jsx @@ -31,6 +31,7 @@ import {GridList, GridTile} from 'material-ui/GridList'; import Close from 'material-ui/svg-icons/navigation/close'; import {Card, CardActions, CardTitle} from 'material-ui/Card'; import AddCircleOutline from 'material-ui/svg-icons/content/add-circle-outline'; +import Theme from '../../themes/theme'; /** * Platform Create component. @@ -64,6 +65,20 @@ class PlatformCreate extends Component { } } + componentWillMount() { + let selected = Theme.selectedTheme; + if (Theme.currentTheme === "default") { + require("../../themes/default/platform-create.css"); + } else { + try { + require("../../themes/" + selected + "/platform-create.css"); + } catch (ex) { + // If the particular customized file does not exist, use the default one. + require("../../themes/default/platform-create.css"); + } + } + } + /** * Handles toggle button actions. * One method is used for all the toggle buttons and, each toggle is identified by the id. @@ -184,12 +199,12 @@ class PlatformCreate extends Component { property} = this.state; return ( -
+
-
+

-

Platform Properties

+

Platform Properties

{platformProperties.map((p) => { return
{p.key} : {p.value} - +
})}
-
+
- {/*

{this.state.errors["Icon"]}

*/} -

Platform Icon*:

- +

Platform Icon*:

+ {this.state.icon.map((tile) => ( ))} {this.state.icon.length === 0 ? - {this.setState({icon, rejected})}}> -

+

+

+

:
}
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Platform/PlatformListing.jsx b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Platform/PlatformListing.jsx index 6a749d205e..6904d2fc86 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Platform/PlatformListing.jsx +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Platform/PlatformListing.jsx @@ -21,6 +21,7 @@ import {withRouter} from 'react-router-dom'; import TextField from 'material-ui/TextField'; import DataTable from '../UIComponents/DataTable'; import {Card, CardActions, CardTitle} from 'material-ui/Card'; +import Theme from '../../themes/theme'; /** * The App Create Component. @@ -40,6 +41,17 @@ class PlatformListing extends Component { } componentWillMount() { + let selected = Theme.selectedTheme; + if (Theme.currentTheme === "default") { + require("../../themes/default/platform-listing.css"); + } else { + try { + require("../../themes/" + selected + "/platform-listing.css"); + } catch (ex) { + // If the particular customized file does not exist, use the default one. + require("../../themes/default/platform-listing.css"); + } + } //Fetch all the applications from backend and create application objects. } @@ -75,12 +87,11 @@ class PlatformListing extends Component { render() { return ( -
- - - +
+ + + diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/UIComponents/DataTable.jsx b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/UIComponents/DataTable.jsx index e82528da08..badc608bcb 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/UIComponents/DataTable.jsx +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/UIComponents/DataTable.jsx @@ -22,6 +22,7 @@ import DataTableRow from './DataTableRow'; import DataTableHeader from './DataTableHeader'; import RaisedButton from 'material-ui/RaisedButton'; import {Table, TableBody, TableHeader, TableRow} from 'material-ui/Table'; +import Theme from '../../themes/theme'; /** * The Custom Table Component. @@ -60,7 +61,18 @@ class DataTable extends Component { }; componentWillMount() { - this.setState({data: this.props.data, headers: this.props.headers}) + this.setState({data: this.props.data, headers: this.props.headers}); + let selected = Theme.selectedTheme; + if (Theme.currentTheme === "default") { + require("../../themes/default/data-table.css"); + } else { + try { + require("../../themes/" + selected + "/data-table.css"); + } catch (ex) { + // If the particular customized file does not exist, use the default one. + require("../../themes/default/data-table.css"); + } + } } shouldComponentUpdate(nextProps, nextState) { @@ -95,8 +107,8 @@ class DataTable extends Component { adjustForCheckbox={ false }> {headers.map((header) => { - return () + return () } )} diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/UIComponents/DataTableHeader.jsx b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/UIComponents/DataTableHeader.jsx index 2f6285a8dd..fda698d911 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/UIComponents/DataTableHeader.jsx +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/UIComponents/DataTableHeader.jsx @@ -20,6 +20,7 @@ import PropTypes from 'prop-types'; import React, {Component} from 'react'; import FlatButton from 'material-ui/FlatButton'; import {TableHeaderColumn} from 'material-ui/Table'; +import Theme from '../../themes/theme'; /** * Data Table header component. @@ -31,6 +32,20 @@ class DataTableHeader extends Component { super(); } + componentWillMount() { + let selected = Theme.selectedTheme; + if (Theme.currentTheme === "default") { + require("../../themes/default/data-table.css"); + } else { + try { + require("../../themes/" + selected + "/data-table.css"); + } catch (ex) { + // If the particular customized file does not exist, use the default one. + require("../../themes/default/data-table.css"); + } + } + } + /** * The onClick function of the table header. * Invokes the function passed in the header object. @@ -48,20 +63,13 @@ class DataTableHeader extends Component { * */ if (this.props.header.sortable) { headerCell = ; + onClick={this._tableHeaderClick.bind(this)} className="sortableHeaderCell"/>; } else { - headerCell = {this.props.header.label}; + headerCell = {this.props.header.label}; } return ( - + {headerCell} ); diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/UIComponents/DataTableRow.jsx b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/UIComponents/DataTableRow.jsx index 6a2a0d1e80..8162b900a9 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/UIComponents/DataTableRow.jsx +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/UIComponents/DataTableRow.jsx @@ -19,6 +19,7 @@ import PropTypes from 'prop-types'; import React, {Component} from 'react'; import {TableRow, TableRowColumn} from 'material-ui/Table'; +import Theme from '../../themes/theme'; /** * Data table row component. @@ -34,7 +35,18 @@ class DataTableRow extends Component { } componentWillMount() { - this.setState({dataItem: this.props.dataItem}) + this.setState({dataItem: this.props.dataItem}); + let selected = Theme.selectedTheme; + if (Theme.currentTheme === "default") { + require("../../themes/default/data-table.css"); + } else { + try { + require("../../themes/" + selected + "/data-table.css"); + } catch (ex) { + // If the particular customized file does not exist, use the default one. + require("../../themes/default/data-table.css"); + } + } } /** @@ -50,7 +62,7 @@ class DataTableRow extends Component { {Object.keys(dataItem).map((key) => { if (key !== 'id') { - return {dataItem[key]} } else { return diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/config.json b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/config.json index cb7ead56b1..6cbee10974 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/config.json +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/config.json @@ -1,7 +1,6 @@ { - "theme" : { - "current" : "default", - "default" : "lightBaseTheme", - "custom" : "custom-theme" + "theme": { + "type": "default", + "value": "lightBaseTheme" } -} +} \ No newline at end of file diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/custom-theme.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/custom-theme.js deleted file mode 100644 index 8342d4da36..0000000000 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/custom-theme.js +++ /dev/null @@ -1,12 +0,0 @@ -import { - indigo500, indigo700, redA200, -} from 'material-ui/styles/colors'; - -export default { - palette: { - primary1Color: indigo500, - primary2Color: indigo700, - accent1Color: redA200, - pickerHeaderColor: indigo500, - }, -}; diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/custom-theme/theme.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/custom-theme/theme.js new file mode 100644 index 0000000000..f8cfdff1bf --- /dev/null +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/custom-theme/theme.js @@ -0,0 +1,39 @@ +/* + * 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. + */ + +/** + * This a sample custom theme file. In config.json, if the following changes are done, this theme will be applied. + * { + * "theme" : { + * "type" : "custom", + * "value" : "custom-theme" + * } + * } + */ +import { + indigo500, indigo700, redA200, +} from 'material-ui/styles/colors'; + +export default { + palette: { + primary1Color: indigo500, + primary2Color: indigo700, + accent1Color: redA200, + pickerHeaderColor: indigo500, + }, +}; diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/default/application-create-step1.css b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/default/application-create-step1.css new file mode 100644 index 0000000000..166de9e388 --- /dev/null +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/default/application-create-step1.css @@ -0,0 +1,25 @@ +/* + * 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. + */ + +.creatediv { + margin: 0 16px; +} + +.nextButton { + margin-top: 12px; +} \ No newline at end of file diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/default/application-create-step2.css b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/default/application-create-step2.css new file mode 100644 index 0000000000..00da1e2e10 --- /dev/null +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/default/application-create-step2.css @@ -0,0 +1,120 @@ +/* + * 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. + */ + +.applicationCreateChip { + margin: 4px; +} + +.createStep2Content { + margin: 0 16px; +} + + +.applicationCreateWrapper { + display: flex; + flex-wrap: wrap; +} + + +.platformSpecificPropertyDiv { + border: solid #BDBDBD 1px; +} + +.platformSpecificPropertyP { + color: #BDBDBD; +} + +.applicationCreateBannerError { + color: #f44336; +} + +.applicationCreateBannerTitle { + color: #BDBDBD; +} + +.applicationCreateGrid { + display: flex; + flex-wrap: nowrap; + overflow-x: auto; +} + +.applicationCreateBannerDropZone { + width: 300px; + height: 150px; + border: dashed #BDBDBD 1px +} + +.applicationCreateBannerp { + margin: 70px 40px 40px 150px; +} + +.applicationCreateScreenshotError { + color: #f44336; +} + +.applicationCreateScreenshotTitle { + color: #BDBDBD; +} + +.applicationCreateScreenshotGrid { + display: flex; + flex-wrap: nowrap; + overflow-x: auto; +} + +.applicationCreateScreenshotDropZone { + width: 150px; + height: 150px; + border: dashed #BDBDBD 1px; +} + +.applicationCreateScreenshotp { + margin: 70px 40px 70px 70px; +} + +.applcationCreateIconError { + color: #f44336; +} + +.applicationCreateIconTitle { + color: #BDBDBD; +} + +.applicationCreateIconGrid { + display: flex; + flex-wrap: nowrap; + overflow-x: auto; +} + +.applicationCreateIconDropZone { + width: 150px; + height: 150px; + border: dashed #BDBDBD 1px; +} + +.applicationCreateIconp { + margin: 70px 40px 70px 70px; +} + +.applicationCreateBackAndNext { + margin-top: 12px; +} + +.applicationCreateBack { + margin-right: 12px; +} diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/default/application-create-step3.css b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/default/application-create-step3.css new file mode 100644 index 0000000000..84c798ea42 --- /dev/null +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/default/application-create-step3.css @@ -0,0 +1,29 @@ +/* + * 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. + */ + +.applicationCreateStepMiddle { + margin: 0 16px; +} + +.applicationCreateBackAndFinish { + margin-top: 12px; +} + +.applicationCreateFinish { + margin-right: 12px; +} \ No newline at end of file diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/default/application-create.css b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/default/application-create.css new file mode 100644 index 0000000000..27b2a51cae --- /dev/null +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/default/application-create.css @@ -0,0 +1,36 @@ +/* + * 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. + */ + +.createapplicationmiddle { + width: 95%; + height: 100%; + margin-top: 1%; +} + +.creataapplicationcard { + max-height: 700px; + overflow: auto; +} +.createapplicationcardaction { + width: 100%; + margin: auto; +} + +.createapplicationcontent { + margin: 0 16px; +} \ No newline at end of file diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/default/application-listing.css b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/default/application-listing.css new file mode 100644 index 0000000000..ebf44d33bd --- /dev/null +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/default/application-listing.css @@ -0,0 +1,38 @@ +/* + * 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. + */ + +.applicationListingMiddle { + width: 95%; + height: 100%; + margin-top: 1%; +} + +.applicationListingCard { + display: flex; + flex-wrap: wrap; +} + +.applicationListingSearch { + float:right; + padding-right: 2px; +} + +.applicationListTitle { + display: flex; + flex-wrap: wrap; +} \ No newline at end of file diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/default/basic-layout.css b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/default/basic-layout.css new file mode 100644 index 0000000000..360a0eb8db --- /dev/null +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/default/basic-layout.css @@ -0,0 +1,26 @@ +/* + * 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. + */ + +.basicLayoutDiv { + height: calc(100% - 64px); + margin-left: 16%; + width: calc(100% - 15%); + top: 64px; + left: -100px; +} + diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/default/data-table.css b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/default/data-table.css new file mode 100644 index 0000000000..787c221d6a --- /dev/null +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/default/data-table.css @@ -0,0 +1,44 @@ +/* + * 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. + */ + +.tableRow { + display: flex; +} + +.datatableRowColumn { + align-items: center; +} + +.sortableHeaderCell { + color: #bdbdbd; +} + +.notsortableHeaderCell { + position: relative; + padding-left: 16px; + padding-right: 16px; + text-transform: uppercase; + font-weight: normal; + color: #bdbdbd; + font-size: 14px; +} + +.datatableHeaderColumn { + padding-left: 0; +} + diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/default/platform-create.css b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/default/platform-create.css new file mode 100644 index 0000000000..234e0937b2 --- /dev/null +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/default/platform-create.css @@ -0,0 +1,68 @@ +/* + * 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. + */ + +.createplatformmiddle { + width: 95%; + height: 100%; + margin-top: 1% +} + +.createplatformcardaction { + width: 100%; + margin: auto; + padding-left: 10px; +} + +.createplatformproperties { + color: #BaBaBa; +} + +.createplatformpropertyclose { + height: 10px; + width: 10px; +} + + +.createplatformproperty { + display: flex; +} + +.createplatformpropertyselect { + flex: 1 1 23% 1; + margin: 0 1% +} + +.createplatformicon { + display: flex; + flex-wrap: nowrap; + overflow-x: auto; +} + +.createplatformiconp { + color: #BDBDBD; +} + +.createplatformdropzone { + width: 150px; + height: 150px; + border: dashed #BDBDBD 1px; +} + +.createplatformdropzonep { + margin: 70px 40px 70px 70px +} \ No newline at end of file diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/default/platform-listing.css b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/default/platform-listing.css new file mode 100644 index 0000000000..b92a31736f --- /dev/null +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/default/platform-listing.css @@ -0,0 +1,39 @@ +/* + * 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. + */ + + +.listingplatformmiddle { + width: 95%; + height: 100%; + margin-top: 1%; +} + +.listingplatformcard { + display: flex; + flex-wrap: wrap; +} + +.listingplatformsearch { + float:right; + padding-right: 2px; +} + +.listingplatformTitle { + display: flex; + flex-wrap: wrap; +} \ No newline at end of file diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/theme.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/theme.js new file mode 100644 index 0000000000..11f0d46f89 --- /dev/null +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/theme.js @@ -0,0 +1,35 @@ +/* + * 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. + */ + +/** + * This class will read through the configuration file and saves the theme names for the usage in other files. + * User can define the themes in the config.json. The themes will be loaded based on the user preference. + */ +class Theme { + constructor() { + const theme = require("../config.json").theme; + this.currentTheme = theme.type; + if (this.currentTheme === "default") { + this.selectedTheme = theme.value; + } else { + this.selectedTheme = theme.value; + } + } +} + +export default (new Theme); \ No newline at end of file From 5614914efa3af0a8a1e026c0b6aa8d42cddbe781 Mon Sep 17 00:00:00 2001 From: megala21 Date: Tue, 12 Sep 2017 17:01:47 +0530 Subject: [PATCH 05/12] Refactoring the files --- .../src/main/resources/publisher/src/config.json | 2 +- .../publisher/src/themes/default/application-create-step1.css | 2 +- .../publisher/src/themes/default/application-create-step3.css | 2 +- .../publisher/src/themes/default/application-create.css | 2 +- .../publisher/src/themes/default/application-listing.css | 2 +- .../resources/publisher/src/themes/default/basic-layout.css | 1 - .../main/resources/publisher/src/themes/default/data-table.css | 1 - .../resources/publisher/src/themes/default/platform-create.css | 2 +- .../resources/publisher/src/themes/default/platform-listing.css | 2 +- .../src/main/resources/publisher/src/themes/theme.js | 2 +- 10 files changed, 8 insertions(+), 10 deletions(-) diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/config.json b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/config.json index 6cbee10974..3be10b8ce9 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/config.json +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/config.json @@ -3,4 +3,4 @@ "type": "default", "value": "lightBaseTheme" } -} \ No newline at end of file +} diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/default/application-create-step1.css b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/default/application-create-step1.css index 166de9e388..0fbc5e2be8 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/default/application-create-step1.css +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/default/application-create-step1.css @@ -22,4 +22,4 @@ .nextButton { margin-top: 12px; -} \ No newline at end of file +} diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/default/application-create-step3.css b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/default/application-create-step3.css index 84c798ea42..beca46d5dc 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/default/application-create-step3.css +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/default/application-create-step3.css @@ -26,4 +26,4 @@ .applicationCreateFinish { margin-right: 12px; -} \ No newline at end of file +} diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/default/application-create.css b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/default/application-create.css index 27b2a51cae..2fc0e368e9 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/default/application-create.css +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/default/application-create.css @@ -33,4 +33,4 @@ .createapplicationcontent { margin: 0 16px; -} \ No newline at end of file +} diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/default/application-listing.css b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/default/application-listing.css index ebf44d33bd..ff6b17bc79 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/default/application-listing.css +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/default/application-listing.css @@ -35,4 +35,4 @@ .applicationListTitle { display: flex; flex-wrap: wrap; -} \ No newline at end of file +} diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/default/basic-layout.css b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/default/basic-layout.css index 360a0eb8db..ccc768c3ca 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/default/basic-layout.css +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/default/basic-layout.css @@ -23,4 +23,3 @@ top: 64px; left: -100px; } - diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/default/data-table.css b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/default/data-table.css index 787c221d6a..849d232eb2 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/default/data-table.css +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/default/data-table.css @@ -41,4 +41,3 @@ .datatableHeaderColumn { padding-left: 0; } - diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/default/platform-create.css b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/default/platform-create.css index 234e0937b2..483cdedbff 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/default/platform-create.css +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/default/platform-create.css @@ -65,4 +65,4 @@ .createplatformdropzonep { margin: 70px 40px 70px 70px -} \ No newline at end of file +} diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/default/platform-listing.css b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/default/platform-listing.css index b92a31736f..d9d9d594c3 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/default/platform-listing.css +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/default/platform-listing.css @@ -36,4 +36,4 @@ .listingplatformTitle { display: flex; flex-wrap: wrap; -} \ No newline at end of file +} diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/theme.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/theme.js index 11f0d46f89..5c8ed89cb6 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/theme.js +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/theme.js @@ -32,4 +32,4 @@ class Theme { } } -export default (new Theme); \ No newline at end of file +export default (new Theme); From 81f427f34f924c8a2eed0362abd16ac8c32dd0c3 Mon Sep 17 00:00:00 2001 From: amalhub Date: Tue, 12 Sep 2017 17:05:37 +0530 Subject: [PATCH 06/12] App-mgt store removing device type specific impl --- .../mgt/core/impl/SubscriptionManagerImpl.java | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/impl/SubscriptionManagerImpl.java b/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/impl/SubscriptionManagerImpl.java index ebd0b65b61..31c4817bf4 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/impl/SubscriptionManagerImpl.java +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/impl/SubscriptionManagerImpl.java @@ -40,8 +40,6 @@ import java.util.List; public class SubscriptionManagerImpl implements SubscriptionManager { private static final Log log = LogFactory.getLog(SubscriptionManagerImpl.class); - final private String ANDROID = "android"; - final private String IOS = "ios"; @Override public List installApplicationForDevices(String applicationUUID, @@ -101,8 +99,7 @@ public class SubscriptionManagerImpl implements SubscriptionManager { private List installApplication(String applicationUUID, List deviceList) throws ApplicationManagementException { List failedDeviceList = new ArrayList<>(deviceList); - List androidDevices = new ArrayList<>(); - List iosDevices = new ArrayList<>(); + List activeDeviceList = new ArrayList<>(); for (DeviceIdentifier device : deviceList) { org.wso2.carbon.device.mgt.common.DeviceIdentifier deviceIdentifier = new org.wso2.carbon.device.mgt .common.DeviceIdentifier(device.getId(), device.getType()); @@ -114,11 +111,7 @@ public class SubscriptionManagerImpl implements SubscriptionManager { if (log.isDebugEnabled()) { log.debug("Prepare application install to : " + device.getId()); } - if (device.getType().equals(ANDROID)) { - androidDevices.add(deviceIdentifier); - } else { - iosDevices.add(deviceIdentifier); - } + activeDeviceList.add(deviceIdentifier); DAOFactory.getSubscriptionDAO().addDeviceApplicationMapping(device.getId(), applicationUUID, false); failedDeviceList.remove(device); } From 8f3d11fa0eb1553ad84739c1c4aecf2fcb47e269 Mon Sep 17 00:00:00 2001 From: megala21 Date: Tue, 12 Sep 2017 22:37:45 +0530 Subject: [PATCH 07/12] refactoring theming support --- .../src/main/resources/publisher/src/App.jsx | 6 ++--- .../Application/ApplicationCreate.jsx | 22 ++++++++--------- .../Application/ApplicationListing.jsx | 22 ++++++++--------- .../Application/CreateSteps/Step1.jsx | 24 +++++++++---------- .../Application/CreateSteps/Step2.jsx | 22 ++++++++--------- .../Application/CreateSteps/Step3.jsx | 22 ++++++++--------- .../src/components/Base/BaseLayout.jsx | 22 ++++++++--------- .../components/Platform/PlatformCreate.jsx | 22 ++++++++--------- .../components/Platform/PlatformListing.jsx | 22 ++++++++--------- .../src/components/UIComponents/DataTable.jsx | 23 +++++++++--------- .../UIComponents/DataTableHeader.jsx | 22 ++++++++--------- .../components/UIComponents/DataTableRow.jsx | 23 +++++++++--------- .../publisher/src/{themes => }/theme.js | 12 ++++++---- 13 files changed, 133 insertions(+), 131 deletions(-) rename components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/{themes => }/theme.js (75%) diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/App.jsx b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/App.jsx index 8859f1897f..cf10a66754 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/App.jsx +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/App.jsx @@ -31,7 +31,7 @@ import { PlatformCreate, PlatformListing } from './components'; -import Theme from './themes/theme'; +import Theme from './theme'; const history = createHistory({basename: '/publisher'}); @@ -40,8 +40,8 @@ const history = createHistory({basename: '/publisher'}); *Loading the theme files based on the the user-preference. */ let muiTheme = null; -let selected = Theme.selectedTheme; -if (Theme.currentTheme === "default") { +let selected = Theme.currentTheme; +if (Theme.currentThemeType === "default") { let defaultTheme = require("material-ui/styles/baseThemes/" + selected); muiTheme = getMuiTheme(defaultTheme.default); } else { diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/ApplicationCreate.jsx b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/ApplicationCreate.jsx index afb03ffbaa..d4c6accb23 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/ApplicationCreate.jsx +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/ApplicationCreate.jsx @@ -24,7 +24,6 @@ import {Step1, Step2, Step3} from './CreateSteps'; import RaisedButton from 'material-ui/RaisedButton'; import {Card, CardActions, CardTitle} from 'material-ui/Card'; import {Step, StepLabel, Stepper,} from 'material-ui/Stepper'; -import Theme from '../../themes/theme'; /** * The App Create Component. @@ -52,16 +51,17 @@ class ApplicationCreate extends Component { } componentWillMount() { - let selected = Theme.selectedTheme; - if (Theme.currentTheme === "default") { - require("../../themes/default/application-create.css"); - } else { - try { - require("../../themes/" + selected + "/application-create.css"); - } catch (ex){ - // If the particular customized file does not exist, use the default one. - require("../../themes/default/application-create.css"); - } + //Using the particular style specific to user selected theme. + const theme = require("../../theme").default; + const selected = + (theme.currentThemeType === theme.defaultThemeType) ? theme.defaultThemeType : theme.currentTheme; + const applicationCreateCss = "application-create.css"; + + try { + require("../../" + theme.themeFolder + "/" + selected + "/" + applicationCreateCss); + } catch (ex){ + // If the particular customized file does not exist, use the default one. + require("../../" + theme.themeFolder + "/" + theme.defaultThemeType + "/" + applicationCreateCss); } } diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/ApplicationListing.jsx b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/ApplicationListing.jsx index 2b33e409f2..bd80a3231e 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/ApplicationListing.jsx +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/ApplicationListing.jsx @@ -21,7 +21,6 @@ import {withRouter} from 'react-router-dom'; import TextField from 'material-ui/TextField'; import DataTable from '../UIComponents/DataTable'; import {Card, CardActions, CardTitle} from 'material-ui/Card'; -import Theme from '../../themes/theme'; /** * The App Create Component. @@ -114,16 +113,17 @@ class ApplicationListing extends Component { //Fetch all the applications from backend and create application objects. this.setState({data: this.data}); - let selected = Theme.selectedTheme; - if (Theme.currentTheme === "default") { - require("../../themes/default/application-listing.css"); - } else { - try { - require("../../themes/" + selected + "/application-listing.css"); - } catch (ex) { - // If the particular customized file does not exist, use the default one. - require("../../themes/default/application-listing.css"); - } + //Using the particular style specific to user selected theme. + const theme = require("../../theme").default; + const selected = + (theme.currentThemeType === theme.defaultThemeType) ? theme.defaultThemeType : theme.currentTheme; + const applicationListingCss = "application-listing.css"; + + try { + require("../../" + theme.themeFolder + "/" + selected + "/" + applicationListingCss); + } catch (ex){ + // If the particular customized file does not exist, use the default one. + require("../../" + theme.themeFolder + "/" + theme.defaultThemeType + "/" + applicationListingCss); } } diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/CreateSteps/Step1.jsx b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/CreateSteps/Step1.jsx index 63ee4eb6b1..44ca7752e7 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/CreateSteps/Step1.jsx +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/CreateSteps/Step1.jsx @@ -22,9 +22,6 @@ import MenuItem from 'material-ui/MenuItem'; import TextField from 'material-ui/TextField'; import SelectField from 'material-ui/SelectField'; import RaisedButton from 'material-ui/RaisedButton'; -import Theme from '../../../themes/theme'; - - /** * The first step of the application creation wizard. @@ -54,16 +51,17 @@ class Step1 extends Component { } componentWillMount() { - let selected = Theme.selectedTheme; - if (Theme.currentTheme === "default") { - require("../../../themes/default/application-create-step1.css"); - } else { - try { - require("../../../themes/" + selected + "/application-create-step1.css"); - } catch (ex){ - // If the particular customized file does not exist, use the default one. - require("../../../themes/default/application-create-step1.css"); - } + //Using the particular style specific to user selected theme. + const theme = require("../../../theme").default; + const selected = + (theme.currentThemeType === theme.defaultThemeType) ? theme.defaultThemeType : theme.currentTheme; + const applicationCreationStepCss = "application-create-step1.css"; + + try { + require("../../../" + theme.themeFolder + "/" + selected + "/" + applicationCreationStepCss); + } catch (ex){ + // If the particular customized file does not exist, use the default one. + require("../../../" + theme.themeFolder + "/" + theme.defaultThemeType + "/" + applicationCreationStepCss); } //Get the list of available platforms and set to the state. } diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/CreateSteps/Step2.jsx b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/CreateSteps/Step2.jsx index 9686cb8967..386251a3be 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/CreateSteps/Step2.jsx +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/CreateSteps/Step2.jsx @@ -28,7 +28,6 @@ import SelectField from 'material-ui/SelectField'; import RaisedButton from 'material-ui/RaisedButton'; import Clear from 'material-ui/svg-icons/content/clear'; import {GridList, GridTile} from 'material-ui/GridList'; -import Theme from '../../../themes/theme'; /** * The Second step of application create wizard. @@ -70,16 +69,17 @@ class Step2 extends Component { } componentWillMount() { - let selected = Theme.selectedTheme; - if (Theme.currentTheme === "default") { - require("../../../themes/default/application-create-step2.css"); - } else { - try { - require("../../../themes/" + selected + "/application-create-step2.css"); - } catch (ex){ - // If the particular customized file does not exist, use the default one. - require("../../../themes/default/application-create-step2.css"); - } + //Using the particular style specific to user selected theme. + const theme = require("../../../theme").default; + const selected = + (theme.currentThemeType === theme.defaultThemeType) ? theme.defaultThemeType : theme.currentTheme; + const applicationCreationStepCss = "application-create-step2.css"; + + try { + require("../../../" + theme.themeFolder + "/" + selected + "/" + applicationCreationStepCss); + } catch (ex){ + // If the particular customized file does not exist, use the default one. + require("../../../" + theme.themeFolder + "/" + theme.defaultThemeType + "/" + applicationCreationStepCss); } } diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/CreateSteps/Step3.jsx b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/CreateSteps/Step3.jsx index 88a279e725..c042e762d7 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/CreateSteps/Step3.jsx +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/CreateSteps/Step3.jsx @@ -24,7 +24,6 @@ import TextField from 'material-ui/TextField'; import FlatButton from 'material-ui/FlatButton'; import SelectField from 'material-ui/SelectField'; import RaisedButton from 'material-ui/RaisedButton'; -import Theme from '../../../themes/theme'; /** * The Third step of application create wizard. {Application Release Step} @@ -59,16 +58,17 @@ class Step3 extends Component { } componentWillMount() { - let selected = Theme.selectedTheme; - if (Theme.currentTheme === "default") { - require("../../../themes/default/application-create-step3.css"); - } else { - try { - require("../../../themes/" + selected + "/application-create-step3.css"); - } catch (ex){ - // If the particular customized file does not exist, use the default one. - require("../../../themes/default/application-create-step3.css"); - } + //Using the particular style specific to user selected theme. + const theme = require("../../../theme").default; + const selected = + (theme.currentThemeType === theme.defaultThemeType) ? theme.defaultThemeType : theme.currentTheme; + const applicationCreationStepCss = "application-create-step1.css"; + + try { + require("../../../" + theme.themeFolder + "/" + selected + "/" + applicationCreationStepCss); + } catch (ex){ + // If the particular customized file does not exist, use the default one. + require("../../../" + theme.themeFolder + "/" + theme.defaultThemeType + "/" + applicationCreationStepCss); } } diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Base/BaseLayout.jsx b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Base/BaseLayout.jsx index 4a18f37c73..f14a6c99e9 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Base/BaseLayout.jsx +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Base/BaseLayout.jsx @@ -31,7 +31,6 @@ import Dashboard from 'material-ui/svg-icons/action/dashboard'; import DevicesOther from 'material-ui/svg-icons/hardware/devices-other'; import NotificationsIcon from 'material-ui/svg-icons/social/notifications'; import ActionAccountCircle from 'material-ui/svg-icons/action/account-circle'; -import Theme from '../../themes/theme'; /** @@ -51,16 +50,17 @@ class BaseLayout extends Component { } componentWillMount() { - let selected = Theme.selectedTheme; - if (Theme.currentTheme === "default") { - require("../../themes/default/basic-layout.css"); - } else { - try { - require("../../themes/" + selected + "/basic-layout.css"); - } catch (ex){ - // If the particular customized file does not exist, use the default one. - require("../../themes/default/basic-layout.css"); - } + //Using the particular style specific to user selected theme. + const theme = require("../../theme").default; + const selected = + (theme.currentThemeType === theme.defaultThemeType) ? theme.defaultThemeType : theme.currentTheme; + const basicLayoutCss = "basic-layout.css"; + + try { + require("../../" + theme.themeFolder + "/" + selected + "/" + basicLayoutCss); + } catch (ex){ + // If the particular customized file does not exist, use the default one. + require("../../" + theme.themeFolder + "/" + theme.defaultThemeType + "/" + basicLayoutCss); } } diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Platform/PlatformCreate.jsx b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Platform/PlatformCreate.jsx index fc6663f7f4..b00731772f 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Platform/PlatformCreate.jsx +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Platform/PlatformCreate.jsx @@ -31,7 +31,6 @@ import {GridList, GridTile} from 'material-ui/GridList'; import Close from 'material-ui/svg-icons/navigation/close'; import {Card, CardActions, CardTitle} from 'material-ui/Card'; import AddCircleOutline from 'material-ui/svg-icons/content/add-circle-outline'; -import Theme from '../../themes/theme'; /** * Platform Create component. @@ -66,16 +65,17 @@ class PlatformCreate extends Component { } componentWillMount() { - let selected = Theme.selectedTheme; - if (Theme.currentTheme === "default") { - require("../../themes/default/platform-create.css"); - } else { - try { - require("../../themes/" + selected + "/platform-create.css"); - } catch (ex) { - // If the particular customized file does not exist, use the default one. - require("../../themes/default/platform-create.css"); - } + //Using the particular style specific to user selected theme. + const theme = require("../../theme").default; + const selected = + (theme.currentThemeType === theme.defaultThemeType) ? theme.defaultThemeType : theme.currentTheme; + const platformCreateCss = "platform-create.css"; + + try { + require("../../" + theme.themeFolder + "/" + selected + "/" + platformCreateCss); + } catch (ex){ + // If the particular customized file does not exist, use the default one. + require("../../" + theme.themeFolder + "/" + theme.defaultThemeType + "/" + platformCreateCss); } } diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Platform/PlatformListing.jsx b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Platform/PlatformListing.jsx index 6904d2fc86..6853740a17 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Platform/PlatformListing.jsx +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Platform/PlatformListing.jsx @@ -21,7 +21,6 @@ import {withRouter} from 'react-router-dom'; import TextField from 'material-ui/TextField'; import DataTable from '../UIComponents/DataTable'; import {Card, CardActions, CardTitle} from 'material-ui/Card'; -import Theme from '../../themes/theme'; /** * The App Create Component. @@ -41,16 +40,17 @@ class PlatformListing extends Component { } componentWillMount() { - let selected = Theme.selectedTheme; - if (Theme.currentTheme === "default") { - require("../../themes/default/platform-listing.css"); - } else { - try { - require("../../themes/" + selected + "/platform-listing.css"); - } catch (ex) { - // If the particular customized file does not exist, use the default one. - require("../../themes/default/platform-listing.css"); - } + //Using the particular style specific to user selected theme. + const theme = require("../../theme").default; + const selected = + (theme.currentThemeType === theme.defaultThemeType) ? theme.defaultThemeType : theme.currentTheme; + const platformListingCss = "platform-listing.css"; + + try { + require("../../" + theme.themeFolder + "/" + selected + "/" + platformListingCss); + } catch (ex){ + // If the particular customized file does not exist, use the default one. + require("../../" + theme.themeFolder + "/" + theme.defaultThemeType + "/" + platformListingCss); } //Fetch all the applications from backend and create application objects. } diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/UIComponents/DataTable.jsx b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/UIComponents/DataTable.jsx index badc608bcb..fd40970ab2 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/UIComponents/DataTable.jsx +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/UIComponents/DataTable.jsx @@ -22,7 +22,6 @@ import DataTableRow from './DataTableRow'; import DataTableHeader from './DataTableHeader'; import RaisedButton from 'material-ui/RaisedButton'; import {Table, TableBody, TableHeader, TableRow} from 'material-ui/Table'; -import Theme from '../../themes/theme'; /** * The Custom Table Component. @@ -62,16 +61,18 @@ class DataTable extends Component { componentWillMount() { this.setState({data: this.props.data, headers: this.props.headers}); - let selected = Theme.selectedTheme; - if (Theme.currentTheme === "default") { - require("../../themes/default/data-table.css"); - } else { - try { - require("../../themes/" + selected + "/data-table.css"); - } catch (ex) { - // If the particular customized file does not exist, use the default one. - require("../../themes/default/data-table.css"); - } + + //Using the particular style specific to user selected theme. + const theme = require("../../theme").default; + const selected = + (theme.currentThemeType === theme.defaultThemeType) ? theme.defaultThemeType : theme.currentTheme; + const dataTableCss = "data-table.css"; + + try { + require("../../" + theme.themeFolder + "/" + selected + "/" + dataTableCss); + } catch (ex){ + // If the particular customized file does not exist, use the default one. + require("../../" + theme.themeFolder + "/" + theme.defaultThemeType + "/" + dataTableCss); } } diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/UIComponents/DataTableHeader.jsx b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/UIComponents/DataTableHeader.jsx index fda698d911..7de68fabc9 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/UIComponents/DataTableHeader.jsx +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/UIComponents/DataTableHeader.jsx @@ -20,7 +20,6 @@ import PropTypes from 'prop-types'; import React, {Component} from 'react'; import FlatButton from 'material-ui/FlatButton'; import {TableHeaderColumn} from 'material-ui/Table'; -import Theme from '../../themes/theme'; /** * Data Table header component. @@ -33,16 +32,17 @@ class DataTableHeader extends Component { } componentWillMount() { - let selected = Theme.selectedTheme; - if (Theme.currentTheme === "default") { - require("../../themes/default/data-table.css"); - } else { - try { - require("../../themes/" + selected + "/data-table.css"); - } catch (ex) { - // If the particular customized file does not exist, use the default one. - require("../../themes/default/data-table.css"); - } + //Using the particular style specific to user selected theme. + const theme = require("../../theme").default; + const selected = + (theme.currentThemeType === theme.defaultThemeType) ? theme.defaultThemeType : theme.currentTheme; + const dataTableCss = "data-table.css"; + + try { + require("../../" + theme.themeFolder + "/" + selected + "/" + dataTableCss); + } catch (ex){ + // If the particular customized file does not exist, use the default one. + require("../../" + theme.themeFolder + "/" + theme.defaultThemeType + "/" + dataTableCss); } } diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/UIComponents/DataTableRow.jsx b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/UIComponents/DataTableRow.jsx index 8162b900a9..0b02fefde4 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/UIComponents/DataTableRow.jsx +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/UIComponents/DataTableRow.jsx @@ -19,7 +19,6 @@ import PropTypes from 'prop-types'; import React, {Component} from 'react'; import {TableRow, TableRowColumn} from 'material-ui/Table'; -import Theme from '../../themes/theme'; /** * Data table row component. @@ -36,16 +35,18 @@ class DataTableRow extends Component { componentWillMount() { this.setState({dataItem: this.props.dataItem}); - let selected = Theme.selectedTheme; - if (Theme.currentTheme === "default") { - require("../../themes/default/data-table.css"); - } else { - try { - require("../../themes/" + selected + "/data-table.css"); - } catch (ex) { - // If the particular customized file does not exist, use the default one. - require("../../themes/default/data-table.css"); - } + + //Using the particular style specific to user selected theme. + const theme = require("../../theme").default; + const selected = + (theme.currentThemeType === theme.defaultThemeType) ? theme.defaultThemeType : theme.currentTheme; + const dataTableCss = "data-table.css"; + + try { + require("../../" + theme.themeFolder + "/" + selected + "/" + dataTableCss); + } catch (ex){ + // If the particular customized file does not exist, use the default one. + require("../../" + theme.themeFolder + "/" + theme.defaultThemeType + "/" + dataTableCss); } } diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/theme.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/theme.js similarity index 75% rename from components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/theme.js rename to components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/theme.js index 5c8ed89cb6..97f715bcd7 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/theme.js +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/theme.js @@ -22,12 +22,14 @@ */ class Theme { constructor() { - const theme = require("../config.json").theme; - this.currentTheme = theme.type; - if (this.currentTheme === "default") { - this.selectedTheme = theme.value; + const theme = require("./config.json").theme; + this.currentThemeType = theme.type; + this.defaultThemeType = "default"; + this.themeFolder = "themes"; + if (this.currentThemeType === this.defaultThemeType) { + this.currentTheme = theme.value; } else { - this.selectedTheme = theme.value; + this.currentTheme = theme.value; } } } From aae017d6f40eafd6f7784e701506fd21568a7911 Mon Sep 17 00:00:00 2001 From: megala21 Date: Thu, 14 Sep 2017 14:30:22 +0530 Subject: [PATCH 08/12] Moving the css files to public folder --- .../pom.xml | 37 +++------ .../resources/publisher/public/config.json | 6 ++ .../resources/publisher/public/index.html | 2 +- .../default/application-create-step1.css | 0 .../default/application-create-step2.css | 0 .../default/application-create-step3.css | 0 .../themes/default/application-create.css | 0 .../themes/default/application-listing.css | 0 .../themes/default/basic-layout.css | 0 .../themes/default/data-table.css | 0 .../themes/default/platform-create.css | 0 .../themes/default/platform-listing.css | 0 .../src/main/resources/publisher/src/App.jsx | 54 ++++++++++++- .../Application/ApplicationCreate.jsx | 64 ++++++++++++--- .../Application/ApplicationListing.jsx | 62 ++++++++++++--- .../Application/CreateSteps/Step1.jsx | 67 +++++++++++++--- .../Application/CreateSteps/Step2.jsx | 64 ++++++++++++--- .../Application/CreateSteps/Step3.jsx | 62 ++++++++++++--- .../src/components/Base/BaseLayout.jsx | 64 ++++++++++++--- .../components/Platform/PlatformCreate.jsx | 60 ++++++++++++-- .../components/Platform/PlatformListing.jsx | 62 ++++++++++++--- .../src/components/UIComponents/DataTable.jsx | 59 +++++++++++--- .../UIComponents/DataTableHeader.jsx | 61 +++++++++++++-- .../components/UIComponents/DataTableRow.jsx | 59 ++++++++++++-- .../src/main/resources/publisher/src/theme.js | 37 --------- .../theme.js => custom-theme.js} | 0 .../resources/publisher/src/themes/theme.js | 78 +++++++++++++++++++ .../resources/publisher/webpack.config.js | 5 ++ 28 files changed, 732 insertions(+), 171 deletions(-) create mode 100644 components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/public/config.json rename components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/{src => public}/themes/default/application-create-step1.css (100%) rename components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/{src => public}/themes/default/application-create-step2.css (100%) rename components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/{src => public}/themes/default/application-create-step3.css (100%) rename components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/{src => public}/themes/default/application-create.css (100%) rename components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/{src => public}/themes/default/application-listing.css (100%) rename components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/{src => public}/themes/default/basic-layout.css (100%) rename components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/{src => public}/themes/default/data-table.css (100%) rename components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/{src => public}/themes/default/platform-create.css (100%) rename components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/{src => public}/themes/default/platform-listing.css (100%) delete mode 100644 components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/theme.js rename components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/{custom-theme/theme.js => custom-theme.js} (100%) create mode 100644 components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/theme.js diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/pom.xml b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/pom.xml index e7d27b5f74..3398d23ce2 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/pom.xml +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/pom.xml @@ -31,32 +31,6 @@ - - org.wso2.maven - carbon-p2-plugin - ${carbon.p2.plugin.version} - - - 4-p2-feature-generation - package - - p2-feature-gen - - - org.wso2.carbon.device.application.mgt - ../../etc/feature.properties - - - org.wso2.carbon.p2.category.type:server - - org.eclipse.equinox.p2.type.group:false - - - - - - - org.codehaus.mojo exec-maven-plugin @@ -96,8 +70,15 @@ ${npm.working.dir} - + + + ${project.build.directory}/target + + + src/main/resources + + @@ -116,7 +97,7 @@ false npm - build_prod + build_dev ./src/main/ diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/public/config.json b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/public/config.json new file mode 100644 index 0000000000..3be10b8ce9 --- /dev/null +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/public/config.json @@ -0,0 +1,6 @@ +{ + "theme": { + "type": "default", + "value": "lightBaseTheme" + } +} diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/public/index.html b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/public/index.html index 0e627f4af5..efce6b8d1c 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/public/index.html +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/public/index.html @@ -39,11 +39,11 @@ WSO2 IoT App Publisher -
+