Skip to content

Commit

Permalink
API Browser version 1.0.9, API client class version 1.0.13
Browse files Browse the repository at this point in the history
- API Browser: added list_admins endpoint
- API client class: added adopt_device() function/method to adopt a
device (access point, switch or router), contributed by nelsencd
- API client class: added delete_site() function/method to delete a site
- API client class: added list_admins() function/method to list the
administrators for the current site
- API client class: added led_override() function/method to toggle LED
mode for individual devices
- minor code cleanup
  • Loading branch information
malle-pietje committed Feb 6, 2017
1 parent 70f982d commit 9b8fdc7
Show file tree
Hide file tree
Showing 3 changed files with 387 additions and 221 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ The UniFi API browser tool offers the following features:
- Configuration
- list sites on this controller
- list site settings
- list admins for current site
- sysinfo
- self
- wlan config
Expand Down
13 changes: 9 additions & 4 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* the currently supported data collections/API endpoints in the README.md file
* - this tool currently supports versions 4.x and 5.x of the UniFi Controller software
*
* VERSION: 1.0.8
* VERSION: 1.0.9
*
* ------------------------------------------------------------------------------------
*
Expand All @@ -20,7 +20,7 @@
* with this package in the file LICENSE.md
*
*/
define('API_BROWSER_VERSION', '1.0.8');
define('API_BROWSER_VERSION', '1.0.9');

/**
* in order to use the PHP $_SESSION array for temporary storage of variables, session_start() is required
Expand Down Expand Up @@ -57,7 +57,7 @@
$objects_count = '';
$alert_message = '';
$cookietimeout = '1800';
$debug = FALSE;
$debug = false;
$detected_controller_version = '';

/**
Expand Down Expand Up @@ -401,6 +401,10 @@
$selection = 'all site stats';
$data = $unifidata->stat_sites();
break;
case 'list_admins':
$selection = 'list_admins';
$data = $unifidata->list_admins();
break;
default:
break;
}
Expand Down Expand Up @@ -669,6 +673,7 @@ function sites_sort($a, $b)
<li id="list_self"><a href="?action=list_self">self</a></li>
<li role="separator" class="divider"></li>
<li id="list_settings"><a href="?action=list_settings">list site settings</a></li>
<li id="list_settings"><a href="?action=list_admins">list admins for current site</a></li>
<li role="separator" class="divider"></li>
<li id="list_wlanconf"><a href="?action=list_wlanconf">list wlan configuration</a></li>
<li role="separator" class="divider"></li>
Expand Down Expand Up @@ -718,7 +723,7 @@ function sites_sort($a, $b)
<li id="united"><a href="?theme=united">United</a></li>
<li id="yeti"><a href="?theme=yeti">Yeti</a></li>
<li role="separator" class="divider"></li>
<li id="reset_session" data-toggle="tooltip" data-placement="top" data-original-title="In some cases this will fix login errors (empty sites list)"><a href="?reset_session=true"><i class="fa fa-refresh"></i> Reset PHP session</a></li>
<li id="reset_session" data-toggle="tooltip" data-placement="top" data-original-title="In some cases this will fix login errors (e.g. empty sites list)"><a href="?reset_session=true"><i class="fa fa-refresh"></i> Reset PHP session</a></li>
<li role="separator" class="divider"></li>
<li id="info" data-toggle="modal" data-target="#aboutModal"><a href="#"><i class="fa fa-info-circle"></i> About UniFi API Browser</a></li>
</ul>
Expand Down
Loading

0 comments on commit 9b8fdc7

Please sign in to comment.