Git Product home page Git Product logo

Comments (11)

mustafaazad03 avatar mustafaazad03 commented on June 3, 2024

Hi,
is this issue still open? can I work on this?

from opensearch-dashboards.

huehnerlady avatar huehnerlady commented on June 3, 2024

I haven't seen any updates so I am happy for you to go ahead :)

from opensearch-dashboards.

sourabh-bhatt avatar sourabh-bhatt commented on June 3, 2024

Is the bug still coming or sorted?

from opensearch-dashboards.

huehnerlady avatar huehnerlady commented on June 3, 2024

the bug is still coming

from opensearch-dashboards.

AMoo-Miki avatar AMoo-Miki commented on June 3, 2024

I believe Discover is being revamped and this would be addressed there. @ashwin-pc might have more information.

from opensearch-dashboards.

ashwin-pc avatar ashwin-pc commented on June 3, 2024

@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:

https://playground.opensearch.org/app/discover#/view/eed52100-6fa7-11ed-a8ec-958f39714b93?_g=(filters:!(),query:(language:kuery,query:''),refreshInterval:(pause:!f,value:900000),time:(from:now-7d,to:now))&_a=(columns:!(category,sku,taxful_total_price),filters:!(('$state':(store:appState),meta:(alias:!n,disabled:!f,index:ff959d40-b880-11e8-a6d9-e546fe2bba5f,key:category.keyword,negate:!f,params:(query:'Men!'s%20Clothing'),type:phrase),query:(match_phrase:(category.keyword:'Men!'s%20Clothing')))),index:ff959d40-b880-11e8-a6d9-e546fe2bba5f,interval:auto,query:(language:kuery,query:''),sort:!())

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.

from opensearch-dashboards.

huehnerlady avatar huehnerlady commented on June 3, 2024

@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?
Does this mean we need to change the setup to change the way we store things?

from opensearch-dashboards.

ashwin-pc avatar ashwin-pc commented on June 3, 2024

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 :)

from opensearch-dashboards.

huehnerlady avatar huehnerlady commented on June 3, 2024

Our URLs do not look like that anymore, but more like this:

https://<host>/_dashboards/app/discover#/?_g=h@37c70d4&_a=h@1843b5e

so it does not reveal the filters etc. in the URL
When I then change the stage, all filters are gone.

In the rare occasions where I do have the other type of URL:
Example:
https://<host>/_dashboards/app/discover#/?_g=(filters:!(),refreshInterval:(pause:!f,value:300000),time:(from:now-7d,to:now))&_a=(columns:!(service,message,stack_trace,request_path),filters:!(('$state':(store:appState),meta:(alias:!n,disabled:!f,index:f0b0f300-8812-11ec-b707-ef8e772da31b,key:service,negate:!f,params:(query:foo),type:phrase),query:(match_phrase:(service:foo)))),index:f0b0f300-8812-11ec-b707-ef8e772da31b,interval:auto,query:(language:lucene,query:''),sort:!(!('@timestamp',desc)))

Example after changing stage:
https://host/_dashboards/app/discover#/?_g=(filters:!(),refreshInterval:(pause:!f,value:300000),time:(from:now-7d,to:now))&_a=h@50057b0

I can show the following behaviour:

Here you can see our query.
image

After I change the stage, I see this:
image

I need to then choose the same index:
image

which would be ok, but the field name and value is also gone

from opensearch-dashboards.

ashwin-pc avatar ashwin-pc commented on June 3, 2024

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:

https://<host>/_dashboards/app/discover#/?_g=<GLOBAL_STATE>&_a=<APPLICATION_STATE>

GLOBAL_STATE or APPLICATION_STATE can be the raw state thats rison encoded or a key to the stored state value. if it is the raw state, this can be moved across domains, but if its the saved key, it cannot since the new domain does not have the key.

from opensearch-dashboards.

huehnerlady avatar huehnerlady commented on June 3, 2024

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:

https://<host>/_dashboards/app/discover#/?_g=<GLOBAL_STATE>&_a=<APPLICATION_STATE>

GLOBAL_STATE or APPLICATION_STATE can be the raw state thats rison encoded or a key to the stored state value. if it is the raw state, this can be moved across domains, but if its the saved key, it cannot since the new domain does not have the key.

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?

from opensearch-dashboards.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.