diff --git a/app/src/app.js b/app/src/app.js index ee76385..f8983ba 100644 --- a/app/src/app.js +++ b/app/src/app.js @@ -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 diff --git a/docs/ui-options.rst b/docs/ui-options.rst index 25d8a3b..9b31fb5 100644 --- a/docs/ui-options.rst +++ b/docs/ui-options.rst @@ -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%).