27 references to InstrumentViewModel
Aspire.Dashboard (25)
Components\Controls\Chart\ChartBase.cs (19)
73InstrumentViewModel.DataUpdateSubscriptions.Add(OnInstrumentDataUpdate); 79InstrumentViewModel.Instrument is null || 80InstrumentViewModel.MatchedDimensions is null || 93var dimensionAttributes = InstrumentViewModel.MatchedDimensions.Select(d => d.Attributes).ToList(); 94if (_renderedInstrument is null || _renderedInstrument != InstrumentViewModel.Instrument.GetKey() || 96_renderedTheme != InstrumentViewModel.Theme || 97_renderedShowCount != InstrumentViewModel.ShowCount) 100_renderedInstrument = InstrumentViewModel.Instrument.GetKey(); 102_renderedTheme = InstrumentViewModel.Theme; 103_renderedShowCount = InstrumentViewModel.ShowCount; 203return $"<b>{HttpUtility.HtmlEncode(InstrumentViewModel.Instrument?.Name)}</b><br />{HttpUtility.HtmlEncode(name)}: {FormatHelpers.FormatNumberWithOptionalDecimalPlaces(yValue, maxDecimalPlaces: 6, CultureInfo.CurrentCulture)}<br />Time: {FormatHelpers.FormatTime(TimeProvider, TimeProvider.ToLocal(xValue))}"; 490Debug.Assert(InstrumentViewModel.MatchedDimensions != null); 491Debug.Assert(InstrumentViewModel.Instrument != null); 493var unit = !InstrumentViewModel.ShowCount 494? GetDisplayedUnit(InstrumentViewModel.Instrument) 500if (InstrumentViewModel.Instrument?.Type != OtlpInstrumentType.Histogram || InstrumentViewModel.ShowCount) 502(traces, xValues, exemplars) = CalculateChartValues(InstrumentViewModel.MatchedDimensions, GraphPointCount, tickUpdate, inProgressDataTime, unit); 509(traces, xValues, exemplars) = CalculateHistogramValues(InstrumentViewModel.MatchedDimensions, GraphPointCount, tickUpdate, inProgressDataTime, unit);
Components\Controls\Chart\MetricTable.razor.cs (5)
52if (!Equals(_instrument?.Name, InstrumentViewModel.Instrument?.Name) || _showCount != InstrumentViewModel.ShowCount) 59_instrument = InstrumentViewModel.Instrument; 60_showCount = InstrumentViewModel.ShowCount; 100Instrument = InstrumentViewModel.Instrument!
Components\Controls\Chart\PlotlyChart.razor.cs (1)
44if (InstrumentViewModel?.Instrument is { } instrument)
Aspire.Dashboard.Components.Tests (2)
Controls\PlotlyChartTests.cs (2)
33builder.Add(p => p.InstrumentViewModel, model); 84builder.Add(p => p.InstrumentViewModel, model);