Skip to content

Commit

Permalink
0.7.0 rev 4720
Browse files Browse the repository at this point in the history
  • Loading branch information
nightflyza committed Sep 3, 2015
1 parent d3144cb commit be84943
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 5 deletions.
2 changes: 1 addition & 1 deletion RELEASE
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.7.0 rev 4716
0.7.0 rev 4720
58 changes: 55 additions & 3 deletions api/libs/api.pon.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,59 @@

class PONizer {

/**
* All available ONU devices
*
* @var array
*/
protected $allOnu = array();
/**
* OLT models data as id=>model data array
*
* @var array
*/
protected $allModelsData = array();
/**
* All available OLT devices
*
* @var array
*/
protected $allOltDevices = array();
/**
* OLT devices snmp data as id=>snmp data array
*
* @var array
*/
protected $allOltSnmp = array();
/**
* Available OLT models as id=>modelname + snmptemplate
*
* @var array
*/
protected $allOltModels = array();
/**
* Contains available SNMP templates for OLT modelids
*
* @var array
*/
protected $snmpTemplates = array();
/**
* Contains current ONU signal cache data as mac=>signal
*
* @var array
*/
protected $signalCache = array();
/**
* System alter.ini config stored as key=>value
*
* @var array
*/
protected $altCfg = array();
/**
* SNMPHelper object instance
*
* @var array
*/
protected $snmp = '';
protected $sup = '';

Expand Down Expand Up @@ -624,7 +669,7 @@ public function controls() {
* @return string
*/
public function renderOnuList() {
$columns = array('ID', 'Model', 'OLT', 'IP', 'MAC', 'Signal', 'Serial number', 'Login', 'Actions');
$columns = array('ID', 'Model', 'OLT', 'IP', 'MAC', 'Signal', 'Address', 'Real Name', 'Actions');
$result = wf_JqDtLoader($columns, '?module=ponizer&ajaxonu=true', false, 'ONU');
return ($result);
}
Expand Down Expand Up @@ -653,6 +698,9 @@ protected function loadSignalsCache() {
* @return string
*/
public function ajaxOnuData() {
$allRealnames= zb_UserGetAllRealnames();
$allAddress= zb_AddressGetFulladdresslistCached();

if ($this->altCfg['ADCOMMENTS_ENABLED']) {
$adcomments = new ADcomments('PONONU');
$adc = true;
Expand All @@ -668,11 +716,15 @@ public function ajaxOnuData() {
if (!empty($this->allOnu)) {
foreach ($this->allOnu as $io => $each) {
if (!empty($each['login'])) {
$userLink = wf_Link('?module=userprofile&username=' . $each['login'], web_profile_icon() . ' ' . $each['login'], false);
$userLink = wf_Link('?module=userprofile&username=' . $each['login'], web_profile_icon() . ' ' . @$allAddress[$each['login']], false);
$userLink = str_replace('"', '', $userLink);
$userLink = trim($userLink);
@$userRealName=$allRealnames[$each['login']];
$userRealName=str_replace('"', '', $userRealName);
$userRealName = trim($userRealName);
} else {
$userLink = '';
$userRealName='';
}
//checking adcomments availability
if ($adc) {
Expand Down Expand Up @@ -702,8 +754,8 @@ public function ajaxOnuData() {
"' . $each['ip'] . '",
"' . $each['mac'] . '",
"' . $signal . '",
"' . $each['serial'] . '",
"' . $userLink . '",
"' . $userRealName . '",
"' . $actLinks . '"
],';
}
Expand Down
2 changes: 1 addition & 1 deletion config/alter.ini
Original file line number Diff line number Diff line change
Expand Up @@ -433,4 +433,4 @@ TARIFFINFO_IN_PROFILE=0
;Is phonebook module enabled?
PHONEBOOK_ENABLED=0
;Is warehouse accounting enabled?
WAREHOUSE_ENABLED=0
WAREHOUSE_ENABLED=0
9 changes: 9 additions & 0 deletions config/globalmenu.ini
Original file line number Diff line number Diff line change
Expand Up @@ -614,6 +614,15 @@ CATEGORY=3
NEED_RIGHT=UBIM
NEED_OPTION=


[warehouse]
NAME="Warehouse"
URL="?module=warehouse"
ICON="warehouse.png"
CATEGORY=3
NEED_RIGHT=WAREHOUSE
NEED_OPTION=WAREHOUSE_ENABLED

[uhw]
NAME="UHW"
URL="?module=uhw"
Expand Down
Binary file added skins/menuicons/warehouse.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit be84943

Please sign in to comment.