Skip to content

Commit cdce710

Browse files
authored
Merge pull request #38 from intersystems-ib/feat/upgrade-angular15
upgrade to angular15
2 parents 29eaf62 + 9cd6aad commit cdce710

File tree

87 files changed

+20460
-12031
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+20460
-12031
lines changed

.dockerignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
Dockerfile
2-
node_modules
2+
node_modules
3+
dist
4+
.angular
5+
.vscode

.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ indent_size = 2
88
insert_final_newline = true
99
trim_trailing_whitespace = true
1010

11+
[*.ts]
12+
quote_type = single
13+
1114
[*.md]
1215
max_line_length = off
1316
trim_trailing_whitespace = false

.gitignore

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,39 @@
11
# See http://help.github.com/ignore-files/ for more about ignoring files.
22

3-
# compiled output
3+
# Compiled output
44
/dist
55
/tmp
66
/out-tsc
7-
# Only exists if Bazel was run
87
/bazel-out
98

10-
# dependencies
9+
# Node
1110
/node_modules
12-
13-
# profiling files
14-
chrome-profiler-events*.json
15-
speed-measure-plugin*.json
11+
npm-debug.log
12+
yarn-error.log
1613

1714
# IDEs and editors
18-
/.idea
15+
.idea/
1916
.project
2017
.classpath
2118
.c9/
2219
*.launch
2320
.settings/
2421
*.sublime-workspace
2522

26-
# IDE - VSCode
23+
# Visual Studio Code
2724
.vscode/*
2825
!.vscode/settings.json
2926
!.vscode/tasks.json
3027
!.vscode/launch.json
3128
!.vscode/extensions.json
3229
.history/*
3330

34-
# misc
35-
/.sass-cache
31+
# Miscellaneous
32+
/.angular/cache
33+
.sass-cache/
3634
/connect.lock
3735
/coverage
3836
/libpeerconnection.log
39-
npm-debug.log
40-
yarn-error.log
4137
testem.log
4238
/typings
4339

.vscode/extensions.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=827846
3+
"recommendations": ["angular.ng-template"]
4+
}

.vscode/launch.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
3+
"version": "0.2.0",
4+
"configurations": [
5+
{
6+
"name": "ng serve",
7+
"type": "pwa-chrome",
8+
"request": "launch",
9+
"preLaunchTask": "npm: start",
10+
"url": "http://localhost:4200/"
11+
},
12+
{
13+
"name": "ng test",
14+
"type": "chrome",
15+
"request": "launch",
16+
"preLaunchTask": "npm: test",
17+
"url": "http://localhost:9876/debug.html"
18+
}
19+
]
20+
}

.vscode/settings.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

.vscode/tasks.json

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
// For more information, visit: https://go.microsoft.com/fwlink/?LinkId=733558
3+
"version": "2.0.0",
4+
"tasks": [
5+
{
6+
"type": "npm",
7+
"script": "start",
8+
"isBackground": true,
9+
"problemMatcher": {
10+
"owner": "typescript",
11+
"pattern": "$tsc",
12+
"background": {
13+
"activeOnStart": true,
14+
"beginsPattern": {
15+
"regexp": "(.*?)"
16+
},
17+
"endsPattern": {
18+
"regexp": "bundle generation complete"
19+
}
20+
}
21+
}
22+
},
23+
{
24+
"type": "npm",
25+
"script": "test",
26+
"isBackground": true,
27+
"problemMatcher": {
28+
"owner": "typescript",
29+
"pattern": "$tsc",
30+
"background": {
31+
"activeOnStart": true,
32+
"beginsPattern": {
33+
"regexp": "(.*?)"
34+
},
35+
"endsPattern": {
36+
"regexp": "bundle generation complete"
37+
}
38+
}
39+
}
40+
}
41+
]
42+
}

CONTRIB.md

Lines changed: 33 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -8,66 +8,74 @@ Please, go through the following steps if you want to contribute to this project
88
# Development Environment
99
You need a running **iris-datapipe** instance in order to get the iris-datapipeUI working.
1010

11-
## Setup
1211
* Install Node
1312

1413
* Install local Angular
15-
1614
```
17-
mkdir angular-8
18-
cd angular-8
15+
mkdir angular-15
16+
cd angular-15
1917
npm install npm@latest
20-
npm install @angular/cli@8.3.21
18+
npm install @angular/cli@15.0.4
2119
```
2220

23-
* Install project dependencies
24-
21+
* Clone project
2522
```
23+
git clone https://github.com/intersystems-ib/iris-datapipeUI
2624
cd iris-datapipeUI
25+
```
26+
27+
* Install dependencies
28+
```
2729
npm install --legacy-peer-deps
2830
```
2931

3032
* Run development server
31-
32-
```bash
33-
export NODE_OPTIONS=--openssl-legacy-provider # see https://github.com/webpack/webpack/issues/14532
33+
```
3434
ng serve
3535
```
3636

37-
## Configuration
38-
Edit [environment.ts](./src/environments/environment.ts):
39-
* Modify URLs as needed to reach you **iris-datapipe** instance.
37+
# Util: angular cli commands used
4038

41-
## Application
42-
* *Credentials*: use your **iris-datapipe** instance credentials.
43-
* *URL*: http://localhost:4200/datapipe
39+
* Create application
40+
```
41+
ng new DataPipeUI --routing=true --style=scss
42+
mv DataPipeUI iris-datapipeUI
43+
```
4444

45-
# APPENDIX. angular/cli commands used
45+
* Install moment (dates), material dependencies
4646
```
47-
ng new DataPipeUI --directory=frontend --routing=true --skipGit --style=scss
4847
ng add @angular/material
49-
ng generate module shared
5048
npm install --save bootstrap
49+
npm install --save moment
50+
npm install --save ngx-material-timepicker
51+
```
5152

53+
* Modules and components
54+
```
55+
ng generate module shared
5256
ng generate module auth --routing
5357
ng generate component auth/login
5458
ng generate component auth/logout
5559
ng generate service auth/auth
5660
5761
ng generate service shared/alert
62+
ng generate service shared/info
63+
ng generate service shared/preferences
5864
ng generate component shared/alert-display
59-
60-
ng generate module about --routing
61-
ng generate component about/about
65+
ng generate component shared/confirm-dialog
6266
6367
ng generate module datapipe --routing
6468
ng generate component datapipe/inbox-list
6569
ng generate service datapipe/datapipe
70+
6671
ng generate component datapipe/inbox-detail
67-
ng generate component datapipe/viewstream-dialog
6872
ng generate component datapipe/inbox-info
73+
ng generate component datapipe/viewstream-dialog
6974
ng generate component datapipe/inbox-history
75+
```
7076

71-
ng generate component shared/confirm-dialog
72-
ng generate service shared/info
77+
* Install legacy dependencies for text diff
78+
```
79+
npm install --save --legacy-peer-deps ngx-text-diff
80+
npm install --save-dev --legacy-peer-deps @types/diff-match-patch
7381
```

Dockerfile

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,24 @@
33
########
44
## build: angular app distribution package
55
########
6-
FROM node:12.14.1-alpine AS build
6+
FROM node:18.12.0-alpine AS build
77

88
# angular build options
99
ARG NG_BUILD_OPTS
1010

11-
# -- git is required to stamp current version into app
12-
RUN apk --no-cache add git
13-
1411
# -- copy app files
1512
USER node
1613
WORKDIR /app
1714
COPY . .
1815

1916
# -- stamp current version (git latest commit message)
2017
USER root
18+
RUN apk add git
19+
RUN git config --global --add safe.directory /app
2120
RUN sh stamp-version.sh
2221

2322
# -- install deps & build distribution
24-
RUN npm install
23+
RUN npm install --legacy-peer-deps
2524
RUN echo ${NG_BUILD_OPTS}
2625
RUN npm run ${NG_BUILD_OPTS}
2726

@@ -30,5 +29,5 @@ RUN npm run ${NG_BUILD_OPTS}
3029
########
3130
FROM nginx AS run
3231
COPY nginx/default.conf /etc/nginx/conf.d/default.conf
33-
COPY --from=build /app/dist/DataPipeUI /usr/share/nginx/html
32+
COPY --from=build /app/dist/data-pipe-ui /usr/share/nginx/html
3433
WORKDIR /usr/share/nginx/html

0 commit comments

Comments
 (0)