Re: [webmin-devel] adding a "please wait" popup while executing time consuming commands
marty leisner <[email protected]> Wed, 21 May 2014 00:20:49 -0400
| Newsgroups | gmane.comp.web.webmin.devel |
|---|---|
| Message-ID | <CAPNO-hbVqYD_fNV_FvMtWh82nGT--EyAaE_5dCs=dMi6xT_pfw@mail.gmail.com> |
--===============6380310550686137727==
Content-Type: multipart/alternative; boundary=001a11c3ed3ea3c77504f9e154fd
--001a11c3ed3ea3c77504f9e154fd
Content-Type: text/plain; charset=UTF-8
I'm having a problem where my page is delivered on the network at the same
time -- after the delay (I used wireshark to
monitor this)
What I want tried is:
ui_print_header('please wait');
footer();
sleep(5);
print "final\n<BR>";
I would have expected to see the header render, a delay, and "final".
Its all happening after the delay.
What I really want to do is:
display "please wait"
run a long command
redirect to another page (after the command runs)
marty
On Tue, May 20, 2014 at 4:19 PM, Jamie Cameron <[email protected]> wrote:
> On 20/May/2014 09:27 marty leisner <[email protected]> wrote ..
> > When having a custom module in webmin execute time consuming commands,
> how
> > would I add a
> > "please wait" message until the command is finished (without user
> > interaction).
> >
> > I.e.:
> >
> > start_please_wait();
> > system("long_command");
> > stop_please_wait();
>
> In some modules, I've had Webmin print out a series of dots (one per
> second)
> while performing some long operation. The code is like :
>
> print "Doing something slow ..";
> launch_slow_op_in_background();
> while(!done_slow_op()) {
> sleep(1);
> print ".";
> }
> print "<br>\n";
> print ".. done<p>\n";
>
> - Jamie
>
>
> ------------------------------------------------------------------------------
> "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
> Instantly run your Selenium tests across 300+ browser/OS combos.
> Get unparalleled scalability from the best Selenium testing platform
> available
> Simple to use. Nothing to install. Get started now for free."
> http://p.sf.net/sfu/SauceLabs
> -
> Forwarded by the Webmin development list at [email protected]
> To remove yourself from this list, go to
> http://lists.sourceforge.net/lists/listinfo/webadmin-devel
>
--001a11c3ed3ea3c77504f9e154fd
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div><div><div><div>I'm having a problem where my page=
is delivered on the network at the same time -- after the delay (I used wi=
reshark to <br></div><div>monitor this)<br></div><div><br></div>What I want=
tried is:<br>
<br>ui_print_header('please wait');<br></div><div>footer();<br>slee=
p(5);<br>print "final\n<BR>";<br><br></div><div>I would hav=
e expected to see the header render, a delay, and "final".<br>
</div><div><br></div><div>Its all happening after the delay.<br><br></div><=
div>What I really want to do is:<br><br></div><div>display "please wai=
t"<br></div><div>run a long command<br></div><div>redirect to another =
page (after the command runs)<br>
<br></div><div>marty<br></div></div></div></div><div class=3D"gmail_extra">=
<br><br><div class=3D"gmail_quote">On Tue, May 20, 2014 at 4:19 PM, Jamie C=
ameron <span dir=3D"ltr"><<a href=3D"mailto:[email protected]" target=
=3D"_blank">[email protected]</a>></span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">On 20/May/2014 09:27 marty leisner <<a hr=
ef=3D"mailto:[email protected]">[email protected]</a>> wrote ..<br>
<div><div class=3D"h5">> When having a custom module in webmin execute t=
ime consuming commands, how<br>
> would I add a<br>
> "please wait" message until the command is finished (without=
user<br>
> interaction).<br>
><br>
> I.e.:<br>
><br>
> start_please_wait();<br>
> system("long_command");<br>
> stop_please_wait();<br>
<br>
</div></div>In some modules, I've had Webmin print out a series of dots=
(one per second)<br>
while performing some long operation. The code is like :<br>
<br>
print "Doing something slow ..";<br>
launch_slow_op_in_background();<br>
while(!done_slow_op()) {<br>
=C2=A0 sleep(1);<br>
=C2=A0 print ".";<br>
=C2=A0 }<br>
print "<br>\n";<br>
print ".. done<p>\n";<br>
<br>
=C2=A0- Jamie<br>
<br>
---------------------------------------------------------------------------=
---<br>
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE=
<br>
Instantly run your Selenium tests across 300+ browser/OS combos.<br>
Get unparalleled scalability from the best Selenium testing platform availa=
ble<br>
Simple to use. Nothing to install. Get started now for free."<br>
<a href=3D"http://p.sf.net/sfu/SauceLabs" target=3D"_blank">http://p.sf.net=
/sfu/SauceLabs</a><br>
-<br>
Forwarded by the Webmin development list at <a href=3D"mailto:webmin-devel@=
webmin.com">[email protected]</a><br>
To remove yourself from this list, go to<br>
<a href=3D"http://lists.sourceforge.net/lists/listinfo/webadmin-devel" targ=
et=3D"_blank">http://lists.sourceforge.net/lists/listinfo/webadmin-devel</a=
><br>
</blockquote></div><br></div>
--001a11c3ed3ea3c77504f9e154fd--
--===============6380310550686137727==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
--===============6380310550686137727==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
-
Forwarded by the Webmin development list at [email protected]
To remove yourself from this list, go to
http://lists.sourceforge.net/lists/listinfo/webadmin-devel
--===============6380310550686137727==--