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

Csv export support #585

Closed
wants to merge 29 commits into from
Closed

Csv export support #585

wants to merge 29 commits into from

Conversation

bobrik
Copy link

@bobrik bobrik commented Oct 17, 2013

This patch enables csv export support for histogram panel. I'd like to see some feedback.

view
#205 is affected.

@bobrik bobrik mentioned this pull request Oct 17, 2013
@johntdyer
Copy link

awesome !

@bobrik
Copy link
Author

bobrik commented Oct 17, 2013

Maybe it would be better to make whole panels "csv enabled", like "inspectable" to make it more universal.

@rashidkpc
Copy link
Contributor

I agree that the best way to go about this would be in a more generic fashion. My concern with merging this now is that people would expect every panel to support CSV export.

For things like the table panel, we'll need Elasticsearch support for CSV output to be able to export a useful number of records.

@bobrik
Copy link
Author

bobrik commented Oct 18, 2013

I think it could be done in iterations, one panel at a time, starting with histogram panel.

Do you have any advice how to make this pull request better? Should we have "enable export to csv" option or it should be always available if panel supports it? How to make it more universal in code? I don't want to make changes blindly :)

I think I can add support for terms and pie in this request too. I'm not sure about table panel, it could be tricky.

@bobrik
Copy link
Author

bobrik commented Oct 22, 2013

I've added terms panel support and redesigned the whole thing a bit. Now panels have button in the right top corner to trigger csv popup that has csv preview and download buttons.

@rashidkpc what do you think?

kibana 3 2013-10-22 17-21-07

kibana 3 2013-10-22 17-21-35

@rashidkpc
Copy link
Contributor

Looks good. A few notes:

  • {{ to_csv() }} in the modal. This should probably be changed to point at a populated scope object instead, as to_csv() will end up being run several times by angular when rendering the view. Might want to consider if the panel buttons should be changed to use a click handler instead of always assuming they'll open a modal. Modals can be triggered from controllers.
  • Inspect was renamed Inspect2? Guessing a debugging leftover
  • The time format should probably be ISO8601

@bobrik
Copy link
Author

bobrik commented Oct 22, 2013

I renamed Inspect2 back to Inspect.

As I see ISO8601, it should be something like 2013-10-22T23:58:19. Am I right about this?

@rashidkpc
Copy link
Contributor

yep

@bobrik
Copy link
Author

bobrik commented Oct 23, 2013

@rashidkpc I moved csv calculation to results processing, csv.html is using variable instead of function call. Is that what you meant?

@rashidkpc
Copy link
Contributor

The way the current panel buttons are designed they must trigger a modal. I'm wondering if we don't want to redesign that aspect of the system to point to a function that could perform other functions instead of a modal that can really only pop up a window. This would allow you to calculate the CSV data on demand, instead of everytime a search is performed.

@bobrik
Copy link
Author

bobrik commented Oct 23, 2013

@rashidkpc I can't fix that aspect of kibana, sorry. I could only fix this pull request if someone could show me an example. Frankly speaking, I'm not even front-end developer and I have no idea how to do what you want from panel buttons.

@bobrik
Copy link
Author

bobrik commented Oct 28, 2013

@rashidkpc what's the status of this request then?

@rashidkpc
Copy link
Contributor

I really want to make sure this happens globally and in a scaleable manner before implementing the feature. That means refactoring the way panel buttons work and perhaps working with the Elasticsearch core team to get a CSV output to queries.

@bobrik
Copy link
Author

bobrik commented Oct 29, 2013

@rashidkpc I added ng-click handler for panel buttons, now csv is calculated only if panel button clicked, see d24bc27

@bobrik
Copy link
Author

bobrik commented Oct 29, 2013

@rashidkpc you're right, I updated request.

@bobrik
Copy link
Author

bobrik commented Oct 31, 2013

Changed pre to textarea, now cmd+a works as expected — selecting csv instead of selecting the whole page.

@bobrik
Copy link
Author

bobrik commented Nov 1, 2013

@rashidkpc is there anything else that should be fixed?

@pprpst
Copy link

pprpst commented Feb 28, 2014

Hi Guys,

Export is something I really need before setting up on production.
I have latest version of Kibana, and this is not included. Any idea when it will be included in official release ?
Or maybe anyone can instruct me how to deploy this "PATH" on my working setup ? ... I'm quite new in this ...

@pprpst
Copy link

pprpst commented Mar 5, 2014

Thanks guys !
I used "git" and "curl" to apply patch on kibana main.
Works fine. Great work with this CVS export.

@cdeck
Copy link

cdeck commented Mar 19, 2014

@bobrik : I tried to patch using this pull request and was unsuccessful (using the instructions you provided a few comments ago). Did a Kibana master change create a conflict?

@tkuther
Copy link

tkuther commented Mar 19, 2014

Just use git, like

git clone https:/Topface/kibana
cd kibana
git remote add upstream https:/elasticsearch/kibana
git fetch upstream
git checkout csv-export
git merge upstream/master

@cdeck
Copy link

cdeck commented Mar 19, 2014

@tkuther : Thanks - I'm obviously not git-savvy. :)

@bobrik
Copy link
Author

bobrik commented Mar 20, 2014

@cdeck

git clone https:/Topface/kibana -b csv-export

Use this to get clean up-to-date version of csv-export branch. Kibana development is pretty slow, therefore it shouldn't be too far away from master.

@daniilyar
Copy link

awesome! Much appreciated!

@swb13
Copy link

swb13 commented Mar 24, 2014

This is excellent, and efficient, as it reformats what Kibana has already retrieved. Thank you.

In my organization I'd say that most people are looking for a way to capture a few events/messages from the table and paste them into an e-mail or document as text. CSV export is a slightly indirect, but effective way of adding this capability.

@dumip
Copy link

dumip commented May 4, 2014

This feature should be part of the Kibana main branch. Even if it might not be implemented in the most optimal manner, it is a lot, lot better that nothing!

Thank you @bobrik for your work!

@blysik
Copy link

blysik commented May 27, 2014

Any chance this can make it into the main kibana release?

@rameyst
Copy link

rameyst commented May 29, 2014

Hi all - i'd like to use this add on, however, using the cloning instructions above, kibana throws an error message about using the latest version of it - it suggests to download the latest version from their website and not to clone it.

any idea how i can merge this add on with the latest release of kibana?

--git newbiie

@orangey
Copy link

orangey commented May 29, 2014

With ISO8601 timestamps it is always much nicer to include sub-seconds and a timezone indicator; systems usually do more than one thing a second and many operate in numerous timezones, for example in UTC: 2014-05-29T15:41:42.005Z

@linux-devil
Copy link

Really wonderful thanks , I was told to this task in my organisation , only problem is how to download complete document object

@mweltman
Copy link

Great work! One minor comment: I think you will need to escape double-quotes in the values.

@Pytlicek
Copy link

Pytlicek commented Aug 1, 2014

Hello. Great work 👍
Please it is possible to add CSV export support to multifieldhistogram panel ( #1296 ) ?
Many users using this awesome panel but without your extension it is bad to export values.

I tried to change code on mulfifieldhistogram but without cuccess :(
I'm not the programmer. Please if you have some time please look at this panel. Many thanks. Tomas

@richyyy
Copy link

richyyy commented Aug 7, 2014

I already have Kibana in my Linux, however when I try to clone and curl the cmd as shown on the above comments. There was errors in curling the file, and my kibana did not appear to have the download button. Anyone knows whats going on?

@german23
Copy link

german23 commented Aug 8, 2014

Thumbs Up for this great work! Hopefully it will get to the next main release.

@SuperveS
Copy link

Guys,

can anyone please describe shortly how to download and get the CSV export enhancement working on windows?

Thanks,
Newbie

@w33ble w33ble closed this Oct 6, 2014
@spalger
Copy link
Contributor

spalger commented Oct 6, 2014

Woops! Sorry about that! We recently replaced the master branch with Kibana 4. This action force closed all of the old pull requests against master. We will be reviewing these on a case-by-case basis and creating new tickets as necessary.

The good news is that many long requested features can be found in Kibana 4, and we're being entirely open about our roadmap. Check out the roadmap tickets (which we're still filling in) here.

If you're looking for the old Kibana 3 code you can find it here.

@w33ble
Copy link
Contributor

w33ble commented Oct 7, 2014

CSV export is available in Kibana 4 now, so I'm going to leave this closed - thanks for the contribution

@ssoto
Copy link

ssoto commented Jan 28, 2015

It is amazing how some people try to "privatize" an open source project.
Thank you @bobrik and others for your effort.

kibanaco added a commit to kibana-community/kibana3 that referenced this pull request Mar 26, 2015
@kibanaco
Copy link

I merged and tested this for this fork of kibana3: https:/kibana-community/kibana3
I'll try to keep pulling other kibana 3 community improvements into that single tracking package.

w33ble pushed a commit to w33ble/kibana that referenced this pull request Sep 13, 2018
* Changed FileUpload to stateless component. Added EuiFilePicker Removed unused handlers

* Added EUI to imageUpload and changed upload handler to match EUI. Updated imageUpload styles.

* Bug fix: Added Math.floor to count in repeatImage

* Cleaned up styles for imageUpload

* Added checkered background to image preview

* Added EuiLoadingSpinner and EuiIcon to Loading component

* Removed grid view

* Removed grid render function

* Moved css from main to hackery

* Fixed merge conflict

* Fixed spacing in imageUpload and loading components

* Fixed imageUpload.js

* Added variable to image_upload.less

* Added reference to less variables in image_upload.less

* Fixed css for when no image preview is available
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.