forked from grafana.jool/grafana-jool
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
451 B
18 lines
451 B
const JSURL = require('jsurl');
|
|
|
|
export interface AwsUrl {
|
|
end: string;
|
|
start: string;
|
|
timeType?: 'ABSOLUTE' | 'RELATIVE';
|
|
tz?: 'local' | 'UTC';
|
|
unit?: string;
|
|
editorString: string;
|
|
isLiveTail: boolean;
|
|
source: string[];
|
|
}
|
|
|
|
export function encodeUrl(obj: AwsUrl, region: string): string {
|
|
return `https://${region}.console.aws.amazon.com/cloudwatch/home?region=${region}#logs-insights:queryDetail=${JSURL.stringify(
|
|
obj
|
|
)}`;
|
|
}
|
|
|