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 SUGGEST] Configure an 'absoloute path' for each indicies, for convenience #467

Open
jaxjexjox opened this issue Feb 23, 2024 · 5 comments

Comments

@jaxjexjox
Copy link

Specifically Web Component please, user interface.

Is your feature request related to a problem? Please describe.

Not related in any way to a problem.

What would you like to see happen?

Disclaimer: I'm a Windows user, sorry.....!
If I go to your demo server and search for: "DH16AAL"
It returns the file: "pain_is_beauty.log"
If I click "i" it will tell me the path is "test_files/text"

I would REALLY love to configure a "real path" name for Windows use for example which will re-syntax the search result.
Example instead of test_files/text

I'd love for the software to also have the following piece of information come up:
"J:\Documents\Files-Used-for-Demo\test_files\text\pain_is_beauty.log"

Simply because I configured the index "[test files]" to have an 'absoloute path' of
"J:\Documents\Files-Used-for-Demo"
(sist2 can parse the rest)

I hope this screenshot, helps clarify what I mean:
https://i.imgur.com/VM347ht.png

Bonus:
"Copy" button for the block of text to the right
Extra Bonus!:
HTML link to actually open the file, from the WebUI, I think the syntax is :
file:///J:/Documents/Files-Used-for-Demo\test_files\text\pain_is_beauty.log
Bonus 3: The shortcut to copy the path or open the file is in the search results, no need to click (i)

I am happy to provide more information and sorry it's so long and potentially confusing
Long story short I want to configure a block of text, once, when configuring an index, which will be added to a new field for search results per object, to let me know where they are, from my desktop.

Bonus if I can open them straight from the WebUI

Thank you for the hard work and good product.

@jaxjexjox
Copy link
Author

Please note that the "Serve files from this url instead of from disk" is very close to what I'm after to an extent.

@simon987
Copy link
Collaborator

Hi, as far I know, you cannot make a browser open files on your disk using file://

You can show the absolute path with a Javascript template string:
image

${doc.indexRoot}${doc.path}/ and it will show the (UNIX) path as it's mounted on Docker.

Then you can adjust the string to get a Windows path, for example:

J:${doc.indexRoot.replaceAll("/", "\\")}${doc.path.indexRoot.replaceAll("/", "\\")}/ or similar

@jaxjexjox
Copy link
Author

I opened chrome and simply typed in C:\ in the URL bar to navigate my local system, then right clicked a file, copied the URL to remember the syntax for the file:/// command.
(Hence me assuming it's possible)

That being said, this may be a proprietary internally generated page presented by Google and possibly not standard and wouldn't work for a normal web page? I'm not sure.

As for the java script, thank you, but is there any where I can pop this into the software in order for it to actually do it for me as an end user? (Please)

Thank you for the reply, appreciate it.

I'll try to Google a little more on the file:/// thing and see what I can find out

@dpieski
Copy link
Contributor

dpieski commented Mar 1, 2024

@jaxjexjox If you click on anything in Chrome when browsing your files, it will download the files into your downloads, not open the file.
https://stackoverflow.com/questions/28724751/open-local-filesfile-using-chrome

What I have done is make a new protocol. And have an intermediary program on the desktop to receive the address via the protocol, validate and clean the address, then open the file.

@dpieski
Copy link
Contributor

dpieski commented Jun 5, 2024

@jaxjexjox Regarding where you can pop the Javascript into the software for you to use is - you can do this in the Configuration page, copied below. That is the same as the screenshot he attached.
image

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

No branches or pull requests

3 participants