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
Conversation
- Move export csv options to modal dialog
@@ -0,0 +1,32 @@ | |||
<div class="modal-body" ng-controller="ExportCsvModalCtrl"> |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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>', |
There was a problem hiding this comment.
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..
Ok like this? cheers |
This is not available yet in 4.3.2 version. Will be available in next release? |
@fmcmarques yes, it is in the 4.4.0 milestone which should be released in the next few weeks. |
is documented? |
Move csv export options to modal dialog and add the ability to specify the date time format too.
Fixes #8058