[ome-devel] jstree improvements

Douglas Russell douglas.russell at bioch.ox.ac.uk
Mon Jun 16 16:32:09 BST 2014


Continuing discussion on devteam:



On 16 June 2014 16:10, Chris Allan <callan at glencoesoftware.com> wrote:

> Hi Douglas,
>
> Happy to take this to ome-devel if that's useful for you.
>
> On 12 Jun 2014, at 23:57, Douglas Russell <douglas.russell at bioch.ox.ac.uk>
> wrote:
>
> > Hi Chris,
> >
> > I've just been testing your jstree improvements and it looks great. Just
> wondering if there is interest in taking this further? I've already
> extended tree.py to handle images and tags so far for the purposes of my
> customized containers_tree but also for container_subtree. If revamping
> more of the tree is desired then I can PR some/all of that work into the
> main codebase.
>
> There's definitely universal need to extend tree.py and that API to all
> uses of the tree. Especially tags. Any and all help there appreciated.
>

Ok, cool.

>
> >
> > If I do submit it, I'm unsure on if it's appropriate to build in the
> capabilities I need for my jstree integrated tagsearching directly into the
> marshalling code?
> >
> >
> https://github.com/dpwrussell/webtagging/blob/jstree_speedup_tags_as_filter/tagsearch/tree.py
> >
> > E.g.
> >
> > def marshal_images(conn, experimenter_id=None, dataset_id=None,
> tag_filter=None):
>
> I think we can discuss that on a case by case basis to be honest. What I
> don't really want to get in to is trying to be all things to all people
> with this API. If we all agree it's generally useful though all the better.
>

Agreed. One thing which I think is worth considering is powering the jstree
with JSON instead of HTML. 2 possible ways to do that.

1) Define the appropriate django views to return JSON as determined by the
jstree spec. The highest performing solution, but these views are all but
useless for anything else.
2) Convert the marshalled data to JSON and return that. These views can be
reused anywhere that these structures are useful. Downside is that the ajax
success function of the jstree ajax call will have to take this JSON and
convert it into the expected format.

As you say, (2) may be trying to be all things to all people.


> >
> > This can get and marshal all images, a filtered set of images by dataset
> and/or a filtered set of images by a number of tags.
> >
> > It's not complete as there is some stuff from manager I have yet to
> investigate; namely containers_icon, especially with relation to
> load_pixels. I don't foresee any major challenges there though.
>
> Understood.
>
> >
> > Thoughts welcome,
> >
> > Cheers,
> >
> > Douglas
>
> -Chris


Douglas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-devel/attachments/20140616/5af728fc/attachment-0001.html>


More information about the ome-devel mailing list