new feature: patch cables accounting
authorDenis Ovsienko <infrastation@yandex.ru>
Sun, 25 May 2014 09:05:06 +0000 (13:05 +0400)
committerDenis Ovsienko <infrastation@yandex.ru>
Wed, 4 Jun 2014 12:32:38 +0000 (16:32 +0400)
commit3a363a07bffd0b93fe3b7dea2564c56f589887be
tree9afbd2aa14e04106ce0e9dfcb45eb5415071dc81
parentc9ce9fdab61bf87ea15799e1a2b54911715fdcf9
new feature: patch cables accounting

This commit implements basic management of patch cables stock. It allows
for generic types of cables and connectors and comes preconfigured for
common assemblies like fiber optics, twisted pair and such. There is a
configuration page for further customization.

The user can consume/replenish an arbitrary amount of patch cables on
the cable heaps page or consume 1 cable on the port linker pop-up
through a new SELECT that suggests only the patch cable heaps compatible
with the current port type. There is a minimalistic event log for
changes in the amount.

Implementing this data model takes 6 new SQL tables with a foreign key
to the recently introduced PortOuterInterface.

* getPatchCableConnectorList(): new function
* getPatchCableTypeList(): new function
* getPatchCableConnectorOptions(): new function
* getPatchCableTypeOptions(): new function
* getPatchCableHeapSummary(): new function
* getPatchCableHeapOptionsForOIF(): new function
* getPatchCableConnectorCompat(): new function
* getPatchCableOIFCompat(): new function
* commitModifyPatchCableAmount(): new function
* commitSetPatchCableAmount(): new function
* getPatchCableHeapLogEntries(): new function
* addPatchCableHeapLogEntry(): new function
* genericAssertion(): update for "decimal" assertion type
* formatPatchCableHeapAsPlainText(): new function
* install.php: add the new SQL tables w/data
* upgrade.php: idem
* getPatchCableHeapCursorCode(): new function
* renderPatchCableHeapSummary(): new function
* renderPatchCableHeapEditor(): new function
* renderPatchCableHeapAmount(): new function
* renderSimpleTableWithOriginViewer(): new function
* renderSimpleTableWithOriginEditor(): new function
* renderPatchCableConfiguration(): new function
* renderPatchCableConnectorEditor(): new function
* renderPatchCableTypeEditor(): new function
* renderPatchCableConnectorCompatEditor(): new function
* renderPatchCableOIFCompatEditor(): new function
* navigation.php: update $indexlayout and add two new pages
* consumePatchCable(): new function
* replenishPatchCable(): new function
* setPatchCableAmount(): new function
* handlePopupPortLink(): update
* renderPopupPortSelector(): update
* triggerPatchCableHeapsConfigured(): new function

Conflicts:
ChangeLog
12 files changed:
ChangeLog
wwwroot/inc/database.php
wwwroot/inc/functions.php
wwwroot/inc/install.php
wwwroot/inc/interface-lib.php
wwwroot/inc/interface.php
wwwroot/inc/navigation.php
wwwroot/inc/ophandlers.php
wwwroot/inc/popup.php
wwwroot/inc/triggers.php
wwwroot/inc/upgrade.php
wwwroot/pix/patch_cables.png [new file with mode: 0644]