This would solve the remaining issues in bug 1060313: * broken link back from the log viewer to the main view * broken link from perfherder to the main view
It turns out web-server.js actually came from here: https://github.com/angular/angular-phonecat/commits/master/scripts/web-server.js ...rather than the previous place we thought it came from. They've since deleted the file, so I don't see any harm in us modifying our own copy as we see fit. I've looked into alternatives available on npm and they all have third party dependencies, so aren't as convenient for just checking into the repo.
Created attachment 8611164 [details] [review] Serve index.html by default, if present
Assignee: nobody → emorley
Attachment #8611164 - Flags: review?(mdoglio)
Summary: web-server.js should redirect '/' to '/index.html' → web-server.js should serve index.html by default when accessing a directory
Attachment #8611164 - Flags: review?(mdoglio) → review+
Commits pushed to master at https://github.com/mozilla/treeherder https://github.com/mozilla/treeherder/commit/eb6fe42ba2b757d7135a6fadccd0da35c24b4184 Bug 1168770 - web-server.js: Move directory handling to its own function Since we're about to add index.html support on top. https://github.com/mozilla/treeherder/commit/ae98e9d85943b579fdeb0f338388874fe22507c9 Bug 1168770 - web-server.js: Serve index.html by default, if present Instead of always displaying the directory file listing, if index.html is present we serve that instead. This not only fixes the remaining broken URLs when using web-server.js, but also means people can click the "Starting web server at <URL>" link in the console and immediately see Treeherder, without having to then manually navigate to index.html themselves.
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.