in grafana/templates/custom.js [25:53]
function Custom(opts) {
opts = opts || {};
this.state = {
allFormat: 'glob',
current: {},
datasource: null,
includeAll: false,
allValue: '',
name: 'template',
options: [],
query: null,
refresh: 1,
'refresh_on_load': false,
type: 'custom'
};
this.defaultValue = '';
// Overwrite defaults with custom values
Object.keys(opts).forEach(key => {
switch (key) {
case 'defaultValue':
this.defaultValue = opts[key];
break;
default:
this.state[key] = opts[key];
}
});
this._processOptions();
}