Browse Source

UI: Debug Settings minor refactoring, files rename

pull/12226/head
mpetrov 2 years ago
parent
commit
74543f80d2
  1. 0
      ui-ngx/src/app/modules/home/components/entity/debug/entity-debug-settings-button.component.html
  2. 12
      ui-ngx/src/app/modules/home/components/entity/debug/entity-debug-settings-button.component.ts
  3. 0
      ui-ngx/src/app/modules/home/components/entity/debug/entity-debug-settings-panel.component.html
  4. 8
      ui-ngx/src/app/modules/home/components/entity/debug/entity-debug-settings-panel.component.ts
  5. 2
      ui-ngx/src/app/modules/home/pages/rulechain/rule-node-details.component.html
  6. 4
      ui-ngx/src/app/modules/home/pages/rulechain/rulechain.module.ts

0
ui-ngx/src/app/modules/home/components/entity/debug/debug-settings-button.component.html → ui-ngx/src/app/modules/home/components/entity/debug/entity-debug-settings-button.component.html

12
ui-ngx/src/app/modules/home/components/entity/debug/debug-settings-button.component.ts → ui-ngx/src/app/modules/home/components/entity/debug/entity-debug-settings-button.component.ts

@ -29,7 +29,7 @@ import { SharedModule } from '@shared/shared.module';
import { DurationLeftPipe } from '@shared/pipe/duration-left.pipe'; import { DurationLeftPipe } from '@shared/pipe/duration-left.pipe';
import { TbPopoverService } from '@shared/components/popover.service'; import { TbPopoverService } from '@shared/components/popover.service';
import { MatButton } from '@angular/material/button'; import { MatButton } from '@angular/material/button';
import { DebugSettingsPanelComponent } from './debug-settings-panel.component'; import { EntityDebugSettingsPanelComponent } from './entity-debug-settings-panel.component';
import { takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop'; import { takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop';
import { of, shareReplay, timer } from 'rxjs'; import { of, shareReplay, timer } from 'rxjs';
import { SECOND, MINUTE } from '@shared/models/time/time.models'; import { SECOND, MINUTE } from '@shared/models/time/time.models';
@ -41,8 +41,8 @@ import { Store } from '@ngrx/store';
import { ControlValueAccessor, FormBuilder, NG_VALUE_ACCESSOR } from '@angular/forms'; import { ControlValueAccessor, FormBuilder, NG_VALUE_ACCESSOR } from '@angular/forms';
@Component({ @Component({
selector: 'tb-debug-settings-button', selector: 'tb-entity-debug-settings-button',
templateUrl: './debug-settings-button.component.html', templateUrl: './entity-debug-settings-button.component.html',
standalone: true, standalone: true,
imports: [ imports: [
CommonModule, CommonModule,
@ -52,13 +52,13 @@ import { ControlValueAccessor, FormBuilder, NG_VALUE_ACCESSOR } from '@angular/f
providers: [ providers: [
{ {
provide: NG_VALUE_ACCESSOR, provide: NG_VALUE_ACCESSOR,
useExisting: forwardRef(() => DebugSettingsButtonComponent), useExisting: forwardRef(() => EntityDebugSettingsButtonComponent),
multi: true multi: true
}, },
], ],
changeDetection: ChangeDetectionStrategy.OnPush changeDetection: ChangeDetectionStrategy.OnPush
}) })
export class DebugSettingsButtonComponent implements ControlValueAccessor { export class EntityDebugSettingsButtonComponent implements ControlValueAccessor {
@Input() debugLimitsConfiguration: string; @Input() debugLimitsConfiguration: string;
@ -127,7 +127,7 @@ export class DebugSettingsButtonComponent implements ControlValueAccessor {
this.popoverService.hidePopover(trigger); this.popoverService.hidePopover(trigger);
} else { } else {
const debugStrategyPopover = this.popoverService.displayPopover(trigger, this.renderer, const debugStrategyPopover = this.popoverService.displayPopover(trigger, this.renderer,
this.viewContainerRef, DebugSettingsPanelComponent, 'bottom', true, null, this.viewContainerRef, EntityDebugSettingsPanelComponent, 'bottom', true, null,
{ {
...debugSettings, ...debugSettings,
maxDebugModeDuration: this.maxDebugModeDuration, maxDebugModeDuration: this.maxDebugModeDuration,

0
ui-ngx/src/app/modules/home/components/entity/debug/debug-settings-panel.component.html → ui-ngx/src/app/modules/home/components/entity/debug/entity-debug-settings-panel.component.html

8
ui-ngx/src/app/modules/home/components/entity/debug/debug-settings-panel.component.ts → ui-ngx/src/app/modules/home/components/entity/debug/entity-debug-settings-panel.component.ts

@ -36,8 +36,8 @@ import { EntityDebugSettings } from '@shared/models/entity.models';
import { distinctUntilChanged, map, startWith, switchMap, takeWhile } from 'rxjs/operators'; import { distinctUntilChanged, map, startWith, switchMap, takeWhile } from 'rxjs/operators';
@Component({ @Component({
selector: 'tb-debug-settings-panel', selector: 'tb-entity-debug-settings-panel',
templateUrl: './debug-settings-panel.component.html', templateUrl: './entity-debug-settings-panel.component.html',
standalone: true, standalone: true,
imports: [ imports: [
SharedModule, SharedModule,
@ -46,9 +46,9 @@ import { distinctUntilChanged, map, startWith, switchMap, takeWhile } from 'rxjs
], ],
changeDetection: ChangeDetectionStrategy.OnPush changeDetection: ChangeDetectionStrategy.OnPush
}) })
export class DebugSettingsPanelComponent extends PageComponent implements OnInit { export class EntityDebugSettingsPanelComponent extends PageComponent implements OnInit {
@Input() popover: TbPopoverComponent<DebugSettingsPanelComponent>; @Input() popover: TbPopoverComponent<EntityDebugSettingsPanelComponent>;
@Input({ transform: booleanAttribute }) failuresEnabled = false; @Input({ transform: booleanAttribute }) failuresEnabled = false;
@Input({ transform: booleanAttribute }) allEnabled = false; @Input({ transform: booleanAttribute }) allEnabled = false;
@Input() allEnabledUntil = 0; @Input() allEnabledUntil = 0;

2
ui-ngx/src/app/modules/home/pages/rulechain/rule-node-details.component.html

@ -35,7 +35,7 @@
</mat-error> </mat-error>
</mat-form-field> </mat-form-field>
<section class="mb-5 flex max-w-xs flex-row"> <section class="mb-5 flex max-w-xs flex-row">
<tb-debug-settings-button <tb-entity-debug-settings-button
class="mr-2" class="mr-2"
formControlName="debugSettings" formControlName="debugSettings"
[debugLimitsConfiguration]="ruleChainDebugPerTenantLimitsConfiguration" [debugLimitsConfiguration]="ruleChainDebugPerTenantLimitsConfiguration"

4
ui-ngx/src/app/modules/home/pages/rulechain/rulechain.module.ts

@ -33,7 +33,7 @@ import { RuleNodeLinkComponent } from './rule-node-link.component';
import { LinkLabelsComponent } from '@home/pages/rulechain/link-labels.component'; import { LinkLabelsComponent } from '@home/pages/rulechain/link-labels.component';
import { RuleNodeConfigComponent } from './rule-node-config.component'; import { RuleNodeConfigComponent } from './rule-node-config.component';
import { DurationLeftPipe } from '@shared/pipe/duration-left.pipe'; import { DurationLeftPipe } from '@shared/pipe/duration-left.pipe';
import { DebugSettingsButtonComponent } from '@home/components/entity/debug/debug-settings-button.component'; import { EntityDebugSettingsButtonComponent } from '@home/components/entity/debug/entity-debug-settings-button.component';
@NgModule({ @NgModule({
declarations: [ declarations: [
@ -63,7 +63,7 @@ import { DebugSettingsButtonComponent } from '@home/components/entity/debug/debu
HomeComponentsModule, HomeComponentsModule,
RuleChainRoutingModule, RuleChainRoutingModule,
DurationLeftPipe, DurationLeftPipe,
DebugSettingsButtonComponent EntityDebugSettingsButtonComponent
] ]
}) })
export class RuleChainModule { } export class RuleChainModule { }

Loading…
Cancel
Save