Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions user.js/lib/admincom-common.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,18 @@ function dbgWarn(tag, msg, ...rest) {
if (!isDebugEnabled()) return;
console.warn(`[${MODULE_PREFIX}:${tag}]`, msg, ...rest);
}
/** Open a console group tagged like dbg(), but only when debug mode is active. */
/**
* Open a console group tagged like dbg(), but only when debug mode is active.
* @deprecated — documented logging API with no callers; being withdrawn — remove with the next CONVENTIONS.md doc cycle
*/
function dbgGroup(tag, label) {
if (!isDebugEnabled()) return;
console.group(`[${MODULE_PREFIX}:${tag}]`, label);
}
/** Close the current console group, but only when debug mode is active. */
/**
* Close the current console group, but only when debug mode is active.
* @deprecated — documented logging API with no callers; being withdrawn — remove with the next CONVENTIONS.md doc cycle
*/
function dbgGroupEnd() {
if (!isDebugEnabled()) return;
console.groupEnd();
Expand Down
2 changes: 1 addition & 1 deletion user.js/peeringdb-cp-consolidated-tools.meta.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ==UserScript==
// @name PeeringDB CP - Consolidated Tools
// @namespace https://www.peeringdb.com/cp/
// @version 2.0.228
// @version 2.0.229
// @description Consolidated CP userscript with strict route-isolated modules for facility/network/user/entity workflows
// @author <chriztoffer@peeringdb.com>
// @match https://www.peeringdb.com/cp/*
Expand Down
11 changes: 7 additions & 4 deletions user.js/peeringdb-cp-consolidated-tools.src.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ==UserScript==
// @name PeeringDB CP - Consolidated Tools
// @namespace https://www.peeringdb.com/cp/
// @version 2.0.228
// @version 2.0.229
// @description Consolidated CP userscript with strict route-isolated modules for facility/network/user/entity workflows
// @author <chriztoffer@peeringdb.com>
// @match https://www.peeringdb.com/cp/*
Expand Down Expand Up @@ -130,6 +130,7 @@
"ipaddr4", "ipaddr6", "speed", "operational", "is_rs_peer", "bfd_support", "notes",
];
const AUTO_MERGE_FIELDS = PRESERVED_NETIXLAN_FIELDS.slice();
// @staged wip — gate-count constant for data-driven conflict-resolver gate reporting; verifyConflictGates and its modal copy hardcode "8 safety gates" in prose today, so wire this in when that reporting goes data-driven.
const CONFLICT_RESOLVE_GATE_COUNT = 8;
// Recent IP changes report: window length in minutes for the audit view.
const RECENT_IP_CHANGES_WINDOW_MIN = 60;
Expand Down Expand Up @@ -2516,7 +2517,7 @@

/**
* Removes the modal from the DOM and cancels any apply loop in flight.
* @ai Preserve the cancelSignal write and the resolveClosed() call.
* @ai Set cancelSignal.cancelled before resolveClosed() so a backdrop dismissal of the renumber modal aborts applyRenumberRows' PUT loop mid-flight and only then releases the opener's action lock via closed.
*/
function close() {
// Dismissing the UI must stop the work, not just hide it. This was
Expand Down Expand Up @@ -3338,7 +3339,7 @@

/**
* Removes the modal and cancels any merge loop in flight.
* @ai Preserve the cancelSignal write and the resolveClosed() call.
* @ai Keep the cancelSignal.cancelled write and the resolveClosed() call: dismissing the IX-F member-audit modal must stop applyIxfMerges' PUT/DELETE merge loop, not merely hide its progress display.
*/
function close() {
// Dismissing the UI must stop the work, not just hide it. This was
Expand Down Expand Up @@ -4279,7 +4280,7 @@

/**
* Removes the modal and cancels any delete loop in flight.
* @ai Preserve the cancelSignal write and the resolveClosed() call.
* @ai Closing the conflict resolver must halt applyConflictDeletes before its next DELETE — keep the cancelSignal.cancelled write ahead of backdrop.remove() and resolveClosed().
*/
function close() {
// Dismissing the UI must stop the work, not just hide it -- this modal
Expand Down Expand Up @@ -5507,6 +5508,7 @@
* Purpose: Add multi-item expandable menus (e.g., Maps) to the main toolbar UL.
* Necessity: Toolbar insertion semantics differ from the secondary row; wrapping
* createDropdownActionListItem ensures correct placement and data-pdb-cp-action tagging.
* @staged wip — no multi-item toolbar dropdown (e.g. a Maps menu) is built yet; wire this in when the first dropdown toolbar action lands on the primary toolbar.
* @param {{ id: string, label: string, items: Array<{label: string, href: string}>,
* insertLeft?: boolean }} opts
* @returns {HTMLAnchorElement|null} The dropdown toggle anchor element, or null on failure.
Expand Down Expand Up @@ -7842,6 +7844,7 @@
* Determines the frontend URL path for a CP entity (network, carrier, ix).
* Purpose: Generate correct copy-to-clipboard URL for the current entity type.
* Necessity: Different entity types map to different URL paths.
* @staged wip — per-entity frontend copy-URL helper (carrier/ix/net paths ready); wire it in when the copy-link toolbar action expands beyond network pages.
* @param {{ entity: string, entityId: string }} ctx - Route context from getRouteContext().
* @returns {string} Root-relative frontend path (e.g., "/net/42").
*/
Expand Down
21 changes: 15 additions & 6 deletions user.js/peeringdb-cp-consolidated-tools.user.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ==UserScript==
// @name PeeringDB CP - Consolidated Tools
// @namespace https://www.peeringdb.com/cp/
// @version 2.0.228
// @version 2.0.229
// @description Consolidated CP userscript with strict route-isolated modules for facility/network/user/entity workflows
// @author <chriztoffer@peeringdb.com>
// @match https://www.peeringdb.com/cp/*
Expand Down Expand Up @@ -130,6 +130,7 @@
"ipaddr4", "ipaddr6", "speed", "operational", "is_rs_peer", "bfd_support", "notes",
];
const AUTO_MERGE_FIELDS = PRESERVED_NETIXLAN_FIELDS.slice();
// @staged wip — gate-count constant for data-driven conflict-resolver gate reporting; verifyConflictGates and its modal copy hardcode "8 safety gates" in prose today, so wire this in when that reporting goes data-driven.
const CONFLICT_RESOLVE_GATE_COUNT = 8;
// Recent IP changes report: window length in minutes for the audit view.
const RECENT_IP_CHANGES_WINDOW_MIN = 60;
Expand Down Expand Up @@ -641,12 +642,18 @@
if (!isDebugEnabled()) return;
console.warn(`[${MODULE_PREFIX}:${tag}]`, msg, ...rest);
}
/** Open a console group tagged like dbg(), but only when debug mode is active. */
/**
* Open a console group tagged like dbg(), but only when debug mode is active.
* @deprecated — documented logging API with no callers; being withdrawn — remove with the next CONVENTIONS.md doc cycle
*/
function dbgGroup(tag, label) {
if (!isDebugEnabled()) return;
console.group(`[${MODULE_PREFIX}:${tag}]`, label);
}
/** Close the current console group, but only when debug mode is active. */
/**
* Close the current console group, but only when debug mode is active.
* @deprecated — documented logging API with no callers; being withdrawn — remove with the next CONVENTIONS.md doc cycle
*/
function dbgGroupEnd() {
if (!isDebugEnabled()) return;
console.groupEnd();
Expand Down Expand Up @@ -3977,7 +3984,7 @@

/**
* Removes the modal from the DOM and cancels any apply loop in flight.
* @ai Preserve the cancelSignal write and the resolveClosed() call.
* @ai Set cancelSignal.cancelled before resolveClosed() so a backdrop dismissal of the renumber modal aborts applyRenumberRows' PUT loop mid-flight and only then releases the opener's action lock via closed.
*/
function close() {
// Dismissing the UI must stop the work, not just hide it. This was
Expand Down Expand Up @@ -4799,7 +4806,7 @@

/**
* Removes the modal and cancels any merge loop in flight.
* @ai Preserve the cancelSignal write and the resolveClosed() call.
* @ai Keep the cancelSignal.cancelled write and the resolveClosed() call: dismissing the IX-F member-audit modal must stop applyIxfMerges' PUT/DELETE merge loop, not merely hide its progress display.
*/
function close() {
// Dismissing the UI must stop the work, not just hide it. This was
Expand Down Expand Up @@ -5740,7 +5747,7 @@

/**
* Removes the modal and cancels any delete loop in flight.
* @ai Preserve the cancelSignal write and the resolveClosed() call.
* @ai Closing the conflict resolver must halt applyConflictDeletes before its next DELETE — keep the cancelSignal.cancelled write ahead of backdrop.remove() and resolveClosed().
*/
function close() {
// Dismissing the UI must stop the work, not just hide it -- this modal
Expand Down Expand Up @@ -6968,6 +6975,7 @@
* Purpose: Add multi-item expandable menus (e.g., Maps) to the main toolbar UL.
* Necessity: Toolbar insertion semantics differ from the secondary row; wrapping
* createDropdownActionListItem ensures correct placement and data-pdb-cp-action tagging.
* @staged wip — no multi-item toolbar dropdown (e.g. a Maps menu) is built yet; wire this in when the first dropdown toolbar action lands on the primary toolbar.
* @param {{ id: string, label: string, items: Array<{label: string, href: string}>,
* insertLeft?: boolean }} opts
* @returns {HTMLAnchorElement|null} The dropdown toggle anchor element, or null on failure.
Expand Down Expand Up @@ -9303,6 +9311,7 @@
* Determines the frontend URL path for a CP entity (network, carrier, ix).
* Purpose: Generate correct copy-to-clipboard URL for the current entity type.
* Necessity: Different entity types map to different URL paths.
* @staged wip — per-entity frontend copy-URL helper (carrier/ix/net paths ready); wire it in when the copy-link toolbar action expands beyond network pages.
* @param {{ entity: string, entityId: string }} ctx - Route context from getRouteContext().
* @returns {string} Root-relative frontend path (e.g., "/net/42").
*/
Expand Down
2 changes: 1 addition & 1 deletion user.js/peeringdb-deskpro-tools.meta.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ==UserScript==
// @name PeeringDB DP - Consolidated Tools
// @namespace https://www.peeringdb.com/
// @version 1.7.12
// @version 1.7.13
// @description Consolidated DeskPro tools: linkifies/enriches PeeringDB links (ASN/IP/IX/NET/FAC/Carrier), adds an owning-org shortcut link beside each, copies mailto addresses, normalizes PeeringDB CP double-slash links, generates pihole whitelist commands for IX/NET/FAC/Carrier approval tickets
// @author <chriztoffer@peeringdb.com>
// @match https://peeringdb.deskpro.com/app*
Expand Down
3 changes: 2 additions & 1 deletion user.js/peeringdb-deskpro-tools.src.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ==UserScript==
// @name PeeringDB DP - Consolidated Tools
// @namespace https://www.peeringdb.com/
// @version 1.7.12
// @version 1.7.13
// @description Consolidated DeskPro tools: linkifies/enriches PeeringDB links (ASN/IP/IX/NET/FAC/Carrier), adds an owning-org shortcut link beside each, copies mailto addresses, normalizes PeeringDB CP double-slash links, generates pihole whitelist commands for IX/NET/FAC/Carrier approval tickets
// @author <chriztoffer@peeringdb.com>
// @match https://peeringdb.deskpro.com/app*
Expand Down Expand Up @@ -1581,6 +1581,7 @@
/**
* Strips trailing link-emoji tokens from visible anchor text.
* Purpose: Prevent re-decoration cycles from treating prior emoji icons as label content.
* @staged wip — anchor-label emoji cleanup for re-decoration; wire into hydrateExistingPeeringDbAnchor when anchor-label rewriting returns there.
* @param {string} value - Raw anchor text.
* @returns {string} Text without trailing link-emoji tokens.
*/
Expand Down
13 changes: 10 additions & 3 deletions user.js/peeringdb-deskpro-tools.user.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ==UserScript==
// @name PeeringDB DP - Consolidated Tools
// @namespace https://www.peeringdb.com/
// @version 1.7.12
// @version 1.7.13
// @description Consolidated DeskPro tools: linkifies/enriches PeeringDB links (ASN/IP/IX/NET/FAC/Carrier), adds an owning-org shortcut link beside each, copies mailto addresses, normalizes PeeringDB CP double-slash links, generates pihole whitelist commands for IX/NET/FAC/Carrier approval tickets
// @author <chriztoffer@peeringdb.com>
// @match https://peeringdb.deskpro.com/app*
Expand Down Expand Up @@ -494,12 +494,18 @@
if (!isDebugEnabled()) return;
console.warn(`[${MODULE_PREFIX}:${tag}]`, msg, ...rest);
}
/** Open a console group tagged like dbg(), but only when debug mode is active. */
/**
* Open a console group tagged like dbg(), but only when debug mode is active.
* @deprecated — documented logging API with no callers; being withdrawn — remove with the next CONVENTIONS.md doc cycle
*/
function dbgGroup(tag, label) {
if (!isDebugEnabled()) return;
console.group(`[${MODULE_PREFIX}:${tag}]`, label);
}
/** Close the current console group, but only when debug mode is active. */
/**
* Close the current console group, but only when debug mode is active.
* @deprecated — documented logging API with no callers; being withdrawn — remove with the next CONVENTIONS.md doc cycle
*/
function dbgGroupEnd() {
if (!isDebugEnabled()) return;
console.groupEnd();
Expand Down Expand Up @@ -2310,6 +2316,7 @@
/**
* Strips trailing link-emoji tokens from visible anchor text.
* Purpose: Prevent re-decoration cycles from treating prior emoji icons as label content.
* @staged wip — anchor-label emoji cleanup for re-decoration; wire into hydrateExistingPeeringDbAnchor when anchor-label rewriting returns there.
* @param {string} value - Raw anchor text.
* @returns {string} Text without trailing link-emoji tokens.
*/
Expand Down
2 changes: 1 addition & 1 deletion user.js/peeringdb-fp-consolidated-tools.meta.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ==UserScript==
// @name PeeringDB FP - Consolidated Tools
// @namespace https://www.peeringdb.com/
// @version 1.1.42
// @version 1.1.43
// @description Consolidated FP userscript for PeeringDB frontend (Net/Org/Fac/IX/Carrier)
// @author <chriztoffer@peeringdb.com>
// @match https://www.peeringdb.com/*
Expand Down
2 changes: 1 addition & 1 deletion user.js/peeringdb-fp-consolidated-tools.src.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ==UserScript==
// @name PeeringDB FP - Consolidated Tools
// @namespace https://www.peeringdb.com/
// @version 1.1.42
// @version 1.1.43
// @description Consolidated FP userscript for PeeringDB frontend (Net/Org/Fac/IX/Carrier)
// @author <chriztoffer@peeringdb.com>
// @match https://www.peeringdb.com/*
Expand Down
12 changes: 9 additions & 3 deletions user.js/peeringdb-fp-consolidated-tools.user.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ==UserScript==
// @name PeeringDB FP - Consolidated Tools
// @namespace https://www.peeringdb.com/
// @version 1.1.42
// @version 1.1.43
// @description Consolidated FP userscript for PeeringDB frontend (Net/Org/Fac/IX/Carrier)
// @author <chriztoffer@peeringdb.com>
// @match https://www.peeringdb.com/*
Expand Down Expand Up @@ -438,12 +438,18 @@
if (!isDebugEnabled()) return;
console.warn(`[${MODULE_PREFIX}:${tag}]`, msg, ...rest);
}
/** Open a console group tagged like dbg(), but only when debug mode is active. */
/**
* Open a console group tagged like dbg(), but only when debug mode is active.
* @deprecated — documented logging API with no callers; being withdrawn — remove with the next CONVENTIONS.md doc cycle
*/
function dbgGroup(tag, label) {
if (!isDebugEnabled()) return;
console.group(`[${MODULE_PREFIX}:${tag}]`, label);
}
/** Close the current console group, but only when debug mode is active. */
/**
* Close the current console group, but only when debug mode is active.
* @deprecated — documented logging API with no callers; being withdrawn — remove with the next CONVENTIONS.md doc cycle
*/
function dbgGroupEnd() {
if (!isDebugEnabled()) return;
console.groupEnd();
Expand Down
Loading