bosun.org@v0.0.0-20210513094433-e25bc3e69a1f/cmd/bosun/web/static/js/linkService.ts (about) 1 /// <reference path="0-bosun.ts" /> 2 3 class LinkService implements ILinkService { 4 public GetEditSilenceLink(silence: any, silenceId: string) : string { 5 if (!(silence && silenceId)) { 6 return ""; 7 } 8 9 var forget = silence.Forget ? '&forget': ''; 10 return "/silence?start=" + this.time(silence.Start) + 11 "&end=" + this.time(silence.End) + 12 "&alert=" + silence.Alert + 13 "&tags=" + encodeURIComponent(silence.TagString) + 14 forget + 15 "&edit=" + silenceId; 16 } 17 18 private time(v: any) { 19 var m = moment(v).utc(); 20 return m.format(); 21 } 22 } 23 24 bosunApp.service("linkService", LinkService);