protected async override Task OnExecuteQuery() { // Get tag keys from the server var tagKeys = await InfluxDbClient.GetTagKeysAsync(Database, Measurement); if (tagKeys == null || tagKeys.Count() == 0) { return; } // Add default row count column listView.Columns.Add(new ColumnHeader() { Text = "#" }); // Add tag key column listView.Columns.Add(new ColumnHeader() { Text = "tagKey" }); // Add values var rowCount = 0; foreach (var tagKey in tagKeys) { listView.Items.Add(new ListViewItem(new string[] { (++rowCount).ToString(), tagKey }) { Tag = tagKey }); } }
protected async override Task OnExecuteQuery() { // Fetch tag keys if the drop down has not yet been populated if (tagKeysComboBox.Items.Count == 0) { // Get the current list of tag keys for the measurement var tagKeys = await InfluxDbClient.GetTagKeysAsync(Database, Measurement); if (tagKeys != null && tagKeys.Count() > 0) { foreach (var tag in tagKeys) { tagKeysComboBox.Items.Add(tag); } tagKeysComboBox.SelectedItem = tagKeys.First(); } } else { await BindTagValues(); } }