diff --git a/src/ui/public/filter_bar/filter_bar.html b/src/ui/public/filter_bar/filter_bar.html
index 29a60c192a049..d1e10b22e318b 100644
--- a/src/ui/public/filter_bar/filter_bar.html
+++ b/src/ui/public/filter_bar/filter_bar.html
@@ -26,39 +26,15 @@
class="filter-bar"
ng-show="filters.length || showAddFilterButton()"
>
-
.filter-actions {
- display: block;
- }
-
- > .filter-description {
- opacity: 0.15;
- background: transparent;
- overflow: hidden;
- }
- }
-
- > .filter-actions {
+ .filter-actions {
font-size: 1.1em;
line-height: 1.4em;
position: absolute;
@@ -115,14 +102,17 @@ filter-bar {
top: 0;
left: 0;
width: 100%;
- display: none;
+ opacity: 0;
text-align: center;
white-space: nowrap;
+ display: flex;
- > * {
+ .action {
+ border: none;
border-right: 1px solid rgba(255, 255, 255, 0.4);
- padding-right: 0;
- margin-right: 5px;
+ padding: 0;
+ background-color: transparent;
+ flex: 1 1 auto;
&:last-child {
border-right: 0;
@@ -136,6 +126,16 @@ filter-bar {
}
}
+ .filter-actions-activated {
+ opacity: 1;
+ }
+
+ .filter-description-deactivated {
+ opacity: 0.15;
+ background: transparent;
+ overflow: hidden;
+ }
+
&.negate {
background-color: @filter-bar-bar-filter-negate-bg;
}
diff --git a/src/ui/public/filter_bar/filter_pill/filter_pill.html b/src/ui/public/filter_bar/filter_pill/filter_pill.html
new file mode 100644
index 0000000000000..516ab26152fed
--- /dev/null
+++ b/src/ui/public/filter_bar/filter_pill/filter_pill.html
@@ -0,0 +1,74 @@
+
+
+
+
+ {{ pill.filter.meta.alias }}
+ {{ pill.filter.meta.key }}:
+ "{{ pill.filter.meta.value }}"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/ui/public/filter_bar/filter_pill/filter_pill.js b/src/ui/public/filter_bar/filter_pill/filter_pill.js
new file mode 100644
index 0000000000000..d152003a508a0
--- /dev/null
+++ b/src/ui/public/filter_bar/filter_pill/filter_pill.js
@@ -0,0 +1,33 @@
+import template from './filter_pill.html';
+import { uiModules } from 'ui/modules';
+
+const module = uiModules.get('kibana');
+
+module.directive('filterPill', function () {
+ return {
+ template,
+ restrict: 'E',
+ scope: {
+ filter: '=',
+ onToggleFilter: '=',
+ onPinFilter: '=',
+ onInvertFilter: '=',
+ onDeleteFilter: '=',
+ onEditFilter: '=',
+ },
+ bindToController: true,
+ controllerAs: 'pill',
+ controller: function filterPillController() {
+
+ this.activateActions = () => {
+ this.areActionsActivated = true;
+ };
+
+ this.deactivateActions = () => {
+ this.areActionsActivated = false;
+ };
+
+ }
+ };
+});
+
diff --git a/test/functional/page_objects/dashboard_page.js b/test/functional/page_objects/dashboard_page.js
index dc0b537a2a03a..5185bb34814cc 100644
--- a/test/functional/page_objects/dashboard_page.js
+++ b/test/functional/page_objects/dashboard_page.js
@@ -441,7 +441,7 @@ export function DashboardPageProvider({ getService, getPageObjects }) {
}
async getFilters(timeout = defaultFindTimeout) {
- return await find.allByCssSelector('.filter-bar > .filter', timeout);
+ return await find.allByCssSelector('.filter-bar .filter', timeout);
}
async getFilterDescriptions(timeout = defaultFindTimeout) {