Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
297 commits
Select commit Hold shift + click to select a range
927c3ef
change to medium size test db
joschne Jun 6, 2024
78eea34
add performance test
joschne Jun 6, 2024
d9cf229
enable performance tests in CI workflow
joschne Jun 6, 2024
d189d6c
chore(): update prerelease version
joschne Jun 6, 2024
eebaec9
rename job to test
joschne Jun 6, 2024
0d65a31
fix job dependency
joschne Jun 6, 2024
c4c63a5
chore(): update prerelease version
joschne Jun 6, 2024
a63d644
Add project_statements module
dferhod Jun 6, 2024
558e3b7
Add project_statements module down SQL
dferhod Jun 6, 2024
2def09e
test performance of updating info_proj_rels
joschne Jun 6, 2024
dc2d8aa
chore(): update prerelease version
joschne Jun 6, 2024
0225d5e
functions to create entity label
joschne Jun 7, 2024
a818b1d
add function to update entity_label
joschne Jun 7, 2024
3c189ea
add triggers for updates
joschne Jun 7, 2024
92a168a
add down sql
joschne Jun 7, 2024
7029cf9
fix unit tests by disabling triggers
joschne Jun 11, 2024
59d157f
chore(): update prerelease version
joschne Jun 11, 2024
ad348e3
improve readability
joschne Jun 11, 2024
846b42e
chore(): update prerelease version
joschne Jun 11, 2024
bf990f2
Add project_statements integration tests
dferhod Jun 11, 2024
30a5c08
Debugging
dferhod Jun 11, 2024
8abf779
functions and triggers in DDL and integration tests fixed
dferhod Jun 11, 2024
f5cfc78
chore(): update prerelease version
dferhod Jun 11, 2024
fbccddd
initial setup
joschne Jun 12, 2024
ea9bedd
I have to comit those files, even if there's no visible changes and I…
dferhod Jun 12, 2024
41f0dab
add functions to get (inverse) property labels
joschne Jun 12, 2024
dbabd2c
Merge remote-tracking branch 'origin/pgwar-project-statements' into p…
dferhod Jun 12, 2024
0cb9f7a
add functions for field labels and for project lang code
joschne Jun 12, 2024
d6166ab
add function to get fulltext of project entity
joschne Jun 12, 2024
364d8e7
Added tests according to PR review.
dferhod Jun 12, 2024
c0b22e3
fix tested table
joschne Jun 12, 2024
3cbf3b4
Merge pull request #360 from geovistory/pgwar-project-statements
joschne Jun 12, 2024
fc55aca
Merge pull request #361 from geovistory/pgwar-statements
joschne Jun 12, 2024
5cfc9f1
Merge branch 'pg-warehouse' into pgwar-project-entity-labels
joschne Jun 12, 2024
7125513
chore(): update prerelease version
joschne Jun 12, 2024
47f50c0
update to pgwar.project_statements
joschne Jun 12, 2024
35977b4
chore(): update prerelease version
joschne Jun 12, 2024
2eded20
Merge branch 'pg-warehouse' into pgwar-change-test-db
joschne Jun 12, 2024
1db055a
chore(): update prerelease version
joschne Jun 12, 2024
1ba91a6
Merge branch 'pgwar-change-test-db' into pgwar-fulltext-cron
joschne Jun 12, 2024
9c50d9b
Merge branch 'pgwar-project-entity-labels' into pgwar-fulltext-cron
joschne Jun 12, 2024
b13fc8e
adapt to pgwar.project_statements
joschne Jun 12, 2024
a0c51d5
add pgwar.project_statements_deleted plus trigger
joschne Jun 12, 2024
c375700
add functions to get entities for full text updates in project statem…
joschne Jun 12, 2024
532b3a4
add functions to get entities for full text updates in dfh props
joschne Jun 12, 2024
a86b9e7
Add function to update full texts
joschne Jun 12, 2024
a2c9249
rename functions and add get_outdated_full_texts
joschne Jun 13, 2024
159f059
add trigger to set full_text in entity_preview table
joschne Jun 13, 2024
ccd77a8
allow fk_project=0 in get-outdate-* and get-target-labels-of-* functions
joschne Jun 13, 2024
748cf65
extract logic of pgwar.after_modify_info_proj_rel into pgwar.update_f…
joschne Jun 13, 2024
c3b535b
extract logic of pgwar.after_upsert_statement into pgwar.update_from_…
joschne Jun 13, 2024
ee8b731
extract logic of pgwar.after_upsert_resource into pgwar.update_from_r…
joschne Jun 13, 2024
1e185cd
Merge pull request #356 from geovistory/pgwar-change-test-db
dferhod Jun 13, 2024
7742fef
Merge branch 'pg-warehouse' into pgwar-project-entity-labels
dferhod Jun 13, 2024
ee9af3b
chore(): update prerelease version
dferhod Jun 13, 2024
fd0a980
Merge pull request #359 from geovistory/pgwar-project-entity-labels
dferhod Jun 13, 2024
863cd2e
add postgres image m-3 with multi-arch support
joschne Jun 14, 2024
2050bd9
add fk_class not null
joschne Jun 14, 2024
1657f15
add m-4
joschne Jun 14, 2024
7635360
Unit test working
dferhod Jun 18, 2024
7a4b880
fixed indent
dferhod Jun 19, 2024
fa931e7
add indexes
joschne Jun 19, 2024
41ebf4e
add more indexes
joschne Jun 19, 2024
db8a96f
add index
joschne Jun 19, 2024
f36d808
still a fail test on DELETE operation
dferhod Jun 19, 2024
f4a2bba
all tests pass
dferhod Jun 19, 2024
ce2259e
add a WHEN condition to avoid unwanted trigger execution
dferhod Jun 19, 2024
8ec698d
add review changes
joschne Jun 20, 2024
59dbabf
chore(): update prerelease version
joschne Jun 20, 2024
6d03bfc
remove unused function
joschne Jun 20, 2024
63f3c77
add ROLLBACK
joschne Jun 20, 2024
0539506
chore(): update prerelease version
joschne Jun 20, 2024
4480e24
updated down SQL file
dferhod Jun 20, 2024
635ab49
chore(): update prerelease version
dferhod Jun 20, 2024
b37792c
Merge pull request #363 from geovistory/pgwar-community-entity-labels…
dferhod Jun 20, 2024
8b69e5c
chore(): update prerelease version
dferhod Jun 20, 2024
2f218b4
updated down SQL files
dferhod Jun 20, 2024
5166cf4
chore(): update prerelease version
dferhod Jun 20, 2024
42bc35c
Merge pull request #362 from geovistory/pgwar-community-entity-labels
dferhod Jun 20, 2024
fda2199
add logic to update community statements with cron job
joschne Jun 20, 2024
1bcc562
update docker images
joschne Jun 20, 2024
b15c966
test without performance
joschne Jun 20, 2024
82b67fb
add docker images for amd
joschne Jun 20, 2024
06a96ce
chore(): update prerelease version
joschne Jun 20, 2024
bbd366a
Merge pull request #364 from geovistory/pgwar-community-statements
joschne Jun 21, 2024
2f75284
add down migrations
joschne Jun 21, 2024
0700102
Merge branch 'pg-warehouse' into pgwar-fulltext-cron
joschne Jun 21, 2024
d49f604
fix down migrations
joschne Jun 21, 2024
b85f020
chore(): update prerelease version
joschne Jun 21, 2024
de08f7f
Merge branch 'main' of https://github.com/geovistory/toolbox into pg-…
joschne Jun 25, 2024
b179baf
setup docker compose for dev db
joschne Jun 25, 2024
ebc2aa9
Improve readme
joschne Jun 25, 2024
a548983
setup /server to connect to dev db
joschne Jun 25, 2024
997854f
Modify sh -> bash
Jun 25, 2024
25ee954
war drop schema
Jun 25, 2024
916d1c5
change launch.json
joschne Jun 26, 2024
cd97355
add migration for views in pgwar
joschne Jun 26, 2024
b714ee0
replace war with pgwar in raw sql
joschne Jun 26, 2024
061d179
adapt notification manager
joschne Jun 26, 2024
0950989
Adapt ORM in /server
joschne Jun 26, 2024
4b27a56
change project_id to fk_project in raw queries
joschne Jun 26, 2024
0a823fb
add parent and ancestor class cols
joschne Jun 26, 2024
f991fab
omit column "key"
joschne Jun 26, 2024
030e78a
changed = TRUE in IS TRUE
dferhod Jun 26, 2024
1c4a570
Merge branch 'pg-warehouse' into pgwar-fulltext-cron
dferhod Jun 26, 2024
3780b31
Merge pull request #365 from geovistory/pgwar-fulltext-cron
dferhod Jun 26, 2024
68b2c5b
Merge remote-tracking branch 'origin/pg-warehouse' into pgwar-loopback
Jun 26, 2024
a3c7480
update client sdk
joschne Jun 26, 2024
78b4c24
change project_id to fk_project and remove fk_property_of_property in…
Jun 27, 2024
1243a93
add migration for entity_preview triggers
Jun 27, 2024
b8179f9
drop trigger to create partitions on war.entity_preview and adjust tests
joschne Jun 27, 2024
f4626f8
chore(): update prerelease version
joschne Jun 27, 2024
28494a3
add trigger to set ts_vector of entity_preview
joschne Jun 27, 2024
f773f2f
chore(): update prerelease version
joschne Jun 27, 2024
0df134f
upper case on syntax words
dferhod Jun 27, 2024
6db8226
chore(): update prerelease version
dferhod Jun 27, 2024
c2c8e7e
Merge pull request #366 from geovistory/pgwar-loopback
dferhod Jun 27, 2024
f765f04
Merge branch 'pg-warehouse' into pgwar-ts-vector
dferhod Jun 27, 2024
75de02b
Merge pull request #367 from geovistory/pgwar-ts-vector
dferhod Jun 27, 2024
718911b
intermediate commit without tests
dferhod Jun 27, 2024
eb14eff
fixed an issue with the "war" schema that should not be used
dferhod Jun 27, 2024
fc8346d
add function to update entity class metadata
joschne Jun 27, 2024
57ff2ca
chore(): update prerelease version
joschne Jun 27, 2024
043a95e
add moule fk_type
joschne Jun 28, 2024
c40cb4e
chore(): update prerelease version
joschne Jun 28, 2024
6df17c1
integration tests pass
dferhod Jun 28, 2024
8b77153
added down migration SQL script
dferhod Jun 28, 2024
d666121
fixed issue in down migration SQL script
dferhod Jun 28, 2024
d9ad48f
add function to update pgwar type label
joschne Jun 28, 2024
106143e
chore(): update prerelease version
dferhod Jun 28, 2024
9c9cd56
chore(): update prerelease version
joschne Jun 28, 2024
3d6ff5a
removed unnecessary SQL
dferhod Jun 28, 2024
c7af8f5
Merge remote-tracking branch 'origin/pgwar-field-change' into pgwar-f…
dferhod Jun 28, 2024
a83a89c
updated unit test from review
dferhod Jun 28, 2024
b8afb42
updated with suggested changes from review
dferhod Jun 28, 2024
84fb8e1
intermediate commit without tests
dferhod Jun 27, 2024
bfc4287
integration tests pass
dferhod Jun 28, 2024
b326500
added down migration SQL script
dferhod Jun 28, 2024
ffb9646
fixed issue in down migration SQL script
dferhod Jun 28, 2024
04f3fb6
removed unnecessary SQL
dferhod Jun 28, 2024
25f2a75
chore(): update prerelease version
dferhod Jun 28, 2024
51ea02d
updated unit test from review
dferhod Jun 28, 2024
a1458ec
updated with suggested changes from review
dferhod Jun 28, 2024
e5bf6d9
Merge branch 'pg-warehouse' into pgwar-field-change
joschne Jun 28, 2024
82862a5
rebased branche onto pg-warehouse to remove old war function calls as…
dferhod Jun 28, 2024
cc64663
Merge remote-tracking branch 'origin/pgwar-field-change' into pgwar-f…
dferhod Jun 28, 2024
afa77d7
removed one forgotten query.
dferhod Jun 28, 2024
13be7fe
chore(): update prerelease version
dferhod Jun 28, 2024
a0cb0e4
chore(): update prerelease version
dferhod Jun 28, 2024
6b4b379
Merge pull request #370 from geovistory/pgwar-field-change
joschne Jun 28, 2024
44ae247
changes according to review
joschne Jun 28, 2024
93b1dd4
Merge branch 'pg-warehouse' into pgwar-entity-class
joschne Jun 28, 2024
7f6771f
chore(): update prerelease version
joschne Jun 28, 2024
e565440
Merge pull request #368 from geovistory/pgwar-entity-class
joschne Jun 28, 2024
041688b
change function get_project_entity_label
joschne Jul 3, 2024
dd3fd85
remove partitioning of table pgwar.entity_preview
joschne Jul 3, 2024
053018f
trigger for each statement after insert and update on pgwar.entity_pr…
joschne Jul 4, 2024
e7ac87f
trigger for each statement after inf.statement modifcation
joschne Jul 4, 2024
1e0a46d
switch community label generation to FOR EACH STATEMENT
joschne Jul 4, 2024
966ee9e
performance improvement
joschne Jul 4, 2024
a367461
updated with suggested changes from review
dferhod Jul 5, 2024
4c82ee0
Merge branch 'pg-warehouse' into pgwar-fk-type
dferhod Jul 5, 2024
30bb247
updated with suggested changes from review
dferhod Jul 5, 2024
f2d03d1
Merge remote-tracking branch 'origin/pgwar-fk-type' into pgwar-fk-type
dferhod Jul 5, 2024
f51097f
chore(): update prerelease version
dferhod Jul 5, 2024
85f3d58
Merge pull request #369 from geovistory/pgwar-fk-type
dferhod Jul 5, 2024
8aeae2a
updated with suggested changes from review
dferhod Jul 5, 2024
a122567
Merge branch 'pg-warehouse' into pgwar-type-label
dferhod Jul 5, 2024
da427ff
chore(): update prerelease version
dferhod Jul 5, 2024
9625636
Merge pull request #371 from geovistory/pgwar-type-label
dferhod Jul 5, 2024
e7008ea
make tests running
joschne Jul 5, 2024
c993768
fix MATERIALIZED VIEW pgwar.project_label_config
joschne Jul 7, 2024
273e4d5
revert the function pgwar.get_project_entity_label
joschne Jul 9, 2024
9e994a6
hot fix for full texts
joschne Jul 9, 2024
7e0c38b
add pgwar init scripts
joschne Jul 9, 2024
ae0f664
change dev db to m-6
joschne Jul 9, 2024
90f1f98
intermediate commit
joschne Jul 11, 2024
a59e926
add recursive function
joschne Jul 11, 2024
a5b2697
make recursive query fast
joschne Jul 12, 2024
b3e40bc
add all scopes
joschne Jul 12, 2024
7648548
chore(): update prerelease version
joschne Jul 12, 2024
d720b1d
add performance test
joschne Jul 16, 2024
9424daf
Merge branch 'main' into pg-field-loading
joschne Jul 16, 2024
c078e98
adjust performance test
joschne Jul 16, 2024
5cd1c1b
Adapt client to new field page response
joschne Jul 16, 2024
012dfc5
add test for empty field
joschne Jul 16, 2024
e0790c7
modify server part
joschne Jul 16, 2024
607b5b0
fix
joschne Jul 16, 2024
b09b086
remove startup functions
joschne Jul 17, 2024
f34d4ee
prevent infinite loops on circular dependency
joschne Jul 17, 2024
91e9669
Merge branch 'pg-warehouse' into pgwar-optimize-entity-labels-2
joschne Jul 17, 2024
dc19ef9
update the down migrations
joschne Jul 17, 2024
e8f0a31
loop over projects to init pgwar project entities
joschne Jul 18, 2024
c002c0d
simplify the setup
joschne Jul 18, 2024
c0ca7dc
update .env
gaetanmuck Jul 18, 2024
e33ba57
optimize function
joschne Jul 18, 2024
685cacb
add scripts to loop in parallel
joschne Jul 18, 2024
312d6aa
init-script works up to community statements
joschne Jul 19, 2024
62c4e8d
improve performance
joschne Jul 19, 2024
43b91b7
updated with proper handling of number of concurrent tasks with a con…
dferhod Jul 19, 2024
696ca46
need to add test for time span
dferhod Jul 26, 2024
8b4f180
need to add test for time span
dferhod Jul 26, 2024
0a7f690
chore(): update prerelease version
dferhod Jul 26, 2024
fad6f60
need to add test for time span
dferhod Jul 29, 2024
800ad3c
Merge remote-tracking branch 'origin/pgwar-optimize-entity-labels-2' …
dferhod Jul 30, 2024
fb95f85
work on integration test for time span still in progress
dferhod Jul 30, 2024
a1e5be9
Update time span test
Jul 30, 2024
b831c7f
work on integration test for time span still in progress
dferhod Jul 31, 2024
c32e156
Merge remote-tracking branch 'origin/pgwar-optimize-entity-labels-2' …
dferhod Jul 31, 2024
0090628
work on integration test for time span still in progress
dferhod Jul 31, 2024
56c46f3
work on integration test for time span done, all pass
dferhod Jul 31, 2024
7ffc81f
chore(): update prerelease version
dferhod Jul 31, 2024
612c895
removed version declaration (deprecated)
Jul 31, 2024
b08bb2a
chore(): update prerelease version
Jul 31, 2024
ff658df
removed comments
Jul 31, 2024
387c1fe
Merge remote-tracking branch 'origin/pgwar-optimize-entity-labels-2' …
Jul 31, 2024
f4c48ce
chore(): update prerelease version
Jul 31, 2024
538e549
Merge pull request #374 from geovistory/pgwar-optimize-entity-labels-2
dferhod Jul 31, 2024
f02259c
fixed warning in test.sh
Jul 31, 2024
4cecda2
Merge branch 'pg-warehouse' into pg-field-loading
dferhod Aug 1, 2024
6569fd0
add update time span to cron jobs
dferhod Aug 1, 2024
8984d16
increase threshold from 80 to 110ms
dferhod Aug 1, 2024
e224075
chore(): update prerelease version
dferhod Aug 1, 2024
6c4272a
Merge pull request #375 from geovistory/pg-field-loading
dferhod Aug 1, 2024
0b1f422
chore(): update prerelease version
dferhod Aug 1, 2024
06cdf6d
Optimization
Aug 7, 2024
941402f
chore(): update prerelease version
Aug 7, 2024
78b3c55
Optimization
Aug 7, 2024
f284bb1
Merge remote-tracking branch 'origin/pg-warehouse' into pg-warehouse
Aug 7, 2024
5bf6637
chore(): update prerelease version
Aug 7, 2024
66fc11b
Optimization
Aug 12, 2024
1817e49
chore(): update prerelease version
Aug 12, 2024
fda1639
Optimization
Aug 12, 2024
51fbee8
Merge remote-tracking branch 'origin/pg-warehouse' into pg-warehouse
Aug 12, 2024
1e0859b
chore(): update prerelease version
Aug 12, 2024
e41edbd
uncommented a line to test
dferhod Sep 25, 2024
ee61e50
Merge remote-tracking branch 'origin/pg-warehouse' into pg-warehouse
dferhod Sep 25, 2024
27cc7d0
chore(): update prerelease version
dferhod Sep 25, 2024
9282e06
reverted last change
dferhod Sep 25, 2024
6e9f1fe
chore(): update prerelease version
dferhod Sep 25, 2024
b7b9cbe
corrected an assert
dferhod Oct 8, 2024
c0a447d
finally fixed the bug that duplicated the JSON output of entity field…
dferhod Oct 9, 2024
014b01c
several fixes about transctional triggers converted into transactiona…
dferhod Oct 18, 2024
09ce9ea
new optimizations for full_text + added entity_preview update to the …
dferhod Nov 5, 2024
ed36272
Merge branch 'main' into pg-warehouse
dferhod Nov 6, 2024
12241b8
added improved functions and tests
dferhod Nov 19, 2024
e2a7406
fixed some tests
dferhod Nov 21, 2024
f243dbc
Merge remote-tracking branch 'origin/pg-warehouse' into pg-warehouse
dferhod Nov 21, 2024
8412bd2
fixed last unit test, all pass
dferhod Nov 22, 2024
ab79514
chore(): update prerelease version
dferhod Nov 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
client
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text eol=lf
57 changes: 40 additions & 17 deletions .github/workflows/01-dockerize.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,35 @@ name: Dockerize

on:
pull_request:
branches:
- main

jobs:
# run tests before dockerizing
test:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: geovbot
password: ${{ secrets.GEOVBOT_READ_WRITE_PACKAGES }}

# run database integration and unit tests
- name: run database tests
run: |
cd database
chmod -R 777 logs
export POSTGRES_PORT=5432
bash test.sh -i -u -p

set-version:
runs-on: ubuntu-latest
needs: [test]
if: github.event_name == 'pull_request'
outputs:
version_tag: ${{steps.npm_version.outputs.tag}}
Expand All @@ -31,8 +54,8 @@ jobs:
if: always()
with:
webhook: ${{ secrets.DISCORD_GITHUB_CHANNEL_WEBHOOK }}
title: "Dockerize Toolbox Server and Client"
description: "PR: ${{ steps.pull_request.outputs.number }}"
title: 'Dockerize Toolbox Server and Client'
description: 'PR: ${{ steps.pull_request.outputs.number }}'
color: 0xffed2b
username: GitHub Actions

Expand All @@ -46,8 +69,8 @@ jobs:

- uses: actions/setup-node@v2
with:
node-version: "16.13.2"
registry-url: "https://registry.npmjs.org"
node-version: '16.13.2'
registry-url: 'https://registry.npmjs.org'

- name: Tag this commit with pr
id: npm_version
Expand All @@ -61,11 +84,11 @@ jobs:
run: echo your tag is '${{steps.npm_version.outputs.tag}}'

- name: Update Lock file
run: "npm i --package-lock-only"
run: 'npm i --package-lock-only'

- uses: EndBug/add-and-commit@v5
with:
message: "chore(): update prerelease version"
message: 'chore(): update prerelease version'
tag: v${{steps.npm_version.outputs.tag}}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -97,9 +120,9 @@ jobs:
uses: docker/build-push-action@v3
with:
# Location of Dockerfile, if not Dockerfile in root directory
file: server/webserver.dockerfile
file: webserver.dockerfile
# Directory to run `docker build` from, if not project root
context: server
context: .
push: true
tags: ghcr.io/geovistory/toolbox-server:${{needs.set-version.outputs.version_tag}}

Expand All @@ -108,8 +131,8 @@ jobs:
if: always()
with:
webhook: ${{ secrets.DISCORD_GITHUB_CHANNEL_WEBHOOK }}
title: "Dockerize Toolbox Server > Done"
description: "Image Tag: ${{needs.set-version.outputs.version_tag}}"
title: 'Dockerize Toolbox Server > Done'
description: 'Image Tag: ${{needs.set-version.outputs.version_tag}}'
color: 0x0000ff
username: GitHub Actions

Expand All @@ -125,12 +148,12 @@ jobs:

- uses: actions/setup-node@v2
with:
node-version: "16.13.2"
registry-url: "https://registry.npmjs.org"
node-version: '16.13.2'
registry-url: 'https://registry.npmjs.org'

- name: Setup version info
id: setup_version
run: "npm --prefix client run setup:version"
run: 'npm --prefix client run setup:version'

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
Expand Down Expand Up @@ -160,7 +183,7 @@ jobs:
if: always()
with:
webhook: ${{ secrets.DISCORD_GITHUB_CHANNEL_WEBHOOK }}
title: "Dockerize Toolbox Client > Done"
description: "Image Tag: ${{needs.set-version.outputs.version_tag}}"
title: 'Dockerize Toolbox Client > Done'
description: 'Image Tag: ${{needs.set-version.outputs.version_tag}}'
color: 0x0000ff
username: GitHub Actions
6 changes: 5 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
{
"git.autofetch": true,
"editor.formatOnSave": true,
"editor.formatOnSave": false,
"editor.codeActionsOnSave": {
"source.organizeImports": "explicit",
"source.fixAll": "explicit"
},
"sqltools.format": {
"linesBetweenQueries": 2,
"language": "pl/sql"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ export class AddEntityOrValueDialogComponent implements OnDestroy, OnInit {

this.selectedInProject$ = this.state.data.war.entityPreview.getEntityPreview.byProjectIdPkEntity$(this.pkProject, d.pkEntity).pipe(
filter(item => !!item),
map(item => item.project_id !== 0),
map(item => item.fk_project !== 0),
startWith(false)
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ export class AddStatementDialogComponent implements OnInit, OnDestroy {
this.ap.streamEntityPreview(d.pkEntity)

this.selectedInProject$ = this.state.data.war.entityPreview.getEntityPreview.byProjectIdPkEntity$(this.pkProject, d.pkEntity).pipe(
map(item => item?.project_id !== 0),
map(item => item?.fk_project !== 0),
startWith(false)
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ export class CtrlEntityDialogComponent implements OnDestroy, OnInit {

this.selectedInProject$ = this.state.data.war.entityPreview.getEntityPreview.byProjectIdPkEntity$(this.pkProject, d.pkEntity).pipe(
filter(item => !!item),
map(item => item.project_id !== 0),
map(item => item.fk_project !== 0),
startWith(false)
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ export class CtrlEntityComponent implements OnDestroy,
class_label: label,
entity_type: type,
pk_entity: undefined,
project_id: undefined,
fk_project: undefined,
}
return e
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ export class SearchExistingEntityComponent implements OnInit, OnDestroy {
map(([resp, selected]) => {
const res: EntitySearchHit[] = resp.data;
const hits: EntityAddExistingHit[] = res.map(r => {
const isInProject = r.project_id !== 0;
const isInProject = r.fk_project !== 0;
const confirmBtnDisabled = (this.disableIfHasStatement && r.related_statements.length >= this.disableIfHasStatement.maxQuantity);
const confirmBtnTooltip = confirmBtnDisabled ?
`This ${r.class_label} can't be selected because it is already related to ${r.related_statements.length} ${this.disableIfHasStatement.sourceClassLabel} via '${this.disableIfHasStatement.propertyLabel}'.`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export class ViewFieldBodyComponent implements OnInit, OnDestroy {
* For UX-Performance: trigger field load with limit 0 to get the total count of statements
* in that field (without the need to query nested fields)
*/
this.loadFieldCount(until$);
//this.loadFieldCount(until$);

const page$ = pagination$.pipe(
delay(0),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<!-- MENU FOR CLASS INFO -->
<mat-menu #classInfoMenu="matMenu">
<button mat-menu-item [disabled]="(preview$|async)?.project_id === 0"
<button mat-menu-item [disabled]="(preview$|async)?.fk_project === 0"
(click)="item.component.openInNewTabFromEntity(resource)">
<mat-icon>tab</mat-icon>
Open {{classLabel}} in new Tab
</button>
<button mat-menu-item *ngIf="(preview$|async)?.project_id === 0"
<button mat-menu-item *ngIf="(preview$|async)?.fk_project === 0"
(click)="item.component.addAndOpenInNewTabFromEntity(resource)">
<mat-icon>add</mat-icon>
Add {{classLabel}} to project and open
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export class EntitySearchHitComponent implements OnInit {
ngOnInit() {
this.projectsCount = this.hit.projects ? this.hit.projects.length : undefined;

if (this.hit.project_id > 0) {
if (this.hit.fk_project > 0) {
this.isInProject = true;
} else {
this.repositorySearch = true;
Expand All @@ -59,7 +59,7 @@ export class EntitySearchHitComponent implements OnInit {

this.entityPreview = {
pk_entity: this.hit.pk_entity,
project_id: this.hit.project_id,
fk_project: this.hit.fk_project,
fk_class: this.hit.fk_class,
entity_label: this.hit.entity_label,
entity_type: this.hit.entity_type,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
<ng-content></ng-content>
<mat-menu #filterMenu="matMenu">
<div
class="container"
(click)="$event.stopPropagation()"
(keyup)="$event.stopPropagation()"
(keydown)="$event.stopPropagation()"
>
<mat-form-field>
<mat-select [formControl]="operation">
<mat-option *ngFor="let op of operations" [value]="op">
{{ op.text }}
</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field *ngIf="needsFilter">
<input matInput [formControl]="filter" />
</mat-form-field>
</div>
</mat-menu>
<span class="trigger" [matMenuTriggerFor]="filterMenu">
<mat-icon>filter_list</mat-icon>
</span>
<ng-content></ng-content>

<mat-menu #filterMenu="matMenu">
<div
class="container"
(click)="$event.stopPropagation()"
(keyup)="$event.stopPropagation()"
(keydown)="$event.stopPropagation()"
>
<mat-form-field>
<mat-select [formControl]="operation">
<mat-option *ngFor="let op of operations" [value]="op">
{{ op.text }}
</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field *ngIf="needsFilter">
<input matInput [formControl]="filter" />
</mat-form-field>
</div>
</mat-menu>

<span class="trigger" [matMenuTriggerFor]="filterMenu">
<mat-icon>filter_list</mat-icon>
</span>
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
:host {
display: flex;
align-items: center;
}
.trigger {
color: rgba(0, 0, 0, 0.3);
cursor: pointer;
display: flex;
margin-left: 4px;
opacity: 0;
transform: translateY(-5px);
transition-duration: 0.2s;
transition-property: opacity, transform;
:host.has-value & {
color: rgba(0, 0, 0, 0.54);
}
:host:hover &,
:host.show-trigger & {
opacity: 1;
transform: translateY(-1px);
}
}
.container {
padding: 0 16px;
mat-form-field {
margin: -8px 0;
width: 100%;
}
}
:host {
display: flex;
align-items: center;
}

.trigger {
color: rgba(0, 0, 0, 0.3);
cursor: pointer;
display: flex;
margin-left: 4px;
opacity: 0;
transform: translateY(-5px);

transition-duration: 0.2s;
transition-property: opacity, transform;

:host.has-value & {
color: rgba(0, 0, 0, 0.54);
}

:host:hover &,
:host.show-trigger & {
opacity: 1;
transform: translateY(-1px);
}
}

.container {
padding: 0 16px;

mat-form-field {
margin: -8px 0;
width: 100%;
}
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<mat-menu #menu="matMenu">
<button mat-menu-item (click)="clear.next()">
<mat-icon style="margin-top: -3px">clear</mat-icon>
<span>Clear filters</span>
</button>
</mat-menu>
<button class="clear" mat-icon-button [matMenuTriggerFor]="menu">
<mat-icon>more_vert</mat-icon>
</button>
<mat-menu #menu="matMenu">
<button mat-menu-item (click)="clear.next()">
<mat-icon style="margin-top: -3px">clear</mat-icon>
<span>Clear filters</span>
</button>
</mat-menu>

<button class="clear" mat-icon-button [matMenuTriggerFor]="menu">
<mat-icon>more_vert</mat-icon>
</button>
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
:host {
display: flex;
align-items: center;
justify-content: space-between;
}
mat-icon {
margin-top: -2px;
}
:host {
display: flex;
align-items: center;
justify-content: space-between;
}

mat-icon {
margin-top: -2px;
}
Loading