Git Product home page Git Product logo

Comments (8)

highkeep avatar highkeep commented on May 20, 2024 1

Not the greatest workaround, but I didn't have time to look for a better working solution at the moment. I personally left in the original for backwards compatibility. Regardless, it does look like rows are being fazed out.

type dashContainer struct {
	Dashboard Dashboard // This seemed to make more sense to me.
	Meta      struct {
		Slug string
	}
}

func (dc dashContainer) NewDashboard(variables url.Values) Dashboard {
	var dash Dashboard
	dash.Title = sanitizeLaTexInput(dc.Dashboard.Title)
	dash.Description = sanitizeLaTexInput(dc.Dashboard.Description)
	dash.VariableValues = sanitizeLaTexInput(getVariablesValues(variables))

	if len(dc.Dashboard.Rows) == 0 {
		for _, p := range dc.Dashboard.Panels {
			p.Title = sanitizeLaTexInput(p.Title)
			dash.Panels = append(dash.Panels, p)
		}
		return dash
	}
	for _, row := range dc.Dashboard.Rows {
		row.Title = sanitizeLaTexInput(row.Title)
		dash.Rows = append(dash.Rows, row)
		for _, p := range dc.Dashboard.Panels {
			p.Title = sanitizeLaTexInput(p.Title)
			dash.Panels = append(dash.Panels, p)
		}
	}
        return dash
}

from reporter.

IzakMarais avatar IzakMarais commented on May 20, 2024

Nope, sorry. I have not checked yet.

A PR would be welcome. I wonder what would be the best approach to handle such a breaking change? One could release a new version that only works with 5.0 and have the old version work with pre 5.0 grafana. Or it could support both via a grafana-version flag...

from reporter.

h4cc avatar h4cc commented on May 20, 2024

Does not work fully. The PNGs seem to be downloaded, but are not displayed in the generated PDF.

from reporter.

IzakMarais avatar IzakMarais commented on May 20, 2024

I just downloaded grafana 5.0 and tested against the latest master of grafana-reporter. Everything seems to work fine. Closing this issue until I get some concrete examples to the opposite.

from reporter.

IzakMarais avatar IzakMarais commented on May 20, 2024

Hmm from the docs I see:

New uid-based routes in the dashboard API have been introduced to retrieve and delete dashboards. The corresponding slug-based routes have been deprecated and will be removed in a future release.

Will see if I can support the new API, to avoid nasty surprises in a future release when the deprectation happens.

from reporter.

IzakMarais avatar IzakMarais commented on May 20, 2024

Regardless, it does look like rows are being fazed out.

Yes and this type of solution for supporting both seems to be required, since old imported dashboards still return rows when fetched via the new API Grafana 5.

from reporter.

IzakMarais avatar IzakMarais commented on May 20, 2024

Dashboard Dashboard // This seemed to make more sense to me.

I missed this bug (was introduced in a recent PR). Luckily it seems harmless. Fixed it now while making the other changes.

from reporter.

IzakMarais avatar IzakMarais commented on May 20, 2024

The v2.0.0 release addresses this issue.

https://github.com/IzakMarais/reporter/releases/tag/v2.0.0

from reporter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.