Skip to content

Commit c04076d

Browse files
Merge pull request #511 from atlas-bi/alpha
chore(sync) Syncing changes from alpha to master
2 parents 77549e5 + 037d592 commit c04076d

File tree

774 files changed

+3142
-2866
lines changed

Some content is hidden

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

774 files changed

+3142
-2866
lines changed

.github/workflows/lighthouse.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ jobs:
1111
with:
1212
ref: ${{ github.event.pull_request.head.sha }}
1313
- name: setup dotnet
14-
uses: actions/setup-dotnet@v3
14+
uses: actions/setup-dotnet@v4
1515
with:
16-
dotnet-version: '7.0.x'
16+
dotnet-version: '8.0.x'
1717
- name: setup node
18-
uses: actions/setup-node@v3
18+
uses: actions/setup-node@v4
1919
with:
2020
node-version: '16.x'
2121
- name: install node deps

.github/workflows/sonar.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
runs-on: windows-latest
99
steps:
1010
- name: Set up JDK
11-
uses: actions/setup-java@v3
11+
uses: actions/setup-java@v4
1212
with:
1313
distribution: 'temurin'
1414
java-version: 17

.github/workflows/test.yaml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
uses: actions/checkout@v4
1616

1717
- name: setup node
18-
uses: actions/setup-node@v3
18+
uses: actions/setup-node@v4
1919
with:
2020
node-version: '18.x'
2121

@@ -35,11 +35,11 @@ jobs:
3535
uses: actions/checkout@v4
3636

3737
- name: setup dotnet
38-
uses: actions/setup-dotnet@v3
38+
uses: actions/setup-dotnet@v4
3939
with:
40-
dotnet-version: '7.0.x'
40+
dotnet-version: '8.0.x'
4141
- name: setup node
42-
uses: actions/setup-node@v3
42+
uses: actions/setup-node@v4
4343
with:
4444
node-version: '18.x'
4545
- name: install node deps
@@ -72,15 +72,15 @@ jobs:
7272
uses: actions/checkout@v4
7373

7474
- name: setup dotnet
75-
uses: actions/setup-dotnet@v3
75+
uses: actions/setup-dotnet@v4
7676
with:
77-
dotnet-version: '7.0.x'
77+
dotnet-version: '8.0.x'
7878
- name: setup node
79-
uses: actions/setup-node@v3
79+
uses: actions/setup-node@v4
8080
with:
8181
node-version: '18.x'
8282
- name: setup java
83-
uses: actions/setup-java@v3
83+
uses: actions/setup-java@v4
8484
with:
8585
distribution: 'microsoft'
8686
java-version: '17'
@@ -190,15 +190,15 @@ jobs:
190190
uses: actions/checkout@v4
191191

192192
- name: setup dotnet
193-
uses: actions/setup-dotnet@v3
193+
uses: actions/setup-dotnet@v4
194194
with:
195-
dotnet-version: '7.0.x'
195+
dotnet-version: '8.0.x'
196196
- name: setup node
197-
uses: actions/setup-node@v3
197+
uses: actions/setup-node@v4
198198
with:
199199
node-version: '18.x'
200200
- name: setup java
201-
uses: actions/setup-java@v3
201+
uses: actions/setup-java@v4
202202
with:
203203
distribution: 'microsoft'
204204
java-version: '17'

.gitlab-ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ stages:
1313
- publish
1414

1515
precommit:
16-
image: mcr.microsoft.com/dotnet/sdk:7.0-alpine
16+
image: mcr.microsoft.com/dotnet/sdk:8.0-alpine
1717
stage: test
1818
except:
1919
- public
@@ -40,7 +40,7 @@ precommit:
4040
- pre-commit run stylelint --all-files
4141

4242
build_web:
43-
image: mcr.microsoft.com/dotnet/sdk:7.0-alpine
43+
image: mcr.microsoft.com/dotnet/sdk:8.0-alpine
4444
stage: build
4545
except:
4646
- public
@@ -73,7 +73,7 @@ deploy_test:
7373

7474
public:
7575
stage: publish
76-
image: python:3.11
76+
image: python:3.12
7777
needs:
7878
- job: build_web
7979
artifacts: false
@@ -116,7 +116,7 @@ github:
116116
only:
117117
- public # public branch
118118
stage: publish
119-
image: python:3.11
119+
image: python:3.12
120120
before_script:
121121
- 'command -v ssh-agent >/dev/null || ( apt-get update -y && apt-get install openssh-client -y )'
122122
- eval $(ssh-agent -s)

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
# to access webapp
1111
# http://localhost:1234
1212

13-
FROM mcr.microsoft.com/dotnet/sdk:7.0-alpine AS build
13+
FROM mcr.microsoft.com/dotnet/sdk:8.0-alpine AS build
1414
ENV DOTNET_CLI_TELEMETRY_OPTOUT=1
1515

1616
WORKDIR /app
@@ -43,7 +43,7 @@ RUN export PATH="$PATH:/root/.dotnet/tools" && dotnet ef database update --proj
4343

4444
RUN dotnet publish -c Release -o out web.csproj
4545

46-
FROM mcr.microsoft.com/dotnet/sdk:7.0-alpine
46+
FROM mcr.microsoft.com/dotnet/sdk:8.0-alpine
4747
ENV DOTNET_CLI_TELEMETRY_OPTOUT=1
4848
WORKDIR /app
4949
COPY --from=build ["/app/web/out", "./"]

package.json

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@
1515
"@rollup/plugin-node-resolve": "^15.1.0",
1616
"@rollup/plugin-terser": "^0.4.3",
1717
"@semantic-release/changelog": "^6.0.3",
18-
"@semantic-release/commit-analyzer": "10.0.4",
18+
"@semantic-release/commit-analyzer": "11.1.0",
1919
"@semantic-release/exec": "6.0.3",
2020
"@semantic-release/git": "10.0.1",
2121
"@semantic-release/github": "^9.0.0",
22-
"@semantic-release/npm": "^10.0.4",
23-
"@semantic-release/release-notes-generator": "11.0.7",
22+
"@semantic-release/npm": "^11.0.0",
23+
"@semantic-release/release-notes-generator": "12.1.0",
2424
"@toycode/markdown-it-class": "1.2.4",
2525
"bulma": "0.9.4",
2626
"bulma-checkradio": "2.1.3",
@@ -29,7 +29,7 @@
2929
"chart.js": "2.9.4",
3030
"commitizen": "^4.3.0",
3131
"cz-conventional-changelog": "3.3.0",
32-
"date-fns": "2.30.0",
32+
"date-fns": "^3.0.0",
3333
"dompurify": "3.0.0",
3434
"es6-symbol": "3.1.3",
3535
"eslint": "^8.43.0",
@@ -47,20 +47,20 @@
4747
"gulp-sass": "5.1.0",
4848
"gulp-uglify": "3.0.2",
4949
"jsnlog": "2.30.0",
50-
"lint-staged": "^14.0.0",
51-
"markdown-it": "13.0.1",
50+
"lint-staged": "^15.0.0",
51+
"markdown-it": "14.0.0",
5252
"npm-run-all": "^4.1.5",
5353
"open": "8.4.2",
5454
"postcss": "^8.4.24",
5555
"prettier": "^3.0.0",
5656
"proxy-polyfill": "0.3.2",
5757
"regenerator-runtime": "^0.14.0",
58-
"rollup": "^3.25.3",
59-
"semantic-release": "^21.0.5",
60-
"stylelint": "^15.8.0",
58+
"rollup": "^4.0.0",
59+
"semantic-release": "^22.0.0",
60+
"stylelint": "^16.0.2",
6161
"stylelint-config-prettier-scss": "1.0.0",
62-
"stylelint-config-standard-scss": "^11.0.0",
63-
"stylelint-scss": "^5.0.0",
62+
"stylelint-config-standard-scss": "^12.0.0",
63+
"stylelint-scss": "^6.0.0",
6464
"xo": "^0.56.0"
6565
},
6666
"homepage": "https://demo.atlas.bi",
@@ -86,9 +86,9 @@
8686
"db:update": "dotnet ef database update --project web/web.csproj -v",
8787
"dotnet:publish": "npm run build && dotnet publish web/web.csproj -r win-x86 --self-contained false -c Release -o out",
8888
"test:report_html": "reportgenerator -reports:coverage.cobertura.xml -targetdir:coverage/ -reporttypes:html",
89-
"test:integrationTests": "coverlet web.Tests/bin/Debug/net7.0/web.Tests.dll --target \"dotnet\" --targetargs \"test --filter IntegrationTests --no-build -e Demo=True\" --format cobertura --exclude-by-file \"**/Migrations/*\"",
90-
"test:browserTests": "coverlet web.Tests/bin/Debug/net7.0/web.Tests.dll --target \"dotnet\" --targetargs \"test --filter=BrowserTests --no-build -e Demo=True\" --format cobertura --exclude-by-file \"**/Migrations/*\"",
91-
"test:functionTests": "coverlet web.Tests/bin/Debug/net7.0/web.Tests.dll --target \"dotnet\" --targetargs \"test --filter=FunctionTests --no-build -e Demo=True\" --format cobertura --exclude-by-file \"**/Migrations/*\"",
89+
"test:integrationTests": "coverlet web.Tests/bin/Debug/net8.0/web.Tests.dll --target \"dotnet\" --targetargs \"test --filter IntegrationTests --no-build -e Demo=True\" --format cobertura --exclude-by-file \"**/Migrations/*\"",
90+
"test:browserTests": "coverlet web.Tests/bin/Debug/net8.0/web.Tests.dll --target \"dotnet\" --targetargs \"test --filter=BrowserTests --no-build -e Demo=True\" --format cobertura --exclude-by-file \"**/Migrations/*\"",
91+
"test:functionTests": "coverlet web.Tests/bin/Debug/net8.0/web.Tests.dll --target \"dotnet\" --targetargs \"test --filter=FunctionTests --no-build -e Demo=True\" --format cobertura --exclude-by-file \"**/Migrations/*\"",
9292
"lint:js": "xo web/wwwroot/js",
9393
"lint:scss": "stylelint \"web/wwwroot/css/**/*.scss\"",
9494
"lint": "npm run lint:js & npm run lint:scss",
@@ -159,10 +159,12 @@
159159
"no-multi-assign": "warn",
160160
"unicorn/prefer-keyboard-event-key": "off",
161161
"no-new": "warn",
162-
"unicorn/no-typeof-undefined": "off"
162+
"unicorn/no-typeof-undefined": "off",
163+
"unicorn/prefer-string-replace-all": "warn",
164+
"unicorn/prefer-at": "warn"
163165
}
164166
},
165-
"version": "3.14.0",
167+
"version": "3.15.0-alpha.1",
166168
"dependencies": {
167169
"sass": "^1.63.6"
168170
}

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Atlas business intelligence library plugs in to your existing reporting platform
4040

4141
## 🏃 Getting Started
4242

43-
> Atlas BI Library is built with [.Net 7.0](https://dotnet.microsoft.com/download/dotnet/7.0) and [Node](https://nodejs.org/en/download/). \
43+
> Atlas BI Library is built with [.Net 8.0](https://dotnet.microsoft.com/download/dotnet/8.0) and [Node](https://nodejs.org/en/download/). \
4444
> Aside from those installs you will need to install ef core tools `dotnet tool install -g dotnet-ef`. \
4545
> These guide can be run with [Visual Studio Code](https://code.visualstudio.com/download) and the built in terminal.
4646

renovate.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
":npm",
1010
"npm:unpublishSafe"
1111
],
12-
"ignoreDeps": ["chart.js", "open", "dompurify"],
12+
"ignoreDeps": ["chart.js", "open", "dompurify", "gulp-autoprefixer"],
1313
"baseBranches": ["dev"],
1414
"bumpVersion": "patch",
1515
"commitMessagePrefix": "chore(deps)",

solr.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
# to access webapp
1111
# http://localhost:8983
1212

13-
FROM python:3.11-alpine as search
13+
FROM python:3.12-alpine as search
1414
WORKDIR /app
1515
ARG USER
1616
ARG PASSWORD

web.Tests/BrowserTests/Utilities/BrowserFactory.cs

Lines changed: 55 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@
1313

1414
namespace web.Tests.BrowserTests
1515
{
16-
public class BrowserFactory<TEntryPoint> : IDisposable
17-
where TEntryPoint : Program
16+
public class BrowserFactory<TEntryPoint> : IDisposable where TEntryPoint : Program
1817
{
1918
private readonly IHost _host;
2019

@@ -23,73 +22,77 @@ public class BrowserFactory<TEntryPoint> : IDisposable
2322
public BrowserFactory()
2423
{
2524
IHostBuilder builder = Host.CreateDefaultBuilder()
26-
.ConfigureWebHostDefaults(webBuilder =>
27-
{
28-
webBuilder.UseStartup<TEntryPoint>();
29-
30-
// needs to be relative to actual project root
31-
// so static resources are picked up.
32-
// basically we are changing from /web.Tests to /web.
33-
webBuilder.UseSolutionRelativeContentRoot("web");
34-
webBuilder.UseUrls("http://127.0.0.1:0");
35-
})
36-
.ConfigureServices(services =>
37-
{
38-
var descriptor = services.SingleOrDefault(
39-
d => d.ServiceType == typeof(DbContextOptions<Atlas_WebContext>)
40-
);
41-
42-
if (descriptor != null)
25+
.ConfigureWebHostDefaults(
26+
webBuilder =>
4327
{
44-
services.Remove(descriptor);
45-
}
28+
webBuilder.UseStartup<TEntryPoint>();
4629

47-
services.AddDbContext<Atlas_WebContext>(options =>
30+
// needs to be relative to actual project root
31+
// so static resources are picked up.
32+
// basically we are changing from /web.Tests to /web.
33+
webBuilder.UseSolutionRelativeContentRoot("web");
34+
webBuilder.UseUrls("http://127.0.0.1:0");
35+
}
36+
)
37+
.ConfigureServices(
38+
services =>
4839
{
49-
options.UseInMemoryDatabase("LiveServerTests");
50-
});
40+
var descriptor = services.SingleOrDefault(
41+
d => d.ServiceType == typeof(DbContextOptions<Atlas_WebContext>)
42+
);
5143

52-
var sp = services.BuildServiceProvider();
44+
if (descriptor != null)
45+
{
46+
services.Remove(descriptor);
47+
}
5348

54-
using (var scope = sp.CreateScope())
55-
{
56-
var scopedServices = scope.ServiceProvider;
57-
var db = scopedServices.GetRequiredService<Atlas_WebContext>();
58-
var logger = scopedServices.GetRequiredService<
59-
ILogger<BrowserFactory<TEntryPoint>>
60-
>();
49+
services.AddDbContext<Atlas_WebContext>(
50+
options =>
51+
{
52+
options.UseInMemoryDatabase("LiveServerTests");
53+
}
54+
);
6155

62-
db.Database.EnsureDeleted();
63-
db.Database.EnsureCreated();
56+
var sp = services.BuildServiceProvider();
6457

65-
try
66-
{
67-
// test data is loaded here.
68-
Utilities.InitializeDbForTests(db);
69-
logger.LogWarning("Test database initialized");
70-
}
71-
catch (Exception ex)
58+
using (var scope = sp.CreateScope())
7259
{
73-
logger.LogError(
74-
ex,
75-
"An error occurred seeding the "
76-
+ "database with test messages. Error: {Message}",
77-
ex.Message
78-
);
60+
var scopedServices = scope.ServiceProvider;
61+
var db = scopedServices.GetRequiredService<Atlas_WebContext>();
62+
var logger = scopedServices.GetRequiredService<
63+
ILogger<BrowserFactory<TEntryPoint>>
64+
>();
65+
66+
db.Database.EnsureDeleted();
67+
db.Database.EnsureCreated();
68+
69+
try
70+
{
71+
// test data is loaded here.
72+
Utilities.InitializeDbForTests(db);
73+
logger.LogWarning("Test database initialized");
74+
}
75+
catch (Exception ex)
76+
{
77+
logger.LogError(
78+
ex,
79+
"An error occurred seeding the "
80+
+ "database with test messages. Error: {Message}",
81+
ex.Message
82+
);
83+
}
7984
}
8085
}
81-
});
86+
);
8287

8388
// Start the host in the background.
8489
// Shut it down in the Dispose method below.
8590
_host = builder.Build();
8691
_host.Start();
8792

8893
// Store base address so that tests can pass it to the browser.
89-
var address = _host
90-
?.Services?.GetRequiredService<IServer>()
91-
?.Features.Get<IServerAddressesFeature>()
92-
?.Addresses.First();
94+
var address =
95+
_host?.Services?.GetRequiredService<IServer>()?.Features.Get<IServerAddressesFeature>()?.Addresses.First();
9396

9497
if (address != null)
9598
{

0 commit comments

Comments
 (0)