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!
Quellcode durchsuchen

Made the process dashboard lazy.

pull/1/head
Stanislaw Adaszewski vor 4 Jahren
Ursprung
Commit
5078d35f5b
2 geänderte Dateien mit 16 neuen und 5 gelöschten Zeilen
  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 Datei anzeigen

@@ -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 Datei anzeigen

@@ -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 } />


Laden…
Abbrechen
Speichern