How to refresh view of a field


(Hechem) #1

I tried to change the value of one fields in a search table and I realized that the value really changes except that at the level of the view(sight) that does not change. Would have you a solution to refresh the view(sight) and to consider the modifications?

[URL=http://www.hostingpics.net/viewer.php?id=193578imprim.png][/URL]


(Shaunak Kashyap) #2

I want to make sure I understand your scenario correctly. Are you saying that the value of the STATE field in that particular document in Elasticsearch is "Ended" but you are still seeing "Failed"? What do you see if you try to retrieve the document from Elasticsearch using GET /{index-name}/{type-name}/{document-id}?


(Hechem) #3

No it is not that. In fact, the value of STATE in elasticsearch is "Failed" and having made some treatment on this variable I change it to "ENDED". But the problem that the modification is not made


(Hechem) #4

Someone can help me please????


(Shaunak Kashyap) #5

I understand now. Thanks for clarifying. I am not sure why the variable update is not being reflected in the UI. I'm looking into this now and will get back to you shortly.


(Shaunak Kashyap) #6

Hi @yazidi,

I think you need to use $scope.formatted instead of $scope.hit to make the update. I was able to get this working:

Also, depending on what you are trying to accomplish, you might be able to write a custom field formatter instead. Here's a blog post that explains how to do that: https://www.elastic.co/blog/kibana-custom-field-formatters.


(Hechem) #7

Sorry, it doesn't work :frowning:


(Shaunak Kashyap) #8

Okay, can you try the same process that I'm trying in the animated gif above:

  1. Open Developer Tools in Chrome.
  2. In the source code, highlight the element whose value you want to change.
  3. Open the Console.
  4. Enter angular.element($0).scope() to see what variables are in the $scope for that element.

That might give you some idea as to which variable you need to update.


(Hechem) #9

it is encapsuled in angular.element($0).scope("STATE").row.$$_partialFormatted.STATE. So how can i do for change it please??


(Shaunak Kashyap) #10

Hmm... we're getting into the details quite a bit on this one. Before we keep going, I'd like to take a step back and ask two questions:

  1. What is your overall use case here? What is the broader problem you are trying to solve? Sometimes knowing this can yield alternate solutions.

  2. Would you be willing to get on IRC chat (#kibana on Freenode IRC) to discuss this further? Once we get into details at a line level of code it sometimes helps to discuss them interactively.


(system) #11