diff --git a/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/components/DeviceTypes/DeviceTypesTable.js b/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/components/DeviceTypes/DeviceTypesTable.js
index 5e1a5494cad..42af8271b76 100644
--- a/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/components/DeviceTypes/DeviceTypesTable.js
+++ b/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/components/DeviceTypes/DeviceTypesTable.js
@@ -18,7 +18,7 @@
import React from "react";
import axios from "axios";
-import {Tag, message, notification, Table, Typography, Tooltip, Icon, Divider, Card, Col, Row, Select} from "antd";
+import {message, notification, Typography, Icon, Card, Col, Row} from "antd";
import TimeAgo from 'javascript-time-ago'
// Load locale-specific relative date/time formatting rules.
@@ -113,16 +113,27 @@ class DeviceTypesTable extends React.Component {
render() {
const {data, pagination, loading, selectedRows} = this.state;
-
+ const { Meta } = Card;
const itemCard = data.map((data) =>
-
-
- {data.name}
+
+ ,
+ ,]}
+ >
+ }
+ title={data.name}
+ />
+
);
return (
-
+
{itemCard}
diff --git a/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/components/Devices/DevicesTable.js b/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/components/Devices/DevicesTable.js
index 21fe449b480..38e5444aebb 100644
--- a/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/components/Devices/DevicesTable.js
+++ b/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/components/Devices/DevicesTable.js
@@ -18,7 +18,7 @@
import React from "react";
import axios from "axios";
-import {Tag, message, notification, Table, Typography, Tooltip, Icon, Divider, Button, Modal, Select} from "antd";
+import {Tag, message, notification, Table, Typography, Tooltip, Icon, Modal, Select} from "antd";
import TimeAgo from 'javascript-time-ago'
// Load locale-specific relative date/time formatting rules.
@@ -133,18 +133,11 @@ class DeviceTable extends React.Component {
selectedRows: [],
deviceGroups: [],
groupModalVisible: false,
- selectedGroupId: []
+ selectedGroupId: [],
+ selectedRowKeys:[]
};
}
- rowSelection = {
- onChange: (selectedRowKeys, selectedRows) => {
- this.setState({
- selectedRows: selectedRows
- });
- }
- };
-
componentDidMount() {
this.fetch();
}
@@ -249,6 +242,9 @@ class DeviceTable extends React.Component {
).then(res => {
if (res.status === 200) {
this.fetch();
+ this.setState({
+ selectedRowKeys:[]
+ })
notification["success"]({
message: "Done",
duration: 4,
@@ -409,11 +405,30 @@ class DeviceTable extends React.Component {
});
};
- render() {
- const {data, pagination, loading, selectedRows} = this.state;
+ onSelectChange = (selectedRowKeys, selectedRows) => {
+ this.setState({
+ selectedRowKeys,
+ selectedRows: selectedRows
+ });
+ };
+ render() {
+ const {data, pagination, loading, selectedRows, selectedRowKeys} = this.state;
const isSelectedSingle = this.state.selectedRows.length == 1;
+ let selectedText;
+ if(isSelectedSingle){
+ selectedText = "You have selected 1 device"
+ }else{
+ selectedText = "You have selected " + this.state.selectedRows.length + " devices"
+ }
+
+ const rowSelection = {
+ selectedRowKeys,
+ selectedRows,
+ onChange: this.onSelectChange,
+ };
+
let item = this.state.deviceGroups.map((data) =>
@@ -453,10 +467,11 @@ class DeviceTable extends React.Component {
onOk={this.handleOk}
onCancel={this.handleCancel}
>
+
{selectedText}
);
diff --git a/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/components/Groups/GroupsTable.js b/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/components/Groups/GroupsTable.js
index f411c0782ac..1fdaedec499 100644
--- a/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/components/Groups/GroupsTable.js
+++ b/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/components/Groups/GroupsTable.js
@@ -18,7 +18,7 @@
import React from "react";
import axios from "axios";
-import {Tag, message, notification, Table, Typography, Tooltip, Icon, Divider} from "antd";
+import { message, notification, Table, Typography} from "antd";
import TimeAgo from 'javascript-time-ago'
// Load locale-specific relative date/time formatting rules.
@@ -164,7 +164,6 @@ class GroupsTable extends React.Component {
loading={loading}
onChange={this.handleTableChange}
rowSelection={this.rowSelection}
- scroll={{x: 1000}}
/>
);
diff --git a/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/components/Policies/PoliciesTable.js b/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/components/Policies/PoliciesTable.js
index 29394b9cde5..5a1fbb3692b 100644
--- a/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/components/Policies/PoliciesTable.js
+++ b/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/components/Policies/PoliciesTable.js
@@ -18,7 +18,7 @@
import React from "react";
import axios from "axios";
-import {Tag, message, notification, Table, Typography, Tooltip, Icon, Divider} from "antd";
+import {message, notification, Table, Typography} from "antd";
import TimeAgo from 'javascript-time-ago'
// Load locale-specific relative date/time formatting rules.
@@ -171,7 +171,6 @@ class PoliciesTable extends React.Component {
loading={loading}
onChange={this.handleTableChange}
rowSelection={this.rowSelection}
- scroll={{x: 1000}}
/>
);
diff --git a/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/components/Roles/RolesTable.js b/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/components/Roles/RolesTable.js
index 68083506463..1080cddddbf 100644
--- a/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/components/Roles/RolesTable.js
+++ b/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/components/Roles/RolesTable.js
@@ -126,16 +126,26 @@ class RolesTable extends React.Component {
render() {
const {data, pagination, loading, selectedRows} = this.state;
-
+ const { Meta } = Card;
const itemCard = data.map((data) =>
-
-
- {data}
-
+
+ ,
+ ,]}
+ >
+ }
+ title={data}
+ />
+
);
return (
-
+
{itemCard}
diff --git a/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/components/Users/UsersDevices.js b/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/components/Users/UsersDevices.js
index 13ce62e98e9..75529becc12 100644
--- a/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/components/Users/UsersDevices.js
+++ b/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/components/Users/UsersDevices.js
@@ -240,7 +240,6 @@ class UsersDevices extends React.Component {
loading={loading}
onChange={this.handleTableChange}
rowSelection={this.rowSelection}
- scroll={{x: 1000}}
/>
);
diff --git a/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/components/Users/UsersTable.js b/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/components/Users/UsersTable.js
index ac7fc9c66a1..a1651111ffa 100644
--- a/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/components/Users/UsersTable.js
+++ b/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/components/Users/UsersTable.js
@@ -18,7 +18,7 @@
import React from "react";
import axios from "axios";
-import {message, notification, Table, Typography, Panel, Collapse, Button, List, Modal, Icon} from "antd";
+import {message, notification, Table, Typography, Panel, Collapse, Button, List, Modal, Icon, Tabs} from "antd";
import TimeAgo from 'javascript-time-ago'
// Load locale-specific relative date/time formatting rules.
@@ -174,9 +174,9 @@ class UsersTable extends React.Component {
};
render() {
-
const {data, pagination, loading, selectedRows} = this.state;
const { Panel } = Collapse;
+ const { TabPane } = Tabs;
const columns = [
{
title: 'User Name',
@@ -231,30 +231,44 @@ class UsersTable extends React.Component {
loading={loading}
onChange={this.handleTableChange}
rowSelection={this.rowSelection}
- scroll={{x: 1000}}
/>
-
-
+
+
+
+ Roles
+
+ }
+ key="1"
+ >
{item}}
/>
-
-
+
+
+
+ Enrolled Devices
+
+ }
+ key="2"
+ >
-
-
+
+