(api *netdataapi.API, env EmitEnv, chartID string, meta chartengine.ChartMeta, obsolete bool)
| 26 | } |
| 27 | |
| 28 | func emitChart(api *netdataapi.API, env EmitEnv, chartID string, meta chartengine.ChartMeta, obsolete bool) { |
| 29 | opts := "" |
| 30 | if obsolete { |
| 31 | opts = "obsolete" |
| 32 | } |
| 33 | api.CHART(netdataapi.ChartOpts{ |
| 34 | TypeID: sanitizeWireID(env.TypeID), |
| 35 | ID: sanitizeWireID(chartID), |
| 36 | Name: "", |
| 37 | Title: sanitizeWireValue(meta.Title), |
| 38 | Units: sanitizeWireValue(meta.Units), |
| 39 | Family: sanitizeWireValue(meta.Family), |
| 40 | Context: sanitizeWireValue(meta.Context), |
| 41 | ChartType: string(meta.Type), |
| 42 | Priority: meta.Priority, |
| 43 | UpdateEvery: env.UpdateEvery, |
| 44 | Options: opts, |
| 45 | Plugin: sanitizeWireValue(env.Plugin), |
| 46 | Module: sanitizeWireValue(env.Module), |
| 47 | }) |
| 48 | } |
| 49 | |
| 50 | func emitChartLabels(api *netdataapi.API, env EmitEnv, chartLabels map[string]string) { |
| 51 | chartKeys := make([]string, 0, len(chartLabels)) |
no test coverage detected
searching dependent graphs…