@if (debugLimitsConfiguration) {
- {{ 'debug-config.hint.main-limited' | translate: { msg: maxMessagesCount, sec: maxTimeFrameSec } }}
+ {{ 'debug-config.hint.main-limited' | translate: { msg: maxMessagesCount, time: (maxTimeFrameDuration | milliSecondsToTimeString: true : true) } }}
} @else {
{{ 'debug-config.hint.main' | translate }}
}
@@ -35,7 +35,7 @@
- {{ 'debug-config.all-messages' | translate: { time: (isDebugAllActive$ | async) && !allEnabled ? (allEnabledUntil | durationLeft) : ('debug-config.min' | translate: { number: maxDebugModeDurationMinutes }) } }}
+ {{ 'debug-config.all-messages' | translate: { time: (isDebugAllActive$ | async) && !allEnabled ? (allEnabledUntil | durationLeft) : (maxDebugModeDuration | milliSecondsToTimeString: true : true) } }}
diff --git a/ui-ngx/src/app/modules/home/components/debug-settings/debug-settings-panel.component.ts b/ui-ngx/src/app/modules/home/components/debug-settings/debug-settings-panel.component.ts
index a9e237245c..2c98dee6c4 100644
--- a/ui-ngx/src/app/modules/home/components/debug-settings/debug-settings-panel.component.ts
+++ b/ui-ngx/src/app/modules/home/components/debug-settings/debug-settings-panel.component.ts
@@ -52,14 +52,14 @@ export class DebugSettingsPanelComponent extends PageComponent implements OnInit
@Input({ transform: booleanAttribute }) failuresEnabled = false;
@Input({ transform: booleanAttribute }) allEnabled = false;
@Input() allEnabledUntil = 0;
- @Input() maxDebugModeDurationMinutes: number;
+ @Input() maxDebugModeDuration: number;
@Input() debugLimitsConfiguration: string;
onFailuresControl = this.fb.control(false);
debugAllControl = this.fb.control(false);
maxMessagesCount: string;
- maxTimeFrameSec: string;
+ maxTimeFrameDuration: number;
initialAllEnabled: boolean;
isDebugAllActive$ = this.debugAllControl.valueChanges.pipe(
@@ -99,7 +99,7 @@ export class DebugSettingsPanelComponent extends PageComponent implements OnInit
ngOnInit(): void {
this.maxMessagesCount = this.debugLimitsConfiguration?.split(':')[0];
- this.maxTimeFrameSec = this.debugLimitsConfiguration?.split(':')[1];
+ this.maxTimeFrameDuration = parseInt(this.debugLimitsConfiguration?.split(':')[1]) * SECOND;
this.onFailuresControl.patchValue(this.failuresEnabled);
this.debugAllControl.patchValue(this.allEnabled);
this.initialAllEnabled = this.allEnabled || this.allEnabledUntil > new Date().getTime();
@@ -128,6 +128,7 @@ export class DebugSettingsPanelComponent extends PageComponent implements OnInit
onReset(): void {
this.debugAllControl.patchValue(true);
+ this.debugAllControl.markAsDirty();
this.allEnabledUntil = 0;
this.cd.markForCheck();
}
diff --git a/ui-ngx/src/app/modules/home/pages/rulechain/rulechain-page.component.html b/ui-ngx/src/app/modules/home/pages/rulechain/rulechain-page.component.html
index 5e955dc4b4..7bf85aa215 100644
--- a/ui-ngx/src/app/modules/home/pages/rulechain/rulechain-page.component.html
+++ b/ui-ngx/src/app/modules/home/pages/rulechain/rulechain-page.component.html
@@ -239,10 +239,10 @@
matTooltipPosition="above">
delete
-
diff --git a/ui-ngx/src/app/modules/home/pages/rulechain/rulechain-page.component.ts b/ui-ngx/src/app/modules/home/pages/rulechain/rulechain-page.component.ts
index 35b10a27b3..20257c53d8 100644
--- a/ui-ngx/src/app/modules/home/pages/rulechain/rulechain-page.component.ts
+++ b/ui-ngx/src/app/modules/home/pages/rulechain/rulechain-page.component.ts
@@ -95,6 +95,7 @@ import { ComponentClusteringMode } from '@shared/models/component-descriptor.mod
import { MatDrawer } from '@angular/material/sidenav';
import { HttpStatusCode } from '@angular/common/http';
import { TbContextMenuEvent } from '@shared/models/jquery-event.models';
+import { DebugSettings } from '@shared/models/entity.models';
import Timeout = NodeJS.Timeout;
@Component({
@@ -1415,17 +1416,20 @@ export class RuleChainPageComponent extends PageComponent
this.ruleChainCanvas.modelService.deleteSelected();
}
- isDebugModeEnabled(): boolean {
- const res = this.ruleChainModel.nodes.find((node) => node.debugMode);
+ isDebugSettingsEnabled(): boolean {
+ const res = this.ruleChainModel.nodes.find((node) => node?.debugSettings && this.isDebugSettingsActive(node.debugSettings));
return typeof res !== 'undefined';
}
- resetDebugModeInAllNodes() {
+ resetDebugSettingsInAllNodes(): void {
let changed = false;
this.ruleChainModel.nodes.forEach((node) => {
if (node.component.type !== RuleNodeType.INPUT) {
- changed = changed || node.debugMode;
- node.debugMode = false;
+ const nodeHasActiveDebugSettings = node?.debugSettings && this.isDebugSettingsActive(node.debugSettings);
+ changed = changed || nodeHasActiveDebugSettings;
+ if (nodeHasActiveDebugSettings) {
+ node.debugSettings = { allEnabled: false, failuresEnabled: false, allEnabledUntil: 0 };
+ }
}
});
if (changed) {
@@ -1433,6 +1437,10 @@ export class RuleChainPageComponent extends PageComponent
}
}
+ private isDebugSettingsActive(debugSettings: DebugSettings): boolean {
+ return debugSettings.allEnabled || debugSettings.failuresEnabled || debugSettings.allEnabledUntil > new Date().getTime();
+ }
+
validate() {
setTimeout(() => {
this.isInvalid = false;
diff --git a/ui-ngx/src/app/shared/pipe/milliseconds-to-time-string.pipe.ts b/ui-ngx/src/app/shared/pipe/milliseconds-to-time-string.pipe.ts
index 853890ee09..8e8a0344ae 100644
--- a/ui-ngx/src/app/shared/pipe/milliseconds-to-time-string.pipe.ts
+++ b/ui-ngx/src/app/shared/pipe/milliseconds-to-time-string.pipe.ts
@@ -16,7 +16,7 @@
import { Pipe, PipeTransform } from '@angular/core';
import { TranslateService } from '@ngx-translate/core';
-import { DAY, HOUR, MINUTE, SECOND } from '@shared/models/time/time.models';
+import { DAY, HOUR, MINUTE, SECOND, YEAR } from '@shared/models/time/time.models';
@Pipe({
name: 'milliSecondsToTimeString'
@@ -27,19 +27,21 @@ export class MillisecondsToTimeStringPipe implements PipeTransform {
}
transform(milliSeconds: number, shortFormat = false, onlyFirstDigit = false): string {
- const { days, hours, minutes, seconds } = this.extractTimeUnits(milliSeconds);
- return this.formatTimeString(days, hours, minutes, seconds, shortFormat, onlyFirstDigit);
+ const { years, days, hours, minutes, seconds } = this.extractTimeUnits(milliSeconds);
+ return this.formatTimeString(years, days, hours, minutes, seconds, shortFormat, onlyFirstDigit);
}
- private extractTimeUnits(milliseconds: number): { days: number; hours: number; minutes: number; seconds: number } {
- const days = Math.floor(milliseconds / DAY);
+ private extractTimeUnits(milliseconds: number): { years: number; days: number; hours: number; minutes: number; seconds: number } {
+ const years = Math.floor(milliseconds / YEAR);
+ const days = Math.floor((milliseconds % YEAR) / DAY);
const hours = Math.floor((milliseconds % DAY) / HOUR);
const minutes = Math.floor((milliseconds % HOUR) / MINUTE);
const seconds = Math.floor((milliseconds % MINUTE) / SECOND);
- return { days, hours, minutes, seconds };
+ return { years, days, hours, minutes, seconds };
}
private formatTimeString(
+ years: number,
days: number,
hours: number,
minutes: number,
@@ -48,6 +50,7 @@ export class MillisecondsToTimeStringPipe implements PipeTransform {
onlyFirstDigit: boolean
): string {
const timeUnits = [
+ { value: years, key: 'years', shortKey: 'short.years' },
{ value: days, key: 'days', shortKey: 'short.days' },
{ value: hours, key: 'hours', shortKey: 'short.hours' },
{ value: minutes, key: 'minutes', shortKey: 'short.minutes' },
@@ -59,7 +62,7 @@ export class MillisecondsToTimeStringPipe implements PipeTransform {
if (value > 0) {
timeString += this.translate.instant(shortFormat ? `timewindow.${shortKey}` : `timewindow.${key}`, { [key]: value });
if (onlyFirstDigit) {
- return timeString;
+ return timeString.trim();
}
}
}
diff --git a/ui-ngx/src/assets/locale/locale.constant-ar_AE.json b/ui-ngx/src/assets/locale/locale.constant-ar_AE.json
index e4c7ddc917..695e1ad441 100644
--- a/ui-ngx/src/assets/locale/locale.constant-ar_AE.json
+++ b/ui-ngx/src/assets/locale/locale.constant-ar_AE.json
@@ -4602,7 +4602,6 @@
"output": "الإخراج",
"test": "اختبار",
"help": "مساعدة",
- "reset-debug-mode": "إعادة تعيين وضع التصحيح في جميع العقد",
"test-with-this-message": "{{test}} مع هذه الرسالة"
},
"role": {
diff --git a/ui-ngx/src/assets/locale/locale.constant-ca_ES.json b/ui-ngx/src/assets/locale/locale.constant-ca_ES.json
index c04c0e12cf..43a644a537 100644
--- a/ui-ngx/src/assets/locale/locale.constant-ca_ES.json
+++ b/ui-ngx/src/assets/locale/locale.constant-ca_ES.json
@@ -3651,8 +3651,7 @@
"metadata-required": "Les entrades de metadades no poden estar buides.",
"output": "Sortida",
"test": "Test",
- "help": "Ajuda",
- "reset-debug-mode": "Restablir el mode de depuració a tots els nodes"
+ "help": "Ajuda"
},
"role": {
"role": "Rol",
diff --git a/ui-ngx/src/assets/locale/locale.constant-cs_CZ.json b/ui-ngx/src/assets/locale/locale.constant-cs_CZ.json
index 67b8b22005..4ae54c4d65 100644
--- a/ui-ngx/src/assets/locale/locale.constant-cs_CZ.json
+++ b/ui-ngx/src/assets/locale/locale.constant-cs_CZ.json
@@ -2426,8 +2426,7 @@
"metadata-required": "Záznam metadat nemůže být prázdný.",
"output": "Výstup",
"test": "Test",
- "help": "Nápověda",
- "reset-debug-mode": "Resetovat režim ladění na všech uzlech"
+ "help": "Nápověda"
},
"timezone": {
"timezone": "Časová zóna",
diff --git a/ui-ngx/src/assets/locale/locale.constant-da_DK.json b/ui-ngx/src/assets/locale/locale.constant-da_DK.json
index 9d08a72085..fbfeddd886 100644
--- a/ui-ngx/src/assets/locale/locale.constant-da_DK.json
+++ b/ui-ngx/src/assets/locale/locale.constant-da_DK.json
@@ -2642,8 +2642,7 @@
"metadata-required": "Metadataposter må ikke være tomme.",
"output": "Output",
"test": "Test",
- "help": "Hjælp",
- "reset-debug-mode": "Nulstil debug-tilstand i alle knuder"
+ "help": "Hjælp"
},
"role": {
"role": "Rolle",
diff --git a/ui-ngx/src/assets/locale/locale.constant-el_GR.json b/ui-ngx/src/assets/locale/locale.constant-el_GR.json
index eea0ea4377..164b5486b9 100644
--- a/ui-ngx/src/assets/locale/locale.constant-el_GR.json
+++ b/ui-ngx/src/assets/locale/locale.constant-el_GR.json
@@ -1886,8 +1886,7 @@
"metadata-required": "Οι καταχωρίσεις μεταδεδομένων δεν μπορούν να είναι κενές.",
"output": "Απόδοση",
"test": "Τεστ",
- "help": "Βοήθεια",
- "reset-debug-mode": "Επαναφορά λειτουργίας εντοπισμού σφαλμάτων σε όλους τους κόμβους"
+ "help": "Βοήθεια"
},
"role": {
"role": "Ρόλος",
diff --git a/ui-ngx/src/assets/locale/locale.constant-en_US.json b/ui-ngx/src/assets/locale/locale.constant-en_US.json
index c891c6fd30..e7157222de 100644
--- a/ui-ngx/src/assets/locale/locale.constant-en_US.json
+++ b/ui-ngx/src/assets/locale/locale.constant-en_US.json
@@ -990,15 +990,13 @@
"type-sms-sent": "SMS sent"
},
"debug-config": {
- "min": "{{number}} min",
"label": "Debug configuration",
"on-failure": "Failures only (24/7)",
"all-messages": "All messages ({{time}})",
"failures": "Failures",
- "all": "All",
"hint": {
"main": "All node debug messages rate limited with:",
- "main-limited": "All node debug messages will be rate-limited, with a maximum of {{msg}} messages allowed per {{sec}} seconds.",
+ "main-limited": "All node debug messages will be rate-limited, with a maximum of {{msg}} messages allowed per {{time}}.",
"on-failure": "Save all failure debug events without time limit.",
"all-messages": "Save all debug events during time limit."
}
@@ -4295,7 +4293,7 @@
"output": "Output",
"test": "Test",
"help": "Help",
- "reset-debug-mode": "Reset debug mode in all nodes",
+ "reset-debug-settings": "Reset debug settings in all nodes",
"test-with-this-message": "{{test}} with this message",
"queue-hint": "Select a queue for message forwarding to another queue. 'Main' queue is used by default.",
"queue-singleton-hint": "Select a queue for message forwarding in multi-instance environments. 'Main' queue is used by default."
@@ -4745,6 +4743,7 @@
"sec": "{{ sec }} sec",
"sec-short": "{{ sec }}s",
"short": {
+ "years": "{ years, plural, =1 {1 year } other {# years } }",
"days": "{ days, plural, =1 {1 day } other {# days } }",
"hours": "{ hours, plural, =1 {1 hour } other {# hours } }",
"minutes": "{{minutes}} min ",
diff --git a/ui-ngx/src/assets/locale/locale.constant-es_ES.json b/ui-ngx/src/assets/locale/locale.constant-es_ES.json
index 0cb9528bdd..1122c1d6fa 100644
--- a/ui-ngx/src/assets/locale/locale.constant-es_ES.json
+++ b/ui-ngx/src/assets/locale/locale.constant-es_ES.json
@@ -3529,7 +3529,6 @@
"output": "Salida",
"test": "Test",
"help": "Ayuda",
- "reset-debug-mode": "Restablecer el modo de depuración en todos los nodos",
"test-with-this-message": "{{test}} con este mensaje"
},
"timezone": {
diff --git a/ui-ngx/src/assets/locale/locale.constant-ka_GE.json b/ui-ngx/src/assets/locale/locale.constant-ka_GE.json
index f645cb0f31..ae8ce2b943 100644
--- a/ui-ngx/src/assets/locale/locale.constant-ka_GE.json
+++ b/ui-ngx/src/assets/locale/locale.constant-ka_GE.json
@@ -1413,8 +1413,7 @@
"metadata-required": "მეტამონაცემები ვერ იქნება ცარიელი",
"output": "რეზულტატი",
"test": "ტესტი",
- "help": "დახმარება",
- "reset-debug-mode": "Debug რეჟიმის გათიშვა ყველა ნოდისთვის"
+ "help": "დახმარება"
},
"tenant": {
"tenant": "ტენანტი",
diff --git a/ui-ngx/src/assets/locale/locale.constant-ko_KR.json b/ui-ngx/src/assets/locale/locale.constant-ko_KR.json
index 9235fc9e95..80a2cb0830 100644
--- a/ui-ngx/src/assets/locale/locale.constant-ko_KR.json
+++ b/ui-ngx/src/assets/locale/locale.constant-ko_KR.json
@@ -1878,8 +1878,7 @@
"metadata-required": "메타데이터 엔트리를 입력하세요.",
"output": "출력",
"test": "테스트",
- "help": "도움말",
- "reset-debug-mode": "모든 노드에 대해 디버그 모드 초기화"
+ "help": "도움말"
},
"timezone": {
"timezone": "Timezone",
diff --git a/ui-ngx/src/assets/locale/locale.constant-lt_LT.json b/ui-ngx/src/assets/locale/locale.constant-lt_LT.json
index c856652198..89191ea064 100644
--- a/ui-ngx/src/assets/locale/locale.constant-lt_LT.json
+++ b/ui-ngx/src/assets/locale/locale.constant-lt_LT.json
@@ -4504,7 +4504,6 @@
"output": "Output",
"test": "Test",
"help": "Help",
- "reset-debug-mode": "Reset debug mode in all nodes",
"test-with-this-message": "{{test}} with this message"
},
"role": {
diff --git a/ui-ngx/src/assets/locale/locale.constant-lv_LV.json b/ui-ngx/src/assets/locale/locale.constant-lv_LV.json
index 0f5c946063..bba71609ec 100644
--- a/ui-ngx/src/assets/locale/locale.constant-lv_LV.json
+++ b/ui-ngx/src/assets/locale/locale.constant-lv_LV.json
@@ -1338,8 +1338,7 @@
"metadata-required": "Metadatu ievadi nevar būt tukši.",
"output": "Izeja",
"test": "Tests",
- "help": "Palīdzība",
- "reset-debug-mode": "Atiestatīt atkļūdošanu visās nodēs"
+ "help": "Palīdzība"
},
"tenant": {
"tenant": "Īrnieks",
diff --git a/ui-ngx/src/assets/locale/locale.constant-nl_BE.json b/ui-ngx/src/assets/locale/locale.constant-nl_BE.json
index f9fe60f44d..7b99ad9953 100644
--- a/ui-ngx/src/assets/locale/locale.constant-nl_BE.json
+++ b/ui-ngx/src/assets/locale/locale.constant-nl_BE.json
@@ -4560,8 +4560,7 @@
"metadata-required": "Metagegevensvermeldingen mogen niet leeg zijn.",
"output": "Uitvoer",
"test": "Test",
- "help": "Help",
- "reset-debug-mode": "Foutopsporingsmodus resetten in alle rule nodes"
+ "help": "Help"
},
"role": {
"role": "Rol",
diff --git a/ui-ngx/src/assets/locale/locale.constant-pl_PL.json b/ui-ngx/src/assets/locale/locale.constant-pl_PL.json
index 9ab89169c0..b369f061b7 100644
--- a/ui-ngx/src/assets/locale/locale.constant-pl_PL.json
+++ b/ui-ngx/src/assets/locale/locale.constant-pl_PL.json
@@ -4520,7 +4520,6 @@
"output": "Wyjście",
"test": "Test",
"help": "Pomoc",
- "reset-debug-mode": "Zresetuj tryb debugowania we wszystkich węzłach",
"test-with-this-message": "{{test}} with this message",
"description": "Opis"
},
diff --git a/ui-ngx/src/assets/locale/locale.constant-pt_BR.json b/ui-ngx/src/assets/locale/locale.constant-pt_BR.json
index 8b77be4573..bfc616e40b 100644
--- a/ui-ngx/src/assets/locale/locale.constant-pt_BR.json
+++ b/ui-ngx/src/assets/locale/locale.constant-pt_BR.json
@@ -1554,8 +1554,7 @@
"metadata-required": "As entradas de metadados não podem estar em branco.",
"output": "Saída",
"test": "Teste",
- "help": "Ajuda",
- "reset-debug-mode": "Redefinir modo de depuração em todos os nós"
+ "help": "Ajuda"
},
"timezone": {
"timezone": "Fuso horário",
diff --git a/ui-ngx/src/assets/locale/locale.constant-ro_RO.json b/ui-ngx/src/assets/locale/locale.constant-ro_RO.json
index 2eb5bc491a..1054b812a1 100644
--- a/ui-ngx/src/assets/locale/locale.constant-ro_RO.json
+++ b/ui-ngx/src/assets/locale/locale.constant-ro_RO.json
@@ -1401,7 +1401,6 @@
"output": "Ieşire",
"test": "Test",
"help": "Ajutor",
- "reset-debug-mode": "Dezactivează modul depanare în toate nodurile"
},
"tenant": {
"tenant": "Locatar",
diff --git a/ui-ngx/src/assets/locale/locale.constant-sl_SI.json b/ui-ngx/src/assets/locale/locale.constant-sl_SI.json
index ff23223107..668bf8c2c9 100644
--- a/ui-ngx/src/assets/locale/locale.constant-sl_SI.json
+++ b/ui-ngx/src/assets/locale/locale.constant-sl_SI.json
@@ -1879,8 +1879,7 @@
"metadata-required": "Vnosi metapodatkov ne smejo biti prazni.",
"output": "Izdelek",
"test": "Test",
- "help": "Pomoč",
- "reset-debug-mode": "Ponastavi način za odpravljanje napak v vseh vozliščih"
+ "help": "Pomoč"
},
"timezone": {
"timezone": "Časovni pas",
diff --git a/ui-ngx/src/assets/locale/locale.constant-tr_TR.json b/ui-ngx/src/assets/locale/locale.constant-tr_TR.json
index e954e8f2e1..98998ab312 100644
--- a/ui-ngx/src/assets/locale/locale.constant-tr_TR.json
+++ b/ui-ngx/src/assets/locale/locale.constant-tr_TR.json
@@ -2447,8 +2447,7 @@
"metadata-required": "Meta veri girişleri boş bırakılamaz.",
"output": "Çıktı",
"test": "Ölçek",
- "help": "Yardım et",
- "reset-debug-mode": "Tüm düğümlerde hata ayıklama modunu sıfırla"
+ "help": "Yardım et"
},
"timezone": {
"timezone": "Saat dilimi",
diff --git a/ui-ngx/src/assets/locale/locale.constant-uk_UA.json b/ui-ngx/src/assets/locale/locale.constant-uk_UA.json
index e1bf787994..acb837a587 100644
--- a/ui-ngx/src/assets/locale/locale.constant-uk_UA.json
+++ b/ui-ngx/src/assets/locale/locale.constant-uk_UA.json
@@ -1979,7 +1979,7 @@
"output": "Вихід",
"test": "Тест",
"help": "Допомога",
- "reset-debug-mode": "Вимкнути режим налагодження у всіх правилах"
+ "reset-debug-settings": "Вимкнути налаштування налагодження у всіх правилах"
},
"scheduler": {
"scheduler": "Планувальник",
diff --git a/ui-ngx/src/assets/locale/locale.constant-zh_CN.json b/ui-ngx/src/assets/locale/locale.constant-zh_CN.json
index f0dacca36d..47096fe5f2 100644
--- a/ui-ngx/src/assets/locale/locale.constant-zh_CN.json
+++ b/ui-ngx/src/assets/locale/locale.constant-zh_CN.json
@@ -4012,7 +4012,6 @@
"output": "输出",
"test": "测试",
"help": "帮助",
- "reset-debug-mode": "重置所有节点中的调试模式",
"test-with-this-message": "使用此消息进行{{test}}测试",
"queue-hint": "选择一个队列将消息转发到另一个队列,默认情况下使用'Main'队列。",
"queue-singleton-hint": "选择一个队列以在多实体中转发消息,默认情况下使用'Main'队列。"
diff --git a/ui-ngx/src/assets/locale/locale.constant-zh_TW.json b/ui-ngx/src/assets/locale/locale.constant-zh_TW.json
index a100d95fa4..64b4c71f16 100644
--- a/ui-ngx/src/assets/locale/locale.constant-zh_TW.json
+++ b/ui-ngx/src/assets/locale/locale.constant-zh_TW.json
@@ -2768,8 +2768,7 @@
"metadata-required": "元資料項不能為空。",
"output": "輸出",
"test": "測試",
- "help": "幫助",
- "reset-debug-mode": "重置所有節點中的調試模式"
+ "help": "幫助"
},
"timezone": {
"timezone": "時區",