COREmanager Documentation

Progress bar

A progress bar is a graphical control element used to visualize the progression of extended operations. The operation is divided into steps and is accompanied by a textual representation.

To implement a progress bar, add the progressid parameter to the call. You should generate the parameter's value yourself. It should be unique for the session and may contain digits and/or letters (we recommend timestamp).

Call the progress.get function with the elid parameter set to progressid.

The following XML will be returned:

XML:

<doc ...>
  <action>product.install</action>
  <start>1376013950</start>
  <last>1376013971</last>
  <now>1376013974</now>
  <steps>6</steps>
  <done>4</done>
  <comment>Uploading package list</comment>
  <tparams>
    ...
  </tparams>
</doc>

To calculate percents, use values of the steps (total number of steps) and done (number of steps completed) elements. A comment is taken from the comment element.

The start element indicates the time when the operation started, last — when the previous step was completed, now — current request time.

The function progress.set is used to display progress.

Parameters:

  • elid is a mandatory parameter. Corresponds to the authid:progressid value, for example: 7d1d70ae434b1c55f0323921:12312322, where 7d1d70ae434b1c55f0323921 is authid, 12312322 is progressid;
  • authid — client session id (value of billmgrses5 parameter in client's cookies);
  • progressid — progress id exposed (comes as a parameter if the progress=yes attribute is set for the form);
  • steps — adds n number of steps to be passed;
  • done — adds the specified value to done. When done == steps, progress is considered completed;
  • msg — comment to be displayed.