#108 add scale UI option

This commit is contained in:
Henning Jacobs
2017-01-24 12:49:48 +01:00
parent e564f435fd
commit b37aa6a59a
2 changed files with 6 additions and 2 deletions

View File

@@ -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'))
@@ -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

View File

@@ -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%).