-
-
Notifications
You must be signed in to change notification settings - Fork 8
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
Add single button for export all panels #56
Conversation
src/module.ts
Outdated
const exportTable = _.keyBy(exportPanels, 'datasource'); | ||
datasources = (datasources as {name: string}[]) | ||
.reduce((result, item) => { | ||
if (exportTable[item.name]) { |
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.
if (exportTable[item.name]) { | |
if(exportTable[item.name]) { |
also, it's inside the reduce callback so I guess you'd want to move it 2 spaces righter
src/module.ts
Outdated
datasources = await this.backendSrv.get(`/api/datasources`) ; | ||
|
||
const exportTable = _.keyBy(exportPanels, 'datasource'); | ||
datasources = (datasources as {name: string}[]) |
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.
is datasources
object or array? because a couple of lines ago you initialize it with {}
src/partials/module.html
Outdated
@@ -48,5 +48,13 @@ | |||
</tr> | |||
</tbody> | |||
</table> | |||
<button class="btn gf-form-btn btn-primary" | |||
id="export-button" | |||
ng-if="!!ctrl.panels.length" |
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.
ctrl.panels.length > 0
looks more intuitive, but maybe it's just for me
Added button for export all from export panel #42
When you click the "Export all" button a task is created for each exported panel
Changes
Send many panels to the exporter, instead of one, as it was before
Small types refactoring