Skip to content

Commit

Permalink
UI Refactor. Remove non-functioning base-path arg from dashboard. (#235)
Browse files Browse the repository at this point in the history
* Update .gitignore

* clean up head formatting, add meta description

* add default language, clean up formatting

* use more semantic html in dashboard and navbar

* remove empty template

* indentation tweak

* finish removing unused and empty preamble template

* more semantic footer html

* formatting tweaks

* replace normalize with modern-css-reset

* rename font file for clarity

* add utopia fluid type scales

* convert namespace_list to more semantic html

* start new styling

* groundwork for sidebar layout on namespace list page

* switch to grid

* iteration on namespace list

adds buttons and gridded namespaces

* sizing and spacing tweaks

* style sidebar elements

* class name clean up

* reflow namespaces list page in narrow window

* first iteration on search function

* handle multi-word searches and clearing search

* make search submit button work

* remove old namespace search script

* add glossary

* groundwork for new namespace and container semantics

* generalize nav styling

* finish up html overhaul for dashboard, namespace, and container

* first pass at styling dashboard header, secondary nav, and glossary

* compTable styling, misc style tweaks

* code block borders, misc style tweaks for dashboard

* tweak colors

* center "suggested changes"

* update presentation of namespace hierarchy's subtitles/labels

* collapse all but first deployment

* Minor consistency tweaks, add note for later

* switch to rem-based version of utopia

* fix safari resize font scaling bug

* add missing headings in reset

* make font scaling less dramatic

* start css clean up and consolidation

* move dashboard header to sidebar, continue css clean up

* make header, main, and footer correctly fill min 100vh

* style dashboard nav

* add styling for badges, callouts, verticalRhythm, and indents. keep summary marker on same line as text

* use favicon

* wording adjustment

* add borders and backgrounds for namespaces, deployments, and containers

* remove unneeded relative base url, clean up formatting in head

* customize details marker

* add ability to increase verticalRhythm

* extract common elements of namespace, deployment, and container details

* spacing and border adjustments

* style comparison tables

* add qos abbreviation (and abbr styling) and link to definition

* show h1 on details page

* make namespace and container details collapsible. define and use namespace, deployment, and container colors

* use better contrasting text color for container badge

* glossary: add copy and styling

* simplify spacing

* remove old, unused html

* add, style, and make work namespace search form on detail page

* open glossary links in new window

* hide namespace filter when only one namespace is detailed

* update search.js to handle missing search form or malformed data attributes

* Change wording from "search" to "filter"

Co-Authored-By: Andrew Suderman <[email protected]>

* fix "divaria-live" bug by adding spacing around go templating back

* extract namespace filter into template

* alphabetizing for clarity, remove CheckDetailsTemplate name because template doesn't exist

* handle all spaces in filtering, not just first one

* style namespace list

* make search button look like a button, enable search form to grow to fill space

* simplify namespace list layout

* simplify usage of list-style: none

* extract misc css variables, don't scale transform when prefers-reduced-motion, tweak namespaces found wording

* update handling of no namespaces on namespace list page

* add border around pre elements

* css spaces and formatting adjustments

* handle case where namespace has no deployments on detail page

* link to specific glossary definitions instead of just QoS

* move all updated css to main.css, remove unused css files

* fix accessiblity and lighthouse failures

* switch from 4-space tabs to 2-space tabs in main.css

to match style used in other files

* clean up gohtml formatting, add missing "opens in new window" notices

* remove unused javascript

* more spacing between namespaces in detail

* remove non-functional base-path. Fix relative linking of static assets

* remove basePath unused var

* tidy

* tidy

* update screenshot in readme

Co-authored-by: Andrew Suderman <[email protected]>
Co-authored-by: Andrew Suderman <[email protected]>
  • Loading branch information
3 people authored Dec 22, 2020
1 parent b23ff56 commit b23fdf1
Show file tree
Hide file tree
Showing 32 changed files with 1,343 additions and 1,368 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ coverage.txt
debug

hack/kind/autoscaler
.vscode
__debug_bin
3 changes: 0 additions & 3 deletions cmd/dashboard.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,10 @@ import (
)

var serverPort int
var basePath string

func init() {
rootCmd.AddCommand(dashboardCmd)
dashboardCmd.PersistentFlags().IntVarP(&serverPort, "port", "p", 8080, "The port to serve the dashboard on.")
dashboardCmd.PersistentFlags().StringVar(&basePath, "base-path", "/", "Path on which the dashboard is served")
dashboardCmd.PersistentFlags().StringVarP(&excludeContainers, "exclude-containers", "e", "", "Comma delimited list of containers to exclude from recommendations.")
}

Expand All @@ -43,7 +41,6 @@ var dashboardCmd = &cobra.Command{
Run: func(cmd *cobra.Command, args []string) {
router := dashboard.GetRouter(
dashboard.OnPort(serverPort),
dashboard.WithBasePath(basePath),
dashboard.ExcludeContainers(sets.NewString(strings.Split(excludeContainers, ",")...)),
)
http.Handle("/", router)
Expand Down
43 changes: 22 additions & 21 deletions go.sum

Large diffs are not rendered by default.

Binary file modified img/screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions pkg/dashboard/assets.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,6 @@ func Asset(assetPath string) http.Handler {

// StaticAssets replies with a FileServer for all assets, the prefix is used to strip the URL path
func StaticAssets(prefix string) http.Handler {
klog.V(3).Infof("stripping prefix: %s", prefix)
return http.StripPrefix(prefix, http.FileServer(getAssetBox()))
}
18 changes: 0 additions & 18 deletions pkg/dashboard/assets/css/Muli.css

This file was deleted.

46 changes: 0 additions & 46 deletions pkg/dashboard/assets/css/check-details.css

This file was deleted.

Loading

0 comments on commit b23fdf1

Please sign in to comment.