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

New angular(v15) console frontend #5922

Merged
merged 140 commits into from
Dec 12, 2023
Merged

New angular(v15) console frontend #5922

merged 140 commits into from
Dec 12, 2023

Conversation

Matthbo
Copy link
Sponsor Member

@Matthbo Matthbo commented Dec 4, 2023

Upgrade from angular.js to Angular (v15)
See #1980

Matthbo and others added 30 commits August 7, 2023 20:16
* convert pages components to angular components

* fix import & bootstrap issues

* add hybrid ui-router & ngbootstrap, fix angularjs->angular communication
* Converted Iframe components to typescript

- iframe custom view
- iframe ladybug
- iframe ladybug beta
- iframe larva

* Converted inlineStore component to typescript

* Converted JDBC components to typescript

- jdbc browse tables
- jdbc execute query

* Multiple components converted to angular (before merge)

* Squashed commit of the following:

commit ac5e6b8
Author: Matthbo <matthijs.booman@hotmail.com>
Date:   Tue Aug 29 16:30:54 2023 +0200

    dep injection cleanup

commit c3ee274
Author: Matthbo <matthijs.booman@hotmail.com>
Date:   Tue Aug 29 14:59:53 2023 +0200

    replace $on events with rxjs subscriptions

commit 31a8531
Author: Matthbo <matthijs.booman@hotmail.com>
Date:   Tue Aug 29 10:07:23 2023 +0200

    add type to $injector prop & cleanup of services types

commit 6658348
Author: Matthbo <matthijs.booman@hotmail.com>
Date:   Mon Aug 28 15:48:48 2023 +0200

    fix poller service & service imports

commit 2c6a2de
Author: Matthbo <matthijs.booman@hotmail.com>
Date:   Fri Aug 25 21:38:38 2023 +0200

    convert almost all services to typescript and available in ng

commit fb4e5ee
Author: Matthbo <matthijs.booman@hotmail.com>
Date:   Thu Aug 24 16:26:49 2023 +0200

    start converting service to ts & making available in ng

commit 3405e4a
Author: Matthbo <matthijs.booman@hotmail.com>
Date:   Wed Aug 23 15:17:47 2023 +0200

    cleanup & solve various small things

commit 682f421
Author: Matthbo <matthijs.booman@hotmail.com>
Date:   Tue Aug 22 17:38:27 2023 +0200

    improve app, convert pages components & status view to ts

commit cfb39bd
Author: Matthbo <matthijs.booman@hotmail.com>
Date:   Mon Aug 14 13:20:38 2023 +0200

    temporary fix for mermaid

commit d98f71d
Author: Matthbo <matthijs.booman@hotmail.com>
Date:   Fri Aug 11 21:38:09 2023 +0200

    fix all the types so far

commit c777c9e
Author: Matthbo <matthijs.booman@hotmail.com>
Date:   Thu Aug 10 16:52:13 2023 +0200

    fix maven-frontend, appservice to ts & add types

* Fixes/changes after merge

* Fixes/changes after merge 2

Had most changes unselected

* Fixes/changes after merge 3

Last file that was left out

* small import fix

---------

Co-authored-by: Matthbo <matthijs.booman@hotmail.com>
but it isnt fully converted yet
* Converted Iframe components to typescript

- iframe custom view
- iframe ladybug
- iframe ladybug beta
- iframe larva

* Converted inlineStore component to typescript

* Converted JDBC components to typescript

- jdbc browse tables
- jdbc execute query

* Multiple components converted to angular (before merge)

* Squashed commit of the following:

commit ac5e6b8
Author: Matthbo <matthijs.booman@hotmail.com>
Date:   Tue Aug 29 16:30:54 2023 +0200

    dep injection cleanup

commit c3ee274
Author: Matthbo <matthijs.booman@hotmail.com>
Date:   Tue Aug 29 14:59:53 2023 +0200

    replace $on events with rxjs subscriptions

commit 31a8531
Author: Matthbo <matthijs.booman@hotmail.com>
Date:   Tue Aug 29 10:07:23 2023 +0200

    add type to $injector prop & cleanup of services types

commit 6658348
Author: Matthbo <matthijs.booman@hotmail.com>
Date:   Mon Aug 28 15:48:48 2023 +0200

    fix poller service & service imports

commit 2c6a2de
Author: Matthbo <matthijs.booman@hotmail.com>
Date:   Fri Aug 25 21:38:38 2023 +0200

    convert almost all services to typescript and available in ng

commit fb4e5ee
Author: Matthbo <matthijs.booman@hotmail.com>
Date:   Thu Aug 24 16:26:49 2023 +0200

    start converting service to ts & making available in ng

commit 3405e4a
Author: Matthbo <matthijs.booman@hotmail.com>
Date:   Wed Aug 23 15:17:47 2023 +0200

    cleanup & solve various small things

commit 682f421
Author: Matthbo <matthijs.booman@hotmail.com>
Date:   Tue Aug 22 17:38:27 2023 +0200

    improve app, convert pages components & status view to ts

commit cfb39bd
Author: Matthbo <matthijs.booman@hotmail.com>
Date:   Mon Aug 14 13:20:38 2023 +0200

    temporary fix for mermaid

commit d98f71d
Author: Matthbo <matthijs.booman@hotmail.com>
Date:   Fri Aug 11 21:38:09 2023 +0200

    fix all the types so far

commit c777c9e
Author: Matthbo <matthijs.booman@hotmail.com>
Date:   Thu Aug 10 16:52:13 2023 +0200

    fix maven-frontend, appservice to ts & add types

* Fixes/changes after merge

* Fixes/changes after merge 2

Had most changes unselected

* Fixes/changes after merge 3

Last file that was left out

* Ibis store summary changes

- Converted to typescript
- Created angular new component
- Errors in ibisstore-summary.component.ts because of location service functionality

* Jms components

- Converted to Typescript
- Created Angular new component
- InputFileUploadcontroller error todo

* Liquibase component

- Converted to Typescript
- Created Angular new component
- TODO: same InputFileUploadcontroller error and filter pipe

* Squashed commit of everything after master squash:

commit dd82114
Merge: 28819e9 c3d24ce
Author: Jari van Oort <jjvoservices@pm.me>
Date:   Fri Sep 22 15:15:23 2023 +0200

    Merge branch 'frontend/angular-hybrid' into jari-components-to-typescript-2

commit 28819e9
Author: Jari van Oort <jjvoservices@pm.me>
Date:   Fri Sep 22 12:14:08 2023 +0200

    Squashed commit of the following:

    commit c3d24ce
    Author: Matthbo <matthijs.booman@hotmail.com>
    Date:   Tue Sep 19 18:03:25 2023 +0200

        tiny prep for new datatable

    commit d8e1a95
    Author: Matthbo <matthijs.booman@hotmail.com>
    Date:   Tue Sep 19 16:45:02 2023 +0200

        change datatable to simple datatable

    commit 79a0a47
    Author: Matthbo <matthijs.booman@hotmail.com>
    Date:   Fri Sep 15 18:16:36 2023 +0200

        add start of storage components in angular

    commit 12e4d21
    Author: Matthbo <matthijs.booman@hotmail.com>
    Date:   Fri Sep 15 17:34:20 2023 +0200

        adapter storage components to ts

    commit 05a29b3
    Author: Matthbo <matthijs.booman@hotmail.com>
    Date:   Thu Sep 14 10:20:58 2023 +0200

        prepare for uiSref to adapter storage fix

    commit 2f0e535
    Author: Matthbo <matthijs.booman@hotmail.com>
    Date:   Tue Sep 12 17:48:02 2023 +0200

        fix status component & various improvements

    commit 2ed45c4
    Author: Matthbo <matthijs.booman@hotmail.com>
    Date:   Mon Sep 11 16:57:49 2023 +0200

        convert configuration-filter, search-filter, truncate & added more adapter types

    commit f32e891
    Author: Matthbo <matthijs.booman@hotmail.com>
    Date:   Fri Sep 8 18:18:11 2023 +0200

        add status angular component
        but it isnt fully converted yet

    commit c7826e0
    Author: Matthbo <matthijs.booman@hotmail.com>
    Date:   Wed Sep 6 16:56:30 2023 +0200

        convert input-file-upload & logout to angular

commit c3d24ce
Author: Matthbo <matthijs.booman@hotmail.com>
Date:   Tue Sep 19 18:03:25 2023 +0200

    tiny prep for new datatable

commit d8e1a95
Author: Matthbo <matthijs.booman@hotmail.com>
Date:   Tue Sep 19 16:45:02 2023 +0200

    change datatable to simple datatable

commit 79a0a47
Author: Matthbo <matthijs.booman@hotmail.com>
Date:   Fri Sep 15 18:16:36 2023 +0200

    add start of storage components in angular

commit 12e4d21
Author: Matthbo <matthijs.booman@hotmail.com>
Date:   Fri Sep 15 17:34:20 2023 +0200

    adapter storage components to ts

commit 012f954
Author: Jari van Oort <jjvoservices@pm.me>
Date:   Fri Sep 15 10:35:13 2023 +0200

    Converted environement variables component

    - added variablesFilter pipe
    - changed some things in template to fix errors

commit 36c3167
Author: Jari van Oort <jjvoservices@pm.me>
Date:   Thu Sep 14 11:59:52 2023 +0200

    Inlinestore and ibisstoresummary fixes

commit 05a29b3
Author: Matthbo <matthijs.booman@hotmail.com>
Date:   Thu Sep 14 10:20:58 2023 +0200

    prepare for uiSref to adapter storage fix

commit 2f0e535
Author: Matthbo <matthijs.booman@hotmail.com>
Date:   Tue Sep 12 17:48:02 2023 +0200

    fix status component & various improvements

commit 2ed45c4
Author: Matthbo <matthijs.booman@hotmail.com>
Date:   Mon Sep 11 16:57:49 2023 +0200

    convert configuration-filter, search-filter, truncate & added more adapter types

commit 8a05b53
Author: Jari van Oort <jjvoservices@pm.me>
Date:   Mon Sep 11 10:47:11 2023 +0200

    Last fixes for errors after merge

commit f32e891
Author: Matthbo <matthijs.booman@hotmail.com>
Date:   Fri Sep 8 18:18:11 2023 +0200

    add status angular component
    but it isnt fully converted yet

commit c7826e0
Author: Matthbo <matthijs.booman@hotmail.com>
Date:   Wed Sep 6 16:56:30 2023 +0200

    convert input-file-upload & logout to angular

commit eb4007d
Author: Jari van Oort <jjvoservices@pm.me>
Date:   Wed Sep 6 13:54:25 2023 +0200

    Fixes/changes after merge

commit cf81848
Merge: 53b9dfb c677523
Author: Jari van Oort <jjvoservices@pm.me>
Date:   Wed Sep 6 10:51:14 2023 +0200

    Merge branch 'frontend/angular-hybrid' into jari-components-to-typescript-2

commit c677523
Author: Matthbo <matthijs.booman@hotmail.com>
Date:   Tue Sep 5 17:37:40 2023 +0200

    corrections to iframes and inlinestore

commit d6ee07c
Author: Jari van Oort <jjvoservices@pm.me>
Date:   Tue Sep 5 16:09:34 2023 +0200

    Components to typescript/angular new (#5308)

    * Converted Iframe components to typescript

    - iframe custom view
    - iframe ladybug
    - iframe ladybug beta
    - iframe larva

    * Converted inlineStore component to typescript

    * Converted JDBC components to typescript

    - jdbc browse tables
    - jdbc execute query

    * Multiple components converted to angular (before merge)

    * Squashed commit of the following:

    commit ac5e6b8
    Author: Matthbo <matthijs.booman@hotmail.com>
    Date:   Tue Aug 29 16:30:54 2023 +0200

        dep injection cleanup

    commit c3ee274
    Author: Matthbo <matthijs.booman@hotmail.com>
    Date:   Tue Aug 29 14:59:53 2023 +0200

        replace $on events with rxjs subscriptions

    commit 31a8531
    Author: Matthbo <matthijs.booman@hotmail.com>
    Date:   Tue Aug 29 10:07:23 2023 +0200

        add type to $injector prop & cleanup of services types

    commit 6658348
    Author: Matthbo <matthijs.booman@hotmail.com>
    Date:   Mon Aug 28 15:48:48 2023 +0200

        fix poller service & service imports

    commit 2c6a2de
    Author: Matthbo <matthijs.booman@hotmail.com>
    Date:   Fri Aug 25 21:38:38 2023 +0200

        convert almost all services to typescript and available in ng

    commit fb4e5ee
    Author: Matthbo <matthijs.booman@hotmail.com>
    Date:   Thu Aug 24 16:26:49 2023 +0200

        start converting service to ts & making available in ng

    commit 3405e4a
    Author: Matthbo <matthijs.booman@hotmail.com>
    Date:   Wed Aug 23 15:17:47 2023 +0200

        cleanup & solve various small things

    commit 682f421
    Author: Matthbo <matthijs.booman@hotmail.com>
    Date:   Tue Aug 22 17:38:27 2023 +0200

        improve app, convert pages components & status view to ts

    commit cfb39bd
    Author: Matthbo <matthijs.booman@hotmail.com>
    Date:   Mon Aug 14 13:20:38 2023 +0200

        temporary fix for mermaid

    commit d98f71d
    Author: Matthbo <matthijs.booman@hotmail.com>
    Date:   Fri Aug 11 21:38:09 2023 +0200

        fix all the types so far

    commit c777c9e
    Author: Matthbo <matthijs.booman@hotmail.com>
    Date:   Thu Aug 10 16:52:13 2023 +0200

        fix maven-frontend, appservice to ts & add types

    * Fixes/changes after merge

    * Fixes/changes after merge 2

    Had most changes unselected

    * Fixes/changes after merge 3

    Last file that was left out

    * small import fix

    ---------

    Co-authored-by: Matthbo <matthijs.booman@hotmail.com>

commit 4989c83
Merge: 266002a cc3e080
Author: Matthbo <matthijs.booman@hotmail.com>
Date:   Tue Sep 5 10:42:56 2023 +0200

    Merge branch 'frontend/angular-hybrid' of https://github.com/ibissource/iaf into frontend/angular-hybrid

commit 266002a
Author: Matthbo <matthijs.booman@hotmail.com>
Date:   Tue Sep 5 10:42:40 2023 +0200

    remove old angularjs folder

commit cc3e080
Author: Vivy <matthijs.booman@hotmail.com>
Date:   Mon Sep 4 17:02:09 2023 +0200

    convert pages components to angular components (#5329)

    * convert pages components to angular components

    * fix import & bootstrap issues

    * add hybrid ui-router & ngbootstrap, fix angularjs->angular communication

commit ac5e6b8
Author: Matthbo <matthijs.booman@hotmail.com>
Date:   Tue Aug 29 16:30:54 2023 +0200

    dep injection cleanup

commit c3ee274
Author: Matthbo <matthijs.booman@hotmail.com>
Date:   Tue Aug 29 14:59:53 2023 +0200

    replace $on events with rxjs subscriptions

commit 31a8531
Author: Matthbo <matthijs.booman@hotmail.com>
Date:   Tue Aug 29 10:07:23 2023 +0200

    add type to $injector prop & cleanup of services types

commit 6658348
Author: Matthbo <matthijs.booman@hotmail.com>
Date:   Mon Aug 28 15:48:48 2023 +0200

    fix poller service & service imports

commit 2c6a2de
Author: Matthbo <matthijs.booman@hotmail.com>
Date:   Fri Aug 25 21:38:38 2023 +0200

    convert almost all services to typescript and available in ng

commit fb4e5ee
Author: Matthbo <matthijs.booman@hotmail.com>
Date:   Thu Aug 24 16:26:49 2023 +0200

    start converting service to ts & making available in ng

commit 3405e4a
Author: Matthbo <matthijs.booman@hotmail.com>
Date:   Wed Aug 23 15:17:47 2023 +0200

    cleanup & solve various small things

commit 682f421
Author: Matthbo <matthijs.booman@hotmail.com>
Date:   Tue Aug 22 17:38:27 2023 +0200

    improve app, convert pages components & status view to ts

commit cfb39bd
Author: Matthbo <matthijs.booman@hotmail.com>
Date:   Mon Aug 14 13:20:38 2023 +0200

    temporary fix for mermaid

commit d98f71d
Author: Matthbo <matthijs.booman@hotmail.com>
Date:   Fri Aug 11 21:38:09 2023 +0200

    fix all the types so far

commit c777c9e
Author: Matthbo <matthijs.booman@hotmail.com>
Date:   Thu Aug 10 16:52:13 2023 +0200

    fix maven-frontend, appservice to ts & add types

* Added any/missing typings

* liquibase file input, quick-submit directive added for jdbc

* Small fixes, added appToDate in jms send message

* Improvements after comments

---------

Co-authored-by: Matthbo <matthijs.booman@hotmail.com>
@Matthbo Matthbo marked this pull request as ready for review December 5, 2023 10:50
@Laurens-makel
Copy link
Contributor

Laurens-makel commented Dec 6, 2023

Zelf heb ik onlangs ook een webapp van AngularJS naar Angular 15 gemigreerd en vanuit deze ervaring vallen de volgende dingen op:

  • Waar zijn de unit testen? Een migratie naar een nieuwe Angular versie is het ideale moment om gelijk een goede unit test suite op te bouwen gezien je Karma en Jasmine kado krijgt van de Angular CLI. Dit gaat je enorm helpen bij toekomstige wijzigingen om bugs te ondervangen.
  • Kies liever voor de inject() functie ipv constructor based injection Op deze manier kan je een abstract class maken waarin bijvoorbeeld de AppService en HttpClient eenmalig worden gedeclareerd, alle andere service classes kunnen deze abstract class extenden en deze dependencies gebruiken zonder ze zelf nogmaals te moeten declareren.
  • Is er rekening gehouden met hoe change detection werkt? Zo wordt er bijvoorbeeld in de *ngFor implementaties er geen gebruik gemaakt van de trackBy functie, geen ChangeDetection.OnPush aangebracht en geen debounceTime op input velden.
  • Het gebruik van jQuery of document.createElement op sommige plekken is een bad practice binnen het Angular framework.
  • Veel boilerplate betreft subscription management, is het niet een idee om met een state manage library aan de slag te gaan? Zelf ben ik fan van RxAngular.
  • Veel oude javascript syntax
  • Het gebruik van loose comparison == ipv strict comparison === in veel gevallen

Mocht je over een van de punten vragen hebben, laat het mij dan vooral weten! We zouden eventueel ook iets kunnen plannen zodat ik het eea kan laten zien en toelichten.

@Matthbo
Copy link
Sponsor Member Author

Matthbo commented Dec 7, 2023

Zelf heb ik onlangs ook een webapp van AngularJS naar Angular 15 gemigreerd en vanuit deze ervaring vallen de volgende dingen op:

* Waar zijn de unit testen? Een migratie naar een nieuwe Angular versie is het ideale moment om gelijk een goede unit test suite op te bouwen gezien je Karma en Jasmine kado krijgt van de Angular CLI. Dit gaat je enorm helpen bij toekomstige wijzigingen om bugs te ondervangen.

* Kies liever voor de `inject()` functie ipv constructor based injection Op deze manier kan je een abstract class maken waarin bijvoorbeeld de `AppService` en `HttpClient` eenmalig worden gedeclareerd, alle andere service classes kunnen deze abstract class extenden en deze dependencies gebruiken zonder ze zelf nogmaals te moeten declareren.

* Is er rekening gehouden met hoe change detection werkt? Zo wordt er bijvoorbeeld in de `*ngFor` implementaties er geen gebruik gemaakt van de `trackBy` functie, geen `ChangeDetection.OnPush` aangebracht en geen `debounceTime` op input velden.

* Het gebruik van jQuery of `document.createElement` op sommige plekken is een bad practice binnen het Angular framework.

* Veel boilerplate betreft subscription management, is het niet een idee om met een state manage library aan de slag te gaan? Zelf ben ik fan van [RxAngular](https://www.rx-angular.io/).

* Veel oude javascript syntax

* Het gebruik van loose comparison `==` ipv  strict comparison `===` in veel gevallen

Mocht je over een van de punten vragen hebben, laat het mij dan vooral weten! We zouden eventueel ook iets kunnen plannen zodat ik het eea kan laten zien en toelichten.

Veel van je punten staan zeker op het lijstje maar willen we stuk voor stuk doen zonder dat de hele applicatie compleet herscreven moet worden.
We willen graag van jquery af maar er zitten hier nog wat afhankelijkheden in, we hebben daarom gekozen om eerst alleen de upgrade naar angular te doen waarna wij iteratief elk component willen gaan rewriten.
Omdat alles zo stabiel mogelijk door te laten gaan doen we dit iteratief en dit is daarin de eerste stap die asap getest kan worden wanneer onze CI ons daarin kan helpen (hebben nu wat issues met de maven frontend plugin en write access voor npm/npx).
Volgende stap gaat het rewriten per component zijn waarbij unit tests maken ook een hoge prioriteit is.

Zodat we niet vergeten dat er nog belangrijke aanpassingen moet gebeuren heb ik een nieuwe epic gemaakt, #5934
Het lijkt me handig dat waarneer hieraan gewerkt gaat worden dat we met de mensen die hier ook een mening over kunnen hebben samen kunnen gaan zitten zodat we er het beste van kunnen maken

@Matthbo Matthbo linked an issue Dec 8, 2023 that may be closed by this pull request
Copy link

sonarcloud bot commented Dec 12, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

12.5% 12.5% Coverage
0.0% 0.0% Duplication

warning The version of Java (11.0.21) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17.
Read more here

@nielsm5 nielsm5 merged commit 03f5290 into 7.9-release Dec 12, 2023
9 of 10 checks passed
@nielsm5 nielsm5 deleted the frontend/angular-router branch December 12, 2023 10:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants