Add a namespace switcher to the gutter menu

This commit is contained in:
Michael Lange 2017-10-09 19:00:14 -07:00
parent 11f699f8da
commit b43b0ba6a4
2 changed files with 23 additions and 0 deletions

View File

@ -0,0 +1,9 @@
import Ember from 'ember';
const { Component, inject } = Ember;
export default Component.extend({
system: inject.service(),
onNamespaceChange() {},
});

View File

@ -5,6 +5,20 @@
Workload
</p>
<ul class="menu-list">
<li>
<select
class="menu-item"
onchange={{action (queue
(action (mut system.activeNamespace))
(action onNamespaceChange)
) value="target.value"}}>
{{#each system.namespaces as |namespace|}}
<option value="{{namespace.name}}" selected={{eq namespace system.activeNamespace}}>
{{namespace.name}}
</option>
{{/each}}
</select>
</li>
<li>{{#link-to "jobs" activeClass="is-active"}}Jobs{{/link-to}}</li>
</ul>
<p class="menu-label">