- );
- }
-}
-
-export default withConfigContext(ReleaseView);
\ No newline at end of file
diff --git a/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/components/apps/release/images/ImgViewer.js b/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/components/apps/release/images/ImgViewer.js
deleted file mode 100644
index 17a136aac69..00000000000
--- a/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/components/apps/release/images/ImgViewer.js
+++ /dev/null
@@ -1,63 +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.
- */
-
-import React, {Component} from 'react';
-import RcViewer from 'rc-viewer';
-import {Col} from "antd";
-
-class ImgViewer extends Component {
- render() {
- const options = {
- title: false,
- toolbar: {
- zoomIn: 0,
- zoomOut: 0,
- oneToOne: 0,
- reset: 0,
- prev: 1,
- play: {
- show: 0
- },
- next: 1,
- rotateLeft: 0,
- rotateRight: 0,
- flipHorizontal: 0,
- flipVertical: 0
- },
- rotatable: false,
- transition: false,
- movable : false
- };
- return (
-
- );
-
- }
-}
-
-export default ImgViewer;
\ No newline at end of file
diff --git a/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/components/apps/release/install/AppInstallModal.js b/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/components/apps/release/install/AppInstallModal.js
deleted file mode 100644
index 1b4d9c8c2ed..00000000000
--- a/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/components/apps/release/install/AppInstallModal.js
+++ /dev/null
@@ -1,62 +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.
- */
-
-import React from "react";
-import {Modal, Tabs} from "antd";
-import UserInstall from "./UserInstall";
-import GroupInstall from "./GroupInstall";
-import RoleInstall from "./RoleInstall";
-import DeviceInstall from "./DeviceInstall";
-
-const { TabPane } = Tabs;
-
-class AppInstallModal extends React.Component{
- state={
- data:[]
- };
- render() {
- const {deviceType} = this.props;
- return (
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- );
- }
-}
-
-export default AppInstallModal;
\ No newline at end of file
diff --git a/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/components/apps/release/install/DeviceInstall.js b/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/components/apps/release/install/DeviceInstall.js
deleted file mode 100644
index 0f399084311..00000000000
--- a/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/components/apps/release/install/DeviceInstall.js
+++ /dev/null
@@ -1,248 +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.
- */
-
-import React from "react";
-import axios from "axios";
-import {Button, message, notification, Table, Typography} from "antd";
-import TimeAgo from 'javascript-time-ago'
-
-// Load locale-specific relative date/time formatting rules.
-import en from 'javascript-time-ago/locale/en'
-import {withConfigContext} from "../../../../context/ConfigContext";
-
-const {Text} = Typography;
-const columns = [
- {
- title: 'Device',
- dataIndex: 'name',
- fixed: 'left',
- width: 100,
- },
- {
- title: 'Modal',
- dataIndex: 'deviceInfo',
- key: 'modal',
- render: deviceInfo => `${deviceInfo.vendor} ${deviceInfo.deviceModel}`
- // todo add filtering options
- },
- {
- title: 'Owner',
- dataIndex: 'enrolmentInfo',
- key: 'owner',
- render: enrolmentInfo => enrolmentInfo.owner
- // todo add filtering options
- },
- {
- title: 'Last Updated',
- dataIndex: 'enrolmentInfo',
- key: 'dateOfLastUpdate',
- render: (data) => {
- return (getTimeAgo(data.dateOfLastUpdate));
- }
- // todo add filtering options
- },
- {
- title: 'Status',
- dataIndex: 'enrolmentInfo',
- key: 'status',
- render: enrolmentInfo => enrolmentInfo.status
- // todo add filtering options
- },
- {
- title: 'Ownership',
- dataIndex: 'enrolmentInfo',
- key: 'ownership',
- render: enrolmentInfo => enrolmentInfo.ownership
- // todo add filtering options
- },
- {
- title: 'OS Version',
- dataIndex: 'deviceInfo',
- key: 'osVersion',
- render: deviceInfo => deviceInfo.osVersion
- // todo add filtering options
- },
- {
- title: 'IMEI',
- dataIndex: 'properties',
- key: 'imei',
- render: properties => {
- let imei = "not-found";
- for (let i = 0; i < properties.length; i++) {
- if (properties[i].name === "IMEI") {
- imei = properties[i].value;
- }
- }
- return imei;
- }
- // todo add filtering options
- },
-];
-
-const getTimeAgo = (time) => {
- const timeAgo = new TimeAgo('en-US');
- return timeAgo.format(time);
-};
-
-
-class DeviceInstall extends React.Component {
- constructor(props) {
- super(props);
- TimeAgo.addLocale(en);
- this.state = {
- data: [],
- pagination: {},
- loading: false,
- selectedRows: []
- };
- }
-
- rowSelection = {
- onChange: (selectedRowKeys, selectedRows) => {
- // console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows);
- this.setState({
- selectedRows: selectedRows
- })
- },
- getCheckboxProps: record => ({
- disabled: record.name === 'Disabled User', // Column configuration not to be checked
- name: record.name,
- }),
- };
-
- componentDidMount() {
- this.fetch();
- }
-
- //fetch data from api
- fetch = (params = {}) => {
- const config = this.props.context;
- this.setState({loading: true});
- const {deviceType} = this.props;
- // get current page
- const currentPage = (params.hasOwnProperty("page")) ? params.page : 1;
-
- const extraParams = {
- offset: 10 * (currentPage - 1), //calculate the offset
- limit: 10,
- status: "ACTIVE",
- requireDeviceInfo: true,
- type: deviceType
- };
-
- // note: encode with '%26' not '&'
- const encodedExtraParams = Object.keys(extraParams).map(key => key + '=' + extraParams[key]).join('&');
-
- //send request to the invoker
- axios.get(
- window.location.origin + config.serverConfig.invoker.uri + config.serverConfig.invoker.deviceMgt +
- "/devices?" + encodedExtraParams,
- ).then(res => {
- if (res.status === 200) {
- const pagination = {...this.state.pagination};
- this.setState({
- loading: false,
- data: res.data.data.devices,
- pagination,
- });
-
- }
-
- }).catch((error) => {
- console.log(error);
- if (error.hasOwnProperty("status") && error.response.status === 401) {
- //todo display a popop with error
- message.error('You are not logged in');
- window.location.href = window.location.origin + '/entgra/login';
- } else {
- notification["error"]({
- message: "There was a problem",
- duration: 0,
- description:
- "Error occurred while trying to load devices.",
- });
- }
-
- this.setState({loading: false});
- });
- };
-
- handleTableChange = (pagination, filters, sorter) => {
- const pager = {...this.state.pagination};
- pager.current = pagination.current;
- this.setState({
- pagination: pager,
- });
- this.fetch({
- results: pagination.pageSize,
- page: pagination.current,
- sortField: sorter.field,
- sortOrder: sorter.order,
- ...filters,
- });
- };
-
- install = () => {
- const {selectedRows} = this.state;
- const payload = [];
- selectedRows.map(device => {
- payload.push({
- id: device.deviceIdentifier,
- type: device.type
- });
- });
- this.props.onInstall("devices", payload);
- };
-
- render() {
- const {data, pagination, loading, selectedRows} = this.state;
- return (
-
-
- Start installing the application for one or more users by entering the corresponding user name.
- Select install to automatically start downloading the application for the respective user/users.
-
-
-
- );
- }
-}
-
-export default withConfigContext(DeviceInstall);
\ No newline at end of file
diff --git a/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/components/apps/release/install/GroupInstall.js b/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/components/apps/release/install/GroupInstall.js
deleted file mode 100644
index 9b884454862..00000000000
--- a/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/components/apps/release/install/GroupInstall.js
+++ /dev/null
@@ -1,133 +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.
- */
-
-import React from "react";
-import {Typography, Select, Spin, message, notification, Button} from "antd";
-import debounce from 'lodash.debounce';
-import axios from "axios";
-import {withConfigContext} from "../../../../context/ConfigContext";
-
-const {Text} = Typography;
-const {Option} = Select;
-
-
-class GroupInstall extends React.Component {
-
- constructor(props) {
- super(props);
- this.lastFetchId = 0;
- this.fetchUser = debounce(this.fetchUser, 800);
- }
-
- state = {
- data: [],
- value: [],
- fetching: false,
- };
-
- fetchUser = value => {
- this.lastFetchId += 1;
- const fetchId = this.lastFetchId;
- const config = this.props.context;
- this.setState({data: [], fetching: true});
-
- axios.post(
- window.location.origin+ config.serverConfig.invoker.uri + config.serverConfig.invoker.deviceMgt+"/groups?name=" + value,
-
- ).then(res => {
- if (res.status === 200) {
- if (fetchId !== this.lastFetchId) {
- // for fetch callback order
- return;
- }
-
- const data = res.data.data.deviceGroups.map(group => ({
- text: group.name,
- value: group.name,
- }));
-
- this.setState({data, fetching: false});
- }
-
- }).catch((error) => { console.log(error);
- if (error.hasOwnProperty("status") && error.response.status === 401) {
- message.error('You are not logged in');
- window.location.href = window.location.origin+'/entgra/login';
- } else {
- notification["error"]({
- message: "There was a problem",
- duration: 0,
- description:
- "Error occurred while trying to load groups.",
- });
- }
-
- this.setState({fetching: false});
- });
- };
-
- handleChange = value => {
- this.setState({
- value,
- data: [],
- fetching: false,
- });
- };
-
- install = () =>{
- const {value} = this.state;
- const data = [];
- value.map(val=>{
- data.push(val.key);
- });
- this.props.onInstall("group",data);
- };
-
- render() {
-
- const {fetching, data, value} = this.state;
-
- return (
-
- Start installing the application for one or more groups by entering the corresponding group name. Select install to automatically start downloading the application for the respective device group/ groups.
-
-
- : null}
- filterOption={false}
- onSearch={this.fetchUser}
- onChange={this.handleChange}
- style={{width: '100%'}}
- >
- {data.map(d => (
-
- ))}
-
-
-
-
-
- );
- }
-}
-
-export default withConfigContext(GroupInstall);
\ No newline at end of file
diff --git a/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/components/apps/release/install/RoleInstall.js b/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/components/apps/release/install/RoleInstall.js
deleted file mode 100644
index ac5a1b86830..00000000000
--- a/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/components/apps/release/install/RoleInstall.js
+++ /dev/null
@@ -1,133 +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.
- */
-
-import React from "react";
-import {Typography, Select, Spin, message, notification, Button} from "antd";
-import debounce from 'lodash.debounce';
-import axios from "axios";
-import {withConfigContext} from "../../../../context/ConfigContext";
-
-const {Text} = Typography;
-const {Option} = Select;
-
-
-class RoleInstall extends React.Component {
-
- constructor(props) {
- super(props);
- this.lastFetchId = 0;
- this.fetchUser = debounce(this.fetchUser, 800);
- }
-
- state = {
- data: [],
- value: [],
- fetching: false,
- };
-
- fetchUser = value => {
- const config = this.props.context;
- this.lastFetchId += 1;
- const fetchId = this.lastFetchId;
- this.setState({data: [], fetching: true});
-
- axios.get(
- window.location.origin+ config.serverConfig.invoker.uri + config.serverConfig.invoker.deviceMgt+"/roles?filter=" + value,
-
- ).then(res => {
- if (res.status === 200) {
- if (fetchId !== this.lastFetchId) {
- // for fetch callback order
- return;
- }
-
- const data = res.data.data.roles.map(role => ({
- text: role,
- value: role,
- }));
-
- this.setState({data, fetching: false});
- }
-
- }).catch((error) => { console.log(error);
- if (error.hasOwnProperty("status") && error.response.status === 401) {
- message.error('You are not logged in');
- window.location.href = window.location.origin+'/entgra/login';
- } else {
- notification["error"]({
- message: "There was a problem",
- duration: 0,
- description:
- "Error occurred while trying to load roles.",
- });
- }
-
- this.setState({fetching: false});
- });
- };
-
- handleChange = value => {
- this.setState({
- value,
- data: [],
- fetching: false,
- });
- };
-
- install = () =>{
- const {value} = this.state;
- const data = [];
- value.map(val=>{
- data.push(val.key);
- });
- this.props.onInstall("role",data);
- };
-
- render() {
-
- const {fetching, data, value} = this.state;
-
- return (
-
- Start installing the application for one or more roles by entering the corresponding role name. Select install to automatically start downloading the application for the respective user role/roles.
-
-
- : null}
- filterOption={false}
- onSearch={this.fetchUser}
- onChange={this.handleChange}
- style={{width: '100%'}}
- >
- {data.map(d => (
-
- ))}
-
-
-
-
-
- );
- }
-}
-
-export default withConfigContext(RoleInstall);
\ No newline at end of file
diff --git a/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/components/apps/release/install/UserInstall.js b/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/components/apps/release/install/UserInstall.js
deleted file mode 100644
index d93eb6c81a7..00000000000
--- a/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/components/apps/release/install/UserInstall.js
+++ /dev/null
@@ -1,133 +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.
- */
-
-import React from "react";
-import {Typography, Select, Spin, message, notification, Button} from "antd";
-import debounce from 'lodash.debounce';
-import axios from "axios";
-import {withConfigContext} from "../../../../context/ConfigContext";
-
-const {Text} = Typography;
-const {Option} = Select;
-
-
-class UserInstall extends React.Component {
-
- constructor(props) {
- super(props);
- this.lastFetchId = 0;
- this.fetchUser = debounce(this.fetchUser, 800);
- }
-
- state = {
- data: [],
- value: [],
- fetching: false,
- };
-
- fetchUser = value => {
- const config = this.props.context;
- this.lastFetchId += 1;
- const fetchId = this.lastFetchId;
- this.setState({data: [], fetching: true});
-
-
- //send request to the invoker
- axios.get(
- window.location.origin+ config.serverConfig.invoker.uri + config.serverConfig.invoker.deviceMgt+"/users/search?username=" + value,
-
- ).then(res => {
- if (res.status === 200) {
- if (fetchId !== this.lastFetchId) {
- // for fetch callback order
- return;
- }
-
- const data = res.data.data.users.map(user => ({
- text: user.username,
- value: user.username,
- }));
-
- this.setState({data, fetching: false});
- }
-
- }).catch((error) => {
- if (error.response.hasOwnProperty(status) && error.response.status === 401) {
- message.error('You are not logged in');
- window.location.href = window.location.origin+ '/entgra/login';
- } else {
- notification["error"]({
- message: "There was a problem",
- duration: 0,
- description:
- "Error occurred while trying to load users.",
- });
- }
-
- this.setState({fetching: false});
- });
- };
-
- handleChange = value => {
- this.setState({
- value,
- data: [],
- fetching: false,
- });
- };
-
- install = () => {
- const {value} = this.state;
- const data = [];
- value.map(val => {
- data.push(val.key);
- });
- this.props.onInstall("user", data);
- };
-
- render() {
- const {fetching, data, value} = this.state;
-
- return (
-
- Start installing the application for one or more users by entering the corresponding user name. Select install to automatically start downloading the application for the respective user/users.
-
- );
- }
-}
-
-export default withConfigContext(SingleReview);
\ No newline at end of file
diff --git a/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/components/apps/release/review/singleReview/editReview/EditReview.css b/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/components/apps/release/review/singleReview/editReview/EditReview.css
deleted file mode 100644
index ec9dd385a53..00000000000
--- a/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/components/apps/release/review/singleReview/editReview/EditReview.css
+++ /dev/null
@@ -1,27 +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.
- */
-
-.edit-button {
- color: #1890ff;
- text-decoration: none;
- outline: none;
- cursor: pointer;
- font-weight: normal;
- font-size: 0.8em;
- padding-left: 5px;
-}
\ No newline at end of file
diff --git a/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/components/apps/release/review/singleReview/editReview/EditReview.js b/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/components/apps/release/review/singleReview/editReview/EditReview.js
deleted file mode 100644
index 5a541f758f8..00000000000
--- a/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/components/apps/release/review/singleReview/editReview/EditReview.js
+++ /dev/null
@@ -1,191 +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.
- */
-
-import React from "react";
-import {Drawer, Button, Icon, Row, Col, Typography, Divider, Input, Spin, notification} from 'antd';
-import StarRatings from "react-star-ratings";
-import axios from "axios";
-import "./EditReview.css";
-import {withConfigContext} from "../../../../../../context/ConfigContext";
-
-const {Title} = Typography;
-const {TextArea} = Input;
-
-class EditReview extends React.Component {
-
- constructor(props) {
- super(props);
- this.state = {
- visible: false,
- content: '',
- rating: 0,
- loading: false
- };
- }
-
- componentDidMount() {
- const {content,rating,id} = this.props.review;
- console.log(this.props.review);
- this.setState({
- content,
- rating
- });
- }
-
- showDrawer = () => {
- this.setState({
- visible: true,
- loading: false
- });
- };
-
- onClose = () => {
- this.setState({
- visible: false,
-
- });
- };
-
- changeRating = (newRating, name) => {
- this.setState({
- rating: newRating
- });
- };
-
- onChange = (e) => {
- this.setState({content: e.target.value})
- };
-
- onSubmit = () => {
- const config = this.props.context;
- const {content, rating} = this.state;
- const {id} = this.props.review;
- const {uuid} = this.props;
- this.setState({
- loading: true
- });
-
- const payload = {
- content: content,
- rating: rating
- };
-
- axios.put(
- window.location.origin+ config.serverConfig.invoker.uri + config.serverConfig.invoker.entgra + "/reviews/" + uuid+"/"+id,
- payload,
- ).then(res => {
- if (res.status === 200) {
- this.setState({
- loading: false,
- visible: false
- });
- notification["success"]({
- message: 'Done!',
- description:
- 'Your review has been update successfully.',
- });
-
- this.props.updateCallback(res.data.data);
- } else {
- this.setState({
- loading: false,
- visible: false
- });
- notification["error"]({
- message: "There was a problem",
- duration: 0,
- description:
- "We are unable to update your review right now.",
- });
- }
-
- }).catch((error) => {
- console.log(error);
- if (error.hasOwnProperty("response") && error.response.status === 401) {
- window.location.href = window.location.origin+ '/entgra/login';
- } else {
- this.setState({
- loading: false,
- visible: false
- });
- notification["error"]({
- message: "There was a problem",
- duration: 0,
- description:
- "We are unable to add your review right now.",
- });
- }
- });
-
-
- };
-
- render() {
- return (
-
- edit
-
-
-
-
-
- Edit review
-
-
-
-
-
-
-
-
-
-
-
-
-
- );
- }
-}
-
-export default withConfigContext(EditReview);
\ No newline at end of file
diff --git a/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/index.js b/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/index.js
index c8e24e74729..b8206d16d77 100644
--- a/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/index.js
+++ b/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/index.js
@@ -21,9 +21,11 @@ import ReactDOM from 'react-dom';
import * as serviceWorker from './serviceWorker';
import App from "./App";
import Login from "./pages/Login";
-import Dashboard from "./pages/dashboard/Dashboard";
+import Dashboard from "./pages/Dashboard/Dashboard";
import './index.css';
-import Devices from "./pages/dashboard/devices/Devices";
+import Devices from "./pages/Dashboard/Devices/Devices";
+import Reports from "./pages/Dashboard/Reports/Reports";
+import Geo from "./pages/Dashboard/Geo/Geo";
const routes = [
{
@@ -40,6 +42,16 @@ const routes = [
path: '/entgra/devices',
component: Devices,
exact: true
+ },
+ {
+ path: '/entgra/geo',
+ component: Geo,
+ exact: true
+ },
+ {
+ path: '/entgra/reports',
+ component: Reports,
+ exact: true
}
]
}
diff --git a/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/pages/dashboard/Dashboard.js b/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/pages/Dashboard/Dashboard.js
similarity index 88%
rename from components/device-mgt/io.entgra.device.mgt.ui/react-app/src/pages/dashboard/Dashboard.js
rename to components/device-mgt/io.entgra.device.mgt.ui/react-app/src/pages/Dashboard/Dashboard.js
index 6ba16644bb7..590c190a582 100644
--- a/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/pages/dashboard/Dashboard.js
+++ b/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/pages/Dashboard/Dashboard.js
@@ -23,7 +23,7 @@ import RouteWithSubRoutes from "../../components/RouteWithSubRoutes"
import {Redirect} from 'react-router'
import "../../App.css";
import {withConfigContext} from "../../context/ConfigContext";
-import Logout from "./logout/Logout";
+import Logout from "./Logout/Logout";
const {Header, Content, Footer} = Layout;
const {SubMenu} = Menu;
@@ -54,7 +54,9 @@ class Dashboard extends React.Component {
defaultSelectedKeys={['1']}
style={{lineHeight: '64px'}}
>
- Devices
+ Devices
+ Geo
+ Reports
-
+
diff --git a/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/pages/Dashboard/Geo/Geo.js b/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/pages/Dashboard/Geo/Geo.js
new file mode 100644
index 00000000000..ad8b6a77560
--- /dev/null
+++ b/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/pages/Dashboard/Geo/Geo.js
@@ -0,0 +1,65 @@
+/*
+ * 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.
+ */
+
+import React from "react";
+import {
+ PageHeader,
+ Typography,
+ Breadcrumb,
+ Icon,
+ Card
+} from "antd";
+import {Link} from "react-router-dom";
+import DeviceTable from "../../../components/Devices/DevicesTable";
+
+const {Paragraph} = Typography;
+
+class Geo extends React.Component {
+ routes;
+
+ constructor(props) {
+ super(props);
+ this.routes = props.routes;
+
+ }
+
+ render() {
+ return (
+
+
+
+
+ Home
+
+ Geo
+
+
+
Geo
+ Lorem ipsum dolor sit amet, est similique constituto at, quot inermis id mel, an
+ illud incorrupte nam.
+
+
+
+
+
+
+ );
+ }
+}
+
+export default Geo;
diff --git a/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/pages/dashboard/logout/Logout.js b/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/pages/Dashboard/Logout/Logout.js
similarity index 100%
rename from components/device-mgt/io.entgra.device.mgt.ui/react-app/src/pages/dashboard/logout/Logout.js
rename to components/device-mgt/io.entgra.device.mgt.ui/react-app/src/pages/Dashboard/Logout/Logout.js
diff --git a/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/pages/Dashboard/Reports/Reports.js b/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/pages/Dashboard/Reports/Reports.js
new file mode 100644
index 00000000000..5449bf726bf
--- /dev/null
+++ b/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/pages/Dashboard/Reports/Reports.js
@@ -0,0 +1,65 @@
+/*
+ * 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.
+ */
+
+import React from "react";
+import {
+ PageHeader,
+ Typography,
+ Breadcrumb,
+ Icon,
+ Card
+} from "antd";
+import {Link} from "react-router-dom";
+import DeviceTable from "../../../components/Devices/DevicesTable";
+
+const {Paragraph} = Typography;
+
+class Reports extends React.Component {
+ routes;
+
+ constructor(props) {
+ super(props);
+ this.routes = props.routes;
+
+ }
+
+ render() {
+ return (
+
+
+
+
+ Home
+
+ Reports
+
+
+
Reports
+ Lorem ipsum dolor sit amet, est similique constituto at, quot inermis id mel, an
+ illud incorrupte nam.
+
+
+
+
+
+
+ );
+ }
+}
+
+export default Reports;
diff --git a/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/pages/dashboard/add-new-app/AddNewApp.js b/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/pages/dashboard/add-new-app/AddNewApp.js
deleted file mode 100644
index 0c794c8e0e0..00000000000
--- a/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/pages/dashboard/add-new-app/AddNewApp.js
+++ /dev/null
@@ -1,353 +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.
- */
-
-import React from "react";
-import {
- PageHeader,
- Typography,
- Card,
- Steps,
- Button,
- message,
- Row,
- Col,
- Tag,
- Tooltip,
- Input,
- Icon,
- Select,
- Switch,
- Form,
- Upload,
- Divider
-} from "antd";
-import Step1 from "./Step1";
-import Step2 from "./Step2";
-import Step3 from "./Step3";
-import styles from "./Style.less";
-import IconImage from "./IconImg";
-import UploadScreenshots from "./UploadScreenshots";
-
-const Paragraph = Typography;
-const Dragger = Upload.Dragger;
-const routes = [
- {
- path: 'index',
- breadcrumbName: 'entgra',
- },
- {
- path: 'first',
- breadcrumbName: 'dashboard',
- },
- {
- path: 'second',
- breadcrumbName: 'add new app',
- },
-];
-
-const props = {
- name: 'file',
- multiple: false,
- action: '//jsonplaceholder.typicode.com/posts/',
- onChange(info) {
- const status = info.file.status;
- if (status !== 'uploading') {
- // console.log(info.file, info.fileList);
- }
- if (status === 'done') {
- message.success(`${info.file.name} file uploaded successfully.`);
- } else if (status === 'error') {
- message.error(`${info.file.name} file upload failed.`);
- }
- },
-};
-
-const Step = Steps.Step;
-
-const steps = [{
- title: 'First',
- content: Step1
-}, {
- title: 'Second',
- content: Step2,
-}, {
- title: 'Last',
- content: Step3,
-}];
-
-
-const {Option} = Select;
-const {TextArea} = Input;
-const InputGroup = Input.Group;
-
-const formItemLayout = {
- labelCol: {
- span: 4,
- },
- wrapperCol: {
- span: 20,
- },
-};
-
-
-
-class EditableTagGroup extends React.Component {
- state = {
- tags: [],
- inputVisible: false,
- inputValue: '',
- };
-
- handleClose = (removedTag) => {
- const tags = this.state.tags.filter(tag => tag !== removedTag);
- // console.log(tags);
- this.setState({tags});
- }
-
- showInput = () => {
- this.setState({inputVisible: true}, () => this.input.focus());
- }
-
- handleInputChange = (e) => {
- this.setState({inputValue: e.target.value});
- }
-
- handleInputConfirm = () => {
- const {inputValue} = this.state;
- let {tags} = this.state;
- if (inputValue && tags.indexOf(inputValue) === -1) {
- tags = [...tags, inputValue];
- }
- // console.log(tags);
- this.setState({
- tags,
- inputVisible: false,
- inputValue: '',
- });
- }
-
- saveInputRef = input => this.input = input
-
- render() {
- const {tags, inputVisible, inputValue} = this.state;
- return (
-
Support for a single or bulk upload.
- Strictly prohibit from uploading company data or other band
- files
-
-
-
-
-
Icon
-
-
-
-
Banner
-
-
-
-
-
-
-
-
Screenshots
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- );
- }
-}
-
-export default AddNewApp;
diff --git a/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/pages/dashboard/add-new-app/IconImg.js b/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/pages/dashboard/add-new-app/IconImg.js
deleted file mode 100644
index 00937843d27..00000000000
--- a/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/pages/dashboard/add-new-app/IconImg.js
+++ /dev/null
@@ -1,84 +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.
- */
-
-import React from "react";
-import { Upload, Icon, message } from 'antd';
-
-function getBase64(img, callback) {
- const reader = new FileReader();
- reader.addEventListener('load', () => callback(reader.result));
- reader.readAsDataURL(img);
-}
-
-function beforeUpload(file) {
- const isJPG = file.type === 'image/jpeg';
- if (!isJPG) {
- message.error('You can only upload JPG file!');
- }
- const isLt2M = file.size / 1024 / 1024 < 2;
- if (!isLt2M) {
- message.error('Image must smaller than 2MB!');
- }
- return isJPG && isLt2M;
-}
-
-
-class IconImage extends React.Component {
- state = {
- loading: false,
- };
-
- handleChange = (info) => {
- if (info.file.status === 'uploading') {
- this.setState({ loading: true });
- return;
- }
- if (info.file.status === 'done') {
- // Get this url from response in real world.
- getBase64(info.file.originFileObj, imageUrl => this.setState({
- imageUrl,
- loading: false,
- }));
- }
- }
-
- render() {
- const uploadButton = (
-
-
-
Upload
-
- );
- const imageUrl = this.state.imageUrl;
- return (
-
- {imageUrl ? : uploadButton}
-
- );
- }
-}
-
-export default IconImage;
\ No newline at end of file
diff --git a/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/pages/dashboard/add-new-app/Step1.js b/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/pages/dashboard/add-new-app/Step1.js
deleted file mode 100644
index ebe00b91223..00000000000
--- a/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/pages/dashboard/add-new-app/Step1.js
+++ /dev/null
@@ -1,170 +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.
- */
-
-import React from "react";
-import {Form, Input, Button, Select, Divider, Tag, Tooltip, Icon, Checkbox, Row, Col} from "antd";
-import styles from './Style.less';
-
-const { Option } = Select;
-const { TextArea } = Input;
-const InputGroup = Input.Group;
-
-const formItemLayout = {
- labelCol: {
- span: 8,
- },
- wrapperCol: {
- span: 16,
- },
-};
-
-class EditableTagGroup extends React.Component {
- state = {
- tags: [],
- inputVisible: false,
- inputValue: '',
- };
-
- handleClose = (removedTag) => {
- const tags = this.state.tags.filter(tag => tag !== removedTag);
- // console.log(tags);
- this.setState({ tags });
- }
-
- showInput = () => {
- this.setState({ inputVisible: true }, () => this.input.focus());
- }
-
- handleInputChange = (e) => {
- this.setState({ inputValue: e.target.value });
- }
-
- handleInputConfirm = () => {
- const { inputValue } = this.state;
- let { tags } = this.state;
- if (inputValue && tags.indexOf(inputValue) === -1) {
- tags = [...tags, inputValue];
- }
- // console.log(tags);
- this.setState({
- tags,
- inputVisible: false,
- inputValue: '',
- });
- }
-
- saveInputRef = input => this.input = input
-
- render() {
- const { tags, inputVisible, inputValue } = this.state;
- return (
-
- );
- }
-}
-
-export default Step1;
\ No newline at end of file
diff --git a/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/pages/dashboard/add-new-app/Step2.js b/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/pages/dashboard/add-new-app/Step2.js
deleted file mode 100644
index 180da49c666..00000000000
--- a/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/pages/dashboard/add-new-app/Step2.js
+++ /dev/null
@@ -1,29 +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.
- */
-
-import React from "react"
-
-class Step2 extends React.Component {
- render() {
- return (
-
tttoooeeee
- );
- }
-}
-
-export default Step2;
\ No newline at end of file
diff --git a/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/pages/dashboard/add-new-app/Step3.js b/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/pages/dashboard/add-new-app/Step3.js
deleted file mode 100644
index 0fe9610f9cc..00000000000
--- a/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/pages/dashboard/add-new-app/Step3.js
+++ /dev/null
@@ -1,29 +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.
- */
-
-import React from "react"
-
-class Step3 extends React.Component {
- render() {
- return (
-
tttoooeeee
- );
- }
-}
-
-export default Step3;
\ No newline at end of file
diff --git a/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/pages/dashboard/add-new-app/Style.less b/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/pages/dashboard/add-new-app/Style.less
deleted file mode 100644
index 823ca738099..00000000000
--- a/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/pages/dashboard/add-new-app/Style.less
+++ /dev/null
@@ -1,22 +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.
- */
-
-.stepForm {
- max-width: 500px;
- margin: 40px auto 0;
-}
diff --git a/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/pages/dashboard/add-new-app/UploadScreenshots.js b/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/pages/dashboard/add-new-app/UploadScreenshots.js
deleted file mode 100644
index b5405e8748d..00000000000
--- a/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/pages/dashboard/add-new-app/UploadScreenshots.js
+++ /dev/null
@@ -1,67 +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.
- */
-
-import React from "react";
-import { Upload, Icon, Modal} from 'antd';
-
-
-class UploadScreenshots extends React.Component {
- state = {
- previewVisible: false,
- previewImage: '',
- fileList: [],
- };
-
- handleCancel = () => this.setState({ previewVisible: false });
-
- handlePreview = (file) => {
- this.setState({
- previewImage: file.url || file.thumbUrl,
- previewVisible: true,
- });
- };
-
- handleChange = ({ fileList }) => this.setState({ fileList });
-
- render() {
- const { previewVisible, previewImage, fileList } = this.state;
- const uploadButton = (
-
- );
- }
-}
-export default UploadScreenshots;
\ No newline at end of file
diff --git a/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/pages/dashboard/add-new-app/components/AddTagModal.js b/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/pages/dashboard/add-new-app/components/AddTagModal.js
deleted file mode 100644
index 1088ce4d8ca..00000000000
--- a/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/pages/dashboard/add-new-app/components/AddTagModal.js
+++ /dev/null
@@ -1,67 +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.
- */
-
-import React from "react";
-import { Upload, Icon, Modal} from 'antd';
-
-
-class AddTagModal extends React.Component {
- state = {
- previewVisible: false,
- previewImage: '',
- fileList: [],
- };
-
- handleCancel = () => this.setState({ previewVisible: false });
-
- handlePreview = (file) => {
- this.setState({
- previewImage: file.url || file.thumbUrl,
- previewVisible: true,
- });
- };
-
- handleChange = ({ fileList }) => this.setState({ fileList });
-
- render() {
- const { previewVisible, previewImage, fileList } = this.state;
- const uploadButton = (
-
- );
- }
-}
-export default AddTagModal;
\ No newline at end of file
diff --git a/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/pages/dashboard/apps/Apps.js b/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/pages/dashboard/apps/Apps.js
deleted file mode 100644
index 3d79af938e2..00000000000
--- a/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/pages/dashboard/apps/Apps.js
+++ /dev/null
@@ -1,45 +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.
- */
-
-import React from "react";
-import AppList from "../../../components/apps/AppList";
-
-class Apps extends React.Component {
- routes;
- constructor(props) {
- super(props);
- this.routes = props.routes;
-
- }
-
-
- render() {
- const {deviceType} = this.props.match.params;
- return (
-
-
- {deviceType!==null && }
-
-
-
-
- );
- }
-}
-
-export default Apps;
diff --git a/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/pages/dashboard/apps/release/Release.js b/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/pages/dashboard/apps/release/Release.js
deleted file mode 100644
index 1b7ea7867e1..00000000000
--- a/components/device-mgt/io.entgra.device.mgt.ui/react-app/src/pages/dashboard/apps/release/Release.js
+++ /dev/null
@@ -1,131 +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.
- */
-
-import React from "react";
-import '../../../../App.css';
-import {Skeleton, Typography, Row, Col, Card, message, notification, Breadcrumb, Icon} from "antd";
-import ReleaseView from "../../../../components/apps/release/ReleaseView";
-import axios from "axios";
-import {withConfigContext} from "../../../../context/ConfigContext";
-import {Link} from "react-router-dom";
-
-const {Title} = Typography;
-
-class Release extends React.Component {
- routes;
-
- constructor(props) {
- super(props);
- this.routes = props.routes;
- this.state = {
- loading: true,
- app: null,
- uuid: null
- };
- }
-
- componentDidMount() {
- const {uuid, deviceType} = this.props.match.params;
- this.fetchData(uuid);
- this.props.changeSelectedMenuItem(deviceType);
- }
-
- componentDidUpdate(prevProps, prevState, snapshot) {
- if (prevState.uuid !== this.state.uuid) {
- const {uuid, deviceType} = this.props.match.params;
- this.fetchData(uuid);
- this.props.changeSelectedMenuItem(deviceType);
- }
- }
-
- fetchData = (uuid) => {
- const config = this.props.context;
-
- //send request to the invoker
- axios.get(
- window.location.origin + config.serverConfig.invoker.uri + config.serverConfig.invoker.entgra + "/applications/" + uuid,
- ).then(res => {
- if (res.status === 200) {
- let app = res.data.data;
-
- this.setState({
- app: app,
- loading: false,
- uuid: uuid
- })
- }
-
- }).catch((error) => {
- console.log(error);
- if (error.hasOwnProperty("response") && error.response.status === 401) {
- //todo display a popop with error
- message.error('You are not logged in');
- window.location.href = window.location.origin + '/entgra/login';
- } else {
- notification["error"]({
- message: "There was a problem",
- duration: 0,
- description:
- "Error occurred while trying to load releases.",
- });
- }
-
- this.setState({loading: false});
- });
- };
-
- render() {
- const {app, loading} = this.state;
- const {deviceType} = this.props.match.params;
-
- let content = No Releases Found;
- let appName = "loading...";
-
- if (app != null && app.applicationReleases.length !== 0) {
- content = ;
- appName = app.name;
- }
-
- return (
-