indication component is in working process

59 views
Skip to first unread message

rashid abdullah

unread,
Jan 20, 2015, 3:30:28 AM1/20/15
to flow-based-...@googlegroups.com
i have create a noflo-ui project my custom components processing big data so it take some time 
when user run the graph nothing here to indicate to user graph is in working process play button is also shows status finished
so how can i change component image while input receive and outport disconnect.

like when input receive icon image should change as in-process-icon
and when process complete and outport is disconnected then component icon back to original icon

i this way user will be aware graph is still in process  

thanks

Henri Bergius

unread,
Jan 20, 2015, 9:09:33 AM1/20/15
to flow-based-...@googlegroups.com
Hi!

The easy way to accomplish this is to immediately call outport.connect() when you start processing data. This is a great way to tell the downstream network that "there will eventually be information packets coming your way", and it has the side effect of informing NoFlo Network about the same :-)

/Henri

PS. Vladimir, maybe we should make this a default WirePattern behavior?

--
You received this message because you are subscribed to the Google Groups "Flow Based Programming" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flow-based-progra...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Henri Bergius

unread,
Jan 20, 2015, 10:10:00 AM1/20/15
to flow-based-...@googlegroups.com
Hi,

Regarding changing component icons in runtime, this is indeed possible using the "setIcon" method of noflo.Component.

See an example in interaction/ListenMouse: https://github.com/noflo/noflo-interaction/blob/master/components/ListenMouse.coffee#L45
(we change the icon temporarily to show that the component has noticed a mouse event)


To unsubscribe from this group and stop receiving emails from it, send an email to flow-based-programming+unsub...@googlegroups.com.

Jon Nordby

unread,
Jan 20, 2015, 12:41:07 PM1/20/15
to flow-based-...@googlegroups.com

It might also be smart to have a "progress" outport, which is periodically updated. That way you can have an UI for it also outside Flowhub (when you have a deployed app).
To unsubscribe from this group and stop receiving emails from it, send an email to flow-based-programming+unsubscri...@googlegroups.com.

rashid abdullah

unread,
Jan 22, 2015, 2:26:11 AM1/22/15
to flow-based-...@googlegroups.com
hi 
thanks henri

outport.connect() is working 

now till graph finished play button remain status running its good to see now 

but change icon i cant see any reaction at your suggested component https://github.com/noflo/noflo-interaction/blob/master/components/ListenMouse.coffee#L45

i have made a little example to share https://app.flowhub.io/#example/9a7e18f82e998e209e31 

am i did something wrong in this 

i have also follow this doc http://noflojs.org/documentation/components/#listing_6 but no success 

thanks
 
Rashid

To unsubscribe from this group and stop receiving emails from it, send an email to flow-based-programming+unsubscri...@googlegroups.com.

Chad Dombrova

unread,
Jan 25, 2015, 4:31:36 PM1/25/15
to flow-based-...@googlegroups.com
I'm interested in this feature as well.  It would be great if noflo-ui automatically provided a visual cue for components which are "in progress".   

While the setIcon solution might be a good temporary workaround (if it works, still waiting on an answer to Rashid), I think that delegating this task to components is not a good long term solution:  different UIs may want to convey this information in ways that are more subtle and appealing than icon swapping, like changing the node's border color, or adding a background glow.  It seems to me that this lies clearly in the UI domain.

-chad


Alfredo Sistema

unread,
Jan 25, 2015, 7:08:11 PM1/25/15
to flow-based-...@googlegroups.com
Theoretically all processes are working all the time from the designer
perspective, if you want visual cues you could plug a component that
displays some info connected to a STATUS outport from the component.
That would be the FBP solution to the problem. What this means is if
the graph is a noflo graph, seticon could be used or changing some
html element to display the status. If it were a console javaFBP
application it could be a log or whatever mechanism to change a
status.
> --
> You received this message because you are subscribed to the Google Groups
> "Flow Based Programming" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to flow-based-progra...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages