|
|
@ -37,6 +37,9 @@ export class Metric { |
|
|
|
export class MetricExpanded { |
|
|
|
export class MetricExpanded { |
|
|
|
private _targets: Target[]; |
|
|
|
private _targets: Target[]; |
|
|
|
constructor(public datasource: string, targets: any[]) { |
|
|
|
constructor(public datasource: string, targets: any[]) { |
|
|
|
|
|
|
|
if(targets.length > 1) { |
|
|
|
|
|
|
|
throw new Error('Multiple metrics are not supported currently'); |
|
|
|
|
|
|
|
} |
|
|
|
this._targets = targets.map(t => new Target(t)); |
|
|
|
this._targets = targets.map(t => new Target(t)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -55,4 +58,4 @@ export class MetricMap { |
|
|
|
this._cache.set(t.getHash(), t); |
|
|
|
this._cache.set(t.getHash(), t); |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|