-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle correctly not found errors in admin
and chooser
parts.
#1060
Merged
Merged
Changes from 3 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
86e4947
*handle correctly not found errors in `admin` part.
dsuhinin f522fa1
*adopt `chooser` part to use `not-found` page.
dsuhinin 0c54845
*fox integration tests. integrate `not-found` page into `chooser`.
dsuhinin caf22ef
Merge branch 'main' into dsuhinin/error-handling
dsuhinin ded0c37
*PR remarks.
dsuhinin c2c6ed9
Merge remote-tracking branch 'origin/dsuhinin/error-handling' into ds…
dsuhinin 4b0ab8b
*linter remarks.
dsuhinin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package controller | ||
|
||
import ( | ||
"github.com/gofiber/fiber/v2" | ||
) | ||
|
||
// NotFoundError renders Not Found error page. | ||
func (c Controller) NotFoundError(ctx *fiber.Ctx) error { | ||
return ctx.Render("errors/not-found", fiber.Map{}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>FastTrackML</title> | ||
<link rel="stylesheet" href="/static/chooser/static/css/simple.min.css"> | ||
<link rel="stylesheet" href="/static/aim/assets/icomoon/icomoonIcons.css"> | ||
<link rel="icon" type="image/x-icon" href="/static/chooser/static/favicon.ico"> | ||
<style> | ||
:root { | ||
--accent: #00a4e0; | ||
} | ||
|
||
main { | ||
text-align: center; | ||
} | ||
|
||
.ui { | ||
display: grid; | ||
grid-template-columns: 1fr 1fr; | ||
column-gap: 2rem; | ||
} | ||
|
||
.logo { | ||
height: 150px; | ||
margin-top: -25px; | ||
margin-bottom: -50px; | ||
} | ||
|
||
#namespaces-list-container { | ||
display: flex; | ||
align-items: center; | ||
overflow:auto; | ||
border: 1px solid var(--border); | ||
border-radius: 5px; | ||
padding: 1rem; | ||
} | ||
|
||
#namespaces-list { | ||
flex-direction: column; | ||
align-items: first baseline; | ||
text-align: left; | ||
list-style-type: none; | ||
margin-left: auto; | ||
margin-right: auto; | ||
} | ||
|
||
#current-namespace { | ||
margin-left: -1.3em; | ||
position: relative; | ||
} | ||
|
||
#current-icon { | ||
position: relative; | ||
left: -1.5em; | ||
} | ||
|
||
</style> | ||
</head> | ||
|
||
<body> | ||
<header> | ||
<picture> | ||
<source media="(prefers-color-scheme: dark)" srcset="/static/chooser/static/media/logo-dark.svg"> | ||
<img class="logo" src="/static/chooser/static/media/logo-light.svg" alt="FastTrackML logo"> | ||
</picture> | ||
<p>A <i>very fast</i> experiment tracker</p> | ||
</header> | ||
|
||
<!-- We load the UI with JS to avoid issues when an URL with embedded credentials is used --> | ||
<main> | ||
{{ embed }} | ||
suprjinx marked this conversation as resolved.
Show resolved
Hide resolved
|
||
</main> | ||
|
||
<footer> | ||
<p>Brought to you by <a href="https://opensource.gresearch.co.uk" target="_blank">G-Research Open-Source</a>. | ||
</p> | ||
</footer> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<p>Which UI do you want to use?</p> | ||
<div class="ui"> | ||
<article> | ||
<a href="#" onclick="window.location = window.location.origin + window.location.pathname + 'mlflow/'"> | ||
<button>Classic</button> | ||
</a> | ||
<p>This is the classic MLFlow UI, albeit fast and responsive.</p> | ||
</article> | ||
<article> | ||
<a href="#" onclick="window.location = window.location.origin + window.location.pathname + 'aim/'"> | ||
<button>Modern</button> | ||
</a> | ||
<p>This is the modern Aim UI, much faster than MLFlow.</p> | ||
</article> | ||
</div> | ||
<p>Selected namespace: | ||
<b> | ||
<u>{{.CurrentNamespace.DisplayName}}</u> | ||
</b> | ||
</p> | ||
|
||
<div id="namespaces-list-container"> | ||
<ul id="namespaces-list"> | ||
{{ range .Namespaces }} | ||
{{ if ne .DisplayName $.CurrentNamespace.DisplayName }} | ||
<li> | ||
<a href="#" onclick="window.location = window.location.origin + {{if eq .Code "default"}}'/'{{else}}'/ns/{{.Code}}/'{{end}}">{{.DisplayName}}</a> | ||
</li> | ||
{{ else }} | ||
<li class="selected-namespace"> | ||
<i id="current-icon" class="Icon__container icon-long-arrow-right"></i> | ||
<b id="current-namespace">{{$.CurrentNamespace.DisplayName}}</b> | ||
</li> | ||
{{ end }} | ||
{{ end }} | ||
</ul> | ||
</div> | ||
|
||
{{ if .IsAdmin }} | ||
<p> | ||
<a href="#" onclick="window.location = window.location.origin + '/admin/namespaces/'">Manage namespaces</a> | ||
</p> | ||
{{ end }} |
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/static/chooser/static
seems like one-too-manystatic
directories.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unfortunately this is how it should be handled. we have new routes
/chooser/namespaces
so we can't for example start with just achooser
for our static data because it will be a collision. I tried different ways and current one is the most working.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well at least the sources do not have
static/../static
path, but it seems like there'd be a way to avoid this url path.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let me try to play but Im not fully sure. we we can skip first
static
from/static/chooser/static/
, then it means that we have to mount routing to just/chooser
which won't work. means if we call/chooser/namespaces
, it wont work, because/chooser
will catch this call which is logical.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, a bit reorganised everything.