Beispiel #1
0
    def state(self):
        """Return the cluster view state, with the current sort and selection."""

        b = Barrier()
        self.get_current_sort(b('current_sort'))
        self.get_selected(b('selected'))
        b.wait()

        current_sort = tuple(b.result('current_sort')[0][0] or (None, None))
        selected = b.result('selected')[0][0]

        return {
            'current_sort': current_sort,
            'selected': selected,
        }
Beispiel #2
0
 def shown_cluster_ids(self):
     """The sorted list of cluster ids as they are currently shown in the cluster view."""
     b = Barrier()
     self.cluster_view.get_ids(callback=b(1))
     b.wait()
     return b.result(1)[0][0]