Webix Jet - "status" helper

Hi,

is there a demo for the usage of the status helper of Webix Jet?
What is the purpose of that helper?

Thanks,
Martin

The helper is used to inform a user about the current state of the current/last HTTP-request.

There are three types of statuses:

  • “good” - informs about successful completion of an operation;
  • “error” - notifies that some server error occurred;
  • “saving” - informs that data saving is proceeding at the moment.

The default status will be displayed as an icon that will change according to the current status.

How to implement:

//app.js
define( 
    "libs/webix-mvc-core/helpers/status"
],function(status){
    // after the description of the app configuration
    app.use(status);
});

Then in the configuration of the view of the app’s toolbar, or in any other view’s configuration where you want the status to be displayed, place the call of the status.box() method:

//top.js
define(["helpers/status"], function(status){    
    return {
        $ui:{
            view:"toolbar", cols:[
                { view:"label", label:"My Application"},
				status.box() // the call of the status
            ]
        }
    }
}

Status helper monitors all ajax operations, and shows the status to the user ( “Saved” or “Error” )

It can be used as a simple solution to verify that app works correctly and inform end users if server side has some problems.

Wow, that’s great!
Even if there is probably a bug – I have to take out the “locale” thing in the status.js as otherwise my app does’t load…

Thank you very much for this!

Hi,

is there a way to combine a progress bar with the status-helper?
I would like to add a progress bar to the view which loads the data in question, but cannot find a way to detect this view in the status helper…

Thanks,
Martin

I don’t think that it possible to link the progress to the specific UI
In many cases ajax operation may not have a related UI at all if you are using DataCollections or direct Ajax calls

You can attach progress to the top level layout, though. So it will look as progress for the whole app.

If you need to add a progress for some UI component, for example for all datatables, just add a code like next in the app.js

webix.protoUI({
   name:"datatableA",
}, webix.ProgressBar, webix.ui.datatable)

and use view:“datatableA” instead of view:“datatable”. All widgets extended with ProgressBar will show a progress for data loading operations.

Hi,

I would like to use the status (and the user) plugin with the new jet version1.0, but I cannot find any samples.

Are there any?

Thanks,
Martin