Skip to content

Commit

Permalink
feature(policy): #832 fix code issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ds-mmaul committed Jun 12, 2024
1 parent d6c5e04 commit 2e73975
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 7 deletions.
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { take } from 'rxjs/operators';
@Component({
selector: 'app-policies',
templateUrl: './policies.component.html',
styleUrls: [ './policies.component.scss' ],
styleUrls: [],
})
export class PoliciesComponent {
policiesView$: Observable<View<Policy[]>>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ export class PoliciesAssembler {
return constrainsList;
}

/*
public static validatePoliciesTemplate(data: any) {
if (typeof data !== 'object' || data === null || !Array.isArray(data[Object.keys(data)[0]])) {
Expand Down Expand Up @@ -155,4 +156,6 @@ export class PoliciesAssembler {
return true;
}
*/

}
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
>
<app-button [variant]="'raised'" [color]="'primary'"
(click)="applyTemplate()"
onkeydown="applyTemplate()"
[isDisabled]="!templateFile"
class="mr-2"
>{{ 'pageAdmin.policyManagement.apply' | i18n }}
Expand Down Expand Up @@ -148,6 +149,7 @@ <h4 class="pb-2">{{ 'pageAdmin.policyManagement.constraints' | i18n }} {{ '(' +
class="mb-2" *ngIf="viewMode !== ViewMode.VIEW">
<app-button
[iconName]="'add'"
onkeydown="addConstraintFormGroup()"
(click)="addConstraintFormGroup()"
></app-button>
</div>
Expand Down Expand Up @@ -199,6 +201,7 @@ <h4 class="pb-2">{{ 'pageAdmin.policyManagement.constraints' | i18n }} {{ '(' +
>
<app-button
[iconName]="'arrow_downward'"
onkeydown="moveConstraintDown(i)"
(click)="moveConstraintDown(i)"
>
</app-button>
Expand All @@ -213,6 +216,7 @@ <h4 class="pb-2">{{ 'pageAdmin.policyManagement.constraints' | i18n }} {{ '(' +

<app-button
[iconName]="'arrow_upward'"
onkeydown="moveConstraintUp(i)"
(click)="moveConstraintUp(i)"
>
</app-button>
Expand All @@ -226,6 +230,7 @@ <h4 class="pb-2">{{ 'pageAdmin.policyManagement.constraints' | i18n }} {{ '(' +
>
<app-button
[iconName]="'delete'"
onkeydown="removeConstraintFormGroup(i)"
(click)="removeConstraintFormGroup(i)"
>
</app-button>
Expand Down
6 changes: 0 additions & 6 deletions frontend/src/app/modules/page/policies/model/policy.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,22 +121,16 @@ export function getOperatorTypeSign(type: OperatorType): string {
switch (type) {
case OperatorType.EQ:
return '=';
break;
case OperatorType.NEQ:
return '!=';
break;
case OperatorType.LT:
return '<';
break;
case OperatorType.GT:
return '>';
break;
case OperatorType.LTEQ:
return '<=';
break;
case OperatorType.GTEQ:
return '>=';
break;
default:
return type.toString();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
<app-button
[iconName]="'delete'"
(click)="handleItemDeletion()"
onkeydown="handleItemDeletion()"
[isDisabled]="selection.selected.length < 1"
>
</app-button>
Expand Down

0 comments on commit 2e73975

Please sign in to comment.