From f286140109b1567145219f0c863325379865bb60 Mon Sep 17 00:00:00 2001 From: Philip Dakowitz Date: Sun, 8 Jan 2023 13:29:01 +0100 Subject: [PATCH] serve metrics under different port per default (#21) --- cmd/fullhouse/root.go | 4 +- config/fullhouse-default.yaml | 2 + frontend/package-lock.json | 363 ++++++++++++------ frontend/package.json | 12 +- frontend/src/app/app.module.ts | 10 +- .../navigation/navigation.component.html | 2 +- .../navigation/navigation.component.ts | 7 +- frontend/src/app/game/api/api.service.ts | 6 +- frontend/src/app/game/model.ts | 7 +- frontend/src/assets/i18n/en.json | 3 + go.mk | 4 +- pkg/fullhouse/config/config.go | 5 + pkg/fullhouse/server/server.go | 63 ++- 13 files changed, 337 insertions(+), 151 deletions(-) diff --git a/cmd/fullhouse/root.go b/cmd/fullhouse/root.go index 150018b..058d68c 100644 --- a/cmd/fullhouse/root.go +++ b/cmd/fullhouse/root.go @@ -11,8 +11,8 @@ import ( var log = logger.New("full-house") var rootCmd *cobra.Command -var GitCommit = "dev" -var GitTag = "dev" +var GitCommit = "" +var GitTag = "" var commandVersion string func init() { diff --git a/config/fullhouse-default.yaml b/config/fullhouse-default.yaml index 25f155f..37fd02e 100644 --- a/config/fullhouse-default.yaml +++ b/config/fullhouse-default.yaml @@ -1,6 +1,8 @@ fullHouse: server: port: 8080 + metrics: + port: 8090 mode: production votingSchemes: - name: Fibonacci diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 19c981b..da1b718 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -9,28 +9,30 @@ "version": "0.0.0", "dependencies": { "@angular/animations": "^15.0.4", - "@angular/cdk": "^15.0.3", + "@angular/cdk": "^15.0.4", "@angular/common": "^15.0.4", "@angular/compiler": "^15.0.4", "@angular/core": "^15.0.4", "@angular/forms": "^15.0.4", - "@angular/material": "^15.0.3", + "@angular/material": "^15.0.4", "@angular/platform-browser": "^15.0.4", "@angular/platform-browser-dynamic": "^15.0.4", "@angular/router": "^15.0.4", + "@messageformat/core": "^3.0.1", "@ngx-translate/core": "^14.0.0", "@ngx-translate/http-loader": "^7.0.0", "@ngxs/logger-plugin": "3.7.6", "@ngxs/storage-plugin": "3.7.6", "@ngxs/store": "3.7.6", "css-fx-layout": "2.1.0", + "ngx-translate-messageformat-compiler": "^6.2.0", "rxjs": "~7.8.0", "tslib": "^2.4.1", "zone.js": "~0.12.0" }, "devDependencies": { - "@angular-devkit/build-angular": "^15.0.4", - "@angular/cli": "^15.0.4", + "@angular-devkit/build-angular": "^15.0.5", + "@angular/cli": "^15.0.5", "@angular/compiler-cli": "^15.0.4", "@ngxs/devtools-plugin": "3.7.6", "@types/jasmine": "~4.3.1", @@ -59,12 +61,12 @@ } }, "node_modules/@angular-devkit/architect": { - "version": "0.1500.4", - "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.1500.4.tgz", - "integrity": "sha512-U9RQueICmmNk9c2zQjUN8qi/+H6kO2VKqeyuh3Vwj6yj4lQEINf1SNX8Ba9UFH/rxNo64iFM0k5x5vX0VajvCw==", + "version": "0.1500.5", + "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.1500.5.tgz", + "integrity": "sha512-n1L3Q2d7HoWFRRqihu3BAUB5xZFfz8LqQoHpVNl6HN1ugtmvqDUDoKrpYVH9LCKCqfJW2Cxssy+FERiDsihIJQ==", "dev": true, "dependencies": { - "@angular-devkit/core": "15.0.4", + "@angular-devkit/core": "15.0.5", "rxjs": "6.6.7" }, "engines": { @@ -92,15 +94,15 @@ "dev": true }, "node_modules/@angular-devkit/build-angular": { - "version": "15.0.4", - "resolved": "https://registry.npmjs.org/@angular-devkit/build-angular/-/build-angular-15.0.4.tgz", - "integrity": "sha512-F1KyaZEIWcVP2xIIiu3ZnH+FzuEehR9rli1F566dPijbll8EnknnItEugFtVhyoaVTh8eJmm1SfsoQrneMbrsg==", + "version": "15.0.5", + "resolved": "https://registry.npmjs.org/@angular-devkit/build-angular/-/build-angular-15.0.5.tgz", + "integrity": "sha512-VdswKp3YuoqEUUJZp1Zf0Yuc59EpbaZwCv1RiijgYh7+b+DO/SVwo6XWtQLQKg8h9gAozhHd7OrAprL3YP0N2g==", "dev": true, "dependencies": { "@ampproject/remapping": "2.2.0", - "@angular-devkit/architect": "0.1500.4", - "@angular-devkit/build-webpack": "0.1500.4", - "@angular-devkit/core": "15.0.4", + "@angular-devkit/architect": "0.1500.5", + "@angular-devkit/build-webpack": "0.1500.5", + "@angular-devkit/core": "15.0.5", "@babel/core": "7.20.2", "@babel/generator": "7.20.4", "@babel/helper-annotate-as-pure": "7.18.6", @@ -111,7 +113,7 @@ "@babel/runtime": "7.20.1", "@babel/template": "7.18.10", "@discoveryjs/json-ext": "0.5.7", - "@ngtools/webpack": "15.0.4", + "@ngtools/webpack": "15.0.5", "ansi-colors": "4.1.3", "autoprefixer": "10.4.13", "babel-loader": "9.1.0", @@ -219,12 +221,12 @@ "dev": true }, "node_modules/@angular-devkit/build-webpack": { - "version": "0.1500.4", - "resolved": "https://registry.npmjs.org/@angular-devkit/build-webpack/-/build-webpack-0.1500.4.tgz", - "integrity": "sha512-ay2vHMfyhaPDkzEISlRV1ZiTD/VCUunW+uRfNIzo9/o83UjTKVcqYUOUOvbIbrsb6JbQoNY+DwkES5frG1UmnA==", + "version": "0.1500.5", + "resolved": "https://registry.npmjs.org/@angular-devkit/build-webpack/-/build-webpack-0.1500.5.tgz", + "integrity": "sha512-UsotO4snRjkd6JdC45zjWy+LR+FtM1sVgTi2MA4/tiVOTTc/M8cHWFeAg94+mqC773WnisNKiJAyHnW4SXjhiA==", "dev": true, "dependencies": { - "@angular-devkit/architect": "0.1500.4", + "@angular-devkit/architect": "0.1500.5", "rxjs": "6.6.7" }, "engines": { @@ -256,9 +258,9 @@ "dev": true }, "node_modules/@angular-devkit/core": { - "version": "15.0.4", - "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-15.0.4.tgz", - "integrity": "sha512-4ITpRAevd652SxB+qNesIQ9qfbm7wT5UBU5kJOPPwGL77I21g8CQpkmV1n5VSacPvC9Zbz90feOWexf7w7JzcA==", + "version": "15.0.5", + "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-15.0.5.tgz", + "integrity": "sha512-SxLvbpqcQfb1qRykZjqRUG/8uC1FYpneyNV9S9YglXg4JhCFhfc9AnKxuu9Bm/O8V7FghOIlGWGglCdPHra0pw==", "dev": true, "dependencies": { "ajv": "8.11.0", @@ -300,12 +302,12 @@ "dev": true }, "node_modules/@angular-devkit/schematics": { - "version": "15.0.4", - "resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-15.0.4.tgz", - "integrity": "sha512-/gXiLFS0+xFdx6wPoBpe/c6/K9I5edMpaASqPf4XheKtrsSvL+qTlIi3nsbfItzOiDXbaBmlbxGfkMHz/yg0Ig==", + "version": "15.0.5", + "resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-15.0.5.tgz", + "integrity": "sha512-S3YN1Q/iOOXA9ipWbh+bDaTJwc0Wb0uPqSUJov+L/EojNi9xglY80bLwVdL2OHZV2e+62dhkvQ4REM3hZT2/Hg==", "dev": true, "dependencies": { - "@angular-devkit/core": "15.0.4", + "@angular-devkit/core": "15.0.5", "jsonc-parser": "3.2.0", "magic-string": "0.26.7", "ora": "5.4.1", @@ -350,9 +352,9 @@ } }, "node_modules/@angular/cdk": { - "version": "15.0.3", - "resolved": "https://registry.npmjs.org/@angular/cdk/-/cdk-15.0.3.tgz", - "integrity": "sha512-iRLV6V6ksIshDL8Cdn1+DUNTRLqj+DAqmYTWYCEvH4qU6o0XSeXrAHNW5zNFqWgCZbmWt03G5jOBWBNaxa9QKw==", + "version": "15.0.4", + "resolved": "https://registry.npmjs.org/@angular/cdk/-/cdk-15.0.4.tgz", + "integrity": "sha512-I+OedGqv9cBsHMVGl/VfjGItAi8pK7UuYiPnxSB25+m8v3jh7dMzfVGqdqpTSGxd1Zv02ypLZvEbiI30abRykQ==", "dependencies": { "tslib": "^2.3.0" }, @@ -366,15 +368,15 @@ } }, "node_modules/@angular/cli": { - "version": "15.0.4", - "resolved": "https://registry.npmjs.org/@angular/cli/-/cli-15.0.4.tgz", - "integrity": "sha512-dQEus458EvBYZuM10UPO/1BYshV3cprY4os6uQj6YLdEwOogElkAedUILgtTYOo3jrwc+qjefHVJbz6R+xJCOg==", + "version": "15.0.5", + "resolved": "https://registry.npmjs.org/@angular/cli/-/cli-15.0.5.tgz", + "integrity": "sha512-bg0p29FPlg2g07GPkEEtqphErtNnZgiAy5R+4aTQlPt0Pl0hXIbGnl3HRBFXQkhPSdclKn9W5j69tOcDBNFBdg==", "dev": true, "dependencies": { - "@angular-devkit/architect": "0.1500.4", - "@angular-devkit/core": "15.0.4", - "@angular-devkit/schematics": "15.0.4", - "@schematics/angular": "15.0.4", + "@angular-devkit/architect": "0.1500.5", + "@angular-devkit/core": "15.0.5", + "@angular-devkit/schematics": "15.0.5", + "@schematics/angular": "15.0.5", "@yarnpkg/lockfile": "1.1.0", "ansi-colors": "4.1.3", "ini": "3.0.1", @@ -508,9 +510,9 @@ } }, "node_modules/@angular/material": { - "version": "15.0.3", - "resolved": "https://registry.npmjs.org/@angular/material/-/material-15.0.3.tgz", - "integrity": "sha512-x7c6Uc9SnQW0AGTFJZFMQHP80YzmrExtrNn5vYUyWB9QFiNM+jcsqAsSEoGhABU/G5xs8fd40Fj7o2HBixQ0fw==", + "version": "15.0.4", + "resolved": "https://registry.npmjs.org/@angular/material/-/material-15.0.4.tgz", + "integrity": "sha512-hvGQYzfttb78WZdNrYjA3dwKNtCiJ3NXLzTUbEGppDG5/9awCphDyN/5Lj3tNLsU8lus8l/UAIn6CCXCw2p3Vw==", "dependencies": { "@material/animation": "15.0.0-canary.7971d6ad5.0", "@material/auto-init": "15.0.0-canary.7971d6ad5.0", @@ -563,7 +565,7 @@ }, "peerDependencies": { "@angular/animations": "^15.0.0 || ^16.0.0", - "@angular/cdk": "15.0.3", + "@angular/cdk": "15.0.4", "@angular/common": "^15.0.0 || ^16.0.0", "@angular/core": "^15.0.0 || ^16.0.0", "@angular/forms": "^15.0.0 || ^16.0.0", @@ -3285,10 +3287,49 @@ "tslib": "^2.1.0" } }, + "node_modules/@messageformat/core": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@messageformat/core/-/core-3.0.1.tgz", + "integrity": "sha512-yxj2+0e46hcZqJfNf0ZYbC2q6WlcGoh4g11mCyRtTueR0AD8F9z4JMYAS1aOiFG8Vl1LZg/h5hZHKmWTAyZq8g==", + "dependencies": { + "@messageformat/date-skeleton": "^1.0.0", + "@messageformat/number-skeleton": "^1.0.0", + "@messageformat/parser": "^5.0.0", + "@messageformat/runtime": "^3.0.1", + "make-plural": "^7.0.0", + "safe-identifier": "^0.4.1" + } + }, + "node_modules/@messageformat/date-skeleton": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@messageformat/date-skeleton/-/date-skeleton-1.0.1.tgz", + "integrity": "sha512-jPXy8fg+WMPIgmGjxSlnGJn68h/2InfT0TNSkVx0IGXgp4ynnvYkbZ51dGWmGySEK+pBiYUttbQdu5XEqX5CRg==" + }, + "node_modules/@messageformat/number-skeleton": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@messageformat/number-skeleton/-/number-skeleton-1.1.0.tgz", + "integrity": "sha512-F0Io+GOSvFFxvp9Ze3L5kAoZ2NnOAT0Mr/jpGNd3fqo8A0t4NxNIAcCdggtl2B/gN2ErkIKSBVPrF7xcW1IGvA==" + }, + "node_modules/@messageformat/parser": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@messageformat/parser/-/parser-5.0.0.tgz", + "integrity": "sha512-WiDKhi8F0zQaFU8cXgqq69eYFarCnTVxKcvhAONufKf0oUxbqLMW6JX6rV4Hqh+BEQWGyKKKHY4g1XA6bCLylA==", + "dependencies": { + "moo": "^0.5.1" + } + }, + "node_modules/@messageformat/runtime": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@messageformat/runtime/-/runtime-3.0.1.tgz", + "integrity": "sha512-6RU5ol2lDtO8bD9Yxe6CZkl0DArdv0qkuoZC+ZwowU+cdRlVE1157wjCmlA5Rsf1Xc/brACnsZa5PZpEDfTFFg==", + "dependencies": { + "make-plural": "^7.0.0" + } + }, "node_modules/@ngtools/webpack": { - "version": "15.0.4", - "resolved": "https://registry.npmjs.org/@ngtools/webpack/-/webpack-15.0.4.tgz", - "integrity": "sha512-+1riOTohRHhN2N8Y+usHFtNz+Rt6q/44puj9rwjlKwWIA+6qxAv3kQhVHivVaU3bCAB9B/3jAxSuZTNHk0wgTg==", + "version": "15.0.5", + "resolved": "https://registry.npmjs.org/@ngtools/webpack/-/webpack-15.0.5.tgz", + "integrity": "sha512-G/ppIWbcYsLQhSzmLXd3KvApDrW1HUNPVEPBZuSXWZ1FpWZ4VsMDm75ZSGwvDzVoxH0BJB1OYvQZespxIS/WsA==", "dev": true, "engines": { "node": "^14.20.0 || ^16.13.0 || >=18.10.0", @@ -3637,13 +3678,13 @@ } }, "node_modules/@schematics/angular": { - "version": "15.0.4", - "resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-15.0.4.tgz", - "integrity": "sha512-4l4WZlr9MnhXo2B7eLczttgkeq8Agm3zfiX0trYkOdYqLtzOKxPiI+RrZSsfIDmmLSE1EillZ3PtDImMzAgQPg==", + "version": "15.0.5", + "resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-15.0.5.tgz", + "integrity": "sha512-lmns1eJM42RFlv1GPrNwe7TV70hyrIiadyPhuJmeT8qp8cxGPRJ3yHFUdtB7qPv0OkwfI/HVSeZwlnfNXQhiQg==", "dev": true, "dependencies": { - "@angular-devkit/core": "15.0.4", - "@angular-devkit/schematics": "15.0.4", + "@angular-devkit/core": "15.0.5", + "@angular-devkit/schematics": "15.0.5", "jsonc-parser": "3.2.0" }, "engines": { @@ -3759,9 +3800,9 @@ } }, "node_modules/@types/express-serve-static-core": { - "version": "4.17.31", - "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.31.tgz", - "integrity": "sha512-DxMhY+NAsTwMMFHBTtJFNp5qiHKJ7TeqOo23zVEM9alT1Ml27Q3xcTH0xwxn7Q0BbMcVEJOs/7aQtUWupUQN3Q==", + "version": "4.17.32", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.32.tgz", + "integrity": "sha512-aI5h/VOkxOF2Z1saPy0Zsxs5avets/iaiAJYznQFm5By/pamU31xWKL//epiF4OfUA2qTOc9PV6tCUjhO8wlZA==", "dev": true, "dependencies": { "@types/node": "*", @@ -3855,9 +3896,9 @@ } }, "node_modules/@types/ws": { - "version": "8.5.3", - "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.3.tgz", - "integrity": "sha512-6YOoWjruKj1uLf3INHH7D3qTXwFfEsg1kf3c0uDdSBJwfa/llkwIjrAGV7j7mVgGNbzTQ3HiHKKDXl6bJPD97w==", + "version": "8.5.4", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.4.tgz", + "integrity": "sha512-zdQDHKUgcX/zBc4GrwsE/7dVdAD8JR4EuiAXiiUhhfyIJXXb2+PrGshFyeXWQPMmmZ2XxgaqclgpIC7eTXc1mg==", "dev": true, "dependencies": { "@types/node": "*" @@ -8804,6 +8845,11 @@ "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, + "node_modules/make-plural": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/make-plural/-/make-plural-7.2.0.tgz", + "integrity": "sha512-WkdI+iaWaBCFM2wUXwos8Z7spg5Dt64Xe/VI6NpRaly21cDtD76N6S97K//UtzV0dHOiXX+E90TnszdXHG0aMg==" + }, "node_modules/media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", @@ -8814,9 +8860,9 @@ } }, "node_modules/memfs": { - "version": "3.4.12", - "resolved": "https://registry.npmjs.org/memfs/-/memfs-3.4.12.tgz", - "integrity": "sha512-BcjuQn6vfqP+k100e0E9m61Hyqa//Brp+I3f0OBmN0ATHlFA8vx3Lt8z57R3u2bPqe3WGDBC+nF72fTH7isyEw==", + "version": "3.4.13", + "resolved": "https://registry.npmjs.org/memfs/-/memfs-3.4.13.tgz", + "integrity": "sha512-omTM41g3Skpvx5dSYeZIbXKcXoAVc/AoMNwn9TKx++L/gaen/+4TTttmu8ZSch5vfVJ8uJvGbroTsIlslRg6lg==", "dev": true, "dependencies": { "fs-monkey": "^1.0.3" @@ -9080,6 +9126,11 @@ "mkdirp": "bin/cmd.js" } }, + "node_modules/moo": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/moo/-/moo-0.5.2.tgz", + "integrity": "sha512-iSAJLHYKnX41mKcJKjqvnAN9sf0LMDTXDEvFv+ffuRR9a1MIuXLjMNL6EsnDHSkKLTWNqQQ5uo61P4EbU4NU+Q==" + }, "node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -9173,6 +9224,19 @@ "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", "dev": true }, + "node_modules/ngx-translate-messageformat-compiler": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/ngx-translate-messageformat-compiler/-/ngx-translate-messageformat-compiler-6.2.0.tgz", + "integrity": "sha512-niGhub53gMw8GbmP3u3OB7SVJn7z5JZodQxQxDb6ZE0A9c0WeVBzz30WbekQshBF7ijzLYE/qcM+lzTCpWkRmg==", + "dependencies": { + "tslib": "^2.4.1" + }, + "peerDependencies": { + "@angular/core": "^13.0.0 || ^14.0.0 || ^15.0.0", + "@messageformat/core": "^3.0.0", + "@ngx-translate/core": "^14.0.0" + } + }, "node_modules/nice-napi": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/nice-napi/-/nice-napi-1.0.2.tgz", @@ -11079,6 +11143,11 @@ } ] }, + "node_modules/safe-identifier": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/safe-identifier/-/safe-identifier-0.4.2.tgz", + "integrity": "sha512-6pNbSMW6OhAi9j+N8V+U715yBQsaWJ7eyEUaOrawX+isg5ZxhUlV1NipNtgaKHmFGiABwt+ZF04Ii+3Xjkg+8w==" + }, "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", @@ -12559,16 +12628,16 @@ } }, "node_modules/webpack-dev-server/node_modules/ws": { - "version": "8.11.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.11.0.tgz", - "integrity": "sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg==", + "version": "8.12.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.12.0.tgz", + "integrity": "sha512-kU62emKIdKVeEIOIKVegvqpXMSTAMLJozpHZaJNDYqBjzlSYXQGviYwN1osDLJ9av68qHd4a2oSjd7yD4pacig==", "dev": true, "engines": { "node": ">=10.0.0" }, "peerDependencies": { "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" + "utf-8-validate": ">=5.0.2" }, "peerDependenciesMeta": { "bufferutil": { @@ -12930,12 +12999,12 @@ } }, "@angular-devkit/architect": { - "version": "0.1500.4", - "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.1500.4.tgz", - "integrity": "sha512-U9RQueICmmNk9c2zQjUN8qi/+H6kO2VKqeyuh3Vwj6yj4lQEINf1SNX8Ba9UFH/rxNo64iFM0k5x5vX0VajvCw==", + "version": "0.1500.5", + "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.1500.5.tgz", + "integrity": "sha512-n1L3Q2d7HoWFRRqihu3BAUB5xZFfz8LqQoHpVNl6HN1ugtmvqDUDoKrpYVH9LCKCqfJW2Cxssy+FERiDsihIJQ==", "dev": true, "requires": { - "@angular-devkit/core": "15.0.4", + "@angular-devkit/core": "15.0.5", "rxjs": "6.6.7" }, "dependencies": { @@ -12957,15 +13026,15 @@ } }, "@angular-devkit/build-angular": { - "version": "15.0.4", - "resolved": "https://registry.npmjs.org/@angular-devkit/build-angular/-/build-angular-15.0.4.tgz", - "integrity": "sha512-F1KyaZEIWcVP2xIIiu3ZnH+FzuEehR9rli1F566dPijbll8EnknnItEugFtVhyoaVTh8eJmm1SfsoQrneMbrsg==", + "version": "15.0.5", + "resolved": "https://registry.npmjs.org/@angular-devkit/build-angular/-/build-angular-15.0.5.tgz", + "integrity": "sha512-VdswKp3YuoqEUUJZp1Zf0Yuc59EpbaZwCv1RiijgYh7+b+DO/SVwo6XWtQLQKg8h9gAozhHd7OrAprL3YP0N2g==", "dev": true, "requires": { "@ampproject/remapping": "2.2.0", - "@angular-devkit/architect": "0.1500.4", - "@angular-devkit/build-webpack": "0.1500.4", - "@angular-devkit/core": "15.0.4", + "@angular-devkit/architect": "0.1500.5", + "@angular-devkit/build-webpack": "0.1500.5", + "@angular-devkit/core": "15.0.5", "@babel/core": "7.20.2", "@babel/generator": "7.20.4", "@babel/helper-annotate-as-pure": "7.18.6", @@ -12976,7 +13045,7 @@ "@babel/runtime": "7.20.1", "@babel/template": "7.18.10", "@discoveryjs/json-ext": "0.5.7", - "@ngtools/webpack": "15.0.4", + "@ngtools/webpack": "15.0.5", "ansi-colors": "4.1.3", "autoprefixer": "10.4.13", "babel-loader": "9.1.0", @@ -13044,12 +13113,12 @@ } }, "@angular-devkit/build-webpack": { - "version": "0.1500.4", - "resolved": "https://registry.npmjs.org/@angular-devkit/build-webpack/-/build-webpack-0.1500.4.tgz", - "integrity": "sha512-ay2vHMfyhaPDkzEISlRV1ZiTD/VCUunW+uRfNIzo9/o83UjTKVcqYUOUOvbIbrsb6JbQoNY+DwkES5frG1UmnA==", + "version": "0.1500.5", + "resolved": "https://registry.npmjs.org/@angular-devkit/build-webpack/-/build-webpack-0.1500.5.tgz", + "integrity": "sha512-UsotO4snRjkd6JdC45zjWy+LR+FtM1sVgTi2MA4/tiVOTTc/M8cHWFeAg94+mqC773WnisNKiJAyHnW4SXjhiA==", "dev": true, "requires": { - "@angular-devkit/architect": "0.1500.4", + "@angular-devkit/architect": "0.1500.5", "rxjs": "6.6.7" }, "dependencies": { @@ -13071,9 +13140,9 @@ } }, "@angular-devkit/core": { - "version": "15.0.4", - "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-15.0.4.tgz", - "integrity": "sha512-4ITpRAevd652SxB+qNesIQ9qfbm7wT5UBU5kJOPPwGL77I21g8CQpkmV1n5VSacPvC9Zbz90feOWexf7w7JzcA==", + "version": "15.0.5", + "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-15.0.5.tgz", + "integrity": "sha512-SxLvbpqcQfb1qRykZjqRUG/8uC1FYpneyNV9S9YglXg4JhCFhfc9AnKxuu9Bm/O8V7FghOIlGWGglCdPHra0pw==", "dev": true, "requires": { "ajv": "8.11.0", @@ -13101,12 +13170,12 @@ } }, "@angular-devkit/schematics": { - "version": "15.0.4", - "resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-15.0.4.tgz", - "integrity": "sha512-/gXiLFS0+xFdx6wPoBpe/c6/K9I5edMpaASqPf4XheKtrsSvL+qTlIi3nsbfItzOiDXbaBmlbxGfkMHz/yg0Ig==", + "version": "15.0.5", + "resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-15.0.5.tgz", + "integrity": "sha512-S3YN1Q/iOOXA9ipWbh+bDaTJwc0Wb0uPqSUJov+L/EojNi9xglY80bLwVdL2OHZV2e+62dhkvQ4REM3hZT2/Hg==", "dev": true, "requires": { - "@angular-devkit/core": "15.0.4", + "@angular-devkit/core": "15.0.5", "jsonc-parser": "3.2.0", "magic-string": "0.26.7", "ora": "5.4.1", @@ -13139,24 +13208,24 @@ } }, "@angular/cdk": { - "version": "15.0.3", - "resolved": "https://registry.npmjs.org/@angular/cdk/-/cdk-15.0.3.tgz", - "integrity": "sha512-iRLV6V6ksIshDL8Cdn1+DUNTRLqj+DAqmYTWYCEvH4qU6o0XSeXrAHNW5zNFqWgCZbmWt03G5jOBWBNaxa9QKw==", + "version": "15.0.4", + "resolved": "https://registry.npmjs.org/@angular/cdk/-/cdk-15.0.4.tgz", + "integrity": "sha512-I+OedGqv9cBsHMVGl/VfjGItAi8pK7UuYiPnxSB25+m8v3jh7dMzfVGqdqpTSGxd1Zv02ypLZvEbiI30abRykQ==", "requires": { "parse5": "^7.1.2", "tslib": "^2.3.0" } }, "@angular/cli": { - "version": "15.0.4", - "resolved": "https://registry.npmjs.org/@angular/cli/-/cli-15.0.4.tgz", - "integrity": "sha512-dQEus458EvBYZuM10UPO/1BYshV3cprY4os6uQj6YLdEwOogElkAedUILgtTYOo3jrwc+qjefHVJbz6R+xJCOg==", + "version": "15.0.5", + "resolved": "https://registry.npmjs.org/@angular/cli/-/cli-15.0.5.tgz", + "integrity": "sha512-bg0p29FPlg2g07GPkEEtqphErtNnZgiAy5R+4aTQlPt0Pl0hXIbGnl3HRBFXQkhPSdclKn9W5j69tOcDBNFBdg==", "dev": true, "requires": { - "@angular-devkit/architect": "0.1500.4", - "@angular-devkit/core": "15.0.4", - "@angular-devkit/schematics": "15.0.4", - "@schematics/angular": "15.0.4", + "@angular-devkit/architect": "0.1500.5", + "@angular-devkit/core": "15.0.5", + "@angular-devkit/schematics": "15.0.5", + "@schematics/angular": "15.0.5", "@yarnpkg/lockfile": "1.1.0", "ansi-colors": "4.1.3", "ini": "3.0.1", @@ -13235,9 +13304,9 @@ } }, "@angular/material": { - "version": "15.0.3", - "resolved": "https://registry.npmjs.org/@angular/material/-/material-15.0.3.tgz", - "integrity": "sha512-x7c6Uc9SnQW0AGTFJZFMQHP80YzmrExtrNn5vYUyWB9QFiNM+jcsqAsSEoGhABU/G5xs8fd40Fj7o2HBixQ0fw==", + "version": "15.0.4", + "resolved": "https://registry.npmjs.org/@angular/material/-/material-15.0.4.tgz", + "integrity": "sha512-hvGQYzfttb78WZdNrYjA3dwKNtCiJ3NXLzTUbEGppDG5/9awCphDyN/5Lj3tNLsU8lus8l/UAIn6CCXCw2p3Vw==", "requires": { "@material/animation": "15.0.0-canary.7971d6ad5.0", "@material/auto-init": "15.0.0-canary.7971d6ad5.0", @@ -15425,10 +15494,49 @@ "tslib": "^2.1.0" } }, + "@messageformat/core": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@messageformat/core/-/core-3.0.1.tgz", + "integrity": "sha512-yxj2+0e46hcZqJfNf0ZYbC2q6WlcGoh4g11mCyRtTueR0AD8F9z4JMYAS1aOiFG8Vl1LZg/h5hZHKmWTAyZq8g==", + "requires": { + "@messageformat/date-skeleton": "^1.0.0", + "@messageformat/number-skeleton": "^1.0.0", + "@messageformat/parser": "^5.0.0", + "@messageformat/runtime": "^3.0.1", + "make-plural": "^7.0.0", + "safe-identifier": "^0.4.1" + } + }, + "@messageformat/date-skeleton": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@messageformat/date-skeleton/-/date-skeleton-1.0.1.tgz", + "integrity": "sha512-jPXy8fg+WMPIgmGjxSlnGJn68h/2InfT0TNSkVx0IGXgp4ynnvYkbZ51dGWmGySEK+pBiYUttbQdu5XEqX5CRg==" + }, + "@messageformat/number-skeleton": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@messageformat/number-skeleton/-/number-skeleton-1.1.0.tgz", + "integrity": "sha512-F0Io+GOSvFFxvp9Ze3L5kAoZ2NnOAT0Mr/jpGNd3fqo8A0t4NxNIAcCdggtl2B/gN2ErkIKSBVPrF7xcW1IGvA==" + }, + "@messageformat/parser": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@messageformat/parser/-/parser-5.0.0.tgz", + "integrity": "sha512-WiDKhi8F0zQaFU8cXgqq69eYFarCnTVxKcvhAONufKf0oUxbqLMW6JX6rV4Hqh+BEQWGyKKKHY4g1XA6bCLylA==", + "requires": { + "moo": "^0.5.1" + } + }, + "@messageformat/runtime": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@messageformat/runtime/-/runtime-3.0.1.tgz", + "integrity": "sha512-6RU5ol2lDtO8bD9Yxe6CZkl0DArdv0qkuoZC+ZwowU+cdRlVE1157wjCmlA5Rsf1Xc/brACnsZa5PZpEDfTFFg==", + "requires": { + "make-plural": "^7.0.0" + } + }, "@ngtools/webpack": { - "version": "15.0.4", - "resolved": "https://registry.npmjs.org/@ngtools/webpack/-/webpack-15.0.4.tgz", - "integrity": "sha512-+1riOTohRHhN2N8Y+usHFtNz+Rt6q/44puj9rwjlKwWIA+6qxAv3kQhVHivVaU3bCAB9B/3jAxSuZTNHk0wgTg==", + "version": "15.0.5", + "resolved": "https://registry.npmjs.org/@ngtools/webpack/-/webpack-15.0.5.tgz", + "integrity": "sha512-G/ppIWbcYsLQhSzmLXd3KvApDrW1HUNPVEPBZuSXWZ1FpWZ4VsMDm75ZSGwvDzVoxH0BJB1OYvQZespxIS/WsA==", "dev": true, "requires": {} }, @@ -15670,13 +15778,13 @@ } }, "@schematics/angular": { - "version": "15.0.4", - "resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-15.0.4.tgz", - "integrity": "sha512-4l4WZlr9MnhXo2B7eLczttgkeq8Agm3zfiX0trYkOdYqLtzOKxPiI+RrZSsfIDmmLSE1EillZ3PtDImMzAgQPg==", + "version": "15.0.5", + "resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-15.0.5.tgz", + "integrity": "sha512-lmns1eJM42RFlv1GPrNwe7TV70hyrIiadyPhuJmeT8qp8cxGPRJ3yHFUdtB7qPv0OkwfI/HVSeZwlnfNXQhiQg==", "dev": true, "requires": { - "@angular-devkit/core": "15.0.4", - "@angular-devkit/schematics": "15.0.4", + "@angular-devkit/core": "15.0.5", + "@angular-devkit/schematics": "15.0.5", "jsonc-parser": "3.2.0" } }, @@ -15784,9 +15892,9 @@ } }, "@types/express-serve-static-core": { - "version": "4.17.31", - "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.31.tgz", - "integrity": "sha512-DxMhY+NAsTwMMFHBTtJFNp5qiHKJ7TeqOo23zVEM9alT1Ml27Q3xcTH0xwxn7Q0BbMcVEJOs/7aQtUWupUQN3Q==", + "version": "4.17.32", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.32.tgz", + "integrity": "sha512-aI5h/VOkxOF2Z1saPy0Zsxs5avets/iaiAJYznQFm5By/pamU31xWKL//epiF4OfUA2qTOc9PV6tCUjhO8wlZA==", "dev": true, "requires": { "@types/node": "*", @@ -15880,9 +15988,9 @@ } }, "@types/ws": { - "version": "8.5.3", - "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.3.tgz", - "integrity": "sha512-6YOoWjruKj1uLf3INHH7D3qTXwFfEsg1kf3c0uDdSBJwfa/llkwIjrAGV7j7mVgGNbzTQ3HiHKKDXl6bJPD97w==", + "version": "8.5.4", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.4.tgz", + "integrity": "sha512-zdQDHKUgcX/zBc4GrwsE/7dVdAD8JR4EuiAXiiUhhfyIJXXb2+PrGshFyeXWQPMmmZ2XxgaqclgpIC7eTXc1mg==", "dev": true, "requires": { "@types/node": "*" @@ -19570,6 +19678,11 @@ } } }, + "make-plural": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/make-plural/-/make-plural-7.2.0.tgz", + "integrity": "sha512-WkdI+iaWaBCFM2wUXwos8Z7spg5Dt64Xe/VI6NpRaly21cDtD76N6S97K//UtzV0dHOiXX+E90TnszdXHG0aMg==" + }, "media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", @@ -19577,9 +19690,9 @@ "dev": true }, "memfs": { - "version": "3.4.12", - "resolved": "https://registry.npmjs.org/memfs/-/memfs-3.4.12.tgz", - "integrity": "sha512-BcjuQn6vfqP+k100e0E9m61Hyqa//Brp+I3f0OBmN0ATHlFA8vx3Lt8z57R3u2bPqe3WGDBC+nF72fTH7isyEw==", + "version": "3.4.13", + "resolved": "https://registry.npmjs.org/memfs/-/memfs-3.4.13.tgz", + "integrity": "sha512-omTM41g3Skpvx5dSYeZIbXKcXoAVc/AoMNwn9TKx++L/gaen/+4TTttmu8ZSch5vfVJ8uJvGbroTsIlslRg6lg==", "dev": true, "requires": { "fs-monkey": "^1.0.3" @@ -19778,6 +19891,11 @@ "minimist": "^1.2.6" } }, + "moo": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/moo/-/moo-0.5.2.tgz", + "integrity": "sha512-iSAJLHYKnX41mKcJKjqvnAN9sf0LMDTXDEvFv+ffuRR9a1MIuXLjMNL6EsnDHSkKLTWNqQQ5uo61P4EbU4NU+Q==" + }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -19852,6 +19970,14 @@ "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", "dev": true }, + "ngx-translate-messageformat-compiler": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/ngx-translate-messageformat-compiler/-/ngx-translate-messageformat-compiler-6.2.0.tgz", + "integrity": "sha512-niGhub53gMw8GbmP3u3OB7SVJn7z5JZodQxQxDb6ZE0A9c0WeVBzz30WbekQshBF7ijzLYE/qcM+lzTCpWkRmg==", + "requires": { + "tslib": "^2.4.1" + } + }, "nice-napi": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/nice-napi/-/nice-napi-1.0.2.tgz", @@ -21289,6 +21415,11 @@ "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", "dev": true }, + "safe-identifier": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/safe-identifier/-/safe-identifier-0.4.2.tgz", + "integrity": "sha512-6pNbSMW6OhAi9j+N8V+U715yBQsaWJ7eyEUaOrawX+isg5ZxhUlV1NipNtgaKHmFGiABwt+ZF04Ii+3Xjkg+8w==" + }, "safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", @@ -22444,9 +22575,9 @@ }, "dependencies": { "ws": { - "version": "8.11.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.11.0.tgz", - "integrity": "sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg==", + "version": "8.12.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.12.0.tgz", + "integrity": "sha512-kU62emKIdKVeEIOIKVegvqpXMSTAMLJozpHZaJNDYqBjzlSYXQGviYwN1osDLJ9av68qHd4a2oSjd7yD4pacig==", "dev": true, "requires": {} } diff --git a/frontend/package.json b/frontend/package.json index 7b67209..96327aa 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -12,29 +12,32 @@ "private": true, "dependencies": { "@angular/animations": "^15.0.4", - "@angular/cdk": "^15.0.3", + "@angular/cdk": "^15.0.4", "@angular/common": "^15.0.4", "@angular/compiler": "^15.0.4", "@angular/core": "^15.0.4", "@angular/forms": "^15.0.4", - "@angular/material": "^15.0.3", + "@angular/material": "^15.0.4", "@angular/platform-browser": "^15.0.4", "@angular/platform-browser-dynamic": "^15.0.4", "@angular/router": "^15.0.4", + "@messageformat/core": "^3.0.1", "@ngx-translate/core": "^14.0.0", "@ngx-translate/http-loader": "^7.0.0", "@ngxs/logger-plugin": "3.7.6", "@ngxs/storage-plugin": "3.7.6", "@ngxs/store": "3.7.6", "css-fx-layout": "2.1.0", + "ngx-translate-messageformat-compiler": "^6.2.0", "rxjs": "~7.8.0", "tslib": "^2.4.1", "zone.js": "~0.12.0" }, "devDependencies": { - "@angular-devkit/build-angular": "^15.0.4", - "@angular/cli": "^15.0.4", + "@angular-devkit/build-angular": "^15.0.5", + "@angular/cli": "^15.0.5", "@angular/compiler-cli": "^15.0.4", + "@ngxs/devtools-plugin": "3.7.6", "@types/jasmine": "~4.3.1", "@types/node": "^18.11.17", "gzipper": "7.2.0", @@ -44,7 +47,6 @@ "karma-coverage": "~2.2.0", "karma-jasmine": "~5.1.0", "karma-jasmine-html-reporter": "^2.0.0", - "@ngxs/devtools-plugin": "3.7.6", "typescript": "~4.8.4" } } diff --git a/frontend/src/app/app.module.ts b/frontend/src/app/app.module.ts index 15ff302..3255127 100644 --- a/frontend/src/app/app.module.ts +++ b/frontend/src/app/app.module.ts @@ -32,13 +32,14 @@ import {InvitePlayersDialogComponent} from "./components/invite-players-dialog/i import {configureSvgIcons, configureTranslations, provideAnimationDriverBasedOnUserPreferences} from "./configuration/configuration"; import {ParticipantComponent} from "./game/participant/participant.component"; import {AnimationDriver} from "@angular/animations/browser"; -import {MAT_TOOLTIP_DEFAULT_OPTIONS, MatTooltipDefaultOptions} from "@angular/material/tooltip"; +import {MAT_TOOLTIP_DEFAULT_OPTIONS, MatTooltipDefaultOptions, MatTooltipModule} from "@angular/material/tooltip"; import {ThemingState} from "./store/theming/theming.state"; import {ThemeSwitcherComponent} from "./components/theme-switcher/theme-switcher.component"; import {MatMenuModule} from "@angular/material/menu"; import {FractionFilterPipe} from "./game/game/fraction-filter.pipe"; -import {TranslateLoader, TranslateModule, TranslateService} from "@ngx-translate/core"; +import {TranslateCompiler, TranslateLoader, TranslateModule, TranslateService} from "@ngx-translate/core"; import {TranslateHttpLoader} from "@ngx-translate/http-loader"; +import {TranslateMessageFormatCompiler} from "ngx-translate-messageformat-compiler"; export function HttpLoaderFactory(http: HttpClient) { return new TranslateHttpLoader(http, '/assets/i18n/', '.json'); @@ -74,11 +75,16 @@ export function HttpLoaderFactory(http: HttpClient) { NgxsLoggerPluginModule.forRoot(), MatIconModule, MatMenuModule, + MatTooltipModule, TranslateModule.forRoot({ loader: { provide: TranslateLoader, useFactory: HttpLoaderFactory, deps: [HttpClient] + }, + compiler: { + provide: TranslateCompiler, + useClass: TranslateMessageFormatCompiler } }) ], diff --git a/frontend/src/app/components/navigation/navigation.component.html b/frontend/src/app/components/navigation/navigation.component.html index 9267e1d..114af7f 100644 --- a/frontend/src/app/components/navigation/navigation.component.html +++ b/frontend/src/app/components/navigation/navigation.component.html @@ -1,7 +1,7 @@