blob: b5801aac2cc5d0aebf25d9e07edc6b959d58cd20 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>ChromeOS Launch Bugs go/launchbugs </title>
</head>
<body >
<script>
// Read the parameters passed to the url
function GetURLParameter(sParam) {
var sPageURL = window.location.search.substring(1);
var sURLVariables = sPageURL.split('&');
for (var i = 0; i < sURLVariables.length; i++) {
var sParameterName = sURLVariables[i].split('=');
if (sParameterName[0] == sParam) {
return sParameterName[1];
}
}
}
var base_url = 'https://launch.corp.google.com/launches?'
//Add milestone and TE to launch url and redirect to it
function UpdateUrlsWithMilestone(milestone, te, team) {
var src = base_url.concat('&q=calendarId:2197 status:current "Stable Target Milestone":"<milestone>" <TE>')
src = src.replace(/<milestone>/g, milestone)
if (!team){
if (!te) {
console.log('No te')
src = src.replace(/<TE>/g, "")
}
else {
console.log('Replace te')
src = src.replace(/<TE>/g, '"te":"'+te+'"')
}
}
else{
console.log('Team found, overrides TE')
src = src.replace(/<TE>/g, team)
}
window.location.replace(src);
}
var m = GetURLParameter('m')
var te = GetURLParameter('te')
//Add use of team variables
var team = GetURLParameter('team')
if (team && team.toLowerCase() == "corex"){
team = '\"te\":(\"dhaddock\" OR \"kyleshima\" OR \"hyungtaekim\" OR \"awendy\")'
}
if (te == "new") {
console.log('te = new url')
window.location.replace(base_url.concat('&q=calendarId:2197 status:current te:NULL'))
}
else if (!m) {
console.log('Error: No milestone supplied.')
window.location.replace(base_url.concat('&q=calendarId:2197 status:current'))
}
else {
UpdateUrlsWithMilestone(m, te, team)
}
</script>
</body>
</html>