diff --git a/ui/app/components/clients/current.js b/ui/app/components/clients/current.js
index b539102e65..0b10db1bdd 100644
--- a/ui/app/components/clients/current.js
+++ b/ui/app/components/clients/current.js
@@ -1,10 +1,14 @@
import Component from '@glimmer/component';
import { tracked } from '@glimmer/tracking';
+import { action } from '@ember/object';
export default class Current extends Component {
chartLegend = [
{ key: 'entity_clients', label: 'entity clients' },
{ key: 'non_entity_clients', label: 'non-entity clients' },
];
+ @tracked namespaceArray = this.args.model.monthly?.byNamespace.map((namespace) => {
+ return { name: namespace['label'], id: namespace['label'] };
+ });
@tracked selectedNamespace = null;
// TODO CMB get from model
@@ -46,4 +50,11 @@ export default class Current extends Component {
filterByNamespace(namespace) {
return this.byNamespaceCurrent.find((ns) => ns.label === namespace);
}
+
+ // ACTIONS
+ @action
+ selectNamespace([value]) {
+ // value comes in as [namespace0]
+ this.selectedNamespace = value;
+ }
}
diff --git a/ui/app/components/clients/dashboard.js b/ui/app/components/clients/dashboard.js
index 253efad750..a94d39a383 100644
--- a/ui/app/components/clients/dashboard.js
+++ b/ui/app/components/clients/dashboard.js
@@ -45,7 +45,9 @@ export default class Dashboard extends Component {
@tracked startYear = null;
@tracked selectedNamespace = null;
@tracked noActivityDate = '';
- // @tracked selectedNamespace = 'namespace18anotherlong/'; // for testing namespace selection view with mirage
+ @tracked namespaceArray = this.args.model.activity?.byNamespace.map((namespace) => {
+ return { name: namespace['label'], id: namespace['label'] };
+ });
get startTimeDisplay() {
if (!this.startTimeFromResponse) {
@@ -173,16 +175,9 @@ export default class Dashboard extends Component {
}
@action
- selectNamespace(value) {
- // In case of search select component, value returned is an array
- if (Array.isArray(value)) {
- this.selectedNamespace = this.getNamespace(value[0]);
- this.barChartSelection = false;
- } else if (typeof value === 'object') {
- // While D3 bar selection returns an object
- this.selectedNamespace = this.getNamespace(value.label);
- this.barChartSelection = true;
- }
+ selectNamespace([value]) {
+ // value comes in as [namespace0]
+ this.selectedNamespace = value;
}
@action
diff --git a/ui/app/styles/components/icon.scss b/ui/app/styles/components/icon.scss
index e60da05337..bbb55ec205 100644
--- a/ui/app/styles/components/icon.scss
+++ b/ui/app/styles/components/icon.scss
@@ -47,6 +47,7 @@
.flight-icon {
&.flight-icon-display-inline {
vertical-align: middle;
- margin: 0px 4px;
+ margin-left: 4px;
+ margin-right: 4px;
}
}
diff --git a/ui/app/styles/components/search-select.scss b/ui/app/styles/components/search-select.scss
index 478992482b..95594757f2 100644
--- a/ui/app/styles/components/search-select.scss
+++ b/ui/app/styles/components/search-select.scss
@@ -125,3 +125,11 @@ div > .ember-power-select-options {
width: 20px;
top: 5px;
}
+
+.search-icon {
+ margin-top: 4px;
+}
+
+.search-select.display-inherit {
+ display: inherit;
+}
diff --git a/ui/app/templates/components/clients/current.hbs b/ui/app/templates/components/clients/current.hbs
index 8d3f96caec..4cc886f700 100644
--- a/ui/app/templates/components/clients/current.hbs
+++ b/ui/app/templates/components/clients/current.hbs
@@ -19,7 +19,16 @@
FILTERS