1313import com .grafana .foundation .common .VizLegendOptionsBuilder ;
1414import com .grafana .foundation .common .VizOrientation ;
1515import com .grafana .foundation .dashboard .DataSourceRef ;
16- import com .grafana .foundation .gauge .GaugeBuilder ;
17- import com .grafana .foundation .logs .LogsBuilder ;
16+ import com .grafana .foundation .gauge .GaugePanelBuilder ;
17+ import com .grafana .foundation .logs .LogsPanelBuilder ;
1818import com .grafana .foundation .prometheus .PromQueryFormat ;
19- import com .grafana .foundation .timeseries .TimeseriesBuilder ;
19+ import com .grafana .foundation .timeseries .TimeseriesPanelBuilder ;
2020
2121public class Common {
2222
@@ -35,20 +35,20 @@ public static Builder<Dataquery> tablePrometheusQuery(String query, String ref)
3535 .legendFormat (PromQueryFormat .TABLE .Value ()).refId (ref );
3636 }
3737
38- public static TimeseriesBuilder defaultTimeSeries () {
39- return new TimeseriesBuilder ().lineWidth (1.0 ).fillOpacity (10.0 ).drawStyle (GraphDrawStyle .LINE )
38+ public static TimeseriesPanelBuilder defaultTimeSeries () {
39+ return new TimeseriesPanelBuilder ().lineWidth (1.0 ).fillOpacity (10.0 ).drawStyle (GraphDrawStyle .LINE )
4040 .showPoints (VisibilityMode .NEVER ).legend (new VizLegendOptionsBuilder ().showLegend (true )
4141 .placement (LegendPlacement .BOTTOM ).displayMode (LegendDisplayMode .LIST ));
4242 }
4343
44- public static LogsBuilder defaultLogs () {
45- return new LogsBuilder ().span (24 )
44+ public static LogsPanelBuilder defaultLogs () {
45+ return new LogsPanelBuilder ().span (24 )
4646 .datasource (new DataSourceRef ("loki" , "grafana-cloud-logs" )).showTime (true ).enableLogDetails (true )
4747 .sortOrder (LogsSortOrder .DESCENDING ).wrapLogMessage (true );
4848 }
4949
50- public static GaugeBuilder defaultGauge () {
51- return new GaugeBuilder ().orientation (VizOrientation .AUTO )
50+ public static GaugePanelBuilder defaultGauge () {
51+ return new GaugePanelBuilder ().orientation (VizOrientation .AUTO )
5252 .reduceOptions (new ReduceDataOptionsBuilder ().calcs (List .of ("lastNotNull" )).values (false ));
5353 }
5454}
0 commit comments