Skip to content

Commit

Permalink
Merge pull request kubernetes#10980 from alvaroaleman/fix-spyglass-cell
Browse files Browse the repository at this point in the history
Fix spyglass cell generation when using spyglass as primary viewer
  • Loading branch information
k8s-ci-robot authored Feb 7, 2019
2 parents b89f9f9 + fabe99e commit ac676aa
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions prow/cmd/deck/static/prow/prow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -529,19 +529,15 @@ function redraw(fz: FuzzySearch): void {
r.appendChild(cell.text(""));
}
if (spyglass) {
if (build.state == 'pending') {
let url = window.location.origin + '/view/prowjob/' + build.job + '/' +
build.build_id;
const buildIndex = build.url.indexOf('/build/');
if (buildIndex !== -1) {
const url = window.location.origin + '/view/gcs/' +
build.url.substring(buildIndex + '/build/'.length);
r.appendChild(createSpyglassCell(url));
} else if (build.url.includes('/view/')) {
r.appendChild(createSpyglassCell(build.url))
} else {
const buildIndex = build.url.indexOf('/build/');
if (buildIndex === -1) {
r.appendChild(cell.text(''));
} else {
let url = window.location.origin + '/view/gcs/' +
build.url.substring(buildIndex + '/build/'.length);
r.appendChild(createSpyglassCell(url));
}
r.appendChild(cell.text(''));
}
} else {
r.appendChild(cell.text(''));
Expand Down

0 comments on commit ac676aa

Please sign in to comment.