Options

Is it possible to implement any kind of loader in the View of a RM Server Web app?

Christos_KarapapasChristos_Karapapas Member Posts: 25 Contributor II
edited December 2019 in Help
I would like to implement some kind of loader for a View of a Web app, since my initialization process runs for a dozen of seconds.

I know this is quite a broad question so I will try to narrow it down a bit.

I know that it would probable be quite difficult to implement something that would display a percentage of the process that has run already.

So I'm thinking either something to display when each subprocess of the initialization has finished, or a more generic spinner that would stop when the whole initialization is done.
Tagged:

Answers

  • Options
    IngoRMIngoRM Administrator, Moderator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert, Community Manager, RMResearcher, Member, University Professor Posts: 1,751 RM Founder
    Hi, not sure if this is possible but I thought I throw out the idea: can you switch a view at the end of the init process somehow?  Then you could start with a "waiting view" first showing nothing but a spinning gif and at the end of the process switch over to the view you actually want to see. Maybe worth a try...
  • Options
    BalazsBaranyBalazsBarany Administrator, Moderator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert Posts: 955 Unicorn
    Hi,

    both "Visualization" and "User input" have a tab for setting up interactions. These refer to user actions, unfortunately. I see how a process could set a macro (referenced by a variable in the web app) but I don't see how this would submit the user input in order to execute the interaction effect.

    My best guess is using some HTML and JavaScript to display the spinner in a panel, and hiding it when the loading is done (e. g. some table has rows). 

    Regards,
    Balázs
  • Options
    Christos_KarapapasChristos_Karapapas Member Posts: 25 Contributor II
    edited December 2019
    @IngoRM Hello and sorry for my late response! Thank you that is a nice idea!
    Ok I found how to switch from one view to another, right after initializing a process, but how do I switch back after the process is done?

    @BalazsBarany Thank you, also a nice idea! 
    I can see how to write CSS but I can't see how to write HTML or JS
     
  • Options
    BalazsBaranyBalazsBarany Administrator, Moderator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert Posts: 955 Unicorn
    Hi,

    adding a "Text Component" enables adding arbitrary HTML to your web app. This can also include JavaScript. (You can switch off "Use graphical editor".)

    Regards,
    Balázs
  • Options
    Edin_KlapicEdin_Klapic Moderator, Employee, RMResearcher, Member Posts: 299 RM Data Scientist
    To my knowledge, in order to achieve that you would need to remove the entry for "Initialization process" in the tab General.
    There is no hook or interaction possible there.

    For your problem there also other approaches:
    1. Did you already identify the things which take a long execution time?
    2. Check if you can outsource longer running parts from the init process (e.g. Processes where the result is only needed in later views and thus might be loaded when you switch to that view)
    If this does not help, there is a workaround but that takes some effort.
    As Ingo mentioned you would create a blank view which only displays the intermediate loading statuses and eventually navigates to the first page of your App.

    Let me know if you want to go that road and I will try to prepare something.

    Happy Mining,
    Edin




Sign In or Register to comment.