CorpGlory / types-grafana

MIT License
9 stars 22 forks source link

Missing mergeTablesIntoModel function #21

Closed ljbade closed 3 years ago

ljbade commented 3 years ago

The function defition for mergeTablesIntoModel is missing from https://github.com/CorpGlory/types-grafana/blob/master/app/core/table_model.d.ts

For reference - https://github.com/grafana/grafana/blob/master/public/app/core/table_model.ts#L91

jonyrock commented 3 years ago

@ljbade we are ready to add that, but there could be small concerns regarding version of grafana. @rozetko what do you think?

ljbade commented 3 years ago

The reason I noticed this is that I was trying to get the world map plugin to correctly handle merging multiple Prometheus metrics similar to what is done by the native table view. This function is what is called by the table view.

rozetko commented 3 years ago

@jonyrock as far as I see, this function is added in grafana 6.1.6: https://github.com/grafana/grafana/commit/374fe9dcb4e3eb2bbf9818e68cd9300da3da2b87

We need to think of a way to differentiate types by grafana version, I guess. Alhough we can add it with a comment that it's only for Grafana 6.1.6

jonyrock commented 3 years ago

@rozetko but is the function still around? if it's in the last verion of grafana, then let's add it. I don't believe that we can handle the versions complexity at this moment fully

rozetko commented 3 years ago

@jonyrock yeah, it's still there, let's add it

jonyrock commented 3 years ago

@ljbade are you in the party? Would you make a PR ? :)

ljbade commented 3 years ago

Sure I can do that.

ljbade commented 3 years ago

Here you go - https://github.com/CorpGlory/types-grafana/pull/23