mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
* Add new query mode picker with different states for each query. Also really simple migration script * Populate cross resource dropdowns * Cleanup. Handle change events * Add multi select picker for subscriptions * Fix markup issue * Prepare for new query mode * More cleanup * Handle multiple queries both in ds and backend * Refactoring * Improve migration * Add support for multiselect display name * Use multiselect also for locations and resources * Add more typings * Fix migrations * Custom multiselect built for array of options instead of variables * Add url builder test * fix datasource tests * UI fixes * Improve query editor init * Fix brokens tests * Cleanup * Fix tslint issue * Change query mode display name * Make sure alerting works for single queries * Friendly error for multi resources * Add temporary typings
16 lines
404 B
TypeScript
16 lines
404 B
TypeScript
import { AzureMonitorQueryCtrl } from './query_ctrl';
|
|
|
|
export function migrateTargetSchema(target: any) {
|
|
if (target.azureMonitor && !target.azureMonitor.data) {
|
|
const temp = { ...target.azureMonitor };
|
|
target.azureMonitor = {
|
|
queryMode: AzureMonitorQueryCtrl.defaultQueryMode,
|
|
data: {
|
|
[AzureMonitorQueryCtrl.defaultQueryMode]: temp,
|
|
},
|
|
};
|
|
}
|
|
|
|
return target;
|
|
}
|