1 write to Instrument
Aspire.Dashboard (1)
Model\InstrumentViewModel.cs (1)
42Instrument = instrument;
24 references to Instrument
Aspire.Dashboard (19)
Components\Controls\Chart\ChartBase.cs (15)
93InstrumentViewModel.Instrument is null || 116if (_renderedInstrument is null || _renderedInstrument != InstrumentViewModel.Instrument.GetKey() || 117_renderedInstrumentUnit != InstrumentViewModel.Instrument.Unit || 118_renderedInstrumentType != InstrumentViewModel.Instrument.Type || 119_renderedInstrumentIsMonotonic != InstrumentViewModel.Instrument.IsMonotonic || 126_renderedInstrument = InstrumentViewModel.Instrument.GetKey(); 127_renderedInstrumentUnit = InstrumentViewModel.Instrument.Unit; 128_renderedInstrumentType = InstrumentViewModel.Instrument.Type; 129_renderedInstrumentIsMonotonic = InstrumentViewModel.Instrument.IsMonotonic; 186return $"<b>{HttpUtility.HtmlEncode(InstrumentViewModel.Instrument?.Name)}</b><br />{HttpUtility.HtmlEncode(name)}: {FormatHelpers.FormatNumberWithOptionalDecimalPlaces(yValue, maxDecimalPlaces: 6, CultureInfo.CurrentCulture)}<br />Time: {FormatHelpers.FormatTime(TimeProvider, xValue)}"; 196Debug.Assert(InstrumentViewModel.Instrument != null); 199? GetDisplayedUnit(InstrumentViewModel.Instrument) 202var showChangePerInterval = ChartDataCalculator.IsMonotonicCounter(InstrumentViewModel.Instrument) && !InstrumentViewModel.ShowRunningTotal; 212if (InstrumentViewModel.Instrument?.Type != OtlpInstrumentType.Histogram || InstrumentViewModel.ShowCount) 224var increases = calculator.CalculateCounterIncreaseValues(InstrumentViewModel.MatchedDimensions, _currentDataStartTime, InstrumentViewModel.Instrument!.AggregationTemporality);
Components\Controls\Chart\MetricTable.razor.cs (3)
50if (!Equals(_instrument?.Name, InstrumentViewModel.Instrument?.Name) || _showCount != InstrumentViewModel.ShowCount) 57_instrument = InstrumentViewModel.Instrument; 105Instrument = InstrumentViewModel.Instrument!
Components\Controls\Chart\PlotlyChart.razor.cs (1)
47if (InstrumentViewModel?.Instrument is { } instrument)
Aspire.Dashboard.Components.Tests (5)
Pages\MetricsTests.cs (5)
177var instrument = instrumentViewModel.Instrument; 269Assert.NotNull(instrumentViewModel.Instrument); 276await instrumentViewModel.UpdateDataAsync(instrumentViewModel.Instrument!, instrumentViewModel.MatchedDimensions!, hasOverflow: false); 316Assert.Same(instrumentViewModel.Instrument, dialog.Instrument); 744Assert.Equal("instrument-2", updatedTable.Instance.InstrumentViewModel.Instrument?.Name);