[Paraview] Starting ParaViewWeb from a web application

Sebastien Jourdain sebastien.jourdain at kitware.com
Thu Oct 24 12:33:57 EDT 2013


The reason for that is that the live article assume that in the --data-dir
you have a can.ex2 file as well as the other one. And for you, you didn't
share the ParaViewData dir.

Seb


On Thu, Oct 24, 2013 at 9:54 AM, Pawel Kwiecien <noremy at gmail.com> wrote:

> Hi Seb,
> I'm experimenting with ParaViewWeb based on the example apps that are
> provided with a source code.
> However, LiveArticles are not working properly for me. The problem is the
> rendered scene is always black, it doesn't render any element, even if I
> specify a parameter in url like:
> http://localhost:9000/apps/LiveArticles/embed.html?can.ex2 (or when
> iframe is called with src="embed.html?data=can.ex2"). File itself exists.
>
> It seems that there's a problem with following lines (render() is never
> called) in embed.html of LiveArticles:
>
>  var filePath= getParameter("data");
>   if (filePath !== "") {
>
> pv.connection.session.call("pv:openFileFromPath", filePath).then(
>                             function(reply){pv.viewport.render();});
>                         }
>
> Could you have a look at it and tell me how to render a file specified as
> url's parameter?
>
> Thanks again!
> Pawel
>
>
> On 21 October 2013 11:33, Sebastien Jourdain <
> sebastien.jourdain at kitware.com> wrote:
>
>> Hi Pawel,
>>
>> I think for 1) you put a data-dir that contains too much files hence a
>> complain about a text message too large.
>>
>> For 2, you can change to command line with an argument that contain the
>> file to load instead of a directory.
>>
>> Seb
>>
>>
>> On Sun, Oct 20, 2013 at 9:27 PM, Pawel Kwiecien <noremy at gmail.com> wrote:
>>
>>> Hi Seb,
>>> thanks for your help, I can run now ParaViewWeb with Jetty Session
>>> Manager. However, once again I have two questions:
>>> 1) With Jetty Session Manager I can run properly run LiveArticles
>>> example in the browser. However, when I try to start WebVisualizer I get
>>> the following error in the command line:
>>> 2013-10-20 23:06:50.607:WARN:oejw.WebSocketConnectionRFC6455:Text
>>> message too large > 2097152 chars for SCEP at 5e2b2b16{l(localhost/
>>> 127.0.0.1:9100)<->r(/127.0.0.1:52037),d=true,open=true,ishut=false,oshut=false,rb=false,wb=false,w=true,i=1r}-{WebSocketClientConnection
>>> p=WebSocketParserRFC6455 at 5961d5f7 state=DATA buffer=
>>> g=WebSocketGeneratorRFC6455 at 262678f9 closed=false buffer=-1}
>>>
>>> Do you know how to solve it and how to run WebVisualizer app?
>>>
>>> 2) When I start a web-server locally (not with jetty session, simply as
>>> described here: http://www.paraview.org/Wiki/ParaViewWeb) I can enter
>>> WebVisualizer example. In the deafult WebVisualizer app, there's a this
>>> control panel on the left hand side where all data files are listed. After
>>> selecting e.g. RectGrid2.vtk, it's loaded into viewport-container. I would
>>> like to automatically render a specific file, e.g. RectGrid2.vtk, when I
>>> enter WebVisualizer.
>>> I can't find in the code respective method that is responsible for that.
>>> Can you guide me how to load a specific file into viewport-container from
>>> the code?
>>>
>>> Thanks!
>>> Pawel
>>>
>>>
>>>
>>> On 16 October 2013 11:42, Sebastien Jourdain <
>>> sebastien.jourdain at kitware.com> wrote:
>>>
>>>> Hi Pawel,
>>>>
>>>> if you run "java -jar JettySessionManager-Server-1.0.jar" with no
>>>> argument you should see what the configuration file should be. I guess, you
>>>> may need to provide a valid pw.factory.proxy.adapter as well as a
>>>> valid path for the creation of a file for pw.factory.proxy.adapter.
>>>> file.
>>>>
>>>> It is true, that those options should not be mandatory.
>>>>
>>>> Seb
>>>>
>>>>
>>>> On Tue, Oct 15, 2013 at 7:09 PM, Pawel Kwiecien <noremy at gmail.com>wrote:
>>>>
>>>>> Hi Seb,
>>>>> thank you for your previous answer. So I'm trying to follow the steps
>>>>> from
>>>>> http://www.paraview.org/ParaView3/Doc/Nightly/www/js-doc/index.html#!/guide/jetty_session_manager
>>>>>
>>>>> However, I'm having problems with a jetty configuration file, namely:
>>>>> 1)
>>>>>
>>>>>
>>>>> # Process command: pipeline_manager.py | pipeline# ==================================================
>>>>> pw.pipeline.cmd=./bin/pvpython ../src/Web/Python/pipeline_manager.py --data-dir /Data --port PORT
>>>>> pw.pipeline.cmd.run.dir=/.../paraview-build/
>>>>> pw.pipeline.cmd.map=PORT:getPort
>>>>>
>>>>> In the latest src there's no pipeline_manager.py. I've seen that it
>>>>> was renamed to pv_web_visualizer.py, but I only have it in build folder
>>>>> (not in src), so these lines look in my case:
>>>>>
>>>>>
>>>>> # ==================================================# Process command: web_visualizer# ==================================================
>>>>> pw.visualizer.cmd=./bin/pvpython ./lib/site-packages/paraview/web/pv_web_visualizer.py --data-dir /Data --port PORT
>>>>> pw.visualizer.cmd.run.dir=/.../paraview-build/
>>>>> pw.visualizer.cmd.map=PORT:getPort
>>>>>
>>>>> Is that right?
>>>>>
>>>>> 2) When I start jetty session manager with a command: java -jar
>>>>> JettySessionManager-Server-1.0.jar config.properties I get the following
>>>>> output:
>>>>>
>>>>> ==== Starting ParaViewWeb multi-user front-end ====
>>>>> Configuration: PATH/config.properties
>>>>> WebContent: PATH/build/www
>>>>> Port: 9000
>>>>> ===================================================
>>>>>
>>>>>
>>>>> Oct 15, 2013 8:49:05 PM com.kitware.paraviewweb.util.Config
>>>>> getProxyConnectionAdapter
>>>>> INFO: No class defined for ProxyConnectionAdapter
>>>>> 2013-10-15 20:49:05.914:INFO:oejs.Server:jetty-8.y.z-SNAPSHOT
>>>>> 2013-10-15 20:49:06.296:INFO:oejs.AbstractConnector:Started
>>>>> SelectChannelConnector at 0.0.0.0:9000
>>>>>
>>>>> I'm getting a message: No class defined for ProxyConnectionAdapter
>>>>> cause I have left blank two lines in the config file
>>>>> (pw.factory.proxy.adapter= and pw.factory.proxy.adapter.file=). Even when I
>>>>> specify pw.factory.proxy.adapter =
>>>>> com.kitware.paraviewweb.external.JsonFileProxyConnectionAdapter, I
>>>>> still get same message.
>>>>>
>>>>> So how should pw.factory.proxy.adapter and pw.factory.proxy.adapter.file
>>>>> be specified?
>>>>>
>>>>> Thank you in advance!
>>>>> Pawel
>>>>>
>>>>>
>>>>>
>>>>> On 4 October 2013 19:45, Sebastien Jourdain <
>>>>> sebastien.jourdain at kitware.com> wrote:
>>>>>
>>>>>> Hi Pawel,
>>>>>>
>>>>>> yes it is possible, one way to do that is to use a Session Manager
>>>>>> like the following one. But you can build your own if need be.
>>>>>>
>>>>>> Seb
>>>>>>
>>>>>>
>>>>>> http://www.paraview.org/ParaView3/Doc/Nightly/www/js-doc/index.html#!/guide/jetty_session_manager
>>>>>>
>>>>>>
>>>>>> On Thu, Oct 3, 2013 at 8:53 AM, Pawel Kwiecien <noremy at gmail.com>wrote:
>>>>>>
>>>>>>> Hi all,
>>>>>>> I'm exploring ParaViewWeb included in ParaView 4.0. As described in
>>>>>>> the documentation (http://www.paraview.org/Wiki/ParaViewWeb), I can
>>>>>>> run it locally like that
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> ./bin/pvpython lib/site-packages/paraview/web/pv_web_visualizer.py
>>>>>>> --content www --port 8080 --data-dir $PARAVIEW_DATA
>>>>>>>
>>>>>>> My question would be: how to embed ParaViewWeb in my web
>>>>>>> application? Is it possible to start pvpython dynamically?
>>>>>>>
>>>>>>> As an example, user clicks a button and a ParaView visualization
>>>>>>> should be loaded.
>>>>>>>
>>>>>>> Thank you very much in advance for your help.
>>>>>>>
>>>>>>> All the best,
>>>>>>> Pawel
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Powered by www.kitware.com
>>>>>>>
>>>>>>> Visit other Kitware open-source projects at
>>>>>>> http://www.kitware.com/opensource/opensource.html
>>>>>>>
>>>>>>> Please keep messages on-topic and check the ParaView Wiki at:
>>>>>>> http://paraview.org/Wiki/ParaView
>>>>>>>
>>>>>>> Follow this link to subscribe/unsubscribe:
>>>>>>> http://www.paraview.org/mailman/listinfo/paraview
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20131024/94732184/attachment-0001.htm>


More information about the ParaView mailing list