Skip to content
This repository has been archived by the owner on Oct 3, 2020. It is now read-only.

Commit

Permalink
#108 add scale UI option
Browse files Browse the repository at this point in the history
  • Loading branch information
hjacobs committed Jan 24, 2017
1 parent e564f43 commit b37aa6a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions app/src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export default class App {
this.reloadIntervalSeconds = parseInt(params.get('reload')) || 0
this.filterString = params.get('q') || ''
this.selectedClusters = new Set((params.get('clusters') || '').split(',').filter(x => x))
this.initialScale = parseFloat(params.get('scale')) || 1.0
this.seenPods = new Set()
this.sorterFn = ''
this.theme = Theme.get(localStorage.getItem('theme'))
Expand Down Expand Up @@ -333,6 +334,7 @@ export default class App {
this.theme.apply(this.stage)

const viewContainer = new PIXI.Container()
viewContainer.scale.set(this.initialScale)
viewContainer.x = 20
viewContainer.y = this.dashboardMode ? 20 : 40
this.viewContainerTargetPosition.x = viewContainer.x
Expand Down
6 changes: 4 additions & 2 deletions docs/ui-options.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ All these options are passed in the URL's fragment identifier (starting with ``#
Example URL: ``https://kube-ops-view.example.org/#dashboard=true;reload=600``


``clusters``
Comma separated list of cluster IDs to show.
``dashboard``
Enable dashboard mode which hides the menu bar.
``reload``
Reload the whole page after X seconds. This is useful for unattended TV screens running 24x7 to mitigate JavaScript memory leaks and browser crashes.
``clusters``
Comma separated list of cluster IDs to show.
``scale``
Set the initial view scale (``1.0`` is 100%).

0 comments on commit b37aa6a

Please sign in to comment.