underpost 2.89.37 → 2.89.45

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/README.md +3 -2
  2. package/bin/deploy.js +22 -15
  3. package/cli.md +89 -61
  4. package/manifests/deployment/dd-default-development/deployment.yaml +2 -2
  5. package/manifests/deployment/dd-test-development/deployment.yaml +6 -2
  6. package/manifests/deployment/dd-test-development/proxy.yaml +2 -0
  7. package/manifests/deployment/kafka/deployment.yaml +0 -2
  8. package/manifests/deployment/spark/spark-pi-py.yaml +0 -1
  9. package/manifests/deployment/tensorflow/tf-gpu-test.yaml +0 -2
  10. package/manifests/envoy-service-nodeport.yaml +0 -1
  11. package/manifests/kubeadm-calico-config.yaml +10 -115
  12. package/manifests/letsencrypt-prod.yaml +0 -1
  13. package/manifests/mariadb/statefulset.yaml +1 -1
  14. package/manifests/mongodb/statefulset.yaml +11 -11
  15. package/manifests/mongodb-4.4/service-deployment.yaml +1 -3
  16. package/manifests/mysql/pv-pvc.yaml +1 -1
  17. package/manifests/mysql/statefulset.yaml +1 -1
  18. package/manifests/valkey/service.yaml +0 -1
  19. package/manifests/valkey/statefulset.yaml +2 -3
  20. package/package.json +1 -1
  21. package/scripts/device-scan.sh +43 -21
  22. package/scripts/rpmfusion-ffmpeg-setup.sh +1 -0
  23. package/src/cli/cluster.js +58 -57
  24. package/src/cli/deploy.js +51 -89
  25. package/src/cli/index.js +30 -3
  26. package/src/cli/monitor.js +12 -6
  27. package/src/cli/repository.js +1 -1
  28. package/src/cli/run.js +32 -19
  29. package/src/client/components/core/Logger.js +1 -1
  30. package/src/client/components/core/Modal.js +5 -0
  31. package/src/client/components/core/ObjectLayerEngineModal.js +334 -71
  32. package/src/client/components/core/ObjectLayerEngineViewer.js +170 -403
  33. package/src/client/components/core/Router.js +10 -1
  34. package/src/client/services/default/default.management.js +25 -5
  35. package/src/index.js +1 -1
  36. package/src/server/client-build.js +5 -4
  37. package/src/server/conf.js +1 -1
  38. package/manifests/kubelet-config.yaml +0 -65
  39. package/manifests/mongodb/backup-access.yaml +0 -16
  40. package/manifests/mongodb/backup-cronjob.yaml +0 -42
  41. package/manifests/mongodb/backup-pv-pvc.yaml +0 -22
  42. package/manifests/mongodb/configmap.yaml +0 -26
@@ -5,7 +5,7 @@ import { DropDown } from './DropDown.js';
5
5
  import { EventsUI } from './EventsUI.js';
6
6
  import { Translate } from './Translate.js';
7
7
  import { s, append, hexToRgbA } from './VanillaJs.js';
8
- import { getProxyPath, getQueryParams, setPath, setQueryParams } from './Router.js';
8
+ import { getProxyPath, getQueryParams, setPath, setQueryParams, RouterEvents } from './Router.js';
9
9
  import { s4 } from './CommonJs.js';
10
10
  import { Input } from './Input.js';
11
11
  import { ToggleSwitch } from './ToggleSwitch.js';
@@ -179,6 +179,110 @@ const ObjectLayerEngineModal = {
179
179
  let loadedData = null;
180
180
  let existingObjectLayerId = null; // Track the _id for updates
181
181
  let originalDirectionCodes = []; // Track original direction codes for update mode
182
+
183
+ // Track frame editing state
184
+ let editingFrameId = null;
185
+ let editingDirectionCode = null;
186
+
187
+ // Helper function to update UI when entering edit mode
188
+ const enterEditMode = (frameId, directionCode) => {
189
+ editingFrameId = frameId;
190
+ editingDirectionCode = directionCode;
191
+
192
+ // Hide/disable all "Add Frame" buttons except the one for the editing direction
193
+ directionCodes.forEach((code) => {
194
+ const addButton = s(`.direction-code-bar-frames-btn-${code}`);
195
+ const addButtonParent = addButton?.parentElement;
196
+ if (addButton && addButtonParent) {
197
+ if (code === directionCode) {
198
+ // Keep the button for the editing direction visible and highlighted with animation
199
+ addButton.style.opacity = '1';
200
+ addButton.style.pointerEvents = 'auto';
201
+ addButton.style.border = '2px solid #4CAF50';
202
+ addButton.style.boxShadow = '0 0 15px rgba(76, 175, 80, 0.6)';
203
+ addButtonParent.classList.add('edit-mode-active');
204
+ } else {
205
+ // Hide/disable buttons for other directions
206
+ addButton.style.opacity = '0.3';
207
+ addButton.style.pointerEvents = 'none';
208
+ addButton.style.filter = 'grayscale(100%)';
209
+ addButton.style.cursor = 'not-allowed';
210
+ }
211
+ }
212
+ });
213
+
214
+ // Change the edit button to close button for the frame being edited
215
+ const editBtn = s(`.direction-code-bar-edit-btn-${frameId}`);
216
+ if (editBtn) {
217
+ editBtn.innerHTML = '<i class="fa-solid fa-times"></i>';
218
+ editBtn.classList.add('edit-mode-active');
219
+ editBtn.title = 'Cancel editing (Esc)';
220
+ }
221
+
222
+ // Highlight the frame being edited
223
+ document.querySelectorAll('.direction-code-bar-frames-img').forEach((img) => {
224
+ img.style.border = '';
225
+ img.style.boxShadow = '';
226
+ });
227
+ const frameImg = s(`.direction-code-bar-frames-img-${frameId}`);
228
+ if (frameImg) {
229
+ frameImg.style.border = '3px solid #4CAF50';
230
+ frameImg.style.boxShadow = '0 0 10px rgba(76, 175, 80, 0.5)';
231
+ }
232
+
233
+ // Show notification with better instructions
234
+ NotificationManager.Push({
235
+ html: `<strong>Edit Mode Active</strong><br/>Click the glowing <i class="fa-solid fa-edit"></i> button for direction <strong>${directionCode}</strong> to save, or click <i class="fa-solid fa-times"></i> to cancel.`,
236
+ status: 'info',
237
+ });
238
+ s(`.direction-code-bar-frames-btn-icon-add-${directionCode}`).classList.add('hide');
239
+ s(`.direction-code-bar-frames-btn-icon-edit-${directionCode}`).classList.remove('hide');
240
+ };
241
+
242
+ // Helper function to exit edit mode and restore UI
243
+ const exitEditMode = () => {
244
+ const previousEditingFrameId = editingFrameId;
245
+
246
+ s(`.direction-code-bar-frames-btn-icon-add-${editingDirectionCode}`).classList.remove('hide');
247
+ s(`.direction-code-bar-frames-btn-icon-edit-${editingDirectionCode}`).classList.add('hide');
248
+
249
+ editingFrameId = null;
250
+ editingDirectionCode = null;
251
+
252
+ // Restore all "Add Frame" buttons
253
+ directionCodes.forEach((code) => {
254
+ const addButton = s(`.direction-code-bar-frames-btn-${code}`);
255
+ const addButtonParent = addButton?.parentElement;
256
+ if (addButton) {
257
+ addButton.style.opacity = '1';
258
+ addButton.style.pointerEvents = 'auto';
259
+ addButton.style.border = '';
260
+ addButton.style.filter = 'none';
261
+ addButton.style.cursor = 'pointer';
262
+ addButton.style.boxShadow = '';
263
+ if (addButtonParent) {
264
+ addButtonParent.classList.remove('edit-mode-active');
265
+ }
266
+ }
267
+ });
268
+
269
+ // Restore edit button icon if it exists
270
+ if (previousEditingFrameId) {
271
+ const editBtn = s(`.direction-code-bar-edit-btn-${previousEditingFrameId}`);
272
+ if (editBtn) {
273
+ editBtn.innerHTML = '<i class="fa-solid fa-edit"></i>';
274
+ editBtn.classList.remove('edit-mode-active');
275
+ editBtn.title = 'Edit frame';
276
+ }
277
+ }
278
+
279
+ // Remove all frame borders and shadows
280
+ document.querySelectorAll('.direction-code-bar-frames-img').forEach((img) => {
281
+ img.style.border = '';
282
+ img.style.boxShadow = '';
283
+ });
284
+ };
285
+
182
286
  if (queryParams.cid) {
183
287
  existingObjectLayerId = queryParams.cid;
184
288
  loadedData = await ObjectLayerEngineModal.loadFromDatabase(queryParams.cid);
@@ -238,6 +342,10 @@ const ObjectLayerEngineModal = {
238
342
  src="${URL.createObjectURL(image)}"
239
343
  data-direction-code="${capturedDirectionCode}"
240
344
  />
345
+ ${await BtnIcon.Render({
346
+ label: html`<i class="fa-solid fa-edit"></i>`,
347
+ class: `abs direction-code-bar-edit-btn direction-code-bar-edit-btn-${id}`,
348
+ })}
241
349
  ${await BtnIcon.Render({
242
350
  label: html`<i class="fa-solid fa-trash"></i>`,
243
351
  class: `abs direction-code-bar-trash-btn direction-code-bar-trash-btn-${id}`,
@@ -254,7 +362,7 @@ const ObjectLayerEngineModal = {
254
362
  (frame) => frame.id === id,
255
363
  );
256
364
  if (frameData && frameData.json) {
257
- console.log(`Loading frame data for direction code ${clickedDirectionCode}:`, frameData.json);
365
+ // console.log(`Loading frame data for direction code ${clickedDirectionCode}:`, frameData.json);
258
366
  s('object-layer-engine').importMatrixJSON(frameData.json);
259
367
  } else {
260
368
  console.error(`Frame data not found for id ${id} in direction code ${clickedDirectionCode}`);
@@ -266,6 +374,57 @@ const ObjectLayerEngineModal = {
266
374
  ObjectLayerEngineModal.ObjectLayerData[capturedDirectionCode] = ObjectLayerEngineModal.ObjectLayerData[
267
375
  capturedDirectionCode
268
376
  ].filter((frame) => frame.id !== id);
377
+
378
+ // Clear edit mode if deleting the frame being edited
379
+ if (editingFrameId === id && editingDirectionCode === capturedDirectionCode) {
380
+ exitEditMode();
381
+ }
382
+ });
383
+
384
+ EventsUI.onClick(`.direction-code-bar-edit-btn-${id}`, async () => {
385
+ // Check if this is the frame being edited (close button behavior)
386
+ if (editingFrameId === id && editingDirectionCode === capturedDirectionCode) {
387
+ console.log(`Canceling edit mode for frame ${id}`);
388
+ exitEditMode();
389
+ // Clear the editor
390
+ s('object-layer-engine').clear();
391
+ NotificationManager.Push({
392
+ html: `<i class="fa-solid fa-times-circle"></i> Edit canceled`,
393
+ status: 'info',
394
+ });
395
+ return;
396
+ }
397
+
398
+ s(`.direction-code-bar-frames-btn-icon-add-${capturedDirectionCode}`).classList.add('hide');
399
+ s(`.direction-code-bar-frames-btn-icon-edit-${capturedDirectionCode}`).classList.remove('hide');
400
+
401
+ console.log(`Edit button clicked for frame ${id} in direction code ${capturedDirectionCode}`);
402
+
403
+ // If another frame is being edited, exit that edit mode first
404
+ if (editingFrameId && editingFrameId !== id) {
405
+ exitEditMode();
406
+ }
407
+
408
+ // Find the frame data
409
+ const frameData = ObjectLayerEngineModal.ObjectLayerData[capturedDirectionCode]?.find(
410
+ (frame) => frame.id === id,
411
+ );
412
+
413
+ if (frameData && frameData.json) {
414
+ // Load the frame into the editor
415
+ s('object-layer-engine').importMatrixJSON(frameData.json);
416
+
417
+ // Enter edit mode with UI updates
418
+ enterEditMode(id, capturedDirectionCode);
419
+
420
+ console.log(`Entering edit mode for frame ${id} in direction ${capturedDirectionCode}`);
421
+ } else {
422
+ console.error(`Frame data not found for id ${id} in direction code ${capturedDirectionCode}`);
423
+ NotificationManager.Push({
424
+ html: `<i class="fa-solid fa-exclamation-triangle"></i> Error: Frame data not found`,
425
+ status: 'error',
426
+ });
427
+ }
269
428
  });
270
429
  };
271
430
 
@@ -334,8 +493,11 @@ const ObjectLayerEngineModal = {
334
493
  <div class="in direction-code-bar-frames-title">${directionCode}</div>
335
494
  <div class="in direction-code-bar-frames-btn">
336
495
  ${await BtnIcon.Render({
337
- label: html`<i class="fa-solid fa-plus"></i>`,
338
- class: `direction-code-bar-frames-btn-${directionCode}`,
496
+ label: html`
497
+ <i class="fa-solid fa-plus direction-code-bar-frames-btn-icon-add-${directionCode}"></i>
498
+ <i class="fa-solid fa-edit direction-code-bar-frames-btn-icon-edit-${directionCode} hide"></i>
499
+ `,
500
+ class: `direction-code-bar-frames-btn-add direction-code-bar-frames-btn-${directionCode}`,
339
501
  })}
340
502
  </div>
341
503
  </div>
@@ -376,72 +538,143 @@ const ObjectLayerEngineModal = {
376
538
  }
377
539
 
378
540
  setTimeout(async () => {
379
- showFrameLoading();
380
- for (const directionCode of directionCodes) {
381
- // Use IIFE to properly capture directionCode and handle async operations
382
- await (async (currentDirectionCode) => {
383
- // Register frame add button handler after DOM is ready
384
- // Wait longer to ensure all direction bars are rendered
385
-
386
- if (loadedData && loadedData.metadata && loadedData.metadata.data && currentDirectionCode) {
387
- // Show loading animation only once on first direction that has frames
388
-
389
- const { type, id } = loadedData.metadata.data.item;
390
- const directions = ObjectLayerEngineModal.getDirectionsFromDirectionCode(currentDirectionCode);
391
-
392
- console.log(`Loading frames for direction code: ${currentDirectionCode}, directions:`, directions);
393
-
394
- // Check if frames exist for any direction mapped to this direction code
395
- const { frames } = loadedData.renderData.data.render;
396
- for (const direction of directions) {
397
- if (frames[direction] && frames[direction].length > 0) {
398
- // Track this direction code as having original data
399
- if (!originalDirectionCodes.includes(currentDirectionCode)) {
400
- originalDirectionCodes.push(currentDirectionCode);
401
- }
402
- // Load frames from static PNG URLs sequentially to avoid race conditions
403
- const frameCount = frames[direction].length;
404
- console.log(`Found ${frameCount} frames for direction: ${direction} (code: ${currentDirectionCode})`);
405
- for (let frameIndex = 0; frameIndex < frameCount; frameIndex++) {
406
- const pngUrl = `${getProxyPath()}assets/${type}/${id}/${currentDirectionCode}/${frameIndex}.png`;
407
- console.log(`Loading frame ${frameIndex} for direction code ${currentDirectionCode} from: ${pngUrl}`);
408
- await processAndAddFrameFromPngUrl(currentDirectionCode, pngUrl);
541
+ const loadFrames = async () => {
542
+ showFrameLoading();
543
+
544
+ // Clear all frames and data at the start to prevent duplication from multiple calls
545
+ // This must happen BEFORE any async operations to avoid race conditions
546
+ for (const directionCode of directionCodes) {
547
+ // Clear DOM frames for this direction code
548
+ const framesContainer = s(`.frames-${directionCode}`);
549
+ if (framesContainer) {
550
+ framesContainer.innerHTML = '';
551
+ }
552
+ // Clear data for this direction code
553
+ ObjectLayerEngineModal.ObjectLayerData[directionCode] = [];
554
+ }
555
+
556
+ for (const directionCode of directionCodes) {
557
+ // Use IIFE to properly capture directionCode and handle async operations
558
+ await (async (currentDirectionCode) => {
559
+ // Register frame add button handler after DOM is ready
560
+ // Wait longer to ensure all direction bars are rendered
561
+
562
+ if (loadedData && loadedData.metadata && loadedData.metadata.data && currentDirectionCode) {
563
+ // Show loading animation only once on first direction that has frames
564
+
565
+ const { type, id } = loadedData.metadata.data.item;
566
+ const directions = ObjectLayerEngineModal.getDirectionsFromDirectionCode(currentDirectionCode);
567
+
568
+ console.log(`Loading frames for direction code: ${currentDirectionCode}, directions:`, directions);
569
+
570
+ // Check if frames exist for any direction mapped to this direction code
571
+ const { frames } = loadedData.renderData.data.render;
572
+ for (const direction of directions) {
573
+ if (frames[direction] && frames[direction].length > 0) {
574
+ // Track this direction code as having original data
575
+ if (!originalDirectionCodes.includes(currentDirectionCode)) {
576
+ originalDirectionCodes.push(currentDirectionCode);
577
+ }
578
+ // Load frames from static PNG URLs sequentially to avoid race conditions
579
+ const frameCount = frames[direction].length;
580
+ console.log(`Found ${frameCount} frames for direction: ${direction} (code: ${currentDirectionCode})`);
581
+ for (let frameIndex = 0; frameIndex < frameCount; frameIndex++) {
582
+ const pngUrl = `${getProxyPath()}assets/${type}/${id}/${currentDirectionCode}/${frameIndex}.png`;
583
+ console.log(
584
+ `Loading frame ${frameIndex} for direction code ${currentDirectionCode} from: ${pngUrl}`,
585
+ );
586
+ await processAndAddFrameFromPngUrl(currentDirectionCode, pngUrl);
587
+ }
588
+ console.log(`Completed loading ${frameCount} frames for direction code: ${currentDirectionCode}`);
589
+ // Once we found frames for this direction code, we can break to avoid duplicates
590
+ break;
409
591
  }
410
- console.log(`Completed loading ${frameCount} frames for direction code: ${currentDirectionCode}`);
411
- // Once we found frames for this direction code, we can break to avoid duplicates
412
- break;
413
592
  }
414
593
  }
415
- }
416
594
 
417
- const buttonSelector = `.direction-code-bar-frames-btn-${currentDirectionCode}`;
418
- console.log(`Registering click handler for: ${buttonSelector}`);
595
+ const buttonSelector = `.direction-code-bar-frames-btn-${currentDirectionCode}`;
596
+ console.log(`Registering click handler for: ${buttonSelector}`);
419
597
 
420
- EventsUI.onClick(buttonSelector, async () => {
421
- console.log(`Add frame button clicked for direction: ${currentDirectionCode}`);
422
- const ole = s('object-layer-engine');
423
- if (!ole) {
424
- console.error('object-layer-engine not found');
425
- return;
426
- }
427
- const image = await ole.toBlob();
428
- const json = ole.exportMatrixJSON();
429
- const id = `frame-capture-${s4()}-${s4()}`;
430
- console.log(`Creating new frame ${id} for direction ${currentDirectionCode}`);
431
-
432
- if (!ObjectLayerEngineModal.ObjectLayerData[currentDirectionCode])
433
- ObjectLayerEngineModal.ObjectLayerData[currentDirectionCode] = [];
434
- ObjectLayerEngineModal.ObjectLayerData[currentDirectionCode].push({ id, image, json });
435
- console.log(
436
- `Stored frame ${id} in direction code ${currentDirectionCode}. Total frames:`,
437
- ObjectLayerEngineModal.ObjectLayerData[currentDirectionCode].length,
438
- );
598
+ EventsUI.onClick(buttonSelector, async () => {
599
+ console.log(`Add frame button clicked for direction: ${currentDirectionCode}`);
600
+ const ole = s('object-layer-engine');
601
+ if (!ole) {
602
+ console.error('object-layer-engine not found');
603
+ return;
604
+ }
605
+ const image = await ole.toBlob();
606
+ const json = ole.exportMatrixJSON();
607
+
608
+ // Check if we're in edit mode
609
+ if (editingFrameId && editingDirectionCode) {
610
+ // Ensure we're clicking the add button for the same direction being edited
611
+ if (currentDirectionCode !== editingDirectionCode) {
612
+ NotificationManager.Push({
613
+ html: `<i class="fa-solid fa-exclamation-circle"></i> Please click the glowing <i class="fa-solid fa-edit"></i> button for direction <strong>${editingDirectionCode}</strong> to save changes, or click <i class="fa-solid fa-times"></i> to cancel.`,
614
+ status: 'warning',
615
+ });
616
+ return; // Don't add a new frame
617
+ }
439
618
 
440
- await addFrameToBar(currentDirectionCode, id, image, json);
441
- });
442
- })(directionCode);
443
- }
444
- hideFrameLoading();
619
+ // UPDATE existing frame
620
+ console.log(`Updating frame ${editingFrameId} in direction ${editingDirectionCode}`);
621
+
622
+ // Find the frame in the data array
623
+ const frameArray = ObjectLayerEngineModal.ObjectLayerData[editingDirectionCode];
624
+ const frameIndex = frameArray?.findIndex((frame) => frame.id === editingFrameId);
625
+
626
+ if (frameIndex !== undefined && frameIndex >= 0) {
627
+ // Update the frame data while preserving the ID and index
628
+ frameArray[frameIndex] = {
629
+ id: editingFrameId,
630
+ image,
631
+ json,
632
+ };
633
+
634
+ // Update the visual representation
635
+ const imgElement = s(`.direction-code-bar-frames-img-${editingFrameId}`);
636
+ if (imgElement) {
637
+ imgElement.src = URL.createObjectURL(image);
638
+ }
639
+
640
+ console.log(`Frame ${editingFrameId} updated successfully at index ${frameIndex}`);
641
+ NotificationManager.Push({
642
+ html: `<i class="fa-solid fa-check-circle"></i> Frame updated successfully at position ${frameIndex + 1}!`,
643
+ status: 'success',
644
+ });
645
+ } else {
646
+ console.error(`Could not find frame ${editingFrameId} in direction ${editingDirectionCode}`);
647
+ NotificationManager.Push({
648
+ html: `<i class="fa-solid fa-exclamation-triangle"></i> Error: Could not find frame to update`,
649
+ status: 'error',
650
+ });
651
+ }
652
+
653
+ // Exit edit mode and restore UI
654
+ exitEditMode();
655
+ } else {
656
+ // ADD new frame (existing behavior)
657
+ const id = `frame-capture-${s4()}-${s4()}`;
658
+ console.log(`Creating new frame ${id} for direction ${currentDirectionCode}`);
659
+
660
+ if (!ObjectLayerEngineModal.ObjectLayerData[currentDirectionCode])
661
+ ObjectLayerEngineModal.ObjectLayerData[currentDirectionCode] = [];
662
+ ObjectLayerEngineModal.ObjectLayerData[currentDirectionCode].push({ id, image, json });
663
+ console.log(
664
+ `Stored frame ${id} in direction code ${currentDirectionCode}. Total frames:`,
665
+ ObjectLayerEngineModal.ObjectLayerData[currentDirectionCode].length,
666
+ );
667
+
668
+ await addFrameToBar(currentDirectionCode, id, image, json);
669
+ }
670
+ });
671
+ })(directionCode);
672
+ }
673
+ hideFrameLoading();
674
+ };
675
+ RouterEvents[`router-${options.idModal}`] = loadFrames;
676
+
677
+ await loadFrames();
445
678
  s('object-layer-engine').clear();
446
679
 
447
680
  EventsUI.onClick(`.ol-btn-save`, async () => {
@@ -704,10 +937,32 @@ const ObjectLayerEngineModal = {
704
937
  cursor: pointer;
705
938
  }
706
939
  .direction-code-bar-trash-btn {
940
+ top: 3px;
941
+ left: 30px;
942
+ color: white;
943
+ border: none !important;
944
+ }
945
+ .direction-code-bar-edit-btn {
707
946
  top: 3px;
708
947
  left: 3px;
709
- background: red;
710
948
  color: white;
949
+ border: none !important;
950
+ }
951
+ .direction-code-bar-frames-btn-add {
952
+ color: white;
953
+ border: none !important;
954
+ }
955
+ .direction-code-bar-trash-btn:hover {
956
+ background: none !important;
957
+ color: red;
958
+ }
959
+ .direction-code-bar-edit-btn:hover {
960
+ background: none !important;
961
+ color: yellow;
962
+ }
963
+ .direction-code-bar-frames-btn-add:hover {
964
+ background: none !important;
965
+ color: #c7ff58;
711
966
  }
712
967
  .ol-btn-save {
713
968
  width: 120px;
@@ -753,7 +1008,13 @@ const ObjectLayerEngineModal = {
753
1008
  font-size: 26px;
754
1009
  }
755
1010
  </style>
756
- ${borderChar(2, 'black', ['.sub-title-modal', '.frame-editor-container-loading'])}
1011
+ ${borderChar(2, 'black', [
1012
+ '.sub-title-modal',
1013
+ '.frame-editor-container-loading',
1014
+ '.direction-code-bar-edit-btn',
1015
+ '.direction-code-bar-trash-btn',
1016
+ '.direction-code-bar-frames-btn-add',
1017
+ ])}
757
1018
  <div class="in frame-editor-container-loading">
758
1019
  <div class="abs center frame-editor-container-loading-center"></div>
759
1020
  </div>
@@ -937,20 +1198,22 @@ const ObjectLayerEngineModal = {
937
1198
  },
938
1199
  toManagement: async () => {
939
1200
  await ObjectLayerEngineModal.clearData();
1201
+ const subModalId = 'viewer' || 'management';
1202
+ const modalId = `modal-object-layer-engine-${subModalId}`;
940
1203
  const queryParams = getQueryParams();
1204
+ queryParams.cid = '';
941
1205
  queryParams.page = 1;
942
1206
  setQueryParams(queryParams);
943
- const modalId = 'modal-object-layer-engine-management';
944
1207
  const managerComponent = DefaultManagement.Tokens[modalId];
945
1208
  if (managerComponent) {
946
1209
  managerComponent.page = 1;
947
1210
  if (!managerComponent.readyRowDataEvent) managerComponent.readyRowDataEvent = {};
948
1211
  let readyLoad = false;
949
1212
  const gridId = `object-layer-engine-management-grid-${modalId}`;
950
- managerComponent.readyRowDataEvent['object-layer-engine-management'] = async () => {
1213
+ managerComponent.readyRowDataEvent[`object-layer-engine-${subModalId}`] = async () => {
951
1214
  if (readyLoad) {
952
1215
  AgGrid.grids[gridId].setGridOption('getRowClass', null);
953
- return delete managerComponent.readyRowDataEvent['object-layer-engine-management'];
1216
+ return delete managerComponent.readyRowDataEvent[`object-layer-engine-${subModalId}`];
954
1217
  }
955
1218
 
956
1219
  AgGrid.grids[gridId].setGridOption('getRowClass', (params) => {
@@ -962,10 +1225,10 @@ const ObjectLayerEngineModal = {
962
1225
  };
963
1226
  }
964
1227
 
965
- const _s = s(`.management-table-btn-reload-${modalId}`);
1228
+ const _s = s(` .management-table-btn-reload-${modalId}`);
966
1229
  if (_s) _s.click();
967
1230
 
968
- s(`.main-btn-object-layer-engine-management`).click();
1231
+ s(`.main-btn-object-layer-engine-${subModalId}`).click();
969
1232
  },
970
1233
  Reload: async function () {
971
1234
  // Clear data before reload to prevent contamination