UNPKG

insights-frontend

Version:
2 lines 2.66 MB
var _typeof2="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};!function e(t,n,r){function i(o,s){var c=window.define;if(window.define=void 0,!n[o]){if(!t[o]){var l="function"==typeof require&&require;if(!s&&l)return l(o,!0);if(a)return a(o,!0);var u=new Error("Cannot find module '"+o+"'");throw u.code="MODULE_NOT_FOUND",u}var d=n[o]={exports:{}};t[o][0].call(d.exports,function(e){var n=t[o][1][e];return i(n||e)},d,d.exports,e,t,n,r)}return window.define=c,n[o].exports}for(var a="function"==typeof require&&require,o=0;o<r.length;o++)i(r[o]);return i}({1:[function(e,t,n){"use strict";function r(e,t,n){var r=t.apiRoot;return{getProducts:function(){var t=r+"account/products"+n.current();return e.get(t)}}}r.$inject=["$http","InsightsConfig","AccountService"],e("./").factory("Account",r)},{"./":15}],2:[function(e,t,n){"use strict";function r(e,t){var n=t.apiRoot;return{get:function(){return e.get(n+"account/settings")},update:function(t){return e.post(n+"account/settings",t)}}}r.$inject=["$http","InsightsConfig"],e("./").factory("AccountSettings",r)},{"./":15}],3:[function(e,t,n){"use strict";function r(e,t,n,r,i){function o(){return e.get(s+"acks?include=rule"+r.current("&")).success(function(e){c.length=0,Array.prototype.push.apply(c,e),angular.extend(l,a(c,"rule_id"))})}var s=i.apiRoot,c=[],l={},u=!1;return n.$on("reload:data",o),{init:function(){u||(o(),u=!0)},acks:c,ackMap:l,createAck:function(i){var a=t.defer();return e.post(s+"acks"+r.current(),{rule_id:i.rule_id||i.id}).success(function(e){c.push(e),l[e.rule_id]=e,n.$broadcast("reload:data"),a.resolve(e)}),a.promise},deleteAck:function(t){return e.delete(s+"acks/"+t.id+r.current()).success(function(){for(var e=c.length,r=0;r<e;r++)if(c[r].id===t.id)return c.splice(r,1),delete l[t.rule_id],void n.$broadcast("reload:data")})},reload:o}}r.$inject=["$http","$q","$rootScope","AccountService","InsightsConfig"];var i=e("./"),a=e("lodash/keyBy");i.factory("Ack",r)},{"./":15,"lodash/keyBy":528}],4:[function(e,t,n){"use strict";function r(e,t){var n=t.apiRoot;return{reports:function(){return e.get(n+"analytics/reports")},systems:function(){return e.get(n+"analytics/systems")}}}r.$inject=["$http","InsightsConfig"],e("./").factory("Analytic",r)},{"./":15}],5:[function(e,t,n){"use strict";function r(e,t){var n=t.apiRoot,r={};return r.getAnnouncements=function(t){var r=a(n+"announcements");return t&&r.addSearch(t),e.get(r.toString())},r.byId=function(t){return e.get(n+"announcements/"+t)},r.bySlug=function(t){return e.get(n+"announcements/"+t)},r.createAnnouncement=function(t){return e.post(n+"announcements?internal=true",t)},r.updateAnnouncement=function(t){return e.put(n+"announcements/"+t.id,t)},r.deleteAnnouncement=function(t){return e.delete(n+"announcements/"+t.id)},r.acknowledge=function(t){return e.post(n+"announcements/"+t.id+"/ack")},r}r.$inject=["$http","InsightsConfig"];var i=e("./"),a=e("urijs");i.factory("Announcement",r)},{"./":15,urijs:838}],6:[function(e,t,n){"use strict";function r(e,t,n){var r=n.apiRoot;return{getArticles:function(){return e.get(r+"articles")},get:function(t){return e.get(r+"articles/"+(t||n.overviewKey))},update:function(t,i){return e.put(r+"articles/"+(t||n.overviewKey),i)},preview:function(t){return e.post(r+"articles/preview",t)}}}r.$inject=["$http","AccountService","InsightsConfig"],e("./").factory("Article",r)},{"./":15}],7:[function(e,t,n){"use strict";function r(e){var t={};return t.subscribe=function(){var t=a("/api").segment("redhat_node").segment("2184921").segment("subscribe").toString();return e.post(t).then(function(e){return e.data})},t}r.$inject=["$http"];var i=e("./"),a=e("urijs");i.factory("Blog",r)},{"./":15,urijs:838}],8:[function(e,t,n){"use strict";function r(e,t,n,r){var i,a,o=n.apiRoot;return t.$on("reload:data",function(){i=null}),{clusters:a,getClusters:function(){if(i)return i;var n=o+"systems?type=cluster&product=osp"+r.current("&");return i=e.get(n).then(function(e){return a=e.data,t.$broadcast("clusters:loaded",a),e})},getClusterReports:function(t){return e.get(o+"reports?system_id="+t+"&type=all&product=osp")}}}r.$inject=["$http","$rootScope","InsightsConfig","AccountService"],e("./").factory("Cluster",r)},{"./":15}],9:[function(e,t,n){"use strict";function r(e,t,n){var r=t.apiRoot;return{getDigest:function(t){var i=r+"digests/"+t+n.current();return e.get(i)},getDigestsByType:function(t){var i=r+"digests?remote_branch=-2&digest_type_id="+t+n.current("&");return e.get(i)}}}r.$inject=["$http","InsightsConfig","AccountService"],e("./").factory("Digest",r)},{"./":15}],10:[function(e,t,n){"use strict";function r(e,t){var n=t.apiRoot,r={};return r.getEvaluationStatus=function(){var t=a(n).segment("evaluation").segment("status").toString();return e.get(t).then(function(e){return e.data})},r.activate=function(t){var r=a(n).segment("evaluation").toString();return e.post(r,{type:t}).then(function(e){return e.data})},r}r.$inject=["$http","InsightsConfig"];var i=e("./"),a=e("urijs");i.factory("Evaluation",r)},{"./":15,urijs:838}],11:[function(e,t,n){"use strict";function r(e,t){var n=t.apiRoot,r={};return r.create=function(t){var r=a(n).segment("evaluation_invite").toString();return e.post(r,t).then(function(e){return e.data})},r.getAll=function(){var t=a(n).segment("evaluation_invite").toString();return e.get(t).then(function(e){return e.data})},r}r.$inject=["$http","InsightsConfig"];var i=e("./"),a=e("urijs");i.factory("EvaluationInvite",r)},{"./":15,urijs:838}],12:[function(e,t,n){"use strict";function r(e,t,n,r){return{getReports:function(e,i,o,s){var c=a(t.apiRoot);c.segment("exports"),c.segment("reports"),e&&c.addSearch("topic",e),i&&c.addSearch("rules",i),o&&c.addSearch("group",o),void 0!==s&&c.addSearch("stale",s),c.addSearch(n.queryParam()),r.location.assign(c.toString())},getSystems:function(e,i,o){var s=a(t.apiRoot);s.segment("exports"),s.segment("systems"),e&&s.addSearch("group",e),void 0!==i&&s.addSearch("stale",i),o&&s.addSearch("search",o),s.addSearch(n.queryParam()),r.location.assign(s.toString())}}}r.$inject=["$http","InsightsConfig","AccountService","$window"];var i=e("./"),a=e("urijs");i.factory("Export",r)},{"./":15,urijs:838}],13:[function(e,t,n){"use strict";function r(e,t){var n=t.apiRoot;return{sendFeedback:function(t){var r=n+"feedback";return e.post(r,t)}}}r.$inject=["$http","InsightsConfig"],e("./").factory("Feedback",r)},{"./":15}],14:[function(e,t,n){"use strict";function r(e,t,n,r,i){function a(){return e.get(l+"groups?include=systems"+i.current("&")).success(function(e){u.length=0,Array.prototype.push.apply(u,e)})}function o(e,t){for(var n=u.length,r=0;r<n;r++)if(u[r].id===e.id)for(var i=u[r].systems.length,a=0;a<i;a++)if(u[r].systems[a].system_id===t.system_id)return void u[r].systems.splice(a,1)}function s(t,n){return o(t,n),e.delete(l+"groups/"+t.id+"/systems/"+n.system_id+i.current())}function c(e){for(var t=u.length,n=0;n<t;n++)if(u[n].id===e.id)return void u.splice(n,1)}var l=r.apiRoot,u=[],d={},p=!1;return n.$on("reload:data",a),{init:function(){p||(a(),p=!0)},groups:u,current:function(){return d},appendCurrentGroup:function(e){var t=d;return t&&t.id&&(e+="&group="+t.id),e},setCurrent:function(e){d=e||{},n.$broadcast("group:change",e)},removeSystem:s,removeSystems:function(e,n){var r=[];return angular.forEach(n,function(t){r.push(s(e,{system_id:t}))}),t.all(r)},addSystems:function(t,n){return t.systems||(t.systems=[]),Array.prototype.push.apply(t.systems,n),e.put(l+"groups/"+t.id+"/systems"+i.current(),n)},createGroup:function(n){var r=t.defer();return e.post(l+"groups"+i.current(),n).then(function(e){n.display_name="";var t=e.data;201===e.status&&(t.systems=[],u.push(t)),r.resolve(t)}),r.promise},deleteGroup:function(t){return c(t),e.delete(l+"groups/"+t.id+i.current())},reload:a,queryParam:function(){return d&&d.id?{group:d.id}:{}}}}r.$inject=["$http","$q","$rootScope","InsightsConfig","AccountService"],e("./").factory("Group",r)},{"./":15}],15:[function(e,t,n){"use strict";t.exports=angular.module("insights.api",[]),function(){var t=e("./index.js");t.account_settings=e("./account_settings.js"),t.account=e("./account.js"),t.ack=e("./ack.js"),t.analytic=e("./analytic.js"),t.announcement=e("./announcement.js"),t.article=e("./article.js"),t.blog=e("./blog.js"),t.cluster=e("./cluster.js"),t.digest=e("./digest.js"),t.evaluation_invite=e("./evaluation_invite.js"),t.evaluation=e("./evaluation.js"),t.export=e("./export.js"),t.feedback=e("./feedback.js"),t.group=e("./group.js"),t.index=e("./index.js"),t.maintenance=e("./maintenance.js"),t.messaging=e("./messaging.js"),t.permission=e("./permission.js"),t.plugin=e("./plugin.js"),t.policy=e("./policy.js"),t.report=e("./report.js"),t.rule=e("./rule.js"),t.stats=e("./stats.js"),t.subset=e("./subset.js"),t.system=e("./system.js"),t.topic=e("./topic.js"),t.user_permissions=e("./user_permissions.js"),t.user_settings=e("./user_settings.js"),t.user=e("./user.js"),t.webhooks=e("./webhooks.js")}()},{"./account.js":1,"./account_settings.js":2,"./ack.js":3,"./analytic.js":4,"./announcement.js":5,"./article.js":6,"./blog.js":7,"./cluster.js":8,"./digest.js":9,"./evaluation.js":10,"./evaluation_invite.js":11,"./export.js":12,"./feedback.js":13,"./group.js":14,"./index.js":15,"./maintenance.js":16,"./messaging.js":17,"./permission.js":18,"./plugin.js":19,"./policy.js":20,"./report.js":21,"./rule.js":22,"./stats.js":23,"./subset.js":24,"./system.js":25,"./topic.js":26,"./user.js":27,"./user_permissions.js":28,"./user_settings.js":29,"./webhooks.js":30}],16:[function(e,t,n){"use strict";function r(e,t,n,r,i,s,c){function l(t){return e.get(u+"maintenance?filter="+t+n.current("&")).success(i.readArray(i.readPlan))}var u=t.apiRoot,d={};return d.getFutureMaintenancePlans=function(){return l("future")},d.getPastMaintenancePlans=function(){return l("past")},d.getOverdueMaintenancePlans=function(){return l("overdue")},d.getMaintenancePlans=function(){return e.get(u+"maintenance"+n.current()).then(function(e){return e.data.forEach(i.readPlan),e.data})},d.getMaintenancePlan=function(t){return e.get(u+"maintenance/"+t+n.current()).success(i.readPlan)},d.silence=function(e){return d.updatePlan(e.maintenance_id,{silenced:!0})},d.createPlan=function(t){return e.post(u+"maintenance"+n.current(),t)},d.updatePlan=function(t,r){return e.put(u+"maintenance/"+t+n.current(),r).then(function(){c.$broadcast(s.planner.planChanged,t)})},d.deletePlan=function(t){return e.delete(u+"maintenance/"+t.maintenance_id+n.current()).then(function(){c.$broadcast(s.planner.planDeleted,t.maintenance_id)})},d.addAction=function(t,r){return e.post(u+"maintenance/"+t+"/actions?report="+r+n.current("&"))},d.deleteAction=function(t,r){return e.delete(u+"maintenance/"+t+"/actions/"+r+n.current())},d.deleteActions=function(t,r){var i={delete:a(r,"id")};return e.put(u+"maintenance/"+t+n.current(),i)},d.exportPlan=function(e){var t=u+"maintenance/"+e+"?accept=csv"+n.current("&");r.location.assign(t)},d.generatePlaybook=function(t,r){r=r||{};var i=o(u);return i.segment("maintenance"),i.segment(String(t)),i.segment("playbook"),i.addSearch(n.queryParam()),e.post(i.toString(),r)},d.downloadPlaybook=function(t){var r=o(u);return r.segment("maintenance"),r.segment(String(t)),r.segment("playbook"),r.addSearch(n.queryParam()),e.get(r.toString())},d.SUGGESTION=Object.freeze({PROPOSED:"proposed",ACCEPTED:"accepted",REJECTED:"rejected"}),d.getPlayMetadata=function(t){var r=o(u);return r.segment("maintenance"),r.segment(String(t)),r.segment("playbook"),r.segment("plays"),r.addSearch(n.queryParam()),e.get(r.toString())},d.saveResolutionPreference=function(t,r,i,a){var s=o(u);return s.segment("maintenance"),s.segment(String(t)),s.segment("playbook"),s.segment("plays"),s.segment(r),s.segment(String(i)),s.addSearch(n.queryParam()),e.put(s.toString(),{resolution_type:a})},d}r.$inject=["$http","InsightsConfig","AccountService","$window","DataUtils","Events","$rootScope"];var i=e("./"),a=e("lodash/map"),o=e("urijs");i.factory("Maintenance",r)},{"./":15,"lodash/map":532,urijs:838}],17:[function(e,t,n){"use strict";function r(e,t){function n(){return e.get(a+"messaging/campaigns")}function r(t){return e.post(a+"messaging/users",t)}function i(){return e.post(a+"messaging/optin",{autoOptedIn:!0})}var a=t.apiRoot;return{getCampaigns:n,saveCampaigns:r,saveOptedIn:i}}r.$inject=["$http","InsightsConfig"],e("./").factory("Messaging",r)},{"./":15}],18:[function(e,t,n){"use strict";function r(e,t){var n=t.apiRoot+"permissions/:permissionId",r={permissionId:"@id"},i=e(n,r);return i.init=function(){i.initial=i.query().$promise},i}r.$inject=["$resource","InsightsConfig"],e("./").factory("Permission",r)},{"./":15}],19:[function(e,t,n){"use strict";function r(e,t){return{update:function(n,r){return e.put(t.apiRoot+"plugins/"+n,r)}}}r.$inject=["$http","InsightsConfig"],e("./").factory("Plugin",r)},{"./":15}],20:[function(e,t,n){"use strict";function r(e,t,n){var r=n.apiRoot;return{getAll:function(n){var i=a(r);return i.segment("policies"),i.addSearch(t.queryParam()),n&&i.addSearch(n),e.get(i.toString())},getPolicy:function(n){var i=a(r);return i.segment("policies"),i.segment(n),i.addSearch(t.queryParam()),e.get(i.toString())},getPolicyResults:function(n,i){var o=a(r);return o.segment("policies"),o.segment(n),o.segment("results"),o.addSearch(t.queryParam()),i&&o.addSearch(i),e.get(o.toString())},update:function(n,i){var o=a(r);return o.segment("policies"),o.segment(n),o.addSearch(t.queryParam()),e.patch(o.toString(),i)}}}r.$inject=["$http","AccountService","InsightsConfig"];var i=e("./"),a=e("urijs");i.factory("Policy",r)},{"./":15,urijs:838}],21:[function(e,t,n){"use strict";function r(e,t,n,r,i,a,o,s,c){var l,u=r.apiRoot;return t.$on("reload:data",function(){l=null}),{groupByHost:function(){return e.get(u+"reports?accept=host"+i.current("&"))},exportReports:function(e){var t=r.apiPrefix+"v1/",o=t+"reports?accept=csv"+i.current("&");e&&(o+="&category="+e),o=a.appendCurrentGroup(o),n.location.assign(o)},ruleReports:function(t,n){t=encodeURIComponent(t);var r=n?"rule_id=":"rule=",o=u+"reports?"+r+t+i.current("&");return o=a.appendCurrentGroup(o),n&&(o+="&"+n+"=true"),o=s.appendProductToUrl(o,"all"),e.get(o)},headReports:function(t){var n=u+"reports";return n+=i.current("?"),n=o.addQueryToUrl(n,t),e.head(n)},getAllReports:function(){return e.get(u+"reports?type=all&expand=system,rule"+i.current("&")).then(function(e){return e.data.resources.forEach(c.readReport),e.data.resources})},getReportsLatest:function(t){var n=u+"reports";return n+=i.current("?"),n=o.addQueryToUrl(n,t),e.get(n)},getReports:function(t){return t=t||"rhel",e.get(u+"reports?product="+t+i.current("&")).success(c.readArray(c.readReport))}}}r.$inject=["$http","$rootScope","$window","InsightsConfig","AccountService","Group","Utils","PreferenceService","DataUtils"],e("./").factory("Report",r)},{"./":15}],22:[function(e,t,n){"use strict";function r(e,t,n,r,i,o,s){var c=i.apiRoot;return{getRulesLatest:function(t){var r=c+"rules";return r+=n.current("?"),r=s.addQueryToUrl(r,t),e.get(r)},plugins:function(){return e.get(c+"rules?plugins=true")},summary:function(){var t=c+"rules?summary=true"+n.current("&");return t=o.appendProductToUrl(t,"all"),e.get(t)},admin:function(){return e.get(c+"rules/admin?internal=true")},create:function(t){return e.post(c+"rules?internal=true",t)},update:function(e){throw new Error("updates not supported")},delete:function(t){var n=encodeURIComponent(t.rule_id);return e.delete(c+"rules/"+n+"?internal=true")},preview:function(t,n){return e.post(c+"rules/preview?internal=true",{rule:t,debug:n})},byId:function(t,n){return t=encodeURIComponent(t),e.get(c+"rules/"+t,{cache:!0!==n})},getAvailableTags:function(){return e.get(c+"rules/tags")},deleteTag:function(t){return e.delete(c+"rules/tags/"+encodeURIComponent(t))},updateTag:function(e){throw new Error("updates not supported")},exportRules:function(){t.location.assign(c+"rules/admin?internal=true&accept=csv")},listAnsibleResolutions:function(t,n){var r=a(c);return r.segment("rules"),r.segment(t),r.segment("ansible-resolutions"),r.segment(String(n)),e.get(r.toString())},getRulesWithHits:function(t){var i=a(c);return i.segment("rules"),i.addSearch("report_count","gt0"),i.addSearch(n.queryParam()),void 0!==t&&i.addSearch({group:t}),e.get(i.toString()).success(function(e){e.resources.forEach(r.readRule)})}}}r.$inject=["$http","$window","AccountService","DataUtils","InsightsConfig","PreferenceService","Utils"];var i=e("./"),a=e("urijs");i.factory("Rule",r)},{"./":15,urijs:838}],23:[function(e,t,n){"use strict";function r(e,t,n,r){function i(e,i){var o=a(t.apiRoot);return o.segment("stats"),e&&o.segment(e),o.addSearch(n.queryParam()),o.addSearch(r.queryParam()),i&&o.addSearch(i),o.toString()}return{getAll:function(t){return e.get(i(null,t))},getSystems:function(t){return e.get(i("systems",t))},getRules:function(t){return e.get(i("rules",t))}}}r.$inject=["$http","InsightsConfig","AccountService","Group"];var i=e("./"),a=e("urijs");i.factory("Stats",r)},{"./":15,urijs:838}],24:[function(e,t,n){"use strict";function r(e,t,n,r){var i=t.apiRoot;return{create:function(t,r){var o=a(i);return o.segment("subsets"),o.addSearch(n.queryParam()),e.post(o.toString(),{branch_id:t,system_ids:r})},getRulesWithHits:function(t){var o=a(i);return o.segment("subsets"),o.segment(t),o.segment("rules"),o.addSearch("report_count","gt0"),o.addSearch(n.queryParam()),e.get(o.toString()).success(function(e){e.resources.forEach(r.readRule)})}}}r.$inject=["$http","InsightsConfig","AccountService","DataUtils"];var i=e("./"),a=e("urijs");i.factory("Subset",r)},{"./":15,urijs:838}],25:[function(e,t,n){"use strict";function r(e,t,n,r,i,s,c,l,u,d,p){function f(e){return e.product_code===u.docker.code?e.role===u.docker.roles.host.code?(e.imageClass=u.docker.roles.host.icon,e.displayName=u.docker.roles.host.fullName,e.displayNameShort=u.docker.shortName2+" "+u.docker.roles.host.shortName):e.role===u.docker.roles.container.code?(e.imageClass=u.docker.roles.container.icon,e.displayName=u.docker.roles.container.fullName,e.displayNameShort=u.docker.roles.container.shortName):e.role===u.docker.roles.image.code&&(e.imageClass=u.docker.roles.image.icon,e.displayName=u.docker.roles.image.fullName,e.displayNameShort=u.docker.shortName2+" "+u.docker.roles.image.shortName):e.product_code===u.ocp.code?e.role===u.ocp.roles.cluster.code?(e.imageClass=u.ocp.roles.cluster.icon,e.displayName=u.ocp.roles.cluster.fullName,e.displayNameShort=u.ocp.shortName+" "+u.ocp.roles.cluster.shortName):e.role===u.ocp.roles.master.code?(e.imageClass=u.ocp.roles.master.icon,e.displayName=u.ocp.roles.master.fullName,e.displayNameShort=u.ocp.shortName+" "+u.ocp.roles.master.shortName):e.role===u.ocp.roles.node.code&&(e.imageClass=u.ocp.roles.node.icon,e.displayName=u.ocp.roles.node.fullName,e.displayNameShort=u.ocp.shortName+" "+u.ocp.roles.node.shortName):e.product_code===u.osp.code?e.role===u.osp.roles.controller.code?(e.imageClass=u.osp.roles.controller.icon,e.displayName=u.osp.roles.controller.fullName,e.displayNameShort=u.osp.shortName+" "+u.osp.roles.controller.shortName):e.role===u.osp.roles.compute.code?(e.imageClass=u.osp.roles.compute.icon,e.displayName=u.osp.roles.compute.fullName,e.displayNameShort=u.osp.shortName+" "+u.osp.roles.compute.shortName):e.role===u.osp.roles.director.code?(e.imageClass=u.osp.roles.director.icon,e.displayName=u.osp.roles.director.fullName,e.displayNameShort=u.osp.shortName+" "+u.osp.roles.director.shortName):e.role===u.osp.roles.cluster.code&&(e.imageClass=u.osp.roles.cluster.icon,e.displayName=u.osp.roles.cluster.fullName,e.displayNameShort=u.osp.shortName+" "+u.osp.roles.cluster.shortName):e.product_code===u.rhev.code?e.role===u.rhev.roles.manager.code?(e.imageClass=u.rhev.roles.manager.icon,e.displayName=u.rhev.roles.manager.fullName,e.displayNameShort=u.rhev.shortName+" "+u.rhev.roles.manager.shortName):e.role===u.rhev.roles.hypervisor.code?(e.imageClass=u.rhev.roles.hypervisor.icon,e.displayName=u.rhev.roles.hypervisor.fullName,e.displayNameShort=u.rhev.shortName+" "+u.rhev.roles.hypervisor.shortName):e.role===u.rhev.roles.cluster.code&&(e.imageClass=u.rhev.roles.cluster.icon,e.displayName=u.rhev.roles.cluster.fullName,e.displayNameShort=u.rhev.shortName+" "+u.rhev.roles.cluster.shortName):e.product_code===u.rhel.code&&(e.imageClass=u.rhel.icon,e.displayName=u.rhel.fullName,e.displayNameShort=u.rhel.shortName),e}function h(e){for(var t=0;t<e.length;t++)e[t]=f(e[t]);return e}var m,g,v=r.apiRoot;return n.$on("reload:data",function(){m=null}),{ackStaleSystems:function(){var t=v+"systems/stale/ack";return t+=i.current("?"),e.put(t)},getSingleSystem:function(t){var n=v+"systems/"+t;return n+=i.current("?"),e.get(n)},getSystemTypes:function(){var t=v+"system_types";return e.get(t).then(function(e){return h(e.data),e})},getSystems:function(){var t;return m||(t=v+"systems"+i.current(),m=e.get(t))},getSystemLinks:function(t,n){var r=v+"systems/"+encodeURIComponent(t)+"/links";return r+=i.current("?"),r=c.addQueryToUrl(r,n),e.get(r)},headSystemsLatest:function(t){var n=v+"systems";return n+=i.current("?"),n=c.addQueryToUrl(n,t),e.head(n)},getSystemsLatest:function(t){var n=v+"systems";return n+=i.current("?"),n=c.addQueryToUrl(n,t),e.get(n)},getSystemStatus:function(t){var n;return!t&&g?g:(n=v+"systems/status"+i.current(),n=d.appendProductToUrl(n,"machine"),g=e.get(n))},getSystemSummary:function(t){var n,r=v+"systems?summary=true"+i.current("&");return r=d.appendProductToUrl(r,"machine"),n=s.current(),n&&n.id&&(r+="&group="+n.id),r=c.addQueryToUrl(r,t),e.get(r)},getSystemReports:function(t){return e.get(v+"systems/"+encodeURIComponent(t)+"/reports"+i.current()).success(function(e){e.reports.forEach(function(e){return p.readRule(e.rule)})})},getSystemMetadata:function(t){return e.get(v+"systems/"+encodeURIComponent(t)+"/metadata"+i.current())},deleteSystem:function(t){return g=null,e.delete(v+"systems/"+encodeURIComponent(t)+i.current())},populateOCPDeployments:function(){var e={product_code:"ocp",role:"cluster"};return this.getSystemsLatest(e).then(function(e){var t,n;e&&e.data&&e.data.resources&&(n=e.data.resources,n.splice(0,0,{display_name:"All Deployments",system_id:"all"}),l.setOCPDeployments(n),l.getSelectedOCPDeployment().system_id?(t=a(l.getOCPDeployments(),{system_id:l.getSelectedOCPDeployment().system_id}),l.setSelectedOCPDeployment(t)):l.setSelectedOCPDeployment(n[0]))})},populateOSPDeployments:function(){var e={product_code:"osp",role:"cluster"};return this.getSystemsLatest(e).then(function(e){var t,n;e&&e.data&&e.data.resources&&(n=e.data.resources,n.splice(0,0,{display_name:"All Deployments",system_id:"all"}),l.setOSPDeployments(n),l.getSelectedOSPDeployment().system_id?(t=a(l.getOSPDeployments(),{system_id:l.getSelectedOSPDeployment().system_id}),l.setSelectedOSPDeployment(t)):l.setSelectedOSPDeployment(n[0]))})},populateDockerHosts:function(){var e={product_code:"docker",role:"host"};return this.getSystemsLatest(e).then(function(e){var t,n;e&&e.data&&e.data.resources&&(n=e.data.resources,n.splice(0,0,{hostname:"All Hosts",system_id:"all"}),l.setDockerHosts(n),l.getSelectedDockerHost().system_id?(t=a(l.getDockerHosts(),{system_id:l.getSelectedDockerHost().system_id}),l.setSelectedDockerHost(t)):l.setSelectedDockerHost(n[0]))})},getProductSpecificData:function(){var e;return"docker"===l.getSelectedProduct()?this.populateDockerHosts():"osp"===l.getSelectedProduct()?this.populateOSPDeployments():(e=t.defer(),e.resolve(),e.promise)},getSystemGroups:function(t){var n=o(r.apiRoot);return n.segment("systems"),n.segment(t),n.segment("groups"),n.addSearch(i.queryParam()),e.get(n.toString())},update:function(t,n){var r=o(v);return r.segment("systems"),r.segment(t),r.addSearch(i.queryParam()),e.put(r.toString(),n)},getSystemPolicies:function(t){var n=o(v);return n.segment("systems"),n.segment(t),n.segment("policies"),n.addSearch(i.queryParam()),e.get(n.toString())}}}r.$inject=["$http","$q","$rootScope","InsightsConfig","AccountService","Group","Utils","FilterService","Products","PreferenceService","DataUtils"];var i=e("./"),a=e("lodash/find"),o=e("urijs");i.factory("System",r)},{"./":15,"lodash/find":502,urijs:838}],26:[function(e,t,n){"use strict";function r(e,t,n,r,i){var o=n.apiRoot;return{getAll:function(t,n){var s=t||{},c=a(o+"topics"+r.current()).addSearch(s);return angular.isDefined(n)&&c.addSearch("limit",n),c.addSearch(i.queryParam()),e.get(c.toString())},admin:function(){return e.get(o+"topics/admin")},get:function(t,n,s){var c=a(o+"topics/"+t+r.current());return n&&c.addSearch("product",n),s&&c.addSearch("include",s),c.addSearch(i.queryParam()),e.get(c.toString())},create:function(t){return e.post(o+"topics",t)},update:function(t){return e.put(o+"topics/"+t.id,t)},preview:function(t){return e.post(o+"topics/preview",t)},remove:function(t){return e.delete(o+"topics/"+t)}}}r.$inject=["$http","$q","InsightsConfig","AccountService","Group"];var i=e("./"),a=e("urijs");i.factory("Topic",r)},{"./":15,urijs:838}],27:[function(e,t,n){"use strict";function r(e,t,n,r,i,s){function c(){return r.absUrl().indexOf("insightsbeta")>-1}function l(){t.get(i.apiRoot+"me").success(function(t){angular.extend(d,t),d.permissions=a(d.permissions,"code"),d.is_super=d.is_internal,d.current_entitlements&&d.current_entitlements.unlimitedRHEL&&(d.current_entitlements.systemLimitReached=!1),null!==window.localStorage.getItem("insights:user:isInternal")&&!0===d.is_super&&(d.is_internal="true"===window.localStorage.getItem("insights:user:isInternal")),d.loaded=!0,s.set("loaded",!0,!1),o.tryFakeUser(d),e.$broadcast("user:loaded"),"true"===window.localStorage.getItem("tapi:demo")&&(d.is_internal=!1,d.demo_mode=!0),u.resolve(d)})}var u,d={loaded:!1};return{init:function(){return angular.isDefined(u)||(u=n.defer(),l()),u.promise},current:d,asyncCurrent:function(e){if(d&&d.loaded)return e(d);u&&u.promise&&u.promise.then(e)},isOnOSPWhitelist:function(){var e=!1;return!!c()&&(d&&d.current_entitlements&&(e=d.current_entitlements.whitelist.osp),e)}}}r.$inject=["$rootScope","$http","$q","$location","InsightsConfig","PreferenceService"];var i=e("./"),a=e("lodash/keyBy"),o={};o.tryFakeUser=function(e){var t;try{t=JSON.parse(window.localStorage.getItem("insights:fake:entitlements")),void 0!==t&&null!==t&&(e.current_entitlements=t)}catch(e){}},i.factory("User",r)},{"./":15,"lodash/keyBy":528}],28:[function(e,t,n){"use strict";function r(e,t){var n=t.apiRoot+"user_permissions/:userPermissionId",r={userPermissionId:"@id"},i=e(n,r);return i.init=function(){i.initial=i.query().$promise},i}r.$inject=["$resource","InsightsConfig"],e("./").service("UserPermissions",r)},{"./":15}],29:[function(e,t,n){"use strict";function r(e,t){var n=t.apiRoot;return{update:function(t){return e.post(n+"me/settings",t)}}}r.$inject=["$http","InsightsConfig"],e("./").factory("UserSettings",r)},{"./":15}],30:[function(e,t,n){"use strict";function r(e,t,n){function r(e){var n=a(i);return n.segment("webhooks"),e&&n.segment(String(e)),n.addSearch(t.queryParam()),n}var i=n.apiRoot;return{get:function(t){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=r(t);return n&&i.addSearch("include","status"),e.get(i.toString())},create:function(t){return e.post(r().toString(),o(t,s))},ping:function(){return e.post(r("ping").toString())},update:function(t){return e.put(r(t.id).toString(),o(t,s))},delete:function(t){return e.delete(r(t.id).toString())}}}r.$inject=["$http","AccountService","InsightsConfig"];var i=e("./"),a=e("urijs"),o=e("lodash/pick"),s=["active","url","firehose","event_types","certificate"];i.factory("Webhooks",r)},{"./":15,"lodash/pick":543,urijs:838}],31:[function(e,t,n){"use strict";function r(e){e.state("app",{templateUrl:"js/states/base/base.html",abstract:!0,controller:"AppCtrl"}),e.state("info",{templateUrl:"js/states/base/info.html",abstract:!0})}r.$inject=["$stateProvider"],t.exports=r},{}],32:[function(e,t,n){"use strict";function r(e,t,n,r,o,s,c,l){e.$on("$stateChangeSuccess",function(){t.clearHttpError()}),l.checkAndRedirect();var u=o.coerce(r.get("rh_locale"));n.setCurrentLanguage(u),a.locale(u),r.get("locale_debug")&&(n.debug=!0),u&&"en"!==u&&n.loadRemote("translations/"+u+"/"+u+".json"),i.process(s.get(),c)}r.$inject=["$rootScope","AlertService","gettextCatalog","$cookies","CoercionService","$state","InsightsConfig","BetaRedirectService"];var i=e("./state_customizer"),a=e("moment");e("moment/locale/ja"),t.exports=r},{"./state_customizer":222,moment:571,"moment/locale/ja":570}],33:[function(e,t,n){"use strict";function r(e,t,n,r,i){var a=window.sessionStorage.getItem(n.acctKey);e.showAccountSelector=function(){var t=e.user,n=i.PERMS;return!(!t||!t.permissions)&&(!!t.permissions[n.SU]||!!t.permissions[n.ACCOUNT_SWITCHER])},e.Utils=r,e.accountChange=function(e){e&&(window.sessionStorage.setItem(n.acctKey,e),window.location.reload())},e.reset=function(){e.user&&(e.account_number=e.user.account_number,e.user.is_internal&&(e.account_number=""+e.user.account_number),e.accountChange(e.account_number))},"true"===window.localStorage.getItem("tapi:demo")&&(a="6"),a&&(e.account_number=a),t.asyncCurrent(function(){e.user=t.current,e.isInternal!==e.user.is_internal&&(e.isInternal=e.user.is_internal),a||(e.account_number=e.user.account_number)}),e.changeInternal=function(){e.user.isInternal=e.isInternal,window.localStorage.setItem("insights:user:isInternal",JSON.stringify(e.user.isInternal)),window.location.reload()}}function i(){return{templateUrl:"js/components/accountSelect/accountSelect.html",restrict:"E",controller:r}}r.$inject=["$scope","User","InsightsConfig","Utils","PermissionService"],e("../").directive("accountSelect",i)},{"../":84}],34:[function(e,t,n){"use strict";function r(e,t,n){e.myActions=n.actions,t.$on("$stateChangeStart",function(){n.clear()})}function i(){return{templateUrl:"js/components/actionbar/actionbar.html",restrict:"E",replace:!0,controller:r}}r.$inject=["$scope","$rootScope","ActionbarService"],e("../").directive("actionbar",i)},{"../":84}],35:[function(e,t,n){"use strict";function r(e,t,n){e.goBack=function(){"app.actions-rule"===t.current.name?t.go("app.topic",{id:n.category}):"app.topic"===t.current.name&&t.go("app.actions")},e.$on("telemetry:esc",function(t){t.defaultPrevented||e.goBack()})}function i(){return{restrict:"EC",scope:{},controller:r}}r.$inject=["$scope","$state","$stateParams"],e("../../").directive("actionsBack",i)},{"../../":84}],36:[function(e,t,n){"use strict";function r(e,t,n){e.crumbs=n.crumbs,e.getCrumbs=n.get,e.crumbClick=function(e){t.go(e.state,e.params)}}function i(){return{templateUrl:"js/components/actions/actionsBreadcrumbs/actionsBreadcrumbs.html",restrict:"E",replace:!0,controller:r}}r.$inject=["$scope","$state","ActionsBreadcrumbs"],e("../../").directive("actionsBreadcrumbs",i)},{"../../":84}],37:[function(e,t,n){"use strict";function r(e,t,n,r,i,a,o,s,c,l,u,d,p,f,h,m,g,v,b,y,x,M,_,w,A,S,k,$,T){function C(){a.checkboxes.update(a.ruleSystems),a.checkboxes.totalChecked>0&&(a.noSystemsSelected=!1),a.allSelected=a.checkboxes.totalChecked>0&&!a.checkboxes.indeterminate,a.allSelected||(a.reallyAllSelected=!1)}function E(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return a.loadingSystems=!0,t&&a.pager.reset(),x.getActionsRulePage(e,a.pager).then(function(){a.ruleSystems=x.getRuleSystems(),a.totalRuleSystems=x.getTotalRuleSystems(),a.loadingSystems=!1})}function O(){a.loading=!0,a.loadingSystems=!0;var e=d.init(),n=w.get(s.category).success(function(e){l.setCrumb({label:e.title,state:"app.topic",params:{id:e.slug?e.slug:e.id}},1)}),i=M.getProductSpecificData(),o=x.initActionsRule(a.pager).then(function(){var e=x.getRuleDetails();e&&(a.ruleDetails=e,l.setCrumb({label:e.description,params:{category:s.category,rule:e.rule_id}},2)),a.ruleSystems=x.getRuleSystems(), a.totalRuleSystems=x.getTotalRuleSystems(),a.loadingSystems=!1});r.all([_.getSystemTypesAsync(),e,n,i,o]).finally(function(){a.loading=!1;var e=t.search().machine;if(e){var n={system_id:e};f.showSystemModal(n,!0)}})}function z(){A.asyncCurrent(function(){a.isInternal=A.current.is_internal}),a.checkboxes.reset(),a.predicate="toString",a.reverse=!1,u.setQueryParam("sort_field",a.predicate),u.setQueryParam("sort_direction",N[a.reverse]),a.pager=new S.Pager,a.pager.currentPage=t.search().page?t.search().page:a.pager.currentPage,a.pager.perPage=t.search().pageSize?t.search().pageSize:a.pager.perPage,O()}function L(){return a.reallyAllSelected?x.getAllSystems().filter(function(e){return!a.checkboxes.items.hasOwnProperty(e.system_id)||a.checkboxes.items.hasOwnProperty(e.system_id)&&!0===a.checkboxes.items[e.system_id]}):a.checkboxes.getSelected(a.ruleSystems)}var N={false:"ASC",true:"DESC"};a.allSelected=!1,a.config=p,a.getListType=h.getType,a.listTypes=h.types(),a.loading=!0,a.noSystemsSelected=!1,a.permalink=g.make,a.predicate="toString",a.reallyAllSelected=!1,a.reverse=!1,a.ruleSystems=[],a.QuickFilters=b,u.parseBrowserQueryParams(),u.setShowFilters(!1),u.setSearchTerm(""),a.setNoSystemsSelected=function(e){a.noSystemsSelected=e,e&&c(function(){a.permalink("noSystemsSelected",!0,50,500)},100)},a.$on("group:change",E),a.$on("filterService:doFilter",function(){"app.actions-rule"===o.current.name&&E()}),l.init(s),x.setRule(s.rule),a.loading=!0,a.loadingSystems=!0,a.search=function(e){u.setSearchTerm(e),u.doFilter()},a.checkboxes=new S.Checkboxes("system_id"),a.$watchCollection("checkboxes.items",C),a.plans=m.plans,a.showSystem=function(e){f.showSystemModal(e)},a.paginate=function(){a.pager.update(),t.search("page",a.pager.currentPage),t.search("pageSize",a.pager.perPage),E(!0,!1).then(function(){a.reallyAllSelected?a.checkboxes.checkboxChecked(!0,a.ruleSystems):a.checkboxes.reset()})},i.$on("productFilter:change",function(){"app.actions-rule"===o.current.name&&E()}),i.$on("reload:data",E),i.$on("group:change",E),a.$on("account:change",E),p.authenticate&&!v.get("loaded")?i.$on("user:loaded",z):z(),a.addToPlan=function(e){return function(){var t=a.checkboxes.getSelected(a.ruleSystems);if(a.setNoSystemsSelected(0===t.length),t.length)return e.apply(null,arguments)}}(function(e){var t=L();if(t.length){var n=x.getRuleDetails();m.showMaintenanceModal(t,n,e)}}),a.sort=function(e){return e===a.predicate?a.reverse=!a.reverse:(a.reverse=!1,"last_check_in"===e&&(a.reverse=!a.reverse)),a.predicate=e,u.setQueryParam("sort_field",a.predicate),u.setQueryParam("sort_direction",N[a.reverse]),a.resetPaging(),a.loadingSystems=!0,x.sortActionsRulePage(a.pager,a.predicate,a.reverse).then(function(){a.ruleSystems=x.getRuleSystems(),a.totalRuleSystems=x.getTotalRuleSystems(),a.loadingSystems=!1})},a.resetPaging=function(){a.checkboxes.reset(),a.pager.reset()},a.selectAll=function(){a.reallyAllSelected&&a.pager.perPage<a.totalRuleSystems&&(a.reallyAllSelected=!1)},a.reallySelectAll=function(){a.allSelected=!0,a.reallyAllSelected=!0,E(!1,!1)},a.deselectAll=function(){a.reallyAllSelected=!1,a.allSelected=!1,a.checkboxes.reset()},a.numberOfSelected=function(){if(a.reallyAllSelected){var e=x.getAllSystems();return e?e.length:0}return a.checkboxes.totalChecked},a.isIncident=d.isIncident,p.allowExport&&k.addExportAction(function(){$.getReports(null,s.rule,T.current().id)})}r.$inject=["$filter","$location","$modal","$q","$rootScope","$scope","$state","$stateParams","$timeout","ActionsBreadcrumbs","FilterService","IncidentsService","InsightsConfig","InventoryService","ListTypeService","MaintenanceService","PermalinkService","PreferenceService","QuickFilters","Report","RhaTelemetryActionsService","System","SystemsService","Topic","User","Utils","ActionbarService","Export","Group"],e("../../").controller("ActionsRuleCtrl",r)},{"../../":84}],38:[function(e,t,n){"use strict";function r(){return{templateUrl:"js/components/actions/actionsRuleFilters/actionsRuleFilters.html",restrict:"E",replace:!0}}e("../../").directive("actionsRuleFilters",r)},{"../../":84}],39:[function(e,t,n){"use strict";function r(e){window.setTimeout(e,1)}function i(e,t){return e/t*100}function a(e){return{low:i(e.info,e.total),medium:i(e.warn,e.total),high:i(e.error,e.total),critical:i(e.critical,e.total)}}function o(e){e.loaded=!1,e.max=0,e.$watchCollection("stats.rules",function(t){t&&(e.loaded=!1,r(function(){e.percentages=a(t),e.loaded=!0}))})}function s(){return{templateUrl:"js/components/actions/severitySummary/severitySummary.html",restrict:"E",scope:{stats:"="},controller:o}}o.$inject=["$scope"],e("../../").directive("severitySummary",s)},{"../../":84}],40:[function(e,t,n){"use strict";function r(){return{templateUrl:"js/components/actions/systemSummary/systemSummary.html",restrict:"E",scope:{stats:"="},link:function(e){e.loaded=!1,e.ratio=0,e.$watch("stats.systems",function(t){t&&t.total&&(e.ratio=100*t.affected/t.total,e.loaded=!0)},!0)}}}e("../../").directive("systemSummary",r)},{"../../":84}],41:[function(e,t,n){"use strict";function r(e,t,n,r,i,a,o,s,c){e.params={showAll:!0},a.init(e.params),e.announcements=a.announcements,e.canCreate=!1,e.permalink=s.make,n.announcementId&&r(function(){e.permalink(n.announcementId.toString(),10,30)},100),e.reload=function(){a.reload(e.params)},e.ackAnnouncement=function(e){a.acknowledge(e)},e.editAnnouncement=function(e){t.go("app.edit-announcement",{id:e.id})},e.deleteAnnouncement=function(e){i().then(function(){a.deleteAnnouncement(e)})},o.asyncCurrent(function(t){e.canCreate=t&&t.is_internal&&c.has(t,c.PERMS.CREATE_ANNOUNCEMENT)})}function i(){return{templateUrl:"js/components/announcements/announcementsScroll/announcementsScroll.html",restrict:"E",replace:!0,controller:r}}r.$inject=["$scope","$state","$stateParams","$timeout","sweetAlert","AnnouncementService","User","PermalinkService","PermissionService"],e("../../").directive("announcementsScroll",i)},{"../../":84}],42:[function(e,t,n){"use strict";function r(e,t){var n=t.getString("Use the Planner to generate an Ansible Playbook."),r=t.getString("This rule has Ansible support."),i=t.getString("This rules does not have Ansible support");e.$watch("value",function(t){t?e.white?(e.icon="static/images/l_ansible-white.svg",e.svgClass="white"):(e.icon="static/images/l_ansible-blue.svg",e.svgClass="supported",e.supportText="Ansible supported"):(e.icon="static/images/l_ansible-unsupported.svg",e.svgClass="unsupported",e.supportText="Ansible unsupported"),(e.showTooltip||void 0===e.showTooltip)&&(t?(e.tooltip=r,(e.showPlannerLine||void 0===e.showPlannerLine)&&(e.tooltip+=" "+n)):e.tooltip=i)}),e.supportText=e.positive?"Ansible unsupported":"Ansible supported"}function i(){return{scope:{value:"<",showTooltip:"<",showPlannerLine:"<",white:"<",hideLabel:"<"},templateUrl:"js/components/ansibleIcon/ansibleIcon.html",restrict:"E",replace:!0,controller:r}}r.$inject=["$scope","gettextCatalog"],e("../").directive("ansibleIcon",i)},{"../":84}],43:[function(e,t,n){"use strict";function r(e,t){e.switchVersion=function(e){e?t.goToBeta():t.goToStable()},e.switchStatus=function(){var t=window.localStorage.getItem("betaOptIn");t="false"===t,window.localStorage.setItem("betaOptIn",t),e.isOptedIn=t},e.leaveBeta=function(){e.switchStatus(!1),e.switchVersion(!1)},e.isOnBeta=function(){return window.insightsGlobal.isBeta},e.isOptedIn=JSON.parse(window.localStorage.getItem("betaOptIn"))}function i(){return{templateUrl:"js/components/betaSwitchButton/betaSwitchButton.html",restrict:"E",controller:r,replace:!0}}r.$inject=["$scope","BetaRedirectService"],e("../").directive("betaSwitchButton",i)},{"../":84}],44:[function(e,t,n){"use strict";function r(e,t,n,r,i){function a(){t.loadingAnnouncements=!0,i.init().then(function(){t.items=i.announcements.slice(0,i.announcements.length<7?i.announcements.length:6),t.unackedCount=i.unseen.count,t.loadingAnnouncements=!1})}switch(t.loadingAnnouncements=!0,t.selectAnnouncement=function(e){n.go("app.announcements",{announcementId:e.id})},t.ack=function(e){t.loadingAnnouncements=!0,i.acknowledge(e).then(function(){t.selectAnnouncement(e),t.loadingAnnouncements=!1})},t.type){case"announcements":a()}e.$on("announcement:changed",function(){a()})}function i(){return{templateUrl:"js/components/bullhorn/bullhorn.html",restrict:"E",replace:!0,scope:{type:"@type",icon:"@icon"},controller:r}}r.$inject=["$rootScope","$scope","$state","Announcement","AnnouncementService"],e("../").directive("bullhorn",i)},{"../":84}],45:[function(e,t,n){"use strict";function r(){return{templateUrl:"js/components/buttons/button-split/button-split.html",restrict:"E",replace:!0,controller:angular.noop,controllerAs:"ctrl",scope:{disabled:"=?ngDisabled"},transclude:{main:"buttonSplitMain",items:"buttonSplitItem"},link:function(e,t,n,r){r.classes=n.class,e.$watch("disabled",function(e){r.disabled=e})}}}function i(){return{templateUrl:"js/components/buttons/button-split/button-split-main.html",restrict:"E",replace:!1,transclude:!0,require:"^buttonSplit",link:function(e,t,n,r){e.ctrl=r}}}function a(){return{templateUrl:"js/components/buttons/button-split/button-split-item.html",restrict:"E",replace:!0,transclude:!0,require:"^buttonSplit"}}var o=e("../../");o.directive("buttonSplit",r),o.directive("buttonSplitItem",a),o.directive("buttonSplitMain",i)},{"../../":84}],46:[function(e,t,n){"use strict";function r(e,t,n,r){var i={},a={};i.toggleContent=function(){e.collapsed=!e.collapsed},e.collapsed=!angular.isDefined(e.initCollapsed)||Boolean(e.initCollapsed),t.generateAccessors(e,a),e.toggleContent=function(){e.expandable&&r.when(e.onToggle({ctx:{collapsing:!e.collapsed}})).then(i.toggleContent)},e.$on(n.cards.expandAll,function(){e.collapsed&&e.toggleContent()}),e.$on(n.cards.collapseAll,function(){e.collapsed||e.toggleContent()}),this.api=e}function i(e,t,n,r){e.card=r.api}function a(e,t,n,r){e.card=r.api}function o(e,t,n,r){e.card=r.api}function s(e,t,n,r){e.card=r.api}function c(){return{templateUrl:"js/components/card/card.html",restrict:"E",replace:!0,transclude:!0,controller:r,scope:{expandable:"@",initCollapsed:"=",onToggle:"&"},link:function(e,t){!function(e,t,n,r){e.$watch(n,function(e){e?t.addClass(r):t.removeClass(r)})}(e,t,"!collapsed","expanded")}}}function l(){return{templateUrl:"js/components/card/cardHeader.html",restrict:"E",replace:!0,transclude:!0,link:i,require:"^card"}}function u(){return{templateUrl:"js/components/card/cardHeaderExpandable.html",restrict:"E",replace:!0,transclude:!0,link:a,require:"^card"}}function d(){return{templateUrl:"js/components/card/cardContent.html",restrict:"E",replace:!0,transclude:!0,link:o,require:"^card"}}function p(){return{templateUrl:"js/components/card/cardFooter.html",restrict:"E",replace:!0,transclude:!0,link:s,require:"^card"}}s.$inject=["scope","element","attrs","card"],o.$inject=["scope","element","attrs","card"],a.$inject=["scope","element","attrs","card"],i.$inject=["scope","element","attrs","card"],r.$inject=["$scope","Utils","Events","$q"];var f=e("../");f.directive("card",c),f.directive("cardHeader",l),f.directive("cardHeaderExpandable",u),f.directive("cardContent",d),f.directive("cardFooter",p)},{"../":84}],47:[function(e,t,n){"use strict";function r(e,t,n,r,i,a,u,d,p,f,h,m){e.getSystemName=r.getSystemDisplayName,e.hostnameTitle=null,e.selected=!1,e.plans=h.plans.all,e.config=m,e.systemHostnameHover=function(t){var n=t.relatedTarget;!e.hostnameTitle&&n.offsetWidth<n.scrollWidth&&(e.hostnameTitle=e.system.hostname)},e.toggleContent=function(t){if(!t.collapsing){var n={includeSelf:!1};e.loading=!0,a.getSystemLinks(e.system.system_id,n).then(function(t){var n,r;t&&t.data&&t.data.resources&&d.getSystemTypesAsync().then(function(i){e.links=t.data.resources,n=l(e.links,function(e){return e.system_type_id}),r=[o(i,{product_code:u.osp.code,role:u.osp.roles.cluster.code}),o(i,{product_code:u.rhev.code,role:u.rhev.roles.cluster.code}),o(i,{product_code:u.ocp.code,role:u.ocp.roles.cluster.code}),o(i,{product_code:u.osp.code,role:u.osp.roles.director.code}),o(i,{product_code:u.rhev.code,role:u.rhev.roles.manager.code}),o(i,{product_code:u.ocp.code,role:u.ocp.roles.master.code}),o(i,{product_code:u.docker.code,role:u.docker.roles.host.code}),o(i,{product_code:u.osp.code,role:u.osp.roles.compute.code}),o(i,{product_code:u.osp.code,role:u.osp.roles.controller.code}),o(i,{product_code:u.rhev.code,role:u.rhev.roles.hypervisor.code}),o(i,{product_code:u.docker.code,role:u.docker.roles.container.code}),o(i,{product_code:u.docker.code,role:u.docker.roles.image.code}),o(i,{product_code:u.ocp.code,role:u.ocp.roles.node.code}),o(i,{product_code:u.rhel.code,role:u.rhel.roles.host.code})],e.linkGroups=c(n,function(e,t){return{priority:s(r,{id:parseInt(t)}),system_type_id:t,members:e}})})}).then(function(){e.loading=!1})}},e.getGroupPriority=function(e){return e.priority},e.hasFamilyMembers=function(){return!!(e.links&&e.links.length>0)},e.showActions=function(){i.showSystemModal(e.system)},e.unregister=function(){d.unregisterSelectedSystems([e.system])},n.asyncCurrent(function(){e.isInternal=n.current.is_internal})}function i(){return{templateUrl:"js/components/card/systemCard/systemCard.html",restrict:"E",replace:!0,controller:r,scope:{rule:"=",system:"=",checkboxes:"=",selectableVal:"=selectable",checkboxTooltipExp:"&checkboxTooltip"},link:function(e,t,n){n.checkboxTooltip?e.checkboxTooltip=e.checkboxTooltipExp({defaultTooltip:"Select System"}):e.checkboxTooltip="Select System",angular.isDefined(e.selectableVal)?e.selectable=e.selectableVal:e.selectable=!0}}}r.$inject=["$scope","$modal","User","Utils","InventoryService","System","Products","SystemsService","$q","AnsibleService","MaintenanceService","InsightsConfig"];var a=e("../../"),o=e("lodash/find"),s=e("lodash/findIndex"),c=e("lodash/map"),l=e("lodash/groupBy");a.animation(".slide",["$timeout",function(e){return{beforeAddClass:function(e,t,n){"ng-hide"===t?jQuery(e).slideUp(n):"no-border-bottom"===t&&jQuery(e).addClass("no-border-bottom")},removeClass:function(t,n,r){function i(){jQuery(t).css("overflow","visible"),r()}"ng-hide"===n?jQuery(t).hide().slideDown(i):"no-border-bottom"===n&&(jQuery(t).addClass("no-border-bottom"),e(function(){jQuery(t).removeClass("no-border-bottom")},399))}}}]),a.directive("systemCard",i)},{"../../":84,"lodash/find":502,"lodash/findIndex":503,"lodash/groupBy":508,"lodash/map":532}],48:[function(e,t,n){"use strict";function r(){return{scope:{category:"="},templateUrl:"js/components/categoryIcon/categoryIcon.html",restrict:"E",replace:!0}}e("../").directive("categoryIcon",r)},{"../":84}],49:[function(e,t,n){"use strict";function r(e,t,n){function r(){return"true"===window.localStorage.getItem("tapi:demo")}e.user=t.current,e.tmp={apiPrefix:n.apiPrefix,apiVersion:n.apiVersion,entitlements:{}},e.presets={apiPrefix:{default:n.defaultApiPrefix,local:"local/"},apiVersions:["v1","v2","v3"],entitlements:{paid:{unlimitedRHEL:!1,whitelist:{rhel:!1,osp:!1},totalRHEL:32,skus:[{skuName:"MCT3292",quantity:2,system_count:1,unlimited:!1}],activeSystemCount:1,systemLimitReached:!1},paidWithFewSystems:{unlimitedRHEL:!1,whitelist:{rhel:!1,osp:!1},totalRHEL:9,skus:[{skuName:"MCT3292",quantity:2,system_count:1,unlimited:!1}],activeSystemCount:1,systemLimitReached:!1},unpaid:{activeSystemCount:1,skus:[{skuName:"SER0482",quantity:2,system_count:0,unlimited:!1}],systemLimitReached:!1,totalRHEL:8,unlimitedRHEL:!1,whitelist:{osp:!1,rhel:!1}},unpaidSystemLimitReached:{activeSystemCount:10,skus:[{skuName:"SER0482",quantity:2,system_count:0,unlimited:!1}],systemLimitReached:!0,totalRHEL:10,unlimitedRHEL:!1,whitelist:{osp:!1,rhel:!1}},whitelisted:{whitelist:{rhel:!0,osp:!0}}}},e.getPretty=function(e){return JSON.stringify(e,null,2)},e.setEntitlements=function(){e.user.current_entitlements=e.presets.entitlements[e.tmp.tmpEnt],window.localStorage.setItem("insights:fake:entitlements",JSON.stringify(e.user.current_entitlements))},e.setEntitlementsByKey=function(t){var n;try{n=JSON.parse(e.tmp.entitlements[t]),e.user.current_entitlements[t]=n}catch(e){}},e.save=function(){window.localStorage.setItem("insights:apiVersion",e.tmp.apiVersion),window.localStorage.setItem("insights:apiPrefix",e.tmp.apiPrefix),window.location.reload()},e.injectNewKey=function(){e.user.current_entitlements[e.newKey]={}},e.getDemoModeButtonText=function(){return r()?"Disable Demo Mode":"Enable Demo Mode"},e.demoModeButtonOnClick=function(){r()?window.localStorage.setItem("tapi:demo",!1):window.localStorage.setItem("tapi:demo",!0),window.location.reload()}}function i(){return{templateUrl:"js/components/config/dev/dev.html",restrict:"E",scope:!1,controller:r}}r.$inject=["$scope","User","InsightsConfig"],e("../../").directive("configDev",i)},{"../../":84}],50:[function(e,t,n){"use strict";function r(e,t){t.getCampaigns().success(function(t){e.campaigns=t}),e.save=function(n){t.saveCampaigns(e.campaigns).then(function(){n.$setPristine()})}}function i(){return{templateUrl:"js/components/config/messaging/messaging.html",restrict:"EA",scope:{},controller:r}}r.$inject=["$scope","Messaging"],e("../../").directive("configMessaging",i)},{"../../":84}],51:[function(e,t,n){"use strict";function r(e,t,n,r,i,a){var l={};e.newPermission={},l.removeAll=function(n){var i=[];n.forEach(function(e){i.push(r.delete({userPermissionId:e.id}).$promise)}),t.all(i).finally(function(){e.init()})},e.isCreating=!1,e.addNewPermission=function(){var t;e.newPermission.permission_id=e.tmpPermission.id,t=new r(e.newPermission),t.$save().finally(function(){e.init()})},e.removeSingle=function(t){e.removeAll([{id:t.id}])},e.removeAll=function(e){var t={confirmButtonText:"Yes, delete it!"};e[0].sso_username===a.current.sso_username&&(t.text="Delete yourself?? Remember... no dumb here!"),n(t).then(function(){l.removeAll(e)})},e.init=function(){i.query().$promise.then(function(t){e.permissions=t}),r.query().$promise.then(function(t){e.users=c(s(t,"sso_username")),e.userMap=o(t,function(e){return e.sso_username})})},e.init()}function i(){