private async Task RemoveDashboardAsync(V1NeonDashboard dashboard) { await SyncContext.Clear; Dashboards.Remove( Dashboards.Where( d => d.Id == dashboard.Name())?.First()); }
private async Task AddDashboardAsync(V1NeonDashboard dashboard) { await SyncContext.Clear; if (string.IsNullOrEmpty(dashboard.Spec.DisplayName)) { dashboard.Spec.DisplayName = dashboard.Name(); } Dashboards.Add( new Dashboard( id: dashboard.Name(), name: dashboard.Spec.DisplayName, url: dashboard.Spec.Url, displayOrder: dashboard.Spec.DisplayOrder)); }