diff --git a/README.md b/README.md index 55e2b30..d78f63c 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,42 @@ # mibew-operator-status-plugin Plugin for Mibew, get statement based on the availability of operators. + +# Useage + +Request `/opstatus?code=`, your will get `true` when operator +is online or `false` when operator is offline. + +# Install + +1. Get the archive with the plugin sources from link bellow: + + * [mibew-operator-status-plugin.tar.gz](archive/mibew-operator-status-plugin.tar.gz) + + * [mibew-operator-status-plugin.zip](archive/mibew-operator-status-plugin.zip) + +2. Untar/unzip the plugin's archive. + +3. Put files of the plugins to the `/plugins` folder. + +4. Navigate to `/operator/plugin` page and enable the plugin. + +**Tips**: if you plugin state is "not initialized", please check `/configs/config.yml` file is not: + +```yml +... +plugins: [] +... +``` +and should be like this: + +```yml +... +plugins: + "SomePlugin": + key: value +... +``` + +# License + +[MIT](LICENSE) diff --git a/archive/mibew-operator-status-plugin.tar.gz b/archive/mibew-operator-status-plugin.tar.gz new file mode 100644 index 0000000..4cd487d Binary files /dev/null and b/archive/mibew-operator-status-plugin.tar.gz differ diff --git a/archive/mibew-operator-status-plugin.zip b/archive/mibew-operator-status-plugin.zip new file mode 100644 index 0000000..0706fc5 Binary files /dev/null and b/archive/mibew-operator-status-plugin.zip differ diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..189a850 --- /dev/null +++ b/build.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +plugin_root_dir='Everyx' +plugin_target_dir="$plugin_root_dir/Mibew/Plugin/OperatorStatus" +mkdir -p $plugin_target_dir +cp -R src/* $plugin_target_dir +tar -czvf archive/mibew-operator-status-plugin.tar.gz $plugin_root_dir +zip -r archive/mibew-operator-status-plugin.zip $plugin_root_dir +rm -rf $plugin_root_dir diff --git a/Controller/OperatorStatusController.php b/src/Controller/OperatorStatusController.php similarity index 100% rename from Controller/OperatorStatusController.php rename to src/Controller/OperatorStatusController.php diff --git a/Plugin.php b/src/Plugin.php similarity index 100% rename from Plugin.php rename to src/Plugin.php diff --git a/composer.json b/src/composer.json similarity index 100% rename from composer.json rename to src/composer.json diff --git a/routing.yml b/src/routing.yml similarity index 100% rename from routing.yml rename to src/routing.yml