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 { TbPopoverService } from '@shared/components/popover.service';
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 { of, shareReplay, timer } from 'rxjs';
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';
@Component({
selector: 'tb-debug-settings-button',
templateUrl: './debug-settings-button.component.html',
selector: 'tb-entity-debug-settings-button',
templateUrl: './entity-debug-settings-button.component.html',
standalone: true,
imports: [
CommonModule,
@ -52,13 +52,13 @@ import { ControlValueAccessor, FormBuilder, NG_VALUE_ACCESSOR } from '@angular/f
providers: [
{
provide: NG_VALUE_ACCESSOR,
useExisting: forwardRef(() => DebugSettingsButtonComponent),
useExisting: forwardRef(() => EntityDebugSettingsButtonComponent),
multi: true
},
],
changeDetection: ChangeDetectionStrategy.OnPush
})
export class DebugSettingsButtonComponent implements ControlValueAccessor {
export class EntityDebugSettingsButtonComponent implements ControlValueAccessor {
@Input() debugLimitsConfiguration: string;
@ -127,7 +127,7 @@ export class DebugSettingsButtonComponent implements ControlValueAccessor {
this.popoverService.hidePopover(trigger);
} else {
const debugStrategyPopover = this.popoverService.displayPopover(trigger, this.renderer,
this.viewContainerRef, DebugSettingsPanelComponent, 'bottom', true, null,
this.viewContainerRef, EntityDebugSettingsPanelComponent, 'bottom', true, null,
{
...debugSettings,
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';
@Component({
selector: 'tb-debug-settings-panel',
templateUrl: './debug-settings-panel.component.html',
selector: 'tb-entity-debug-settings-panel',
templateUrl: './entity-debug-settings-panel.component.html',
standalone: true,
imports: [
SharedModule,
@ -46,9 +46,9 @@ import { distinctUntilChanged, map, startWith, switchMap, takeWhile } from 'rxjs
],
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 }) allEnabled = false;
@Input() allEnabledUntil = 0;

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

@ -35,7 +35,7 @@
</mat-error>
</mat-form-field>
<section class="mb-5 flex max-w-xs flex-row">
<tb-debug-settings-button
<tb-entity-debug-settings-button
class="mr-2"
formControlName="debugSettings"
[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 { RuleNodeConfigComponent } from './rule-node-config.component';
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({
declarations: [
@ -63,7 +63,7 @@ import { DebugSettingsButtonComponent } from '@home/components/entity/debug/debu
HomeComponentsModule,
RuleChainRoutingModule,
DurationLeftPipe,
DebugSettingsButtonComponent
EntityDebugSettingsButtonComponent
]
})
export class RuleChainModule { }

Loading…
Cancel
Save