mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Fix device loading issue in APPM store
This commit is contained in:
parent
ff1fe51b01
commit
c96a381cd7
@ -6,6 +6,7 @@ import TimeAgo from 'javascript-time-ago'
|
|||||||
// Load locale-specific relative date/time formatting rules.
|
// Load locale-specific relative date/time formatting rules.
|
||||||
import en from 'javascript-time-ago/locale/en'
|
import en from 'javascript-time-ago/locale/en'
|
||||||
import {withConfigContext} from "../../../../context/ConfigContext";
|
import {withConfigContext} from "../../../../context/ConfigContext";
|
||||||
|
|
||||||
const {Text} = Typography;
|
const {Text} = Typography;
|
||||||
const columns = [
|
const columns = [
|
||||||
{
|
{
|
||||||
@ -131,9 +132,8 @@ class DeviceInstall extends React.Component {
|
|||||||
|
|
||||||
//send request to the invoker
|
//send request to the invoker
|
||||||
axios.get(
|
axios.get(
|
||||||
window.location.origin+
|
window.location.origin + config.serverConfig.invoker.uri + config.serverConfig.invoker.deviceMgt +
|
||||||
+ config.serverConfig.invoker.uri + config.serverConfig.invoker.deviceMgt+"/devices?" + encodedExtraParams,
|
"/devices?" + encodedExtraParams,
|
||||||
|
|
||||||
).then(res => {
|
).then(res => {
|
||||||
if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
const pagination = {...this.state.pagination};
|
const pagination = {...this.state.pagination};
|
||||||
@ -145,7 +145,8 @@ class DeviceInstall extends React.Component {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}).catch((error) => { console.log(error);
|
}).catch((error) => {
|
||||||
|
console.log(error);
|
||||||
if (error.hasOwnProperty("status") && error.response.status === 401) {
|
if (error.hasOwnProperty("status") && error.response.status === 401) {
|
||||||
//todo display a popop with error
|
//todo display a popop with error
|
||||||
message.error('You are not logged in');
|
message.error('You are not logged in');
|
||||||
@ -216,7 +217,8 @@ class DeviceInstall extends React.Component {
|
|||||||
scroll={{x: 1000}}
|
scroll={{x: 1000}}
|
||||||
/>
|
/>
|
||||||
<div style={{paddingTop: 10, textAlign: "right"}}>
|
<div style={{paddingTop: 10, textAlign: "right"}}>
|
||||||
<Button disabled={selectedRows.length===0} htmlType="button" type="primary" onClick={this.install}>
|
<Button disabled={selectedRows.length === 0} htmlType="button" type="primary"
|
||||||
|
onClick={this.install}>
|
||||||
Install
|
Install
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user