mirror of
				https://github.com/Mibew/mibew-operator-status-plugin.git
				synced 2025-10-31 18:31:05 +03:00 
			
		
		
		
	
		
			
				
	
	
		
			59 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			Markdown
		
	
	
	
	
	
			
		
		
	
	
			59 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			Markdown
		
	
	
	
	
	
| # 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 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.
 | |
| 
 | |
| 3. 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.
 | |
| 
 | |
|     ```javascript
 | |
|     /**/CALLBACK_FUNCTION(status);
 | |
|     ```
 | |
| 
 | |
| # Install
 | |
| 
 | |
| 1. Get the archive with the plugin sources from [release page](https://github.com/everyx/mibew-operator-status-plugin/releases):
 | |
| 
 | |
| 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:
 | |
| 
 | |
| ```yml
 | |
| ...
 | |
| plugins: []
 | |
| ...
 | |
| ```
 | |
| and should be like this:
 | |
| 
 | |
| ```yml
 | |
| ...
 | |
| plugins:
 | |
|     "SomePlugin":
 | |
|         key: value
 | |
| ...
 | |
| ```
 | |
| 
 | |
| # License
 | |
| 
 | |
| [MIT](LICENSE)
 |