Skip to content

Commit c840c4d

Browse files
jkoenig134stamenionetnotheismergify[bot]
authored
Admin UI: Initialize flutter setup (#547)
* chore: update settings.json with dart * chore: add readme * fix: git-un-ignore adminui packages * chore: add initial flutter setup * feat: add adminui boilerplate * feat: add types * feat: add sdk * feat: use client in the app * chore: move AdminUI to AdminUI folder * fix: allow internet access for the mac app * chore: add setup for configs * feat: async creation of client * chore: update mac icons * chore: change name from admin_ui to AdminUI * feat: add window_size plugin * fix: use empty baseurl for web * feat: add shared preferences * feat: add routing * feat: add packages * chore: move AdminUI to AdminUi * chore: add packages * chore: move stuff * chore: ignore again * chore: simplify logout * chore: make more readable * fix: check for api key validity * chore: do not copy code from go_router package * fix: use enmeshed logo as svg * chore: update default window size on macos * chore: yeet unused launch config * chore: update extensions * fix: obscure text in pw field * chore: add tier get and delete endpoints * feat: add quota types and endpoints * feat: add quota endpoint * chore format * wip * chore: wip * chore: update identity * chore: update, change method name and type * chore: remove unnecessary imports * feat: add relationships type and endpoint * ci: move runAdminUiChecks to aui folder and rename it to runChecks * ci: add and execute runFlutterChecks script * ci: rename flutter checks jobs * ci: use correct script folder and name * chore: simplify relationship type * chore: finalize identities odata * chore: add separate get and make result for odata * chore: comment now follows flutter style to-do * chore: simplify relationship endpoint * chore: show the results of getting the data * ci: trigger pipelines * chore: add some basic pagination * chore: add filtering for odata * chore: add filtering example * chore: export identity overview filter * fix: syntax * chore: bump melos * chore: use builtin melos analyze command * refactor: identities * chore: add types to dependencies * refactor: move enum * chore: rename parameters * feat: add identity overview * chore: display only identity overview * chore: add trailing comma and add named parameter * refactor: use port 8082 for local testing * chore: remove UI code * fix: make pagination usable * chore: remove comment * fix: early return * refactor: make pretty * chore: remove unused file --------- Co-authored-by: Vladimir Vuckovic <[email protected]> Co-authored-by: Timo Notheisen <[email protected]> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
1 parent 3b712b5 commit c840c4d

File tree

125 files changed

+5576
-15
lines changed

Some content is hidden

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

125 files changed

+5576
-15
lines changed

.ci/runAdminUiChecks.sh renamed to .ci/aui/runChecks.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#!/bin/bash
12
set -e
23
set -x
34

.ci/aui/runFlutterChecks.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
set -e
3+
set -x
4+
5+
cd AdminUi
6+
dart pub global activate melos
7+
melos bootstrap
8+
melos analyze
9+
melos format

.github/workflows/test.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,18 @@ jobs:
1515
- name: Checkout
1616
uses: actions/checkout@v4
1717
- name: Run Checks
18-
run: ./.ci/runAdminUiChecks.sh
18+
run: ./.ci/aui/runChecks.sh
19+
20+
run-adminUi-flutter-checks:
21+
runs-on: ubuntu-latest
22+
name: Run Admin UI Flutter Checks
23+
steps:
24+
- name: Checkout
25+
uses: actions/checkout@v4
26+
- name: Setup Flutter
27+
uses: subosito/[email protected]
28+
- name: Run checks
29+
run: ./.ci/aui/runFlutterChecks.sh
1930

2031
check-formatting:
2132
runs-on: ubuntu-latest

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,3 +366,6 @@ dist
366366
# feature.cs files are generated by the build process and should not be committed to source control
367367
**/*.feature.cs
368368
**/SpecFlow/
369+
370+
# flutter
371+
!AdminUi/packages/*

.vscode/extensions.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"recommendations": ["ms-azuretools.vscode-docker", "ms-dotnettools.csdevkit"]
2+
"recommendations": ["ms-azuretools.vscode-docker", "Dart-Code.flutter", "Dart-Code.dart-code"]
33
}

.vscode/launch.json

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,11 @@
22
"version": "0.2.0",
33
"configurations": [
44
{
5-
"name": "Attach to Consumer API (Docker)",
6-
"type": "docker",
7-
"request": "attach",
8-
"platform": "netCore",
9-
"sourceFileMap": {
10-
"/app": "${workspaceFolder}"
11-
},
12-
"containerName": "consumerApi",
13-
"processName": "ConsumerApi"
5+
"name": "Launch current dart file",
6+
"request": "launch",
7+
"type": "dart",
8+
"toolArgs": ["--dart-define-from-file=${workspaceFolder}/AdminUi/config.local.json"],
9+
"templateFor": ""
1410
}
1511
]
1612
}

.vscode/settings.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,10 @@
2929
"editor.codeActionsOnSave": {
3030
"source.organizeImports": "explicit"
3131
},
32-
"files.eol": "\n"
32+
"files.eol": "\n",
33+
"dart.lineLength": 150,
34+
"[dart]": {
35+
"editor.defaultFormatter": "Dart-Code.dart-code",
36+
"editor.rulers": [150]
37+
}
3338
}

AdminUi/.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
pubspec_overrides.yaml
2+
.dart_tool
3+
build
4+
.flutter-plugins
5+
.flutter-plugins-dependencies
6+
.DS_Store
7+
8+
# config.json for connecting to the admin api
9+
config.json

AdminUi/README.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Admin UI
2+
3+
## Development Guide
4+
5+
### Prerequisites
6+
7+
- [Flutter](https://flutter.dev/docs/get-started/install) (we are using the `stable` channel)
8+
- [melos](https://melos.invertase.dev/getting-started)
9+
10+
TLDR: `dart pub global activate melos`
11+
12+
Make sure to [add the system cache bin directory to your path](https://dart.dev/tools/pub/cmd/pub-global#running-a-script-from-your-path) (`$HOME/.pub-cache/bin` for mac and linux and `%LOCALAPPDATA%\Pub\Cache\bin` for most Windows versions).
13+
14+
### Getting Started
15+
16+
Run `melos bootstrap` to [install and link dependencies](https://melos.invertase.dev/commands/bootstrap) in all packages and apps.
17+
18+
### Melos scripts
19+
20+
For an overview of all available melos scripts, run `melos run` or `melos run --help`.
21+
22+
### Configuration
23+
24+
Create a file `AdminUI/config.json` with the following content:
25+
26+
```json
27+
{
28+
"BASE_URL": "...",
29+
"API_KEY": "..."
30+
}
31+
```
32+
33+
This configuration is automatically used when using the VSCode tooling (run / debug buttons).
34+
35+
For building and running the app from the command line, you can use the `--dart-define-from-file=<path-to-file>` flag.

AdminUi/analysis_options.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
include: package:very_good_analysis/analysis_options.yaml
2+
3+
linter:
4+
rules:
5+
lines_longer_than_80_chars: false
6+
sort_constructors_first: false
7+
public_member_api_docs: false
8+
always_use_package_imports: false
9+
avoid_setters_without_getters: false

0 commit comments

Comments
 (0)