diff --git a/app/scripts/directives/notifications/notificationDrawerWrapper.js b/app/scripts/directives/notifications/notificationDrawerWrapper.js index 46595b124b..b10f18c721 100644 --- a/app/scripts/directives/notifications/notificationDrawerWrapper.js +++ b/app/scripts/directives/notifications/notificationDrawerWrapper.js @@ -49,7 +49,6 @@ // var clientGeneratedNotifications = []; var eventsWatcher; - var eventsByNameData = {}; var eventsMap = {}; // TODO: @@ -159,6 +158,7 @@ ensureProjectGroupExists(filtered, event.metadata.namespace); filtered[event.metadata.namespace].notifications.push({ unread: !EventsService.isRead(event), + uid: event.metadata.uid, event: event, actions: null }); @@ -198,8 +198,7 @@ // TODO: follow-on PR to decide which of these events to toast, // via config in constants.js var eventWatchCallback = function(eventData) { - eventsByNameData = eventData.by('metadata.name'); - eventsMap = formatAndFilterEvents(eventsByNameData); + eventsMap = formatAndFilterEvents(eventData.by('metadata.uid')); // TODO: Update to an intermediate map, so that we can then combine both // events + notifications into the final notificationGroups output notificationGroups = sortNotificationGroups(eventsMap); diff --git a/app/views/directives/notifications/notification-drawer-wrapper.html b/app/views/directives/notifications/notification-drawer-wrapper.html index 3f33f05ae7..f62c942491 100644 --- a/app/views/directives/notifications/notification-drawer-wrapper.html +++ b/app/views/directives/notifications/notification-drawer-wrapper.html @@ -1,14 +1,15 @@ + on-mark-all-read="$ctrl.onMarkAllRead" + show-clear-all="$ctrl.showClearAll" + show-mark-all-read="$ctrl.showMarkAllRead"> diff --git a/bower.json b/bower.json index e0c088d016..35d839ca34 100644 --- a/bower.json +++ b/bower.json @@ -13,7 +13,7 @@ "angular-touch": "1.5.11", "angular-route": "1.5.11", "angular-bootstrap": "0.14.3", - "angular-patternfly": "4.5.6", + "angular-patternfly": "4.7.1", "angular-gettext": "2.3.9", "uri.js": "1.18.12", "moment": "2.14.2", @@ -47,7 +47,7 @@ "angular-utf8-base64": "0.0.5", "file-saver": "1.3.3", "origin-web-common": "0.0.51", - "origin-web-catalog": "0.0.41" + "origin-web-catalog": "0.0.42" }, "devDependencies": { "angular-mocks": "1.5.11", diff --git a/dist/scripts/scripts.js b/dist/scripts/scripts.js index a36e94e624..64805a7a52 100644 --- a/dist/scripts/scripts.js +++ b/dist/scripts/scripts.js @@ -13884,69 +13884,70 @@ u(), d(); angular.module("openshiftConsole").component("notificationDrawerWrapper", { templateUrl: "views/directives/notifications/notification-drawer-wrapper.html", controller: [ "$filter", "$interval", "$location", "$timeout", "$routeParams", "$rootScope", "Constants", "DataService", "NotificationsService", "EventsService", function(e, t, n, a, r, o, i, s, c, l) { -var u, d, m = _.get(i, "DISABLE_GLOBAL_EVENT_WATCH"), p = e("isIE")() || e("isEdge")(), f = this, g = [], h = {}, v = {}, y = [], b = {}, C = function(e) { +var u, d, m = _.get(i, "DISABLE_GLOBAL_EVENT_WATCH"), p = e("isIE")() || e("isEdge")(), f = this, g = [], h = {}, v = [], y = {}, b = function(e) { return s.get("projects", e, {}, { errorNotification: !1 }).then(function(e) { -return b[e.metadata.name] = e, e; +return y[e.metadata.name] = e, e; }); -}, S = function(t, n) { +}, C = function(t, n) { n && !t[n] && (t[n] = { -heading: e("displayName")(b[n]) || n, -project: b[n], +heading: e("displayName")(y[n]) || n, +project: y[n], notifications: [] }); -}, w = function() { +}, S = function() { d && s.unwatch(d); -}, k = function(e, t) { -w(), e && (d = s.watch("events", { +}, w = function(e, t) { +S(), e && (d = s.watch("events", { namespace: e }, _.debounce(t, 400), { skipDigest: !0 })); -}, j = function() { +}, k = function() { u && u(), u = null; -}, P = function(e) { +}, j = function(e) { return _.filter(e, "unread"); -}, R = function(e) { +}, P = function(e) { o.$applyAsync(function() { -e.totalUnread = P(e.notifications).length, e.hasUnread = !!e.totalUnread, o.$emit("NotificationDrawerWrapper.count", e.totalUnread); +e.totalUnread = j(e.notifications).length, e.hasUnread = !!e.totalUnread, o.$emit("NotificationDrawerWrapper.count", e.totalUnread); }); -}, E = function() { -_.each(y, R); -}, T = function(e) { +}, R = function() { +_.each(v, P); +}, E = function(e) { return _.orderBy(e, [ "event.lastTimestamp", "event.firstTimestamp" ], [ "desc", "desc" ]); -}, I = function(e) { +}, T = function(e) { var t = _.sortBy(e, function(e) { return e.heading; }); return _.each(t, function(e) { -e.notifications = T(e.notifications), e.counts = R(e); +e.notifications = E(e.notifications), e.counts = P(e); }), t; -}, N = function(e) { +}, I = function(e) { var t = {}; -return S(t, r.project), _.each(e, function(e) { -l.isImportantEvent(e) && !l.isCleared(e) && (S(t, e.metadata.namespace), t[e.metadata.namespace].notifications.push({ +return C(t, r.project), _.each(e, function(e) { +l.isImportantEvent(e) && !l.isCleared(e) && (C(t, e.metadata.namespace), t[e.metadata.namespace].notifications.push({ unread: !l.isRead(e), +uid: e.metadata.uid, event: e, actions: null })); }), t; -}, D = function() { +}, N = function() { _.each(g, function(e) { e(); }), g = []; -}, $ = function(e) { +}, D = function(e) { e || (f.drawerHidden = !0); -}, A = function() { +}, $ = function() { o.$evalAsync(function() { -E(), f.notificationGroups = _.filter(y, function(e) { +R(), f.notificationGroups = _.filter(v, function(e) { return e.project.metadata.name === r.project; }); }); -}, B = function(e) { -h = e.by("metadata.name"), v = N(h), y = I(v), A(); -}, L = { +}, A = function(e) { +h = I(e.by("metadata.uid")), v = T(h), $(); +}, B = { Normal: "pficon pficon-info", Warning: "pficon pficon-warning-triangle-o" }; @@ -13964,51 +13965,51 @@ f.drawerHidden = !0; onMarkAllRead: function(e) { _.each(e.notifications, function(e) { e.unread = !1, l.markRead(e.event); -}), A(), o.$emit("NotificationDrawerWrapper.onMarkAllRead"); +}), $(), o.$emit("NotificationDrawerWrapper.onMarkAllRead"); }, onClearAll: function(e) { _.each(e.notifications, function(e) { l.markRead(e.event), l.markCleared(e.event); -}), e.notifications = [], A(), o.$emit("NotificationDrawerWrapper.onMarkAllRead"); +}), e.notifications = [], $(), o.$emit("NotificationDrawerWrapper.onMarkAllRead"); }, -notificationGroups: y, +notificationGroups: v, headingInclude: "views/directives/notifications/header.html", notificationBodyInclude: "views/directives/notifications/notification-body.html", customScope: { clear: function(e, t, n) { -l.markCleared(e.event), n.notifications.splice(t, 1), E(); +l.markCleared(e.event), n.notifications.splice(t, 1), R(); }, markRead: function(e) { -e.unread = !1, l.markRead(e.event), E(); +e.unread = !1, l.markRead(e.event), R(); }, getNotficationStatusIconClass: function(e) { -return L[e.type] || L.info; +return B[e.type] || B.info; }, getStatusForCount: function(e) { -return L[e] || L.info; +return B[e] || B.info; }, close: function() { f.drawerHidden = !0; } } }); -var U = function(e, t) { +var L = function(e, t) { return _.get(e, "params.project") !== _.get(t, "params.project"); -}, O = function() { -C(r.project).then(function() { -k(r.project, B), $(r.project), A(); +}, U = function() { +b(r.project).then(function() { +w(r.project, A), D(r.project), $(); }); -}, F = function() { -r.project && O(), g.push(o.$on("$routeChangeSuccess", function(e, t, n) { -U(t, n) && (f.customScope.projectName = r.project, O()); +}, O = function() { +r.project && U(), g.push(o.$on("$routeChangeSuccess", function(e, t, n) { +L(t, n) && (f.customScope.projectName = r.project, U()); })), g.push(o.$on("NotificationDrawerWrapper.toggle", function() { f.drawerHidden = !f.drawerHidden; })); }; f.$onInit = function() { -m || p || F(); +m || p || O(); }, f.$onDestroy = function() { -j(), w(), D(); +k(), S(), N(); }; } ] }); diff --git a/dist/scripts/templates.js b/dist/scripts/templates.js index c5f3cf8b26..c8164de236 100644 --- a/dist/scripts/templates.js +++ b/dist/scripts/templates.js @@ -7533,7 +7533,7 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function( $templateCache.put('views/directives/notifications/notification-drawer-wrapper.html', - "" + "" ); diff --git a/dist/scripts/vendor.js b/dist/scripts/vendor.js index 0c60884079..7b06d28038 100644 --- a/dist/scripts/vendor.js +++ b/dist/scripts/vendor.js @@ -42883,7 +42883,7 @@ a.sWidthOrig = c.attr("width") || null; var u = (c.attr("style") || "").match(/width:\s*(\d+[pxem%]+)/); u && (a.sWidthOrig = u[1]); } -r !== i && null !== r && (l(r), o(qe.defaults.column, r), r.mDataProp === i || r.mData || (r.mData = r.mDataProp), r.sType && (a._sManualType = r.sType), r.className && !r.sClass && (r.sClass = r.className), e.extend(a, r), Fe(a, r, "sWidth", "sWidthOrig"), r.iDataSort !== i && (a.aDataSort = [ r.iDataSort ]), Fe(a, r, "aDataSort")); +r !== i && null !== r && (l(r), o(qe.defaults.column, r), r.mDataProp === i || r.mData || (r.mData = r.mDataProp), r.sType && (a._sManualType = r.sType), r.className && !r.sClass && (r.sClass = r.className), r.sClass && c.addClass(r.sClass), e.extend(a, r), Fe(a, r, "sWidth", "sWidthOrig"), r.iDataSort !== i && (a.aDataSort = [ r.iDataSort ]), Fe(a, r, "aDataSort")); var d = a.mData, h = $(d), f = a.mRender ? $(a.mRender) : null, p = function(e) { return "string" == typeof e && -1 !== e.indexOf("@"); }; @@ -43479,7 +43479,7 @@ for (var n = t.oClasses, i = t.sTableId, r = t.aLengthMenu, o = e.isArray(r[0]), name: i + "_length", "aria-controls": i, class: n.sLengthSelect -}), c = 0, u = a.length; c < u; c++) l[0][c] = new Option(s[c], a[c]); +}), c = 0, u = a.length; c < u; c++) l[0][c] = new Option("number" == typeof s[c] ? t.fnFormatNumber(s[c]) : s[c], a[c]); var d = e("
").addClass(n.sLength); return t.aanFeatures.l || (d[0].id = i + "_length"), d.children().append(t.oLanguage.sLengthMenu.replace("_MENU_", l[0].outerHTML)), e("select", d).val(t._iDisplayLength).on("change.DT", function(n) { ae(t, e(this).val()), O(t); @@ -43953,10 +43953,10 @@ sDestroyWidth: C[0].style.width, sInstance: v, sTableId: v }); -D.nTable = this, D.oApi = n.internal, D.oInit = g, S.push(D), D.oInstance = 1 === n.length ? n : C.dataTable(), s(g), g.oLanguage && a(g.oLanguage), g.aLengthMenu && !g.iDisplayLength && (g.iDisplayLength = e.isArray(g.aLengthMenu[0]) ? g.aLengthMenu[0][0] : g.aLengthMenu[0]), g = Ie(e.extend(!0, {}, _), g), Fe(D.oFeatures, g, [ "bPaginate", "bLengthChange", "bFilter", "bSort", "bSortMulti", "bInfo", "bProcessing", "bAutoWidth", "bSortClasses", "bServerSide", "bDeferRender" ]), Fe(D, g, [ "asStripeClasses", "ajax", "fnServerData", "fnFormatNumber", "sServerMethod", "aaSorting", "aaSortingFixed", "aLengthMenu", "sPaginationType", "sAjaxSource", "sAjaxDataProp", "iStateDuration", "sDom", "bSortCellsTop", "iTabIndex", "fnStateLoadCallback", "fnStateSaveCallback", "renderer", "searchDelay", "rowId", [ "iCookieDuration", "iStateDuration" ], [ "oSearch", "oPreviousSearch" ], [ "aoSearchCols", "aoPreSearchCols" ], [ "iDisplayLength", "_iDisplayLength" ], [ "bJQueryUI", "bJUI" ] ]), Fe(D.oScroll, g, [ [ "sScrollX", "sX" ], [ "sScrollXInner", "sXInner" ], [ "sScrollY", "sY" ], [ "bScrollCollapse", "bCollapse" ] ]), +D.nTable = this, D.oApi = n.internal, D.oInit = g, S.push(D), D.oInstance = 1 === n.length ? n : C.dataTable(), s(g), g.oLanguage && a(g.oLanguage), g.aLengthMenu && !g.iDisplayLength && (g.iDisplayLength = e.isArray(g.aLengthMenu[0]) ? g.aLengthMenu[0][0] : g.aLengthMenu[0]), g = Ie(e.extend(!0, {}, _), g), Fe(D.oFeatures, g, [ "bPaginate", "bLengthChange", "bFilter", "bSort", "bSortMulti", "bInfo", "bProcessing", "bAutoWidth", "bSortClasses", "bServerSide", "bDeferRender" ]), Fe(D, g, [ "asStripeClasses", "ajax", "fnServerData", "fnFormatNumber", "sServerMethod", "aaSorting", "aaSortingFixed", "aLengthMenu", "sPaginationType", "sAjaxSource", "sAjaxDataProp", "iStateDuration", "sDom", "bSortCellsTop", "iTabIndex", "fnStateLoadCallback", "fnStateSaveCallback", "renderer", "searchDelay", "rowId", [ "iCookieDuration", "iStateDuration" ], [ "oSearch", "oPreviousSearch" ], [ "aoSearchCols", "aoPreSearchCols" ], [ "iDisplayLength", "_iDisplayLength" ] ]), Fe(D.oScroll, g, [ [ "sScrollX", "sX" ], [ "sScrollXInner", "sXInner" ], [ "sScrollY", "sY" ], [ "bScrollCollapse", "bCollapse" ] ]), Fe(D.oLanguage, g, "fnInfoCallback"), Pe(D, "aoDrawCallback", g.fnDrawCallback, "user"), Pe(D, "aoServerParams", g.fnServerParams, "user"), Pe(D, "aoStateSaveParams", g.fnStateSaveParams, "user"), Pe(D, "aoStateLoadParams", g.fnStateLoadParams, "user"), Pe(D, "aoStateLoaded", g.fnStateLoaded, "user"), Pe(D, "aoRowCallback", g.fnRowCallback, "user"), Pe(D, "aoRowCreatedCallback", g.fnCreatedRow, "user"), Pe(D, "aoHeaderCallback", g.fnHeaderCallback, "user"), Pe(D, "aoFooterCallback", g.fnFooterCallback, "user"), Pe(D, "aoInitComplete", g.fnInitComplete, "user"), Pe(D, "aoPreDrawCallback", g.fnPreDrawCallback, "user"), D.rowIdFn = $(g.rowId), c(D); var E = D.oClasses; -if (g.bJQueryUI ? (e.extend(E, qe.ext.oJUIClasses, g.oClasses), g.sDom === _.sDom && "lfrtip" === _.sDom && (D.sDom = '<"H"lfr>t<"F"ip>'), D.renderer ? e.isPlainObject(D.renderer) && !D.renderer.header && (D.renderer.header = "jqueryui") : D.renderer = "jqueryui") : e.extend(E, qe.ext.classes, g.oClasses), C.addClass(E.sTable), D.iInitDisplayStart === i && (D.iInitDisplayStart = g.iDisplayStart, D._iDisplayStart = g.iDisplayStart), null !== g.iDeferLoading) { +if (e.extend(E, qe.ext.classes, g.oClasses), C.addClass(E.sTable), D.iInitDisplayStart === i && (D.iInitDisplayStart = g.iDisplayStart, D._iDisplayStart = g.iDisplayStart), null !== g.iDeferLoading) { D.bDeferLoading = !0; var F = e.isArray(g.iDeferLoading); D._iRecordsDisplay = F ? g.iDeferLoading[0] : g.iDeferLoading, D._iRecordsTotal = F ? g.iDeferLoading[1] : g.iDeferLoading; @@ -44413,7 +44413,7 @@ var e = this; return this.iterator("row", function(t, n, r) { var o, a, s, l, c, u, d = t.aoData, h = d[n]; for (d.splice(n, 1), o = 0, a = d.length; o < a; o++) if (c = d[o], u = c.anCells, null !== c.nTr && (c.nTr._DT_RowIndex = o), null !== u) for (s = 0, l = u.length; s < l; s++) u[s]._DT_CellIndex.row = o; -D(t.aiDisplayMaster, n), D(t.aiDisplay, n), D(e[r], n, !1), Oe(t); +D(t.aiDisplayMaster, n), D(t.aiDisplay, n), D(e[r], n, !1), t._iRecordsDisplay > 0 && t._iRecordsDisplay--, Oe(t); var f = t.rowIdFn(h._aData); f !== i && delete t.aIds[f]; }), this.iterator("table", function(e) { @@ -44777,10 +44777,7 @@ return n = n || !1, this.iterator("table", function(i) { var r, o = i.nTableWrapper.parentNode, a = i.oClasses, s = i.nTable, l = i.nTBody, c = i.nTHead, u = i.nTFoot, d = e(s), h = e(l), f = e(i.nTableWrapper), p = e.map(i.aoData, function(e) { return e.nTr; }); -i.bDestroying = !0, Le(i, "aoDestroyCallback", "destroy", [ i ]), n || new Ue(i).columns().visible(!0), f.off(".DT").find(":not(tbody *)").off(".DT"), e(t).off(".DT-" + i.sInstance), s != c.parentNode && (d.children("thead").detach(), d.append(c)), u && s != u.parentNode && (d.children("tfoot").detach(), d.append(u)), i.aaSorting = [], i.aaSortingFixed = [], $e(i), e(p).removeClass(i.asStripeClasses.join(" ")), e("th, td", c).removeClass(a.sSortable + " " + a.sSortableAsc + " " + a.sSortableDesc + " " + a.sSortableNone), i.bJUI && (e("th span." + a.sSortIcon + ", td span." + a.sSortIcon, c).detach(), e("th, td", c).each(function() { -var t = e("div." + a.sSortJUIWrapper, this); -e(this).append(t.contents()), t.detach(); -})), h.children().detach(), h.append(p); +i.bDestroying = !0, Le(i, "aoDestroyCallback", "destroy", [ i ]), n || new Ue(i).columns().visible(!0), f.off(".DT").find(":not(tbody *)").off(".DT"), e(t).off(".DT-" + i.sInstance), s != c.parentNode && (d.children("thead").detach(), d.append(c)), u && s != u.parentNode && (d.children("tfoot").detach(), d.append(u)), i.aaSorting = [], i.aaSortingFixed = [], $e(i), e(p).removeClass(i.asStripeClasses.join(" ")), e("th, td", c).removeClass(a.sSortable + " " + a.sSortableAsc + " " + a.sSortableDesc + " " + a.sSortableNone), h.children().detach(), h.append(p); var g = n ? "remove" : "detach"; d[g](), f[g](), !n && o && (o.insertBefore(s, i.nTableReinsertBefore), d.css("width", i.sDestroyWidth).removeClass(a.sTable), (r = i.asDestroyStripes.length) && h.children().each(function(t) { e(this).addClass(i.asDestroyStripes[t % r]); @@ -44798,7 +44795,7 @@ e.call(r[t](a, "cell" === t ? s : n, "cell" === t ? n : i), a, s, l, c); }), ze("i18n()", function(t, n, r) { var o = this.context[0], a = $(t)(o.oLanguage); return a === i && (a = n), r !== i && e.isPlainObject(a) && (a = a[r] !== i ? a[r] : a._), a.replace("%d", r); -}), qe.version = "1.10.15", qe.settings = [], qe.models = {}, qe.models.oSearch = { +}), qe.version = "1.10.16", qe.settings = [], qe.models = {}, qe.models.oSearch = { bCaseInsensitive: !0, sSearch: "", bRegex: !1, @@ -44855,7 +44852,6 @@ bDeferRender: !1, bDestroy: !1, bFilter: !0, bInfo: !0, -bJQueryUI: !1, bLengthChange: !0, bPaginate: !0, bProcessing: !1, @@ -45048,7 +45044,6 @@ _iDisplayLength: 10, _iDisplayStart: 0, _iRecordsTotal: 0, _iRecordsDisplay: 0, -bJUI: null, oClasses: {}, bFiltered: !1, bSorted: !1, @@ -45157,34 +45152,7 @@ sSortJUIWrapper: "", sSortIcon: "", sJUIHeader: "", sJUIFooter: "" -}), function() { -var t = "ui-state-default", n = "css_right ui-icon ui-icon-", i = "fg-toolbar ui-toolbar ui-widget-header ui-helper-clearfix"; -e.extend(qe.ext.oJUIClasses, qe.ext.classes, { -sPageButton: "fg-button ui-button " + t, -sPageButtonActive: "ui-state-disabled", -sPageButtonDisabled: "ui-state-disabled", -sPaging: "dataTables_paginate fg-buttonset ui-buttonset fg-buttonset-multi ui-buttonset-multi paging_", -sSortAsc: t + " sorting_asc", -sSortDesc: t + " sorting_desc", -sSortable: t + " sorting", -sSortableAsc: t + " sorting_asc_disabled", -sSortableDesc: t + " sorting_desc_disabled", -sSortableNone: t + " sorting_disabled", -sSortJUIAsc: n + "triangle-1-n", -sSortJUIDesc: n + "triangle-1-s", -sSortJUI: n + "carat-2-n-s", -sSortJUIAscAllowed: n + "carat-1-n", -sSortJUIDescAllowed: n + "carat-1-s", -sSortJUIWrapper: "DataTables_sort_wrapper", -sSortIcon: "DataTables_sort_icon", -sScrollHead: "dataTables_scrollHead " + t, -sScrollFoot: "dataTables_scrollFoot " + t, -sHeaderTH: t, -sFooterTH: t, -sJUIHeader: i + " ui-corner-tl ui-corner-tr", -sJUIFooter: i + " ui-corner-bl ui-corner-br" }); -}(); var Bt = qe.ext.pager; e.extend(Bt, { simple: function(e, t) { @@ -49673,32 +49641,34 @@ centerLabel: "= n.error ? (i = "error", o = e.colorPalette.red) : t >= n.warning && (i = "warning", o = e.colorPalette.orange)), r.threshold && r.threshold === i || (r.threshold = i, r.onThresholdChange({ -threshold: r.threshold +var n, i = this; +i.$id = t.$id, i.$onInit = function() { +i.donutChartId = "donutPctChart" + i.$id, i.config.chartId && (i.donutChartId = i.config.chartId + i.donutChartId), i.updateAll(); +}, i.updateAvailable = function() { +i.data.available = i.data.total - i.data.used; +}, i.updatePercentage = function() { +i.data.percent = Math.round(i.data.used / i.data.total * 100); +}, i.getStatusColor = function(t, n) { +var r = "none", o = e.colorPalette.blue; +return n && (r = "ok", o = e.colorPalette.green, t >= n.error ? (r = "error", o = e.colorPalette.red) : t >= n.warning && (r = "warning", o = e.colorPalette.orange)), i.threshold && i.threshold === r || (i.threshold = r, i.onThresholdChange({ +threshold: i.threshold })), o; -}, r.statusDonutColor = function() { +}, i.statusDonutColor = function() { var t, n; return t = { pattern: [] -}, n = r.data.used / r.data.total * 100, t.pattern[0] = r.getStatusColor(n, r.config.thresholds), t.pattern[1] = e.colorPalette.black300, t; -}, r.donutTooltip = function() { +}, n = i.data.used / i.data.total * 100, t.pattern[0] = i.getStatusColor(n, i.config.thresholds), t.pattern[1] = e.colorPalette.black300, t; +}, i.donutTooltip = function() { return { contents: function(e) { -return r.config.tooltipFn ? '' + r.config.tooltipFn(e) + "" : '' + Math.round(100 * e[0].ratio) + "% " + r.config.units + " " + e[0].name + ""; +return i.config.tooltipFn ? '' + i.config.tooltipFn(e) + "" : '' + Math.round(100 * e[0].ratio) + "% " + i.config.units + " " + e[0].name + ""; } }; -}, r.getDonutData = function() { +}, i.getDonutData = function() { return { -columns: [ [ "Used", r.data.used ], [ "Available", r.data.available ] ], +columns: [ [ "Used", i.data.used ], [ "Available", i.data.available ] ], type: "donut", donut: { label: { @@ -49708,23 +49678,23 @@ show: !1 groups: [ [ "used", "available" ] ], order: null }; -}, r.getCenterLabelText = function() { +}, i.getCenterLabelText = function() { var e; return e = { -bigText: r.data.used, -smText: r.config.units + " Used" -}, r.config.centerLabelFn ? (e.bigText = r.config.centerLabelFn(), e.smText = "") : "none" === r.centerLabel ? (e.bigText = "", e.smText = "") : "available" === r.centerLabel ? (e.bigText = r.data.available, e.smText = r.config.units + " Available") : "percent" === r.centerLabel && (e.bigText = Math.round(r.data.used / r.data.total * 100) + "%", e.smText = "of " + r.data.total + " " + r.config.units), e; -}, r.updateAll = function() { -i = angular.copy(r.data), r.config = e.merge(patternfly.c3ChartDefaults().getDefaultDonutConfig(), r.config), r.updateAvailable(), r.config.data = e.merge(r.config.data, r.getDonutData()), r.config.color = r.statusDonutColor(r), r.config.tooltip = r.donutTooltip(), r.config.data.onclick = r.config.onClickFn; -}, r.setupDonutChartTitle = function() { +bigText: i.data.used, +smText: i.config.units + " Used" +}, i.config.centerLabelFn ? (e.bigText = i.config.centerLabelFn(), e.smText = "") : "none" === i.centerLabel ? (e.bigText = "", e.smText = "") : "available" === i.centerLabel ? (e.bigText = i.data.available, e.smText = i.config.units + " Available") : "percent" === i.centerLabel && (e.bigText = Math.round(i.data.used / i.data.total * 100) + "%", e.smText = "of " + i.data.total + " " + i.config.units), e; +}, i.updateAll = function() { +n = angular.copy(i.data), i.config = e.merge(patternfly.c3ChartDefaults().getDefaultDonutConfig(), i.config), i.updateAvailable(), i.updatePercentage(), i.config.data = e.merge(i.config.data, i.getDonutData()), i.config.color = i.statusDonutColor(i), i.config.tooltip = i.donutTooltip(), i.config.data.onclick = i.config.onClickFn; +}, i.setupDonutChartTitle = function() { var e, t; -angular.isUndefined(r.chart) || (e = d3.select(r.chart.element).select("text.c3-chart-arcs-title")) && (t = r.getCenterLabelText(), e.selectAll("*").remove(), t.bigText && !t.smText ? e.text(t.bigText) : (e.insert("tspan").text(t.bigText).classed("donut-title-big-pf", !0).attr("dy", 0).attr("x", 0), e.insert("tspan").text(t.smText).classed("donut-title-small-pf", !0).attr("dy", 20).attr("x", 0))); -}, r.setChart = function(e) { -r.chart = e, r.setupDonutChartTitle(); -}, r.$onChanges = function(e) { -(e.config || e.data) && r.updateAll(), e.chartHeight && (r.config.size.height = e.chartHeight.currentValue), e.centerLabel && r.setupDonutChartTitle(); -}, r.$doCheck = function() { -angular.equals(r.data, i) || r.updateAll(); +angular.isUndefined(i.chart) || (e = d3.select(i.chart.element).select("text.c3-chart-arcs-title")) && (t = i.getCenterLabelText(), e.selectAll("*").remove(), t.bigText && !t.smText ? e.text(t.bigText) : (e.insert("tspan").text(t.bigText).classed("donut-title-big-pf", !0).attr("dy", 0).attr("x", 0), e.insert("tspan").text(t.smText).classed("donut-title-small-pf", !0).attr("dy", 20).attr("x", 0))); +}, i.setChart = function(e) { +i.chart = e, i.setupDonutChartTitle(); +}, i.$onChanges = function(e) { +(e.config || e.data) && i.updateAll(), e.chartHeight && (i.config.size.height = e.chartHeight.currentValue), e.centerLabel && i.setupDonutChartTitle(); +}, i.$doCheck = function() { +angular.equals(i.data, n) || i.updateAll(); }; } ] }), angular.module("patternfly.charts").component("pfEmptyChart", { @@ -50432,7 +50402,7 @@ templateUrl: "filters/simple-filter/filter-results.html", controller: function() { "use strict"; function e() { -i = angular.copy(r.config), r.config.appliedFilters || (r.config.appliedFilters = []), void 0 === r.config.resultsCount && (r.config.resultsCount = 0); +i = angular.copy(r.config), r.config.appliedFilters || (r.config.appliedFilters = []), void 0 === r.config.resultsCount && (r.config.resultsCount = 0), r.config.itemsLabel = r.config.itemsLabel || "Result", r.config.itemsLabelPlural = r.config.itemsLabelPlural || "Results"; } function t(e) { var t = []; @@ -50452,7 +50422,7 @@ clearAllFilters: n }, r.$onChanges = function() { e(); }, r.$doCheck = function() { -angular.equals(r.config, i); +angular.equals(r.config, i) || e(); }; } }), angular.module("patternfly.form").component("pfFormButtons", { @@ -50797,6 +50767,7 @@ allowExpand: "=?", drawerExpanded: "=?", drawerTitle: "@", notificationGroups: "<", +notificationTrackField: "@", onClose: "=?", showMarkAllRead: "'), e.put("card/basic/card.html", "

{{$ctrl.headTitle}}

{{$ctrl.subTitle}}
"); } ]), angular.module("patternfly.charts").run([ "$templateCache", function(e) { "use strict"; -e.put("charts/donut/donut-chart.html", ''), e.put("charts/donut/donut-pct-chart.html", ''), e.put("charts/empty-chart.html", '
No data available
'), e.put("charts/heatmap/heatmap-legend.html", ''), -e.put("charts/heatmap/heatmap.html", '

{{$ctrl.chartTitle}}

'), e.put("charts/line/line-chart.html", ''), e.put("charts/sparkline/sparkline-chart.html", ''), -e.put("charts/trends/trends-chart.html", '
{{$ctrl.config.title}} {{$ctrl.getLatestValue()}} {{$ctrl.config.units}} {{$ctrl.getPercentageValue() + \'%\'}} of {{$ctrl.chartData.total + \' \' + $ctrl.config.units}}{{$ctrl.config.timeFrame}}
{{$ctrl.getLatestValue()}} {{$ctrl.config.units}} {{$ctrl.getPercentageValue() + \'%\'}} of {{$ctrl.chartData.total + \' \' + $ctrl.config.units}} {{$ctrl.config.title}}
{{$ctrl.getPercentageValue() + \'%\'}}
{{$ctrl.config.trendLabel}} {{$ctrl.getLatestValue()}} of {{$ctrl.chartData.total + \' \' + $ctrl.config.units}}
'), +e.put("charts/donut/donut-chart.html", ''), e.put("charts/donut/donut-pct-chart.html", ' {{$ctrl.config.labelConfig.title}} {{$ctrl.data.available}} {{$ctrl.config.labelConfig.units}} available {{$ctrl.data.percent}}% used {{$ctrl.data.used}} {{$ctrl.config.labelConfig.units}} of {{$ctrl.data.total}} {{$ctrl.config.labelConfig.units}} used '), +e.put("charts/empty-chart.html", '
No data available
'), e.put("charts/heatmap/heatmap-legend.html", ''), e.put("charts/heatmap/heatmap.html", '

{{$ctrl.chartTitle}}

'), e.put("charts/line/line-chart.html", ''), +e.put("charts/sparkline/sparkline-chart.html", ''), e.put("charts/trends/trends-chart.html", '
{{$ctrl.config.title}} {{$ctrl.getLatestValue()}} {{$ctrl.config.units}} {{$ctrl.getPercentageValue() + \'%\'}} of {{$ctrl.chartData.total + \' \' + $ctrl.config.units}}{{$ctrl.config.timeFrame}}
{{$ctrl.getLatestValue()}} {{$ctrl.config.units}} {{$ctrl.getPercentageValue() + \'%\'}} of {{$ctrl.chartData.total + \' \' + $ctrl.config.units}} {{$ctrl.config.title}}
{{$ctrl.getPercentageValue() + \'%\'}}
{{$ctrl.config.trendLabel}} {{$ctrl.getLatestValue()}} of {{$ctrl.chartData.total + \' \' + $ctrl.config.units}}
'), e.put("charts/utilization-bar/utilization-bar-chart.html", '
{{$ctrl.chartTitle}}
{{$ctrl.chartData.used}} of {{$ctrl.chartData.total}} {{$ctrl.units}} Used {{$ctrl.chartData.percentageUsed}}% Used
{{$ctrl.chartTitle}}
{{$ctrl.chartData.used}} {{$ctrl.units}} Used {{$ctrl.chartData.percentageUsed}}% Used
'), e.put("charts/utilization-trend/utilization-trend-chart.html", '

{{$ctrl.config.title}}

{{$ctrl.currentValue}}

{{$ctrl.currentText}}
of {{$ctrl.chartData.total}} {{$ctrl.config.units}}
{{$ctrl.legendLeftText}} {{$ctrl.legendRightText}}
'); } ]), angular.module("patternfly.filters").run([ "$templateCache", function(e) { "use strict"; e.put("filters/filter-panel/filter-panel-results.html", '
{{$ctrl.config.resultsCount}} of {{$ctrl.config.totalCount}} {{$ctrl.config.resultsLabel === undefined ? "Results" : $ctrl.config.resultsLabel}}

Active filters:

Clear All Filters

'), -e.put("filters/filter-panel/filter-panel.html", '
'), e.put("filters/simple-filter/filter-fields.html", '
'), -e.put("filters/simple-filter/filter-results.html", '
{{$ctrl.config.resultsCount}} Results

Active filters:

  • {{filter.title}}: {{((filter.value.filterCategory.title || filter.value.filterCategory) + filter.value.filterDelimiter + (filter.value.filterValue.title || filter.value.filterValue)) || filter.value.title || filter.value}}

Clear All Filters

{{$ctrl.config.selectedCount}} of {{$ctrl.config.totalCount}} selected
\x3c!-- /col --\x3e
\x3c!-- /row --\x3e
'), -e.put("filters/simple-filter/filter.html", "
"); +e.put("filters/filter-panel/filter-panel.html", '
'), e.put("filters/simple-filter/filter-fields.html", '
'), +e.put("filters/simple-filter/filter-results.html", '
{{$ctrl.config.resultsCount}} {{$ctrl.config.itemsLabel}}
{{$ctrl.config.resultsCount}} {{$ctrl.config.itemsLabelPlural}}
{{$ctrl.config.resultsCount}} of {{$ctrl.config.totalCount}} {{$ctrl.config.itemsLabel}}
{{$ctrl.config.resultsCount}} of {{$ctrl.config.totalCount}} {{$ctrl.config.itemsLabelPlural}}

Active Filters:

  • {{filter.title}}: {{((filter.value.filterCategory.title || filter.value.filterCategory) + filter.value.filterDelimiter + (filter.value.filterValue.title || filter.value.filterValue)) || filter.value.title || filter.value}}

Clear All Filters

{{$ctrl.config.selectedCount}} of {{$ctrl.config.totalCount}} selected
\x3c!-- /col --\x3e
\x3c!-- /row --\x3e
'), +e.put("filters/simple-filter/filter.html", "
"); } ]), angular.module("patternfly.form").run([ "$templateCache", function(e) { "use strict"; e.put("form/form-buttons/form-buttons.html", '
'), e.put("form/form-group/form-group.html", '
  • {{ message }}
'); @@ -52049,7 +52020,7 @@ e.put("navigation/application-launcher.html", '
'); } ]), angular.module("patternfly.notification").run([ "$templateCache", function(e) { "use strict"; -e.put("notification/inline-notification.html", '
{{$ctrl.pfNotificationHeader}} {{$ctrl.pfNotificationMessage}}
'), e.put("notification/notification-drawer.html", '

{{$ctrl.drawerTitle}}

Loading More
'), +e.put("notification/inline-notification.html", '
{{$ctrl.pfNotificationHeader}} {{$ctrl.pfNotificationMessage}}
'), e.put("notification/notification-drawer.html", '

{{$ctrl.drawerTitle}}

Loading More
'), e.put("notification/notification-list.html", '
'), e.put("notification/toast-notification-list.html", '
'), e.put("notification/toast-notification.html", '
{{$ctrl.header}} {{$ctrl.message}} {{$ctrl.message}}
'); } ]), angular.module("patternfly.pagination").run([ "$templateCache", function(e) { diff --git a/dist/styles/vendor.css b/dist/styles/vendor.css index dbf00d44c7..e7b97b6ec6 100644 --- a/dist/styles/vendor.css +++ b/dist/styles/vendor.css @@ -181,6 +181,15 @@ pf-filter-panel .toolbar-pf-results .single-label .pficon-close{padding-right:6p pf-filter-panel .toolbar-pf-results p{padding-right:10px;padding-left:10px} .pf-filter-label-category{background-color:#39a5dc;font-weight:700;padding:6px} .pf-filter-label-category .category-values{padding-left:4px} +.filter-pf.inline-filter-pf{flex:1 1 100%;margin:15px 15px 7px 0} +.filter-pf.inline-filter-pf pf-filter-fields,.filter-pf.inline-filter-pf pf-filter-results{display:inline-block} +.filter-pf.inline-filter-pf .form-group{margin-bottom:0;margin-right:15px} +.filter-pf.inline-filter-pf .toolbar-pf-results{border-top:none;margin:0} +.filter-pf.inline-filter-pf .toolbar-pf-results .col-sm-12{float:left;padding:0} +.filter-pf.inline-filter-pf .toolbar-pf-results h5,.filter-pf.inline-filter-pf .toolbar-pf-results p,.filter-pf.inline-filter-pf .toolbar-pf-results ul{line-height:1.43;padding-bottom:6px;padding-top:6px} +.filter-pf.inline-filter-pf .toolbar-pf-results .list-inline{margin-bottom:-5px;padding-right:5px} +.filter-pf.inline-filter-pf .toolbar-pf-results .list-inline>li{margin-bottom:5px} +.filter-pf .toolbar-pf-results .list-inline{margin-left:0} .sort-pf .btn-link{color:#252525;font-size:16px;line-height:1;margin-left:10px;padding:4px 0} .sort-pf .btn-link:hover{color:#0088ce} .list-group-item-header.list-group-item-not-selectable{cursor:inherit}