-
Notifications
You must be signed in to change notification settings - Fork 894
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
[BUG] URL cannot be saved anymore #4667
Comments
Hi, |
I haven't seen any updates so I am happy for you to go ahead :) |
Is the bug still coming or sorted? |
the bug is still coming |
I believe Discover is being revamped and this would be addressed there. @ashwin-pc might have more information. |
@huehnerlady I have a suspicion that this might be an issue with how the link is stored rather than the URL itself. Here is a URL to the playground website that has the filters applied and a few columns selected: This URL can be corrupted depending on the way you store it (e.g. markdown) which is why the share functionality exists. Does this URL work for you? Another reason for this might be because f something you mentioned in the issue description. When switching from dev to prod environments, the necessary indexes or other state information is not valid for the new environment. This will prevent the app from loading the state correctly and clear out all the filters and columns even if they are valid. |
@ashwin-pc we use Opensearch for a while and changing the stage worked for a long time, it just hasn't stopped working recently. Our stages are all the same, so index etc. are also available. Is there another possibility to export/import the filters somehow as a workaround? It is super frustrating if you clicked together quite a complex filter setup and then you have to do the same AGAIN in the different stage The link works for me, do you have a different stage you can manipulate the link to? |
Hmm, i dont know what could cause such a thing, especially since discover simply loads the state stored in the URL. So if you are able to load the URL I shared, you should be able to load the the same when you moved between stages. Do you have a sample URL i can look at to see what might be different from mine? Do you also happen to know which version broke for you? i.e. which version were you on and which did you move to? Also If you want to take a stab at fixing this, i'll be happy to help you contribute a fix :) |
Oh i see the issue. So the URL you provided is a shortened URL. The way the app makes these URL's is by storing the state information on the browser storage and using the key for that stored value in the URL. This way the URL is smaller. The downside to this approach for your use case is that when you switch domains, the same key does not exist for the new domain. So when the app loads and looks for the key, it is not able to find it for the new domain and does not load the state information correctly. Basically, when the URL works as follows:
|
Ah that makes sense. But how can I keep Opensearch from shortening the URL? Is that a setting in my account? Or a setting in Opensearch itself? |
This is enabled by the |
@ashwin-pc that was actually enabled, so thank you very much for your help. The URL now looks different, but I do get the same error when changing THE URL from eg. dev to prod, even though the stages are configured complete the same |
GladI could help :) As for the error that you are seeing now, are there any errors visible in the browser console window? Or can you give me an example of the new URL's? |
@ashwin-pc And when I change |
So it looks like the index pattern id changes between the two stages for you, which causes the error. If you look at the URL's that you shared You can see a similar result when you change the index pattern to one which does not have the level field. This should show you a warning instead. |
@ashwin-pc thanks for your help. As this worked before, what can I do that it will work again? Can my admin change the idex pattern ID manually somehow? Or can we change something else which will enable a URL swap? |
@huehnerlady yes, when you create an index pattern, you have the ability to set a custom index pattern id. Doing that on both your staging and prod environments should help you do this switch. Also i'll be closing this issue since it looks like this should mitigate your problem. Feel free to reopen if you face any other issues. |
Describe the bug
Earlier versions you were always able to save the URL as a bookmark - or also adapt the URL to eg. switch between development and prod and not loose your filters.
Now when you do that all the filter reset.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I expect that these items are still there when we reuse the URL - just like it worked before. You can share the URLs via the share button, which is a pain - especially when creating a bookmark - but it is possible. It is not possible however to create a query for dev and then switch the host to prod
Dashboards Version
v2.5.0
Plugins
Screenshots
If applicable, add screenshots to help explain your problem.
Host/Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: