mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Add loading animation to filter & lifecycle components in APPM
This commit is contained in:
parent
b5a86d8e79
commit
6c78491482
@ -123,7 +123,8 @@ class AppsTable extends React.Component {
|
|||||||
filters: {},
|
filters: {},
|
||||||
isDrawerVisible: false,
|
isDrawerVisible: false,
|
||||||
selectedApp: null,
|
selectedApp: null,
|
||||||
selectedAppIndex: -1
|
selectedAppIndex: -1,
|
||||||
|
loading: false
|
||||||
};
|
};
|
||||||
config = this.props.context;
|
config = this.props.context;
|
||||||
}
|
}
|
||||||
@ -229,7 +230,7 @@ class AppsTable extends React.Component {
|
|||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const {isDrawerVisible} = this.state;
|
const {isDrawerVisible, loading} = this.state;
|
||||||
return (
|
return (
|
||||||
<div className="apps-table">
|
<div className="apps-table">
|
||||||
<Table
|
<Table
|
||||||
@ -239,6 +240,7 @@ class AppsTable extends React.Component {
|
|||||||
pagination={this.state.pagination}
|
pagination={this.state.pagination}
|
||||||
onChange={this.handleTableChange}
|
onChange={this.handleTableChange}
|
||||||
rowClassName="app-row"
|
rowClassName="app-row"
|
||||||
|
loading={loading}
|
||||||
onRow={(record, rowIndex) => {
|
onRow={(record, rowIndex) => {
|
||||||
return {
|
return {
|
||||||
onClick: event => {
|
onClick: event => {
|
||||||
|
|||||||
@ -132,7 +132,7 @@ class LifeCycle extends React.Component {
|
|||||||
|
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const {currentStatus, selectedStatus} = this.state;
|
const {currentStatus, selectedStatus, isConfirmButtonLoading} = this.state;
|
||||||
const {lifecycle} = this.props;
|
const {lifecycle} = this.props;
|
||||||
const selectedValue = selectedStatus == null ? [] : selectedStatus;
|
const selectedValue = selectedStatus == null ? [] : selectedStatus;
|
||||||
let proceedingStates = [];
|
let proceedingStates = [];
|
||||||
@ -180,21 +180,17 @@ class LifeCycle extends React.Component {
|
|||||||
type="primary"
|
type="primary"
|
||||||
htmlType="button"
|
htmlType="button"
|
||||||
onClick={this.showReasonModal}
|
onClick={this.showReasonModal}
|
||||||
disabled={selectedStatus == null}
|
loading={isConfirmButtonLoading}
|
||||||
>
|
disabled={selectedStatus == null}>
|
||||||
Change
|
Change
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
|
|
||||||
<Divider/>
|
<Divider/>
|
||||||
|
|
||||||
<Modal
|
<Modal
|
||||||
title="Confirm changing lifecycle state"
|
title="Confirm changing lifecycle state"
|
||||||
visible={this.state.isReasonModalVisible}
|
visible={this.state.isReasonModalVisible}
|
||||||
onOk={this.addLifeCycle}
|
onOk={this.addLifeCycle}
|
||||||
onCancel={this.closeReasonModal}
|
onCancel={this.closeReasonModal}
|
||||||
okText="Confirm"
|
okText="Confirm">
|
||||||
>
|
|
||||||
<Text>
|
<Text>
|
||||||
You are going to change the lifecycle state from,<br/>
|
You are going to change the lifecycle state from,<br/>
|
||||||
<Tag color="blue">{currentStatus}</Tag>to <Tag
|
<Tag color="blue">{currentStatus}</Tag>to <Tag
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user