IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an email to s dot adaszewski at gmail dot com. User accounts are meant only to report issues and/or generate pull requests. This is a purpose-specific Git hosting for ADARED projects. Thank you for your understanding!
소스 검색

Made the process dashboard lazy.

master
부모
커밋
5078d35f5b
2개의 변경된 파일16개의 추가작업 그리고 5개의 파일을 삭제
  1. +15
    -4
      frontend/src/js/component/wb-process-dashboard.js
  2. +1
    -1
      frontend/src/js/page/wb-process-view.js

+ 15
- 4
frontend/src/js/component/wb-process-dashboard.js 파일 보기

@@ -117,21 +117,32 @@ class WBProcessDashboard extends Component {
}
componentDidMount() {
this.fetchData();
if (!this.props.lazy)
this.fetchData();
}
componentWillReceiveProps(nextProps) {
if (nextProps.parentProcessUuid === this.props.parentProcessUuid)
return;
if (this.props.lazy) {
this.setState({ rows: Array(5).fill(Array(6).fill('-')) });
return;
}
this.props = nextProps;
this.fetchData();
}
render({}, { rows }) {
render({ lazy }, { rows }) {
return (
<WBTable columns={ [ 'State', 'Pending', 'Running', 'Complete', 'Failed', 'Cancelled' ] }
rows={ rows } verticalHeader={ true } />
<div>
<WBTable columns={ [ 'State', 'Pending', 'Running', 'Complete', 'Failed', 'Cancelled' ] }
rows={ rows } verticalHeader={ true } />
{ lazy ? (
<a href="#" onclick={ e => { e.preventDefault(); this.fetchData(); } }>Refresh</a>
) : null }
</div>
);
}
}


+ 1
- 1
frontend/src/js/page/wb-process-view.js 파일 보기

@@ -64,7 +64,7 @@ class WBProcessView extends Component {
</div>
<h2>Children Dashboard</h2>
<WBProcessDashboard app={ app } parentProcessUuid={ uuid } />
<WBProcessDashboard app={ app } parentProcessUuid={ uuid } lazy={ true } />
<h2>Common Fields</h2>
<WBCommonFields app={ app } uuid={ uuid } />


불러오는 중...
취소
저장