Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(server, web): search location #7139

Merged
merged 21 commits into from
Feb 24, 2024
Merged

feat(server, web): search location #7139

merged 21 commits into from
Feb 24, 2024

Conversation

martabal
Copy link
Member

Search the location with a text box

Screenshots

2024-02-16.00-28-32.mp4

Copy link

cloudflare-workers-and-pages bot commented Feb 15, 2024

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 7ea97f7
Status: ✅  Deploy successful!
Preview URL: https://f08749a1.immich.pages.dev
Branch Preview URL: https://feat-search-location.immich.pages.dev

View logs

server/src/domain/search/dto/search.dto.ts Outdated Show resolved Hide resolved
server/src/domain/search/dto/search.dto.ts Outdated Show resolved Hide resolved
server/src/infra/repositories/search.repository.ts Outdated Show resolved Hide resolved
@mertalev
Copy link
Contributor

Actually, can't we use this for the search box as well? I think this is a sleek way to search for a location. @alextran1502

@alextran1502
Copy link
Contributor

@mertalev @martabal Wow, this is very cool. With the current search box, we know what is available; with this, we will need to perform an estimation. Am I understanding correctly?

@mertalev
Copy link
Contributor

The search box here uses geodata_places, but it should be possible to adapt this to the exif table too

@martabal
Copy link
Member Author

@mertalev @martabal Wow, this is very cool. With the current search box, we know what is available; with this, we will need to perform an estimation. Am I understanding correctly?

Yes, but more like a suggestion

@martabal
Copy link
Member Author

@alextran1502 Yes, that probably can be used for your search

@mertalev mertalev marked this pull request as ready for review February 18, 2024 23:03
Copy link
Member

@danieldietzler danieldietzler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work!

@alextran1502
Copy link
Contributor

Amazing works! it looks and works very well, let's address my comment above and resolve the conflict then we can have this merged

@mertalev mertalev merged commit a2934b8 into main Feb 24, 2024
25 checks passed
@mertalev mertalev deleted the feat/search-location branch February 24, 2024 00:42
@waclaw66
Copy link
Contributor

I'm getting

Error: 500 - 500
y@https://photos-dev.server/node_modules/.vite/deps/@oazapfts_runtime.js?v=80e2c728:152:5
l@https://photos-dev.server/node_modules/.vite/deps/@oazapfts_runtime.js?v=80e2c728:139:9

since this PR, is it possible to fix that somehow?
I did fresh git clone, remove everything from docker (including caches) and still occurs.

@martabal
Copy link
Member Author

Does it work without your reverse proxy ?

@waclaw66
Copy link
Contributor

Does it work without your reverse proxy ?

No, it's the same...

Error: 500 - 500
y@http://localhost:2284/node_modules/.vite/deps/@oazapfts_runtime.js?v=bc1795a2:152:5
l@http://localhost:2284/node_modules/.vite/deps/@oazapfts_runtime.js?v=bc1795a2:139:9

@martabal
Copy link
Member Author

Does it affect the whole webapp or only this modal ?

I'll take a look this evening

@waclaw66
Copy link
Contributor

waclaw66 commented Feb 26, 2024

It affects whole web app.
The root cause is probaly here in server...

Debugger listening on ws://0.0.0.0:9230/91b6385c-5e36-4d1f-8ad7-13cd3a97199e
For help, see: https://nodejs.org/en/docs/inspector
[Nest] 20  - 02/26/2024, 7:34:09 AM    WARN [AppService] Unable to open `www/index.html, skipping SSR.
[Nest] 20  - 02/26/2024, 7:34:09 AM     LOG [CommunicationRepository] Initialized websocket server
Migration "GeodataLocationSearch1708059341865" failed, error: permission denied for language c
/usr/src/app/src/driver/postgres/PostgresQueryRunner.ts:331
            throw new QueryFailedError(query, parameters, err)
                  ^
QueryFailedError: permission denied for language c
    at PostgresQueryRunner.query (/usr/src/app/src/driver/postgres/PostgresQueryRunner.ts:331:19)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at GeodataLocationSearch1708059341865.up (/usr/src/app/src/infra/migrations/1708059341865-GeodataLocationSearch.ts:5:5)
    at MigrationExecutor.executePendingMigrations (/usr/src/app/src/migration/MigrationExecutor.ts:336:17)
    at DataSource.runMigrations (/usr/src/app/src/data-source/DataSource.ts:403:13)
    at DatabaseRepository.runMigrations (/usr/src/app/src/infra/repositories/database.repository.ts:191:5)
    at /usr/src/app/src/domain/database/database.service.ts:50:7
    at /usr/src/app/src/infra/repositories/database.repository.ts:200:15

Worth to mention I'm using postgress container from dev docker compose, db has been created by Immich itself and uses superuser rights, so there was no intervention from my side. Everything should be by the book.

@martabal
Copy link
Member Author

Yes, it's a migration issue. Weird, I had no problems with this migration.

@mertalev Do you have any idea what could cause that ?

@waclaw66
Copy link
Contributor

I've found the cause, it was missing superuser privilige for postgres user, definitely my mistake, I'm sorry for confusion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants