UNPKG

insights-frontend

Version:
137 lines 5.99 MB
var _typeof2=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?function(obj){return typeof obj;}:function(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};//'use strict'; // modules are defined as an array // [ module function, map of requireuires ] // // map of requireuires is short require name -> numeric require // // anything defined in a previous bundle is accessed via the // orig method which is the requireuire for previous bundles (function outer(modules,cache,entry){// Save the require from previous bundle to this closure if any var previousRequire=typeof require=='function'&&require;function newRequire(name,jumped){// UNSET DEFINE, BUT KEEP A REF var oldDefine=window.define;window.define=undefined;if(!cache[name]){if(!modules[name]){// if we cannot find the the module within our internal map or // cache jump to the current global require ie. the last bundle // that was added to the page. var currentRequire=typeof require=='function'&&require;if(!jumped&&currentRequire)return currentRequire(name,true);// If there are other bundles on this page the require from the // previous one is saved to 'previousRequire'. Repeat this as // many times as there are bundles until the module is found or // we exhaust the require chain. if(previousRequire)return previousRequire(name,true);var err=new Error('Cannot find module \''+name+'\'');err.code='MODULE_NOT_FOUND';throw err;}var m=cache[name]={exports:{}};modules[name][0].call(m.exports,function(x){var id=modules[name][1][x];return newRequire(id?id:x);},m,m.exports,outer,modules,cache,entry);}// RESET DEFINE window.define=oldDefine;return cache[name].exports;}for(var i=0;i<entry.length;i++){newRequire(entry[i]);}// Override the current require with this new one return newRequire;})({1:[function(require,module,exports){'use strict';Account.$inject=['$http','InsightsConfig','AccountService'];var apiModule=require('./');/** * @ngInject */function Account($http,InsightsConfig,AccountService){var root=InsightsConfig.apiRoot;return{getProducts:function getProducts(){var url=root+'account/products'+AccountService.current();return $http.get(url);}};}apiModule.factory('Account',Account);},{"./":15}],2:[function(require,module,exports){'use strict';AccountSettings.$inject=['$http','InsightsConfig'];var apiModule=require('./');/** * @ngInject */function AccountSettings($http,InsightsConfig){var root=InsightsConfig.apiRoot;return{get:function get(){return $http.get(root+'account/settings');},update:function update(settings){return $http.post(root+'account/settings',settings);}};}apiModule.factory('AccountSettings',AccountSettings);},{"./":15}],3:[function(require,module,exports){'use strict';Ack.$inject=['$http','$q','$rootScope','AccountService','InsightsConfig'];var apiModule=require('./');var indexBy=require('lodash/keyBy');/** * @ngInject */function Ack($http,$q,$rootScope,AccountService,InsightsConfig){var root=InsightsConfig.apiRoot;var _acks=[];var _ackMap={};var loaded=false;function getData(){var promise=$http.get(root+'acks'+'?include=rule'+AccountService.current('&')).success(function(acks){_acks.length=0;Array.prototype.push.apply(_acks,acks);angular.extend(_ackMap,indexBy(_acks,'rule_id'));});return promise;}$rootScope.$on('reload:data',getData);return{init:function init(){if(!loaded){getData();loaded=true;}},acks:_acks,ackMap:_ackMap,createAck:function createAck(rule){var dfd=$q.defer();$http.post(root+'acks'+AccountService.current(),{rule_id:rule.rule_id||rule.id}).success(function(ack){_acks.push(ack);_ackMap[ack.rule_id]=ack;$rootScope.$broadcast('reload:data');dfd.resolve(ack);});return dfd.promise;},deleteAck:function deleteAck(ack){return $http.delete(root+'acks/'+ack.id+AccountService.current()).success(function(){var len=_acks.length;for(var i=0;i<len;i++){if(_acks[i].id===ack.id){_acks.splice(i,1);delete _ackMap[ack.rule_id];$rootScope.$broadcast('reload:data');return;}}});},reload:getData};}apiModule.factory('Ack',Ack);},{"./":15,"lodash/keyBy":528}],4:[function(require,module,exports){'use strict';Analytic.$inject=['$http','InsightsConfig'];var apiModule=require('./');/** * @ngInject */function Analytic($http,InsightsConfig){var root=InsightsConfig.apiRoot;return{reports:function reports(){return $http.get(root+'analytics/reports');},systems:function systems(){return $http.get(root+'analytics/systems');}};}apiModule.factory('Analytic',Analytic);},{"./":15}],5:[function(require,module,exports){/*global require*/'use strict';Announcement.$inject=['$http','InsightsConfig'];var apiModule=require('./');var URI=require('urijs');/** * @ngInject */function Announcement($http,InsightsConfig){var root=InsightsConfig.apiRoot;var pub={};pub.getAnnouncements=function(params){var url=URI(root+'announcements');if(params){url.addSearch(params);}return $http.get(url.toString());};pub.byId=function(id){return $http.get(root+'announcements/'+id);};pub.bySlug=function(slug){return $http.get(root+'announcements/'+slug);};pub.createAnnouncement=function(announcement){return $http.post(root+'announcements?internal=true',announcement);};pub.updateAnnouncement=function(a){return $http.put(root+'announcements/'+a.id,a);};pub.deleteAnnouncement=function(announcement){return $http.delete(root+'announcements/'+announcement.id);};pub.acknowledge=function(a){return $http.post(root+'announcements/'+a.id+'/ack');};return pub;}apiModule.factory('Announcement',Announcement);},{"./":15,"urijs":838}],6:[function(require,module,exports){'use strict';Article.$inject=['$http','AccountService','InsightsConfig'];var apiModule=require('./');/** * @ngInject */function Article($http,AccountService,InsightsConfig){var root=InsightsConfig.apiRoot;return{getArticles:function getArticles(){return $http.get(root+'articles');},get:function get(id){return $http.get(root+'articles/'+(id||InsightsConfig.overviewKey));},update:function update(id,data){return $http.put(root+'articles/'+(id||InsightsConfig.overviewKey),data);},preview:function preview(data){return $http.post(root+'articles/preview',data);}};}apiModule.factory('Article',Article);},{"./":15}],7:[function(require,module,exports){'use strict';Blog.$inject=['$http'];var apiModule=require('./');var URI=require('urijs');/** * @ngInject */function Blog($http){var api={};api.subscribe=function(){var uri=URI('/api').segment('redhat_node').segment('2184921').segment('subscribe').toString();return $http.post(uri).then(function(res){return res.data;});};return api;}apiModule.factory('Blog',Blog);},{"./":15,"urijs":838}],8:[function(require,module,exports){'use strict';Cluster.$inject=['$http','$rootScope','InsightsConfig','AccountService'];var apiModule=require('./');/** * @ngInject */function Cluster($http,$rootScope,InsightsConfig,AccountService){var root=InsightsConfig.apiRoot;var _clusterDfd;var _clusters;$rootScope.$on('reload:data',function(){_clusterDfd=null;});return{clusters:_clusters,getClusters:function getClusters(){if(_clusterDfd){return _clusterDfd;}var url=root+'systems?type=cluster&product=osp'+AccountService.current('&');_clusterDfd=$http.get(url).then(function(response){_clusters=response.data;$rootScope.$broadcast('clusters:loaded',_clusters);return response;});return _clusterDfd;},getClusterReports:function getClusterReports(clusterid){return $http.get(root+'reports?system_id='+clusterid+'&type=all&product=osp');}};}apiModule.factory('Cluster',Cluster);},{"./":15}],9:[function(require,module,exports){'use strict';Digest.$inject=['$http','InsightsConfig','AccountService'];var apiModule=require('./');/** * @ngInject */function Digest($http,InsightsConfig,AccountService){var root=InsightsConfig.apiRoot;return{getDigest:function getDigest(digest_id){var url=root+'digests/'+digest_id+AccountService.current();return $http.get(url);},getDigestsByType:function getDigestsByType(digest_type_id){var url=root+'digests?remote_branch=-2&digest_type_id='+digest_type_id+AccountService.current('&');return $http.get(url);}};}apiModule.factory('Digest',Digest);},{"./":15}],10:[function(require,module,exports){'use strict';Evaluation.$inject=['$http','InsightsConfig'];var apiModule=require('./');var URI=require('urijs');/** * @ngInject */function Evaluation($http,InsightsConfig){var root=InsightsConfig.apiRoot;var api={};api.getEvaluationStatus=function(){var uri=URI(root).segment('evaluation').segment('status').toString();return $http.get(uri).then(function(res){return res.data;});};api.activate=function(type){var uri=URI(root).segment('evaluation').toString();return $http.post(uri,{type:type}).then(function(res){return res.data;});};return api;}apiModule.factory('Evaluation',Evaluation);},{"./":15,"urijs":838}],11:[function(require,module,exports){'use strict';EvaluationInvite.$inject=['$http','InsightsConfig'];var apiModule=require('./');var URI=require('urijs');/** * @ngInject */function EvaluationInvite($http,InsightsConfig){var root=InsightsConfig.apiRoot;var api={};api.create=function(invite){var uri=URI(root).segment('evaluation_invite').toString();return $http.post(uri,invite).then(function(res){return res.data;});};api.getAll=function(){var uri=URI(root).segment('evaluation_invite').toString();return $http.get(uri).then(function(res){return res.data;});};return api;}apiModule.factory('EvaluationInvite',EvaluationInvite);},{"./":15,"urijs":838}],12:[function(require,module,exports){'use strict';Export.$inject=['$http','InsightsConfig','AccountService','$window'];var apiModule=require('./');var URI=require('urijs');/** * @ngInject */function Export($http,InsightsConfig,AccountService,$window){return{getReports:function getReports(topic,rule,group,stale){var uri=URI(InsightsConfig.apiRoot);uri.segment('exports');uri.segment('reports');if(topic){uri.addSearch('topic',topic);}if(rule){uri.addSearch('rules',rule);}if(group){uri.addSearch('group',group);}if(stale!==undefined){uri.addSearch('stale',stale);}uri.addSearch(AccountService.queryParam());$window.location.assign(uri.toString());},getSystems:function getSystems(group,stale,search){var uri=URI(InsightsConfig.apiRoot);uri.segment('exports');uri.segment('systems');if(group){uri.addSearch('group',group);}if(stale!==undefined){uri.addSearch('stale',stale);}if(search){uri.addSearch('search',search);}uri.addSearch(AccountService.queryParam());$window.location.assign(uri.toString());}};}apiModule.factory('Export',Export);},{"./":15,"urijs":838}],13:[function(require,module,exports){'use strict';Feedback.$inject=['$http','InsightsConfig'];var apiModule=require('./');/** * @ngInject */function Feedback($http,InsightsConfig){var root=InsightsConfig.apiRoot;return{sendFeedback:function sendFeedback(feedback){var url=root+'feedback';return $http.post(url,feedback);}};}apiModule.factory('Feedback',Feedback);},{"./":15}],14:[function(require,module,exports){'use strict';Group.$inject=['$http','$q','$rootScope','InsightsConfig','AccountService'];var apiModule=require('./');/** * @ngInject */function Group($http,$q,$rootScope,InsightsConfig,AccountService){var root=InsightsConfig.apiRoot;var _groups=[];var _currentGroup={};var loaded=false;function getData(){return $http.get(root+'groups'+'?include=systems'+AccountService.current('&')).success(function(groups){_groups.length=0;Array.prototype.push.apply(_groups,groups);});}function _removeSystem(group,system){var len=_groups.length;for(var i=0;i<len;i++){if(_groups[i].id===group.id){var sysLen=_groups[i].systems.length;for(var j=0;j<sysLen;j++){if(_groups[i].systems[j].system_id===system.system_id){_groups[i].systems.splice(j,1);return;}}}}}function removeSystem(group,system){_removeSystem(group,system);return $http.delete(root+'groups/'+group.id+'/systems/'+system.system_id+AccountService.current());}function _removeGroup(group){var len=_groups.length;for(var i=0;i<len;i++){if(_groups[i].id===group.id){_groups.splice(i,1);return;}}}$rootScope.$on('reload:data',getData);return{init:function init(){if(!loaded){getData();loaded=true;}},groups:_groups,current:function current(){return _currentGroup;},appendCurrentGroup:function appendCurrentGroup(url){var group=_currentGroup;if(group&&group.id){url+='&group='+group.id;}return url;},setCurrent:function setCurrent(group){if(group){_currentGroup=group;}else{_currentGroup={};}$rootScope.$broadcast('group:change',group);},removeSystem:removeSystem,removeSystems:function removeSystems(group,systems){var dfdList=[];angular.forEach(systems,function(system){dfdList.push(removeSystem(group,{system_id:system}));});return $q.all(dfdList);},addSystems:function addSystems(group,systems){if(!group.systems){group.systems=[];}Array.prototype.push.apply(group.systems,systems);return $http.put(root+'groups/'+group.id+'/systems'+AccountService.current(),systems);},createGroup:function createGroup(newGroup){var dfd=$q.defer();$http.post(root+'groups'+AccountService.current(),newGroup).then(function(res){newGroup.display_name='';var group=res.data;if(res.status===201){group.systems=[];_groups.push(group);}dfd.resolve(group);});return dfd.promise;},deleteGroup:function deleteGroup(group){_removeGroup(group);return $http.delete(root+'groups/'+group.id+AccountService.current());},reload:getData,queryParam:function queryParam(){if(_currentGroup&&_currentGroup.id){return{group:_currentGroup.id};}return{};}};}apiModule.factory('Group',Group);},{"./":15}],15:[function(require,module,exports){'use strict';module.exports=angular.module('insights.api',[]);(function(){var f=require("./index.js");f["account_settings"]=require("./account_settings.js");f["account"]=require("./account.js");f["ack"]=require("./ack.js");f["analytic"]=require("./analytic.js");f["announcement"]=require("./announcement.js");f["article"]=require("./article.js");f["blog"]=require("./blog.js");f["cluster"]=require("./cluster.js");f["digest"]=require("./digest.js");f["evaluation_invite"]=require("./evaluation_invite.js");f["evaluation"]=require("./evaluation.js");f["export"]=require("./export.js");f["feedback"]=require("./feedback.js");f["group"]=require("./group.js");f["index"]=require("./index.js");f["maintenance"]=require("./maintenance.js");f["messaging"]=require("./messaging.js");f["permission"]=require("./permission.js");f["plugin"]=require("./plugin.js");f["policy"]=require("./policy.js");f["report"]=require("./report.js");f["rule"]=require("./rule.js");f["stats"]=require("./stats.js");f["subset"]=require("./subset.js");f["system"]=require("./system.js");f["topic"]=require("./topic.js");f["user_permissions"]=require("./user_permissions.js");f["user_settings"]=require("./user_settings.js");f["user"]=require("./user.js");f["webhooks"]=require("./webhooks.js");return f;})();},{"./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(require,module,exports){'use strict';Maintenance.$inject=['$http','InsightsConfig','AccountService','$window','DataUtils','Events','$rootScope'];var apiModule=require('./');var map=require('lodash/map');var URI=require('urijs');/** * @ngInject */function Maintenance($http,InsightsConfig,AccountService,$window,DataUtils,Events,$rootScope){var root=InsightsConfig.apiRoot;var api={};function getMaintenancePlans(filter){return $http.get(root+'maintenance?filter='+filter+AccountService.current('&')).success(DataUtils.readArray(DataUtils.readPlan));}api.getFutureMaintenancePlans=function(){return getMaintenancePlans('future');};api.getPastMaintenancePlans=function(){return getMaintenancePlans('past');};api.getOverdueMaintenancePlans=function(){return getMaintenancePlans('overdue');};api.getMaintenancePlans=function(){return $http.get(root+'maintenance'+AccountService.current()).then(function(res){res.data.forEach(DataUtils.readPlan);return res.data;});};api.getMaintenancePlan=function(id){return $http.get(root+'maintenance/'+id+AccountService.current()).success(DataUtils.readPlan);};api.silence=function(plan){return api.updatePlan(plan.maintenance_id,{silenced:true});};api.createPlan=function(plan){return $http.post(root+'maintenance'+AccountService.current(),plan);};api.updatePlan=function(planId,data){return $http.put(root+'maintenance/'+planId+AccountService.current(),data).then(function(){$rootScope.$broadcast(Events.planner.planChanged,planId);});};api.deletePlan=function(plan){return $http.delete(root+'maintenance/'+plan.maintenance_id+AccountService.current()).then(function(){$rootScope.$broadcast(Events.planner.planDeleted,plan.maintenance_id);});};api.addAction=function(planId,reportId){return $http.post(root+'maintenance/'+planId+'/actions?report='+reportId+AccountService.current('&'));};api.deleteAction=function(planId,actionId){return $http.delete(root+'maintenance/'+planId+'/actions/'+actionId+AccountService.current());};api.deleteActions=function(planId,actions){var data={delete:map(actions,'id')};return $http.put(root+'maintenance/'+planId+AccountService.current(),data);};api.exportPlan=function(planId){var url=root+'maintenance/'+planId+'?accept=csv'+AccountService.current('&');$window.location.assign(url);};api.generatePlaybook=function(planId,data){data=data||{};var url=URI(root);url.segment('maintenance');url.segment(String(planId));url.segment('playbook');url.addSearch(AccountService.queryParam());return $http.post(url.toString(),data);};api.downloadPlaybook=function(planId){var url=URI(root);url.segment('maintenance');url.segment(String(planId));url.segment('playbook');url.addSearch(AccountService.queryParam());return $http.get(url.toString());};api.SUGGESTION=Object.freeze({PROPOSED:'proposed',ACCEPTED:'accepted',REJECTED:'rejected'});api.getPlayMetadata=function(planId){var url=URI(root);url.segment('maintenance');url.segment(String(planId));url.segment('playbook');url.segment('plays');url.addSearch(AccountService.queryParam());return $http.get(url.toString());};api.saveResolutionPreference=function(planId,ruleId,systemTypeId,resolution){var url=URI(root);url.segment('maintenance');url.segment(String(planId));url.segment('playbook');url.segment('plays');url.segment(ruleId);url.segment(String(systemTypeId));url.addSearch(AccountService.queryParam());return $http.put(url.toString(),{resolution_type:resolution});};return api;}apiModule.factory('Maintenance',Maintenance);},{"./":15,"lodash/map":532,"urijs":838}],17:[function(require,module,exports){'use strict';Messaging.$inject=['$http','InsightsConfig'];var apiModule=require('./');/** * @ngInject */function Messaging($http,InsightsConfig){var root=InsightsConfig.apiRoot;function getCampaigns(){return $http.get(root+'messaging/campaigns');}function saveCampaigns(campaigns){return $http.post(root+'messaging/users',campaigns);}function saveOptedIn(){return $http.post(root+'messaging/optin',{autoOptedIn:true});}return{getCampaigns:getCampaigns,saveCampaigns:saveCampaigns,saveOptedIn:saveOptedIn};}apiModule.factory('Messaging',Messaging);},{"./":15}],18:[function(require,module,exports){'use strict';Permission.$inject=['$resource','InsightsConfig'];var apiModule=require('./');/** * @ngInject */function Permission($resource,InsightsConfig){var endpoint=InsightsConfig.apiRoot+'permissions/:permissionId';var params={permissionId:'@id'};var resource=$resource(endpoint,params);resource.init=function(){resource.initial=resource.query().$promise;};return resource;}apiModule.factory('Permission',Permission);},{"./":15}],19:[function(require,module,exports){'use strict';Plugin.$inject=['$http','InsightsConfig'];var apiModule=require('./');/** * @ngInject */function Plugin($http,InsightsConfig){return{update:function update(id,payload){return $http.put(InsightsConfig.apiRoot+'plugins/'+id,payload);}};}apiModule.factory('Plugin',Plugin);},{"./":15}],20:[function(require,module,exports){'use strict';Policy.$inject=['$http','AccountService','InsightsConfig'];var apiModule=require('./');var URI=require('urijs');/** * @ngInject */function Policy($http,AccountService,InsightsConfig){var policiesUri='policies';var policyResults='results';var root=InsightsConfig.apiRoot;return{getAll:function getAll(params){var url=URI(root);url.segment(policiesUri);url.addSearch(AccountService.queryParam());if(params){url.addSearch(params);}return $http.get(url.toString());},getPolicy:function getPolicy(id){var url=URI(root);url.segment(policiesUri);url.segment(id);url.addSearch(AccountService.queryParam());return $http.get(url.toString());},getPolicyResults:function getPolicyResults(id,params){var url=URI(root);url.segment(policiesUri);url.segment(id);url.segment(policyResults);url.addSearch(AccountService.queryParam());if(params){url.addSearch(params);}return $http.get(url.toString());},update:function update(id,data){var url=URI(root);url.segment(policiesUri);url.segment(id);url.addSearch(AccountService.queryParam());return $http.patch(url.toString(),data);}};}apiModule.factory('Policy',Policy);},{"./":15,"urijs":838}],21:[function(require,module,exports){'use strict';Report.$inject=['$http','$rootScope','$window','InsightsConfig','AccountService','Group','Utils','PreferenceService','DataUtils'];var apiModule=require('./');/** * @ngInject */function Report($http,$rootScope,$window,InsightsConfig,AccountService,Group,Utils,PreferenceService,DataUtils){var root=InsightsConfig.apiRoot;var _countDfd;$rootScope.$on('reload:data',function(){_countDfd=null;});return{groupByHost:function groupByHost(){return $http.get(root+'reports?accept=host'+AccountService.current('&'));},exportReports:function exportReports(category){// v1 is hardcoded here because v2 of the reports endpoint // does not support csv yet // TODO: csv support for v2 var v1Root=InsightsConfig.apiPrefix+'v1/';var url=v1Root+'reports?accept=csv'+AccountService.current('&');if(category){url+='&category='+category;}url=Group.appendCurrentGroup(url);$window.location.assign(url);},ruleReports:function ruleReports(rule_id,attr){rule_id=encodeURIComponent(rule_id);var ruleParam=attr?'rule_id=':'rule=';var url=root+'reports?'+ruleParam+rule_id+AccountService.current('&');url=Group.appendCurrentGroup(url);if(attr){url+='&'+attr+'=true';}url=PreferenceService.appendProductToUrl(url,'all');return $http.get(url);},headReports:function headReports(query){var url=root+'reports';url+=AccountService.current('?');url=Utils.addQueryToUrl(url,query);return $http.head(url);},/*************************************************************************** * XXX * Be very careful when making calls to /reports. Whenever possible, load * only the specific data you need to draw the view. GETing /reports will * download hundreds of megabytes of data for large accounts. ***************************************************************************/getAllReports:function getAllReports(){return $http.get(root+'reports?type=all&expand=system,rule'+AccountService.current('&')).then(function(res){res.data.resources.forEach(DataUtils.readReport);return res.data.resources;});},getReportsLatest:function getReportsLatest(query){var url=root+'reports';url+=AccountService.current('?');url=Utils.addQueryToUrl(url,query);return $http.get(url);},getReports:function getReports(product){product=product||'rhel';return $http.get(root+'reports?product='+product+AccountService.current('&')).success(DataUtils.readArray(DataUtils.readReport));}};}apiModule.factory('Report',Report);},{"./":15}],22:[function(require,module,exports){'use strict';Rule.$inject=['$http','$window','AccountService','DataUtils','InsightsConfig','PreferenceService','Utils'];var apiModule=require('./');var URI=require('urijs');/** * @ngInject */function Rule($http,$window,AccountService,DataUtils,InsightsConfig,PreferenceService,Utils){var root=InsightsConfig.apiRoot;return{getRulesLatest:function getRulesLatest(query){var url=root+'rules';url+=AccountService.current('?');url=Utils.addQueryToUrl(url,query);return $http.get(url);},plugins:function plugins(){return $http.get(root+'rules?plugins=true');},summary:function summary(){var url=root+'rules?summary=true'+AccountService.current('&');url=PreferenceService.appendProductToUrl(url,'all');return $http.get(url);},admin:function admin(){return $http.get(root+'rules/admin?internal=true');},create:function create(rule){return $http.post(root+'rules?internal=true',rule);},/*jshint unused:false*/update:function update(rule){throw new Error('updates not supported');/* var rule_id = encodeURIComponent(rule._rule_id || rule.rule_id); return $http.put(root + 'rules/' + rule_id + '?internal=true', rule); */},delete:function _delete(rule){var rule_id=encodeURIComponent(rule.rule_id);return $http.delete(root+'rules/'+rule_id+'?internal=true');},preview:function preview(rule,debug){return $http.post(root+'rules/preview?internal=true',{rule:rule,debug:debug});},byId:function byId(rule_id,skipCache){rule_id=encodeURIComponent(rule_id);return $http.get(root+'rules/'+rule_id,{cache:skipCache!==true});},getAvailableTags:function getAvailableTags(){return $http.get(root+'rules/tags');},deleteTag:function deleteTag(tagName){return $http.delete(root+'rules/tags/'+encodeURIComponent(tagName));},/*jshint unused:false*/updateTag:function updateTag(tag){throw new Error('updates not supported');/* return $http.put( root + 'rules/tags/' + encodeURIComponent(tag.name), {description: tag.description}); */},exportRules:function exportRules(){$window.location.assign(root+'rules/admin?internal=true&accept=csv');},listAnsibleResolutions:function listAnsibleResolutions(ruleId,systemTypeId){var url=URI(root);url.segment('rules');url.segment(ruleId);url.segment('ansible-resolutions');url.segment(String(systemTypeId));return $http.get(url.toString());},getRulesWithHits:function getRulesWithHits(group){var uri=URI(root);uri.segment('rules');uri.addSearch('report_count','gt0');uri.addSearch(AccountService.queryParam());if(group!==undefined){uri.addSearch({group:group});}return $http.get(uri.toString()).success(function(result){result.resources.forEach(DataUtils.readRule);});}};}apiModule.factory('Rule',Rule);},{"./":15,"urijs":838}],23:[function(require,module,exports){'use strict';Stats.$inject=['$http','InsightsConfig','AccountService','Group'];var apiModule=require('./');var URI=require('urijs');/** * @ngInject */function Stats($http,InsightsConfig,AccountService,Group){function buildUri(segment,params){var uri=URI(InsightsConfig.apiRoot);uri.segment('stats');if(segment){uri.segment(segment);}uri.addSearch(AccountService.queryParam());uri.addSearch(Group.queryParam());if(params){uri.addSearch(params);}return uri.toString();}return{getAll:function getAll(params){return $http.get(buildUri(null,params));},getSystems:function getSystems(params){return $http.get(buildUri('systems',params));},getRules:function getRules(params){return $http.get(buildUri('rules',params));}};}apiModule.factory('Stats',Stats);},{"./":15,"urijs":838}],24:[function(require,module,exports){'use strict';Subset.$inject=['$http','InsightsConfig','AccountService','DataUtils'];var apiModule=require('./');var URI=require('urijs');/** * @ngInject */function Subset($http,InsightsConfig,AccountService,DataUtils){var root=InsightsConfig.apiRoot;return{create:function create(branch_id,system_ids){var uri=URI(root);uri.segment('subsets');uri.addSearch(AccountService.queryParam());return $http.post(uri.toString(),{branch_id:branch_id,system_ids:system_ids});},getRulesWithHits:function getRulesWithHits(subset){var uri=URI(root);uri.segment('subsets');uri.segment(subset);uri.segment('rules');uri.addSearch('report_count','gt0');uri.addSearch(AccountService.queryParam());return $http.get(uri.toString()).success(function(result){result.resources.forEach(DataUtils.readRule);});}};}apiModule.factory('Subset',Subset);},{"./":15,"urijs":838}],25:[function(require,module,exports){'use strict';System.$inject=['$http','$q','$rootScope','InsightsConfig','AccountService','Group','Utils','FilterService','Products','PreferenceService','DataUtils'];var apiModule=require('./');var find=require('lodash/find');var URI=require('urijs');/** * @ngInject */function System($http,$q,$rootScope,InsightsConfig,AccountService,Group,Utils,FilterService,Products,PreferenceService,DataUtils){var root=InsightsConfig.apiRoot;var _systemDfd;var _systemStatusDfd;//XXX: this needs to be refactored/simplified function decorateSystemType(systemType){if(systemType.product_code===Products.docker.code){if(systemType.role===Products.docker.roles.host.code){systemType.imageClass=Products.docker.roles.host.icon;systemType.displayName=Products.docker.roles.host.fullName;systemType.displayNameShort=Products.docker.shortName2+' '+Products.docker.roles.host.shortName;}else if(systemType.role===Products.docker.roles.container.code){systemType.imageClass=Products.docker.roles.container.icon;systemType.displayName=Products.docker.roles.container.fullName;systemType.displayNameShort=Products.docker.roles.container.shortName;}else if(systemType.role===Products.docker.roles.image.code){systemType.imageClass=Products.docker.roles.image.icon;systemType.displayName=Products.docker.roles.image.fullName;systemType.displayNameShort=Products.docker.shortName2+' '+Products.docker.roles.image.shortName;}}else if(systemType.product_code===Products.ocp.code){if(systemType.role===Products.ocp.roles.cluster.code){systemType.imageClass=Products.ocp.roles.cluster.icon;systemType.displayName=Products.ocp.roles.cluster.fullName;systemType.displayNameShort=Products.ocp.shortName+' '+Products.ocp.roles.cluster.shortName;}else if(systemType.role===Products.ocp.roles.master.code){systemType.imageClass=Products.ocp.roles.master.icon;systemType.displayName=Products.ocp.roles.master.fullName;systemType.displayNameShort=Products.ocp.shortName+' '+Products.ocp.roles.master.shortName;}else if(systemType.role===Products.ocp.roles.node.code){systemType.imageClass=Products.ocp.roles.node.icon;systemType.displayName=Products.ocp.roles.node.fullName;systemType.displayNameShort=Products.ocp.shortName+' '+Products.ocp.roles.node.shortName;}}else if(systemType.product_code===Products.osp.code){if(systemType.role===Products.osp.roles.controller.code){systemType.imageClass=Products.osp.roles.controller.icon;systemType.displayName=Products.osp.roles.controller.fullName;systemType.displayNameShort=Products.osp.shortName+' '+Products.osp.roles.controller.shortName;}else if(systemType.role===Products.osp.roles.compute.code){systemType.imageClass=Products.osp.roles.compute.icon;systemType.displayName=Products.osp.roles.compute.fullName;systemType.displayNameShort=Products.osp.shortName+' '+Products.osp.roles.compute.shortName;}else if(systemType.role===Products.osp.roles.director.code){systemType.imageClass=Products.osp.roles.director.icon;systemType.displayName=Products.osp.roles.director.fullName;systemType.displayNameShort=Products.osp.shortName+' '+Products.osp.roles.director.shortName;}else if(systemType.role===Products.osp.roles.cluster.code){systemType.imageClass=Products.osp.roles.cluster.icon;systemType.displayName=Products.osp.roles.cluster.fullName;systemType.displayNameShort=Products.osp.shortName+' '+Products.osp.roles.cluster.shortName;}}else if(systemType.product_code===Products.rhev.code){if(systemType.role===Products.rhev.roles.manager.code){systemType.imageClass=Products.rhev.roles.manager.icon;systemType.displayName=Products.rhev.roles.manager.fullName;systemType.displayNameShort=Products.rhev.shortName+' '+Products.rhev.roles.manager.shortName;}else if(systemType.role===Products.rhev.roles.hypervisor.code){systemType.imageClass=Products.rhev.roles.hypervisor.icon;systemType.displayName=Products.rhev.roles.hypervisor.fullName;systemType.displayNameShort=Products.rhev.shortName+' '+Products.rhev.roles.hypervisor.shortName;}else if(systemType.role===Products.rhev.roles.cluster.code){systemType.imageClass=Products.rhev.roles.cluster.icon;systemType.displayName=Products.rhev.roles.cluster.fullName;systemType.displayNameShort=Products.rhev.shortName+' '+Products.rhev.roles.cluster.shortName;}}else if(systemType.product_code===Products.rhel.code){systemType.imageClass=Products.rhel.icon;systemType.displayName=Products.rhel.fullName;systemType.displayNameShort=Products.rhel.shortName;}return systemType;}function decorateSystemTypes(systemTypes){for(var i=0;i<systemTypes.length;i++){systemTypes[i]=decorateSystemType(systemTypes[i]);}return systemTypes;}$rootScope.$on('reload:data',function(){_systemDfd=null;});return{ackStaleSystems:function ackStaleSystems(){var url=root+'systems/stale/ack';url+=AccountService.current('?');return $http.put(url);},getSingleSystem:function getSingleSystem(systemid){var url=root+'systems/'+systemid;url+=AccountService.current('?');return $http.get(url);},getSystemTypes:function getSystemTypes(){var url=root+'system_types';return $http.get(url).then(function(response){decorateSystemTypes(response.data);return response;});},getSystems:function getSystems(){var url;if(_systemDfd){return _systemDfd;}url=root+'systems'+AccountService.current();_systemDfd=$http.get(url);return _systemDfd;},getSystemLinks:function getSystemLinks(parent_system_id,query){var url=root+'systems/'+encodeURIComponent(parent_system_id)+'/links';url+=AccountService.current('?');url=Utils.addQueryToUrl(url,query);return $http.get(url);},headSystemsLatest:function headSystemsLatest(query){var url=root+'systems';url+=AccountService.current('?');url=Utils.addQueryToUrl(url,query);return $http.head(url);},getSystemsLatest:function getSystemsLatest(query){var url=root+'systems';url+=AccountService.current('?');url=Utils.addQueryToUrl(url,query);return $http.get(url);},getSystemStatus:function getSystemStatus(refresh){var url;if(!refresh&&_systemStatusDfd){return _systemStatusDfd;}url=root+'systems/status'+AccountService.current();url=PreferenceService.appendProductToUrl(url,'machine');_systemStatusDfd=$http.get(url);return _systemStatusDfd;},getSystemSummary:function getSystemSummary(query){var group;var url=root+'systems?summary=true'+AccountService.current('&');url=PreferenceService.appendProductToUrl(url,'machine');group=Group.current();if(group&&group.id){url+='&group='+group.id;}url=Utils.addQueryToUrl(url,query);return $http.get(url);},getSystemReports:function getSystemReports(machine_id){return $http.get(root+'systems/'+encodeURIComponent(machine_id)+'/reports'+AccountService.current()).success(function(system){system.reports.forEach(function(r){return DataUtils.readRule(r.rule);});});},getSystemMetadata:function getSystemMetadata(machine_id){return $http.get(root+'systems/'+encodeURIComponent(machine_id)+'/metadata'+AccountService.current());},deleteSystem:function deleteSystem(machine_id){// systems were deleted, the status deferred is now invalid _systemStatusDfd=null;return $http.delete(root+'systems/'+encodeURIComponent(machine_id)+AccountService.current());},populateOCPDeployments:function populateOCPDeployments(){var query={product_code:'ocp',role:'cluster'};return this.getSystemsLatest(query).then(function(response){var selectedDeployment;var ocpDeployments;if(response&&response.data&&response.data.resources){ocpDeployments=response.data.resources;ocpDeployments.splice(0,0,{display_name:'All Deployments',system_id:'all'});FilterService.setOCPDeployments(ocpDeployments);if(!FilterService.getSelectedOCPDeployment().system_id){FilterService.setSelectedOCPDeployment(ocpDeployments[0]);}else{selectedDeployment=find(FilterService.getOCPDeployments(),{system_id:FilterService.getSelectedOCPDeployment().system_id});FilterService.setSelectedOCPDeployment(selectedDeployment);}}});},populateOSPDeployments:function populateOSPDeployments(){var query={product_code:'osp',role:'cluster'};return this.getSystemsLatest(query).then(function(response){var selectedDeployment;var ospDeployments;if(response&&response.data&&response.data.resources){ospDeployments=response.data.resources;ospDeployments.splice(0,0,{display_name:'All Deployments',system_id:'all'});FilterService.setOSPDeployments(ospDeployments);if(!FilterService.getSelectedOSPDeployment().system_id){FilterService.setSelectedOSPDeployment(ospDeployments[0]);}else{selectedDeployment=find(FilterService.getOSPDeployments(),{system_id:FilterService.getSelectedOSPDeployment().system_id});FilterService.setSelectedOSPDeployment(selectedDeployment);}}});},populateDockerHosts:function populateDockerHosts(){var query={product_code:'docker',role:'host'};return this.getSystemsLatest(query).then(function(response){var selectedDeployment;var dockerHosts;if(response&&response.data&&response.data.resources){dockerHosts=response.data.resources;dockerHosts.splice(0,0,{hostname:'All Hosts',system_id:'all'});FilterService.setDockerHosts(dockerHosts);if(!FilterService.getSelectedDockerHost().system_id){FilterService.setSelectedDockerHost(dockerHosts[0]);}else{selectedDeployment=find(FilterService.getDockerHosts(),{system_id:FilterService.getSelectedDockerHost().system_id});FilterService.setSelectedDockerHost(selectedDeployment);}}});},getProductSpecificData:function getProductSpecificData(){var defer;if(FilterService.getSelectedProduct()==='docker'){return this.populateDockerHosts();}else if(FilterService.getSelectedProduct()==='osp'){return this.populateOSPDeployments();}else{defer=$q.defer();defer.resolve();return defer.promise;}},getSystemGroups:function getSystemGroups(systemId){var uri=URI(InsightsConfig.apiRoot);uri.segment('systems');uri.segment(systemId);uri.segment('groups');uri.addSearch(AccountService.queryParam());return $http.get(uri.toString());},update:function update(systemId,data){var url=URI(root);url.segment('systems');url.segment(systemId);url.addSearch(AccountService.queryParam());return $http.put(url.toString(),data);},getSystemPolicies:function getSystemPolicies(systemId){var url=URI(root);url.segment('systems');url.segment(systemId);url.segment('policies');url.addSearch(AccountService.queryParam());return $http.get(url.toString());}};}apiModule.factory('System',System);},{"./":15,"lodash/find":502,"urijs":838}],26:[function(require,module,exports){'use strict';Topic.$inject=['$http','$q','InsightsConfig','AccountService','Group'];var apiModule=require('./');var URI=require('urijs');/** * @ngInject */function Topic($http,$q,InsightsConfig,AccountService,Group){var topicsUri='topics';var root=InsightsConfig.apiRoot;return{getAll:function getAll(filters,limit){var topicFilters=filters?filters:{};var uri=URI(root+topicsUri+AccountService.current()).addSearch(topicFilters);if(angular.isDefined(limit)){uri.addSearch('limit',limit);}uri.addSearch(Group.queryParam());return $http.get(uri.toString());},admin:function admin(){return $http.get(root+topicsUri+'/admin');},get:function get(id,product,include){var uri=URI(root+topicsUri+'/'+id+AccountService.current());if(product){uri.addSearch('product',product);}if(include){uri.addSearch('include',include);}uri.addSearch(Group.queryParam());return $http.get(uri.toString());},create:function create(topic){return $http.post(root+topicsUri,topic);},update:function update(topic){return $http.put(root+topicsUri+'/'+topic.id,topic);},preview:function preview(topic){return $http.post(root+topicsUri+'/preview',topic);},remove:function remove(id){return $http.delete(root+topicsUri+'/'+id);}};}apiModule.factory('Topic',Topic);},{"./":15,"urijs":838}],27:[function(require,module,exports){/*global angular, require, window*/'use strict';User.$inject=['$rootScope','$http','$q','$location','InsightsConfig','PreferenceService'];var apiModule=require('./');var indexBy=require('lodash/keyBy');var priv={};priv.tryFakeUser=function(_user){var entitlements;// just for test, does not affect what comes back from the API // i.e. nothing "leaks" here try{entitlements=JSON.parse(window.localStorage.getItem('insights:fake:entitlements'));if(entitlements!==undefined&&entitlements!==null){_user.current_entitlements=entitlements;}}catch(ignore){}// } catch (e) { console.log(e); } };/** * @ngInject */function User($rootScope,$http,$q,$location,InsightsConfig,PreferenceService){var _user={loaded:false};var _userDfd;function isBeta(){// Temporary work around to only allow OSP in beta. // Remove the following code when OSP is ready for production. return $location.absUrl().indexOf('insightsbeta')>-1;}//function setPreferences() { //PreferenceService.set( // 'hide_ignored_rules', _user.settings.hide_ignored_rules, false); //if (_user.settings.dashboard_mode && isBeta()) { //PreferenceService.set( // 'dashboard_mode', _user.settings.dashboard_mode, false); //if (_user.settings.dashboard_mode === 'osp') { //PreferenceService.set( // 'osp_deployment', _user.settings.osp_deployment, false); //} //} //} function _init(){$http.get(InsightsConfig.apiRoot+'me').success(function(user){angular.extend(_user,user);_user.permissions=indexBy(_user.permissions,'code');// used to keep up with is_internal in cases where is_internal is modified by // an internal user _user.is_super=_user.is_internal;//setPreferences(); if(_user.current_entitlements&&_user.current_entitlements.unlimitedRHEL){_user.current_entitlements.systemLimitReached=false;}if(window.localStorage.getItem('insights:user:isInternal')!==null&&_user.is_super===true){_user.is_internal=window.localStorage.getItem('insights:user:isInternal')==='true';}_user.loaded=true;PreferenceService.set('loaded',true,false);priv.tryFakeUser(_user);$rootScope.$broadcast('user:loaded');if(window.localStorage.getItem('tapi:demo')==='true'){_user.is_internal=false;_user.demo_mode=true;}_userDfd.resolve(_user);});}return{init:function init(){if(!angular.isDefined(_userDfd)){_userDfd=$q.defer();_init();}return _userDfd.promise;},current:_user,asyncCurrent:function asyncCurrent(cb){if(_user&&_user.loaded){return cb(_user);}else if(_userDfd&&_userDfd.promise){_userDfd.promise.then(cb);}},isOnOSPWhitelist:function isOnOSPWhitelist(){var onOSPWhitelist=false;if(!isBeta()){return false;}if(_user&&_user.current_entitlements){onOSPWhitelist=_user.current_entitlements.whitelist.osp;}return onOSPWhitelist;}};}apiModule.factory('User',User);},{"./":15,"lodash/keyBy":528}],28:[function(require,module,exports){'use strict';UserPermissions.$inject=['$resource','InsightsConfig'];var apiModule=require('./');/** * @ngInject */function UserPermissions($resource,InsightsConfig){var endpoint=InsightsConfig.apiRoot+'user_permissions/:userPermissionId';var params={userPermissionId:'@id'};var resource=$resource(endpoint,params);resource.init=function(){resource.initial=resource.query().$promise;};return resource;}apiModule.service('UserPermissions',UserPermissions);},{"./":15}],29:[function(require,module,exports){'use strict';UserSettings.$inject=['$http','InsightsConfig'];var apiModule=require('./');/** * @ngInject */function UserSettings($http,InsightsConfig){var root=InsightsConfig.apiRoot;return{update:function update(settings){return $http.post(root+'me/settings',settings);}};}apiModule.factory('UserSettings',UserSettings);},{"./":15}],30:[function(require,module,exports){'use strict';Webhooks.$inject=['$http','AccountService','InsightsConfig'];var apiModule=require('./');var URI=require('urijs');var pick=require('lodash/pick');var WEBHOOK_ATTRS=['active','url','firehose','event_types','certificate'];/** * @ngInject */function Webhooks($http,AccountService,InsightsConfig){var root=InsightsConfig.apiRoot;function url(id){var url=URI(root);url.segment('webhooks');if(id){url.segment(String(id));}url.addSearch(AccountService.queryParam());return url;}return{get:function get(id){var includeStatus=arguments.length>1&&arguments[1]!==undefined?arguments[1]:true;var builder=url(id);if(includeStatus){builder.addSearch('include','status');}return $http.get(builder.toString());},create:function create(webhook){return $http.post(url().toString(),pick(webhook,WEBHOOK_ATTRS));},ping:function ping(){return $http.post(url('ping').toString());},update:function update(webhook){return $http.put(url(webhook.id).toString(),pick(webhook,WEBHOOK_ATTRS));},delete:function _delete(webhook){return $http.delete(url(webhook.id).toString());}};}apiModule.factory('Webhooks',Webhooks);},{"./":15,"lodash/pick":543,"urijs":838}],31:[function(require,module,exports){'use strict';/** * @ngInject */Routes.$inject=['$stateProvider'];function Routes($stateProvider){// Base States $stateProvider.state('app',{templateUrl:'js/states/base/base.html',abstract:true,controller:'AppCtrl'});$stateProvider.state('info',{templateUrl:'js/states/base/info.html',abstract:true});}module.exports=Routes;},{}],32:[function(require,module,exports){/*global require, module*/'use strict';OnRun.$inject=['$rootScope','AlertService','gettextCatalog','$cookies','CoercionService','$state','InsightsConfig','BetaRedirectService'];var routeCustomizer=require('./state_customizer');var moment=require('moment');// this is needed to make the locale available at runtime require('moment/locale/ja');/** * @ngInject */function OnRun($rootScope,AlertService,gettextCatalog,$cookies,CoercionService,$state,InsightsConfig,BetaRedirectService){$rootScope.$on('$stateChangeSuccess',function(){AlertService.clearHttpError();});// beta check BetaRedirectService.checkAndRedirect();// https://docs.angularjs.org/api/ngCookies/service/$cookies // Up until Angular 1.3, $cookies exposed properties that represented the current // browser cookie values. In version 1.4, this behavior has changed, and $cookies // now provides a standard api of getters, setters etc. var lang=CoercionService.coerce($cookies.get('rh_locale'));gettextCatalog.setCurrentLanguage(lang);moment.locale(lang);if($cookies.get('locale_debug')){gettextCatalog.debug=true;}if(lang&&lang!=='en'){gettextCatalog.loadRemote('translations/'+lang+'/'+lang+'.json');}routeCustomizer.process($state.get(),InsightsConfig);}module.exports=OnRun;},{"./state_customizer":222,"moment":571,"moment/locale/ja":570}],33:[function(require,module,exports){/*global window*/'use strict';accountSelectCtrl.$inject=['$scope','User','InsightsConfig','Utils','PermissionService'];var componentsModule=require('../');/** * @ngInject */function accountSelectCtrl($scope,User,InsightsConfig,Utils,PermissionService){var initialAcct=window.sessionStorage.getItem(InsightsConfig.acctKey);// The permission service mangles permissions if // you are not internal so I check them manually here. $scope.showAccountSelector=function(){var user=$scope.user;var PERMS=PermissionService.PERMS;if(!user||!user.permissions){return false;}if(user.permissions[PERMS.SU]){return true;}if(user.permissions[PERMS.ACCOUNT_SWITCHER]){return true;}return false;};$scope.Utils=Utils;$scope.accountChange=function(acct){if(acct){window.sessionStorage.setItem(InsightsConfig.acctKey,acct);window.location.reload();}};$scope.reset=function(){if(!$scope.user){return;}$scope.account_number=$scope.user.account_number;if($scope.user.is_internal){$scope.account_number=''+$scope.user.account_number;}$scope.accountChange($scope.account_number);};if(window.localStorage.getItem('tapi:demo')==='true'){console.log('Insights is running in demo mode');initialAcct='6';}if(initialAcct){$scope.account_number=initialAcct;}User.asyncCurrent(function(){$scope.user=User.current;if($scope.isInternal!==$scope.user.is_internal){$scope.isInternal=$scope.user.is_internal;}if(!initialAcct){$scope.account_number=$scope.user.account_number;}});$scope.changeInternal=function(){$scope.user.isInternal=$scope.isInternal;window.localStorage.setItem('insights:user:isInternal',JSON.stringify($scope.user.isInternal));window.location.reload();};}function accountSelect(){return{templateUrl:'js/components/accountSelect/accountSelect.html',restrict:'E',controller:accountSelectCtrl};}componentsModule.directive('accountSelect',accountSelect);},{"../":84}],34:[function(require,module,exports){'use strict';actionbarCtrl.$inject=['$scope','$rootScope','ActionbarService'];var componentsModule=require('../');/** * @ngInject */function actionbarCtrl($scope,$rootScope,ActionbarService){$scope.myActions=ActionbarService.actions;$rootScope.$on('$stateChangeStart',function(){ActionbarService.clear();});}function actionbar(){return{templateUrl:'js/components/actionbar/actionbar.html',restrict:'E',replace:true,controller:actionbarCtrl};}componentsModule.directive('actionbar',actionbar);},{"../":84}],35:[function(require,module,exports){'use strict';actionsBackCtrl.$inject=['$scope','$state','$stateParams'];var componentsModule=require('../../');/** * @ngInject */function actionsBackCtrl($scope,$state,$stateParams){$scope.goBack=function(){if($state.current.name==='app.actions-rule'){$state.go('app.topic',{id:$stateParams.category});}else if($state.current.name==='app.topic'){$state.go('app.actions');}};$scope.$on('telemetry:esc',function($event){if($event.defaultPrevented){return;}$scope.goBack();});}function actionsBack(){return{restrict:'EC',scope:{},controller:actionsBackCtrl};}componentsModule.directive('actionsBack',actionsBack);},{"../../":84}],36:[function(require,module,exports){'use strict';actionsBreadcrumbsCtrl.$inject=['$scope','$state','ActionsBreadcrumbs'];var componentsModule=require('../../');/** * @ngInject */function actionsBreadcrumbsCtrl($scope,$state,ActionsBreadcrumbs){$scope.crumbs=ActionsBreadcrumbs.crumbs;$scope.getCrumbs=ActionsBreadcrumbs.get;$scope.crumbClick=function(crumb){$state.go(crumb.state,crumb.params);};}function actionsBreadcrumbs(){return{templateUrl:'js/components/actions/actionsBreadcrumbs/actionsBreadcrumbs.