cat-qw-lib 2.6.63 → 2.6.65

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.
@@ -8398,9 +8398,8 @@ class QueueContainerComponent extends BaseContainerComponent {
8398
8398
  });
8399
8399
  filterQueryString = existingParams.toString();
8400
8400
  }
8401
- let apiConfigUrl = this.selectedQueue.apiConfig;
8402
- apiConfigUrl = apiConfigUrl = apiConfigUrl.replace(/^https?:\/\/[^\/]+/, 'http://localhost:3300');
8403
- this.queueService.getPaginatedQueueRecords(apiConfigUrl, this.currentSearchTerm, targetPage, targetLimit, filterQueryString, this.sortBy, this.getSortOrderString(this.sortOrder), !forceRefresh).pipe(finalize(() => {
8401
+ const apiUrl = this.replaceWithLocalhost(this.selectedQueue.apiConfig);
8402
+ this.queueService.getPaginatedQueueRecords(apiUrl, this.currentSearchTerm, targetPage, targetLimit, filterQueryString, this.sortBy, this.getSortOrderString(this.sortOrder), !forceRefresh).pipe(finalize(() => {
8404
8403
  if (this.latestRequestSnapshot === requestSnapshot) {
8405
8404
  this.isShowSkeleton = false;
8406
8405
  }
@@ -8458,6 +8457,17 @@ class QueueContainerComponent extends BaseContainerComponent {
8458
8457
  }
8459
8458
  });
8460
8459
  }
8460
+ replaceWithLocalhost(url) {
8461
+ try {
8462
+ const parsed = new URL(url);
8463
+ parsed.host = 'localhost:3300';
8464
+ parsed.protocol = 'http:'; // ensure localhost uses http
8465
+ return parsed.toString();
8466
+ }
8467
+ catch (e) {
8468
+ return url; // fallback if invalid URL
8469
+ }
8470
+ }
8461
8471
  getSortOrderString(order) {
8462
8472
  if (order === 1)
8463
8473
  return 'asc';