Plugin for Mibew, get statement based on the availability of operators.
Go to file
2017-03-29 10:37:51 +03:00
Controller add group support and fix #8 2017-03-25 20:36:47 +08:00
.gitignore add gulp support, fix #6 2017-03-20 23:24:24 +08:00
gulpfile.js Change name for release archives 2017-03-21 15:15:04 +03:00
LICENSE Initial commit 2016-10-16 11:21:04 +08:00
package.json Bump version 2017-03-29 10:37:51 +03:00
Plugin.php Bump version 2017-03-29 10:37:51 +03:00
README.md add group support document 2017-03-25 20:40:30 +08:00
routing.yml add group support and fix #8 2017-03-25 20:36:47 +08:00

Mibew Operator Status plugin

Plugin for Mibew, get statement based on the availability of operators.

Useage

  1. Get any operators online status:

    • request URL: <MIBEW-BASE-URL>/opstatus.
    • return true when any operators is online and false when not.
  2. Get any operators online status in specificed group:

    • request URL: <MIBEW-BASE-URL>/opstatus/group/<GROUP-ID>.
    • return true when any operators in this group is online and false when not.
  3. Get an operator online status by operator code:

    • Request URL: <MIBEW-BASE-URL>/opstatus/<OPERATOR-CODE>.
    • return true when operator is online or false when not.
  4. Use callback parameter:

    Just inset <script> tag and set src to URL above and add callback parameter

    • <MIBEW-BASE-URL>/opstatus?callback=<CALLBACK_FUNCTION>
    • <MIBEW-BASE-URL>/opstatus/<OPERATOR-CODE>?callback=<CALLBACK_FUNCTION>

    will return bellow and run CALLBACK_FUNCTION automatically.

    /**/CALLBACK_FUNCTION(status);
    

Install

  1. Get the archive with the plugin sources. You can download it from the official site or build the plugin from sources.

  2. Untar/unzip the plugin's archive.

  3. Put files of the plugins to the <MIBEW-ROOT>/plugins folder.

  4. Navigate to <MIBEW-BASE-URL>/operator/plugin page and enable the plugin.

Tips: if you plugin state is "not initialized", please check <MIBEW-ROOT>/configs/config.yml file is not:

...
plugins: []
...

and should be like this:

...
plugins:
    "SomePlugin":
        key: value
...

Build from sources

  1. Obtain a copy of the repository using git clone, download button, or another way.
  2. Install node.js and npm.
  3. Install Gulp.
  4. Install npm dependencies using npm install.
  5. Run Gulp to build the sources using gulp default.

Finally .tar.gz and .zip archives of the ready-to-use Plugin will be available in release directory.

License

MIT