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

Commit b37aa6a

Browse files
committed
#108 add scale UI option
1 parent e564f43 commit b37aa6a

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

app/src/app.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export default class App {
2121
this.reloadIntervalSeconds = parseInt(params.get('reload')) || 0
2222
this.filterString = params.get('q') || ''
2323
this.selectedClusters = new Set((params.get('clusters') || '').split(',').filter(x => x))
24+
this.initialScale = parseFloat(params.get('scale')) || 1.0
2425
this.seenPods = new Set()
2526
this.sorterFn = ''
2627
this.theme = Theme.get(localStorage.getItem('theme'))
@@ -333,6 +334,7 @@ export default class App {
333334
this.theme.apply(this.stage)
334335

335336
const viewContainer = new PIXI.Container()
337+
viewContainer.scale.set(this.initialScale)
336338
viewContainer.x = 20
337339
viewContainer.y = this.dashboardMode ? 20 : 40
338340
this.viewContainerTargetPosition.x = viewContainer.x

docs/ui-options.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@ All these options are passed in the URL's fragment identifier (starting with ``#
88
Example URL: ``https://kube-ops-view.example.org/#dashboard=true;reload=600``
99

1010

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

0 commit comments

Comments
 (0)