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

Commit 10fbfe2

Browse files
authored
Merge pull request #116 from hjacobs/dashboard-mode
Add `scale` UI option
2 parents 244fd90 + b37aa6a commit 10fbfe2

File tree

3 files changed

+21
-0
lines changed

3 files changed

+21
-0
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/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ GitHub repository: https://github.com/hjacobs/kube-ops-view
1818
user-guide
1919
multiple-clusters
2020
access-control
21+
ui-options
2122

2223

2324

docs/ui-options.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
==========
2+
UI Options
3+
==========
4+
5+
Kubernetes Operational View has a few options to change the UI behavior.
6+
All these options are passed in the URL's fragment identifier (starting with ``#``) in the format of key/value pairs separated by semicolons.
7+
8+
Example URL: ``https://kube-ops-view.example.org/#dashboard=true;reload=600``
9+
10+
11+
``clusters``
12+
Comma separated list of cluster IDs to show.
13+
``dashboard``
14+
Enable dashboard mode which hides the menu bar.
15+
``reload``
16+
Reload the whole page after X seconds. This is useful for unattended TV screens running 24x7 to mitigate JavaScript memory leaks and browser crashes.
17+
``scale``
18+
Set the initial view scale (``1.0`` is 100%).

0 commit comments

Comments
 (0)