Changesets: RackTables

master abef97ae

2017-08-09 11:04:05

infrastation

Details Diff
upgrade CodeMirror from 5.27.4 to 5.28.0
Attach Issues:
mod - wwwroot/js/codemirror/codemirror.js Diff File

master 272e0a23

2017-08-09 10:51:54

infrastation

Details Diff
fix deleting of tags after commit 756009b

The call to usePreparedDeleteBlade() in destroyTag() [expectedly] started
to trigger an exception. However, that call didn't do any useful work
in the first place because a foreign key does not allow to delete a row
from TagTree if there are any dependent rows in TagStorage, this way if a
tag can be deleted it means it is not assigned to any rack or object and
hence its colour does not make any difference to any rack thumbnail.

Without the call that truncates RackThumbnail destroyTag() has no purpose
anymore so delete it and leave the $opspec_list declaration to do the job
through tableHandler() as before.
Attach Issues:
mod - wwwroot/inc/navigation.php Diff File
mod - wwwroot/inc/ophandlers.php Diff File

master d4e27fe5

2017-08-08 14:30:38

infrastation

Details Diff
specify a secondary class around the tag selector

This provides a temporary means for some users to hide the TD that
contains the tag selector in their RackTables installation. See the
discussion on racktables-users by Gerardo Ferreyra and Helen Browne.

* renderRackspace()
* renderDepot()
* renderIPSpace()
* renderCellList()
Attach Issues:
mod - wwwroot/inc/interface.php Diff File

master 756009bc

2017-08-08 12:35:22

infrastation

Details Diff
use quoting for some schema object names

The conceptual purpose of usePreparedDeleteBlade() is to delete a
specific, well-defined set of rows from a table. However, Maik Ehinger in
his tag colour code had pointed it out that a hack allowed to delete all
rows from a table like this:

usePreparedDeleteBlade ('TableName', array ('1' => '1'));

Enforce the originally intended semantics in usePreparedDeleteBlade() and
update the other two SQL helper functions for consistency. Update
existing tests and add new tests.

* assertListOfColumnNames(): new function to test if the list items look
reasonably similar to SQL column names
* makeSetSQL(): replace the previously existing test, which produced a
generic message, with the new function; escape SQL columns names and
add some spacing for readability
* makeWhereSQL(): idem
* usePreparedInsertBlade(): escape the table name and switch to
INSERT ... SET syntax to reuse the code in makeSetSQL()
* usePreparedDeleteBlade(): leave the previously existing test, which
produces a specific message, before the new test; escape the table name
* usePreparedUpdateBlade(): idem
Attach Issues:
mod - wwwroot/inc/database.php Diff File
mod - tests/PureFunctionTest.php Diff File

master edb0cf6e

2017-08-07 15:55:28

infrastation

Details Diff
tests: refine the rack thumbnails test

When loading the image two times, test that the values are equal.
Attach Issues:
mod - tests/RackspaceFunctionsTest.php Diff File

master 66b176b5

2017-08-07 12:49:18

infrastation

Details Diff
renderIPv6NetworkAddresses(): remove a no-op line
Attach Issues:
mod - wwwroot/inc/interface.php Diff File

master 494e4266

2017-08-06 22:30:05

infrastation

Details Diff
tests: allow to override PHPUnit binary name

In Fedora 26 PHPUnit version 6 is available as the package "phpunit6",
which provides the binary "phpunit6". Make the changes to express.sh to
enable a custom PHPUnit binary like below:

$ PHPUNIT=phpunit6 ./tests/express.sh
Attach Issues:
mod - tests/express.sh Diff File

master 162fc31a

2017-08-04 14:06:21

infrastation

Details Diff
tests: improve RackspaceFunctionsTest

Share the row fixture among the tests and add basic tests for rack
thumbnails.
Attach Issues:
mod - tests/RackspaceFunctionsTest.php Diff File

master f9039082

2017-08-04 13:52:44

infrastation

Details Diff
generate rack thumbs independently of the headers

Move the thumbnail content caching code from
dispatchMiniRackThumbRequest() to a new function,
getCachedMiniRackThumbImage(), which can be called more than once per
HTTP request or from a CLI script.
Attach Issues:
mod - wwwroot/inc/solutions.php Diff File

master 50712c67

2017-08-04 11:05:38

infrastation

Details Diff
refine DELETE in commitUpdateTag()

Also update the global tag list to keep it consistent.
Attach Issues:
mod - wwwroot/inc/database.php Diff File

master e5c54d45

2017-08-03 15:21:52

infrastation

Details Diff
tests: refine RenderDepotTest

Add an error message and fixup code style.
Attach Issues:
mod - tests/RenderDepotTest.php Diff File

master f82e0964

2017-08-03 15:10:06

infrastation

Details Diff
tests: refine PortTriggerTest

Update the comment and address the following feedback from PHPUnit 6:

There were 2 risky tests:
1) PortTriggerTest::testUniqueMacAddSame
This test did not perform any assertions
2) PortTriggerTest::testUniqueMacUpdateSame
This test did not perform any assertions
Attach Issues:
mod - tests/PortTriggerTest.php Diff File

master 352bbb3d

2017-08-03 11:21:05

infrastation

Details Diff
Travis CI: add PHPUnit 6 to the build matrix

Add PHP 7.0 and 7.1, which come with PHPUnit 6. Allow 7.1 job to fail as
RackTables still has known issues with it.
Attach Issues:
mod - .travis.yml Diff File

master 94489075

2017-08-03 10:25:15

infrastation

Details Diff
tests: add support for PHPUnit 6

Change all RackTables test case classes to extend RTTestCase. Have two
PHPUnit bootstrap files to declare the new intermediate class two
different ways: one for versions 4 & 5 and another for version 6 (the
common part is in its own file and there is a symlink to default to
versions 4 & 5 when PHPUnit is run from the command line). In express.sh
auto-detect PHPUnit version and use respective bootstrap file.
Attach Issues:
mod - tests/SQLDateFromDateStrTest.php Diff File
add - tests/bootstrap_v4v5.php Diff File
add - tests/bootstrap_v6.php Diff File
mod - tests/express.sh Diff File
mod - tests/ObjectPortsTest.php Diff File
mod - tests/PureFunctionTest.php Diff File
mod - tests/DictionaryAttributeTest.php Diff File
mod - tests/StringInsertHrefsTest.php Diff File
mod - tests/TagFunctionsTest.php Diff File
mod - tests/UserAccountTest.php Diff File
add - tests/bootstrap_common.php Diff File
mod - tests/EmptySQLWhereTest.php Diff File
mod - tests/RenderDepotTest.php Diff File
mod - tests/GetChildrenListTest.php Diff File
mod - tests/ObjectCircularReferenceTest.php Diff File
mod - tests/TagTreeCircularReferenceTest.php Diff File
mod - tests/ObjectLogTest.php Diff File
mod - tests/UpgradeTest.php Diff File
mod - tests/PortTriggerTest.php Diff File
mod - tests/RackspaceFunctionsTest.php Diff File
mod - tests/ConfigVarTest.php Diff File
mod - tests/DBMutexTest.php Diff File
mod - tests/GetRowsCountTest.php Diff File
mod - tests/EntityLinkTriggerTest.php Diff File
mod - tests/LinkTriggerTest.php Diff File
mod - tests/ObjectAttributesTest.php Diff File
mod - tests/ScriptFunctionsTest.php Diff File
mod - tests/bootstrap.php Diff File

master 3c1e6a87

2017-08-02 15:16:08

infrastation

Details Diff
fixup rack thumb colours processing

Make the state code in coloredObject() a mandatory parameter and update
printRackThumbImage() to make sure it is always properly set. This
restores the colour-based highlighting for objects that don't have any
colours associated through assigned tags. Reduce the footprint of the
colour list argument. Prune and rearrange some code for clarity.
Attach Issues:
mod - wwwroot/inc/solutions.php Diff File

master a433b268

2017-08-02 13:37:39

infrastation

Details Diff
tests: improve TagFunctionsTest

Move all read-only tests into one method to avoid duplicating the class
fixtures. Supply an array argument to usePreparedDeleteBlade() to make
use of SQL IN(). Assign some colours to the fixture tags and add a basic
read-only test to cover setEntityColors().
Attach Issues:
mod - tests/TagFunctionsTest.php Diff File

master c0d0c564

2017-08-02 12:17:09

infrastation

Details Diff
refine setEntityColors()

Use in_array() instead of array_key_exists() to make the check actually
work. Do not return any result as it is wasted anyway. Eliminate a
temporary variable.
Attach Issues:
mod - wwwroot/inc/interface-lib.php Diff File

master 4c5f6ef4

2017-08-02 12:04:40

infrastation

Details Diff
commitAddObject(): fix a bug with tags and cache
Attach Issues:
mod - wwwroot/inc/database.php Diff File

master f0fe0da7

2017-08-01 18:09:56

infrastation

Details Diff
renderEditRackForm(): add a LABEL for a CHECKBOX

Like in commit f5b9c21.
Attach Issues:
mod - wwwroot/inc/interface.php Diff File

master 1019f701

2017-08-01 13:11:54

infrastation

Details Diff
simplify SQL in loadRackThumbCache()

RackThumbnail.thumb_data is not intended to be NULL, in the unlikely
case it is NULL just let the bug propagate and become visible elsewhere
so it can be fixed.
Attach Issues:
mod - wwwroot/inc/database.php Diff File

master 94826aeb

2017-08-01 13:07:50

infrastation

Details Diff
simplify some more functions

* renderSimpleTableWithOriginViewer(): use renderTableViewer()
* renderPortOIFViewer(): idem
* renderChapter(): idem and clean ref. counter processing up
Attach Issues:
mod - wwwroot/inc/interface-config.php Diff File
mod - wwwroot/inc/interface.php Diff File

master f24df831

2017-07-31 17:22:00

infrastation

Details Diff
improve renderDataIntegrityReport() a little more

In the triggers section add the entries below to the list of known
triggers and compare the list with the items in the schema both ways.
Use renderTableViewer() to display the difference.

* EntityLink-before-insert
* EntityLink-before-update

In the foreign keys section make a similar change and amend the new
plugins to return their lists of FKs in the new format.

* RackThumbnail-FK-rack_id
* VLANDomain-FK-group_id
Attach Issues:
mod - wwwroot/inc/interface-reports.php Diff File
mod - plugins/munin/plugin.php Diff File
mod - plugins/cacti/plugin.php Diff File

master c8c64b1d

2017-07-31 09:49:05

infrastation

Details Diff
renderPluginEditor(): add permission checks

Only show individual controls and the warning when respective permission
check would allow the action. This way what the user sees is much likely
to be what they can use.
Attach Issues:
mod - wwwroot/inc/interface-config.php Diff File

master ad847bdb

2017-07-30 14:06:11

infrastation

Details Diff
remove almost all remaining PHP closing tags
Attach Issues:
mod - README.Fedora Diff File
mod - tests/travis_setup_mysql.sh Diff File

master 28d3bb43

2017-07-30 13:57:34

infrastation

Details Diff
tests: check the plugins files too in express.sh
Attach Issues:
mod - tests/express.sh Diff File
 First  Prev  1 2 3 ... 14 15 16 17 18 19 20 ... 40 ... 60 ... 80 ... 100 ... 120 ... 140 ... 160 ... 180 ... 200 ... 218 219 220  Next  Last