Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GUACAMOLE-1085: Migrate frontend to angular #896

Draft
wants to merge 80 commits into
base: next
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
19b730e
GUACAMOLE-1085: Remove AngularJS frontend
leonard2901 Jun 20, 2023
9a05d35
GUACAMOLE-1085: Add Angular frontend to src/main/guacamole-frontend
leonard2901 Jun 20, 2023
f58e79b
GUACAMOLE-1085: Update Angular to v16.1
leonard2901 Jun 20, 2023
912407c
GUACAMOLE-1085: Add Angular library guacamole-fronted-lib
leonard2901 Jun 20, 2023
1deaf90
GUACAMOLE-1085: Add Angular library guacamole-fronted-ext-lib
leonard2901 Jun 20, 2023
c9f1b7d
GUACAMOLE-1085: Include Angular projects in maven build
leonard2901 Jun 21, 2023
08481c1
GUACAMOLE-1085: Add the frontend-lib as a dependency to the frontend
leonard2901 Jun 21, 2023
e53049b
GUACAMOLE-1085: fix: the event service now handles subscribers correctly
leonard2901 Jun 22, 2023
5486271
GUACAMOLE-1085: Switch to Firefox for karma tests, remove empty test …
leonard2901 Jun 22, 2023
8b1ff1a
GUACAMOLE-1085: Add Cypress e2e tests for the frontend
leonard2901 Jun 22, 2023
ae22c9f
GUACAMOLE-1085: fix: reset password field after login failed
leonard2901 Jun 22, 2023
e04a30c
GUACAMOLE-1085: Add ESLint to the frontend project
leonard2901 Jun 22, 2023
d64df77
GUACAMOLE-1085: Fix some linter errors
leonard2901 Jun 22, 2023
904706e
GUACAMOLE-1085: Add Module Federation to app
leonard2901 Jun 22, 2023
2ea40e1
GUACAMOLE-1085: Move the form field service to the extension library
leonard2901 Jun 22, 2023
08c6963
GUACAMOLE-1085: Add the extension library as a dependency to the fron…
leonard2901 Jun 22, 2023
ecf222c
GUACAMOLE-1085: Add an example for an extension which adds routes and…
leonard2901 Jun 22, 2023
3f76c8d
GUACAMOLE-1085: Move the lib and ext-lib to the frontend workspace
leonard2901 Jun 23, 2023
25c4d96
GUACAMOLE-1085: Prefer event emitter rather than functions as inputs
leonard2901 Jun 23, 2023
eb7d86d
GUACAMOLE-1085: Fix client resizing and drop behaviour
leonard2901 Jun 23, 2023
f252afc
GUACAMOLE-1085: Set Angular version to 16.1.1
leonard2901 Jun 25, 2023
e953281
GUACAMOLE-1085: Add missing documentation
leonard2901 Jun 25, 2023
32b79ae
GUACAMOLE-1085: Migrate the guacGroupListFilter directive
leonard2901 Jun 26, 2023
4a95a01
GUACAMOLE-1085: Set the page title on the initial page load
leonard2901 Jun 27, 2023
249b634
GUACAMOLE-1085: Set the CSS body class on the initial page load
leonard2901 Jun 28, 2023
75caa9a
GUACAMOLE-1085: Refresh the session view after stopping sessions
leonard2901 Jun 28, 2023
41a68c8
GUACAMOLE-1085: Ensure new pages always start with clear keyboard state
leonard2901 Jun 28, 2023
a3a24bb
GUACAMOLE-1085: Migrate more components
leonard2901 Jun 28, 2023
8837e11
GUACAMOLE-1085: Fix sorting in data tables
leonard2901 Jun 29, 2023
105d16b
GUACAMOLE-1085: Fix some broken tests
leonard2901 Jun 29, 2023
bf3d74f
GUACAMOLE-1085: Complete extension loading via module federation
leonard2901 Jun 29, 2023
3c733b0
GUACAMOLE-1085: Clean up some TODOs
leonard2901 Jun 29, 2023
ba9f371
GUACAMOLE-1085: Rename form component inputs
leonard2901 Jun 29, 2023
7c1b4ee
GUACAMOLE-1085: Move canonicalize function to translation service
leonard2901 Jun 29, 2023
495d038
GUACAMOLE-1085: Migrate connection history player
leonard2901 Jun 30, 2023
12fed9e
GUACAMOLE-1085: Prefer single quotes and 'const'
leonard2901 Jun 30, 2023
18bd669
GUACAMOLE-1085: Use "@:...:@" to reference another translation file
leonard2901 Jun 30, 2023
9454450
GUACAMOLE-1085: Edit README files
leonard2901 Jun 30, 2023
cb3fde9
GUACAMOLE-1085: Exclude Angular build directories from RAT checks
leonard2901 Jun 30, 2023
082f0fb
GUACAMOLE-1085: Add dependency for jquery
leonard2901 Feb 6, 2024
3fd58af
GUACAMOLE-1085: Migrate IconService
leonard2901 Feb 6, 2024
c42933a
GUACAMOLE-1085: Show an empty cell in the user settings component if …
leonard2901 Feb 6, 2024
bb8acd6
GUACAMOLE-1085: Update JSDoc
leonard2901 Feb 19, 2024
c9a3476
GUACAMOLE-1085: Migrate ConnectionPermissionEditor Component
leonard2901 Feb 19, 2024
a11fa6d
GUACAMOLE-1085: Fix login form placeholder text
leonard2901 Feb 19, 2024
0274988
GUACAMOLE-1085: Fix IdentifierSetEditor Component
leonard2901 Feb 19, 2024
171ce5d
GUACAMOLE-1085: Add TODOs for missing JSDoc
leonard2901 Feb 21, 2024
4330d85
GUACAMOLE-1085: Fix Typo
leonard2901 Feb 21, 2024
7f18a7a
GUACAMOLE-1085: Fix in MangeConnection Component
leonard2901 Feb 21, 2024
5152456
GUACAMOLE-1085: Fix MangeConnectionGroup Component
leonard2901 Feb 21, 2024
b9b6f18
GUACAMOLE-1085: Migrate ManageSharingProfile Component
leonard2901 Feb 21, 2024
0d551ba
GUACAMOLE-1085: Fix form field alignment
leonard2901 Feb 21, 2024
866179e
GUACAMOLE-1085: Update user menu styles
leonard2901 Feb 22, 2024
8eca0e8
GUACAMOLE-1085: Reorder routes
leonard2901 Apr 12, 2024
2d13974
GUACAMOLE-1085: Add fallback route
leonard2901 Apr 12, 2024
17508a0
GUACAMOLE-1085: Migrate GuacDropDirective
leonard2901 Apr 12, 2024
158de95
GUACAMOLE-1085: Migrate connection import
leonard2901 Apr 15, 2024
7988955
GUACAMOLE-1085: Update .ratignore
leonard2901 Apr 17, 2024
b7f9a99
GUACAMOLE-1085: Update licence text
leonard2901 Apr 17, 2024
93a8a05
GUACAMOLE-1085: Update package-lock.json
leonard2901 Apr 17, 2024
314afef
GUACAMOLE-1085: Use TypeScript types form DefinitelyTyped for guacamo…
leonard2901 Apr 18, 2024
86f5c95
GUACAMOLE-1085: Organize imports
leonard2901 Apr 18, 2024
0774515
GUACAMOLE-1085: Reformat TypeScript code
leonard2901 Apr 18, 2024
855b6ce
GUACAMOLE-1085: Reformat HTML
leonard2901 Apr 18, 2024
a7c5f22
GUACAMOLE-1085: Fix missing inputs in connection form after changing …
leonard2901 Apr 18, 2024
8e2f8de
GUACAMOLE-1085: Migrate orderBy pipe
leonard2901 Apr 19, 2024
a028219
GUACAMOLE-1085: Fix types, import guacamole-common-js, migrate Angula…
leonard2901 Jan 7, 2025
96abe36
GUACAMOLE-1085: Clean up clipboard service
leonard2901 Jan 10, 2025
46f1c7f
GUACAMOLE-1085: Load styles with build info query param
leonard2901 Jan 10, 2025
c6f1044
GUACAMOLE-1085: Remove cypress and cypress tests cases
leonard2901 Jan 10, 2025
ea753c8
GUACAMOLE-1085: Migrate changes from main branch
leonard2901 Jan 13, 2025
7b80c28
GUACAMOLE-1085: use global window object insted of DI
leonard2901 Jan 14, 2025
ca75218
GUACAMOLE-1085: Update licence info
leonard2901 Jan 14, 2025
d02b700
GUACAMOLE-1085: Code cleanup/reformat
leonard2901 Jan 14, 2025
51b3cc3
GUACAMOLE-1085: Integrate angular tests in maven build
leonard2901 Jan 14, 2025
5e05a58
GUACAMOLE-1085: Copy guacamole-common-js to frontend
leonard2901 Jan 14, 2025
4148cf5
GUACAMOLE-1085: Remove notes about caching HTTP requests
leonard2901 Jan 15, 2025
fc021b2
GUACAMOLE-1085: Update to Angular 19, switch from module to native fe…
Jan 15, 2025
c40e82f
GUACAMOLE-1085: Remove more AngularJS Code
leonard2901 Jan 27, 2025
c637976
GUACAMOLE-1085: Migrate changes from main branch
leonard2901 Jan 27, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
GUACAMOLE-1085: Fix missing inputs in connection form after changing …
…the protocol
leonard2901 committed Jan 27, 2025
commit a7c5f220a64f9694c490f8e94acdf54952a929f1
Original file line number Diff line number Diff line change
@@ -52,7 +52,7 @@ <h2>{{ 'MANAGE_CONNECTION.SECTION_HEADER_EDIT_CONNECTION' | transloco }}</h2>
<tr>
<th>{{ 'MANAGE_CONNECTION.FIELD_HEADER_PROTOCOL' | transloco }}</th>
<td>
<select [(ngModel)]="connection.protocol">
<select [(ngModel)]="selectedProtocol">
<!-- TODO: orderBy: value.name-->
<option *ngFor="let protocol of protocols! | keyvalue"
[value]="protocol.key"
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
import { FormGroup } from '@angular/forms';
import { ActivatedRoute, Router } from '@angular/router';
import { TranslocoService } from '@ngneat/transloco';
import { forkJoin, map, Observable, of } from 'rxjs';
import { forkJoin, map, Observable, of, Subscription } from 'rxjs';
import { AuthenticationService } from '../../../auth/service/authentication.service';
import { FormService } from '../../../form/service/form.service';
import { GuacPagerComponent } from '../../../list/components/guac-pager/guac-pager.component';
@@ -90,6 +90,30 @@ export class ManageConnectionComponent implements OnInit {
*/
connection?: Connection;

/**
* The currently selected protocol for the connection being modified.
*
* @returns The protocol of the connection.
*/
get selectedProtocol(): string | undefined {

return this.connection?.protocol;

}

/**
* Sets the protocol for the connection being modified and updates the
* form group for editing connection parameters.
*
* @param value The protocol to be set for the connection.
*/
set selectedProtocol(value: string) {

this.connection!.protocol = value;
this.updateParametersFormGroup();

}

/**
* The parameter name/value pairs associated with the connection being
* modified.
@@ -101,6 +125,11 @@ export class ManageConnectionComponent implements OnInit {
*/
parametersFormGroup: FormGroup = new FormGroup({});

/**
* The subscription to changes in the parameters form group.
*/
parametersFormGroupSubscription?: Subscription;

/**
* The date format for use within the connection history.
*/
@@ -175,18 +204,10 @@ export class ManageConnectionComponent implements OnInit {
this.dataSourceView?.updateSource(this.historyEntryWrappers!);

this.attributes = attributes;
this.connectionAttributesFormGroup = this.formService.getFormGroup(attributes);
this.connectionAttributesFormGroup.patchValue(this.connection?.attributes || {});
this.connectionAttributesFormGroup.valueChanges.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((value) => {
this.connection!.attributes = value;
});
this.updateAttributesFormGroup();

this.protocols = protocols;
this.parametersFormGroup = this.formService.getFormGroup(this.protocols[this.connection!.protocol].connectionForms);
this.parametersFormGroup.patchValue(this.parameters || {});
this.parametersFormGroup.valueChanges.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((value) => {
this.parameters = value;
});
this.updateParametersFormGroup();

this.rootGroup = rootGroup;

@@ -205,6 +226,33 @@ export class ManageConnectionComponent implements OnInit {
});
}

/**
* Updates the form group for editing connection attributes.
*/
private updateAttributesFormGroup(): void {

this.connectionAttributesFormGroup = this.formService.getFormGroup(this.attributes!);
this.connectionAttributesFormGroup.patchValue(this.connection?.attributes || {});
this.connectionAttributesFormGroup.valueChanges.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((value) => {
this.connection!.attributes = value;
});

}

/**
* Updates the form group for editing connection parameters based on the selected protocol.
*/
private updateParametersFormGroup(): void {

this.parametersFormGroupSubscription?.unsubscribe();
this.parametersFormGroup = this.formService.getFormGroup(this.protocols![this.selectedProtocol!].connectionForms);
this.parametersFormGroup.patchValue(this.parameters || {});
this.parametersFormGroupSubscription = this.parametersFormGroup.valueChanges.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((value) => {
this.parameters = value;
});

}

/**
* Returns whether critical data has completed being loaded.
*