App-Netdisco
view release on metacpan or search on metacpan
lib/App/Netdisco/Util/SiteLocal.pm view on Meta::CPAN
},
{
name => 'csv-download-link',
release => '2.109000',
pattern => qr/\bupdate_csv_download_link\s*\(|data-nd-csv\b|\bndCsv\b/,
advice => 'the CSV download link now arrives with the pane as an '
. 'hx-swap-oob anchor and the browser no longer rebuilds it. '
. 'Delete the call and the data-nd-csv attribute from a sidebar '
. 'form copy, and keep the id nd_csv-download on the anchor so '
. 'the response has somewhere to land.',
},
{
name => 'htmx-abort-trigger',
release => '2.109000',
# anchored on the trigger rather than the event name: the vendored htmx
# bundle listens for this event, so a site keeping its own copy of that
# file would otherwise be told to change the library
pattern => qr/trigger\s*\(\s*[^)]*['"]htmx:abort['"]/,
advice => 'a tab form no longer owns its own request, so triggering '
. 'htmx:abort on one cancels nothing. Give each sidebar form '
. 'hx-sync="closest .nd_sidebar:replace" and delete the trigger: '
. 'htmx then cancels the request the tab being left started.',
},
{
name => 'datatables-js-renamed',
release => '2.109000',
pattern => qr/jquery\.dataTables\.min\.js/,
advice => 'jquery.dataTables.min.js was renamed dataTables.min.js, the '
. 'library no longer needing jQuery, and a reference to the '
. 'old name 404s. Update the script tag in a layout copy to the '
. 'new file name: nothing else loads the library, so until then '
. 'no table on any page builds.',
},
{
name => 'floatthead-js',
release => '2.109000',
# The file name and the method, because the two break differently: a
# layout copy still loading the plug-in 404s, and a script still calling
# it throws once the plug-in is not there to define the method.
pattern => qr/jquery\.floatThead\.js|\.\s*floatThead\s*\(/,
advice => 'jquery.floatThead.js was removed and the stylesheet holds the '
. 'header still instead. Delete the script tag from a layout copy '
. 'and the .floatThead() call beside the table, and give that '
. 'table the class nd_floatinghead: netdisco.css sticks the '
. 'header of a table.nd_floatinghead inside the tab content, '
. 'which is what the job queue now relies on.',
},
{
name => 'jquery-ui-autocomplete',
release => '2.109000',
# Both the constructor and the method form, since a copy that only calls
# the method still throws once the library is gone.
# the call alone, not the class the widget adds: a site keeping its own
# copy of the library would otherwise be told to change the library, and
# both the minified script and its stylesheet carry that class. A site
# stylesheet overriding it is left unreported, which is cosmetic; a layout
# copy still loading the theme is caught by the rule below.
pattern => qr/\.\s*autocomplete\s*\(/,
advice => 'jQuery UI was removed. A field asks for suggestions in its '
. 'markup now: give the input a data-nd-typeahead attribute '
. 'holding the endpoint path, with data-nd-typeahead-min, '
. '-params, -open and -first beside it, and delete the script.',
},
{
name => 'jquery-ui-removed',
release => '2.109000',
# A copied layout names the script and the theme on two separate lines,
# and both 404 silently rather than reporting anything.
pattern => qr{jquery-ui(?:\.min)?\.(?:js|css)|css/smoothness/},
advice => 'jquery-ui.min.js and the smoothness theme were removed. Drop '
. 'both lines from your copy of the layout.',
},
{
name => 'jstree-removed',
release => '2.109000',
# the container, the selector that reaches it, and the vendored path. Not
# the bare method call: the library contains that itself, in its own jQuery
# bridge, so matching it told a site keeping a copy to change the library.
# Measured against the real minified file, which this pattern does not hit.
pattern => qr{id=["']jstree["']|["']\#jstree["']|javascripts/jstree/},
advice => 'jsTree was removed and the SNMP browser is rendered by the '
. 'server. A copy of the pane should hold a ul#nd_snmp-tree that '
. 'includes ajax/device/snmptree.tt; delete the container, the '
. 'script and stylesheet lines from a layout copy, and any '
. 'jstree() call.',
},
{
name => 'daterangepicker-removed',
release => '2.109000',
# The three file names together, since a copied layout loses each on its
# own line, and the call, since a script keeping it throws once the
# library is gone. Measured against the library's own source, which does
# not carry this call form: it names itself only inside namespaced event
# strings such as click.daterangepicker, never as a call.
pattern => qr{javascripts/(?:moment\.min|daterangepicker)\.js
|css/daterangepicker\.css
|\.\s*daterangepicker\s*\(}x,
advice => 'moment.js, daterangepicker.js and daterangepicker.css were '
. 'removed. Give the field a container like '
. 'share/views/sidebar/_daterange.tt and delete the '
. '.daterangepicker() call and the two script tags and the '
. 'stylesheet link from a layout copy: netdisco-daterange.js '
. 'drives the control now, so add a script tag for it to the '
. 'layout copy in their place.',
},
{
name => 'moment-removed',
release => '2.109000',
# The rule above catches a layout still loading the file; this catches the
# call, since moment was a global on every page for a decade and a site
# script formatting a date with it throws once the library is gone. The
# vendored DataTables render helper of the same name as the second
# alternative requires moment or luxon internally, so a table column
# configured with it now fails with neither present.
pattern => qr/\bmoment\s*\(|DataTable\.render\.datetime\s*\(/,
advice => 'moment.js was removed and nothing replaces it as a global. '
. 'Format the date with native Date or Intl.DateTimeFormat '
. 'instead of calling moment, and give a datetime column a '
. 'different render function: the DataTable.render.datetime '
. 'helper needs moment or luxon and neither is loaded any more.',
},
( run in 0.934 second using v1.01-cache-2.11-cpan-e623d60df62 )