forked from kubeflow/katib
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add ui Signed-off-by: YujiOshima <[email protected]> * add ui Signed-off-by: YujiOshima <[email protected]> * update test and doc Signed-off-by: YujiOshima <[email protected]> * fix test Signed-off-by: YujiOshima <[email protected]> * fix test Signed-off-by: YujiOshima <[email protected]> * fix test Signed-off-by: YujiOshima <[email protected]> * remove modelDB Signed-off-by: YujiOshima <[email protected]> * fix test Signed-off-by: YujiOshima <[email protected]> * refactor Signed-off-by: YujiOshima <[email protected]> * add loading img Signed-off-by: YujiOshima <[email protected]> * fix test Signed-off-by: YujiOshima <[email protected]> * Add loading image Signed-off-by: YujiOshima <[email protected]> * refactor Signed-off-by: YujiOshima <[email protected]> * add root redirection Signed-off-by: YujiOshima <[email protected]> * add latestLog flag to GetWorkerFullInfo Signed-off-by: YujiOshima <[email protected]> * fix test Signed-off-by: YujiOshima <[email protected]>
- Loading branch information
1 parent
7eeea12
commit 0bc5182
Showing
111 changed files
with
16,727 additions
and
38,039 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
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
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,12 @@ | ||
FROM golang:alpine AS build-env | ||
# The GOPATH in the image is /go. | ||
ADD . /go/src/github.com/kubeflow/katib | ||
WORKDIR /go/src/github.com/kubeflow/katib/cmd/ui | ||
RUN go build -o katib-ui | ||
|
||
FROM alpine:3.7 | ||
WORKDIR /app | ||
COPY --from=build-env /go/src/github.com/kubeflow/katib/cmd/ui/katib-ui /app/ | ||
COPY cmd/ui/static /static | ||
COPY cmd/ui/template /template | ||
ENTRYPOINT ["./katib-ui"] |
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,33 @@ | ||
package main | ||
|
||
import ( | ||
"github.com/kubeflow/katib/pkg/ui" | ||
"github.com/pressly/chi" | ||
"net/http" | ||
) | ||
|
||
func main() { | ||
r := chi.NewRouter() | ||
kuh := ui.NewKatibUIHandler() | ||
r.Route("/", func(r chi.Router) { | ||
r.Get("/", func(writer http.ResponseWriter, req *http.Request) { | ||
http.Redirect(writer, req, "/katib", http.StatusMovedPermanently) | ||
}) | ||
r.Handle("/static/*", http.StripPrefix("/static/", http.FileServer(http.Dir("/static")))) | ||
r.Route("/katib", func(r chi.Router) { | ||
r.Get("/", kuh.Index) | ||
r.Route("/{studyid}", func(r chi.Router) { | ||
r.Get("/", kuh.Study) | ||
r.Get("/csv", kuh.StudyInfoCsv) | ||
r.Route("/TrialID/{trialid}", func(r chi.Router) { | ||
r.Get("/", kuh.Trial) | ||
}) | ||
r.Route("/WorkerID/{workerid}", func(r chi.Router) { | ||
r.Get("/", kuh.Worker) | ||
r.Get("/csv", kuh.WorkerInfoCsv) | ||
}) | ||
}) | ||
}) | ||
}) | ||
http.ListenAndServe(":80", r) | ||
} |
Oops, something went wrong.