\PluginFusioninventoryNetworkPortLog

Manage the history of network port changes.

Summary

Methods
Properties
Constants
getTabNameForItem()
displayTabContentForItem()
insertConnection()
showForm()
cronCleannetworkportlogs()
networkport_addLog()
addLogConnection()
showHistory()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

getTabNameForItem()

getTabNameForItem(object  $item, integer  $withtemplate) : string

Get the tab name used for item

Parameters

object $item

the item object

integer $withtemplate

1 if is a template form

Returns

string —

name of the tab

displayTabContentForItem()

displayTabContentForItem(object  $item, integer  $tabnum = 1, integer  $withtemplate) : boolean

Display the content of the tab

Parameters

object $item
integer $tabnum

number of the tab to display

integer $withtemplate

1 if is a template form

Returns

boolean

insertConnection()

insertConnection(string  $status, array  $array) 

Insert port history with connection and disconnection

Parameters

string $status

status of port ('make' or 'remove')

array $array

with values : $array["networkports_id"], $array["value"], $array["itemtype"] and $array["device_ID"]

showForm()

showForm(integer  $id, array  $options = array()) : true

Display form

Parameters

integer $id
array $options

Returns

true

cronCleannetworkportlogs()

cronCleannetworkportlogs() 

Cron task: clean networkport logs too old

networkport_addLog()

networkport_addLog(integer  $port_id, string  $value_new, string  $field) 

Add log of networkport

Parameters

integer $port_id
string $value_new
string $field

addLogConnection()

addLogConnection(string  $status, integer  $ports_id) 

Add log when connect or disconnect

Parameters

string $status

values possible: make|remove

integer $ports_id

showHistory()

showHistory(integer  $ID_port) : string

Get the history list of the port

Parameters

integer $ID_port

Returns

string —

the html prepared to display