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

Make csv export date time format configurable #8282

Closed
wants to merge 2 commits into from

Conversation

cederigo
Copy link
Contributor

@cederigo cederigo commented May 3, 2017

Move csv export options to modal dialog and add the ability to specify the date time format too.

Fixes #8058

screen shot 2017-05-03 at 17 34 44

screen shot 2017-05-03 at 16 55 03

- Move export csv options to modal dialog
@CLAassistant
Copy link

CLAassistant commented May 3, 2017

CLA assistant check
All committers have signed the CLA.

@@ -0,0 +1,32 @@
<div class="modal-body" ng-controller="ExportCsvModalCtrl">
Copy link
Member

@torkelo torkelo May 4, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are not using this style of angular any more, moving to components (directives), with controllers that are bound in specific way (so no scope hierarchy)

So do something like this:

this.publishAppEvent('show-modal', {
  templateHtml: '<data-export-modal data-list="dataList"></data-export-modal>',
  scope: { dataList: this.dataList  }
}); 

And then define a new data-export-modal component, use this for reference:
https://github.com/grafana/grafana/blob/master/public/app/core/components/help/help.ts
new to add the scope: {dataList: "="} binding to the directive declaration

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the review. Update follows

this.publishAppEvent('show-modal', {
src: 'public/app/features/dashboard/partials/exportCsvModal.html',
templateHtml: '<export-data-modal data="seriesList"></export-data-modal>',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I renamed it to export-data-modal because the prefix "data-" is stripped away during the directive name normalization: See: https://docs.angularjs.org/guide/directive#normalization

Same for the attribute "data". The attribute "data-list" would resolve to "list" in the directive..

@cederigo
Copy link
Contributor Author

Ok like this? cheers

@daniellee daniellee added this to the 4.4.0 milestone May 26, 2017
@daniellee
Copy link
Contributor

Thanks for fixing this! Sorry about the delay - we have been busy with the new Grafana release during the last week or so.

Merged the two commits manually.

Fixed by: f484b4c and ee0d015

Fixes #8058

@fmcmarques
Copy link

This is not available yet in 4.3.2 version. Will be available in next release?

@daniellee
Copy link
Contributor

@fmcmarques yes, it is in the 4.4.0 milestone which should be released in the next few weeks.

@MassimilianoCuccia
Copy link

is documented?
I tried and it works that adding .SSS for milliseconds

@ying-jeanne ying-jeanne added the pr/external This PR is from external contributor label Apr 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr/external This PR is from external contributor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature request] Configurable csv export datetime format
7 participants