Browse Source

Feature/move support to customize X-ray rules from experimental to general availability (#5408)

* Move support to customize X-ray rules from experimental to general availability

* Update changelog
pull/5414/head
Thomas Kaul 2 days ago
committed by GitHub
parent
commit
795609e03a
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 1
      CHANGELOG.md
  2. 10
      apps/client/src/app/components/access-table/access-table.component.html
  3. 8
      apps/client/src/app/components/access-table/access-table.component.ts
  4. 16
      apps/client/src/app/components/rule/rule.component.html
  5. 4
      apps/client/src/app/components/rule/rule.component.ts
  6. 36
      apps/client/src/app/pages/portfolio/x-ray/x-ray-page.component.html

1
CHANGELOG.md

@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed ### Changed
- Moved the support to customize rules in the _X-ray_ section from experimental to general availability
- Improved the create or update activity dialog’s asset sub class selector for valuables to update the options dynamically based on the selected asset class - Improved the create or update activity dialog’s asset sub class selector for valuables to update the options dynamically based on the selected asset class
- Randomized the minutes of the hourly data gathering cron job - Randomized the minutes of the hourly data gathering cron job
- Refactored the dialog footer component to standalone - Refactored the dialog footer component to standalone

10
apps/client/src/app/components/access-table/access-table.component.html

@ -67,12 +67,18 @@
<mat-menu #transactionMenu="matMenu" xPosition="before"> <mat-menu #transactionMenu="matMenu" xPosition="before">
@if (element.type === 'PUBLIC') { @if (element.type === 'PUBLIC') {
<button mat-menu-item (click)="onCopyUrlToClipboard(element.id)"> <button mat-menu-item (click)="onCopyUrlToClipboard(element.id)">
<ng-container i18n>Copy link to clipboard</ng-container> <span class="align-items-center d-flex">
<ion-icon class="mr-2" name="copy-outline" />
<span i18n>Copy link to clipboard</span>
</span>
</button> </button>
<hr class="my-0" /> <hr class="my-0" />
} }
<button mat-menu-item (click)="onDeleteAccess(element.id)"> <button mat-menu-item (click)="onDeleteAccess(element.id)">
<ng-container i18n>Revoke</ng-container> <span class="align-items-center d-flex">
<ion-icon class="mr-2" name="remove-circle-outline" />
<span i18n>Revoke</span>
</span>
</button> </button>
</mat-menu> </mat-menu>
</td> </td>

8
apps/client/src/app/components/access-table/access-table.component.ts

@ -22,10 +22,12 @@ import { RouterModule } from '@angular/router';
import { IonIcon } from '@ionic/angular/standalone'; import { IonIcon } from '@ionic/angular/standalone';
import { addIcons } from 'ionicons'; import { addIcons } from 'ionicons';
import { import {
copyOutline,
ellipsisHorizontal, ellipsisHorizontal,
linkOutline, linkOutline,
lockClosedOutline, lockClosedOutline,
lockOpenOutline lockOpenOutline,
removeCircleOutline
} from 'ionicons/icons'; } from 'ionicons/icons';
import ms from 'ms'; import ms from 'ms';
@ -62,10 +64,12 @@ export class GfAccessTableComponent implements OnChanges {
private snackBar: MatSnackBar private snackBar: MatSnackBar
) { ) {
addIcons({ addIcons({
copyOutline,
ellipsisHorizontal, ellipsisHorizontal,
linkOutline, linkOutline,
lockClosedOutline, lockClosedOutline,
lockOpenOutline lockOpenOutline,
removeCircleOutline
}); });
} }

16
apps/client/src/app/components/rule/rule.component.html

@ -64,14 +64,24 @@
<mat-menu #rulesMenu="matMenu" xPosition="before"> <mat-menu #rulesMenu="matMenu" xPosition="before">
@if (rule?.isActive && rule?.configuration) { @if (rule?.isActive && rule?.configuration) {
<button mat-menu-item (click)="onCustomizeRule(rule)"> <button mat-menu-item (click)="onCustomizeRule(rule)">
<ng-container i18n>Customize</ng-container>... <span class="align-items-center d-flex">
<ion-icon class="mr-2" name="options-outline" />
<span><ng-container i18n>Customize</ng-container>...</span>
</span>
</button> </button>
<hr class="my-0" />
} }
<button mat-menu-item (click)="onUpdateRule(rule)"> <button mat-menu-item (click)="onUpdateRule(rule)">
@if (rule?.isActive) { @if (rule?.isActive) {
<ng-container i18n>Deactivate</ng-container> <span class="align-items-center d-flex">
<ion-icon class="mr-2" name="remove-circle-outline" />
<span i18n>Deactivate</span>
</span>
} @else { } @else {
<ng-container i18n>Activate</ng-container> <span class="align-items-center d-flex">
<ion-icon class="mr-2" name="add-circle-outline" />
<span i18n>Activate</span>
</span>
} }
</button> </button>
</mat-menu> </mat-menu>

4
apps/client/src/app/components/rule/rule.component.ts

@ -16,8 +16,10 @@ import {
import { MatDialog } from '@angular/material/dialog'; import { MatDialog } from '@angular/material/dialog';
import { addIcons } from 'ionicons'; import { addIcons } from 'ionicons';
import { import {
addCircleOutline,
checkmarkCircleOutline, checkmarkCircleOutline,
ellipsisHorizontal, ellipsisHorizontal,
optionsOutline,
removeCircleOutline, removeCircleOutline,
warningOutline warningOutline
} from 'ionicons/icons'; } from 'ionicons/icons';
@ -50,8 +52,10 @@ export class RuleComponent implements OnInit {
private dialog: MatDialog private dialog: MatDialog
) { ) {
addIcons({ addIcons({
addCircleOutline,
checkmarkCircleOutline, checkmarkCircleOutline,
ellipsisHorizontal, ellipsisHorizontal,
optionsOutline,
removeCircleOutline, removeCircleOutline,
warningOutline warningOutline
}); });

36
apps/client/src/app/pages/portfolio/x-ray/x-ray-page.component.html

@ -73,9 +73,7 @@
</h4> </h4>
<gf-rules <gf-rules
[hasPermissionToUpdateUserSettings]=" [hasPermissionToUpdateUserSettings]="
!hasImpersonationId && !hasImpersonationId && hasPermissionToUpdateUserSettings
hasPermissionToUpdateUserSettings &&
user?.settings?.isExperimentalFeatures
" "
[isLoading]="isLoading" [isLoading]="isLoading"
[rules]="liquidityRules" [rules]="liquidityRules"
@ -97,9 +95,7 @@
</h4> </h4>
<gf-rules <gf-rules
[hasPermissionToUpdateUserSettings]=" [hasPermissionToUpdateUserSettings]="
!hasImpersonationId && !hasImpersonationId && hasPermissionToUpdateUserSettings
hasPermissionToUpdateUserSettings &&
user?.settings?.isExperimentalFeatures
" "
[isLoading]="isLoading" [isLoading]="isLoading"
[rules]="emergencyFundRules" [rules]="emergencyFundRules"
@ -121,9 +117,7 @@
</h4> </h4>
<gf-rules <gf-rules
[hasPermissionToUpdateUserSettings]=" [hasPermissionToUpdateUserSettings]="
!hasImpersonationId && !hasImpersonationId && hasPermissionToUpdateUserSettings
hasPermissionToUpdateUserSettings &&
user?.settings?.isExperimentalFeatures
" "
[isLoading]="isLoading" [isLoading]="isLoading"
[rules]="currencyClusterRiskRules" [rules]="currencyClusterRiskRules"
@ -145,9 +139,7 @@
</h4> </h4>
<gf-rules <gf-rules
[hasPermissionToUpdateUserSettings]=" [hasPermissionToUpdateUserSettings]="
!hasImpersonationId && !hasImpersonationId && hasPermissionToUpdateUserSettings
hasPermissionToUpdateUserSettings &&
user?.settings?.isExperimentalFeatures
" "
[isLoading]="isLoading" [isLoading]="isLoading"
[rules]="assetClassClusterRiskRules" [rules]="assetClassClusterRiskRules"
@ -169,9 +161,7 @@
</h4> </h4>
<gf-rules <gf-rules
[hasPermissionToUpdateUserSettings]=" [hasPermissionToUpdateUserSettings]="
!hasImpersonationId && !hasImpersonationId && hasPermissionToUpdateUserSettings
hasPermissionToUpdateUserSettings &&
user?.settings?.isExperimentalFeatures
" "
[isLoading]="isLoading" [isLoading]="isLoading"
[rules]="accountClusterRiskRules" [rules]="accountClusterRiskRules"
@ -193,9 +183,7 @@
</h4> </h4>
<gf-rules <gf-rules
[hasPermissionToUpdateUserSettings]=" [hasPermissionToUpdateUserSettings]="
!hasImpersonationId && !hasImpersonationId && hasPermissionToUpdateUserSettings
hasPermissionToUpdateUserSettings &&
user?.settings?.isExperimentalFeatures
" "
[isLoading]="isLoading" [isLoading]="isLoading"
[rules]="economicMarketClusterRiskRules" [rules]="economicMarketClusterRiskRules"
@ -217,9 +205,7 @@
</h4> </h4>
<gf-rules <gf-rules
[hasPermissionToUpdateUserSettings]=" [hasPermissionToUpdateUserSettings]="
!hasImpersonationId && !hasImpersonationId && hasPermissionToUpdateUserSettings
hasPermissionToUpdateUserSettings &&
user?.settings?.isExperimentalFeatures
" "
[isLoading]="isLoading" [isLoading]="isLoading"
[rules]="regionalMarketClusterRiskRules" [rules]="regionalMarketClusterRiskRules"
@ -241,9 +227,7 @@
</h4> </h4>
<gf-rules <gf-rules
[hasPermissionToUpdateUserSettings]=" [hasPermissionToUpdateUserSettings]="
!hasImpersonationId && !hasImpersonationId && hasPermissionToUpdateUserSettings
hasPermissionToUpdateUserSettings &&
user?.settings?.isExperimentalFeatures
" "
[isLoading]="isLoading" [isLoading]="isLoading"
[rules]="feeRules" [rules]="feeRules"
@ -256,9 +240,7 @@
<h4 class="m-0" i18n>Inactive</h4> <h4 class="m-0" i18n>Inactive</h4>
<gf-rules <gf-rules
[hasPermissionToUpdateUserSettings]=" [hasPermissionToUpdateUserSettings]="
!hasImpersonationId && !hasImpersonationId && hasPermissionToUpdateUserSettings
hasPermissionToUpdateUserSettings &&
user?.settings?.isExperimentalFeatures
" "
[isLoading]="isLoading" [isLoading]="isLoading"
[rules]="inactiveRules" [rules]="inactiveRules"

Loading…
Cancel
Save