record.id}
dataSource={this.state.apps}
@@ -228,6 +227,7 @@ class AppsTable extends React.Component {
};
}}
/>
+
);
}
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/pages/dashboard/Dashboard.css b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/pages/dashboard/Dashboard.css
new file mode 100644
index 00000000000..ba4ccf364c3
--- /dev/null
+++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/pages/dashboard/Dashboard.css
@@ -0,0 +1,92 @@
+/*
+ * Copyright (c) 2019, Entgra (pvt) Ltd. (http://entgra.io) All Rights Reserved.
+ *
+ * Entgra (pvt) Ltd. 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.
+ */
+
+.logo-image {
+ height: 31px;
+ margin: 0 5px 16px 24px;
+ float: left;
+}
+
+.logo-image img{
+ height: 35px;
+}
+
+.profile{
+ float:right;
+ margin-right: 2%;
+}
+
+.mobile-layout{
+ visibility: hidden;
+ position: absolute;
+}
+
+.mobile-menu-button{
+ margin-left: 4%;
+ position: fixed;
+}
+
+.bar-icon{
+ margin-top: 10%;
+ font-size: 27px;
+}
+
+@media screen and (max-width: 768px) {
+
+ .web-layout{
+ visibility: hidden;
+ }
+
+ .mobile-layout{
+ visibility: visible;
+ z-index: 1;
+ }
+
+ .mobile-menu-button{
+ margin-top: 4%;
+ }
+
+ Header{
+ position: fixed;
+ z-index: 1;
+ width: 100%;
+ }
+
+ .dashboard-body{
+ margin-top: 14%;
+ }
+
+ .logo-image {
+ margin-left: 20%;
+ }
+
+}
+
+@media screen and (max-height: 500px) {
+ .mobile-menu-button{
+ margin-top: 2%;
+ }
+ .dashboard-body{
+ margin-top: 9%;
+ }
+}
+
+
+
+
+
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/pages/dashboard/Dashboard.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/pages/dashboard/Dashboard.js
index 3639c4e4f70..40b7ba5ec4b 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/pages/dashboard/Dashboard.js
+++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/pages/dashboard/Dashboard.js
@@ -17,11 +17,11 @@
*/
import React from "react";
-import {Layout, Menu, Icon} from 'antd';
+import {Layout, Menu, Icon, Drawer, Button} from 'antd';
import {Switch, Link} from "react-router-dom";
import RouteWithSubRoutes from "../../components/RouteWithSubRoutes"
import {Redirect} from 'react-router'
-import "../../App.css";
+import "./Dashboard.css";
import {withConfigContext} from "../../context/ConfigContext";
import Logout from "./logout/Logout";
@@ -38,27 +38,107 @@ class Dashboard extends React.Component {
this.Logo = config.theme.logo;
}
+ //functions for show the drawer
+ state = {
+ visible: false,
+ collapsed: false
+ };
+
+ showDrawer = () => {
+ this.setState({
+ visible: true,
+ collapsed: !this.state.collapsed
+ });
+ };
+
+ onClose = () => {
+ this.setState({
+ visible: false,
+ });
+ };
+
render() {
return (
-
-
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+ }
+ placement="left"
+ closable={false}
+ onClose={this.onClose}
+ visible={this.state.visible}
+ getContainer={false}
+ style={{position: 'absolute'}}
+ >
+
+
-
-
+ }
+ >
+
+
+
-
+
+
@@ -95,7 +178,7 @@ class Dashboard extends React.Component {
))}
-
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/pages/dashboard/Dashboard.less b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/pages/dashboard/Dashboard.less
deleted file mode 100644
index 0555e51efb8..00000000000
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/pages/dashboard/Dashboard.less
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (c) 2019, Entgra (pvt) Ltd. (http://entgra.io) All Rights Reserved.
- *
- * Entgra (pvt) Ltd. 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.
- */
-
-.logo {
- width: 120px;
- height: 31px;
- margin: 16px 0 16px 20px;
- float: left;
-
- img{
- height: 35px;
- }
-}
-
-
-input{
- min-height: 0;
-}
\ No newline at end of file
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/react-app/babel.config.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/react-app/babel.config.js
index 9da1223d926..7ec6d0936b9 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/react-app/babel.config.js
+++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/react-app/babel.config.js
@@ -1,3 +1,21 @@
+/*
+ * Copyright (c) 2019, Entgra (pvt) Ltd. (http://entgra.io) All Rights Reserved.
+ *
+ * Entgra (pvt) Ltd. 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.
+ */
+
module.exports = function (api) {
api.cache(true);
const presets = [ "@babel/preset-env",
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/react-app/src/App.css b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/react-app/src/App.css
index d393e9ad689..3eb44f4ddb1 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/react-app/src/App.css
+++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/react-app/src/App.css
@@ -39,29 +39,15 @@
padding: 5px;
}
-.logo-image {
- /*width: 120px;*/
- height: 31px;
- margin: 0 5px 16px 24px;
- float: left;
-}
-
-.logo-image img{
- height: 35px;
-}
-
.main-container{
background: #f0f2f5;
min-height: 780px
}
-.profile{
- float:right;
- margin-right: 2%;
-}
-
@media only screen and (min-width: 768px) {
+
.main-container{
padding: 24px;
}
-}
\ No newline at end of file
+
+}
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/react-app/src/components/apps/release/install/DeviceInstall.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/react-app/src/components/apps/release/install/DeviceInstall.js
index 34dfefd362c..2af6be7a74d 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/react-app/src/components/apps/release/install/DeviceInstall.js
+++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/react-app/src/components/apps/release/install/DeviceInstall.js
@@ -114,7 +114,6 @@ class DeviceInstall extends React.Component {
rowSelection = {
onChange: (selectedRowKeys, selectedRows) => {
- // console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows);
this.setState({
selectedRows: selectedRows
})
@@ -142,9 +141,12 @@ class DeviceInstall extends React.Component {
limit: 10,
status: "ACTIVE",
requireDeviceInfo: true,
- type: deviceType
};
+ if (deviceType !== 'ANY') {
+ extraParams.type = deviceType;
+ }
+
// note: encode with '%26' not '&'
const encodedExtraParams = Object.keys(extraParams).map(key => key + '=' + extraParams[key]).join('&');
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/react-app/src/pages/dashboard/Dashboard.css b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/react-app/src/pages/dashboard/Dashboard.css
new file mode 100644
index 00000000000..06c73556323
--- /dev/null
+++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/react-app/src/pages/dashboard/Dashboard.css
@@ -0,0 +1,92 @@
+/*
+ * Copyright (c) 2019, Entgra (pvt) Ltd. (http://entgra.io) All Rights Reserved.
+ *
+ * Entgra (pvt) Ltd. 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.
+ */
+
+.logo-image {
+ height: 31px;
+ margin: 0 5px 16px 24px;
+ float: left;
+}
+
+.logo-image img{
+ height: 35px;
+}
+
+.profile{
+ float:right;
+ margin-right: 2%;
+}
+
+.mobile-layout{
+ visibility: hidden;
+ position: absolute;
+}
+
+.mobile-menu-button{
+ margin-left: 4%;
+ position: fixed;
+}
+
+.bar-icon{
+ margin-top: 10%;
+ font-size: 27px;
+}
+
+@media only screen and (min-width: 768px) {
+ .main-container{
+ padding: 24px;
+ }
+}
+
+@media screen and (max-width: 768px) {
+
+ .web-layout{
+ visibility: hidden;
+ }
+
+ .mobile-layout{
+ visibility: visible;
+ z-index: 1;
+ }
+
+ .mobile-menu-button {
+ margin-top: 4%;
+ }
+
+ Header{
+ position: fixed;
+ z-index: 1;
+ width: 100%;
+ }
+
+ .dashboard-body{
+ margin-top: 15%;
+ }
+
+ .logo-image {
+ margin-left: 20%;
+ }
+}
+
+@media only screen and (max-height: 500px) {
+ .mobile-menu-button{
+ margin-top: 2%;
+ }
+ .dashboard-body{
+ margin-top: 10%;
+ }
+}
\ No newline at end of file
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/react-app/src/pages/dashboard/Dashboard.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/react-app/src/pages/dashboard/Dashboard.js
index c7b8c475751..4ea445f227a 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/react-app/src/pages/dashboard/Dashboard.js
+++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/react-app/src/pages/dashboard/Dashboard.js
@@ -17,14 +17,13 @@
*/
import React from "react";
-import {Layout, Menu, Icon} from 'antd';
-
+import {Layout, Menu, Icon, Drawer, Button} from 'antd';
const {Header, Content, Footer} = Layout;
import {Link} from "react-router-dom";
import RouteWithSubRoutes from "../../components/RouteWithSubRoutes";
import {Switch} from 'react-router';
import axios from "axios";
-import "../../App.css";
+import "./Dashboard.css";
import {withConfigContext} from "../../context/ConfigContext";
import Logout from "./logout/Logout";
@@ -81,60 +80,134 @@ class Dashboard extends React.Component {
})
};
+ //functions for show the drawer
+ state = {
+ visible: false,
+ collapsed: false
+ };
+
+ showDrawer = () => {
+ this.setState({
+ visible: true,
+ collapsed: !this.state.collapsed,
+ });
+ };
+
+ onClose = () => {
+ this.setState({
+ visible: false,
+ });
+ };
+
render() {
const config = this.props.context;
const {selectedKeys, deviceTypes} = this.state;
+ const DeviceTypesData = deviceTypes.map((deviceType) => {
+ const platform = deviceType.name;
+ const defaultPlatformIcons = config.defaultPlatformIcons;
+ let icon = defaultPlatformIcons.default.icon;
+ let theme = defaultPlatformIcons.default.theme;
+ if (defaultPlatformIcons.hasOwnProperty(platform)) {
+ icon = defaultPlatformIcons[platform].icon;
+ theme = defaultPlatformIcons[platform].theme;
+ }
+ return (
+
+
+
+ {platform}
+
+
+ );
+ });
+
return (
-
-
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ }
+ placement="left"
+ closable={false}
+ onClose={this.onClose}
+ visible={this.state.visible}
+ getContainer={false}
+ style={{position: 'absolute'}}
+ >
+
+
-
+ }
+ >
+
+
+
-
+
+
{this.state.routes.map((route) => (
@@ -145,7 +218,7 @@ class Dashboard extends React.Component {
-
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/react-app/src/pages/dashboard/Dashboard.less b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/react-app/src/pages/dashboard/Dashboard.less
deleted file mode 100644
index 0555e51efb8..00000000000
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/react-app/src/pages/dashboard/Dashboard.less
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (c) 2019, Entgra (pvt) Ltd. (http://entgra.io) All Rights Reserved.
- *
- * Entgra (pvt) Ltd. 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.
- */
-
-.logo {
- width: 120px;
- height: 31px;
- margin: 16px 0 16px 20px;
- float: left;
-
- img{
- height: 35px;
- }
-}
-
-
-input{
- min-height: 0;
-}
\ No newline at end of file
diff --git a/components/device-mgt/io.entgra.device.mgt.ui/pom.xml b/components/device-mgt/io.entgra.device.mgt.ui/pom.xml
index c57e30dc4d3..9a02213c66e 100644
--- a/components/device-mgt/io.entgra.device.mgt.ui/pom.xml
+++ b/components/device-mgt/io.entgra.device.mgt.ui/pom.xml
@@ -1,13 +1,13 @@