Search in sources :

Example 1 with TaskResult

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();
}
Also used : TaskResult(cz.metacentrum.perun.webgui.model.TaskResult)

Example 2 with TaskResult

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();
}
Also used : TaskResult(cz.metacentrum.perun.webgui.model.TaskResult)

Example 3 with TaskResult

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();
}
Also used : PerunSearchEvent(cz.metacentrum.perun.webgui.client.resources.PerunSearchEvent) ExtendedSuggestBox(cz.metacentrum.perun.webgui.widgets.ExtendedSuggestBox) TaskResult(cz.metacentrum.perun.webgui.model.TaskResult) GetRichTaskResultsByTask(cz.metacentrum.perun.webgui.json.propagationStatsReader.GetRichTaskResultsByTask) TabMenu(cz.metacentrum.perun.webgui.widgets.TabMenu)

Aggregations

TaskResult (cz.metacentrum.perun.webgui.model.TaskResult)3 PerunSearchEvent (cz.metacentrum.perun.webgui.client.resources.PerunSearchEvent)1 GetRichTaskResultsByTask (cz.metacentrum.perun.webgui.json.propagationStatsReader.GetRichTaskResultsByTask)1 ExtendedSuggestBox (cz.metacentrum.perun.webgui.widgets.ExtendedSuggestBox)1 TabMenu (cz.metacentrum.perun.webgui.widgets.TabMenu)1