use of cz.metacentrum.perun.webgui.model.TaskResult in project perun by CESNET.
the class GetRichTaskResultsByTask method setList.
public void setList(ArrayList<TaskResult> list) {
clearTable();
this.list.addAll(list);
for (TaskResult r : list) {
oracle.add(r.getDestination().getDestination());
}
dataProvider.flush();
dataProvider.refresh();
}
use of cz.metacentrum.perun.webgui.model.TaskResult in project perun by CESNET.
the class GetRichTaskResultsByTask method filterTable.
@Override
public void filterTable(String filter) {
// store list only for first time
if (fullBackup.isEmpty() || fullBackup == null) {
fullBackup.addAll(list);
}
// always clear selected items
selectionModel.clear();
list.clear();
if (filter.equalsIgnoreCase("")) {
list.addAll(fullBackup);
} else {
for (TaskResult result : fullBackup) {
if (result.getDestination().getDestination().toLowerCase().startsWith(filter)) {
list.add(result);
}
}
}
dataProvider.flush();
dataProvider.refresh();
loaderImage.loadingFinished();
}
use of cz.metacentrum.perun.webgui.model.TaskResult in project perun by CESNET.
the class TaskResultsTabItem method draw.
public Widget draw() {
this.titleWidget.setText("Tasks results: " + task.getExecService().getService().getName() + " " + task.getExecService().getType());
VerticalPanel vp = new VerticalPanel();
vp.setSize("100%", "100%");
final GetRichTaskResultsByTask callback = new GetRichTaskResultsByTask(task.getId());
TabMenu menu = new TabMenu();
menu.addWidget(UiElements.getRefreshButton(this));
menu.addFilterWidget(new ExtendedSuggestBox(callback.getOracle()), new PerunSearchEvent() {
@Override
public void searchFor(String text) {
callback.filterTable(text);
}
}, "Filter results by destination");
CellTable<TaskResult> table = callback.getTable();
table.addStyleName("perun-table");
ScrollPanel sp = new ScrollPanel(table);
sp.addStyleName("perun-tableScrollPanel");
vp.add(menu);
vp.setCellHeight(menu, "30px");
vp.add(sp);
session.getUiElements().resizePerunTable(sp, 350, this);
this.contentWidget.setWidget(vp);
return getWidget();
}
Aggregations