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

Table Panel: Format specific fields as pretty (human readable) JSON #321

Closed
wants to merge 0 commits into from

Conversation

stha
Copy link

@stha stha commented Aug 2, 2013

Hi,

i've implemented a feature, to show json data in table fields as pretty formated JSON. We use this in our error logging, to get an better insight into our php generated debug backtraces.

Is anyone interested in sharing this feature?

@areman
Copy link

areman commented Aug 2, 2013

Sounds interesting. Maybe I can use this feature to display webservice request/resonse values.
+1

@rashidkpc
Copy link
Contributor

You shouldn't be using ng-html-bind-unsafe here, any xml embedded in the json string will render improperly. You should be using ng-bind-html with a function to properly escape xml sequences.

@stha
Copy link
Author

stha commented Aug 5, 2013

I'm using ng-bin-html instead of ng-bind-html-unsafe and extended the nl2br-filter to escape some html special chars (I was slightly oriented on the highlight-filter of the same module).

@areman
Copy link

areman commented Aug 5, 2013

I think it will be great if the formatted json text will not only be displayed in the details. The text in the table row should formatted, too.

@stha
Copy link
Author

stha commented Aug 6, 2013

Hm, how do you imagine to format the text in the table row? If the text is prettified it will use a lot of space and hence don't fit to the space available in a single table row.

@areman
Copy link

areman commented Aug 6, 2013

yes you're right. I used this feature to format webservice requests. I my case the unformatted text is very long, too. I think you're right it makes no seems to format the text in the table. Maybe a table column needs a properties ,show only the first line'.

@stha
Copy link
Author

stha commented Aug 20, 2013

I moved the changes to the branch prettyJson on my fork.

@stha stha closed this Aug 20, 2013
spalger pushed a commit that referenced this pull request Oct 6, 2014
spalger pushed a commit to spalger/kibana that referenced this pull request Mar 3, 2016
…reported every 10s

Full stack traces are logged in debug

Closes elastic#321
harper-carroll pushed a commit to harper-carroll/kibana that referenced this pull request Jul 11, 2016
Spliting out the event manager config since Carpenter and Link use it di...
w33ble pushed a commit to w33ble/kibana that referenced this pull request Sep 13, 2018
* Replaced mathjs with tinymath in math.js. Wrote unit tests for math.js. Upgraded tinymath

* Added string and bool columns to testTable for math.js tests. Added unit tests for math.js

* Added columns to testTable in math.js test file

* Upgraded tinymath to version 0.1.8

* Created function to convert datable to math context for math.js

* Replaced pivotObjectArray with datableToMathContext

* Wrote unit tests for math.js

* Fixed unit test for math.js. Removed references to mathjs package in math.js

* Uncommented line to run server tests

* Refactored math.js test file

* Replaced every instance of Object.value with value from lodash

* Create test file for pointseries. Wrote unit tests for pointseries.

* Added unit tests for pointseries

* Moved 'server/functions/pointseries.js' to 'server/functions/pointseries/index.js'. Updated unit tests. Created lib folder for pointseries helper functions

* Removed map function from lodash

* Added unit test for pointseries.js

* Refactored pointseries and replaced mathJS functions with tinymath functions

* Removed common/lib/math.js. Replaced reference to math.js with tinymath in handlebars.js.

* Replaced mathjs with tinymath in datacolumn.js

* Refactored pointseries.js. Replaced mathjs with tinymath. Removed unused lodash functions

* Removed mathjs package and generated docs

* Fixed unit tests. Fixed getType function in math.js

* Moved getFormObject function to a separate file. Imported getFormObject into datacolumn.js. Rewrote getFormObject to work with parse from tinymath

* Rewrote getFormObject to work with parse from tinymath. Wrote unit tests for getFormObject

* Added unit test to test runtime of pointseries using demodata

* Updated demodata test

* Removed console logs

* Updated runtime test for pointseries

* Removed runtime test for pointseries

* Added error handling for empty datatables in math.js. Updated unit tests

* Upgraded tinymath to 0.1.9

* Changed error message thrown in getFormObject, updated unit tests

* Created test datatables file

* Cleaned up tests for math.js.

* Wrote tests for datatableToMathContext

* Cleaned up unit tests for pointseries

* wrote tests for isColumnReference

* Renamed getType in pointseries to getExpressionType

* Pulled out functions out of pointseries into lib functions and added imports to pointseries

* Wrote unit tests for getFieldType

* Wrote unit tests for getFieldNames

* Wrote unit tests for getExpressionType. Refactored pointseries. Updated unit tests for pointseries helper functions.

* Removed mode from dropdown menu in SimpleMathFunction

* Cleaned up unit tests for pointseries and helper functions
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

Successfully merging this pull request may close these issues.

3 participants