Skip to content
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

Add UX documentation, link into the apiserver, add a missing file. #1598

Merged
merged 1 commit into from
Oct 7, 2014

Conversation

brendandburns
Copy link
Contributor

No description provided.

mux.HandleFunc(prefix, handleStaticFiles)
}

func handleStaticFiles(res http.ResponseWriter, req *http.Request) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this do something not done by http://golang.org/pkg/net/http/#FileServer?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, the files are compiled into the server in go code, so it is still a single monolithic binary, instead of a bunch of files.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fwiw, I could use an additional third party package that introduces an addition virtual file driver (https://github.com/elazarl/go-bindata-assetfs)

Let me know if you prefer that.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But why not still use a FileServer with a custom implementation of http://golang.org/pkg/net/http/#FileSystem?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking a bit more... what is the reason for using this go-bindata thing? It makes building more painful? (and yes the assetfs thing is much preferable to this method)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, switched to assetfs.

gobindata is useful because it means we don't have to worry about shipping the javascript/css/html separate from the server binary.

@lavalamp
Copy link
Member

lavalamp commented Oct 6, 2014

Do we have a team member good with html/css/js to review these things?

@brendandburns
Copy link
Contributor Author

Comments addressed. @vmarmol has some js/CSS experience.

@vmarmol
Copy link
Contributor

vmarmol commented Oct 7, 2014

Looks good as is, but I'm guessing 95% of the interesting stuff is in the data file I can't see :)

@brendandburns
Copy link
Contributor Author

Datafile is actually generated from the assets in the www directory, so you can introspect those.

Comments addressed, ptal.

Thanks!
--brendan

}

func InstallSupport(mux MuxInterface) {
fileServer := http.FileServer(&assetfs.AssetFS{Asset: Asset, AssetDir: AssetDir, Prefix: "www"})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much cleaner, thanks for changing

@lavalamp
Copy link
Member

lavalamp commented Oct 7, 2014

LGTM

1 similar comment
@smarterclayton
Copy link
Contributor

LGTM

smarterclayton added a commit that referenced this pull request Oct 7, 2014
Add UX documentation, link into the apiserver, add a missing file.
@smarterclayton smarterclayton merged commit 897c59a into kubernetes:master Oct 7, 2014
@eparis
Copy link
Contributor

eparis commented Oct 8, 2014

Did this just add a new Godeps without updating Godeps/Godeps.json ??

@brendandburns
Copy link
Contributor Author

Oops, that's my bad. I will clean that up.

Sorry!
Brendan
On Oct 8, 2014 8:48 AM, "Eric Paris" notifications@github.com wrote:

Did this just add a new Godeps without updating Godeps/Godeps.json ??


Reply to this email directly or view it on GitHub
#1598 (comment)
.

@eparis
Copy link
Contributor

eparis commented Oct 8, 2014

Well, I'll stop looking at it :)

@lavalamp
Copy link
Member

lavalamp commented Oct 8, 2014

Argh, sorry, I was going to ask for that new dep in a separate commit but I got distracted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants