fix(webui): restore DLP overlay with recursion fail-safe guard
This commit is contained in:
@@ -1570,6 +1570,7 @@
|
|||||||
let settingsHostFetchInFlight = false;
|
let settingsHostFetchInFlight = false;
|
||||||
let applyPatchScheduled = false;
|
let applyPatchScheduled = false;
|
||||||
let networkPatchesInstalled = false;
|
let networkPatchesInstalled = false;
|
||||||
|
let dlpOverlayFailureCount = 0;
|
||||||
|
|
||||||
function getTrendsHostFromSettings(settings) {
|
function getTrendsHostFromSettings(settings) {
|
||||||
if (!settings || typeof settings !== "object") return "";
|
if (!settings || typeof settings !== "object") return "";
|
||||||
@@ -1808,7 +1809,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function applyPatch() {
|
function applyPatch() {
|
||||||
const isDlpBucketRoute = isDlpSignalBucketRoute();
|
|
||||||
enforceSafeActivityViewForPveHost();
|
enforceSafeActivityViewForPveHost();
|
||||||
ensureSettingsHost();
|
ensureSettingsHost();
|
||||||
ensureHostGroupsData().catch(function () {});
|
ensureHostGroupsData().catch(function () {});
|
||||||
@@ -1822,8 +1822,15 @@
|
|||||||
patchCategoryBuilderHostLabel(document.body);
|
patchCategoryBuilderHostLabel(document.body);
|
||||||
injectPveAuditCenter(document.body);
|
injectPveAuditCenter(document.body);
|
||||||
injectDlpNavigation(document.body);
|
injectDlpNavigation(document.body);
|
||||||
// Temporary safe-mode: disable heavy DLP overlay on bucket route due recursion in browser.
|
if (isDlpSignalBucketRoute() && dlpOverlayFailureCount === 0) {
|
||||||
if (!isDlpBucketRoute) {
|
try {
|
||||||
|
injectDlpReviewCenter(document.body);
|
||||||
|
} catch (error) {
|
||||||
|
dlpOverlayFailureCount += 1;
|
||||||
|
const existing = document.body.querySelector("[data-aw-ru-dlp-center='1']");
|
||||||
|
if (existing && existing.parentElement) existing.parentElement.removeChild(existing);
|
||||||
|
}
|
||||||
|
} else if (!isDlpSignalBucketRoute()) {
|
||||||
injectDlpReviewCenter(document.body);
|
injectDlpReviewCenter(document.body);
|
||||||
}
|
}
|
||||||
injectDlpAlertsCenter(document.body);
|
injectDlpAlertsCenter(document.body);
|
||||||
|
|||||||
Reference in New Issue
Block a user