{"version":3,"sources":["../../../app/scripts/external/common-extensions.js","../../../app/scripts/theme/smoothscroll.js","../../../app/scripts/app-env.js","../../../app/scripts/app.js","../../../app/scripts/external/popoverHtmlUnsafePopup.js","../../../app/scripts/theme/carousel.min.js","../../../app/scripts/theme/jquery.easing.min.js","../../../app/scripts/services/ea-utils.js","../../../app/scripts/controllers/ea-public-area.js","../../../app/scripts/controllers/ea-secured-area.js","../../../app/scripts/controllers/ea-splash.js","../../../app/scripts/controllers/ea-signin.js","../../../app/scripts/controllers/debugger/ea-debugger-csp.js","../../../app/scripts/controllers/mixins/ea_mixin_session_helper.js","../../../app/scripts/controllers/mixins/ea_mixin_jwt_token_helper.js","../../../app/scripts/controllers/add/ea-add.js","../../../app/scripts/controllers/add/ea-add-step01.js","../../../app/scripts/controllers/add/ea-add-step02-ea.js","../../../app/scripts/controllers/add/ea-add-step02-costmgnt.js","../../../app/scripts/controllers/add/ea-add-step02-rate.js","../../../app/scripts/controllers/add/ea-add-step02-rate-connect.js","../../../app/scripts/controllers/add/ea-add-step03.js","../../../app/scripts/controllers/teams/ea-team-migrate.js","../../../app/scripts/controllers/teams/ea-team-invite-accept.js","../../../app/scripts/controllers/teams/mixins/ac-mixin-choose-contract.js","../../../app/scripts/controllers/teams/mixins/ac-mixin-choose-team.js","../../../app/scripts/controllers/teams/dashboards/ea-dashboards.js","../../../app/scripts/controllers/teams/dashboards/mixins/ea_mixin_branding.js","../../../app/scripts/controllers/teams/dashboards/mixins/ea_mixin_manage_contract_settings.js","../../../app/scripts/controllers/teams/dashboards/mixins/ea_mixin_notification_settings.js","../../../app/scripts/controllers/teams/dashboards/mixins/ea_mixin_survey.js","../../../app/scripts/controllers/teams/dashboards/modals/ea_modal_branding.js","../../../app/scripts/controllers/teams/dashboards/modals/ea_modal_manage_contract_settings.js","../../../app/scripts/controllers/teams/dashboards/modals/ea_modal_notification_settings.js","../../../app/scripts/controllers/teams/dashboards/modals/ea_modal_survey.js","../../../app/scripts/controllers/teams/rimanagement/ea-rimanagement.js","../../../app/scripts/controllers/teams/manage/ea-team-manage.js","../../../app/scripts/controllers/teams/manage/mixins/ea_mixin_team_edit_users.js","../../../app/scripts/controllers/teams/manage/mixins/ea_mixin_team_management.js","../../../app/scripts/controllers/teams/manage/mixins/ea_mixin_team_edit_permissions.js","../../../app/scripts/controllers/teams/manage/mixins/ea_mixin_team_edit_app.js","../../../app/scripts/controllers/teams/manage/modals/ea_modal_team_edit_users.js","../../../app/scripts/controllers/teams/manage/modals/ea_modal_team_edit_permissions.js","../../../app/scripts/controllers/teams/manage/modals/ea_modal_team_edit_app.js","../../../app/scripts/controllers/teams/manage/aad/ea-team-link-aad.js","../../../app/scripts/controllers/teams/manage/aad/ea-team-edit-aad.js","../../../app/scripts/controllers/teams/manage/buckets/ea-team-buckets.js","../../../app/scripts/controllers/teams/manage/settings/ea-team-settings.js","../../../app/scripts/controllers/teams/contracts/cc-add-contract.js","../../../app/scripts/controllers/teams/contracts/aws/cc-aws.js","../../../app/scripts/controllers/teams/contracts/aws/cc-aws-prepare.js","../../../app/scripts/controllers/teams/contracts/aws/cc-aws-connect.js","../../../app/scripts/controllers/teams/contracts/aws/cc-aws-dashboard.js","../../../app/scripts/controllers/teams/contracts/gcp/cc-gcp.js","../../../app/scripts/controllers/teams/contracts/gcp/cc-gcp-prepare.js","../../../app/scripts/controllers/teams/contracts/gcp/cc-gcp-connect.js","../../../app/scripts/controllers/teams/contracts/gcp/cc-gcp-dashboard.js","../../../app/scripts/controllers/billing/ea-billing.js","../../../app/scripts/controllers/billing/ea-start-trial.js","../../../app/scripts/controllers/billing/ea-upgrade-edition.js","../../../app/scripts/controllers/billing/ea-service-provider.js","../../../app/scripts/controllers/billing/modals/ea-modal-billing-purchase.js","../../../app/scripts/controllers/billing/mixins/ea-modal-billing-purchase.js","../../../app/scripts/controllers/billing/modals/ea-modal-billing-address.js","../../../app/scripts/controllers/billing/mixins/ea-modal-billing-address.js","../../../app/scripts/controllers/sso/ea-sso-callback.js","../../../app/scripts/controllers/csp/ac-csp-init.js","../../../app/scripts/controllers/csp/ac-csp.js","../../../app/scripts/controllers/csp/ac-csp-accounts.js","../../../app/scripts/controllers/csp/ac-csp-gsi.js","../../../app/scripts/controllers/csp/add/ac-csp-add.js","../../../app/scripts/controllers/csp/add/ac-csp-add-step01.js","../../../app/scripts/controllers/csp/add/ac-csp-add-step02-t1.js","../../../app/scripts/controllers/csp/add/ac-csp-add-step02-t2.js","../../../app/scripts/controllers/csp/add/ac-csp-add-step02-ea.js","../../../app/scripts/controllers/csp/add/ac-csp-add-step02-aws.js","../../../app/scripts/controllers/csp/add/ac-csp-add-step02-demo.js","../../../app/scripts/controllers/csp/add/ac-csp-add-step02-v1.js","../../../app/scripts/controllers/csp/add/ac-csp-add-step03.js","../../../app/scripts/controllers/csp/mixins/ac_mixin_csp_update_t1_account.js","../../../app/scripts/controllers/csp/modals/ac_modal_csp_update_t1_account.js","../../../app/scripts/controllers/csp/mixins/ac_mixin_csp_update_ea_account.js","../../../app/scripts/controllers/csp/modals/ac_modal_csp_update_ea_account.js","../../../app/scripts/controllers/csp/mixins/ac_mixin_csp_update_aws_account.js","../../../app/scripts/controllers/csp/modals/ac_modal_csp_update_aws_account.js","../../../app/scripts/controllers/csp/mixins/ac-mixin-csp-register-customer.js","../../../app/scripts/controllers/csp/modals/ac-modal-csp-register-customer.js","../../../app/scripts/controllers/csp/mixins/ac-mixin-csp-register-customer-costmgnt.js","../../../app/scripts/controllers/csp/modals/ac-modal-csp-register-customer-costmgnt.js","../../../app/scripts/controllers/csp/mixins/ac_mixin_gsi_update_settings.js","../../../app/scripts/controllers/csp/modals/ac_modal_gsi_update_settings.js","../../../app/scripts/controllers/csp/mixins/ac-mixin-csp-choose-customer.js","../../../app/scripts/controllers/csp/mixins/ac_mixin_csp_define_reseller_margin.js","../../../app/scripts/controllers/csp/modals/ac_modal_csp_define_reseller_margin.js","../../../app/scripts/controllers/csp/mixins/ac_mixin_csp_define_reseller_filter.js","../../../app/scripts/controllers/csp/modals/ac_modal_csp_define_reseller_filter.js","../../../app/scripts/controllers/csp/mixins/ac-mixin-csp-download-price-sheet.js","../../../app/scripts/controllers/csp/modals/ac-model-csp-download-price-sheet.js","../../../app/scripts/controllers/csp/mixins/ac_mixin_csp_define_reseller_features.js","../../../app/scripts/controllers/csp/modals/ac_modal_csp_define_reseller_features.js","../../../app/scripts/controllers/csp/resellers/ac-csp-resellermanagement.js","../../../app/scripts/controllers/csp/resellers/mixins/ac_mixin_reseller_register.js","../../../app/scripts/controllers/csp/resellers/modals/ac_modal_reseller_register.js","../../../app/scripts/controllers/admin/ea-admin.js","../../../app/scripts/controllers/admin/ea-admin-contracts.js","../../../app/scripts/controllers/admin/ea-admin-users.js","../../../app/scripts/controllers/admin/ea-admin-jobs.js","../../../app/scripts/controllers/admin/ea-admin-jobs-details.js","../../../app/scripts/controllers/admin/modals/model_admin_add_user.js","../../../app/scripts/controllers/admin/mixins/mixin-admin_add_user.js","../../../app/scripts/directives/ea-content-centered.js","../../../app/scripts/directives/charts/helpers/ac-chart-container-helpers.js","../../../app/scripts/directives/charts/ac-chart-raw.js","../../../app/scripts/directives/charts/ac-chart-area.js","../../../app/scripts/directives/ea-notification-center.js","../../../app/scripts/directives/ea-widget-host.js","../../../app/scripts/directives/ea-widget-dashboard.js","../../../app/scripts/directives/ea-widget-repository.js","../../../app/scripts/directives/widgets/ea-widget-chart-stacked-bar.js","../../../app/scripts/directives/widgets/ea-widget-chart-area.js","../../../app/scripts/directives/widgets/ea-widget-chart-gauge.js","../../../app/scripts/directives/widgets/ea-widget-chart-pie.js","../../../app/scripts/directives/widgets/ea-widget-simple-value.js","../../../app/scripts/directives/widgets/ea-widget-action-board.js","../../../app/scripts/directives/widgets/ea-widget-map.js","../../../app/scripts/directives/widgets/ea-widget-web-part.js","../../../app/scripts/directives/widgets/ea-widget-group-filter-list-view.js","../../../app/scripts/directives/widgets/ea-widget-group-filter-list-view-sorting.js","../../../app/scripts/directives/widgets/ea-widget-group-filter-list-view-filters.js","../../../app/scripts/directives/widgets/ea-widget-group-filter-list-view-export.js","../../../app/scripts/directives/widgets/ea-widget-group-filter-list-view-datasources.js","../../../app/scripts/directives/widgets/ea-widget-group-filter-list-view-pg-template-host.js","../../../app/scripts/directives/widgets/ea-widget-group-filter-list-view-pg-default-template.js","../../../app/scripts/directives/widgets/ea-widget-group-filter-list-view-pg-subitem-default-template.js","../../../app/scripts/directives/widgets/ea-widget-group-filter-list-view-pg-csp-customer-template.js","../../../app/scripts/directives/widgets/ea-widget-group-filter-list-view-pg-spendings-subscription-template.js","../../../app/scripts/directives/widgets/ea-widget-group-filter-list-view-pg-subitem-spendings-service-template.js","../../../app/scripts/directives/widgets/ea-widget-group-filter-list-view-pg-csp-reseller-t2-template.js","../../../app/scripts/directives/widgets/ea-widget-group-filter-list-view-pg-subitem-csp-reseller-t2-template.js","../../../app/scripts/directives/widgets/ea-widget-ri-purchase-impact.js","../../../app/scripts/directives/widgets/ea-widget-ri-purchase-impact-datasources.js","../../../app/scripts/directives/widgets/ea-widget-iframe.js","../../../app/scripts/directives/ea-navbar.js","../../../app/scripts/directives/ea-listview.js","../../../app/scripts/directives/ea-file-drop-zone.js","../../../app/scripts/directives/ea-tag-list.js","../../../app/scripts/directives/ea-branding-theme.js","../../../app/scripts/directives/ea-trial.js","../../../app/scripts/directives/ea-upgrade-plan.js","../../../app/scripts/directives/ea-filter-panel.js","../../../app/scripts/services/ea-backend.js","../../../app/scripts/services/ea-backend-base.js","../../../app/scripts/services/ea-backend-admin.js","../../../app/scripts/services/ea-backend-admin-v2.js","../../../app/scripts/services/ea-backend-azure-v2.js","../../../app/scripts/services/ea-backend-azure-cached-content-loader.js","../../../app/scripts/services/ea-report-data.js","../../../app/scripts/services/ea-backend-azure.js","../../../app/scripts/services/ea-session2.js","../../../app/scripts/services/ea-config.js","../../../app/scripts/services/ea-team-management.js","../../../app/scripts/services/ea-template-caching-strategy.js","../../../app/scripts/services/ea-branding.js","../../../app/scripts/services/ea-billing.js","../../../app/scripts/services/ea-liveid.js","../../../app/scripts/services/ea-user-profile.js","../../../app/scripts/services/ea-bucket.js","../../../app/scripts/services/ea-local-settings.js","../../../app/scripts/services/ea-data-coordinator.js","../../../app/scripts/services/ea-data-aggregate-operations.js","../../../app/scripts/services/ea-data-group-operations.js","../../../app/scripts/services/ea-data-filter-operations.js","../../../app/scripts/services/ea-data-color-theme-generator.js","../../../app/scripts/services/ea-data-source-manager.js","../../../app/scripts/services/ea-data-raw-sources.js","../../../app/scripts/services/ea-data-export-operations.js","../../../app/scripts/services/ea-data-join-operations.js","../../../app/scripts/services/ea-data-item-processer-chain.js","../../../app/scripts/services/ac-timeline-generator.js","../../../app/scripts/services/ac-locale-service.js","../../../app/scripts/services/ac-cache-identifier-generator.js","../../../app/scripts/services/ac-data-source-helper.js","../../../app/scripts/services/ac-data-source-helper-csp-generic-summary.js","../../../app/scripts/services/ac-dpn-service.js","../../../app/scripts/services/helpers/ac-wizard-helper.js","../../../app/scripts/services/helpers/ac-wait-helper.js","../../../app/scripts/services/data-sources/ac-data-source-settings.js","../../../app/scripts/services/data-sources/ac-data-source-classes.js","../../../app/scripts/services/data-sources/ac-data-source-widget-functions.js","../../../app/scripts/services/data-sources/ac-data-source-v1-spendings.js","../../../app/scripts/services/data-sources/ac-data-source-v2-spendings.js","../../../app/scripts/services/data-sources/ac-data-source-v3-spendings.js","../../../app/scripts/services/data-sources/ac-data-source-csp.js","../../../app/scripts/services/data-sources/ac-data-source-csp-gsi.js","../../../app/scripts/services/data-sources/ac-data-source-teaming.js","../../../app/scripts/services/data-sources/ac-data-source-ri.js","../../../app/scripts/services/data-sources/ac-data-source-csp-resellermanagement.js","../../../app/scripts/services/ea-blog.js","../../../app/scripts/services/ea-download.js","../../../app/scripts/services/ea-csp-service.js","../../../app/scripts/services/ea-chart-config.js","../../../app/scripts/services/cc-demo-mode.js","../../../app/scripts/mixins/ac-csv-data-export-mixin.js","../../../app/scripts/modals/ac-csv-data-export.js","../../../app/scripts/mixins/ac-upgrade-plan-mixin.js","../../../app/scripts/modals/ac-upgrade-plan.js","../../../app/scripts/mixins/ac-object-picker.js","../../../app/scripts/modals/ac-object-picker.js","../../../app/scripts/mixins/ac-single-line-box.js","../../../app/scripts/modals/ac-single-line-box.js","../../../app/scripts/mixins/cc-message-box.js","../../../app/scripts/modals/cc-message-box.js"],"names":["executeAndReduceArray","workingArray","cb","q","length","resolve","when","then","splice","ssc_init","document","body","e","t","documentElement","n","window","innerHeight","r","scrollHeight","ssc_root","compatMode","indexOf","ssc_activeElement","ssc_initdone","top","self","ssc_frame","offsetHeight","style","height","i","createElement","clear","appendChild","ssc_fixedback","backgroundAttachment","ssc_keyboardsupport","ssc_addEvent","ssc_keydown","ssc_scrollArray","ssc_directionCheck","ssc_que","push","x","y","lastX","lastY","start","Date","ssc_pending","s","o","u","a","f","l","c","ssc_animtime","h","ssc_pulseAlgorithm","ssc_pulse","p","d","v","scrollLeft","m","scrollTop","setTimeout","ssc_framerate","ssc_wheel","target","ssc_overflowingAncestor","defaultPrevented","ssc_isNodeName","test","src","wheelDeltaX","wheelDeltaY","wheelDelta","Math","abs","ssc_stepsize","preventDefault","ctrlKey","altKey","metaKey","nodeName","isContentEditable","keyCode","ssc_key","spacebar","clientHeight","up","ssc_arrowscroll","down","shiftKey","pageup","pagedown","home","end","left","right","ssc_mousedown","ssc_setCache","ssc_cache","ssc_uniqueID","overflow","getComputedStyle","getPropertyValue","parentNode","addEventListener","ssc_removeEvent","removeEventListener","toLowerCase","ssc_direction","ssc_pulse_","ssc_pulseScale","exp","ssc_pulseNormalize","Array","prototype","removeObject","obj","idx","this","removeObjectByProperty","property","propertyValue","foundItem","forEach","item","replaceObjectByProperty","updatedObject","idxOfItem","sortOn","key","sort","b","sortSimple","buildIndex","objectKey","newObject","element","keyValue","isSame","array2","every","index","appendArray","srcArray","apply","forEachExecuteAsyncOperationSequential","forEachExecuteAsyncOperationParallel","promissesArray","all","currentMonthDefinition","getFullYear","getMonth","slice","currentDayDefinition","getDate","addDays","days","dat","getTime","setDate","isLeapYear","year","getDaysInMonth","month","String","capitalizeFirstLetter","charAt","toUpperCase","downCaseFirstLetter","removeHeading","substring","removeTrailing","endsWith","toHHMMSS","sec_num","parseInt","hours","floor","minutes","seconds","angular","module","constant","deploymentUUID","cdnHostDev","cdnHostProd","config","$stateProvider","$urlRouterProvider","$locationProvider","$uservoiceProvider","$dynamicTemplateLoaderProvider","$airbrakeProvider","ngToastProvider","$sceDelegateProvider","envDeployment","console","log","resourceUrlWhitelist","location","host","setProject","html5Mode","registerInterceptors","setSubDomain","setApiKey","configure","animation","verticalPosition","horizontalPosition","dismissButton","otherwise","state","abstract","templateUrl","controller","url","template","$eaCurrentSession","$eaSession2","lazy","$cspFeatureEnabled","$eaConfig","$q","verifyFeature","run","$airbrake","$http","$dynamicTemplateLoader","$eaTemplateCachingStrategy","$location","$window","editableOptions","$rootScope","$eaBranding","$$host","theme","setCachingStrategyService","onUpdate","session","setCustomContext","userId","UserId","contact","Contact","onRegister","onDestroying","loadBrandingFromHostSegment","absUrl","replace","directive","restrict","scope","title","content","placement","isOpen","$tooltip","Object","create","g","k","init","$elem","options","extend","fn","owlCarousel","data","userOptions","loadContent","beforeInit","jsonPath","getJSON","jsonSuccess","owl","hasOwnProperty","html","logIn","attr","css","opacity","orignalItems","items","checkBrowser","wrapperWidth","checkVisible","setVars","children","baseClass","eventTypes","$userItems","itemsAmount","wrapItems","$owlItems","find","$owlWrapper","playDirection","prevItem","prevArr","currentItem","customEvents","onStartup","updateItems","calculateAll","buildControls","updateControls","response","moveEvents","stopOnHover","owlStatus","transitionStyle","transitionTypes","autoPlay","play","is","watchVisibility","onstartup","eachMoveUpdate","afterInit","lazyLoad","autoHeight","onVisibleItems","afterAction","updateVars","beforeUpdate","updatePosition","afterUpdate","reload","clearInterval","autoPlayInterval","setInterval","animate","wrapAll","wrap","wrapperOuter","hasClass","addClass","responsive","singleItem","itemsCustom","itemsDesktop","itemsDesktopSmall","itemsTablet","itemsTabletSmall","itemsMobile","responsiveBaseWidth","width","itemsScaleUp","resizer","clearTimeout","responsiveRefreshRate","resize","jumpTo","checkAp","appendItemsSizes","each","itemWidth","Number","appendWrapperSizes","calculateWidth","loops","max","round","maximumPixels","maximumItem","min","positionsInArray","pagesInArray","scrollPerPage","navigation","pagination","owlControls","toggleClass","browser","isTouch","appendTo","buildPagination","buildButtons","append","buttonPrev","class","navigationText","buttonNext","on","next","prev","paginationWrapper","goTo","updatePagination","text","paginationNumbers","checkPagination","removeClass","checkNavigation","rewindNav","hide","show","destroyControls","remove","isTransition","beforeMove","support3d","swapSpeed","transition3d","css2slide","afterGo","singleItemTransition","isCss3Finish","paginationSpeed","rewindSpeed","slideSpeed","shift","afterMove","stop","apStatus","addCssSpeed","-webkit-transition","-moz-transition","-o-transition","transition","removeTransition","doTranslate","-webkit-transform","-moz-transform","-o-transform","-ms-transform","transform","css2move","isCssFinish","duration","complete","cssText","match","navigator","msMaxTouchPoints","mouseDrag","touchDrag","gestures","disabledEvents","ev_types","move","touches","pageX","pageY","clientX","clientY","off","originalEvent","event","newPosX","offsetX","newPosY","offsetY","newRelativeX","relativePos","startDragging","dragging","returnValue","sliding","srcElement","dragDirection","getNewPosition","targetElement","stopImmediatePropagation","stopPropagation","_data","click","pop","baseElWidth","position","minSwipe","maxSwipe","dargging","which","dragBeforeAnimFinish","closestItem","moveDirection","inArray","hoverStatus","lazyFollow","lazyPreload","removeAttr","lazyEffect","fadeIn","afterLazyLoad","prop","completeImg","get","naturalWidth","addClassActive","visibleItems","outClass","inClass","eq","-webkit-transform-origin","-moz-perspective-origin","perspective-origin","endPrev","clearTransStyle","endCurrent","baseElement","userItems","owlItems","clearEvents","unWrap","unwrap","destroy","removeData","reinit","addItem","after","before","removeItem","jQuery","easing","jswing","swing","def","easeInQuad","easeOutQuad","easeInOutQuad","easeInCubic","easeOutCubic","easeInOutCubic","easeInQuart","easeOutQuart","easeInOutQuart","easeInQuint","easeOutQuint","easeInOutQuint","easeInSine","cos","PI","easeOutSine","sin","easeInOutSine","easeInExpo","pow","easeOutExpo","easeInOutExpo","easeInCirc","sqrt","easeOutCirc","easeInOutCirc","easeInElastic","j","asin","easeOutElastic","easeInOutElastic","easeInBack","undefined","easeOutBack","easeInOutBack","easeInBounce","easeOutBounce","easeInOutBounce","ischrome","userAgent","MonthDefinition","monthDefinitionString","currentMonthDefinitionString","byAddingMonth","numberOfMonthToAdd","result","parts","split","newTargetMonthes","ceil","toString","$scope","authorized","currentSession","$state","$stateParams","$eaBackendDataModeSelector","feHost","go","$controller","$eaUserProfile","$eaLocalSettings","$eaCspService","$ccDemoModeService","$","action","showRefreshSessionButton","loadProfiles","cspProfiles","params","csp","team","enrollment","initial","demo","load","DataToken","profile","contracts","getContracts","enableDemoMode","nonPersonalTeams","Teams","filter","Role","Id","map","teamid","stateParams","eanumber","getAt","Team","catch","error","$eaBackendAzure","PartnerSdkConnection","ClientId","ClientSecret","Domain","Username","Password","PartnerSdkOperations","date","HideForm","performConnectionTest","optionalUserCredentials","dataMonDebugCsp","destroySession","idp","getSession","IdentityProvider","signOut","refreshSession","leaveActAs","visitProfile","visitProfileInSTS","jwtHelper","verifyJwtToken","tokenValue","decodedToken","decodeToken","EnrollmentNumber","$acWizardHelpers","currentStep","getCurrentStep","current","step01Title","registerError","$on","toState","toParams","fromState","fromParams","name","$eaBackend","$busy","$eaTeamManagement","$toolbar","$eaBilling","formStep01","contractType","targetTeams","Name","activatedPlanEA","activatedPlanPayGo","activatedCostMgnt","during","isAdminInOfTeam","teamChanged","hasRequiredPlan","AccountPlan","isAdminInAtLeastOneTime","getTeamProfilesByRole","teamProfiles","concat","formAddToken","ea","eaType","token","dataEARegisterContract","status","Message","statusText","tokenFieldChanged","ReportView","formAddReport","storageAccount","storageKey","reportContainer","reportFolder","dataCostMgntRegisterContract","contractId","dataCostMgntAddContainerToContract","dataAllSyncReports","setMessage","dataGetMetadata","currencies","availableCurrencies","availableCloudinstances","Display","formAddContract","tenantId","defaultCurrency","currency","cloudInstance","disableCurrency","dataPostRatePlanRegistrationId","aadProtocol","aadHost","RegistrationId","alertMessages","contractModel","subscriptionPermissionLink","hideSubscriptionsDetailsLink","dataGetContract","contract","offerings","CloudInstance","availableOfferings","countries","availableCountries","dataGetContractSubscriptions","verify","subscriptions","verifyPermissions","subscriptionIndex","ArmState","toggleIgnoreSubscriptionState","subscription","Ignore","errors","foundError","subscriptionErrorField","Errors","Offering","Country","dataGetContractSubscriptionsVerifyConnection","Currency","message","reject","verifyConnectionErrors","updatePromise","dataPutContractSubscription","State","formMigrateTeam","getTeam","migrateCurrentUser","dataMigrateToTeamAccount","path","encodeURIComponent","alert","$modal","openContractChooser","availableContracts","toArray","openObjectPickerDialog","model","Definition","Enrollment","openTeamChooser","activeTeamId","minimumRoleInTeam","allowPersonal","selectedTeamProfile","$eaDataCoordinator","$eaWidgetDashboardManager","$eaReportData","ngToast","$interval","$acTimelineGenerator","$timeout","$eaWidgetRepository","dashboards","dashboardsMap","activeDashboard","dataToken","activeUser","dashboardEditMode","rienabled","autoRefreshInformation","enabled","timer","timeout","timeoutDefault","timeoutHandle","hasCap","riEnabled","updateControllerNavBarMenu","isCspCustomer","EnrollmentDefinition","toggleAutoRefresh","getTeams","selectedTeamId","addContract","isAdmin","activeRoleInTeam","isRealTeamContract","openSettingsDialog","openNotiSettingsDialog","openTriggers","openBrandingDialogEx","activeTeamProfile","isActAsSession","prefix","startMonthSync","startFullSync","purgeReportCaches","reloadData","enableNoMargin","nomargin","refreshScreen","cancel","selectDashboard","dashboard","contractPromise","ContractInfo","dataGetContractInfo","contractInfo","billingDay","Active","enableBillingCycle","cycle","transitionTo","active","isBillingCycleEnabled","inherit","relative","$current","notify","loadContractDetails","maxPeriods","MaxPeriods","contractDetails","Token","isTokenExpired","className","openBrandingDialog","brandingSettings","dataUpdateBranding","toggelEditMode","startAddCustomWidget","showRepository","loadedContractInformation","openManageSettingsDialog","updatedContractInformation","dataDeleteContract","finally","dataUpdateContract","Periods","invalidate","cacheHash","href","dataGetContractNotifcationSettings","loadedNotificationSettings","openNotificationSettingsDialog","updatedData","updateGetContractNotifcationSettings","notificationInformation","default","Default","sendMail","triggerContractNotificationForUser","confirm","dataPostPurgeContractReports","currentMonth","reportStrings","createMonthList","addMonth","reverse","selectedMonthes","dataMonthSyncReportsV2","dataMonthSyncReports","Reports","dashboardItem","Licensed","isAccountOwner","Profile","Collection","ResellerApiVersion","version","onDashboardFunction","args","enabledState","finishDashboardFunction","hintText","periodDate","selectedPeriod","getBillingCycleDay","addDay","toDateString","targetDashboard","askForSurveyIfNeeded","open","role","notificationSettings","askForSurvey","Surveys","Influencer","LoginCount","dataUpdateProfile","SurveyAtLogin","$modalInstance","activePanel","companyInformation","currentCompanyInformation","colorSettings","currentColors","customStyleSettings","currentCustomCss","bucketSettings","orgColorSettings","copy","orgCustomStyleSettings","companyChanged","setCompany","colorChanged","setColors","aceLoaded","_editor","aceSession","aceChanged","getDocument","getValue","setCustomCss","resetBranding","resetCustomCss","setValue","ok","close","colors","company","dismiss","contractInformation","contractInformationVirtual","contractTokenInPayload","contractGeneralSettings","Enabled","NotifyZeroValue","contractInformationCurrency","CurrencyOther","retentions","Value","Disabled","removeContract","generateVirtualContractInformationFromToken","enteredToken","tokenExpired","expirationDate","indirectContract","validToken","JSON","parse","stringify","DisplayName","showTokenDialog","getContractType","repeatInformation","Repeats","RepeatsEvery","RepeatsOnMon","RepeatsOnTue","RepeatsOnWed","RepeatsOnThu","RepeatsOnFri","RepeatsOnSat","RepeatsOnSun","repeatsOn","localBreakDownFields","convertRepeatsFromDisplayToModel","DailyReportRepeatsOn","DailyReportRepeatsEvery","breakDownFields","repeatsFields","value","everyFieldsWeeks","requiredPlan","alertDimensions","display","alertDimensionUnits","DailyBurnrateRel","newAlertPolicy","Dimension","Limit","saveDefault","saveAndSendTestMail","addAlertPolicy","LimitUnit","AlertNotificationPolicies","deleteAlertPolicy","policy","DailyReportBreakDownFirst","riWelcomeDashboardId","AvailableContracts","teamProfile","ContractId","rfc4122","sessionLoaded","teamLogo","teamAADConnection","availableRoles","bucketsEnabled","features","buckets","splittedUrl","callbackUri","getDisplayName","user","userName","FirstName","LastName","addUser","existingUsers","Members","Type","openTeamEditUserDialog","CloudSolutionProvider","operationPromisses","removedUsers","deleteUserFromTeam","newUsers","hasUserRole","dataRegisterUserToTeam","Subscriptions","fullAccess","dataInviteUserToTeamV2","editPermissions","helperGetAvailableSubscriptions","availableSubscriptions","openTeamEditPermissionsDialog","dataUpdateTeamMembership","editNotifications","selectedContract","dataGetContractNotifcationSettingsForUser","updateGetContractNotifcationSettingsForUser","addApp","newApp","v4","WildCardSubscriptions","openTeamEditAppDialog","appModel","*","dataRegisterAppToTeam","deleteUserFromTeamEx","resendInvitation","invitationId","dataReInviteUserToTeam","activeTeamBilling","dataGetTeamProfile","dataGetTeamImageLocation","profileImageLocation","dataGetAADConnections","connections","reloadDataWithBusy","updateTeamName","dataUpdateTeamProfile","updateTeamImage","image","dataUpdateTeamImage","linkAAD","editAAD","openBuckets","openSettings","changeUserRole","editContactAddress","openSingleLineBox","updatedContact","getClientId","appProfile","users","isCspTeam","Users","IsCspTeam","string","isUserPseudoUser","LiveId","isUserSelf","isUserAccountOwner","AccountOwner","isUserDelegationAdmin","defer","dataRemoveUserFromTeam","promise","User","AvailableSubscriptions","app","App","newUser","userModel","removeUser","contractCheckBoxChanged","viewStateModelContract","Contract","keys","contractNumber","subscritpionSettings","subscriptionId","everyEntryIsTrue","linkAADInternal","instanceType","redirectUri","callback","tid","dataRegisterAADConnection","TenantId","RequiredGroup","DefaultIdentityProvider","errorMessage","linkAADGer","aadSettings","GroupName","GroupId","graphGroups","updateDirectoryConfig","removeLinkAad","dataDeleteAADConnection","dataGetAADConnectionGroups","groups","localeCompare","group","BucketModel","selfModel","OrgName","getEditorKey","hostProtocol","$$protocol","hostName","$$port","newBucket","bucket","OrgState","deleteBucket","undoBucket","commitBucketEdit","dataGetBucket","updateBuckets","updatePromisses","dataCreateTeamBucket","dataDeleteTeamBucket","history","back","dataGetTeamBuckets","bucketName","teamProfileForm","NotifyAdmins","updateProfile","teamProfileData","NotificationNewMember","addAzureContract","addAwsContract","addGoogleContract","startDemoMode","handleStep","form","roleArn","externalId","reportname","awsData","sessionStorage","getItem","setItem","dataAwsVerifyConnection","dataAwsRegisterContract","cid","accountkey","dataset","gcpData","dataGcpVerifyConnection","dataGcpRegisterContract","moment","loadBillingInformation","billing","SvpMode","isObject","svp","fastspring","Contracts","BillingInformation","Plan","Label","CurrentPlan","Edition","getDisplayTextForPlan","RetentionPeriod","calculateRetentionPeriod","ChargingModel","isInTrial","Payment","Method","Reference","NextPaymentDue","NextPaymentAmount","calculateCurrentPlanPrice","Extra","Info","InvoiceAddress","Account","NextPaymentAmountString","toFixed","BillingStatus","AllowedToStartTrial","hasEverStartedTrial","AllowedToChangePlan","AllowedToChangeExtraInfo","now","updateBillingInformation","openUpdateBillingAddressDialog","updatedInformation","dataUpdateBillingInformation","navigateToBillingPage","dataStartTrial","setCurrentPlan","currentPlan","currentPlanManagement","Details","annualPayment","referrer","editions","fsk","fsk12","price","price12","retention","actionsTitle","actionsIcon","Period","upgradePlan","plan","openPurchaseConfirmationDialog","updatedInvoiceInformation","purchase","billingInfo","upgradeActionAllowed","isPlanHigherThanPlan","BillingAddress","CurrentPlanDisplayText","CurrentPlanPrice","billingAddress","$eaBucket","search","server_error","access_token","accessToken","checkState","isActAs","final","splitPoint","dataGetProfile","dataPostProfileTouch","touchResult","generateSession","Avatar","decodedUri","decodeURIComponent","URL","_","protocol","isValidHttpUrl","enrollmentMode","Profiles","OtherProfiles","enroll","callbackUrl","absolute","resellerId","loadProfileById","cspProfile","$eaBackendAzureV2","ShowUI","dashboardsOrdered","selectDropDownData","selected","elementToRemove","versionSwitcherItemIndex","itemsIndex","tag","addAccount","AccountModel","TierLevel","SyncCustomers","syncCustomers","registerCustomers","openEditCspAccountDialog","openResellers","openVirtualMeters","openCustomerSegmentation","openUpliftCategories","openDownloadPriceSheetDialog","selectDashboardFromDropDown","BillingDay","dataCspMonthSyncReportsV2","AccountId","cspTeamProfile","loadAccounts","cspAccounts","account","collectionPrefix","collectionName","dashboardId","Layout","openCustomerMargin","cspTeamId","cspAccountId","cspCustomerId","dataCspGetUpliftCategories","upliftCategories","dataCspGetResellerMarginForCustomer","resellerMargins","openCspDefineResellerMarginDialog","updatedMargins","dataCspSetResellerMarginForCustomer","openCustomerPortal","extractedTeamId","noMargin","forceV2","updateTokenFromSTS","delegate","publishCustomerToReseller","teamId","accountId","customerId","dataGetCspResellers","cspResellers","resellerName","selectedReseller","dataPublishCspCustomer","activateCustomer","CustomerId","CustomerCompany","deActivateCustomer","getActiveCustomers","loadedCustomers","customers","MicrosoftCustomerId","microsoftCustomerId","CustomerName","customerCompany","NewCommerce","newCommerce","openCustomerChooser","selectedCustomers","customer","dataCspSyncCustomerInAccount","period","PrimaryGroupId","dataCspGetResellerFilterForCustomer","existingFilter","openCspDefineResellerFilterDialog","updatedFilter","dataCspSetResellerFilterForCustomer","ServiceItems","ReportId","dataCspUpdateVirtualMetersForCustomerInAccount","PrimaryGroupName","CustomerTeamId","targetUri","TeamId","NoMargin","ForceV2","dataCspUpgradeResellerVersionForCustomer","accountid","billingDate","dataGetCspDownloadAccountInvoice","downloadUri","getServiceProviderId","dataCspGetResellerFeaturesForCustomer","openCspDefineResellerFeaturesDialog","updatedFeatures","dataCspSetResellerFeaturesForCustomer","Accounts","loadAccount","loadedAccount","openCspUpdateEAAccountDialog","openCspUpdateAWSAccountDialog","openCspUpdateT1AccountDialog","updatedAccountModel","actionPromise","deleteAccount","dataCpvGetConsentLink","consentUrl","dataCspUpdateAccountEAV2","SecurityToken","ExchangeRate","DefaultResellerManagement","dataCspUpdateAccountAWSV2","dataCspUpdateAccountT1V2","AutoActivateCustomers","openPriceSheetDownload","dataCspSyncAccount","openCspRegisterCustomerCostMgntDialog","newCustomerDialogResult","dataCspRegisterCostMgntCustomer","HasConsumption","openCspRegisterCustomerDialog","dataCspRegisterCustomer","TenantIdOrDomain","toggleVersion","openEditGsiSettingsDialog","dataCspGetGsiSettings","settings","openGsiUpdateSettingsDialog","ReferenceCurrency","referenceCurrency","settingsResult","dataCspSetGsiSettings","partnership","newAccount","errorRaised","registerAccount","registerAccountT2","availableCustomerMappings","customermapping","registerAccountEA","dataCspAwsRegisterContract","formData","mapping","registerAccountDemo","registerAccountV1","exitingAccountModel","updateMode","removeAccount","consentCPV","SecurityTokenExpirationDate","SecurityTokenValid","SecurityTokenExpired","TokenExpires","verifySecurityToken","newCustomer","validateForm","existingGSIAccountModel","SystemIntegratorAccountModel","gsiAccountModel","resellerMargin","ResellerMargin","UpliftCategories","updatedResellerMargins","availableMatchKeys","newMarginModel","MatchKey","Margin","ValidUntil","uiHelper","datePopupOpen","datePopupOptions","openDatePopup","deleteMargin","margin","addMargin","existingResellerFilter","ResellerFilter","$eaFilterPanel","activeFilter","Rules","availableFilterFields","buildFieldModelsFromArray","operators","availableOperations","conditions","availableConditions","removeCondition","addCondition","buildRule","region","PriceSheetOptions","Region","$eaBackendAzureCachedContentLoader","$eaDownload","priceSheetOptions","Locale","RCCurrency","ERate","step","download","requestOptions","resourceEndpoint","dataGetPriceComparisionSheet","queryoptions","locale","erate","dayDefinition","dataRequestCachedResourceWithRetry","do","Features","Customer","isDisabled","isDisabledConsumption","isDisabledReservation","isDisabledOffice","isDisabledMarketplace","backUri","openCspResellerRegisterDialog","resellerREgistrationResult","dataRegisterCspResellers","danger","dataUnPublishCspCustomer","ResellerId","ResellerAccountId","Customers","CustomerState","dataDeleteEmptyCspResellers","ResellerName","dataCspGetResellerMarginForReseller","dataCspSetResellerMarginForReseller","resellerAccountModel","$eaBackendAdmin","serviceProviderDefault","serviceProvider","serviceProviders","updateNavBar","authorizedAsAdmin","provider","switchServiceProviderCallback","hasClaim","dataGetServiceProviders","providers","reloadOperation","onReload","targetServiceProvider","loadStats","dataGetSpendingStats","stats","orderByField","reverseSort","spendingStats","spendingKeys","spendingSumsAll","spendingSumsLastYear","spendingSumsLastMonth","stat","Spendings","lastYear","lastMonth","verifyToken","syncCurrentMonth","dataPutPersonalContractsSyncMonth","dataPutTeamContractsSyncMonth","syncAll","dataPutPersonalContractsSync","dataPutTeamContractsSync","deleteUsageData","dataDeletePersonalContractsReports","dataDeleteTeamContractsReports","$eaBackendAdminV2","loadUsers","dataGetUsers","LastLogin","Status","dataDeleteUser","actAsUser","openActAsSession","addNewUser","openAddNewUser","dataInviteUser","upn","loadJobsDuring","loadJobsForTeam","jobMoment","job","jobStarted","fromNow","jobDuration","reloadJobs","dataGetJobs","jobs","runningJobs","delayedJobs","pendingJobs","otherJobs","podName","jobWorker","jobPodUri","jobStatus","$base64","loadEntries","jobPartitionHash","jobpartition","jobmonth","encode","envType","dataGetJobEntries","entries","transclude","service","waitUntilChartContainerExists","containerId","checkExist","uuid","configureCallback","dataCallback","buildChartCallback","$eaChartConfig","$acChartContainerHelpers","chartElement","chartContainerId","areaOptions","createAreaConfig","chart","renderTo","tooltip","yAxis","labels","xAxis","dataCallbackPromise","series","configCallbackPromise","Highcharts","Chart","generateDiagram","elements","valueFieldName","labelFieldName","$element","ToolTipTemplate","pointFormat","YAxisTemplate","isFunction","formatter","format","XAxisTemplate","allowDecimals","id","$watch","notificationCenterRunningLocal","hostname","shownotificationspanelhref","notificationCenterShow","$compile","widgetFs","widget","profiles","cust01","link","el","loading","loadingMessage","setLoading","setLoadingMesage","isActive","finalizeRegistration","finishWidgetRegistration","refreshDependentWidgets","executeDashboardAction","functionId","sendDashboardFunction","toggleState","actionProperty","stateKey","dataItems","isActiveState","toggleStateFunc","reloadNeeded","isActiveStateFunc","onInitialize","onWidgetInitialize","actionInitializers","periodItems","actions","actionType","activeState","onWidgetReload","resizeCallback","onResize","getSize","w","requestResize","newValue","widgetElement","titleHeight","editMode","collection","layout","$eaWidgetDashboardLayoutManager","rebuild","onDashboardEvent","dashboardItems","reloadWidget","loadDashboard","dataGetDashboardLayout","layoutItems","overrideDashboardLayout","extendLayout","dashboardItemsBackUp","fullScreenMode","fullScreenItem","gridsterOpts","columns","rowHeight","resizable","draggable","overridLayoutVersion","oldValue","getDashboardLayout","dataPostDashboardLayout","storeLayout","enterFullScreen","leaveFullScreen","deleteCustomWidget","deleteModel","openCustomWidget","dashboardItemCache","dashboardFunctionCache","createDashboardBasedEventName","createWidgetBasedEventName","widgetId","lookupDashboardItem","userProfile","query","_internalDashboardState","_internalDelayedActivations","_internalReferencedBy","ItemUuid","sizeX","Size","sizeY","row","Position","col","ItemType","ItemTitle","wtype","ItemWidgetType","ItemOptions","ItemDependencies","findDashboardItem","$emit","postDashboardEvent","eventName","payload","eventHandlerFunc","offDashboardEvent","sessionAck","ackArgs","success","func","ack","missingDependencies","dependency","referencedItem","delayedItems","addCustomWidget","widgetDescription","storeModel","layoutSchemeVersion","layoutSchemeOverrides","getLayoutSchemeVersion","newVersion","localStorage","dashbordItems","resultItems","itemId","loadDataForWidgetInRepository","widgetType","dataGetReportCenterReportDefinitions","reports","loadedReports","selectedWidget","General","Title","IFrame","Url","Report","ShowGridActions","GridPageSize","GridMode","GridPieBy","GridPieReduce","GridPieAt","reportGridModes","reportGridPieOperations","closePanel","hideRepository","selectWidget","cancelForm","saveWidget","registerCustomWidget","showWidgetRepository","$filter","$interpolate","$eaDataGroupOperations","$eaDataAggregateOperations","$eaDataColorThemeGenerator","$acDpnService","$acLocaleService","buildDashboard","queryData","groupOption","seriesProperty","GroupProperty","categories","loadedCategories","categoryProperty","PeriodsAvailable","PeriodProperty","execute","realCategoryCount","newCategories","predictionCategory","groupBy","groupedData","seriesHash","firstLevelGroupsKey","seriesname","serie","type","firstLevelGroups","secondLevelGroupKeys","secondLevelGroup","aggregateValue","color","getColorFor","displayNameMapper","displayValue","isArray","categoryIndex","prediction","predictionSeries","marker","lineWidth","lineColor","fillColor","stackBarOptions","createStackedBarConfig","unitExpression","unitLegend","unit","unitSymbol","unitSymbolExpression","decimalSep","getDecimalSeperator","numberOutPut","hasData","onProcessingItemsChanged","onProcessingFinished","newSize","setSize","$acDataSourceWidgetFunctions","groupBySingleDimension","allOver","callWidgetFunction","seriesValues","valueLabel","aggregatedValue","gaugeOptions","createGaugeConfig","stops","pieOptions","createPieConfig","colorByPoint","indexOfBiggestOne","lastBiggestValue","sliced","widgetValue","widgetUnit","prettyNumberValue","isNaN","numeral","colorize","colorStyle","unitValue","numberFormat","$eaDataFilterOperations","compiledFilter","compileFilter","applyCompiledFilter","filteredElements","actionTitle","Action","Icon","actionIcon","Operation","actionOperation","Class","actionVisible","actionHideProperty","actionHideValue","hideElements","actionClass","propertyTitle","Actions","Element","Width","actionsAsLinks","getActionStyle","executeAction","getStyle","imgElement","loadWebPart","Model","dataPath","cdnEntrypoint","actionId","$eaDataItemProcessorChain","$eaWidgetGroupFilterListViewDataSources","monthNames","applyStatePropery","currentState","renderDataByGroupAndPeriod","noData","rawItems","buildDashboardDefer","primaryGroupKey","primaryGroupKeyComparition","Compare","secondaryGroupKey","adaptedFilter","availableFilterFieldMappings","rule","Field","rawItemsFiltered","allCheckedPeriods","selectedPeriodsMultiNormalized","checkedPeriod","processorChain","createProcesserChain","onVisit","resultBucket","Next","Skip","itemCostProperty","allowZeroCostItems","DetectedSelectedPeriod","availablePeriods","lastSyncDateProperty","LastSyncDate","History","itemKey","itemIdProperty","subitemIdProperty","itemQuantityProperty","ServiceMeters","ServicePrimaryMeter","meterModel","Quantity","subItemViewTemplate","viewTemplate","groupOptions","dynamic","DynamicGroupOptions","DynamicGroupOptionsMap","groupLabel","groupOptionModel","GroupLabel","GroupIcon","GroupDescription","dynamicDescription","primaryGroupKeyValues","primaryGroupKeyValuesWasArray","secondaryGroupKeyValue","ServiceCosts","Count","PrimaryGroups","summaryGroup","Symbol","currencySymbol","primaryGroupKeyValue","PrimaryGroupKey","SecondaryGroups","ServiceItemsIdentifiers","SecondaryGroupId","SecondaryGroupName","SecondaryGroupKey","ServiceItemsMap","SecondaryGroupsSummary","primaryItemGroup","primaryGroupName","primaryGroupNameMapping","secondaryItemGroup","secondaryItemGroupSummary","globalResultBucket","process","ChainStats","cs","ci","SetSelectedItemAutomatically","viewTemplates","primaryGroupViewTemplates","currentPrimaryGroup","GroupColor","PrimaryGroupsList","lastSecondaryGroupSummary","ServiceCostsDiff","ServiceCostsDiffRel","currentSecondaryGroupSummary","lastSecondaryGroup","secondaryGroupKeyId","currentSecondaryGroup","SelectedGroupOption","groupSepndingData","generatedHintText","HintText","groupedSpendingData","groupedAllCheckdPeriods","groupOptionUpgradePlan","selectedPeriodsMulti","periodActions","availableFilters","groupedServiceDefinitions","allowExport","exportable","allowFiltering","itemIdState","subItemId","subItemIdState","subitemIconProperty","subItemSymbol","subItemSymbolState","propertyState","propertyQuantity","propertyQuantityState","lastSyncDate","enableZeroCostItems","enableZeroCostItemsState","filterProperties","filterPropertyMapping","filterClass","injectUpgradePlan","RequiredPlan","previousSelectedGroupOption","filterCollection","dataFilters","elementMetaData","groupedMetaData","primaryActions","selectGroupOption","selectedGroupOption","openUpgradePlanWizard","refreshWidget","selectPeriod","groupItemExpanded","expandable","viewOpen","getPeriodLabel","monthLabelArray","getPeriodLabelShort","substr","changedSelectedPeriodMulti","calculateCellStyle","isHeader","background-color","font-weight","margin-left","padding-right","calculateCostDiffsForService","primaryGroup","currentPeriodIndex","serviceIdentifier","currentGroupId","prevGroupId","currentServiceItemMap","currentService","prevServiceItemMap","prevService","calculateServiceCostsString","getSubItemTitle","subItemGroupNameMapping","actionItem","registerDataSources","sortOrderDesc","sortOrderByGroupName","sortOrderByPeriod","sortPrimaryGroups","groupItem","groupCollection","sortServiceItems","serviceItem","groupKeyValue","groupKeyValueAdapted","ServiceName","setPrimaryGroupOrderSettings","setOrderByCosts","resetFilter","applyFilter","removeFilter","force","deleteOk","dataRemoveDataFilter","removeModels","createFilter","buildFilter","saveFilter","teamFilter","dataUpdateDataFilter","updateModels","Owner","dataCreateDataFilter","FilterId","addModels","shareFilter","oldFilterId","unShareFilter","$eaDataExportOperations","exportData","openExportWizard","exportheader","exporttags","exportConfig","historyElements","elementKey","tagsToExport","header","exportListTo","$eaDataSourceManager","controllerScope","registerDataSource","groupSpendingData","All","ReportCurrencySymbol","$parent","syncHandlesEarnings","customerGroupData","refItem","ReportLastSync","isCSP","isT1N","isVirtual","isNewCommerce","CustomerNewCommerce","isAlpha","hasFullEarnings","partialEarnings","FullEarnings","defineResellerMargin","defineResellerFilter","resellerFilterData","openCustomerDashboard","canCustomerSelectVersion","showVersionChooser","Cycle","updateVirtualMeters","openCustomerSettings","ActivatedAt","publishToReseller","manageVouchers","manageContainers","gravatarService","pgSpendingsSubscriptionsTemplateScope","teamProfileMembers","allowPrimaryContact","teamMembers","teamMembersIndex","groupData","Contacts","pgSpendingsSubscriptionsTemplate","editPrimaryContacts","groupModel","lookupExistingContacts","contacts","existingContacts","description","size","selectedUsers","userIdList","getDayOfMonthByIndex","add","getDateNameByIndex","getMeterRateSafely","meter","reportId","Rates","reportRates","reportRate","areDataInV2Mode","allowTagging","viewDayByDayCostsStatus","viewDayByDayCostsId","EntityId","switchDetailDiagramTo","activeDetailDiagram","updateDiagram","metersDayByDayCosts","metersDayByDayQuantity","viewDayByDayCostsAndQuantityData","QuantityDaily","Day","Costs","CostsDaily","dayByDayCostOptions","Unit","meterName","Category","SubCategory","meterRate","rate","viewDayByDayCostsData","viewDayByDayQunatityData","ServiceDailyCosts","ServiceDailyQuantities","dayByDayQunatityOptions","availableDetailDiagrams","icon","meters","dataValueFieldName","dataLabelFieldName","ServiceQuantityUnit","removeTagFromUIElement","tagProperty","searchProperties","tagToRemove","bPassed","sp","ServiceTags","addTag","ServiceCategory","SubscriptionId","ServiceTagsV3","ServiceId","SchemaVersion","dataSetServiceTagsV4","dataSetServiceTagsV3","removeTag","tagIndex","removedBefore","tagIndexV1","ServiceTagsV1","dataSetServiceTagsV1","tagIndexV2","ServiceTagsV2","dataSetServiceTagsV2","removePromise","tagIndexV3","queryTags","distinct","getPopOverTitle","metaDataKeyValue","titleProperty","metaDataElement","getPopOverContent","contentProperty","serviceDescriptionHtml","ServiceDescription","ServiceQuantity","azureTags","SubscriptionName","ServiceType","ServiceSize","ServiceRegion","ResourceGroup","PopoverTitle","PopoverHtml","riPurchaseReportPossible","openRIPurchaseReport","isOpenedStateClosed","isOpenedStateOpened","isOpenedStateInProgress","setOpenedStateClosed","setOpenedStateOpened","setOpenedStateProgress","toggleDetailViewOpenedState","dataGetMetersForService","loadedMeters","Items","openResellerPortal","ResellerTeamId","unpublishAllCustomers","unPublishCustomer","$eaWidgetRiPurchaseImpactDataSources","$acCacheIdentifierGenerator","lastSize","processRefreshRequest","enrollments","currentEnrollment","processChangeEnrollmentRequest","riVirtualMachines","virtualMachines","vm","serviceid","currentVirtualMachine","processChangeVMRequest","chartElementFromDirective","selectorHeight","disclaimerHeight","chartOptions","legend","headerFormat","dateLine","lastLoadedData","startdate","point","costsLine","currencysymbol","usages","tickInterval","plotLines","dashStyle","projectionindex","seriesArray","ResourceInstanceId","cachedCollectionKey","vmeter","riAnalysisData","hasError","lastValue","dataFromPast","dataForFuture","data1YearRi","dataIndex","spendings","rifees","y1","selectEnrollment","selectVirtualMachine","reCalculateReports","updateDailyCacheLocalInjector","overAllSpendings","sum","savaings1Year","savaings3Year","y3","Year1","Year3","CurrencySymbol","ConsumptionMeter","consumptionmeter","MachineType","machinetype","RIFeeY1","RIFeeY3","DailyBurnRate","burnrate","AvgRuntime","avgruntime","RIBreakEvenY1","breakeveny1","RIBreakEvenY3","breakeveny3","$sce","enableFrame","targetPage","targetPageTrusted","trustAsResourceUrl","getElementById","$eaNotificationCenter","updateNavBarBasicMenu","activeTeam","isPartOfAtLeastOneTime","support","toggleNotificationsPanel","toolbarItems","fullWidthHeader","toggleMobileNavMenuClasses","toggleMobileNavMenu","onCollapse","initializeWithElement","htmlElement","subItemsCollapsed","bind","parent","$apply","upload","attrs","handleDrop","dataTransfer","files","fileToUpload","reader","FileReader","onload","readAsDataURL","dropBox","tagAdded","tagRemoved","tagAutoComplete","KEYS","currentTagValue","currentTagProposal","reset","onSubmit","onRemove","onKey","onTagSelected","tagValue","customCss","setTrialSettings","trialEnds","TrialEnds","teamFromProfile","showTrial","realElement","onAction","trialPossible","startTrial","teamRole","fields","save","share","unshare","collapsed","toggleEditor","filterWorkingCopy","updateFilterWithFilter","fieldModels","owner","Operator","Condition","operator","srcFilter","targetFilter","ruleCopy","BillingCycleActive","BillingCycleDay","enable","day","isNoMarginEnabled","stsUpdateToken","profileProperties","dataGetContracts","offerid","country","updatedFields","dataGetContractReports","dataGetContractReportsV2","dataGetContractReportData","report","cacheIdentifier","retry","dataGetContractReportDataV3","dataRegisterContract","directoryDomain","months","serviceName","serviceTags","serviceType","serviceSubscriptionId","serviceId","dataGetContractReportHistory","dataGetContractReportHistoryV3","teamName","members","dataInviteUserToTeam","invitationid","userid","teamImageFile","clientId","clientSecret","subscritpionsForContractPromisses","contractsCollection","results","resultModel","targetUserId","dataGetBranding","bucketname","connectionData","aadId","dataGetAuthInformation","dataPurchase","dataGetBillingInformation","resourceCollection","dataGetDataFilters","filterid","dataCspEnroll","dataCspGetAccounts","dataCspGetAccount","domain","tierLevel","autoActivateCustomers","defaultResellerManagement","exchangeRate","tokenExpires","dataCspRegisterAccount","dataCspRegisterAccountT1V2","dataCspRegisterAccountT2","dataCspRegisterAccountEA","cmapping","dataCspRegisterAccountEAV2","dataCspRegisterAccountV1","dataCspRegisterAccountDemo","dataCspUpdateAccount","dataCspDeleteAccount","tenantIdOrDomain","customerName","hasConsumption","dataCspGetCustomersInAccount","dataCspGetCustomersSpendingsInAccountV2","viewId","cacheIdentifierMap","dataCspActiveCustomersInAccount","dataCspDeActiveCustomersInAccount","gsiCurrency","dataCspGetCustomersSpendingsInAccount","optionalMonth","margins","accountKey","dataSetName","eaToken","storageAccountName","storageAccountKey","dataDemoRegisterContract","dataGetServiceCharts","dataGetRiVirtualMachines","dataGetRiAnalysisResult","resourceInstanceId","dataGetTeamHashes","hashCategory","dataGetTeamHash","hashId","resellerAccountId","dataGetCspResellerSummary","accountName","customerMapping","dashboardVersion","dashboardLayoutItems","dataGetDashboardWidgets","dataPostDashboardWidget","dataDeletDashboardWidget","dataGetContractTags","getDefaultHeaders","jwtToken","Authorization","getDefaultHeadersImageUpload","Content-Type","extractDataFromResponse","requestPromise","extractDataFromLocationHeader","splittedHeader","headers","entityId","$eaBackendBase","adminUri","apiProtocol","apiHost","providerId","delete","put","apiHostAdminV2","optionalTeam","partitionKey","userUpn","post","Upn","$acWaitHelpers","backendUriV2","apiHostV2","queryParameters","endDate","Initialize","CustomerMapping","FakeServiceType","updateAccountPayload","CustomerSubType","reportMonth","splitedMonth","reportMonthEnd","padStart","subtract","toDate","tags","Month","AssumedRole","ExternalId","Bucket","BucketPrefix","ReportName","AccountName","AccountKey","ReportContainer","ReportFolder","ServiceAccountKey","BillingDataSet","qk","notUsedResourceId","queryOptions","FullAccess","Callback","responseData","matchKey","validUntil","oneTimeDownloadTicketResponse","oneTimeDownloadTicket","BucketName","Prefix","ItemId","WidgetDescription","fm","Filter","resourceId","addProcessingItem","resultData","removeProcessingItem","dataRequestCachedResourcesWithRetry","resourceInformation","reportLoadPromisses","resource","CacheIdentifier","buildCacheIdentifier","CacheHash","cacheIdentifierExtenion","optionalParams","contractReports","contractReportsSmall","ReportsFull","loadReportHistory","backendUri","backendBoostUris","apiBoostHosts","apiBoostHost","stsUri","stsProtocol","stsHost","monUri","grant_type","baseUri","boostIndex","DirectoryDomain","DefaultCurrency","fd","FormData","head","NotificationSettings","Options","PaymentMethod","lastPosition","SessionModel","sessionData","selfSessionModel","IdentityProviderId","IdentityProviderToken","ActAs","cap","claim","hasClaims","claims","claimMissing","isCapabilityActivated","activeSession","eventCallBacks","onDestroyed","triggerEvent","param","eventCallbackCollection","evcb","onUpdateCallback","optionalRequiredPermissions","cachedSessionModel","Error","bucketLookupPromise","hashHostPrefix","getTeamIdFromHostSegment","authInfo","authProvider","aad","bucketIdp","oAuth2State","$$absUrl","oAuth2Callback","stsRedirectUri","idpState","stsClientId","firstName","lastName","avatar","loginCount","surveyAtLogin","idpType","idpId","idpToken","optionalRegisterHint","optionalActAsMode","idpParam","currentSessionService","updatedToken","newTab","actAsUserId","serviceProviderId","feProtocol","sha1","fePort","setActAsMode","productionApiHost","productionApiHostV2","productionApiAdminHostV2","productionApiBoostHosts","productionTitle","productionConfiguration","authClientId","authRedirectUri","cdn","appTitle","devConfiguration","svpMap","azure-costs.de","cloudcosts.matrix42.com","customer.centrality.com","currentHost","activeConfiguration","activeSvpConfiguration","deployment","feature","getTeamsByRole","teamProfilePromisses","teams","getTeamProfileById","processRequest","requestConfig","defaultCompanyInformation","logo","generalBackgroundColor","headerBackgroundColor","headerFontColor","headerFontColorHover","bodyLineColor","buttonDefaultColor","buttonDefaultHoverColor","buttonPrimaryColor","buttonPrimaryHoverColor","reportItemColor","reportItemColorHover","loadBranding","planValueOrder","basic","startup","professional","enterprise","planDisplayText","billingOrTeamInformation","planA","planB","loadProfile","accesstoken","method","transformRequest","headersGetter","authorization","defaults","cachedProfile","duplicatedProfile","finalCacheProfile","Capabilities","shaObj","jsSHA","update","hash","getHash","filterByTeam","ContractCollection","dataElements","selfContractCollecton","__defineGetter__","first","contractIndex","ContractsEx","enrollmentNumber","hostSegment","bucketModel","TeamIdentifier","createMonthDefinition","valueName","defaultValue","settingsStorageVersion","defaultValues","__defineSetter__","$eaDataRawSources","cache","currentCacheHash","selectModels","searchKeys","searchValues","models","useCacheIfPossible","classNameValues","classNameValue","join","loadDataCallback","queryDataSource","cachedCollection","queryRawDataFromBackend","propertyKey","propertyOperation","elementIndex","elementsToAdd","modelToStore","operationCallback","queryInsertOrMergeDataSourceOperation","modelToDelete","queryDeleteDataSourceOperation","count","reportsData","avg","containsValue","addToResultIfFitsToContainsValue","sumplusaggr","prevValue","operations","other","op","addElementToGroupSafely","groupedResult","groupElement","groupKeyValueLowerCases","properties","groupValue","groupKeyChildValue","fieldPropertyMapping","ServiceUnit","Tag","CostCenter","Department","conditionOperations","=","<>","<","<=",">",">=","contains","notContains","startsWith","notStartsWith","conditionOperationsValueForUndefined","filterToApply","rules","filterGroups","currentFilterChilds","filterElement","passedRuleCheck","filterSubGroup","fieldPropertyMapped","fieldValue","ruleValue","parseFloat","intToHexCodeString","rgbToHexWebCode","R","G","B","baseColorPalette","getSubscriptionColorByIndex","colorIndex","percent","moduloResult","divResult","baseColor","colorStreamLastIndexMap","colorIndexMap","dataStreamType","colorTagValue","colorStreamIndex","dataSources","dataSourceHost","queryCallback","storeCallback","deleteCallback","store","dataSource","$injector","$acDataSourceClasses","$acDataSourceSettings","$acDataSourceHelper","registeredPlugins","loadServiceTypeMetainformation","loadDataFromStaticUrl","ServiceDefinitionClass","ServiceTitle","_invokeQueue","serviceToWorkWith","csvDelimiter","addToResultSafely","headerProperties","line","subKeys","tagName","GroupTags","sk","subKeyValue","decimalSeparator","isNumber","dataArrays","objectIdentifier","objectonizePropertiesWithKey","groupedDataArrays","flatDataArray","dataArrayIndex","dataArray","dataElement","objIdentifierValue","objectClone","tokenizeKey","val","tokenizeSubKey","tokenizeValue","targetProperty","callbacks","dataItem","chainIndex","resultItemProcessing","monthCount","startDate","internalMonthCount","directionForward","monthList","monthIndex","newMoment","amount","getCurrentYear","toLocaleString","dataTokenJwt","reportCacheHash","profileCacheHash","jwtUserId","jwtDecoded","uid","localInjector","localInjectorKey","buildDailyCacheIdentifier","refDate","localInjectorValue","getStoreDashboardItemsCallback","itemToStore","getDeleteDashboardItemsCallback","itemToDelete","getQueryDashboardItemsCallback","dataFileName","DashboardItemClass","loadedItems","registerDataSourceDashboardItemClass","dataSourceManager","collectionId","registerDataSourcePeriodClass","availableReports","PeriodClass","registerDataSourceReportClass","loadedData","reportModel","ReportClass","DailyReportEnbaled","DailyReport","DailyReportBreakDownSecond","MonthlyCostLimit","CreatedAt","UpdatedAt","LastTouch","registerDataSourceSpendingFilerClass","SpendingFilterClass","registerDataSourceSpendingEntryClassWithMappingCallback","mappingCallback","reportsInfo","registerDataSourceSpendingHistoryEntryClassWithMappingCallback","reportsSorted","registerDataSourceSpendingEntryClassForCoreApi","loadedTags","tagElement","decodedKey","decode","decodedKeySplit","exc","indexLoadedTags","azureTagCaseAdaptionHash","services","correctedTagName","dataSourceClass","getCurrencySymbolFromCurrency","loadGenericView","currentHashKey","duplicatedOptions","hashKeyPartition","hashMap","periods","processingItems","splittedState","wait","loadUrl","loadStaticDataGenericCallback","classModel","initialData","SpendingEntryClass","ReportMonth","ReportYear","ReportCurrency","ServiceIcon","SubscriptionEntryClass","OfferingType","TeamMembershipEntryClass","SignUp","SubscriptionPermissions","SpendingHistoryEntryClass","HistoryDay","HistoryCurrency","HisotryCurrencySymbol","HistoryDayOverallCosts","SubscriptionDayCosts","SubscriptionDayCostsDiff","SpendingGroupOptionClass","ResellerCustomerEntryClass","CustomerContact","CustomerDomain","CustomerTenantId","EntitlementId","EntitlementName","ResellerCustomerClass","ReportClassificationClass","ReportPeriod","ResellerT2CustomerEntryClass","ResellerAccountName","localFunction","func:0B851B23-0FA1-4450-A859-7861B3F1E01D","dasboardItemScope","startDay","localfunc","mapSpendingEntries","lastSync","costs","subtype","quantity","tagsV1","tagsV2","tagsV3","costcenter","department","resourcegroup","ResourceUri","resourecuri","dailyCosts","dailyQuantity","mapSpendingHistoryEntries","historyData","dayData","overallCosts","overall","dayBefore","entry","HistoryCurrencySymbol","HistoryDayOverallCostsDiff","loadSubscriptions","loadedSubscriptions","itemIdx","StartDate","$acDataSourceHelperCspGenericSummary","loadCSPDashboardItemsByTemplate","dashboardTemplate","loadCSPDashboardItems","loadCSPDashboardItemsT2","loadCSPDashboardItemsV2","loadCSPDashboardItemsT2V2","loadCustomerReportItems","customerIndex","pendingPeriodRequests","pendingPeriodCall","spending","customerReport","CostsBC","EntitlementSymbol","resultList","loadCustomerReportItemsV2","loadAllCustomerItems","customerContact","customerDefaultDomain","customerTenantId","customerTeamId","CustomerContractId","customerContractId","activatedAt","loadAvailablePeriodClasses","loadCSPGsiDashboardItems","loadAccountReportItems","gsiAccount","accounts","CustomerIcon","AccountCountry","AccountCurrency","AccountExchangeRate","AccountType","referenceCurrencySymbol","loadTeamMembership","loadedTeamProfile","member","memberModel","Logins","loadRIDashboardItems","loadCSPResellerDashboardItems","loadResellerItems","resourceLoadRouting","hashesMap","loadedSummaryData","maxElements","posts","shortenedExcerpt","blogEntry","excerpt","shortenText","lastSpace","lastIndexOf","strFileName","strMimeType","D","z","Blob","MozBlob","WebKitBlob","call","blob","fr","saver","winMode","setAttribute","innerHTML","removeChild","revokeObjectURL","safari","msSaveBlob","bin","atob","mx","uia","Uint8Array","charCodeAt","d2b","createObjectURL","constructor","btoa","callbackLocation","cspTeams","cspProfileId","updateAccount","accountModel","getCustomers","exporting","credits","pane","center","startAngle","endAngle","background","backgroundColor","background2","innerRadius","outerRadius","shape","minorTickInterval","tickPixelInterval","tickWidth","plotOptions","solidgauge","dataLabels","borderWidth","useHTML","stackLabels","column","stacking","spline","plotBackgroundColor","plotBorderWidth","plotShadow","pie","allowPointSelect","cursor","showInLegend","area","enableAzureTags","csvConfiguration","enableTags","headerSelectionModel","selectedHeader","currentTeamModel","getImageUrl","getDetailsString","existingObjects","selectedobjects","singleSelect","ExistingObjects","SelectedObjects","Metadata","Description","GetImageUrl","GetDisplayName","GetDetailsString","SingleSelect","selectedObjects","hasDetailsString","hasFontawesomeIcon","imageUrl","isString","isSelected","selectObject","deselectObject","Line","openMessagegeBox"],"mappings":"AAAA,aAuGA,SAASA,sBAAsBC,EAAcC,EAAIC,GAC/C,OAA4B,IAAxBF,EAAaG,OAAuBD,EAAEE,UAEnCF,EAAEG,KAAKJ,EAAGD,EAAa,KAAKM,KAAK,WAMtC,OAHAN,EAAaO,OAAO,EAAG,GAGhBL,EAAEG,KAAKN,sBAAsBC,EAAcC,EAAIC,MCxG1D,SAASM,WACL,GAAKC,SAASC,KAAd,CACA,IAAIC,EAAIF,SAASC,KACbE,EAAIH,SAASI,gBACbC,EAAIC,OAAOC,YACXC,EAAIN,EAAEO,aAIV,GAHAC,SAAWV,SAASW,WA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1B,EAAe2B,MAAKrW,EAAQkZ,QAG9BlZ,EAAOgP,OAAS,WACd0F,EAAe8B,QAAO,cCZ1B9uB,QAAQC,OAAM,mBAAoBkC,WAAU,4BAA+B,SAAU,SAAU,SAAQmW,EAASoL,GAE9GpL,EAAO0iF,iBAAmB,SAASv2F,EAAOq2D,GAWxC,OAToBp3C,EAAO6I,MACzBrqB,YAAa,mCACbC,WAAY,sBACZzN,SACEulG,SAAU,WAAa,OAAS13C,MAAO99C,EAAOy1F,YAAap/B,OAK1C9iD,WCbzBhY,QAAQC,OAAM,mBAAoBkC,WAAU,uBAAwB,SAAU,iBAAQ,cAA0B,WAAY,SAACmW,EAAA0U,EAAAlU,EAAAmhF,GAE3H3hF,EAAO7T,MAAQw1F,EAAS13C,MACxBjqC,EAAOwiD,YAAcm/B,EAASC,YAE9B5hF,EAAOoW,GAAK,WACV1B,EAAe2B,SAGjBrW,EAAOgP,OAAS,WACd0F,EAAe8B,QAAO","file":"scripts.js","sourcesContent":["'use strict';\n\n//\n// ARRAY\n//\n\n// removes an object from the array\nArray.prototype.removeObject = function(obj) {\n var idx = this.indexOf(obj);\n if (idx !== -1) {\n this.splice(idx, 1);\n }\n};\n\n// removes an object by a given property\nArray.prototype.removeObjectByProperty = function(property, propertyValue) {\n\n var foundItem = null;\n this.forEach(function(item) {\n if (item[property] === propertyValue) {\n foundItem = item;\n }\n });\n\n this.removeObject(foundItem);\n};\n\n// replaces an object by a given property\nArray.prototype.replaceObjectByProperty = function(property, propertyValue, updatedObject) {\n\n var foundItem = null;\n this.forEach(function(item) {\n if (item[property] === propertyValue) {\n foundItem = item;\n }\n });\n\n if (!foundItem) { return; }\n\n var idxOfItem = this.indexOf(foundItem);\n if (idxOfItem === -1 ) { return; }\n\n this[idxOfItem] = updatedObject;\n};\n\n\nArray.prototype.sortOn = function(key){\n this.sort(function(a, b){\n if(a[key] < b[key]){\n return -1;\n }else if(a[key] > b[key]){\n return 1;\n }\n return 0;\n });\n\n return this;\n};\n\nArray.prototype.sortSimple = function(){\n this.sort(function(a, b){\n if(a < b){\n return -1;\n }else if(a > b){\n return 1;\n }\n return 0;\n });\n\n return this;\n};\n\n\n// Generates an index by a single property. This property must be an unique key\nArray.prototype.buildIndex = function(objectKey) {\n var selfArray = this;\n\n var newObject = {};\n\n selfArray.forEach(function(element) {\n\n // get the key value\n var keyValue = element[objectKey];\n\n // set the value\n newObject[keyValue] = element;\n });\n\n return newObject;\n};\n\nArray.prototype.isSame = function(array2) {\n var array1 = this;\n return (array1.length == array2.length) && array1.every(function(element, index) {\n return element === array2[index];\n });\n};\n\nArray.prototype.appendArray = function(srcArray) {\n this.push.apply(this, srcArray);\n};\n\n\nfunction executeAndReduceArray(workingArray, cb, q) {\n if (workingArray.length === 0) { return q.resolve(); }\n\n return q.when(cb(workingArray[0])).then(function() {\n\n // resuce the array\n workingArray.splice(0, 1);\n\n // and call us again\n return q.when(executeAndReduceArray(workingArray, cb, q));\n });\n}\n\nArray.prototype.forEachExecuteAsyncOperationSequential = function(q, cb) {\n\n // copy all items on a working array\n var workingArray = []; workingArray.appendArray(this);\n\n // execute and reduce\n return executeAndReduceArray(workingArray, cb, q);\n};\n\nArray.prototype.forEachExecuteAsyncOperationParallel = function(q, cb) {\n\n // remeber the promises\n var promissesArray = [];\n\n // add the action\n this.forEach(function(item) {\n promissesArray.push(q.when(cb(item)));\n });\n\n // wait until all is done\n return q.all(promissesArray);\n};\n\n//\n// Date\n//\nDate.prototype.currentMonthDefinition = function() {\n return this.getFullYear() + '-' + ('0' + (this.getMonth() + 1)).slice(-2);\n};\n\nDate.prototype.currentDayDefinition = function() {\n return this.currentMonthDefinition() + '-' + ('0' + (this.getDate() + 1)).slice(-2);\n};\n\nDate.prototype.addDays = function(days)\n{\n var dat = new Date(this.getTime());\n dat.setDate(this.getDate() + days);\n return dat;\n};\n\nDate.isLeapYear = function (year) {\n return (((year % 4 === 0) && (year % 100 !== 0)) || (year % 400 === 0));\n};\n\nDate.getDaysInMonth = function (year, month) {\n return [31, (Date.isLeapYear(year) ? 29 : 28), 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month - 1];\n};\n\n//\n// String\n//\nString.prototype.capitalizeFirstLetter = function() {\n return this.charAt(0).toUpperCase() + this.slice(1);\n};\n\nString.prototype.downCaseFirstLetter = function() {\n return this.charAt(0).toLowerCase() + this.slice(1);\n};\n\nString.prototype.removeHeading = function(s) {\n if (this.indexOf(s) === 0) {\n return this.substring(s.length);\n } else {\n return this;\n }\n};\n\nString.prototype.removeTrailing = function(s) {\n if (this.endsWith(s)) {\n return this.substring(0, this.length - s.length);\n } else {\n return this;\n }\n};\n\nString.prototype.toHHMMSS = function () {\n var sec_num = parseInt(this, 10); // don't forget the second param\n var hours = Math.floor(sec_num / 3600);\n var minutes = Math.floor((sec_num - (hours * 3600)) / 60);\n var seconds = sec_num - (hours * 3600) - (minutes * 60);\n\n if (hours < 10) {hours = \"0\"+hours;}\n if (minutes < 10) {minutes = \"0\"+minutes;}\n if (seconds < 10) {seconds = \"0\"+seconds;}\n return hours+':'+minutes+':'+seconds;\n};\n","// SmoothScroll v0.9.9\n// Licensed under the terms of the MIT license.\n\n// People involved\n// - Balazs Galambosi: maintainer (CHANGELOG.txt)\n// - Patrick Brunner (patrickb1991@gmail.com)\n// - Michael Herf: ssc_pulse Algorithm\n\nfunction ssc_init() {\n if (!document.body) return;\n var e = document.body;\n var t = document.documentElement;\n var n = window.innerHeight;\n var r = e.scrollHeight;\n ssc_root = document.compatMode.indexOf(\"CSS\") >= 0 ? t : e;\n ssc_activeElement = e;\n ssc_initdone = true;\n if (top != self) {\n ssc_frame = true\n } else if (r > n && (e.offsetHeight <= n || t.offsetHeight <= n)) {\n ssc_root.style.height = \"auto\";\n if (ssc_root.offsetHeight <= n) {\n var i = document.createElement(\"div\");\n i.style.clear = \"both\";\n e.appendChild(i)\n }\n }\n if (!ssc_fixedback) {\n e.style.backgroundAttachment = \"scroll\";\n t.style.backgroundAttachment = \"scroll\"\n }\n if (ssc_keyboardsupport) {\n ssc_addEvent(\"keydown\", ssc_keydown)\n }\n}\n\nfunction ssc_scrollArray(e, t, n, r) {\n r || (r = 1e3);\n ssc_directionCheck(t, n);\n ssc_que.push({\n x: t,\n y: n,\n lastX: t < 0 ? .99 : -.99,\n lastY: n < 0 ? .99 : -.99,\n start: +(new Date)\n });\n if (ssc_pending) {\n return\n }\n var i = function () {\n var s = +(new Date);\n var o = 0;\n var u = 0;\n for (var a = 0; a < ssc_que.length; a++) {\n var f = ssc_que[a];\n var l = s - f.start;\n var c = l >= ssc_animtime;\n var h = c ? 1 : l / ssc_animtime;\n if (ssc_pulseAlgorithm) {\n h = ssc_pulse(h)\n }\n var p = f.x * h - f.lastX >> 0;\n var d = f.y * h - f.lastY >> 0;\n o += p;\n u += d;\n f.lastX += p;\n f.lastY += d;\n if (c) {\n ssc_que.splice(a, 1);\n a--\n }\n }\n if (t) {\n var v = e.scrollLeft;\n e.scrollLeft += o;\n if (o && e.scrollLeft === v) {\n t = 0\n }\n }\n if (n) {\n var m = e.scrollTop;\n e.scrollTop += u;\n if (u && e.scrollTop === m) {\n n = 0\n }\n }\n if (!t && !n) {\n ssc_que = []\n }\n if (ssc_que.length) {\n setTimeout(i, r / ssc_framerate + 1)\n } else {\n ssc_pending = false\n }\n };\n setTimeout(i, 0);\n ssc_pending = true\n}\n\nfunction ssc_wheel(e) {\n if (!ssc_initdone) {\n ssc_init()\n }\n var t = e.target;\n var n = ssc_overflowingAncestor(t);\n if (!n || e.defaultPrevented || ssc_isNodeName(ssc_activeElement, \"embed\") || ssc_isNodeName(t, \"embed\") && /\\.pdf/i.test(t.src)) {\n return true\n }\n var r = e.wheelDeltaX || 0;\n var i = e.wheelDeltaY || 0;\n if (!r && !i) {\n i = e.wheelDelta || 0\n }\n if (Math.abs(r) > 1.2) {\n r *= ssc_stepsize / 120\n }\n if (Math.abs(i) > 1.2) {\n i *= ssc_stepsize / 120\n }\n ssc_scrollArray(n, -r, -i);\n e.preventDefault()\n}\n\nfunction ssc_keydown(e) {\n var t = e.target;\n var n = e.ctrlKey || e.altKey || e.metaKey;\n if (/input|textarea|embed/i.test(t.nodeName) || t.isContentEditable || e.defaultPrevented || n) {\n return true\n }\n if (ssc_isNodeName(t, \"button\") && e.keyCode === ssc_key.spacebar) {\n return true\n }\n var r, i = 0,\n s = 0;\n var o = ssc_overflowingAncestor(ssc_activeElement);\n var u = o.clientHeight;\n if (o == document.body) {\n u = window.innerHeight\n }\n switch (e.keyCode) {\n case ssc_key.up:\n s = -ssc_arrowscroll;\n break;\n case ssc_key.down:\n s = ssc_arrowscroll;\n break;\n case ssc_key.spacebar:\n r = e.shiftKey ? 1 : -1;\n s = -r * u * .9;\n break;\n case ssc_key.pageup:\n s = -u * .9;\n break;\n case ssc_key.pagedown:\n s = u * .9;\n break;\n case ssc_key.home:\n s = -o.scrollTop;\n break;\n case ssc_key.end:\n var a = o.scrollHeight - o.scrollTop - u;\n s = a > 0 ? a + 10 : 0;\n break;\n case ssc_key.left:\n i = -ssc_arrowscroll;\n break;\n case ssc_key.right:\n i = ssc_arrowscroll;\n break;\n default:\n return true\n }\n ssc_scrollArray(o, i, s);\n e.preventDefault()\n}\n\nfunction ssc_mousedown(e) {\n ssc_activeElement = e.target\n}\n\nfunction ssc_setCache(e, t) {\n for (var n = e.length; n--;) ssc_cache[ssc_uniqueID(e[n])] = t;\n return t\n}\n\nfunction ssc_overflowingAncestor(e) {\n var t = [];\n var n = ssc_root.scrollHeight;\n do {\n var r = ssc_cache[ssc_uniqueID(e)];\n if (r) {\n return ssc_setCache(t, r)\n }\n t.push(e);\n if (n === e.scrollHeight) {\n if (!ssc_frame || ssc_root.clientHeight + 10 < n) {\n return ssc_setCache(t, document.body)\n }\n } else if (e.clientHeight + 10 < e.scrollHeight) {\n var overflow = getComputedStyle(e, \"\").getPropertyValue(\"overflow\");\n if (overflow === \"scroll\" || overflow === \"auto\") {\n return ssc_setCache(t, e)\n }\n }\n } while (e = e.parentNode)\n}\n\nfunction ssc_addEvent(e, t, n) {\n window.addEventListener(e, t, n || false)\n}\n\nfunction ssc_removeEvent(e, t, n) {\n window.removeEventListener(e, t, n || false)\n}\n\nfunction ssc_isNodeName(e, t) {\n return e.nodeName.toLowerCase() === t.toLowerCase()\n}\n\nfunction ssc_directionCheck(e, t) {\n e = e > 0 ? 1 : -1;\n t = t > 0 ? 1 : -1;\n if (ssc_direction.x !== e || ssc_direction.y !== t) {\n ssc_direction.x = e;\n ssc_direction.y = t;\n ssc_que = []\n }\n}\n\nfunction ssc_pulse_(e) {\n var t, n, r;\n e = e * ssc_pulseScale;\n if (e < 1) {\n t = e - (1 - Math.exp(-e))\n } else {\n n = Math.exp(-1);\n e -= 1;\n r = 1 - Math.exp(-e);\n t = n + r * (1 - n)\n }\n return t * ssc_pulseNormalize\n}\n\nfunction ssc_pulse(e) {\n if (e >= 1) return 1;\n if (e <= 0) return 0;\n if (ssc_pulseNormalize == 1) {\n ssc_pulseNormalize /= ssc_pulse_(1)\n }\n return ssc_pulse_(e)\n}\n\nvar ssc_framerate = 150;\nvar ssc_animtime = 500;\nvar ssc_stepsize = 150;\nvar ssc_pulseAlgorithm = true;\nvar ssc_pulseScale = 6;\nvar ssc_pulseNormalize = 1;\nvar ssc_keyboardsupport = true;\nvar ssc_arrowscroll = 50;\nvar ssc_frame = false;\nvar ssc_direction = {\n x: 0,\n y: 0\n};\n\nvar ssc_initdone = false;\nvar ssc_fixedback = true;\nvar ssc_root = document.documentElement;\nvar ssc_activeElement;\nvar ssc_key = {\n left: 37,\n up: 38,\n right: 39,\n down: 40,\n spacebar: 32,\n pageup: 33,\n pagedown: 34,\n end: 35,\n home: 36\n};\n\nvar ssc_que = [];\nvar ssc_pending = false;\nvar ssc_cache = {};\n\nsetInterval(function () {\n ssc_cache = {}\n}, 10 * 1e3);\n\nvar ssc_uniqueID = function () {\n var e = 0;\n return function (t) {\n return t.ssc_uniqueID || (t.ssc_uniqueID = e++)\n }\n}();\n\nvar ischrome = /chrome/.test(navigator.userAgent.toLowerCase());\n\nif (ischrome) {\n ssc_addEvent(\"mousedown\", ssc_mousedown);\n ssc_addEvent(\"mousewheel\", ssc_wheel);\n ssc_addEvent(\"load\", ssc_init)\n}\n","\"use strict\";\n\n angular.module('app.env', [])\n\n.constant('envDeployment', {deploymentUUID:'4996f12a-37b3-4ca7-b919-5d2c0ff628b0',cdnHostDev:'cost-test-cdn.azureedge.net',cdnHostProd:'cdn.azure-costs.com'})\n\n;","'use strict';\n\n/**\n * @ngdoc overview\n * @name azureCostsFeApp\n * @description\n * # azureCostsFeApp\n *\n * Main module of the application.\n */\nangular\n .module('azureCostsFeApp', [\n 'app.env',\n 'ngHelperAirbrake', \n 'ngAnimate',\n 'ngCookies',\n 'ngResource',\n 'ngSanitize',\n 'ngTouch',\n 'ngHelperBusy',\n 'ngHelperCropResize',\n 'angularMoment',\n 'ngHelperUserVoice',\n 'ngHelperDynamicTemplateLoader',\n 'ng.deviceDetector',\n 'ui.bootstrap',\n 'uiSwitch',\n 'angular-jwt',\n 'ngHelperToolbar',\n 'ui.gravatar',\n 'xeditable',\n 'minicolors',\n 'ui.ace',\n 'ui.router',\n 'gridster',\n 'uuid',\n 'base64',\n 'ngToast',\n 'timer'\n ])\n.config(function ($stateProvider, $urlRouterProvider, $locationProvider, $uservoiceProvider, $dynamicTemplateLoaderProvider, $airbrakeProvider, ngToastProvider, $sceDelegateProvider, envDeployment) {\n\n console.log(\"Application is loading\");\n\n // define our trusted resources\n $sceDelegateProvider.resourceUrlWhitelist([\n // Allow same origin resource loads.\n 'self',\n\n // Allow loading from our assets domain.\n 'https://' + envDeployment.cdnHostDev + '/**',\n 'https://' + envDeployment.cdnHostProd + '/**'\n ]);\n\n // configure airbrake\n if (location.host.indexOf('costs-test.azurewebsites.net') !== -1) {\n $airbrakeProvider.setProject('316459', 'd61ff188652159fa8077e92ec72b0884', 'test');\n } else if (location.host.indexOf('azure-costs.com') !== -1 || location.host.indexOf('azure-costs.de') !== -1 || location.host.indexOf('cloud-costs.com') !== -1) {\n // set the airbrake project id\n $airbrakeProvider.setProject('316459', 'd61ff188652159fa8077e92ec72b0884', 'production');\n }\n\n // set html5 mode\n $locationProvider.html5Mode(true);\n\n // Register the HTTP interceptors\n $dynamicTemplateLoaderProvider.registerInterceptors();\n\n // Configure the UserVoice provider\n $uservoiceProvider.setSubDomain('azurecostmonitor');\n $uservoiceProvider.setApiKey('g0PclZtSbWOApdniE89ZLw');\n\n // configure the toast\n ngToastProvider.configure({\n animation: 'fade',\n verticalPosition: 'bottom',\n horizontalPosition: 'left',\n dismissButton: true\n });\n\n // default route\n $urlRouterProvider.otherwise('/');\n\n // routing states\n $stateProvider\n\n // helper state for unauthorized\n .state('public', {\n abstract: true,\n templateUrl: 'views/ea-public-area.html',\n controller: 'EaPublicAreaCtrl'\n })\n\n // Public Pages\n .state('public.landing', {\n url: '/?offline',\n template: '
',\n controller: 'EaSplashCtrl'\n }).state('public.signin', {\n url: '/signin?team&enrollment&initial&idp&csp&demo',\n templateUrl: 'views/ea-signin.html',\n controller: 'EaSignInCtrl'\n }).state('public.debuggerCsp', {\n url: '/debugger/csp',\n templateUrl: 'views/debugger/csp.html',\n controller: 'EaDebuggerCspCtrl'\n })\n\n // Used SSO\n .state('ssoCallback', {\n url: '/sso/callback?state&access_token&server_error',\n templateUrl: 'views/sso/ea-callback.html',\n controller: 'EaSSOCallbackCtrl'\n })\n // SSO\n .state('ssoFinish', {\n url: '/sso/finish?redirect&access_token',\n templateUrl: 'views/sso/ea-idp.html',\n controller: 'EaSSOFinishCtrl'\n }).state('ssoAccessDenied', {\n url: '/sso/access_denied',\n templateUrl: 'views/sso/ea-sso-access-denied.html',\n controller: 'EaSSOAccessDeniedCtrl'\n })\n\n // helper state for authorizing\n .state('authorized', {\n abstract: true,\n templateUrl: 'views/ea-secured-area.html',\n controller: 'EaSecuredAreaCtrl',\n resolve: {\n '$eaCurrentSession': ['$eaSession2', function($eaSession2) {\n return $eaSession2.lazy();\n }]\n }\n })\n\n // Global Add Report\n .state('authorized.reportAdd', {\n url: '/report/add?teamid',\n templateUrl: 'views/add/ea-add.html',\n controller: 'EaAddCtrl'\n })\n .state('authorized.reportAdd.step01', {\n url: '/step01',\n templateUrl: 'views/add/ea-add-step01.html',\n controller: 'EaAddStep01Ctrl'\n })\n .state('authorized.reportAdd.step02-ea', {\n url: '/step02/ea?team',\n templateUrl: 'views/add/ea-add-step02-ea.html',\n controller: 'EaAddStep02EaCtrl'\n })\n .state('authorized.reportAdd.step02-rate', {\n url: '/step02/rate?team&enrollment&csp¤cy',\n templateUrl: 'views/add/ea-add-step02-rate.html',\n controller: 'EaAddStep02RateCtrl'\n })\n .state('authorized.reportAdd.step02-rate-connect', {\n url: '/step02/rate-connect?team&enrollment&csp',\n templateUrl: 'views/add/ea-add-step02-rate-connect.html',\n controller: 'EaAddStep02RateConnectCtrl'\n })\n .state('authorized.reportAdd.step02-costmgnt', {\n url: '/step02/costmgnt?team',\n templateUrl: 'views/add/ea-add-step02-costmgnt.html',\n controller: 'EaAddStep02CostMgntCtrl'\n })\n .state('authorized.reportAdd.step03', {\n url: '/step03?team&enrollment&csp',\n templateUrl: 'views/add/ea-add-step03.html',\n controller: 'EaAddStep03Ctrl'\n })\n\n // Profile related things\n .state('authorized.profileBilling', {\n url: '/billing',\n templateUrl: 'views/billing/ea-billing.html',\n controller: 'EaBillingCtrl'\n }).state('authorized.profileBillingStartTrial', {\n url: '/billing/starttrial',\n templateUrl: 'views/billing/ea-start-trial.html',\n controller: 'EaBillingStartTrialCtrl'\n }).state('authorized.profileBillingUpgradeEdition', {\n url: '/billing/upgradeedition',\n templateUrl: 'views/billing/ea-upgrade-edition.html',\n controller: 'EaBillingUpgradeEditionCtrl'\n }).state('authorized.profileBillingServiceProvider', {\n url: '/billing/serviceprovider',\n templateUrl: 'views/billing/ea-service-provider.html',\n controller: 'EaBillingServiceProviderCtrl'\n })\n\n // Teams related things\n .state('authorized.teamsMigrate', {\n url: '/teams/migrate',\n templateUrl: 'views/teams/ea-team-migrate.html',\n controller: 'EaTeamMigrateCtrl'\n }).state('authorized.teamsInvitationAccept', {\n url: '/teams/invitation/accept',\n templateUrl: 'views/teams/ea-team-invite-accept.html',\n controller: 'EaTeamInviteAcceptCtrl'\n }).state('authorized.teamsManage', {\n url: '/teams/:teamid/manage',\n templateUrl: 'views/teams/manage/ea-team-manage.html',\n controller: 'EaTeamManageCtrl'\n }).state('authorized.teamsManageAADLink', {\n url: '/teams/:teamid/manage/aad/link?tid&scope',\n templateUrl: 'views/teams/manage/aad/ea-team-link-aad.html',\n controller: 'EaTeamLinkAADCtrl'\n }).state('authorized.teamsManageAADEdit', {\n url: '/teams/:teamid/manage/aad/edit',\n templateUrl: 'views/teams/manage/aad/ea-team-edit-aad.html',\n controller: 'EaTeamEditAADCtrl'\n }).state('authorized.teamsManageBuckets', {\n url: '/teams/:teamid/manage/buckets',\n templateUrl: 'views/teams/manage/buckets/ea-team-buckets.html',\n controller: 'EaTeamBucketsCtrl'\n }).state('authorized.teamsManageSettings', {\n url: '/teams/:teamid/manage/settings',\n templateUrl: 'views/teams/manage/settings/ea-team-settings.html',\n controller: 'EaTeamSettingsCtrl'\n })\n\n // Teams related things (v2)\n .state('authorized.teams', {\n abstract: true,\n url: '/teams/:teamid',\n template: '
'\n }).state('authorized.teams.dashboards', {\n url: '/dashboards?initial&active&cycle&day&nomargin&version',\n templateUrl: 'views/teams/dashboards/ea-dashboards.html',\n controller: 'EaDashboardsCtrl'\n }).state('authorized.teams.contracts', {\n abstract: true,\n url: '/contracts',\n template: '
'\n }).state('authorized.teams.contracts.add', {\n url: '/add',\n templateUrl: 'views/teams/contracts/cc-add-contract.html',\n controller: 'CcAddContractCtrl'\n }).state('authorized.teams.contracts.add-aws', {\n url: '/aws',\n templateUrl: 'views/teams/contracts/aws/cc-aws.html',\n controller: 'CcAddAwsContractCtrl'\n }).state('authorized.teams.contracts.add-aws.prepare', {\n url: '/prepare',\n templateUrl: 'views/teams/contracts/aws/cc-aws-prepare.html',\n controller: 'CcAddAwsContractPrepareCtrl'\n }).state('authorized.teams.contracts.add-aws.connect', {\n url: '/connect',\n templateUrl: 'views/teams/contracts/aws/cc-aws-connect.html',\n controller: 'CcAddAwsContractConnectCtrl'\n }).state('authorized.teams.contracts.add-aws.finish', {\n url: '/finish?cid',\n templateUrl: 'views/teams/contracts/aws/cc-aws-dashboard.html',\n controller: 'CcAddAwsContractDashboardCtrl'\n }).state('authorized.teams.contracts.add-gcp', {\n url: '/gcp',\n templateUrl: 'views/teams/contracts/gcp/cc-gcp.html',\n controller: 'CcAddGcpContractCtrl'\n }).state('authorized.teams.contracts.add-gcp.prepare', {\n url: '/prepare',\n templateUrl: 'views/teams/contracts/gcp/cc-gcp-prepare.html',\n controller: 'CcAddGcpContractPrepareCtrl'\n }).state('authorized.teams.contracts.add-gcp.connect', {\n url: '/connect',\n templateUrl: 'views/teams/contracts/gcp/cc-gcp-connect.html',\n controller: 'CcAddGcpContractConnectCtrl'\n }).state('authorized.teams.contracts.add-gcp.finish', {\n url: '/finish?cid',\n templateUrl: 'views/teams/contracts/gcp/cc-gcp-dashboard.html',\n controller: 'CcAddGcpContractDashboardCtrl'\n }).state('authorized.teams.rimanagement', {\n url: '/rimanagement?contract&service',\n templateUrl: 'views/teams/rimanagement/ea-rimanagement.html',\n controller: 'EaRiManagementCtrl'\n })\n\n // CSP Init\n .state('authorized.cspinit', {\n url: '/csp',\n templateUrl: 'views/csp/ac-csp-init.html',\n controller: 'AcCspInitCtrl',\n resolve: {\n '$cspFeatureEnabled': ['$eaConfig', '$q', function ($eaConfig, $q) {\n return $eaConfig.verifyFeature('csp');\n }]\n }\n })\n // CSP\n .state('authorized.csp', {\n url: '/csp/:resellerId',\n template: '
',\n controller: 'AcCspCtrl',\n abstract: true,\n resolve: {\n '$cspFeatureEnabled': ['$eaConfig', '$q', function ($eaConfig, $q) {\n return $eaConfig.verifyFeature('csp');\n }]\n }\n }).state('authorized.csp.accounts', {\n url: '/accounts?version&active',\n templateUrl: 'views/csp/ac-csp-accounts.html',\n controller: 'AcCspAccountsCtrl'\n }).state('authorized.csp.gsi', {\n url: '/integrators',\n templateUrl: 'views/csp/ac-csp-gsi.html',\n controller: 'AcCspGsiCtrl'\n }).state('authorized.csp.wadd', {\n url: '/accounts/add',\n templateUrl: 'views/csp/add/ac-csp-add.html',\n controller: 'AcCspAddCtrl'\n }).state('authorized.csp.wadd.step01', {\n url: '/step01',\n templateUrl: 'views/csp/add/ac-csp-add-step01.html',\n controller: 'AcCspAddStep01Ctrl'\n }).state('authorized.csp.wadd.step02-t1', {\n url: '/step02/t1',\n templateUrl: 'views/csp/add/ac-csp-add-step02-t1.html',\n controller: 'AcCspAddStep02T1Ctrl'\n }).state('authorized.csp.wadd.step02-t2', {\n url: '/step02/t2',\n templateUrl: 'views/csp/add/ac-csp-add-step02-t2.html',\n controller: 'AcCspAddStep02T2Ctrl'\n }).state('authorized.csp.wadd.step02-ea', {\n url: '/step02/ea',\n templateUrl: 'views/csp/add/ac-csp-add-step02-ea.html',\n controller: 'AcCspAddStep02EACtrl'\n }).state('authorized.csp.wadd.step02-aws', {\n url: '/step02/aws',\n templateUrl: 'views/csp/add/ac-csp-add-step02-aws.html',\n controller: 'AcCspAddStep02AWSCtrl'\n }).state('authorized.csp.wadd.step02-v1', {\n url: '/step02/v1',\n templateUrl: 'views/csp/add/ac-csp-add-step02-v1.html',\n controller: 'AcCspAddStep02V1Ctrl'\n }).state('authorized.csp.wadd.step02-demo', {\n url: '/step02/demo',\n templateUrl: 'views/csp/add/ac-csp-add-step02-demo.html',\n controller: 'AcCspAddStep02DemoCtrl'\n }).state('authorized.csp.wadd.step03', {\n url: '/step03',\n templateUrl: 'views/csp/add/ac-csp-add-step03.html',\n controller: 'AcCspAddStep03Ctrl'\n }).state('authorized.csp.resellermanagement', {\n url: '/resellers',\n templateUrl: 'views/csp/resellers/ac-csp-reseller-management.html',\n controller: 'AcCspResellerManagementCtrl'\n })\n\n // Admin things\n .state('authorized.admin', {\n abstract: true,\n url: '/admin',\n templateUrl: 'views/admin/ea-admin.html',\n controller: 'EaAdminCtrl'\n }).state('authorized.admin.contracts', {\n url: '/contracts',\n templateUrl: 'views/admin/ea-admin-contracts.html',\n controller: 'EaAdminContractsCtrl'\n }).state('authorized.admin.users', {\n url: '/users',\n templateUrl: 'views/admin/ea-admin-users.html',\n controller: 'EaAdminUsersCtrl'\n }).state('authorized.admin.jobs', {\n url: '/jobs',\n templateUrl: 'views/admin/ea-admin-jobs.html',\n controller: 'EaAdminJobsCtrl'\n }).state('authorized.admin.jobs-details', {\n url: '/jobs/byhash/:jobpartition/details',\n templateUrl: 'views/admin/ea-admin-jobs-details.html',\n controller: 'EaAdminJobsDetailsCtrl'\n }).state('authorized.admin.jobs-details-advanced', {\n url: '/jobs/bymonth/:jobmonth/partition/:jobpartition/details',\n templateUrl: 'views/admin/ea-admin-jobs-details.html',\n controller: 'EaAdminJobsDetailsCtrl'\n }).state('authorized.admin.jobs-details-old', {\n url: '/jobs/:jobpartition/details',\n templateUrl: 'views/admin/ea-admin-jobs-details.html',\n controller: 'EaAdminJobsDetailsCtrl'\n });\n })\n .run(function($airbrake, $http, $dynamicTemplateLoader, $eaTemplateCachingStrategy, $location, $window, editableOptions, $eaSession2, $rootScope, $eaBranding, $eaConfig) {\n\n // should we every use the 127.0.0.1 redirect us to localhost\n if ($location.$$host === '127.0.0.1') {\n $window.location = $location.absUrl().replace('http://127.0.0.1', 'http://localhost');\n return;\n }\n \n // configure xeditable\n editableOptions.theme = 'bs3';\n\n // configure the template loader\n $dynamicTemplateLoader.setCachingStrategyService($eaTemplateCachingStrategy);\n\n // register the session plugins\n $eaSession2.onUpdate(function(session) {\n // set the airbrake context\n $airbrake.setCustomContext({userId: session.UserId, contact: session.Contact });\n });\n\n $eaSession2.onRegister(function(session) {\n // set the airbrake context\n $airbrake.setCustomContext({userId: session.UserId, contact: session.Contact });\n });\n\n $eaSession2.onDestroying(function(/* session */) {\n // reset the airbrake context\n $airbrake.setCustomContext({});\n });\n\n // Load the branding during every page reload\n $eaBranding.loadBrandingFromHostSegment();\n });\n","'use strict';\n\nangular.module('azureCostsFeApp').directive('popoverHtmlUnsafePopup', function () {\n return {\n restrict: 'EA',\n replace: true,\n scope: { title: '@', content: '@', placement: '@', animation: '&', isOpen: '&' },\n templateUrl: 'views/popover/popover-html-unsafe-popup.html'\n };\n })\n .directive('popoverHtmlUnsafe', [ '$tooltip', function ($tooltip) {\n return $tooltip('popoverHtmlUnsafe', 'popover', 'click');\n }]);\n","\"function\"!==typeof Object.create&&(Object.create=function(f){function g(){}g.prototype=f;return new g});\n(function(f,g,k){var l={init:function(a,b){this.$elem=f(b);this.options=f.extend({},f.fn.owlCarousel.options,this.$elem.data(),a);this.userOptions=a;this.loadContent()},loadContent:function(){function a(a){var d,e=\"\";if(\"function\"===typeof b.options.jsonSuccess)b.options.jsonSuccess.apply(this,[a]);else{for(d in a.owl)a.owl.hasOwnProperty(d)&&(e+=a.owl[d].item);b.$elem.html(e)}b.logIn()}var b=this,e;\"function\"===typeof b.options.beforeInit&&b.options.beforeInit.apply(this,[b.$elem]);\"string\"===typeof b.options.jsonPath?\n(e=b.options.jsonPath,f.getJSON(e,a)):b.logIn()},logIn:function(){this.$elem.data(\"owl-originalStyles\",this.$elem.attr(\"style\"));this.$elem.data(\"owl-originalClasses\",this.$elem.attr(\"class\"));this.$elem.css({opacity:0});this.orignalItems=this.options.items;this.checkBrowser();this.wrapperWidth=0;this.checkVisible=null;this.setVars()},setVars:function(){if(0===this.$elem.children().length)return!1;this.baseClass();this.eventTypes();this.$userItems=this.$elem.children();this.itemsAmount=this.$userItems.length;\nthis.wrapItems();this.$owlItems=this.$elem.find(\".owl-item\");this.$owlWrapper=this.$elem.find(\".owl-wrapper\");this.playDirection=\"next\";this.prevItem=0;this.prevArr=[0];this.currentItem=0;this.customEvents();this.onStartup()},onStartup:function(){this.updateItems();this.calculateAll();this.buildControls();this.updateControls();this.response();this.moveEvents();this.stopOnHover();this.owlStatus();!1!==this.options.transitionStyle&&this.transitionTypes(this.options.transitionStyle);!0===this.options.autoPlay&&\n(this.options.autoPlay=5E3);this.play();this.$elem.find(\".owl-wrapper\").css(\"display\",\"block\");this.$elem.is(\":visible\")?this.$elem.css(\"opacity\",1):this.watchVisibility();this.onstartup=!1;this.eachMoveUpdate();\"function\"===typeof this.options.afterInit&&this.options.afterInit.apply(this,[this.$elem])},eachMoveUpdate:function(){!0===this.options.lazyLoad&&this.lazyLoad();!0===this.options.autoHeight&&this.autoHeight();this.onVisibleItems();\"function\"===typeof this.options.afterAction&&this.options.afterAction.apply(this,\n[this.$elem])},updateVars:function(){\"function\"===typeof this.options.beforeUpdate&&this.options.beforeUpdate.apply(this,[this.$elem]);this.watchVisibility();this.updateItems();this.calculateAll();this.updatePosition();this.updateControls();this.eachMoveUpdate();\"function\"===typeof this.options.afterUpdate&&this.options.afterUpdate.apply(this,[this.$elem])},reload:function(){var a=this;g.setTimeout(function(){a.updateVars()},0)},watchVisibility:function(){var a=this;if(!1===a.$elem.is(\":visible\"))a.$elem.css({opacity:0}),\ng.clearInterval(a.autoPlayInterval),g.clearInterval(a.checkVisible);else return!1;a.checkVisible=g.setInterval(function(){a.$elem.is(\":visible\")&&(a.reload(),a.$elem.animate({opacity:1},200),g.clearInterval(a.checkVisible))},500)},wrapItems:function(){this.$userItems.wrapAll('
').wrap('
');this.$elem.find(\".owl-wrapper\").wrap('
');this.wrapperOuter=this.$elem.find(\".owl-wrapper-outer\");this.$elem.css(\"display\",\"block\")},\nbaseClass:function(){var a=this.$elem.hasClass(this.options.baseClass),b=this.$elem.hasClass(this.options.theme);a||this.$elem.addClass(this.options.baseClass);b||this.$elem.addClass(this.options.theme)},updateItems:function(){var a,b;if(!1===this.options.responsive)return!1;if(!0===this.options.singleItem)return this.options.items=this.orignalItems=1,this.options.itemsCustom=!1,this.options.itemsDesktop=!1,this.options.itemsDesktopSmall=!1,this.options.itemsTablet=!1,this.options.itemsTabletSmall=\n!1,this.options.itemsMobile=!1;a=f(this.options.responsiveBaseWidth).width();a>(this.options.itemsDesktop[0]||this.orignalItems)&&(this.options.items=this.orignalItems);if(!1!==this.options.itemsCustom)for(this.options.itemsCustom.sort(function(a,b){return a[0]-b[0]}),b=0;bthis.itemsAmount&&\n!0===this.options.itemsScaleUp&&(this.options.items=this.itemsAmount)},response:function(){var a=this,b,e;if(!0!==a.options.responsive)return!1;e=f(g).width();a.resizer=function(){f(g).width()!==e&&(!1!==a.options.autoPlay&&g.clearInterval(a.autoPlayInterval),g.clearTimeout(b),b=g.setTimeout(function(){e=f(g).width();a.updateVars()},a.options.responsiveRefreshRate))};f(g).resize(a.resizer)},updatePosition:function(){this.jumpTo(this.currentItem);!1!==this.options.autoPlay&&this.checkAp()},appendItemsSizes:function(){var a=\nthis,b=0,e=a.itemsAmount-a.options.items;a.$owlItems.each(function(c){var d=f(this);d.css({width:a.itemWidth}).data(\"owl-item\",Number(c));if(0===c%a.options.items||c===e)c>e||(b+=1);d.data(\"owl-roundPages\",b)})},appendWrapperSizes:function(){this.$owlWrapper.css({width:this.$owlItems.length*this.itemWidth*2,left:0});this.appendItemsSizes()},calculateAll:function(){this.calculateWidth();this.appendWrapperSizes();this.loops();this.max()},calculateWidth:function(){this.itemWidth=Math.round(this.$elem.width()/\nthis.options.items)},max:function(){var a=-1*(this.itemsAmount*this.itemWidth-this.options.items*this.itemWidth);this.options.items>this.itemsAmount?this.maximumPixels=a=this.maximumItem=0:(this.maximumItem=this.itemsAmount-this.options.items,this.maximumPixels=a);return a},min:function(){return 0},loops:function(){var a=0,b=0,e,c;this.positionsInArray=[0];this.pagesInArray=[];for(e=0;e').toggleClass(\"clickable\",!this.browser.isTouch).appendTo(this.$elem);!0===this.options.pagination&&this.buildPagination();!0===this.options.navigation&&this.buildButtons()},buildButtons:function(){var a=this,b=f('
');a.owlControls.append(b);a.buttonPrev=\nf(\"
\",{\"class\":\"owl-prev\",html:a.options.navigationText[0]||\"\"});a.buttonNext=f(\"
\",{\"class\":\"owl-next\",html:a.options.navigationText[1]||\"\"});b.append(a.buttonPrev).append(a.buttonNext);b.on(\"touchstart.owlControls mousedown.owlControls\",'div[class^=\"owl\"]',function(a){a.preventDefault()});b.on(\"touchend.owlControls mouseup.owlControls\",'div[class^=\"owl\"]',function(b){b.preventDefault();f(this).hasClass(\"owl-next\")?a.next():a.prev()})},buildPagination:function(){var a=this;a.paginationWrapper=\nf('
');a.owlControls.append(a.paginationWrapper);a.paginationWrapper.on(\"touchend.owlControls mouseup.owlControls\",\".owl-page\",function(b){b.preventDefault();Number(f(this).data(\"owl-page\"))!==a.currentItem&&a.goTo(Number(f(this).data(\"owl-page\")),!0)})},updatePagination:function(){var a,b,e,c,d,g;if(!1===this.options.pagination)return!1;this.paginationWrapper.html(\"\");a=0;b=this.itemsAmount-this.itemsAmount%this.options.items;for(c=0;c\",{\"class\":\"owl-page\"}),g=f(\"\",{text:!0===this.options.paginationNumbers?a:\"\",\"class\":!0===this.options.paginationNumbers?\"owl-numbers\":\"\"}),d.append(g),d.data(\"owl-page\",b===c?e:c),d.data(\"owl-roundPages\",a),this.paginationWrapper.append(d));this.checkPagination()},checkPagination:function(){var a=this;if(!1===a.options.pagination)return!1;a.paginationWrapper.find(\".owl-page\").each(function(){f(this).data(\"owl-roundPages\")===\nf(a.$owlItems[a.currentItem]).data(\"owl-roundPages\")&&(a.paginationWrapper.find(\".owl-page\").removeClass(\"active\"),f(this).addClass(\"active\"))})},checkNavigation:function(){if(!1===this.options.navigation)return!1;!1===this.options.rewindNav&&(0===this.currentItem&&0===this.maximumItem?(this.buttonPrev.addClass(\"disabled\"),this.buttonNext.addClass(\"disabled\")):0===this.currentItem&&0!==this.maximumItem?(this.buttonPrev.addClass(\"disabled\"),this.buttonNext.removeClass(\"disabled\")):this.currentItem===\nthis.maximumItem?(this.buttonPrev.removeClass(\"disabled\"),this.buttonNext.addClass(\"disabled\")):0!==this.currentItem&&this.currentItem!==this.maximumItem&&(this.buttonPrev.removeClass(\"disabled\"),this.buttonNext.removeClass(\"disabled\")))},updateControls:function(){this.updatePagination();this.checkNavigation();this.owlControls&&(this.options.items>=this.itemsAmount?this.owlControls.hide():this.owlControls.show())},destroyControls:function(){this.owlControls&&this.owlControls.remove()},next:function(a){if(this.isTransition)return!1;\nthis.currentItem+=!0===this.options.scrollPerPage?this.options.items:1;if(this.currentItem>this.maximumItem+(!0===this.options.scrollPerPage?this.options.items-1:0))if(!0===this.options.rewindNav)this.currentItem=0,a=\"rewind\";else return this.currentItem=this.maximumItem,!1;this.goTo(this.currentItem,a)},prev:function(a){if(this.isTransition)return!1;this.currentItem=!0===this.options.scrollPerPage&&0this.currentItem)if(!0===this.options.rewindNav)this.currentItem=this.maximumItem,a=\"rewind\";else return this.currentItem=0,!1;this.goTo(this.currentItem,a)},goTo:function(a,b,e){var c=this;if(c.isTransition)return!1;\"function\"===typeof c.options.beforeMove&&c.options.beforeMove.apply(this,[c.$elem]);a>=c.maximumItem?a=c.maximumItem:0>=a&&(a=0);c.currentItem=c.owl.currentItem=a;if(!1!==c.options.transitionStyle&&\"drag\"!==e&&1===c.options.items&&!0===c.browser.support3d)return c.swapSpeed(0),\n!0===c.browser.support3d?c.transition3d(c.positionsInArray[a]):c.css2slide(c.positionsInArray[a],1),c.afterGo(),c.singleItemTransition(),!1;a=c.positionsInArray[a];!0===c.browser.support3d?(c.isCss3Finish=!1,!0===b?(c.swapSpeed(\"paginationSpeed\"),g.setTimeout(function(){c.isCss3Finish=!0},c.options.paginationSpeed)):\"rewind\"===b?(c.swapSpeed(c.options.rewindSpeed),g.setTimeout(function(){c.isCss3Finish=!0},c.options.rewindSpeed)):(c.swapSpeed(\"slideSpeed\"),g.setTimeout(function(){c.isCss3Finish=!0},\nc.options.slideSpeed)),c.transition3d(a)):!0===b?c.css2slide(a,c.options.paginationSpeed):\"rewind\"===b?c.css2slide(a,c.options.rewindSpeed):c.css2slide(a,c.options.slideSpeed);c.afterGo()},jumpTo:function(a){\"function\"===typeof this.options.beforeMove&&this.options.beforeMove.apply(this,[this.$elem]);a>=this.maximumItem||-1===a?a=this.maximumItem:0>=a&&(a=0);this.swapSpeed(0);!0===this.browser.support3d?this.transition3d(this.positionsInArray[a]):this.css2slide(this.positionsInArray[a],1);this.currentItem=\nthis.owl.currentItem=a;this.afterGo()},afterGo:function(){this.prevArr.push(this.currentItem);this.prevItem=this.owl.prevItem=this.prevArr[this.prevArr.length-2];this.prevArr.shift(0);this.prevItem!==this.currentItem&&(this.checkPagination(),this.checkNavigation(),this.eachMoveUpdate(),!1!==this.options.autoPlay&&this.checkAp());\"function\"===typeof this.options.afterMove&&this.prevItem!==this.currentItem&&this.options.afterMove.apply(this,[this.$elem])},stop:function(){this.apStatus=\"stop\";g.clearInterval(this.autoPlayInterval)},\ncheckAp:function(){\"stop\"!==this.apStatus&&this.play()},play:function(){var a=this;a.apStatus=\"play\";if(!1===a.options.autoPlay)return!1;g.clearInterval(a.autoPlayInterval);a.autoPlayInterval=g.setInterval(function(){a.next(!0)},a.options.autoPlay)},swapSpeed:function(a){\"slideSpeed\"===a?this.$owlWrapper.css(this.addCssSpeed(this.options.slideSpeed)):\"paginationSpeed\"===a?this.$owlWrapper.css(this.addCssSpeed(this.options.paginationSpeed)):\"string\"!==typeof a&&this.$owlWrapper.css(this.addCssSpeed(a))},\naddCssSpeed:function(a){return{\"-webkit-transition\":\"all \"+a+\"ms ease\",\"-moz-transition\":\"all \"+a+\"ms ease\",\"-o-transition\":\"all \"+a+\"ms ease\",transition:\"all \"+a+\"ms ease\"}},removeTransition:function(){return{\"-webkit-transition\":\"\",\"-moz-transition\":\"\",\"-o-transition\":\"\",transition:\"\"}},doTranslate:function(a){return{\"-webkit-transform\":\"translate3d(\"+a+\"px, 0px, 0px)\",\"-moz-transform\":\"translate3d(\"+a+\"px, 0px, 0px)\",\"-o-transform\":\"translate3d(\"+a+\"px, 0px, 0px)\",\"-ms-transform\":\"translate3d(\"+\na+\"px, 0px, 0px)\",transform:\"translate3d(\"+a+\"px, 0px,0px)\"}},transition3d:function(a){this.$owlWrapper.css(this.doTranslate(a))},css2move:function(a){this.$owlWrapper.css({left:a})},css2slide:function(a,b){var e=this;e.isCssFinish=!1;e.$owlWrapper.stop(!0,!0).animate({left:a},{duration:b||e.options.slideSpeed,complete:function(){e.isCssFinish=!0}})},checkBrowser:function(){var a=k.createElement(\"div\");a.style.cssText=\" -moz-transform:translate3d(0px, 0px, 0px); -ms-transform:translate3d(0px, 0px, 0px); -o-transform:translate3d(0px, 0px, 0px); -webkit-transform:translate3d(0px, 0px, 0px); transform:translate3d(0px, 0px, 0px)\";\na=a.style.cssText.match(/translate3d\\(0px, 0px, 0px\\)/g);this.browser={support3d:null!==a&&1===a.length,isTouch:\"ontouchstart\"in g||g.navigator.msMaxTouchPoints}},moveEvents:function(){if(!1!==this.options.mouseDrag||!1!==this.options.touchDrag)this.gestures(),this.disabledEvents()},eventTypes:function(){var a=[\"s\",\"e\",\"x\"];this.ev_types={};!0===this.options.mouseDrag&&!0===this.options.touchDrag?a=[\"touchstart.owl mousedown.owl\",\"touchmove.owl mousemove.owl\",\"touchend.owl touchcancel.owl mouseup.owl\"]:\n!1===this.options.mouseDrag&&!0===this.options.touchDrag?a=[\"touchstart.owl\",\"touchmove.owl\",\"touchend.owl touchcancel.owl\"]:!0===this.options.mouseDrag&&!1===this.options.touchDrag&&(a=[\"mousedown.owl\",\"mousemove.owl\",\"mouseup.owl\"]);this.ev_types.start=a[0];this.ev_types.move=a[1];this.ev_types.end=a[2]},disabledEvents:function(){this.$elem.on(\"dragstart.owl\",function(a){a.preventDefault()});this.$elem.on(\"mousedown.disableTextSelect\",function(a){return f(a.target).is(\"input, textarea, select, option\")})},\ngestures:function(){function a(a){if(void 0!==a.touches)return{x:a.touches[0].pageX,y:a.touches[0].pageY};if(void 0===a.touches){if(void 0!==a.pageX)return{x:a.pageX,y:a.pageY};if(void 0===a.pageX)return{x:a.clientX,y:a.clientY}}}function b(a){\"on\"===a?(f(k).on(d.ev_types.move,e),f(k).on(d.ev_types.end,c)):\"off\"===a&&(f(k).off(d.ev_types.move),f(k).off(d.ev_types.end))}function e(b){b=b.originalEvent||b||g.event;d.newPosX=a(b).x-h.offsetX;d.newPosY=a(b).y-h.offsetY;d.newRelativeX=d.newPosX-h.relativePos;\n\"function\"===typeof d.options.startDragging&&!0!==h.dragging&&0!==d.newRelativeX&&(h.dragging=!0,d.options.startDragging.apply(d,[d.$elem]));(8d.newRelativeX)&&!0===d.browser.isTouch&&(void 0!==b.preventDefault?b.preventDefault():b.returnValue=!1,h.sliding=!0);(10d.newPosY)&&!1===h.sliding&&f(k).off(\"touchmove.owl\");d.newPosX=Math.max(Math.min(d.newPosX,d.newRelativeX/5),d.maximumPixels+d.newRelativeX/5);!0===d.browser.support3d?d.transition3d(d.newPosX):d.css2move(d.newPosX)}\nfunction c(a){a=a.originalEvent||a||g.event;var c;a.target=a.target||a.srcElement;h.dragging=!1;!0!==d.browser.isTouch&&d.$owlWrapper.removeClass(\"grabbing\");d.dragDirection=0>d.newRelativeX?d.owl.dragDirection=\"left\":d.owl.dragDirection=\"right\";0!==d.newRelativeX&&(c=d.getNewPosition(),d.goTo(c,!1,\"drag\"),h.targetElement===a.target&&!0!==d.browser.isTouch&&(f(a.target).on(\"click.disable\",function(a){a.stopImmediatePropagation();a.stopPropagation();a.preventDefault();f(a.target).off(\"click.disable\")}),\na=f._data(a.target,\"events\").click,c=a.pop(),a.splice(0,0,c)));b(\"off\")}var d=this,h={offsetX:0,offsetY:0,baseElWidth:0,relativePos:0,position:null,minSwipe:null,maxSwipe:null,sliding:null,dargging:null,targetElement:null};d.isCssFinish=!0;d.$elem.on(d.ev_types.start,\".owl-wrapper\",function(c){c=c.originalEvent||c||g.event;var e;if(3===c.which)return!1;if(!(d.itemsAmount<=d.options.items)){if(!1===d.isCssFinish&&!d.options.dragBeforeAnimFinish||!1===d.isCss3Finish&&!d.options.dragBeforeAnimFinish)return!1;\n!1!==d.options.autoPlay&&g.clearInterval(d.autoPlayInterval);!0===d.browser.isTouch||d.$owlWrapper.hasClass(\"grabbing\")||d.$owlWrapper.addClass(\"grabbing\");d.newPosX=0;d.newRelativeX=0;f(this).css(d.removeTransition());e=f(this).position();h.relativePos=e.left;h.offsetX=a(c).x-e.left;h.offsetY=a(c).y-e.top;b(\"on\");h.sliding=!1;h.targetElement=c.target||c.srcElement}})},getNewPosition:function(){var a=this.closestItem();a>this.maximumItem?a=this.currentItem=this.maximumItem:0<=this.newPosX&&(this.currentItem=\na=0);return a},closestItem:function(){var a=this,b=!0===a.options.scrollPerPage?a.pagesInArray:a.positionsInArray,e=a.newPosX,c=null;f.each(b,function(d,g){e-a.itemWidth/20>b[d+1]&&e-a.itemWidth/20(b[d+1]||b[d]-a.itemWidth)&&\"right\"===a.moveDirection()&&(!0===a.options.scrollPerPage?(c=b[d+1]||b[b.length-1],a.currentItem=f.inArray(c,a.positionsInArray)):\n(c=b[d+1],a.currentItem=d+1))});return a.currentItem},moveDirection:function(){var a;0>this.newRelativeX?(a=\"right\",this.playDirection=\"next\"):(a=\"left\",this.playDirection=\"prev\");return a},customEvents:function(){var a=this;a.$elem.on(\"owl.next\",function(){a.next()});a.$elem.on(\"owl.prev\",function(){a.prev()});a.$elem.on(\"owl.play\",function(b,e){a.options.autoPlay=e;a.play();a.hoverStatus=\"play\"});a.$elem.on(\"owl.stop\",function(){a.stop();a.hoverStatus=\"stop\"});a.$elem.on(\"owl.goTo\",function(b,e){a.goTo(e)});\na.$elem.on(\"owl.jumpTo\",function(b,e){a.jumpTo(e)})},stopOnHover:function(){var a=this;!0===a.options.stopOnHover&&!0!==a.browser.isTouch&&!1!==a.options.autoPlay&&(a.$elem.on(\"mouseover\",function(){a.stop()}),a.$elem.on(\"mouseout\",function(){\"stop\"!==a.hoverStatus&&a.play()}))},lazyLoad:function(){var a,b,e,c,d;if(!1===this.options.lazyLoad)return!1;for(a=0;a=this.currentItem:!0)&&e=f?g.setTimeout(c,100):e()}var d=this,f=0,k;\"DIV\"===b.prop(\"tagName\")?(b.css(\"background-image\",\"url(\"+b.data(\"src\")+\")\"),k=!0):b[0].src=b.data(\"src\");c()},autoHeight:function(){function a(){var a=f(e.$owlItems[e.currentItem]).height();e.wrapperOuter.css(\"height\",a+\"px\");e.wrapperOuter.hasClass(\"autoHeight\")||g.setTimeout(function(){e.wrapperOuter.addClass(\"autoHeight\")},0)}function b(){d+=1;e.completeImg(c.get(0))?a():100>=d?g.setTimeout(b,\n100):e.wrapperOuter.css(\"height\",\"\")}var e=this,c=f(e.$owlItems[e.currentItem]).find(\"img\"),d;void 0!==c.get(0)?(d=0,b()):a()},completeImg:function(a){return!a.complete||\"undefined\"!==typeof a.naturalWidth&&0===a.naturalWidth?!1:!0},onVisibleItems:function(){var a;!0===this.options.addClassActive&&this.$owlItems.removeClass(\"active\");this.visibleItems=[];for(a=this.currentItem;a=this.$userItems.length||-1===e?this.$userItems.eq(-1).after(a):this.$userItems.eq(e).before(a);this.setVars()},removeItem:function(a){if(0===this.$elem.children().length)return!1;a=void 0===a||-1===a?-1:a;this.unWrap();this.$userItems.eq(a).remove();this.setVars()}};f.fn.owlCarousel=function(a){return this.each(function(){if(!0===\nf(this).data(\"owl-init\"))return!1;f(this).data(\"owl-init\",!0);var b=Object.create(l);b.init(a,this);f.data(this,\"owlCarousel\",b)})};f.fn.owlCarousel.options={items:5,itemsCustom:!1,itemsDesktop:[1199,4],itemsDesktopSmall:[979,3],itemsTablet:[768,2],itemsTabletSmall:!1,itemsMobile:[479,1],singleItem:!1,itemsScaleUp:!1,slideSpeed:200,paginationSpeed:800,rewindSpeed:1E3,autoPlay:!1,stopOnHover:!1,navigation:!1,navigationText:[\"prev\",\"next\"],rewindNav:!0,scrollPerPage:!1,pagination:!0,paginationNumbers:!1,\nresponsive:!0,responsiveRefreshRate:200,responsiveBaseWidth:g,baseClass:\"owl-carousel\",theme:\"owl-theme\",lazyLoad:!1,lazyFollow:!0,lazyEffect:\"fade\",autoHeight:!1,jsonPath:!1,jsonSuccess:!1,dragBeforeAnimFinish:!0,mouseDrag:!0,touchDrag:!0,addClassActive:!1,transitionStyle:!1,beforeUpdate:!1,afterUpdate:!1,beforeInit:!1,afterInit:!1,beforeMove:!1,afterMove:!1,afterAction:!1,startDragging:!1,afterLazyLoad:!1}})(jQuery,window,document);","/*\n * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/\n *\n * Uses the built in easing capabilities added In jQuery 1.1\n * to offer multiple easing options\n *\n * TERMS OF USE - EASING EQUATIONS\n * \n * Open source under the BSD License. \n * \n * Copyright © 2001 Robert Penner\n * All rights reserved.\n *\n * TERMS OF USE - jQuery Easing\n * \n * Open source under the BSD License. \n * \n * Copyright © 2008 George McGinley Smith\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, \n * are permitted provided that the following conditions are met:\n * \n * Redistributions of source code must retain the above copyright notice, this list of \n * conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright notice, this list \n * of conditions and the following disclaimer in the documentation and/or other materials \n * provided with the distribution.\n * \n * Neither the name of the author nor the names of contributors may be used to endorse \n * or promote products derived from this software without specific prior written permission.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY \n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE\n * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE\n * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED \n * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED \n * OF THE POSSIBILITY OF SUCH DAMAGE. \n *\n*/\njQuery.easing.jswing=jQuery.easing.swing;jQuery.extend(jQuery.easing,{def:\"easeOutQuad\",swing:function(e,f,a,h,g){return jQuery.easing[jQuery.easing.def](e,f,a,h,g)},easeInQuad:function(e,f,a,h,g){return h*(f/=g)*f+a},easeOutQuad:function(e,f,a,h,g){return -h*(f/=g)*(f-2)+a},easeInOutQuad:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f+a}return -h/2*((--f)*(f-2)-1)+a},easeInCubic:function(e,f,a,h,g){return h*(f/=g)*f*f+a},easeOutCubic:function(e,f,a,h,g){return h*((f=f/g-1)*f*f+1)+a},easeInOutCubic:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f+a}return h/2*((f-=2)*f*f+2)+a},easeInQuart:function(e,f,a,h,g){return h*(f/=g)*f*f*f+a},easeOutQuart:function(e,f,a,h,g){return -h*((f=f/g-1)*f*f*f-1)+a},easeInOutQuart:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f*f+a}return -h/2*((f-=2)*f*f*f-2)+a},easeInQuint:function(e,f,a,h,g){return h*(f/=g)*f*f*f*f+a},easeOutQuint:function(e,f,a,h,g){return h*((f=f/g-1)*f*f*f*f+1)+a},easeInOutQuint:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f*f*f+a}return h/2*((f-=2)*f*f*f*f+2)+a},easeInSine:function(e,f,a,h,g){return -h*Math.cos(f/g*(Math.PI/2))+h+a},easeOutSine:function(e,f,a,h,g){return h*Math.sin(f/g*(Math.PI/2))+a},easeInOutSine:function(e,f,a,h,g){return -h/2*(Math.cos(Math.PI*f/g)-1)+a},easeInExpo:function(e,f,a,h,g){return(f==0)?a:h*Math.pow(2,10*(f/g-1))+a},easeOutExpo:function(e,f,a,h,g){return(f==g)?a+h:h*(-Math.pow(2,-10*f/g)+1)+a},easeInOutExpo:function(e,f,a,h,g){if(f==0){return a}if(f==g){return a+h}if((f/=g/2)<1){return h/2*Math.pow(2,10*(f-1))+a}return h/2*(-Math.pow(2,-10*--f)+2)+a},easeInCirc:function(e,f,a,h,g){return -h*(Math.sqrt(1-(f/=g)*f)-1)+a},easeOutCirc:function(e,f,a,h,g){return h*Math.sqrt(1-(f=f/g-1)*f)+a},easeInOutCirc:function(e,f,a,h,g){if((f/=g/2)<1){return -h/2*(Math.sqrt(1-f*f)-1)+a}return h/2*(Math.sqrt(1-(f-=2)*f)+1)+a},easeInElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k)==1){return e+l}if(!j){j=k*0.3}if(g=0) {\n return Math.floor(result);\n } else {\n return Math.ceil(result);\n }\n }\n\n self.byAddingMonth = function(numberOfMonthToAdd) {\n\n // split the current definition by \"-\"\n var parts = currentMonthDefinitionString.split('-');\n\n // convert to numbers\n var year = parseInt(parts[0]);\n var month = parseInt(parts[1]);\n\n // add the month\n var newTargetMonthes = (year * 12) + month + numberOfMonthToAdd;\n\n // get the actual years\n year = intDiv(newTargetMonthes, 12);\n\n // get the motnh\n month = newTargetMonthes % 12;\n if (month === 0) {\n year = year - 1;\n month = 12;\n }\n\n // build the new definition\n return new MonthDefinition(year + '-' + ('0' + month).slice(-2));\n };\n\n self.toString = function() {\n return currentMonthDefinitionString;\n };\n}\n\nangular.module('azureCostsFeApp').service('$eaUtils', [function() {\n var self = this;\n\n self.createMonthDefinition = function(monthDefinitionString) {\n return new MonthDefinition(monthDefinitionString);\n };\n\n}]);\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('EaPublicAreaCtrl', function () {});\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('EaSecuredAreaCtrl', [ '$scope', '$eaCurrentSession', function ($scope, $eaCurrentSession) {\n\n // defined some view related information\n $scope.authorized = ($eaCurrentSession !== null && $eaCurrentSession !== undefined);\n $scope.currentSession = $eaCurrentSession;\n\n}]);\n","'use strict';\n\n/**\n * @ngdoc function\n * @name azureCostsFeApp.controller:EasplashCtrl\n * @description\n * # EasplashCtrl\n * Controller of the azureCostsFeApp\n */\nangular.module('azureCostsFeApp').controller('EaSplashCtrl', function ($scope, $state, $stateParams, $eaBackendDataModeSelector, $location, $eaConfig) {\n\n // resolve the csp entry point\n if (($location.host().indexOf($eaConfig.feHost) > 0 && $location.host().split('.')[0] === 'csp')) {\n $state.go('authorized.cspinit');\n } else {\n // go directly to the signin state\n $state.go('public.signin');\n }\n\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('EaSignInCtrl', function ($q, $scope, $controller, $state, $location, $eaSession2, $eaUserProfile, $eaLocalSettings, $eaBackendDataModeSelector, $eaCspService, $ccDemoModeService) {\n var self = this;\n\n // inject mixins\n $.extend(self, $controller('SessionHelperCtrlMixin', {$scope: $scope, $eaBackendDataModeSelector: $eaBackendDataModeSelector, $eaSession2: $eaSession2, $state: $state }));\n\n // set the standard message\n $scope.action = 'Logging in...';\n $scope.showRefreshSessionButton = false;\n\n\n // start the magin signin process\n $eaSession2.lazy().then(function (session) {\n\n return $eaCspService.loadProfiles(session).then(function(cspProfiles) {\n\n // check if we prevent this\n if (!cspProfiles || cspProfiles.length == 0 || $state.params.csp === \"false\" || $state.params.team || $state.params.enrollment || $state.params.initial || $state.params.demo) {\n\n // at this point we have a valid session and should load the availabe contracts\n $eaUserProfile.load(session.DataToken).then(function (profile) {\n\n // get the contracts\n var contracts = $eaUserProfile.getContracts(profile);\n\n // check if we have contracts or not\n if (contracts.length === 0 && $state.params.demo === \"1\") {\n\n // enable the demo mode in the data selector\n $ccDemoModeService.enableDemoMode(session, {csp: false});\n\n }\n if (contracts.length === 0) {\n var nonPersonalTeams = profile.Teams.filter(function (t) {\n return t.Role === 'admin' && t.Id !== 'personal'\n }).map(function (t) {\n return t.Id\n });\n $state.go('authorized.teams.contracts.add', {teamid: nonPersonalTeams.length === 0 ? 'personal' : nonPersonalTeams[0]});\n } else {\n\n // build parameters\n var stateParams = {\n teamid: $state.params.team,\n eanumber: $state.params.enrollment\n };\n\n if (!stateParams.teamid) {\n stateParams.teamid = contracts.getAt(0).Team;\n }\n\n if ($state.params.initial) {\n stateParams.initial = $state.params.initial;\n }\n\n $state.go('authorized.teams.dashboards', stateParams);\n }\n\n }).catch(function (error) {\n $scope.action = 'Something went wrong: ' + error;\n $scope.showRefreshSessionButton = true;\n });\n } else {\n // open the csp portal\n $state.go('authorized.cspinit');\n }\n });\n });\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('EaDebuggerCspCtrl', function ($scope, $state, $eaBackendAzure) {\n\n $scope.PartnerSdkConnection = {\n ClientId: \"\",\n ClientSecret: \"\",\n Domain: \"\",\n Username: \"\",\n Password: \"\"\n };\n\n $scope.PartnerSdkOperations = [];\n $scope.date = new Date();\n\n $scope.HideForm = false;\n\n $scope.performConnectionTest = function() {\n $scope.HideForm = true;\n $scope.date = new Date();\n\n var optionalUserCredentials = undefined;\n\n if ($scope.PartnerSdkConnection.Username && $scope.PartnerSdkConnection.Username.length > 0) {\n optionalUserCredentials = {\n Username: $scope.PartnerSdkConnection.Username,\n Password: $scope.PartnerSdkConnection.Password\n }\n }\n\n $eaBackendAzure.dataMonDebugCsp($scope.PartnerSdkConnection.ClientId, $scope.PartnerSdkConnection.ClientSecret, $scope.PartnerSdkConnection.Domain, optionalUserCredentials).then(function(result) {\n result.forEach(function(r) {\n $scope.PartnerSdkOperations.push(r);\n });\n })\n }\n\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('SessionHelperCtrlMixin', function($scope, $eaBackendDataModeSelector, $eaSession2, $state, $window) {\n\n function destroySession() {\n\n try {\n // cache idp type\n var idp = $eaSession2.getSession().IdentityProvider;\n\n // kill the session\n $eaSession2.destroySession();\n\n return idp;\n } catch(e) {\n return null;\n }\n }\n\n // Signout\n $scope.signOut = function() {\n\n // destroy the session\n destroySession();\n\n // call the session signout\n $eaSession2.signOut();\n };\n\n $scope.refreshSession = function() {\n\n // destroy the session\n var idp = destroySession();\n\n // redirect to signin\n if (idp) {\n $state.go('public.signin', {idp: idp});\n } else {\n $state.go('public.signin');\n }\n };\n\n $scope.leaveActAs = function() {\n // leave the act-AsMode\n $eaSession2.leaveActAs();\n };\n\n $scope.visitProfile = function() {\n $eaSession2.visitProfileInSTS(true);\n }\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('JwtTokenHelperCtrlMixin', [ '$scope', 'jwtHelper', function($scope, jwtHelper) {\n\n $scope.verifyJwtToken = function(tokenValue) {\n\n try {\n // read the token from the input field\n var decodedToken = jwtHelper.decodeToken(tokenValue);\n\n // check if we have an enrollment number, if so add\n if (decodedToken.EnrollmentNumber !== undefined) {\n return decodedToken.EnrollmentNumber;\n } else {\n return null;\n }\n\n } catch(e) {\n return null;\n }\n }\n}]);\n","'use strict';\n\n/**\n * @ngdoc function\n * @name azureCostsFeApp.controller:MainCtrl\n * @description\n * # MainCtrl\n * Controller of the azureCostsFeApp\n */\nangular.module('azureCostsFeApp').controller('EaAddCtrl', function ($scope, $state, $rootScope, $acWizardHelpers) {\n\n // define the current state\n $scope.currentStep = $acWizardHelpers.getCurrentStep($state.current);\n $scope.step01Title = 'Select your contract type';\n\n // the error container\n $scope.registerError = null;\n\n // handle state changes to adapt the control\n $rootScope.$on('$stateChangeSuccess', function(event, toState, toParams, fromState, fromParams){\n $scope.currentStep = $acWizardHelpers.getCurrentStep(toState);\n });\n\n // just redirect to the step01 as default\n if ($state.current.name === 'authorized.reportAdd') { return $state.go('authorized.reportAdd.step01'); }\n});\n","'use strict';\n\n/**\n * @ngdoc function\n * @name azureCostsFeApp.controller:MainCtrl\n * @description\n * # MainCtrl\n * Controller of the azureCostsFeApp\n */\nangular.module('azureCostsFeApp').controller('EaAddStep01Ctrl', function ($scope, $eaBackend, $busy, $eaBackendDataModeSelector, $eaSession2 , $eaTeamManagement, $eaUserProfile, $state, $eaCurrentSession, $toolbar, $eaBilling, $ccDemoModeService) {\n\n // contains the form content\n $scope.formStep01 = {\n team: 'personal',\n contractType: 'ea'\n };\n\n // possible target teams\n $scope.targetTeams = [ { Id: 'personal', Name: 'Personal'} ];\n $scope.activatedPlanEA = false;\n $scope.activatedPlanPayGo = false;\n $scope.activatedCostMgnt = false;\n\n $busy.during($eaUserProfile.load($eaCurrentSession.DataToken).then(function(profile) {\n\n // pre-select the right tema\n if ($state.params.teamid && $eaTeamManagement.isAdminInOfTeam(profile, $state.params.teamid)) {\n $scope.formStep01.team = $state.params.teamid;\n }\n\n $scope.teamChanged = function() {\n\n // check the team details\n profile.Teams.forEach(function(team) {\n\n if (team.Id === $scope.formStep01.team) {\n\n if ($eaBilling.hasRequiredPlan(team.AccountPlan, 'professional')) {\n $scope.activatedPlanEA = true;\n $scope.activatedPlanPayGo = true;\n $scope.activatedCostMgnt = true;\n $scope.formStep01.contractType = 'ea';\n } else if ($eaBilling.hasRequiredPlan(team.AccountPlan, 'startup')) {\n $scope.activatedPlanEA = false;\n $scope.activatedPlanPayGo = true;\n $scope.activatedCostMgnt = false;\n $scope.formStep01.contractType = 'paygo';\n } else if ($eaBilling.hasRequiredPlan(team.AccountPlan, 'basic')) {\n $scope.activatedPlanEA = true;\n $scope.activatedPlanPayGo = true;\n $scope.activatedCostMgnt = true;\n $scope.formStep01.contractType = 'ea';\n }\n }\n });\n\n };\n\n\n $scope.next = function() {\n\n if ($scope.formStep01.contractType === 'ea') {\n return $state.go('authorized.reportAdd.step02-ea', {team: $scope.formStep01.team});\n } else if ($scope.formStep01.contractType === 'costmgnt') {\n return $state.go('authorized.reportAdd.step02-costmgnt', {team: $scope.formStep01.team});\n } else if ($scope.formStep01.contractType === 'demo') {\n return $ccDemoModeService.enableDemoMode($eaCurrentSession);\n } else {\n return $state.go('authorized.reportAdd.step02-rate', {team: $scope.formStep01.team});\n }\n };\n\n // Check the license topics\n // $scope.activeTeam && $eaBilling.hasRequiredPlan($scope.activeTeam.AccountPlan, 'enterprise'))\n\n\n // Add Back Entry if we have contracts\n var contracts = $eaUserProfile.getContracts(profile);\n if (contracts && contracts.length > 0) {\n $toolbar.addItem('addEA.Back', 'Back to Reports', 'fa-chevron-left', null, true, '/signin');\n }\n\n // define the available options\n $scope.teamChanged();\n\n // load the team profiles if needed\n if ($eaTeamManagement.isAdminInAtLeastOneTime(profile)) {\n\n return $eaTeamManagement.getTeamProfilesByRole(profile, 'admin', false, $eaCurrentSession.DataToken).then(function(teamProfiles) {\n // add the profiles\n $scope.targetTeams = $scope.targetTeams.concat(teamProfiles);\n\n });\n }\n }));\n});\n","'use strict';\n\n/**\n * @ngdoc function\n * @name azureCostsFeApp.controller:MainCtrl\n * @description\n * # MainCtrl\n * Controller of the azureCostsFeApp\n */\nangular.module('azureCostsFeApp').controller('EaAddStep02EaCtrl', function ($scope, $eaBackend, $busy, jwtHelper, $state, $eaCurrentSession) {\n\n $scope.formAddToken = {\n team: $state.params.team ? $state.params.team : 'personal',\n ea: null,\n eaType: null,\n token: null\n };\n\n $scope.next = function() {\n $busy.during($eaBackend.dataEARegisterContract($scope.formAddToken.team, $scope.formAddToken.ea, $scope.formAddToken.token, $eaCurrentSession.DataToken).then(function () {\n return $state.go('authorized.reportAdd.step03', { team: $scope.formAddToken.team, enrollment: $scope.formAddToken.ea});\n }).catch(function (error) {\n\n if (error.status === 409 && error.data && error.data.Message) {\n $scope.registerError = error.data.Message;\n } else {\n $scope.registerError = error.data + ' (' + error.statusText + ')';\n }\n }));\n };\n\n\n $scope.tokenFieldChanged = function() {\n\n try {\n // read the token from the input field\n var decodedToken = jwtHelper.decodeToken($scope.formAddToken.token);\n\n // check if we have an enrollment number, if so add\n if (decodedToken.EnrollmentNumber !== undefined) {\n $scope.formAddToken.ea = decodedToken.EnrollmentNumber;\n } else {\n $scope.formAddToken.ea = null;\n }\n\n // check what type the contract is\n if (decodedToken.ReportView !== undefined) {\n $scope.formAddToken.eaType = decodedToken.ReportView;\n } else {\n $scope.formAddToken.eaType = null;\n }\n } catch(e) {\n $scope.formAddToken.ea = null;\n $scope.formAddToken.eaType = null;\n }\n };\n});\n","'use strict';\n\n/**\n * @ngdoc function\n * @name azureCostsFeApp.controller:MainCtrl\n * @description\n * # MainCtrl\n * Controller of the azureCostsFeApp\n */\nangular.module('azureCostsFeApp').controller('EaAddStep02CostMgntCtrl', function ($scope, $eaBackend, $busy, jwtHelper, $state, $eaCurrentSession) {\n\n $scope.formAddReport = {\n team: $state.params.team ? $state.params.team : 'personal',\n storageAccount: null,\n storageKey: null,\n reportContainer: null,\n reportFolder: null\n };\n\n $scope.next = function() { \n $busy.during($eaBackend.dataCostMgntRegisterContract($scope.formAddReport.team, $eaCurrentSession.DataToken).then(function(contractId) { \n return $busy.during($eaBackend.dataCostMgntAddContainerToContract($scope.formAddReport.team, contractId, $scope.formAddReport.storageAccount, $scope.formAddReport.storageKey, $scope.formAddReport.reportContainer, $scope.formAddReport.reportFolder, $eaCurrentSession.DataToken).then(function() {\n return $busy.during($eaBackend.dataAllSyncReports($scope.formAddReport.team, contractId, $eaCurrentSession.DataToken).then(function() {\n return $state.go('authorized.reportAdd.step03', { team: $scope.formAddReport.team, enrollment: contractId});\n }))\n }))\n }).catch(function (error) {\n\n if (error.status === 409 && error.data && error.data.Message) {\n $scope.registerError = error.data.Message;\n } else {\n $scope.registerError = error.data + ' (' + error.statusText + ')';\n }\n }));\n };\n});\n","'use strict';\n\n/**\n * @ngdoc function\n * @name azureCostsFeApp.controller:MainCtrl\n * @description\n * # MainCtrl\n * Controller of the azureCostsFeApp\n */\nangular.module('azureCostsFeApp').controller('EaAddStep02RateCtrl', function ($scope, $state, $stateParams, $window, $location, $eaBackend, $eaCurrentSession, $eaConfig, $busy) {\n\n if ($state.params.enrollment) {\n return $state.go('authorized.reportAdd.step02-rate-connect', $state.params);\n } else {\n\n // load the needed metadat before we can start\n $busy.setMessage('Loading details');\n $busy.during($eaBackend.dataGetMetadata('currencies', $eaCurrentSession.DataToken).then(function(currencies) {\n $scope.availableCurrencies = currencies;\n $scope.availableCloudinstances = [\n { Id: 'rates', Display: 'Azure Cloud World Wide (Default)'},\n { Id: 'ratesger', Display: 'Azure German Cloud' }\n ];\n\n $scope.formAddContract = {\n team: $state.params.team ? $state.params.team : 'personal',\n tenantId: null,\n defaultCurrency: $state.params.currency ? $state.params.currency : null,\n cloudInstance: 'rates'\n };\n\n $scope.disableCurrency = ($state.params.currency !== null && $state.params.currency !== undefined);\n\n $scope.next = function () {\n\n\n // ask the api for a creation token\n $eaBackend.dataPostRatePlanRegistrationId($scope.formAddContract.team, $location.absUrl(), $scope.formAddContract.tenantId, $scope.formAddContract.defaultCurrency, $eaCurrentSession.DataToken).then(function (result) {\n\n // redirect to authorisation endpoint, state should become the creation token\n $window.location = ($eaConfig.aadProtocol ? $eaConfig.aadProtocol: 'https') + '://' + $eaConfig.aadHost + '/aad/link/' + $scope.formAddContract.cloudInstance + '?tenant=' + $scope.formAddContract.tenantId + '&state=' + result.RegistrationId;\n });\n }\n\n }));\n }\n});\n","'use strict';\n\n/**\n * @ngdoc function\n * @name azureCostsFeApp.controller:MainCtrl\n * @description\n * # MainCtrl\n * Controller of the azureCostsFeApp\n */\nangular.module('azureCostsFeApp').controller('EaAddStep02RateConnectCtrl', function ($scope, $state, $window, $location, $eaBackend, $eaCurrentSession, $eaConfig, $busy, $q) {\n\n // define the alert message\n $scope.alertMessages = [];\n $scope.contractModel = null;\n\n $scope.subscriptionPermissionLink = \"https://portal.azure.com/#blade/Microsoft_Azure_AD/UserAssignmentsBlade/scope/%2Fsubscriptions%2F\";\n $scope.hideSubscriptionsDetailsLink = false;\n\n // query the enrollment\n $busy.during($eaBackend.dataGetContract($state.params.team, $state.params.enrollment, $eaCurrentSession.DataToken).then(function(contract) {\n\n // set the contract\n $scope.contractModel = contract;\n\n // build the offerinfs string\n var offerings = 'offerings';\n if (contract.CloudInstance && contract.CloudInstance === 'analyticsger') {\n offerings = 'offeringsde';\n $scope.subscriptionPermissionLink = \"https://portal.microsoftazure.de/#blade/Microsoft_Azure_AD/UserAssignmentsBlade/scope/%2Fsubscriptions%2F\";\n $scope.hideSubscriptionsDetailsLink = true;\n }\n\n // query all offerings\n return $eaBackend.dataGetMetadata(offerings, $eaCurrentSession.DataToken).then(function (offerings) {\n $scope.availableOfferings = offerings;\n\n return $eaBackend.dataGetMetadata('countries', $eaCurrentSession.DataToken).then(function (countries) {\n $scope.availableCountries = countries;\n\n // query the subscription\n return $eaBackend.dataGetContractSubscriptions($state.params.team, $state.params.enrollment, $eaCurrentSession.DataToken, {verify: true}).then(function (subscriptions) {\n $scope.subscriptions = subscriptions;\n });\n\n });\n });\n }));\n\n function verifySubscritpionSettingsAndGenerateErrorMessage() {\n var errors = [];\n var foundError = false;\n\n $scope.subscriptions.forEach(function(s) {\n\n // ignore disabled subscriptions\n if (s.Ignore !== undefined && s.Ignore === true) { return; }\n\n // verify\n var subscriptionErrorField = { Id: s.Id, Name: s.Name, Errors: []};\n\n if (s.ArmState !== 'connected') { foundError = true; subscriptionErrorField.Errors.push('Missing Reader-Permissions in Azure (check KB article)'); }\n if (s.Offering === null || s.Offering === undefined) { foundError = true; subscriptionErrorField.Errors.push('No OfferingId selected!'); }\n if (s.Country === null || s.Country === undefined) { foundError = true; subscriptionErrorField.Errors.push('No Country selected'); }\n\n if (subscriptionErrorField.Errors.length > 0 ) { errors.push(subscriptionErrorField); }\n });\n\n return foundError ? errors : null;\n }\n\n $scope.verifyPermissions = function() {\n $busy.setMessage(\"Verify permissions\");\n return $busy.during($eaBackend.dataGetContractSubscriptions($state.params.team, $state.params.enrollment, $eaCurrentSession.DataToken, {verify: true}).then(function(subscriptions) {\n var subscriptionIndex = subscriptions.buildIndex('Id');\n $scope.subscriptions.forEach(function(s) {\n s.ArmState = subscriptionIndex[s.Id].ArmState;\n });\n }));\n };\n\n function verifyConnection(subscriptions) {\n var errors = [];\n\n $busy.setMessage(\"Checking Rate Card access...\");\n return $busy.during($q.all(subscriptions.map(function(s) {\n\n // ignore if required\n if (s.Ignore !== undefined && s.Ignore) {\n return $q.when();\n } else {\n return $eaBackend.dataGetContractSubscriptionsVerifyConnection($state.params.team, $state.params.enrollment, s.Id, s.Offering, s.Country, $scope.contractModel.Currency, $eaCurrentSession.DataToken).catch(function (result) {\n var subscriptionErrorField = {Id: s.Id, Name: s.Name, Errors: []};\n\n if (result && result.data.message) {\n subscriptionErrorField.Errors.push(result.data.message);\n } else {\n subscriptionErrorField.Errors.push(\"Can't download the rate card, verify settings\");\n }\n\n errors.push(subscriptionErrorField);\n\n return $q.reject();\n });\n }\n })).then(function() {\n return $q.when([]);\n }).catch(function() {\n return $q.when(errors);\n }));\n }\n\n $scope.toggleIgnoreSubscriptionState = function(subscription) {\n if (subscription.Ignore === undefined) { subscription.Ignore = false; }\n subscription.Ignore = !subscription.Ignore\n };\n\n $scope.next = function() {\n\n // verify the permissions\n $scope.verifyPermissions().then(function() {\n\n var error = verifySubscritpionSettingsAndGenerateErrorMessage();\n\n if (error) {\n // set the errors\n $scope.alertMessages = error;\n } else {\n\n // try to download the rate cards\n return verifyConnection($scope.subscriptions).then(function(verifyConnectionErrors) {\n\n if (verifyConnectionErrors && verifyConnectionErrors.length > 0) {\n $scope.alertMessages = verifyConnectionErrors;\n } else {\n\n // reset all previous errors\n $scope.alertMessages = null;\n\n // update every subscription\n var updatePromise = [];\n $scope.subscriptions.forEach(function (s) {\n\n if (s.ArmState === 'connected' && (s.Ignore === undefined || s.Ignore == false)) {\n updatePromise.push($eaBackend.dataPutContractSubscription($state.params.team, $state.params.enrollment, s.Id, {\n Offering: s.Offering,\n Country: s.Country,\n State: 'valid'\n }, $eaCurrentSession.DataToken));\n }\n });\n\n // wait\n $busy.during($q.all(updatePromise).then(function () {\n\n // trigger sync job\n return $eaBackend.dataAllSyncReports($state.params.team, $state.params.enrollment, $eaCurrentSession.DataToken).then(function () {\n\n // got to the next state\n $state.go('authorized.reportAdd.step03', $state.params);\n\n });\n }));\n }\n });\n };\n });\n }\n});\n","'use strict';\n\n/**\n * @ngdoc function\n * @name azureCostsFeApp.controller:MainCtrl\n * @description\n * # MainCtrl\n * Controller of the azureCostsFeApp\n */\nangular.module('azureCostsFeApp').controller('EaAddStep03Ctrl', function ($scope, $state) {\n $scope.team = $state.params.team;\n $scope.enrollment = $state.params.enrollment;\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('EaTeamMigrateCtrl', function ($scope, $eaSession2, $eaBackend, $busy, $controller, $eaBackendDataModeSelector, $state, $toolbar, $eaUserProfile, $eaCurrentSession, $location) {\n\n // inject mixins\n $.extend(self, $controller('SessionHelperCtrlMixin', {$scope: $scope, $eaBackendDataModeSelector: $eaBackendDataModeSelector, $eaSession2: $eaSession2, $state: $state }));\n\n // define the form structure\n $scope.formMigrateTeam = {\n Name: undefined\n };\n\n return $busy.during($eaUserProfile.load($eaCurrentSession.DataToken).then(function(profile) {\n\n // define the active team\n $scope.team = $eaUserProfile.getTeam(profile, 'personal');\n\n // migrates a specific user to a team account\n $scope.migrateCurrentUser = function () {\n\n $busy.during($eaBackend.dataMigrateToTeamAccount($scope.formMigrateTeam.Name, $eaCurrentSession.DataToken)).then(function () {\n\n // sign out\n $eaSession2.destroySession();\n\n // sign in and comeback\n var path = '/sso?idp=' + $eaCurrentSession.IdentityProvider + '&redirect=' + encodeURIComponent('/app/teams');\n $location.url(path);\n\n }).catch(function (error) {\n alert(error);\n })\n };\n\n // Add Back Entry\n $toolbar.addItem('migrateTeam.Back', 'Back to Reports', 'fa-chevron-left', null, true, '/signin');\n }));\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('EaTeamInviteAcceptCtrl', function ($state) {\n $state.go('public.signin');\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('TeamsChooseContractMixinCtrl', function($scope, $modal, $controller, $eaUserProfile) {\n\n // Re-Using the object picker\n $.extend(self, $controller('ModalObjectPickerCtrlMixin', {$scope: $scope, $modal: $modal}));\n\n $scope.openContractChooser = function(profile, options) {\n options = options || {};\n\n var availableContracts = $eaUserProfile.getContracts(profile, options.team).toArray();\n\n\n // prepare the callbacks\n var getImageUrl = function(model) {\n return 'fa-user';\n };\n\n var getDisplayName = function(model) {\n if (model.Definition === 'EA') {\n return 'EA-' + model.Enrollment;\n } else {\n return model.Name;\n }\n };\n\n var getDetailsString = function(model) {\n if (model.Definition === 'EA') {\n return 'Microsoft Enterprise Agreement';\n } else {\n return 'Microsoft Rate Plan or Pay-as-You-Go Plan';\n }\n };\n\n var description = 'Please select the contract you want to define notifications for this user:';\n\n return $scope.openObjectPickerDialog('Choose a contract', description, getImageUrl, getDisplayName, getDetailsString, availableContracts, [availableContracts[0]], true);\n };\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('TeamsChooseTeamMixinCtrl', function($scope, $modal, $controller, $q, $eaTeamManagement) {\n\n // Re-Using the object picker\n $.extend(self, $controller('ModalObjectPickerCtrlMixin', {$scope: $scope, $modal: $modal}));\n\n /*\n * Opens a team chooser and allows to select a specific team. Only teams where the user has the defined minimum\n * role will be shown. If only one team is choosable the function does not open a chooser it returns this team.\n * Should no team match the criteria it ends up with an error.\n */\n $scope.openTeamChooser = function(profile, activeTeamId, minimumRoleInTeam, $eaCurrentSession, options) {\n options = options || {};\n\n // load all the teams\n return $eaTeamManagement.getTeamProfilesByRole(profile, minimumRoleInTeam, false, $eaCurrentSession.DataToken).then(function(teamProfiles) {\n\n // check if we have no team\n if (!teamProfiles || teamProfiles.length === 0) { return $q.reject(); }\n\n // check if we have just one team\n if (teamProfiles.length === 1 && !options.allowPersonal) { return $q.when(teamProfiles[0].Id); }\n\n // add the personal team\n if (options && options.allowPersonal) {\n teamProfiles.push({\n Name: 'Personal',\n Id: 'personal'\n });\n }\n\n // define the selectedTeamProfile\n var selectedTeamProfile = teamProfiles[0];\n if (activeTeamId) {\n teamProfiles.forEach(function(t) {\n if (t.Id == activeTeamId) { selectedTeamProfile = t; }\n })\n }\n\n // prepare the callbacks\n var getImageUrl = function(model) {\n if (model.Id === 'personal') {\n return 'fa-user';\n } else {\n return 'fa-users';\n }\n };\n\n var getDisplayName = function(model) {\n return model.Name;\n };\n\n var getDetailsString = function(model) {\n if (model.Id === 'personal') {\n return 'This is your personal account';\n } else if (model.Role === 'admin') {\n return 'You are currently an administrator of this team';\n } else {\n return 'You are part of this team as a normal user';\n }\n };\n\n var description = 'Currently you are a member of several different teams. Please choose the team you want to perform the operation:';\n\n return $scope.openObjectPickerDialog('Choose a team', description, getImageUrl, getDisplayName, getDetailsString, teamProfiles, [selectedTeamProfile], true).then(function(selectedTeamProfile) {\n return selectedTeamProfile.Id;\n })\n });\n };\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('EaDashboardsCtrl', function ($scope, $stateParams, $state, $q, $eaCurrentSession, $eaBackendDataModeSelector, $eaConfig, $toolbar, $controller, $modal, $eaBackend, $eaSession2, $eaDataCoordinator, $rootScope, $eaWidgetDashboardManager, $eaUserProfile, $eaTeamManagement, $eaLocalSettings, $eaBilling, $eaReportData, ngToast, $busy, jwtHelper, $window, $interval, $acTimelineGenerator, $timeout, $eaWidgetRepository) {\n\n // inject the mixins\n $.extend(self, $controller('BrandingCtrlMixin', {$scope: $scope, $modal: $modal }));\n $.extend(self, $controller('SessionHelperCtrlMixin', {$scope: $scope, $eaBackendDataModeSelector: $eaBackendDataModeSelector, $eaSession2: $eaSession2, $state: $state }));\n $.extend(self, $controller('TeamsChooseTeamMixinCtrl', {$scope: $scope, $modal: $modal, $controller: $controller, $q: $q, $eaTeamManagement: $eaTeamManagement }));\n $.extend(self, $controller('ManageContractSettingsCtrlMixin', {$scope: $scope, $modal: $modal }));\n $.extend(self, $controller('NotificationSettingsCtrlMixin', {$scope: $scope, $modal: $modal }));\n $.extend(self, $controller('SurveyCtrlMixin', {$scope: $scope, $modal: $modal, $eaBackend: $eaBackend, $window: $window }));\n $.extend(self, $controller('ModalObjectPickerCtrlMixin', {$scope: $scope, $modal: $modal }));\n\n // contains the different dashboards\n // { name: \"xxx\", id: \"yyy\" }\n $scope.dashboards = [];\n $scope.dashboardsMap = {};\n $scope.activeDashboard = null;\n $scope.dataToken = $eaCurrentSession.DataToken;\n $scope.activeUser = null;\n $scope.dashboardEditMode = false;\n $scope.rienabled = false;\n\n $scope.autoRefreshInformation = {\n enabled: false,\n timer: 1000,\n timeout: 1000 * 60 * 30,\n timeoutDefault: 1000 * 60 * 30,\n timeoutHandle: undefined\n };\n\n // check the caps\n $scope.rienabled = $eaCurrentSession.hasCap('ri');\n $eaConfig.riEnabled = $scope.rienabled;\n\n // wait until the extended user profile is available\n return $eaUserProfile.load($eaCurrentSession.DataToken).then(function(profile) {\n\n // configure margin\n $eaBackendDataModeSelector.enableNoMargin($stateParams.nomargin === 'true');\n\n // the profile\n $scope.activeUser = profile;\n $scope.activeTeamProfile = $eaUserProfile.getTeam(profile, $stateParams.teamid);\n $scope.activeRoleInTeam = ($eaTeamManagement.isAdminInOfTeam(profile, $stateParams.teamid) || $stateParams.teamid == 'personal') ? 'admin' : 'member';\n\n // shows a notification for the user in case if expired token\n function notifyUserAboutExpiredToken(dashboard) {\n if (!dashboard) { return; }\n\n // check special contract\n if (dashboard.Name === 'EA-98989898') { return; }\n\n // load the contract details\n $eaReportData.loadContractDetails(dashboard.Team, dashboard.Enrollment, $eaCurrentSession.DataToken, {maxPeriods: dashboard.MaxPeriods}).then(function(contractDetails) {\n\n // check if we have a token\n if (!contractDetails.Token) { return; }\n\n // verify our token\n try {\n\n // check if token is expired\n if (jwtHelper.isTokenExpired(contractDetails.Token)) {\n ngToast.create({\n className: 'danger',\n content:\n 'Alert! The security token for the Azure Enterprise Portal is expired and needs to be renewed. Please
' +\n 'visit the settings section and update the security token for your Enterprise Agreement. Azure Costs will
'+\n 'receive data from Microsoft within the next sync interval after updating the security token automatically.'\n });\n }\n\n } catch (error) {\n\n // at this point the token is invalid\n ngToast.create({\n className: 'danger',\n content:\n 'Alert! The security token for the Azure Enterprise Portal is invalid and needs to be renewed. Please
' +\n 'visit the settings section and update the security token for your Enterprise Agreement. Azure Costs will
' +\n 'receive data from Microsoft within the next sync interval after updating the security token automatically.'\n });\n\n }\n });\n };\n\n // update the navbar menu\n function updateControllerNavBarMenu() {\n\n // check if we are CSP\n var isCspCustomer = ($scope.activeDashboard.EnrollmentDefinition === 'CSP');\n\n // allow to set the refresh operation\n $toolbar.addItem('toggleAutoRefresh', ($scope.autoRefreshInformation.enabled ? 'Auto-Refresh in ' + ($scope.autoRefreshInformation.timeout / 1000).toString().toHHMMSS() : 'Enable Auto-Refresh'), 'fa-clock-o', \"Enables or disables the automatic refresh operation\", true, $scope.toggleAutoRefresh);\n\n // Switch Team\n if ($eaTeamManagement.getTeams(profile).length > 0) {\n $toolbar.addItem('switchTeam', 'Switch Team', 'fa-users', \"Allows to switch to another team\", true, function () {\n $scope.openTeamChooser(profile, $stateParams.teamid, 'member', $eaCurrentSession, {allowPersonal: true}).then(function (selectedTeamId) {\n $state.go('authorized.teams.dashboards', {teamid: selectedTeamId});\n })\n });\n }\n\n // Add Contract\n if (!isCspCustomer) {\n $toolbar.addItem('addContract', 'Add', 'fa-plus', \"Adds an additional EA contract to your account\", true, $scope.addContract);\n }\n\n // check if the user a team admin\n var isAdmin = ($scope.activeRoleInTeam == 'admin');\n var isRealTeamContract = ($stateParams.teamid != 'personal');\n\n // Open the Settings dialog\n if (isAdmin) {\n\n // add general settings\n $toolbar.addItem('generalSettings', 'Settings', 'fa-cogs', null, isAdmin, null);\n\n if (!isCspCustomer) {\n\n // Open the settings for CSP\n $toolbar.addItem('generalSettings.openSettings', 'General', 'fa-cog', \"Allows to manage settings for the registered contracts\", true, $scope.openSettingsDialog, null, 'generalSettings');\n } else {\n // Open the contract settings dialog\n $toolbar.addItem('generalSettings.openSettings', 'General', 'fa-cog', \"Allows to manage settings for the registered contracts\", true, $scope.openSettingsDialog, null, 'generalSettings');\n\n }\n\n // Open the notification settings dialog\n $toolbar.addItem('generalSettings.openNotificationSettings', 'Notifications', 'fa-envelope', \"Allows to manage notification settings for the registered contracts\", true, $scope.openNotiSettingsDialog, null, 'generalSettings');\n\n // Open the notification settings dialog\n $toolbar.addItem('generalSettings.openTriggers', 'Triggers', 'fa-bolt', \"Allows to manage triggersfor the registered contracts\", true, $scope.openTriggers, null, 'generalSettings');\n \n // Add Branding option as child of the settings\n if (isRealTeamContract) { $toolbar.addItem('generalSettings.openBranding', 'Edit Branding', 'fa-css3', \"Allows to configure a specific team branding\", true, $scope.openBrandingDialogEx, null, 'generalSettings'); }\n\n // check if we have at least a professional plan\n if ($eaBilling.hasRequiredPlan($scope.activeTeamProfile.AccountPlan, 'professional') || $eaCurrentSession.isActAsSession()) {\n\n // define a prefix\n var prefix = $eaCurrentSession.isActAsSession() ? '(ActAs) ' : '';\n\n // Add Sync operation as child of the settings\n if (!isCspCustomer) {\n $toolbar.addItem('generalSettings.performSync', prefix + 'Trigger Sync', 'fa-random', \"Start synchronization with the Microsoft EA portal\", true, $scope.startMonthSync, null, 'generalSettings');\n\n $toolbar.addItem('generalSettings.performMonthSync', prefix + 'Re-Sync All', 'fa-recycle', \"Start synchronization with the Microsoft EA portal\", true, $scope.startFullSync, null, 'generalSettings');\n }\n\n }\n\n } else {\n\n $toolbar.addItem('generalSettingsOpenNotificationSettings', 'Notifications', 'fa-envelope', \"Allows to manage notification settings for the registered contracts\", true, $scope.openNotiSettingsDialog, null);\n }\n\n // Purge Caches\n $toolbar.addItem('generalSettings.purgeCaches', 'Purge Reports', 'fa-eraser', \"Cleans up all pre calculated reports\", true, $scope.purgeReportCaches, null, 'generalSettings');\n\n // Reload operation\n $toolbar.addItem('performReload', 'Reload', 'fa-refresh', \"Current data will be refreshed\", true, $scope.reloadData);\n }\n\n $scope.toggleAutoRefresh = function() {\n $scope.autoRefreshInformation.enabled = !$scope.autoRefreshInformation.enabled;\n $scope.autoRefreshInformation.timeout = $scope.autoRefreshInformation.timeoutDefault;\n updateControllerNavBarMenu();\n\n if ($scope.autoRefreshInformation.enabled) {\n $scope.autoRefreshInformation.timeoutHandle = $interval(function() {\n\n // reduce the timeout\n $scope.autoRefreshInformation.timeout = $scope.autoRefreshInformation.timeout - $scope.autoRefreshInformation.timer;\n\n // update the ui\n updateControllerNavBarMenu();\n\n // check if we need to execute a reload\n if ( $scope.autoRefreshInformation.timeout <= 0) {\n $scope.autoRefreshInformation.timeout = $scope.autoRefreshInformation.timeoutDefault;\n $scope.refreshScreen();\n }\n }, $scope.autoRefreshInformation.timer);\n } else {\n $interval.cancel($scope.autoRefreshInformation.timeoutHandle);\n $scope.autoRefreshInformation.timeoutHandle = undefined;\n }\n };\n\n $scope.addContract = function() {\n $state.go('authorized.teams.contracts.add', { teamid: $stateParams.teamid});\n };\n\n $scope.reloadData = function () {\n if ($scope.activeDashboard) {\n\n // reload the widgets\n $eaWidgetDashboardManager.reload($scope.activeDashboard.Id);\n }\n };\n\n $scope.refreshScreen = function() {\n $state.go($state.current.name, { initial: null }, {reload: true});\n };\n\n $scope.selectDashboard = function(dashboard) {\n\n // load the contract information\n var contractPromise = $q.resolve();\n\n if (!dashboard.ContractInfo) {\n contractPromise = $eaBackend.dataGetContractInfo(dashboard.Team,dashboard.Id, $eaCurrentSession.DataToken);\n }\n\n // render\n return contractPromise.then(function(contractInfo) {\n\n // set the info\n dashboard.ContractInfo = contractInfo;\n if (!dashboard.ContractInfo) { dashboard.ContractInfo = { billingDay: 1 } };\n\n // select the dashboard\n if ($scope.activeDashboard) {\n $scope.activeDashboard.Active = false;\n }\n $scope.activeDashboard = dashboard;\n $scope.activeDashboard.Active = true;\n $eaLocalSettings.activeDashboard = dashboard.Id;\n\n // configure the billing cycle\n $eaBackendDataModeSelector.enableBillingCycle($stateParams.cycle === 'billing', $scope.activeDashboard.ContractInfo.billingDay);\n\n // update the url\n $state.transitionTo('authorized.teams.dashboards', {\n active: dashboard.Id,\n cycle: $eaBackendDataModeSelector.isBillingCycleEnabled() ? 'billing' : 'monthly'\n }, {\n location: true,\n inherit: true,\n relative: $state.$current,\n notify: false\n });\n\n // notify the user\n notifyUserAboutExpiredToken($scope.activeDashboard);\n });\n };\n\n $scope.openBrandingDialogEx = function() {\n $scope.openBrandingDialog($eaCurrentSession, $stateParams.teamid).then(function(brandingSettings) {\n $eaBackend.dataUpdateBranding($stateParams.teamid, brandingSettings, $eaCurrentSession.DataToken);\n })\n };\n\n $scope.toggelEditMode = function() {\n // toggle the edit mode\n $scope.dashboardEditMode = !$scope.dashboardEditMode;\n };\n\n $scope.startAddCustomWidget = function() {\n $eaWidgetRepository.showRepository();\n };\n\n $scope.openSettingsDialog = function() {\n $busy.during($eaReportData.loadContractDetails($scope.activeDashboard.Team, $scope.activeDashboard.Enrollment, $eaCurrentSession.DataToken)).then(function(loadedContractInformation) {\n\n // check if we are CSP\n var isCspCustomer = (loadedContractInformation.Definition === 'CSP');\n\n $scope.openManageSettingsDialog(loadedContractInformation, $scope.activeRoleInTeam, isCspCustomer).then(function (updatedContractInformation) {\n\n if (updatedContractInformation.action === 'remove') { \n $busy.during($eaBackend.dataDeleteContract($scope.activeDashboard.Team, $scope.activeDashboard.Enrollment, $eaCurrentSession.DataToken).finally(function () {\n $state.reload();\n })); \n } else {\n $busy.during($eaBackend.dataUpdateContract($scope.activeDashboard.Team, $scope.activeDashboard.Enrollment, updatedContractInformation.contract, $eaCurrentSession.DataToken)).then(function () {\n if (loadedContractInformation.Periods != updatedContractInformation.contract.Periods) {\n $eaUserProfile.invalidate();\n $eaDataCoordinator.invalidate($scope.activeUser.cacheHash);\n $state.reload();\n } else {\n $scope.reloadData();\n }\n });\n }\n })\n });\n };\n\n $scope.openTriggers = function() {\n if ($scope.activeDashboard) { \n $window.location.href = '/app2/teams/' + $scope.activeDashboard.Team + '/apps/contracts/' + $scope.activeDashboard.Id + '/triggers';\n }\n }\n\n $scope.openNotiSettingsDialog = function() {\n $busy.during($eaReportData.loadContractDetails($scope.activeDashboard.Team, $scope.activeDashboard.Enrollment, $eaCurrentSession.DataToken)).then(function(loadedContractInformation) {\n $busy.during($eaBackend.dataGetContractNotifcationSettings($scope.activeDashboard.Team, $scope.activeDashboard.Enrollment, $eaCurrentSession.DataToken)).then(function (loadedNotificationSettings) {\n $scope.openNotificationSettingsDialog(loadedContractInformation, loadedNotificationSettings, $scope.activeTeamProfile, $scope.activeRoleInTeam).then(function (updatedData) {\n return $busy.during($eaBackend.updateGetContractNotifcationSettings($scope.activeDashboard.Team, $scope.activeDashboard.Enrollment, updatedData.notificationInformation, $eaCurrentSession.DataToken, updatedData.default ? { Default: true } : {})).then(function() {\n if (updatedData.sendMail) {\n return $eaBackend.triggerContractNotificationForUser($scope.activeDashboard.Team, $eaCurrentSession.UserId, $scope.activeDashboard.Enrollment, $eaCurrentSession.DataToken).then (function() {\n\n // notify the user\n ngToast.create({\n className: 'success',\n content: 'Great! The notifcation settings was updated successfully and a test mail was triggered to ' + $eaCurrentSession.Contact + '. It should not take longe than a couple minutes.'\n });\n\n })\n } else {\n\n // notify the user\n ngToast.create({\n className: 'success',\n content: 'Great! The notifcation settings was updated successfully'\n });\n\n return $q.resolve();\n }\n })\n })\n });\n });\n };\n\n $scope.purgeReportCaches = function() {\n var ok = confirm('Do you really want to purge all cached reports for this contract? This will remove all pre-calculated reports and it could take a while until the re-calculation is executed!');\n if (ok) {\n\n // clean up\n $busy.message = \"Cleaning up all report caches\";\n $busy.during($eaBackend.dataPostPurgeContractReports($scope.activeDashboard.Team, $scope.activeDashboard.Enrollment, $eaCurrentSession.DataToken));\n\n // reload\n $scope.reloadData();\n }\n };\n\n $scope.startMonthSync = function() {\n\n // load the contract details\n $eaReportData.loadContractDetails($scope.activeDashboard.Team, $scope.activeDashboard.Enrollment, $eaCurrentSession.DataToken).then(function(contractDetails) {\n\n\n // preselect the current month\n var currentMonth = (new Date()).currentMonthDefinition();\n\n // description\n var description = 'Please select all months you want to re-sync. Azure Costs will override all ' +\n 'existing information for this month and downloads the spending data freshly ' +\n 'from Microsoft:';\n\n // report timeline\n var reportStrings = $acTimelineGenerator.createMonthList(12, $acTimelineGenerator.addMonth(new Date(), -11));\n if (contractDetails && contractDetails.Periods && contractDetails.Periods === 24) {\n reportStrings = $acTimelineGenerator.createMonthList(24, $acTimelineGenerator.addMonth(new Date(), -23));\n }\n\n // show the month selector\n return $scope.openObjectPickerDialog('Select month to sync', description, 'fa-calendar-o', undefined, undefined, reportStrings.sortSimple().reverse(), [currentMonth], false).then(function (selectedMonthes) {\n\n // notify the user\n ngToast.create({\n className: 'success',\n content: 'Great! A new sync for your contract ' + $scope.activeDashboard.Name + ' is started. This can take a couple seconds or minutes. If you don\\'t see new reports after more than 15 minutes give us a note.'\n });\n\n // use the new api if requires\n if ($scope.activeDashboard.EnrollmentDefinition === 'AWS' || $scope.activeDashboard.EnrollmentDefinition === 'GCP') {\n\n return $eaBackend.dataMonthSyncReportsV2($scope.activeDashboard.Team, $scope.activeDashboard.Enrollment, selectedMonthes, $eaCurrentSession.DataToken).catch(function (e) {\n\n // schedule the syncs\n selectedMonthes.forEach(function (month) {\n\n // notify regarding error\n ngToast.create({\n className: 'error',\n content: 'Error! Failed to process the synchronisation request of month ' + month + ' - Error: ' + e\n });\n });\n });\n\n } else {\n // schedule the syncs\n selectedMonthes.forEach(function (month) {\n\n // start the sync\n $eaBackend.dataMonthSyncReports($scope.activeDashboard.Team, $scope.activeDashboard.Enrollment, month, $eaCurrentSession.DataToken).catch(function (e) {\n\n // notify regarding error\n ngToast.create({\n className: 'error',\n content: 'Error! Failed to process the synchronisation request of month ' + month + ' - Error: ' + e\n });\n\n });\n });\n }\n });\n });\n };\n\n $scope.startFullSync = function() {\n\n // notify the user\n ngToast.create({\n className: 'success',\n content: 'Great! A new sync for your contract ' + $scope.activeDashboard.Name + ' is started. This can take a couple seconds or minutes. If you don\\'t see new reports after more than 15 minutes give us a note.'\n });\n\n // use the new api if requires\n if ($scope.activeDashboard.EnrollmentDefinition === 'AWS' || $scope.activeDashboard.EnrollmentDefinition === 'GCP') {\n\n // load the contract details\n return $eaReportData.loadContractDetails($scope.activeDashboard.Team, $scope.activeDashboard.Enrollment, $eaCurrentSession.DataToken).then(function(contractDetails) {\n\n return $eaBackend.dataMonthSyncReportsV2($scope.activeDashboard.Team, $scope.activeDashboard.Enrollment, contractDetails.Reports, $eaCurrentSession.DataToken).catch(function (e) {\n\n // notify regarding error\n ngToast.create({\n className: 'error',\n content: 'Error! Failed to process the synchronisation request: ' + e\n });\n\n });\n });\n\n } else {\n // start the sync\n return $eaBackend.dataAllSyncReports($scope.activeDashboard.Team, $scope.activeDashboard.Enrollment, $eaCurrentSession.DataToken).catch(function (e) {\n\n // notify regarding error\n ngToast.create({\n className: 'error',\n content: 'Error! Failed to process the synchronisation request: ' + e\n });\n\n });\n }\n };\n\n // get the available contracts\n var availableContracts = $eaUserProfile.getContracts(profile);\n\n // generate the dashboards\n availableContracts.forEach(function(contract) {\n\n // check if the contract is in this team\n if (contract.Team !== $stateParams.teamid) { return; }\n\n // define the dashboarditem\n var dashboardItem = {\n Name: contract.Definition === 'EA' ? 'EA-' + contract.Enrollment : contract.Name,\n Id: contract.Enrollment,\n Team: contract.Team,\n Enrollment: contract.Enrollment,\n EnrollmentDefinition: contract.Definition,\n Active: false,\n Licensed: !(($scope.activeTeamProfile.AccountPlan !== 'enterprise' && $scope.activeTeamProfile.AccountPlan !== 'csp') && !$eaBilling.isAccountOwner($scope.activeUser.UserId, $scope.activeTeamProfile)),\n State: $stateParams.initial && $stateParams.initial === contract.Enrollment ? 'pending' : 'ready',\n Profile: $scope.activeUser,\n MaxPeriods: contract.Periods,\n Collection: contract.ResellerApiVersion && contract.ResellerApiVersion === 'v2' ? 'spendings.v2' : null,\n ContractInfo: undefined\n };\n\n // patch demo\n if (contract.Name === 'EA-98989898') {\n dashboardItem.Name = contract.Name;\n }\n\n // check AWS or GCP\n if (dashboardItem.EnrollmentDefinition === \"AWS\" || dashboardItem.EnrollmentDefinition === \"GCP\") {\n dashboardItem.Collection = \"spendings.v3\";\n }\n\n // override the version from state parameter\n if ($stateParams.version && contract.Definition !== 'EA') {\n dashboardItem.Collection = 'spendings.' + $stateParams.version;\n if ($stateParams.version != 'v2') {\n dashboardItem.Collection = null;\n }\n }\n\n // add the contract\n $scope.dashboards.push(dashboardItem);\n $scope.dashboardsMap[dashboardItem.Id] = dashboardItem;\n\n $eaWidgetDashboardManager.onDashboardFunction(dashboardItem.Id, 'func:6801CF0C-51A8-4814-B456-4777D0FA74D8', function (args) {\n var enabledState = $eaBackendDataModeSelector.isBillingCycleEnabled() ? 'BillingCycle' : 'Default';\n return $eaWidgetDashboardManager.finishDashboardFunction(dashboardItem.Id, args, enabledState, null);\n });\n\n $eaWidgetDashboardManager.onDashboardFunction(dashboardItem.Id, 'func:BBB71FCA-AB10-4851-A59F-89E68B4FDE3A', function (args) {\n\n if (args.args.state === 'BillingCycle') {\n $eaBackendDataModeSelector.enableBillingCycle(true, $scope.activeDashboard.ContractInfo.billingDay);\n } else {\n $eaBackendDataModeSelector.enableBillingCycle(false, 1);\n }\n\n // update the url\n $state.transitionTo('authorized.teams.dashboards', {\n active: $scope.activeDashboard.Id,\n cycle: $eaBackendDataModeSelector.isBillingCycleEnabled() ? 'billing' : 'monthly'\n }, {\n location: true,\n inherit: true,\n relative: $state.$current,\n notify: false\n });\n\n return $timeout(function() {}, 100).then(function () {\n return $eaWidgetDashboardManager.finishDashboardFunction(dashboardItem.Id, args, true, null);\n });\n });\n\n $eaWidgetDashboardManager.onDashboardFunction(dashboardItem.Id, 'func:2DD4B2BC-983F-434B-B449-7A655AEE2D23', function (args) {\n\n var hintText = '';\n var periodDate = new Date(args.args.selectedPeriod);\n\n if ($eaBackendDataModeSelector.isBillingCycleEnabled()) {\n var billingDay = $eaBackendDataModeSelector.getBillingCycleDay();\n if (billingDay !== 1) {\n periodDate = $acTimelineGenerator.addMonth($acTimelineGenerator.addDay(periodDate, billingDay - 1), -1);\n }\n }\n\n if (periodDate > new Date()) {\n hintText = \"No consumption data available because period between \" + periodDate.toDateString() + \" - \" + $acTimelineGenerator.addDay($acTimelineGenerator.addMonth(periodDate), -1).toDateString() + \" not started yet\";\n } else {\n hintText = \"Consumption between \" + periodDate.toDateString() + \" - \" + $acTimelineGenerator.addDay($acTimelineGenerator.addMonth(periodDate), -1).toDateString() + \"\";\n }\n\n return $eaWidgetDashboardManager.finishDashboardFunction(dashboardItem.Id, args, hintText, null);\n });\n });\n\n // mark the first dashboard as active\n var selectDashboardPromise = $q.resolve();\n\n if ($scope.dashboards.length > 0) {\n\n // reads the dashboard from last used dashboard\n var targetDashboard = $scope.dashboardsMap[$eaLocalSettings.activeDashboard];\n\n // check if we need to override this via active parameter\n if ($stateParams.active) { targetDashboard = $scope.dashboardsMap[$stateParams.active]; }\n\n // use the fallback\n if (!targetDashboard) { targetDashboard = $scope.dashboards[0]; }\n\n // activate our targetdashboard\n selectDashboardPromise = $scope.selectDashboard(targetDashboard);\n\n } else {\n\n // go to add becasue we have no dashboards\n return $state.go('authorized.teams.contracts.add');\n }\n\n selectDashboardPromise.then(function() {\n // update the menu navbar\n updateControllerNavBarMenu();\n\n // check if we ask for survey\n $scope.askForSurveyIfNeeded($eaCurrentSession);\n });\n });\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('BrandingCtrlMixin', [ '$scope', '$modal', function($scope, $modal) {\n\n $scope.openBrandingDialog = function(session, team) {\n\n var modalInstance = $modal.open({\n templateUrl: \"views/teams/dashboards/modals/modal_ea_branding.html\",\n controller: 'ModalBrandingCtrl',\n resolve: {\n session: function() {\n return session;\n },\n team: function() {\n return team;\n }\n }\n });\n\n // returns a promise\n return modalInstance.result;\n };\n}]);\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('ManageContractSettingsCtrlMixin', [ '$scope', '$modal', function($scope, $modal) {\n\n $scope.openManageSettingsDialog = function(contract, role, isCspCustomer) {\n\n var modalInstance = $modal.open({\n templateUrl: \"views/teams/dashboards/modals/modal_ea_manage_contract_settings.html\",\n controller: 'ModalContractSettingsCtrl',\n resolve: {\n contract: function() {\n return contract;\n },\n role: function() {\n return (role ? role : 'member');\n },\n csp: function() {\n return isCspCustomer ? true : false;\n }\n }\n });\n\n // returns a promise\n return modalInstance.result;\n };\n}]);\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('NotificationSettingsCtrlMixin', [ '$scope', '$modal', function($scope, $modal) {\n\n /*\n contract => {\n DisplayName: '',\n Currency: '',\n }\n */\n $scope.openNotificationSettingsDialog = function(contract, notificationSettings, team, role) {\n\n var modalInstance = $modal.open({\n templateUrl: \"views/teams/dashboards/modals/modal_ea_notification_settings.html\",\n controller: 'ModalNotificationSettingsCtrl',\n resolve: {\n contract: function() {\n return contract;\n },\n notificationSettings: function() {\n return notificationSettings;\n },\n role: function() {\n return (role ? role : 'member');\n },\n team: function() {\n return team;\n }\n }\n });\n\n // returns a promise\n return modalInstance.result;\n };\n}]);\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('SurveyCtrlMixin', function($scope, $modal, $eaBackend, $window) {\n\n $scope.askForSurvey = function() {\n\n var modalInstance = $modal.open({\n templateUrl: \"views/teams/dashboards/modals/modal_ea_survey.html\",\n controller: 'ModalSurveyCtrl'\n });\n\n // returns a promise\n return modalInstance.result;\n };\n\n $scope.askForSurveyIfNeeded = function(session) {\n\n // check if we ask for survey\n if (session.Surveys.Influencer === null || session.LoginCount - session.Surveys.Influencer <= 50) {\n return\n }\n\n // if customer did not the survey we ask after 10 logins or every 20 more logins\n // until he is participating\n if (session.LoginCount !== 10 && (session.LoginCount - 10) % 20 !== 0) {\n return;\n }\n\n $scope.askForSurvey().then(function () {\n\n // register that the user participated the survey\n $eaBackend.dataUpdateProfile({SurveyAtLogin: session.LoginCount}, session.DataToken).finally(function () {\n\n // open survey link\n $window.location.href = 'http://azurecosts.polldaddy.com/s/css';\n\n });\n });\n }\n\n});\n","angular.module('azureCostsFeApp').controller('ModalBrandingCtrl', ['$scope', '$modalInstance', '$eaBranding', '$eaBackend', 'session', 'team', function($scope, $modalInstance, $eaBranding, $eaBackend, session, team) {\n // activate the first panel\n $scope.activePanel = 1;\n\n // set the current values\n $scope.companyInformation = $eaBranding.currentCompanyInformation;\n $scope.colorSettings = $eaBranding.currentColors;\n $scope.customStyleSettings = $eaBranding.currentCustomCss;\n $scope.bucketSettings = {\n name: \"\"\n };\n\n // do a copy of the org values\n $scope.orgColorSettings = angular.copy($scope.colorSettings);\n $scope.orgCustomStyleSettings = angular.copy($scope.customStyleSettings);\n\n $scope.companyChanged = function() {\n $eaBranding.setCompany($scope.companyInformation);\n };\n\n $scope.colorChanged = function() {\n $eaBranding.setColors($scope.colorSettings);\n };\n\n $scope.aceLoaded = function(_editor) {\n $scope.aceSession = _editor.getSession();\n };\n\n $scope.aceChanged = function () {\n $scope.customStyleSettings = $scope.aceSession.getDocument().getValue();\n $eaBranding.setCustomCss($scope.customStyleSettings);\n };\n\n $scope.resetBranding = function() {\n $scope.colorSettings = angular.copy($scope.orgColorSettings);\n $eaBranding.setColors($scope.colorSettings);\n };\n\n $scope.resetCustomCss = function() {\n $scope.customStyleSettings = angular.copy($scope.orgCustomStyleSettings);\n try { $scope.aceSession.getDocument().setValue($scope.customStyleSettings) } catch(error) {};\n $eaBranding.setCustomCss($scope.customStyleSettings);\n };\n\n $scope.ok = function () {\n $modalInstance.close({colors: $scope.colorSettings, css: $scope.customStyleSettings, company: $scope.companyInformation});\n };\n\n $scope.cancel = function () {\n // reset the CSS\n $scope.resetBranding();\n $scope.resetCustomCss();\n\n // close\n $modalInstance.dismiss(\"cancel\")\n };\n}]);\n\n\n\n","angular.module('azureCostsFeApp').controller('ModalContractSettingsCtrl', function($scope, $modalInstance, contract, role, csp, $eaBackend, $busy, jwtHelper) {\n\n $scope.contractInformation = null;\n $scope.contractInformationVirtual = {};\n $scope.contractTokenInPayload = false;\n\n $scope.contractGeneralSettings = {\n Enabled: false,\n NotifyZeroValue: false\n };\n\n $scope.contractInformationCurrency = {\n Currency: null,\n CurrencyOther: null\n };\n\n $scope.currencies = [ 'EUR', 'USD', 'Other'];\n\n $scope.retentions = [\n { Value: 12, Display: '12 Months'},\n { Value: 24, Display: '24 Months'}\n ];\n\n $scope.isCspCustomer = csp;\n\n $scope.ok = function () {\n\n // adjust state\n $scope.contractInformation.Disabled = !$scope.contractGeneralSettings.Enabled;\n $scope.contractInformation.NotifyZeroValue = $scope.contractGeneralSettings.NotifyZeroValue;\n console.log($scope.contractGeneralSettings.Enabled);\n\n // adjust the currency\n if ($scope.contractInformationCurrency.Currency === 'Other') {\n $scope.contractInformation.Currency = $scope.contractInformationCurrency.CurrencyOther;\n } else {\n $scope.contractInformation.Currency = $scope.contractInformationCurrency.Currency;\n }\n\n // done\n $modalInstance.close({ contract: $scope.contractInformation, notificationInformation: $scope.notificationInformation});\n };\n\n $scope.cancel = function () {\n $modalInstance.dismiss('cancel');\n };\n\n $scope.removeContract = function() {\n var ok = confirm('Do you really want to remove the contract? This will remove all data from the system and you need to re-register the contract later if required.');\n if (ok) { $modalInstance.close({action: \"remove\"}); }\n };\n\n $scope.generateVirtualContractInformationFromToken = function(enteredToken) {\n\n // check the token structure\n var decodedToken = null;\n var tokenExpired = false;\n try {\n decodedToken = jwtHelper.decodeToken(enteredToken);\n tokenExpired = jwtHelper.isTokenExpired(enteredToken);\n } catch(error) {\n decodedToken = null;\n }\n\n if (decodedToken) {\n\n\n $scope.contractInformationVirtual.decodedToken = decodedToken;\n $scope.contractInformationVirtual.tokenExpired = tokenExpired;\n $scope.contractInformationVirtual.expirationDate = new Date($scope.contractInformationVirtual.decodedToken.exp * 1000);\n\n if ($scope.contractInformationVirtual.decodedToken.ReportView === \"IndirectEnterprise\") {\n $scope.contractInformationVirtual.indirectContract = true;\n } else {\n $scope.contractInformationVirtual.indirectContract = false;\n }\n\n $scope.contractInformationVirtual.validToken = true;\n\n } else {\n $scope.contractInformationVirtual.validToken = false;\n }\n };\n\n // set the contract\n $scope.contractInformation = JSON.parse(JSON.stringify(contract));\n $scope.contractGeneralSettings.Enabled = !$scope.contractInformation.Disabled;\n $scope.contractGeneralSettings.NotifyZeroValue = $scope.contractInformation.NotifyZeroValue ? true : false;\n\n // set the role\n $scope.role = role;\n\n // set the currency information\n if ($scope.currencies.indexOf(contract.Currency) == -1) {\n $scope.contractInformationCurrency.Currency= 'Other';\n $scope.contractInformationCurrency.CurrencyOther = contract.Currency;\n } else {\n $scope.contractInformationCurrency.Currency= contract.Currency;\n $scope.contractInformationCurrency.CurrencyOther = null;\n }\n\n // calculate the virtual settings\n if ( $scope.contractInformation.DisplayName !== 'EA-98989898' && $scope.contractInformation.Token !== null && $scope.contractInformation.Token !== undefined) {\n $scope.contractInformationVirtual.showTokenDialog = true;\n $scope.generateVirtualContractInformationFromToken($scope.contractInformation.Token);\n $scope.contractTokenInPayload = true;\n }\n\n $scope.getContractType = function() {\n if ( $scope.contractInformationVirtual.indirectContract ) {\n return \"Indirect Contract (Contract brought via Microsoft Reseller)\";\n } else {\n return \"Direct Contract (Contract brought directly at Microsoft)\";\n }\n };\n});\n\n\n\n","angular.module('azureCostsFeApp').controller('ModalNotificationSettingsCtrl', function($scope, $modalInstance, contract, notificationSettings, team, role, $eaBackend, $busy, jwtHelper, $eaBilling) {\n\n $scope.contractInformation = null;\n $scope.notificationInformation = null;\n $scope.repeatInformation = {\n Repeats: 0,\n RepeatsEvery: 1,\n RepeatsOnMon: false,\n RepeatsOnTue: false,\n RepeatsOnWed: false,\n RepeatsOnThu: false,\n RepeatsOnFri: false,\n RepeatsOnSat: false,\n RepeatsOnSun: false\n };\n\n $scope.activePanel = 1;\n\n var localBreakDownFields = [\n \"SubscriptionName\" ,\n \"ServiceName\",\n \"ServiceCategory\",\n \"ServiceType\",\n \"ServiceSize\",\n \"ServiceUnit\",\n \"Tag\",\n \"ResourceGroup\"\n ];\n\n if (contract && contract.Definition === 'EA') {\n localBreakDownFields.push('CostCenter');\n localBreakDownFields.push('Department');\n }\n\n $scope.breakDownFields = localBreakDownFields.map(function(v) {\n return { name: v };\n });\n\n $scope.repeatsFields = [\n { name: 'Daily', value: 0 },\n { name: 'Monday, Wednesday & Friday', value: 1 },\n { name: 'Weekday (Monday to Friday)', value: 2 },\n { name: 'Weekly', value: 3 },\n { name: 'Monthly', value: 4 }\n ];\n\n $scope.everyFieldsWeeks = [\n { name: 'every week', value: 1 },\n { name: 'every 2 weeks', value: 2 },\n { name: 'every 3 weeks', value: 3 },\n { name: 'every 4 weeks', value: 4 },\n { name: 'every 5 weeks', value: 5 },\n { name: 'every 6 weeks', value: 6 },\n { name: 'every 7 weeks', value: 7 },\n { name: 'every 8 weeks', value: 8 }\n\n ];\n\n $scope.breakDownFields.removeObjectByProperty('name', 'Tag');\n $scope.breakDownFields.removeObjectByProperty('name', 'ServiceCosts');\n\n $scope.requiredPlan = 'professional';\n $scope.team = team;\n $scope.hasRequiredPlan = $eaBilling.hasRequiredPlan($scope.team.AccountPlan, $scope.requiredPlan);\n\n $scope.alertDimensions = [\n { name: \"Costs\", display: \"Costs\" },\n { name: \"DailyBurnrateAbs\", display: \"Daily Burn Rate (absolute)\" },\n { name: \"DailyBurnrateRel\", display: \"Daily Burn Rate (relative)\" },\n { name: \"DailyBurnrateDiff\", display: \"Daily Burn Rate Difference\" },\n { name: \"DailyBurnrateMax\", display: \"Daily Burn Rate Maximum\" }\n ];\n\n $scope.alertDimensionUnits = {\n DailyBurnrateRel: '%'\n };\n\n function setRepeatsOn(repeatsOn) {\n $scope.repeatInformation.RepeatsOnMon = (repeatsOn.indexOf('mo') !== -1);\n $scope.repeatInformation.RepeatsOnTue = (repeatsOn.indexOf('tu') !== -1);\n $scope.repeatInformation.RepeatsOnWed = (repeatsOn.indexOf('we') !== -1);\n $scope.repeatInformation.RepeatsOnThu = (repeatsOn.indexOf('th') !== -1);\n $scope.repeatInformation.RepeatsOnFri = (repeatsOn.indexOf('fr') !== -1);\n $scope.repeatInformation.RepeatsOnSat = (repeatsOn.indexOf('sa') !== -1);\n $scope.repeatInformation.RepeatsOnSun = (repeatsOn.indexOf('su') !== -1);\n }\n\n function buildEmptyAlertPolicy() {\n return { Dimension: undefined, Limit: undefined };\n }\n\n $scope.newAlertPolicy = buildEmptyAlertPolicy();\n\n function convertRepeatsFromDisplayToModel() {\n if ($scope.repeatInformation.Repeats === 0) {\n $scope.notificationInformation.DailyReportRepeatsOn = ['mo', 'tu', 'we', 'th','fr', 'sa', 'su'];\n $scope.notificationInformation.DailyReportRepeatsEvery = 1;\n } else if ($scope.repeatInformation.Repeats === 1) {\n $scope.notificationInformation.DailyReportRepeatsOn = ['mo', 'we', 'fr'];\n $scope.notificationInformation.DailyReportRepeatsEvery = $scope.repeatInformation.RepeatsEvery;\n } else if ($scope.repeatInformation.Repeats === 2) {\n $scope.notificationInformation.DailyReportRepeatsOn = ['mo', 'tu', 'we', 'th', 'fr'];\n $scope.notificationInformation.DailyReportRepeatsEvery = $scope.repeatInformation.RepeatsEvery;\n } else if ($scope.repeatInformation.Repeats === 3) {\n $scope.notificationInformation.DailyReportRepeatsOn = [];\n if ($scope.repeatInformation.RepeatsOnMon) { $scope.notificationInformation.DailyReportRepeatsOn.push('mo'); };\n if ($scope.repeatInformation.RepeatsOnTue) { $scope.notificationInformation.DailyReportRepeatsOn.push('tu'); };\n if ($scope.repeatInformation.RepeatsOnWed) { $scope.notificationInformation.DailyReportRepeatsOn.push('we'); };\n if ($scope.repeatInformation.RepeatsOnThu) { $scope.notificationInformation.DailyReportRepeatsOn.push('th'); };\n if ($scope.repeatInformation.RepeatsOnFri) { $scope.notificationInformation.DailyReportRepeatsOn.push('fr'); };\n if ($scope.repeatInformation.RepeatsOnSat) { $scope.notificationInformation.DailyReportRepeatsOn.push('sa'); };\n if ($scope.repeatInformation.RepeatsOnSun) { $scope.notificationInformation.DailyReportRepeatsOn.push('su'); };\n $scope.notificationInformation.DailyReportRepeatsEvery = $scope.repeatInformation.RepeatsEvery;\n } else if ($scope.repeatInformation.Repeats === 4) {\n $scope.notificationInformation.DailyReportRepeatsOn = ['mo'];\n $scope.notificationInformation.DailyReportRepeatsEvery = 4;\n }\n }\n\n $scope.ok = function () {\n convertRepeatsFromDisplayToModel();\n $modalInstance.close({ notificationInformation: $scope.notificationInformation, default: false, sendMail: false});\n };\n\n $scope.saveDefault = function() {\n convertRepeatsFromDisplayToModel();\n $modalInstance.close({ notificationInformation: $scope.notificationInformation, default: true, sendMail: false});\n };\n\n $scope.saveAndSendTestMail = function() {\n convertRepeatsFromDisplayToModel();\n $modalInstance.close({ notificationInformation: $scope.notificationInformation, default: false, sendMail: true});\n };\n \n $scope.cancel = function () {\n $modalInstance.dismiss(\"cancel\")\n };\n\n $scope.addAlertPolicy = function() {\n\n // define the unit\n var currency = $scope.alertDimensionUnits[$scope.newAlertPolicy.Dimension];\n if (!currency) { currency = $scope.contractInformation.Currency; }\n $scope.newAlertPolicy.LimitUnit = currency;\n\n // add the alert policy\n $scope.notificationInformation.AlertNotificationPolicies.push($scope.newAlertPolicy);\n\n // build a new empty one\n $scope.newAlertPolicy = buildEmptyAlertPolicy();\n };\n\n $scope.deleteAlertPolicy = function(policy) {\n var idx = $scope.notificationInformation.AlertNotificationPolicies.indexOf(policy);\n if (idx === -1) { return; }\n $scope.notificationInformation.AlertNotificationPolicies.splice(idx, 1);\n };\n\n // set the contract\n $scope.contractInformation = contract;\n\n // set the notification settings\n $scope.notificationInformation = notificationSettings;\n\n // set the default repeats information\n if ($scope.notificationInformation.DailyReportRepeatsOn === undefined) { $scope.notificationInformation.DailyReportRepeatsOn = ['mo', 'tu', 'we', 'th', 'fr', 'sa', 'su']; };\n if ($scope.notificationInformation.DailyReportRepeatsEvery === undefined) { $scope.notificationInformation.DailyReportRepeatsEvery = 1; };\n\n // convert to our more readably structure\n setRepeatsOn($scope.notificationInformation.DailyReportRepeatsOn);\n $scope.repeatInformation.RepeatsEvery = $scope.notificationInformation.DailyReportRepeatsEvery;\n\n // Daily\n if ($scope.notificationInformation.DailyReportRepeatsOn.length === 7 && $scope.notificationInformation.DailyReportRepeatsEvery == 1) {\n $scope.repeatInformation.Repeats = 0;\n // Monday, Wednesday & Friday\n } else if ($scope.notificationInformation.DailyReportRepeatsOn.isSame(['mo', 'we', 'fr'])) {\n $scope.repeatInformation.Repeats = 1;\n } else if ($scope.notificationInformation.DailyReportRepeatsOn.isSame(['mo', 'tu', 'we', 'th','fr'])) {\n $scope.repeatInformation.Repeats = 2;\n } else if ($scope.repeatInformation.RepeatsEvery === 4) {\n $scope.repeatInformation.Repeats = 4;\n } else {\n $scope.repeatInformation.Repeats = 3;\n }\n\n\n // check if we have alert notification policies\n if (!$scope.notificationInformation.AlertNotificationPolicies) { $scope.notificationInformation.AlertNotificationPolicies = [];}\n\n // set the role\n $scope.role = role;\n\n // check that we get default values for the breakdown properties\n if (!$scope.notificationInformation.DailyReportBreakDownFirst) {\n $scope.notificationInformation.DailyReportBreakDownFirst = $scope.breakDownFields[0].name;\n }\n});\n\n\n\n","angular.module('azureCostsFeApp').controller('ModalSurveyCtrl', ['$scope', '$modalInstance', function($scope, $modalInstance) {\n\n $scope.ok = function () {\n $modalInstance.close();\n };\n\n $scope.cancel = function () {\n $modalInstance.dismiss(\"cancel\")\n };\n\n}]);\n\n\n\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('EaRiManagementCtrl', function ($scope, $stateParams, $state, $eaCurrentSession, $eaUserProfile, $eaWidgetDashboardManager, $eaBilling) {\n\n var riWelcomeDashboardId = 'ri.welcome';\n var riPurchasedImpactDashboardId = 'ri.impact';\n\n /*\n * Handle the dataToken\n */\n $scope.dataToken = $eaCurrentSession.DataToken;\n\n /*\n Manage the Edit Mode\n */\n $scope.dashboardEditMode = false;\n\n $scope.toggelEditMode = function() {\n $scope.dashboardEditMode = !$scope.dashboardEditMode;\n };\n\n // Action: Allow to Upgrade the plan\n $eaWidgetDashboardManager.onDashboardFunction(riWelcomeDashboardId, 'func:EC80426D-4EBD-4249-B56A-D0D458F0E3EF', function (args) {\n\n // navigate to the scope\n $state.go('authorized.profileBillingUpgradeEdition');\n\n });\n\n // load the current user profile\n return $eaUserProfile.load($eaCurrentSession.DataToken).then(function(profile) {\n\n // collect the available contracts for rendering our navigation\n $scope.AvailableContracts = [];\n\n $eaUserProfile.getContracts(profile, $stateParams.teamid).forEach(function(contract) {\n\n // add the contact\n $scope.AvailableContracts.push({\n Name: contract.Definition === 'EA' ? 'EA-' + contract.Enrollment : contract.Name,\n Id: contract.Enrollment,\n Team: contract.Team\n });\n });\n\n // get the team model\n var teamProfile = $eaUserProfile.getTeam(profile, $stateParams.teamid);\n\n // check if we have the required plan\n if (!$eaBilling.hasRequiredPlan(teamProfile.AccountPlan, 'professional')) {\n\n // set the active dashboard\n $scope.activeDashboard = {\n Id: riWelcomeDashboardId,\n Name: 'Welcome',\n Profile: profile,\n Team: $stateParams.teamid,\n ContractId: 'RI:Welcome',\n Active: true,\n Collection: 'ri'\n }\n } else {\n\n // set the active dashboard\n $scope.activeDashboard = {\n Id: riPurchasedImpactDashboardId,\n Name: 'Purchase Impact Details',\n Profile: profile,\n Team: $stateParams.teamid,\n ContractId: 'RI:PurchaseImpact',\n Active: true,\n Collection: 'ri'\n }\n };\n });\n\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('EaTeamManageCtrl', function ($scope, $eaSession2, $eaBackend, $busy, $stateParams, $controller, $modal, $q, $eaConfig,$toolbar, $location,$eaUserProfile, $eaCurrentSession, rfc4122, ngToast, $eaReportData) {\n\n $.extend(self, $controller('TeamEditUsersCtrlMixin', {$scope: $scope, $modal: $modal }));\n $.extend(self, $controller('TeamEditAppCtrlMixin', {$scope: $scope, $modal: $modal }));\n $.extend(self, $controller('TeamEditPermissionsCtrlMixin', {$scope: $scope, $modal: $modal }));\n $.extend(self, $controller('TeamsChooseContractMixinCtrl', {$scope: $scope, $modal: $modal, $controller: $controller, $eaUserProfile: $eaUserProfile }));\n $.extend(self, $controller('TeamManagementCtrlMixin', {$scope: $scope, $eaBackend: $eaBackend, $q: $q }));\n $.extend(self, $controller('NotificationSettingsCtrlMixin', {$scope: $scope, $modal: $modal }));\n $.extend(self, $controller('ModalSingleLineBoxCtrlMixin', {$scope: $scope, $modal: $modal }));\n\n $scope.sessionLoaded = false;\n $scope.teamProfile = undefined;\n $scope.teamLogo = undefined;\n $scope.teamAADConnection = undefined;\n $scope.availableRoles = [ { display: 'Member', value: 'member' }, { display: 'Administrator', value: 'admin' }];\n $scope.bucketsEnabled = $eaConfig.features.buckets;\n\n // generate the callback uri\n var splittedUrl = $location.absUrl().split('/');\n var callbackUri = splittedUrl[0] + '//' + splittedUrl[2] + '/app/teams/invitation/accept';\n\n $scope.getDisplayName = function(user) {\n var userName;\n if (user.FirstName) { userName = user.FirstName + ' '; } else { userName = ''; }\n if (user.LastName) { userName = userName + user.LastName; };\n if (!userName) { userName = user.Contact; }\n\n return userName;\n };\n\n // allows to add a user\n $scope.addUser = function() {\n\n var existingUsers = $scope.teamProfile.Members.filter(function(user) {\n return user.Type !== 'app-only'\n });\n\n $scope.openTeamEditUserDialog(existingUsers, $scope.teamProfile.CloudSolutionProvider).then(function(result) {\n\n // wait for operations\n var operationPromisses= [];\n\n // removing all removed users\n result.removedUsers.forEach(function(user) {\n operationPromisses.push($scope.deleteUserFromTeam($stateParams.teamid, user, $eaCurrentSession.DataToken));\n });\n\n // inviting all other users\n result.newUsers.forEach(function(user) {\n\n if ($scope.hasUserRole(user, 'notification'))\n {\n operationPromisses.push($eaBackend.dataRegisterUserToTeam($stateParams.teamid, user.Contact, user.Role, user.Subscriptions, $eaCurrentSession.DataToken));\n } else {\n\n var fullAccess = false;\n\n if (user.Subscriptions && user.Subscriptions['*']) {\n fullAccess = true;\n }\n\n operationPromisses.push($eaBackend.dataInviteUserToTeamV2($stateParams.teamid, user.Contact, user.Role, fullAccess, callbackUri, $eaCurrentSession.DataToken));\n }\n });\n\n // send out\n $busy.during($q.all(operationPromisses).finally(function() {\n return $scope.reloadData();\n }));\n })\n };\n\n $scope.editPermissions = function(user) {\n\n // load all contracts for this team\n $busy.setMessage('Loading Subscriptions');\n $busy.during($eaBackend.helperGetAvailableSubscriptions($stateParams.teamid, $eaCurrentSession.DataToken)).then(function(availableSubscriptions) {\n\n $scope.openTeamEditPermissionsDialog(user, availableSubscriptions).then(function (result) {\n\n $busy.during($eaBackend.dataUpdateTeamMembership($stateParams.teamid, user.UserId, user.Role, result, undefined, $eaCurrentSession.DataToken).finally(function() {\n return $scope.reloadData();\n }));\n })\n });\n };\n\n $scope.editNotifications = function(user) {\n\n // ensure we have a fresh profile\n return $eaUserProfile.load($eaCurrentSession.DataToken, true).then(function(profile) {\n\n // show the select contract dialog\n return $scope.openContractChooser(profile, {team: $scope.teamProfile.Id}).then(function(selectedContract) {\n\n // load some contract information\n return $busy.during($eaReportData.loadContractDetails($scope.teamProfile.Id, selectedContract.Enrollment, $eaCurrentSession.DataToken)).then(function(loadedContractInformation) {\n\n // load the notification settings for the selected contract and user\n return $busy.during($eaBackend.dataGetContractNotifcationSettingsForUser($scope.teamProfile.Id, selectedContract.Enrollment, user.UserId, $eaCurrentSession.DataToken)).then(function (loadedNotificationSettings) {\n\n // open the select permissions dialog\n $scope.teamProfile.AccountPlan = 'enterprise';\n return $scope.openNotificationSettingsDialog(loadedContractInformation, loadedNotificationSettings, $scope.teamProfile, 'member').then(function (updatedData) {\n\n // store everything\n return $busy.during($eaBackend.updateGetContractNotifcationSettingsForUser($scope.teamProfile.Id, selectedContract.Enrollment, user.UserId, updatedData.notificationInformation, $eaCurrentSession.DataToken));\n });\n });\n });\n });\n })\n\n };\n\n $scope.addApp = function() {\n var newApp = { Name: \"\", ClientId: rfc4122.v4(), ClientSecret: rfc4122.v4(), Role: \"member\", WildCardSubscriptions: true };\n $scope.openTeamEditAppDialog(newApp).then(function(appModel) {\n var subscriptions = appModel.WildCardSubscriptions ? { '*': ['*'] } : {};\n return $busy.during($eaBackend.dataRegisterAppToTeam($stateParams.teamid, appModel.Name, appModel.ClientId, appModel.ClientSecret, appModel.Role, subscriptions, $eaCurrentSession.DataToken).finally(function() {\n return $scope.reloadData();\n }));\n })\n };\n\n $scope.deleteUserFromTeamEx = function(user) {\n\n var deleteOk = confirm(\"Do you really want to remove user \" + $scope.getDisplayName(user) + ' from this team?');\n\n if (deleteOk) {\n\n $busy.setMessage('Removing User');\n\n $busy.during($scope.deleteUserFromTeam($stateParams.teamid, user, $eaCurrentSession.DataToken).then(function () {\n\n // just remove from the collection\n var idx = $scope.teamProfile.Members.indexOf(user);\n if (idx != -1) {\n $scope.teamProfile.Members.splice(idx, 1);\n }\n\n }));\n }\n };\n\n $scope.resendInvitation = function(user) {\n\n // build the invitation id\n var invitationId = user.UserId.replace(/PSEUDO:/g,'');\n\n // reinvite\n $busy.during($eaBackend.dataReInviteUserToTeam($stateParams.teamid, invitationId, callbackUri, $eaCurrentSession.DataToken).then(function() {\n ngToast.create({\n className: 'success',\n content:\n 'Invitation Sent! The invitation notification was send again to ' + user.Contact + ''\n });\n }));\n };\n\n $scope.reloadData = function() {\n\n // load the user profile to get the information if the user is allowed to manage the team\n return $eaUserProfile.load($eaCurrentSession.DataToken, true).then(function(profile) {\n\n $scope.activeTeamBilling = $eaUserProfile.getTeam(profile, $stateParams.teamid);\n\n return $eaBackend.dataGetTeamProfile($stateParams.teamid, true, $eaCurrentSession.DataToken).then(function (teamProfile) {\n\n return $eaBackend.dataGetTeamImageLocation($stateParams.teamid).then(function (profileImageLocation) {\n\n $scope.teamProfile = teamProfile;\n $scope.teamLogo = profileImageLocation;\n\n return $eaBackend.dataGetAADConnections($stateParams.teamid, $eaCurrentSession.DataToken).then(function (connections) {\n if (connections && connections.length > 0) {\n $scope.teamAADConnection = connections[0];\n } else {\n $scope.teamAADConnection = null;\n }\n })\n });\n });\n });\n };\n\n $scope.reloadDataWithBusy = function() {\n\n $busy.setMessage(\"Loading Team...\");\n\n return $busy.during($scope.reloadData());\n };\n\n $scope.updateTeamName = function(data) {\n return $eaBackend.dataUpdateTeamProfile($stateParams.teamid, { Name: data }, $eaCurrentSession.DataToken).then(function() {\n return true;\n });\n };\n\n $scope.updateTeamImage = function(image) {\n return $eaBackend.dataUpdateTeamImage($stateParams.teamid, image, $eaCurrentSession.DataToken);\n };\n\n $scope.linkAAD = function() {\n $location.url('/teams/' + $stateParams.teamid + '/manage/aad/link');\n };\n\n $scope.editAAD = function() {\n $location.url('/teams/' + $stateParams.teamid + '/manage/aad/edit');\n };\n\n $scope.openBuckets = function() {\n $location.url('/teams/' + $stateParams.teamid + '/manage/buckets');\n };\n\n $scope.openSettings = function() {\n $location.url('/teams/' + $stateParams.teamid + '/manage/settings');\n };\n\n $scope.changeUserRole = function(user) {\n\n // check if we need to reset teh users subscriptions\n if (user.Role === 'admin') {\n user.Subscriptions = {'*': ['*']};\n }\n\n $busy.during($eaBackend.dataUpdateTeamMembership($stateParams.teamid, user.UserId, user.Role, user.Subscriptions, undefined, $eaCurrentSession.DataToken).finally(function() {\n return $scope.reloadData();\n }));\n };\n\n $scope.editContactAddress = function(user) {\n $scope.openSingleLineBox(\"Update Contact Information\", \"Please enter a new e-mail address to update the contact information of your team member.\", user.Contact).then(function(updatedContact) {\n $busy.during($eaBackend.dataUpdateTeamMembership($stateParams.teamid, user.UserId, undefined, undefined, updatedContact, $eaCurrentSession.DataToken).finally(function() {\n return $scope.reloadData();\n }));\n });\n };\n\n $scope.getClientId = function(appProfile) {\n return appProfile.Contact.split('@')[0];\n };\n\n // Add Back Entry\n $toolbar.addItem('manageTeam.Back', 'Back to Reports', 'fa-chevron-left', null, true, '/signin');\n\n // Sync operation\n $toolbar.addItem('manageTeam.performReload', 'Reload', 'fa-refresh', \"Current data will be refreshed\", true, $scope.reloadDataWithBusy);\n\n\n return $scope.reloadData().then(function() {\n $scope.sessionLoaded = true;\n });\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('TeamEditUsersCtrlMixin', [ '$scope', '$modal', function($scope, $modal) {\n\n $scope.openTeamEditUserDialog = function(users, isCspTeam) {\n\n var modalInstance = $modal.open({\n templateUrl: \"views/teams/manage/modals/modal_ea_team_edit_users.html\",\n controller: 'ModalTeamEditUsersCtrl',\n resolve: {\n Users: function() { return users; },\n IsCspTeam: function() { return isCspTeam; }\n }\n });\n\n // returns a promise\n return modalInstance.result;\n };\n}]);\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('TeamManagementCtrlMixin', function($scope, $eaBackend, $q, $eaSession2) {\n\n $scope.capitalizeFirstLetter = function(string) {\n return string.charAt(0).toUpperCase() + string.slice(1);\n };\n\n $scope.isUserPseudoUser = function(user) {\n return (user.LiveId === null || user.LiveId === undefined || user.LiveId.indexOf('PSEUDO:') === 0)\n };\n\n $scope.isUserSelf = function(user) {\n var activeSession = $eaSession2.getSession();\n return (activeSession.UserId === user.UserId);\n };\n\n $scope.isUserAccountOwner = function(user, team) {\n return (user.UserId === team.AccountOwner);\n };\n\n $scope.isUserDelegationAdmin = function(user) {\n return (user.UserId.indexOf('DEL:') === 0);\n };\n\n $scope.hasUserRole = function(user, role) {\n return (user.Role === role);\n };\n\n $scope.deleteUserFromTeam = function(teamid, user, dataToken) {\n var defer = $q.defer();\n\n $eaBackend.dataRemoveUserFromTeam(teamid, user.UserId, dataToken).then(function() {\n defer.resolve()\n }).catch(function(error) {\n defer.reject();\n });\n\n return defer.promise;\n };\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('TeamEditPermissionsCtrlMixin', [ '$scope', '$modal', function($scope, $modal) {\n\n $scope.openTeamEditPermissionsDialog = function(user, availableSubscriptions) {\n\n var modalInstance = $modal.open({\n templateUrl: \"views/teams/manage/modals/modal_ea_team_edit_permissions.html\",\n controller: 'ModalTeamEditPermissionsCtrl',\n resolve: {\n User: function() { return user; },\n AvailableSubscriptions: function() { return availableSubscriptions; }\n }\n });\n\n // returns a promise\n return modalInstance.result;\n };\n}]);\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('TeamEditAppCtrlMixin', [ '$scope', '$modal', function($scope, $modal) {\n\n $scope.openTeamEditAppDialog = function(app) {\n\n var modalInstance = $modal.open({\n templateUrl: \"views/teams/manage/modals/modal_ea_team_edit_app.html\",\n controller: 'ModalTeamEditAppCtrl',\n resolve: {\n App: function() { return app; }\n }\n });\n\n // returns a promise\n return modalInstance.result;\n };\n}]);\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('ModalTeamEditUsersCtrl', function($scope, $modalInstance, $eaSession2, $controller, $eaBackend, $q, Users, IsCspTeam) {\n\n $.extend(self, $controller('TeamManagementCtrlMixin', {$scope: $scope, $eaBackend: $eaBackend, $q: $q}));\n\n $scope.title = \"Edit Users\";\n\n $scope.existingUsers = Users;\n $scope.newUsers = [];\n $scope.removedUsers = [];\n\n $scope.newUser = {\n Contact: \"\",\n Role: IsCspTeam ? 'admin' : 'member',\n WildCardSubscriptions: true\n };\n\n $scope.isCspTeam = IsCspTeam;\n\n $scope.ok = function () {\n $modalInstance.close({newUsers: $scope.newUsers, removedUsers: $scope.removedUsers});\n };\n\n $scope.cancel = function () {\n $modalInstance.dismiss(\"cancel\")\n };\n\n $scope.addUser = function() {\n var userModel = {Name: null, Contact: $scope.newUser.Contact, Role: $scope.newUser.Role, Subscriptions: $scope.newUser.WildCardSubscriptions ? { '*': ['*'] } : {} };\n $scope.existingUsers.push(userModel);\n $scope.newUsers.push(userModel);\n $scope.newUser.Contact = \"\";\n $scope.newUser.Role = IsCspTeam ? 'admin' : 'member';\n $scope.newUser.WildCardSubscriptions = true;\n };\n\n $scope.removeUser = function(userModel) {\n\n // add the model to the removed ones\n $scope.removedUsers.push(userModel);\n\n // try to find the index in existing Users\n var idx = $scope.existingUsers.indexOf(userModel);\n if (idx != -1) {\n $scope.existingUsers.splice(idx, 1);\n }\n\n // try to find the index in new Users\n var idx = $scope.newUsers.indexOf(userModel);\n if (idx != -1) {\n $scope.newUsers.splice(idx, 1);\n }\n };\n});\n\n\n\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('ModalTeamEditPermissionsCtrl', function($scope, $modalInstance, $controller, $eaBackend, $q, AvailableSubscriptions, User) {\n\n $.extend(self, $controller('TeamManagementCtrlMixin', {$scope: $scope, $eaBackend: $eaBackend, $q: $q}));\n\n $scope.title = \"Edit Permissions\";\n $scope.availableSubscriptions = AvailableSubscriptions;\n\n $scope.contractCheckBoxChanged = function(contractModel) {\n // assign the view state to the child objects\n contractModel.Subscriptions.forEach(function(subscription) {\n $scope.viewStateModelContract[contractModel.Contract.Enrollment][subscription.Id] = $scope.viewStateModelContract[contractModel.Contract.Enrollment]['contract'];\n });\n };\n\n // the view model contains the state for the view\n $scope.viewStateModelContract = {};\n\n // Expand asterisk\n if (Object.keys(User.Subscriptions).length === 1 && Object.keys(User.Subscriptions)[0] === '*') {\n $scope.availableSubscriptions.forEach(function(contractModel) {\n $scope.viewStateModelContract[contractModel.Contract.Enrollment] = { contract: true };\n contractModel.Subscriptions.forEach(function(subscription) {\n $scope.viewStateModelContract[contractModel.Contract.Enrollment][subscription.Id] = true;\n })\n });\n }\n\n // visit the data\n Object.keys(User.Subscriptions).forEach(function(contractNumber) {\n\n if (contractNumber !== '*') {\n var subscritpionSettings = User.Subscriptions[contractNumber];\n if (subscritpionSettings.length === 1 && subscritpionSettings[0] === '*') {\n $scope.viewStateModelContract[contractNumber] = {contract: true };\n } else {\n\n $scope.viewStateModelContract[contractNumber] = {contract: false };\n\n subscritpionSettings.forEach(function(subscriptionId) {\n $scope.viewStateModelContract[contractNumber][subscriptionId] = true;\n })\n }\n }\n });\n\n // generate the viewModel\n $scope.availableSubscriptions.forEach(function(contractModel) {\n\n // check if we do not have this key\n if ($scope.viewStateModelContract[contractModel.Contract.Enrollment] === undefined || $scope.viewStateModelContract[contractModel.Contract.Enrollment]['contract'] === undefined) {\n $scope.viewStateModelContract[contractModel.Contract.Enrollment] = {contract: false };\n\n contractModel.Subscriptions.forEach(function (subscription) {\n\n if ($scope.viewStateModelContract[contractModel.Contract.Enrollment][subscription.Id] === undefined) {\n\n $scope.viewStateModelContract[contractModel.Contract.Enrollment][subscription.Id] = false;\n }\n })\n }\n });\n\n // update all childs\n $scope.availableSubscriptions.forEach(function(contractModel) {\n\n if ($scope.viewStateModelContract[contractModel.Contract.Enrollment]['contract']) {\n $scope.contractCheckBoxChanged(contractModel);\n }\n });\n\n $scope.ok = function () {\n\n // reduce to asterisk\n var everyEntryIsTrue = true;\n $scope.availableSubscriptions.forEach(function(contractModel) {\n if (!$scope.viewStateModelContract[contractModel.Contract.Enrollment]['contract']) {\n everyEntryIsTrue = false;\n }\n });\n\n // set the *\n if (everyEntryIsTrue) {\n User.Subscriptions = {'*': ['*']};\n } else {\n\n User.Subscriptions = {};\n\n Object.keys($scope.viewStateModelContract).forEach(function(contractNumber) {\n\n if ($scope.viewStateModelContract[contractNumber]['contract']) {\n User.Subscriptions[contractNumber] = ['*'];\n } else {\n User.Subscriptions[contractNumber] = [];\n\n Object.keys($scope.viewStateModelContract[contractNumber]).forEach(function (subscriptionId) {\n\n if (subscriptionId !== 'contract' && $scope.viewStateModelContract[contractNumber][subscriptionId]) {\n User.Subscriptions[contractNumber].push(subscriptionId);\n }\n })\n }\n });\n }\n\n $modalInstance.close(User.Subscriptions);\n };\n\n $scope.cancel = function () {\n $modalInstance.dismiss(\"cancel\")\n };\n});\n\n\n\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('ModalTeamEditAppCtrl', ['$scope', '$modalInstance', '$eaSession2', '$controller', '$eaBackend', '$q', 'App', function($scope, $modalInstance, $eaSession2, $controller, $eaBackend, $q, App) {\n\n $scope.title = \"Manage Application\";\n\n $scope.newApp = {\n Name: \"\",\n ClientId: \"\",\n ClientSecret: \"\",\n Role: \"member\",\n WildCardSubscriptions: true\n };\n\n if (App) {\n $scope.newApp = App;\n }\n\n $scope.ok = function () {\n $modalInstance.close($scope.newApp);\n };\n\n $scope.cancel = function () {\n $modalInstance.dismiss(\"cancel\")\n };\n\n}]);\n\n\n\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('EaTeamLinkAADCtrl', function ($scope, $location, $stateParams, $eaConfig, $window, $state, $busy, $eaBackend, $eaCurrentSession) {\n\n function linkAADInternal(instanceType) {\n // redirect to our backend\n var redirectUri = $location.absUrl().split('?')[0];\n $window.location = ($eaConfig.aadProtocol ? $eaConfig.aadProtocol: 'https') + '://' + $eaConfig.aadHost + '/aad/link/' + instanceType + '?redirect=' + encodeURIComponent(redirectUri);\n }\n\n // show the link UI\n $scope.callback = false;\n\n // check if we have a tid, if so create the AAD settings and\n // redirect to edit state\n // $state.go('authorized.teamsManageAADEdit');\n if ($stateParams.tid) {\n\n // show nothing\n $scope.callback = true;\n\n // load the team config\n $busy.setMessage('Saving team settings');\n\n $busy.during($eaBackend.dataRegisterAADConnection($stateParams.teamid, {TenantId: $stateParams.tid, RequiredGroup: null, DefaultIdentityProvider: false, CloudInstance: $stateParams.scope }, $eaCurrentSession.DataToken).then(function(teamProfile) {\n\n // navigate to the edit teams section\n $state.go('authorized.teamsManageAADEdit', { teamid: $stateParams.teamid});\n\n }).catch(function() {\n $scope.errorMessage = \"Failed to connect to Azure Active Directory\";\n }));\n\n } else {\n\n // starts the link process to AAD\n $scope.linkAAD = function () {\n linkAADInternal('graph');\n };\n\n // starts the link process to AAD\n $scope.linkAADGer = function () {\n linkAADInternal('graphger');\n }\n\n }\n});\n\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('EaTeamEditAADCtrl', function ($scope, $location, $stateParams, jwtHelper, $busy, $eaBackend, $eaCurrentSession) {\n var self = this;\n\n\n $scope.aadSettings = {\n TenantId: null,\n DefaultIdentityProvider: false,\n RequiredGroup: {\n GroupName: null,\n GroupId: null\n }\n };\n\n $scope.graphGroups = [];\n $scope.errorMessage = null;\n\n $scope.updateDirectoryConfig = function() {\n\n // load the team config\n $busy.setMessage('Saving team settings');\n $busy.during($eaBackend.dataRegisterAADConnection($stateParams.teamid, $scope.aadSettings, $eaCurrentSession.DataToken).then(function(teamProfile) {\n // navigate to manage team overview\n $location.url('/teams/' + $stateParams.teamid + '/manage');\n }).catch(function() {\n $scope.errorMessage = \"Failed to save the team settings\";\n }));\n };\n\n $scope.removeLinkAad = function() {\n var deleteOk = confirm(\"Do you really want to remove the connection to Azure Active Directory\");\n\n if (deleteOk) {\n $busy.during($eaBackend.dataDeleteAADConnection($stateParams.teamid, $scope.aadSettings.TenantId, $eaCurrentSession.DataToken).then(function () {\n // navigate to manage team overview\n $location.url('/teams/' + $stateParams.teamid + '/manage');\n }));\n }\n };\n\n // load the team profile\n return $eaBackend.dataGetAADConnections($stateParams.teamid, $eaCurrentSession.DataToken).then(function(connections) {\n if (connections && connections.length > 0) {\n $scope.aadSettings = connections[0];\n }\n\n // load the graph groups\n return $eaBackend.dataGetAADConnectionGroups($stateParams.teamid, $scope.aadSettings.TenantId, $eaCurrentSession.DataToken).then(function(groups) {\n\n // order the groups by name\n groups.sort(function(a, b){\n return a.GroupName.toLowerCase().localeCompare(b.GroupName.toLowerCase());\n });\n\n // assign the ordered array\n $scope.graphGroups = groups;\n\n $scope.graphGroups.forEach(function(group) {\n if ($scope.aadSettings.RequiredGroup && $scope.aadSettings.RequiredGroup.GroupId == group.GroupId) {\n $scope.aadSettings.RequiredGroup = group;\n }\n })\n })\n });\n});\n\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('EaTeamBucketsCtrl', function ($scope, $location, $stateParams, $busy, $eaConfig, $eaBackend, $window, $q, $eaCurrentSession) {\n var self = this;\n\n function BucketModel(name) {\n var selfModel = this;\n\n selfModel.OrgName = name;\n selfModel.Name = name;\n selfModel.State = 'ok';\n\n selfModel.getEditorKey = function() {\n return 'bucketEditor' + selfModel.Id;\n }\n }\n\n $scope.hostProtocol = $location.$$protocol;\n $scope.hostName = $eaConfig.feHost;\n\n if ($location.$$port && $location.$$port !== 443) {\n $scope.hostName = $scope.hostName + ':' + $location.$$port;\n }\n\n $scope.teamid = $stateParams.teamid;\n $scope.buckets = [];\n\n $scope.newBucket = function() {\n var bucket = new BucketModel('');\n bucket.State = 'new';\n bucket.OrgState = 'new';\n $scope.buckets.push(bucket);\n };\n\n $scope.deleteBucket = function(bucket) {\n if (bucket.OrgState == 'new') {\n $scope.buckets.splice($scope.buckets.indexOf(bucket), 1);\n } else {\n bucket.OrgState = bucket.State;\n bucket.State = 'deleted';\n }\n };\n\n $scope.undoBucket = function(bucket) {\n bucket.State = bucket.OrgState;\n };\n\n $scope.commitBucketEdit = function(data, bucket) {\n if (data !== bucket.Name) {\n\n // check the string\n if (!(/^[a-zA-Z0-9]*$/.test(data))) {\n return \"Invalid name, please use alphanumeric characters only!\";\n } else {\n // check if we can use this bucket\n var defer = $q.defer();\n\n $eaBackend.dataGetBucket(data).then(function () {\n defer.resolve(\"Bucket is in use\");\n }).catch(function () {\n bucket.Name = data;\n bucket.State = 'dirty';\n defer.resolve();\n });\n\n return defer.promise;\n }\n }\n };\n\n $scope.updateBuckets = function() {\n\n var updatePromisses = [];\n $scope.buckets.forEach(function(bucket) {\n\n // check if we need to save the bucket\n if (bucket.State == 'dirty') {\n\n if (bucket.OrgState == 'new') {\n updatePromisses.push($eaBackend.dataCreateTeamBucket($scope.teamid, bucket.Name, $eaCurrentSession.DataToken));\n } else {\n updatePromisses.push($eaBackend.dataDeleteTeamBucket($scope.teamid, bucket.OrgName, $eaCurrentSession.DataToken).then(function() {\n return $eaBackend.dataCreateTeamBucket($scope.teamid, bucket.Name, $eaCurrentSession.DataToken);\n }));\n }\n } else if (bucket.State == 'deleted') {\n updatePromisses.push($eaBackend.dataDeleteTeamBucket($scope.teamid, bucket.Name, $eaCurrentSession.DataToken));\n }\n });\n\n $busy.setMessage('Updating buckets');\n $busy.during($q.all(updatePromisses).then(function() {\n $window.history.back();\n }))\n };\n\n\n // load the team buckets\n return $eaBackend.dataGetTeamBuckets($scope.teamid, $eaCurrentSession.DataToken).then(function(buckets) {\n buckets.forEach(function(bucketName) {\n $scope.buckets.push(new BucketModel(bucketName));\n })\n });\n});\n\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('EaTeamSettingsCtrl', function ($scope, $stateParams, $busy, $eaCurrentSession, $eaBackend, $window) {\n var self = this;\n\n $scope.teamProfileForm = {\n Name: null,\n NotifyAdmins: false\n };\n\n $scope.updateProfile = function() {\n\n // convert to profile\n var teamProfileData = {\n Name: $scope.teamProfileForm.Name,\n NotificationNewMember: $scope.teamProfileForm.NotifyAdmins ? ['admin'] : []\n };\n\n $busy.during($eaBackend.dataUpdateTeamProfile($stateParams.teamid, teamProfileData, $eaCurrentSession.DataToken).then(function() {\n $window.history.back();\n }))\n };\n\n // load the team buckets\n $busy.setMessage(\"Loading team profile\");\n return $busy.during($eaBackend.dataGetTeamProfile($stateParams.teamid, false, $eaCurrentSession.DataToken).then(function(teamProfile) {\n $scope.teamProfileForm.Name = teamProfile.Name;\n $scope.teamProfileForm.NotifyAdmins = teamProfile.NotificationNewMember && teamProfile.NotificationNewMember.length > 0;\n }));\n\n});\n\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('CcAddContractCtrl', function ($scope, $state, $stateParams, $window, $ccDemoModeService, $controller, $modal, $eaCurrentSession) {\n $.extend(self, $controller('ModalMessageBoxCtrlMixin', {$scope: $scope, $modal: $modal }));\n\n $scope.addAzureContract = function()\n {\n $state.go('authorized.reportAdd', { teamid: $stateParams.teamid});\n };\n\n $scope.addAwsContract = function()\n {\n $state.go('authorized.teams.contracts.add-aws.prepare', { teamid: $stateParams.teamid});\n };\n\n $scope.addGoogleContract = function()\n {\n $state.go('authorized.teams.contracts.add-gcp.prepare', { teamid: $stateParams.teamid});\n };\n\n $scope.startDemoMode = function()\n {\n $ccDemoModeService.enableDemoMode($eaCurrentSession);\n };\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('CcAddAwsContractCtrl', function ($scope, $rootScope, $state) {\n\n function handleStep(state) {\n // define the step\n $scope.currentStep = 'step01';\n\n // check the correct one\n if (state.name == 'authorized.teams.contracts.add-aws.connect') {\n $scope.currentStep = 'step02';\n } else if (state.name =='authorized.teams.contracts.add-aws.finish') {\n $scope.currentStep = 'step03';\n }\n }\n\n // handle the state\n handleStep($state.current);\n\n // handle state changes to adapt the control\n $rootScope.$on('$stateChangeSuccess', function(event, toState, toParams, fromState, fromParams)\n {\n handleStep(toState);\n });\n\n\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('CcAddAwsContractPrepareCtrl', function ($scope, $state) {\n\n $scope.next = function()\n {\n $state.go('authorized.teams.contracts.add-aws.connect');\n };\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('CcAddAwsContractConnectCtrl', function ($scope, $eaBackend, $busy, $stateParams, $eaCurrentSession, $state) {\n\n $scope.form = {\n roleArn: undefined,\n externalId: undefined,\n bucket: undefined,\n prefix: undefined,\n reportname: undefined\n };\n\n var awsData = sessionStorage.getItem('awsdata');\n if (awsData) {\n $scope.form = JSON.parse(awsData);\n }\n\n $scope.error = undefined;\n\n $scope.next = function()\n {\n if(location.href.indexOf('localhost') !== -1) {\n sessionStorage.setItem(\"awsdata\", JSON.stringify($scope.form));\n }\n\n $busy.setMessage(\"Verifying connection to AWS...\");\n $busy.during($eaBackend.dataAwsVerifyConnection($stateParams.teamid, $scope.form.roleArn, $scope.form.externalId, $scope.form.bucket, $eaCurrentSession.DataToken)).then(function() {\n\n $busy.setMessage(\"Registering Contract...\");\n return $busy.during($eaBackend.dataAwsRegisterContract($stateParams.teamid, $scope.form.roleArn, $scope.form.externalId, $scope.form.bucket, $scope.form.prefix, $scope.form.reportname, $eaCurrentSession.DataToken)).then(function(contractId) {\n\n // show the finish page\n $state.go('authorized.teams.contracts.add-aws.finish', {teamid: $stateParams.teamid, cid: contractId});\n })\n }).catch(function(error) {\n $scope.error = error && error.data ? error.data : 'Unknown error';\n })\n }\n});\n","'use strict';\n\n/**\n * @ngdoc function\n * @name azureCostsFeApp.controller:MainCtrl\n * @description\n * # MainCtrl\n * Controller of the azureCostsFeApp\n */\nangular.module('azureCostsFeApp').controller('CcAddAwsContractDashboardCtrl', function ($scope, $stateParams) {\n $scope.teamid = $stateParams.teamid;\n $scope.cid= $stateParams.cid;\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('CcAddGcpContractCtrl', function ($scope, $rootScope, $state) {\n\n function handleStep(state) {\n // define the step\n $scope.currentStep = 'step01';\n\n // check the correct one\n if (state.name === 'authorized.teams.contracts.add-gcp.connect') {\n $scope.currentStep = 'step02';\n } else if (state.name === 'authorized.teams.contracts.add-gcp.finish') {\n $scope.currentStep = 'step03';\n }\n }\n\n // handle the state\n handleStep($state.current);\n\n // handle state changes to adapt the control\n $rootScope.$on('$stateChangeSuccess', function(event, toState, toParams, fromState, fromParams)\n {\n handleStep(toState);\n });\n\n\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('CcAddGcpContractPrepareCtrl', function ($scope, $state) {\n\n $scope.next = function()\n {\n $state.go('authorized.teams.contracts.add-gcp.connect');\n };\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('CcAddGcpContractConnectCtrl', function ($scope, $eaBackend, $busy, $stateParams, $eaCurrentSession, $state) {\n\n $scope.form = {\n accountkey: undefined,\n dataset: undefined\n };\n\n var gcpData = sessionStorage.getItem('gcpdata');\n if (gcpData) {\n $scope.form = JSON.parse(gcpData);\n }\n\n $scope.error = undefined;\n\n $scope.next = function()\n {\n if(location.href.indexOf('localhost') !== -1) {\n sessionStorage.setItem('gcpdata', JSON.stringify($scope.form));\n }\n\n $busy.setMessage('Verifying connection to GCP...');\n $busy.during($eaBackend.dataGcpVerifyConnection($stateParams.teamid, $scope.form.accountkey, $scope.form.dataset, $eaCurrentSession.DataToken)).then(function() {\n\n $scope.error = undefined;\n\n $busy.setMessage('Registering Contract...');\n return $busy.during($eaBackend.dataGcpRegisterContract($stateParams.teamid, $scope.form.accountkey, $scope.form.dataset, $eaCurrentSession.DataToken)).then(function(contractId) {\n\n // show the finish page\n $state.go('authorized.teams.contracts.add-gcp.finish', {teamid: $stateParams.teamid, cid: contractId});\n });\n }).catch(function(error) {\n $scope.error = error && error.data ? error.data : 'Unknown error';\n });\n };\n});\n","'use strict';\n\n/**\n * @ngdoc function\n * @name azureCostsFeApp.controller:MainCtrl\n * @description\n * # MainCtrl\n * Controller of the azureCostsFeApp\n */\nangular.module('azureCostsFeApp').controller('CcAddGcpContractDashboardCtrl', function ($scope, $stateParams) {\n $scope.teamid = $stateParams.teamid;\n $scope.cid= $stateParams.cid;\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('EaBillingCtrl', function ($scope, $eaBackend, $eaUserProfile, $toolbar, $busy, $eaSession2, $location, moment, $eaBilling, $controller, $modal, $acTimelineGenerator, $state, $eaConfig) {\n\n $.extend(self, $controller('ModalBillingAddressCtrlMixin', {$scope: $scope, $modal: $modal }));\n\n $busy.setMessage(\"Loading Billing-Data\");\n $busy.during($eaSession2.lazy().then(function(session) {\n\n // load the profile\n return $eaUserProfile.load(session.DataToken, true).then(function(profile) {\n return $eaBilling.loadBillingInformation(session).then(function (billing) {\n\n $scope.SvpMode = (angular.isObject($eaConfig.svp) && !$eaConfig.features.fastspring);\n\n // generate the contracts list\n var contracts = [];\n profile.Teams.forEach(function(team) {\n\n // check if we are account owner\n if ($eaBilling.isAccountOwner(session.UserId, team)) {\n\n team.Contracts.forEach(function(contract) {\n contracts.push(contract);\n })\n }\n });\n\n $scope.BillingInformation = {\n Plan: {\n Label: billing.CurrentPlan,\n Edition: $eaBilling.getDisplayTextForPlan(billing.CurrentPlan) + \" Edition\",\n RetentionPeriod: $eaBilling.calculateRetentionPeriod(billing),\n ChargingModel: $eaBilling.isInTrial(billing) ? \"Trial\" : billing.CurrentPlan === 'basic' ? \"Free Plan\" : \"Paid Plan\"\n },\n Payment: {\n Method: billing.Reference ? \"fastspring\" : \"invoice\",\n NextPaymentDue: billing.NextPaymentDue ? new Date(billing.NextPaymentDue) : null,\n NextPaymentAmount: $eaBilling.calculateCurrentPlanPrice(billing)\n },\n Extra: {\n Info: billing.InvoiceAddress,\n Contracts: contracts.sort()\n },\n Account: {\n Contact: profile.Contact,\n Id: profile.UserId\n }\n };\n\n // calculate the amount string\n $scope.BillingInformation.Payment.NextPaymentAmountString = '$' + $scope.BillingInformation.Payment.NextPaymentAmount.toFixed(2);\n if (angular.isObject($eaConfig.svp) && $eaConfig.features.fastspring && ($eaConfig.feHost === 'azure-costs.de' || $eaConfig.feHost === 'costs-test-ger.applimit.de')) {\n $scope.BillingInformation.Payment.NextPaymentAmountString = $scope.BillingInformation.Payment.NextPaymentAmount.toFixed(2) + '€';\n }\n\n $scope.Teams = profile.Teams.filter(function(item) {\n return (item.Id !== 'personal');\n }).map(function(item) {\n return {\n Id: item.Id,\n Edition: $eaBilling.getDisplayTextForPlan(item.AccountPlan) + \" Edition\"\n };\n }).sort();\n\n $scope.BillingStatus = {\n AllowedToStartTrial: !$eaBilling.hasEverStartedTrial(billing),\n AllowedToChangePlan: true,\n AllowedToChangeExtraInfo: true\n };\n\n // handle the next payment due in case we are doing fastspring\n if ($scope.BillingInformation.Payment.Method === 'fastspring' && $scope.BillingInformation.Payment.NextPaymentDue) {\n var now = new Date();\n\n // set the right date\n while ($scope.BillingInformation.Payment.NextPaymentDue.getTime() < now.getTime()) {\n $scope.BillingInformation.Payment.NextPaymentDue = $acTimelineGenerator.addMonth($scope.BillingInformation.Payment.NextPaymentDue);\n }\n }\n\n $scope.updateBillingInformation = function () {\n $scope.openUpdateBillingAddressDialog($scope.BillingInformation.Extra.Info).then(function (updatedInformation) {\n $busy.during($eaBackend.dataUpdateBillingInformation(updatedInformation, session.DataToken).then(function () {\n $scope.BillingInformation.Extra.Info = updatedInformation;\n }));\n })\n };\n\n $scope.navigateToBillingPage = function() {\n if ($scope.SvpMode) {\n $state.go('authorized.profileBillingServiceProvider')\n } else {\n $state.go('authorized.profileBillingUpgradeEdition')\n }\n };\n\n // Add Back Entry\n $toolbar.addItem('billing.Back', 'Back to Reports', 'fa-chevron-left', null, true, '/signin');\n\n })\n })\n }));\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('EaBillingStartTrialCtrl', [\n '$scope', '$eaBackend', '$eaUserProfile', '$toolbar', '$busy', '$eaSession2', '$location', function ($scope, $eaBackend, $eaUserProfile, $toolbar, $busy, $eaSession2, $location) {\n\n $eaSession2.lazy().then(function(session) {\n\n return $eaUserProfile.load(session.DataToken).then(function(profile) {\n\n // start the trial\n $eaBackend.dataStartTrial('enterprise', session.DataToken).then(function() {\n\n // sign in with our current url\n $eaSession2.destroySession();\n\n // sign in and comeback\n var path = '/sso?idp=' + session.IdentityProvider + '&redirect=' + encodeURIComponent('/app/signin');\n $location.url(path);\n\n }).catch(function(error) {\n\n })\n })\n });\n }]);\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('EaBillingUpgradeEditionCtrl', function ($scope, $eaBackend, $toolbar, $busy, $eaSession2, $location, $eaBilling, $controller, $modal, $eaConfig) {\n\n $.extend(self, $controller('ModalBillingPurchaseCtrlMixin', {$scope: $scope, $modal: $modal }));\n\n $scope.annualPayment = false;\n $scope.referrer = null;\n\n $scope.editions = [\n {\n key: \"csp\",\n name: \"Service Provider\",\n fsk: null,\n fsk12: null,\n price: \"Contact us\",\n price12: \"Contact us\",\n features: [\n 'All Azure Plans (incl. EA)',\n 'Includes all Enterprise Features',\n 'Customer Dashboard',\n 'Custom SSL & Domain',\n 'Custom pricing & currency',\n 'Data access via API',\n 'Allows to resell subscriptions'\n ],\n retention: 'Unlimited',\n actionsTitle: 'Contact us',\n actionsIcon: 'fa-envelope-o'\n },\n {\n key: \"enterprise\",\n name: \"Enterprise\",\n fsk: 'acent',\n fsk12: 'acent12',\n price: \"$199/month\",\n price12: \"$1990/year\",\n features: [\n 'All Azure Plans (incl. EA)',\n 'Includes all Professional Features',\n 'Multi Contract & User Support',\n 'Team & Enterprise Support',\n 'Subscription Based Permissions',\n 'Branding & Customizable Widgets',\n 'Azure Active Directory Support',\n 'Data Access via RESTful API'\n ],\n retention: 'Unlimited',\n actionsTitle: 'Buy now',\n actionsIcon: 'fa-shopping-cart'\n },\n {\n key: \"professional\",\n name: \"Professional\",\n fsk: 'acpro',\n fsk12: 'acpro12',\n price: \"$79/month\",\n price12: \"$790/year\",\n features: [\n 'All Azure Plans (incl. EA)',\n 'Includes all Startup Features',\n 'Spending & Cost Alerts',\n 'Instant Data Sync',\n 'Smart Compare',\n 'Annual Financial Reports',\n 'Customer Sub Domain',\n 'Unlimited amount of spendings'\n ],\n retention: '24 Month',\n actionsTitle: 'Buy now',\n actionsIcon: 'fa-shopping-cart'\n },\n {\n key: \"startup\",\n fsk: 'acstu',\n fsk12: 'acstu12',\n name: \"Startup\",\n price: \"$29/month\",\n price12: \"$290/year\",\n features: [\n 'All Pay as you go / Rate Plans',\n 'Includes all Basic Features',\n 'Advanced Data Grouping',\n 'Mail Reports',\n 'Charts in Mail Reports',\n 'Trend Analytics',\n 'Smart Resource Tagging',\n 'Unlimited amount of spendings'\n ],\n retention: '12 Month',\n actionsTitle: 'Buy now',\n actionsIcon: 'fa-shopping-cart'\n },\n {\n key: \"basic\",\n name: \"Basic\",\n fsk: null,\n fsk12: null,\n price: \"free forever\",\n price12: \"free forever\",\n features: [\n 'All Azure Plans (incl. EA)',\n 'Spending Stats',\n 'Cost Analytics',\n 'Automatic Data Import',\n 'Spending Dashboards',\n 'Advanced Spending Filters',\n 'Spending Breakdown',\n 'Unlimited amount of spendings'\n ],\n retention: '2 Month',\n actionsTitle: null,\n actionsIcon: null\n }\n ];\n\n // adapt the pricing for the german cloud\n if ($eaConfig.feHost === 'azure-costs.de' || $eaConfig.feHost === 'costs-test-ger.applimit.de' || $eaConfig.feHost === 'ger.atea.services:9000') {\n // enterprise\n $scope.editions[1].fsk = 'acentde';\n $scope.editions[1].fsk12 = 'acent12de';\n $scope.editions[1].price = '199€/month';\n $scope.editions[1].price12 = '1990€/month';\n\n // professional\n $scope.editions[2].fsk = 'acprode';\n $scope.editions[2].fsk12 = 'acpro12de';\n $scope.editions[2].price = '79€/month';\n $scope.editions[2].price12 = '790€/month';\n\n // startup\n $scope.editions[3].fsk = 'acstude';\n $scope.editions[3].fsk12 = 'acstu12de';\n $scope.editions[3].price = '29€/month';\n $scope.editions[3].price12 = '290€/month';\n }\n\n\n function setCurrentPlan(billing) {\n // define the current plan\n if ($eaBilling.isInTrial(billing)) {\n $scope.currentPlan = 'basic';\n $scope.currentPlanManagement = null;\n } else {\n $scope.currentPlan = billing.CurrentPlan;\n $scope.currentPlanManagement = billing.Details;\n }\n }\n\n $busy.during($eaSession2.lazy().then(function(session) {\n return $eaBilling.loadBillingInformation(session).then(function(billing) {\n\n // set the referrer\n $scope.referrer = session.UserId;\n\n // check if we have a billing period\n if (billing.Period && billing.Period === 12) {\n $scope.annualPayment = true;\n } else {\n $scope.annualPayment = false;\n }\n\n // set the current billing information\n setCurrentPlan(billing);\n\n // offer an upgrade option\n $scope.upgradePlan = function(plan) {\n if (plan === 'csp') {\n return;\n } else {\n\n $scope.openPurchaseConfirmationDialog(plan, billing.InvoiceAddress).then(function (updatedInvoiceInformation) {\n $busy.during($eaBackend.dataUpdateBillingInformation(updatedInvoiceInformation, session.DataToken).then(function () {\n return $eaBilling.purchase(plan, session.DataToken).then(function () {\n return $eaBilling.loadBillingInformation(session).then(function (billingInfo) {\n\n // set the current plan\n setCurrentPlan(billingInfo);\n\n // override the billing info\n billing = billingInfo;\n })\n })\n })).catch(function () {\n alert(\"Something went wrong, we was unable to process your purchase request! Please try again.\");\n })\n })\n }\n };\n\n $scope.upgradeActionAllowed = function(plan) {\n return $scope.referrer && $eaBilling.isPlanHigherThanPlan(plan, $scope.currentPlan);\n };\n })\n }));\n\n // Add Back Entry\n $toolbar.addItem('billing.upgradeEditions.Back', 'Back to Billing', 'fa-chevron-left', null, true, '/billing');\n\n });\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('EaBillingServiceProviderCtrl', function ($scope, $eaBackend, $eaConfig, $toolbar) {\n\n $scope.contact = $eaConfig.svp && $eaConfig.svp.contact ? $eaConfig.svp.contact : 'help@azure-costs.com';\n\n // Add Back Entry\n $toolbar.addItem('billing.upgradeEditions.Back', 'Back to Billing', 'fa-chevron-left', null, true, '/billing');\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('ModalBillingPurchaseCtrl',\n['$scope', '$modalInstance', '$eaBilling', 'Plan', 'BillingAddress', function($scope, $modalInstance, $eaBilling, Plan, BillingAddress) {\n\n $scope.CurrentPlanDisplayText = $eaBilling.getDisplayTextForPlan(Plan);\n $scope.CurrentPlanPrice = $eaBilling.calculateCurrentPlanPrice(Plan) * 12;\n $scope.BillingAddress = BillingAddress;\n\n $scope.ok = function () {\n $modalInstance.close($scope.BillingAddress);\n };\n\n $scope.cancel = function () {\n $modalInstance.dismiss(\"cancel\")\n };\n\n}]);\n\n\n\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('ModalBillingPurchaseCtrlMixin', [ '$scope', '$modal', function($scope, $modal) {\n\n $scope.openPurchaseConfirmationDialog = function(plan, billingAddress) {\n\n var modalInstance = $modal.open({\n templateUrl: \"views/billing/modals/ea-modal-billing-purchase.html\",\n controller: 'ModalBillingPurchaseCtrl',\n resolve: {\n Plan: function() { return plan; },\n BillingAddress: function() { return billingAddress; }\n }\n });\n\n // returns a promise\n return modalInstance.result;\n };\n}]);\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('ModalBillingAddressCtrl',\n ['$scope', '$modalInstance', 'BillingAddress', function($scope, $modalInstance, BillingAddress) {\n\n $scope.BillingAddress = BillingAddress;\n\n $scope.ok = function () {\n $modalInstance.close($scope.BillingAddress);\n };\n\n $scope.cancel = function () {\n $modalInstance.dismiss(\"cancel\")\n };\n\n }]);\n\n\n\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('ModalBillingAddressCtrlMixin', [ '$scope', '$modal', function($scope, $modal) {\n\n $scope.openUpdateBillingAddressDialog = function(billingAddress) {\n\n var modalInstance = $modal.open({\n templateUrl: \"views/billing/modals/ea-modal-billing-address.html\",\n controller: 'ModalBillingAddressCtrl',\n resolve: {\n BillingAddress: function() { return billingAddress; }\n }\n });\n\n // returns a promise\n return modalInstance.result;\n };\n}]);\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('EaSSOCallbackCtrl', function ($scope, $controller, $location, $eaBucket, $eaBackend, $eaBackendDataModeSelector, $eaSession2, $state, $window, $eaConfig) {\n var self = this;\n\n // inject mixins\n $.extend(self, $controller('SessionHelperCtrlMixin', {$scope: $scope, $eaBackendDataModeSelector: $eaBackendDataModeSelector, $eaSession2: $eaSession2, $state: $state }));\n\n function isValidHttpUrl(string) {\n var url;\n\n try {\n url = new URL(string);\n } catch (_) {\n return false;\n }\n\n return url.protocol === 'http:' || url.protocol === 'https:';\n }\n\n if ($location.search().server_error) {\n $scope.message = 'Auth-Error: ' + $location.search().server_error;\n $scope.showRefreshSessionButton = true;\n } else if ($location.search().access_token) {\n $scope.message = 'Processing identity...';\n $scope.showRefreshSessionButton = false;\n\n // get the stuff\n var accessToken = $location.search().access_token;\n var state = $location.search().state;\n\n // define the correct state\n var checkState = state ? state : $location.absUrl();\n\n // check if we have actAs\n var isActAs = $location.absUrl() && ($location.absUrl().indexOf('actas=true') !== -1);\n\n // check if we have a customer domain and redirect first to the customer domain callback\n // *.azure-costs.com\n // costs.acme.com\n if (checkState.indexOf('.' + $eaConfig.feHost) !== -1 && !$location.search().final ) {\n // cut of all parameters\n var splitPoint = checkState.indexOf('?') === -1 ? checkState.length : checkState.indexOf('?');\n checkState = checkState.substring(0, splitPoint).split('/');\n state = state ? state : '';\n $window.location = checkState[0] + '//' + checkState[2] + '/app/sso/callback?final=1&access_token=' + accessToken + '&state=' + state + '&actas=' + (isActAs ? 'true' : 'false');\n return;\n }\n\n\n // Load the profile for this user (no return becuase we knoe the user exists)\n $eaBackend.dataGetProfile(accessToken).then(function (profile) {\n\n // Touch the profile as used\n return $eaBackend.dataPostProfileTouch(accessToken).then(function (touchResult) {\n\n // Generate the login session\n return $eaSession2.generateSession(profile.UserId, profile.FirstName, profile.LastName, profile.Contact, profile.Avatar, touchResult.LoginCount, touchResult.SurveyAtLogin, profile.Type, profile.LiveId, null, accessToken, (touchResult.LoginCount <= 1), isActAs).then(function () {\n\n // Redirect to final location\n if (state) {\n // verify if it's only a url\n var decodedUri = decodeURIComponent(state);\n if (!isValidHttpUrl(decodedUri)) {\n $location.url('/signin');\n } else {\n $window.location = decodedUri;\n }\n } else {\n $location.url('/signin');\n }\n });\n });\n }).catch(function () {\n $scope.message = 'Something went wrong, please try again';\n $scope.showRefreshSessionButton = true;\n });\n } else {\n $scope.message = 'Something went wrong, please retry';\n $scope.showRefreshSessionButton = true;\n }\n\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('AcCspInitCtrl', function ($scope, $eaCspService, $eaCurrentSession, $state, $busy) {\n\n $scope.enrollmentMode = false;\n $scope.Profiles = [];\n $scope.OtherProfiles = [];\n\n $scope.enroll = function() {\n var callbackUrl = $state.href('authorized.cspinit', {}, {absolute: true});\n $busy.during($eaCspService.enroll($eaCurrentSession, callbackUrl));\n };\n\n // load the csp profile\n return $eaCspService.loadProfiles($eaCurrentSession).then(function(cspProfiles) {\n\n // if we have no profile go to the enrollment page\n if(cspProfiles == null ||cspProfiles.length === 0) {\n $scope.enrollmentMode = true;\n // if we have just one profile visit it\n } else if (cspProfiles && cspProfiles.length === 1) {\n // visit the profile\n $state.go('authorized.csp.accounts', { resellerId: cspProfiles[0].Id})\n } else {\n // allow to select\n $scope.Profiles = cspProfiles;\n }\n })\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('AcCspCtrl', function ($scope, $eaCspService, $eaCurrentSession, $stateParams) {\n\n // the scope\n $scope.Profile = undefined;\n\n // load the csp profile\n return $eaCspService.loadProfileById($stateParams.resellerId, $eaCurrentSession).then(function(cspProfile) {\n\n // set the profile\n $scope.Profile = cspProfile;\n })\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('AcCspAccountsCtrl', function ($scope, $state, $eaCspService, $eaCurrentSession, $busy, $q, $controller, $modal, $toolbar, $eaBackendDataModeSelector, $eaSession2, $eaWidgetDashboardManager, ngToast, $eaBackend, $eaBackendAzureV2, $timeout, $window, $stateParams, $acTimelineGenerator, $eaWidgetRepository) {\n\n $.extend(self, $controller('SessionHelperCtrlMixin', {$scope: $scope, $eaBackendDataModeSelector: $eaBackendDataModeSelector, $eaSession2: $eaSession2, $state: $state }));\n $.extend(self, $controller('ModalObjectPickerCtrlMixin', {$scope: $scope, $modal: $modal }));\n $.extend(self, $controller('CspUpdateT1AccountCtrlMixin', {$scope: $scope, $modal: $modal}));\n $.extend(self, $controller('CspUpdateEAAccountCtrlMixin', {$scope: $scope, $modal: $modal}));\n $.extend(self, $controller('CspUpdateAWSAccountCtrlMixin', {$scope: $scope, $modal: $modal}));\n $.extend(self, $controller('CspChooseCustomerCtrlMixin', {$scope: $scope, $modal: $modal, $controller: $controller, $q: $q}));\n $.extend(self, $controller('CspDefineResellerMarginCtrlMixin', {$scope: $scope, $modal: $modal}));\n $.extend(self, $controller('CspDefineResellerFilterCtrlMixin', {$scope: $scope, $modal: $modal}));\n $.extend(self, $controller('CspDownloadPriceSheetCtrlMixin', {$scope: $scope, $modal: $modal}));\n $.extend(self, $controller('CspRegisterCustomerCtrlMixin', {$scope: $scope, $modal: $modal}));\n $.extend(self, $controller('CspRegisterCustomerCostMgntCtrlMixin', {$scope: $scope, $modal: $modal}));\n $.extend(self, $controller('CspDefineResellerFeaturesCtrlMixin', {$scope: $scope, $modal: $modal}));\n\n $scope.ShowUI = false;\n\n $scope.dashboards = [];\n $scope.dashboardsMap = {};\n $scope.dashboardEditMode = false;\n $scope.dashboardsOrdered = [];\n $scope.activeDashboard = null;\n $scope.selectDropDownData = { selected: null};\n\n $scope.dataToken = $eaCurrentSession.DataToken;\n\n // set default to v2\n if (!$stateParams.version) {\n $stateParams.version = 'v2';\n }\n\n $scope.toggelEditMode = function() {\n $scope.dashboardEditMode = !$scope.dashboardEditMode;\n };\n\n // update the navbar menu\n $scope.updateControllerNavBarMenu = function() {\n\n var elementsToRemove = ['csp.analytics', 'csp.importCustomers', 'csp.generalSettings.triggerSync', 'csp.generalSettings.openSettings', 'csp.switchToGsi'];\n\n elementsToRemove.forEach(function(elementToRemove) {\n\n // ensure the version switcher does not exists\n var versionSwitcherItemIndex = -1;\n for(var itemsIndex = 0; itemsIndex < $toolbar.items.length; itemsIndex++) {\n if ($toolbar.items[itemsIndex].tag === elementToRemove) {\n versionSwitcherItemIndex = itemsIndex;\n }\n }\n\n if (versionSwitcherItemIndex !== -1) {\n $toolbar.items.splice(versionSwitcherItemIndex, 1);\n }\n });\n\n // Add gsi button\n if ($scope.activeDashboard && $scope.activeDashboard.Id !== 'csp.welcome') {\n $toolbar.addItem('csp.switchToGsi', 'System Integrator Portal', 'fa-globe', 'Visit the portal for Gloabl System Integrators', true, function () {\n $state.go('authorized.csp.gsi', {resellerId: $stateParams.resellerId});\n });\n };\n\n // Add Contract\n $toolbar.addItem('csp.addAccount', 'Add', 'fa-plus', \"Adds an additional CSP account\", true, $scope.addAccount);\n\n // Add Contract\n if ($scope.activeDashboard && $scope.activeDashboard.AccountModel && $scope.activeDashboard.AccountModel.TierLevel !== 'EA' && $scope.activeDashboard.AccountModel.TierLevel !== 'AWS' && $scope.activeDashboard.AccountModel.SyncCustomers === true) {\n $toolbar.addItem('csp.importCustomers', 'Import', 'fa-exchange', \"Imports not activated customer\", true, $scope.syncCustomers);\n } else if ($scope.activeDashboard && $scope.activeDashboard.AccountModel && $scope.activeDashboard.AccountModel.TierLevel !== 'EA' && $scope.activeDashboard.AccountModel.TierLevel !== 'AWS' && $scope.activeDashboard.AccountModel.TierLevel !== 'T1N') {\n $toolbar.addItem('csp.importCustomers', 'Register Customer', 'fa-user-plus', \"Registers a new customer\", true, $scope.registerCustomers);\n }\n\n // Only add the settings dialog when not T1N\n if ($scope.activeDashboard && $scope.activeDashboard.AccountModel && $scope.activeDashboard.AccountModel.TierLevel !== 'T1N') {\n\n // Open the Settings dialog\n $toolbar.addItem('csp.generalSettings', 'Settings', 'fa-cogs', null, true, null);\n\n // Open the contract settings dialog\n if ($scope.activeDashboard && $scope.activeDashboard.Id !== 'csp.welcome') {\n $toolbar.addItem('csp.generalSettings.openSettings', 'General', 'fa-cog', \"Allows to edit the CSP account\", true, $scope.openEditCspAccountDialog, null, 'csp.generalSettings');\n }\n\n // Open the reseller management\n $toolbar.addItem('csp.generalSeetings.openResellermanagement', 'Manage Resellers', 'fa-building-o', 'Allows to manage resellers', true, $scope.openResellers, null, 'csp.generalSettings');\n\n // Open the virtual meters\n $toolbar.addItem('csp.generalSeetings.openVirtualMeters', 'Virtual Meters', 'fa-id-card', 'Allows to manage virtual meters', true, $scope.openVirtualMeters, null, 'csp.generalSettings');\n }\n\n // Currently only available for EA & AWS contracts\n if ($scope.activeDashboard && $scope.activeDashboard.AccountModel && ($scope.activeDashboard.AccountModel.TierLevel === 'EA' || $scope.activeDashboard.AccountModel.TierLevel === 'AWS')) {\n\n // Open the customer segmentation meters\n $toolbar.addItem('csp.generalSeetings.openCustomerSegmentation', 'Segmentation', 'fa-user-md', 'Allows to manage customer segements', true, $scope.openCustomerSegmentation, null, 'csp.generalSettings');\n\n // Open the contract settings dialog\n $toolbar.addItem('csp.generalSettings.triggerSync', 'Trigger Sync', 'fa-random', \"Start synchronization with the Microsoft EA portal\", true, $scope.startMonthSync, null, 'csp.generalSettings');\n } else if ($scope.activeDashboard && $scope.activeDashboard.AccountModel && $scope.activeDashboard.AccountModel.TierLevel === 'T1') {\n // Open the contract settings dialog\n $toolbar.addItem('csp.generalSettings.triggerSync', 'Sync Azure Plan', 'fa-random', \"Start synchronization for all Azure Plan Customers\", true, $scope.startMonthSync, null, 'csp.generalSettings');\n }\n\n // Open Uplift Categoris\n $toolbar.addItem('csp.generalSeetings.openUpliftCategories', 'Uplift Categories', 'fa-credit-card', 'Allows to manage uplift categories', true, $scope.openUpliftCategories, null, 'csp.generalSettings');\n\n // Currently only available for EA contracts\n if ($scope.activeDashboard && $scope.activeDashboard.AccountModel && $scope.activeDashboard.AccountModel.TierLevel === 'EA') {\n\n // Open the Analytics Sub-Menu\n $toolbar.addItem('csp.analytics', 'Analytics', 'fa-lightbulb-o', null, true, null);\n\n $toolbar.addItem('csp.analytics.pricecomparisions', 'Price Sheet', 'fa-money', \"Allows to download the price comparision sheet\", true, $scope.openDownloadPriceSheetDialog, null, 'csp.analytics');\n }\n\n // Reload operation\n $toolbar.addItem('csp.performReload', 'Reload', 'fa-refresh', \"Current data will be refreshed\", true, $scope.reloadData);\n };\n\n $scope.startAddCustomWidget = function() {\n $eaWidgetRepository.showRepository();\n };\n\n $scope.selectDashboardFromDropDown = function() {\n $scope.selectDashboard($scope.selectDropDownData.selected);\n };\n\n $scope.selectDashboard = function(dashboard) {\n\n // deactivate teh old one\n if ($scope.activeDashboard !== null) {\n $scope.activeDashboard.Active = false;\n }\n\n // handel billing cycle\n if (dashboard.AccountModel && $eaBackendDataModeSelector.isBillingCycleEnabled())\n {\n $eaBackendDataModeSelector.enableBillingCycle(true, dashboard.AccountModel.BillingDay);\n }\n\n // activate the new dashboard\n $scope.activeDashboard = dashboard;\n $scope.activeDashboard.Active = true;\n $scope.selectDropDownData.selected = $scope.activeDashboard;\n\n // update the url\n $state.transitionTo('authorized.csp.accounts', {resellerId: $stateParams.resellerId, active: dashboard.Id, version: $stateParams.version ? $stateParams.version: 'v1'}, {\n location: true,\n inherit: true,\n relative: $state.$current,\n notify: false\n });\n\n // update navbar\n $scope.updateControllerNavBarMenu();\n };\n\n $scope.refreshScreen = function() {\n $state.go($state.current.name, { initial: null }, {reload: true});\n };\n\n $scope.startMonthSync = function() {\n\n // preselect the current month\n var currentMonth = (new Date()).currentMonthDefinition();\n\n // description\n var description = 'Please select all months you want to re-sync. Azure Costs will override all ' +\n 'existing information for this month and downloads the spending data freshly ' +\n 'from Microsoft:';\n\n // report timeline\n var reportStrings = $acTimelineGenerator.createMonthList(24, $acTimelineGenerator.addMonth(new Date(), -23));\n\n // show the month selector\n return $scope.openObjectPickerDialog('Select month to sync', description, 'fa-calendar-o', undefined, undefined, reportStrings.sortSimple().reverse(), [currentMonth], false).then(function (selectedMonthes) {\n\n // notify the user\n ngToast.create({\n className: 'success',\n content: 'Great! A new sync for your contract ' + $scope.activeDashboard.Name + ' is started. This can take a couple seconds or minutes. If you don\\'t see new reports after more than 15 minutes give us a note.'\n });\n\n // schedule the syncs\n selectedMonthes.forEach(function (month) {\n\n // start the sync\n $eaBackendAzureV2.dataCspMonthSyncReportsV2($scope.activeDashboard.Team, $scope.activeDashboard.AccountModel.AccountId, month, $eaCurrentSession.DataToken).catch(function (e) {\n\n // notify regarding error\n ngToast.create({\n className: 'danger',\n content: 'Error! Failed to process the synchronisation request of month ' + month + ' - Error: ' + e\n });\n\n });\n })\n });\n };\n\n $scope.reloadData = function () {\n if ($scope.activeDashboard && $scope.activeDashboard.Id === 'csp.welcome') {\n $scope.refreshScreen();\n } else if ($scope.activeDashboard) {\n $eaWidgetDashboardManager.reload($scope.activeDashboard.Id);\n }\n };\n\n // allow to reload the data\n function loadDashboards(cspTeamProfile) {\n\n // load the different accounts\n return $eaCspService.loadAccounts(cspTeamProfile, $eaCurrentSession).then(function(cspAccounts) {\n\n // check if we have no accounts\n if (!cspAccounts || cspAccounts.length === 0) {\n\n // generate the collection name\n var collectionName = ($stateParams.version && $stateParams.version == 'v2') ? 'csp.v2' : 'csp';\n\n // register our welcome dashboard\n $scope.dashboards.push({\n Id: 'csp.welcome',\n Name: 'Welcome',\n Profile: cspTeamProfile,\n Team: cspTeamProfile.Id,\n ContractId: 'CSP:Welcome',\n Active: false,\n Collection: collectionName\n });\n\n // Action: Add account\n $eaWidgetDashboardManager.onDashboardFunction('csp.welcome', 'func:2A4B35B3-63A1-4B36-A5A2-FE1510CDFA16', function (args) {\n $scope.addAccount();\n $eaWidgetDashboardManager.finishDashboardFunction('csp.welcome', args, null, null);\n });\n\n $scope.activeDashboard = $scope.dashboards[0];\n $scope.activeDashboard.Active = true;\n } else {\n\n // generate the dasboard items\n cspAccounts.forEach(function (account) {\n\n // define the collection prefix\n var collectionPrefix = 'csp';\n if (account.TierLevel === 'T2') {\n collectionPrefix = collectionPrefix + '.t2';\n }\n\n // generate the collection name\n var collectionName = collectionPrefix + (($stateParams.version && $stateParams.version == 'v2') ? '.v2' : '');\n if (account.TierLevel === 'EA' || account.TierLevel === 'AWS') {\n collectionName = 'csp.ea.v2';\n }\n\n // define the dashbaord id\n var dashboardId = account.AccountId;\n\n // create a dashboard\n var dashboardItem = {\n Id: dashboardId,\n Name: account.Name && account.Name.length > 0 ? account.Name : account.Domain,\n AccountModel: account,\n Profile: cspTeamProfile,\n Team: cspTeamProfile.Id,\n ContractId: 'CSP:' + account.AccountId,\n Active: false,\n Collection: collectionName,\n Layout: 'v3-tp02',\n BillingDay: account.BillingDay\n };\n\n $scope.dashboards.push(dashboardItem);\n $scope.dashboardsMap[dashboardItem.Id] = dashboardItem;\n\n // Action: Activate a specific customer\n $eaWidgetDashboardManager.onDashboardFunction(dashboardId, 'func:6D39C9DF-8227-43A2-B1A5-E3AB4E9085C5', function (args) {\n\n $eaCspService.activateCustomer(cspTeamProfile.Id, args.args.AccountId, args.args.CustomerId, $eaCurrentSession).then(function () {\n\n $scope.reloadData(cspTeamProfile);\n\n ngToast.create({\n className: 'success',\n content: 'Great! Customer ' + args.args.CustomerCompany + ' is activated. The initial data sync could take a couple seconds or minutes. If you don\\'t see spending data after more than 15 minutes give us a note.'\n });\n\n $eaWidgetDashboardManager.finishDashboardFunction(dashboardId, args, null, null);\n }).catch(function (error) {\n $eaWidgetDashboardManager.finishDashboardFunction(dashboardId, args, null, error);\n })\n });\n\n // Action: De-Activate a specific customer\n $eaWidgetDashboardManager.onDashboardFunction(dashboardId, 'func:4A3A4453-D7BF-4DBA-B32B-5F2252750C1F', function (args) {\n\n var removeConfirmed = confirm('Do you really want to de-activate this customer?\\n\\n!!! Attention: All data of this customer will be removed and the users can\\'t access to the dashboard anymore !!!');\n\n if (removeConfirmed) {\n $eaCspService.deActivateCustomer(cspTeamProfile.Id, args.args.AccountId, args.args.CustomerId, $eaCurrentSession).then(function () {\n\n $scope.reloadData(cspTeamProfile);\n\n ngToast.create({\n className: 'success',\n content: 'Ok! Customer ' + args.args.CustomerCompany + ' is de-activated. It could take up to 24hrs until all data are wiped out from the dashboards!'\n });\n\n $eaWidgetDashboardManager.finishDashboardFunction(dashboardId, args, null, null);\n }).catch(function (error) {\n $eaWidgetDashboardManager.finishDashboardFunction(dashboardId, args, null, error);\n })\n } else {\n $eaWidgetDashboardManager.finishDashboardFunction(dashboardId, args, null, null);\n }\n });\n\n // Action: Sync a specific customer\n $eaWidgetDashboardManager.onDashboardFunction(dashboardId, 'func:118D6857-5B03-4424-9D51-25D88420BA4C', function (args) {\n\n // get all active customers\n return $eaCspService.getActiveCustomers($scope.activeDashboard.Profile, $scope.activeDashboard.AccountModel, $eaCurrentSession).then(function (loadedCustomers) {\n\n // map the customer data\n var customers = loadedCustomers\n .map(function (c) {\n return {\n AccountId: $scope.activeDashboard.AccountModel.AccountId || $scope.activeDashboard.AccountModel.accountId,\n CustomerId: c.MicrosoftCustomerId || c.microsoftCustomerId,\n CustomerName: c.CustomerCompany || c.customerCompany,\n NewCommerce: c.newCommerce || false\n }\n }).filter(function(c) {\n return !c.NewCommerce && c.CustomerName.toLowerCase() !== 'default';\n });\n\n // show the object selector for customers and ask for which customer we should start the sync. Multiple\n // customers are possible\n $scope.openCustomerChooser(customers).then(function (selectedCustomers) {\n\n // trigger per customer the sync\n selectedCustomers.forEach(function (customer) {\n $eaBackend.dataCspSyncCustomerInAccount(cspTeamProfile.Id, customer.AccountId, customer.CustomerId, args.args.period, $eaCurrentSession.DataToken).then(function () {\n ngToast.create({\n className: 'success',\n content: 'Great! Data Sync for the customer ' + customer.CustomerName + ' is started. This can take a couple seconds or minutes. If you don\\'t see new customers after more than 15 minutes give us a note.'\n });\n })\n });\n\n // we are done with this action\n $eaWidgetDashboardManager.finishDashboardFunction(dashboardId, args, null, null);\n })\n });\n });\n\n // Action: Sync a specific customer\n $eaWidgetDashboardManager.onDashboardFunction(dashboardId, 'func:DCF83D44-3537-43C9-8CCB-8874008A29A0', function (args) {\n\n var customer = {\n AccountId: args.args.AccountId,\n CustomerId: args.args.CustomerId,\n CustomerName: args.args.CustomerCompany\n };\n\n $eaBackend.dataCspSyncCustomerInAccount(cspTeamProfile.Id, customer.AccountId, customer.CustomerId, null, $eaCurrentSession.DataToken).then(function () {\n\n ngToast.create({\n className: 'success',\n content: 'Great! Data Sync for the customer ' + customer.CustomerName + ' is started. This can take a couple seconds or minutes. If you don\\'t see new customers after more than 15 minutes give us a note.'\n });\n\n // we are done with this action\n $eaWidgetDashboardManager.finishDashboardFunction(dashboardId, args, null, null);\n });\n });\n\n // Open Customer Margin\n function openCustomerMargin(cspTeamId, cspAccountId, cspCustomerId) {\n\n // load the uplift categories\n return $eaBackend.dataCspGetUpliftCategories(cspTeamId, $eaCurrentSession.DataToken).then(function(upliftCategories) {\n\n // load the margins\n return $eaBackend.dataCspGetResellerMarginForCustomer(cspTeamId, cspAccountId, cspCustomerId, $eaCurrentSession.DataToken).then(function (resellerMargins) {\n\n // show the dialog\n return $scope.openCspDefineResellerMarginDialog(resellerMargins, upliftCategories).then(function (updatedMargins) {\n\n // save the margins\n return $eaBackend.dataCspSetResellerMarginForCustomer(cspTeamId, cspAccountId, cspCustomerId, updatedMargins, $eaCurrentSession.DataToken).then(function () {\n\n ngToast.create({\n className: 'success',\n content: 'Great! Margin was updated correctly'\n });\n\n });\n });\n });\n });\n }\n\n // Action: Define reseller margins\n $eaWidgetDashboardManager.onDashboardFunction(dashboardId, 'func:28A17E4C-960F-4D79-AD31-B6BBC9B7CFF0', function (args) {\n return openCustomerMargin(cspTeamProfile.Id, $scope.activeDashboard.AccountModel.AccountId, args.args.PrimaryGroupId).then(function () {\n $eaWidgetDashboardManager.finishDashboardFunction(dashboardId, args, null, null);\n });\n });\n\n // Action: Define reseller filter\n $eaWidgetDashboardManager.onDashboardFunction(dashboardId, 'func:4A5811F8-8BA7-484F-9D18-138E4E2F3786', function (args) {\n\n // load the current reseller filter\n return $eaBackend.dataCspGetResellerFilterForCustomer(cspTeamProfile.Id, $scope.activeDashboard.AccountModel.AccountId, args.args.PrimaryGroupId, $eaCurrentSession.DataToken).then(function (existingFilter) {\n\n // show the dialog\n return $scope.openCspDefineResellerFilterDialog(existingFilter).then(function (updatedFilter) {\n\n // save the filter\n return $eaBackend.dataCspSetResellerFilterForCustomer(cspTeamProfile.Id, $scope.activeDashboard.AccountModel.AccountId, args.args.PrimaryGroupId, updatedFilter, $eaCurrentSession.DataToken).then(function () {\n\n ngToast.create({\n className: 'success',\n content: 'Great! Filter was updated correctly'\n });\n\n // we are done with this action\n $eaWidgetDashboardManager.finishDashboardFunction(dashboardId, args, null, null);\n });\n });\n });\n });\n\n // Action: Trigger V-Meter Update\n $eaWidgetDashboardManager.onDashboardFunction(dashboardId, 'func:632E41FF-BE9B-4793-B22B-B71EC997FEE1', function (args) {\n\n // get the month\n var currentMonth = undefined;\n if (args.args.ServiceItems && args.args.ServiceItems.length > 0) {\n currentMonth = args.args.ServiceItems[0].ReportId;\n }\n\n $eaBackend.dataCspUpdateVirtualMetersForCustomerInAccount(cspTeamProfile.Id, $scope.activeDashboard.AccountModel.AccountId, args.args.PrimaryGroupId, currentMonth, $eaCurrentSession.DataToken).then(function () {\n\n ngToast.create({\n className: 'success',\n content: 'Great! Update of virtual service meters for customer ' + args.args.PrimaryGroupName + ' triggered. You will receive an e-mail as soon as your request was processed. It should not take longer than 15 minutes.'\n });\n\n $eaWidgetDashboardManager.finishDashboardFunction(dashboardId, args, null, null);\n }).catch(function (error) {\n $eaWidgetDashboardManager.finishDashboardFunction(dashboardId, args, null, error);\n })\n });\n\n function openCustomerPortal(dashboardId, args, extractedTeamId, noMargin, forceV2) {\n\n // update our login sessiong with a new delegation token\n return $eaSession2.updateTokenFromSTS($eaCurrentSession, {delegate: extractedTeamId}).then(function () {\n\n // read the billing cycle\n var cycle = $eaBackendDataModeSelector.isBillingCycleEnabled() ? 'billing' : 'monthly';\n\n // build the url\n var url = '/app/teams/' + extractedTeamId + '/dashboards?cycle=' + cycle;\n if (noMargin) {\n url += '&nomargin=true';\n }\n\n if ($scope.activeDashboard && $scope.activeDashboard.AccountModel && ($scope.activeDashboard.AccountModel.TierLevel === 'EA' || $scope.activeDashboard.AccountModel.TierLevel === 'AWS')) {\n url += '&version=v2';\n } else if ($stateParams.version === 'v2') {\n url += '&version=v2';\n } else if (forceV2) {\n url += '&version=v2';\n } else {\n url += '&version=v1';\n }\n\n // open new window with the url\n $window.open(url, '_blank');\n\n // we are done with this action\n return $eaWidgetDashboardManager.finishDashboardFunction(dashboardId, args, null, null);\n }).catch(function () {\n\n ngToast.create({\n className: 'danger',\n content: 'Permission Denied! You have no access permissions to open the customer dashboard.'\n });\n\n // we are done with this action\n return $eaWidgetDashboardManager.finishDashboardFunction(dashboardId, args, null, null);\n })\n }\n\n function openContainers(customerId)\n {\n var targetUri = '/app2/teams/' + $stateParams.resellerId + '/apps/accounts/' + $stateParams.active + '/customers/' + customerId + '/containers';\n console.log('Target-Uri is: ' + targetUri);\n $window.location.href = targetUri;\n };\n\n // Action: Open Customer Portal from Action Panel\n $eaWidgetDashboardManager.onDashboardFunction(dashboardId, 'func:4452C3F9-6FCB-4749-A1FE-DA7FD77FBB5C', function (args) {\n return openCustomerPortal(dashboardId, args, args.args.CustomerTeamId ? args.args.CustomerTeamId : args.args.CustomerId, false, true);\n });\n\n // Open container Management\n $eaWidgetDashboardManager.onDashboardFunction(dashboardId, 'func:B94A8FEE-4EA6-42E5-8F8B-EBC601A06954', function (args) {\n openContainers(args.args.CustomerId); \n $eaWidgetDashboardManager.finishDashboardFunction(dashboardId, args, null, null); \n \n });\n \n // Action: Define Reseller Margin from Action Panel\n $eaWidgetDashboardManager.onDashboardFunction(dashboardId, 'func:A40E5CC6-A6CC-4094-BD27-AE6E166048D3', function (args) {\n return openCustomerMargin(cspTeamProfile.Id, $scope.activeDashboard.AccountModel.AccountId, args.args.CustomerId).then(function () {\n $eaWidgetDashboardManager.finishDashboardFunction(dashboardId, args, null, null);\n }); \n }); \n\n // Action: Open Customer Portal\n $eaWidgetDashboardManager.onDashboardFunction(dashboardId, 'func:2929E37C-B3D7-483C-9BF9-4BFCA5D9C92D', function (args) {\n return openCustomerPortal(dashboardId, args, args.args.TeamId, args.args.NoMargin, args.args.ForceV2);\n });\n\n // Toggle Reseller Version\n $eaWidgetDashboardManager.onDashboardFunction(dashboardId, 'func:9148E92E-6C1C-4846-BE9C-A8A5F9417AB5', function (args) {\n\n // confirm\n var upgradeConfirm = confirm('Do you really want to upgrade the processing engine of this customer?\\n\\n!!! Attention: This step is not reversable !!!');\n if (!upgradeConfirm) { return $eaWidgetDashboardManager.finishDashboardFunction(dashboardId, args, null, null); }\n\n // upgrade\n return $eaBackend.dataCspUpgradeResellerVersionForCustomer(cspTeamProfile.Id, $scope.activeDashboard.AccountModel.AccountId, args.args.PrimaryGroupId, $eaCurrentSession.DataToken).then(function() {\n\n ngToast.create({\n className: 'success',\n content: 'Greate! The customer was upgrade, please refresh this page.'\n });\n\n }).catch(function() {\n\n ngToast.create({\n className: 'danger',\n content: 'Version Upgrade Failed! Something went wrong, please try again later.'\n });\n\n });\n\n });\n\n $eaWidgetDashboardManager.onDashboardFunction(dashboardId, 'func:FD48824C-1DAE-4787-987C-56A2BF0896BA', function (args) {\n var enabledState = $eaBackendDataModeSelector.isBillingCycleEnabled() ? 'BillingCycle' : 'Default';\n return $eaWidgetDashboardManager.finishDashboardFunction(dashboardId, args, enabledState, null);\n });\n\n $eaWidgetDashboardManager.onDashboardFunction(dashboardId, 'func:408B9A2F-6BDE-447D-A794-26957C719D37', function (args) {\n if (args.args.state === 'BillingCycle') {\n $eaBackendDataModeSelector.enableBillingCycle(true, account.BillingDay);\n } else {\n $eaBackendDataModeSelector.enableBillingCycle(false, 1);\n }\n\n return $eaWidgetDashboardManager.finishDashboardFunction(dashboardId, args, true, null);\n });\n\n\n $eaWidgetDashboardManager.onDashboardFunction(dashboardId, 'func:3D116683-B590-4199-8C70-83E0327616FD', function (args) {\n $state.go('authorized.reportAdd.step01-csp', {\n team: account.TeamId,\n currency: account.Currency,\n accountid: account.AccountId\n });\n return $eaWidgetDashboardManager.finishDashboardFunction(dashboardId, args, true, null);\n });\n\n $eaWidgetDashboardManager.onDashboardFunction(dashboardId, 'func:2DD4B2BC-983F-434B-B449-7A655AEE2D23', function (args) {\n\n var hintText = '';\n var periodDate = new Date(args.args.selectedPeriod);\n\n if ($eaBackendDataModeSelector.isBillingCycleEnabled()) {\n var billingDay = $eaBackendDataModeSelector.getBillingCycleDay();\n if (billingDay !== 1) {\n periodDate = $acTimelineGenerator.addMonth($acTimelineGenerator.addDay(periodDate, billingDay - 1), -1);\n }\n }\n\n if (periodDate > new Date()) {\n hintText = \"No consumption data available because period between \" + periodDate.toDateString() + \" - \" + $acTimelineGenerator.addDay($acTimelineGenerator.addMonth(periodDate), -1).toDateString() + \" not started yet\";\n } else {\n hintText = \"Consumption between \" + periodDate.toDateString() + \" - \" + $acTimelineGenerator.addDay($acTimelineGenerator.addMonth(periodDate), -1).toDateString() + \"\";\n }\n\n return $eaWidgetDashboardManager.finishDashboardFunction(dashboardId, args, hintText, null);\n });\n\n // Publish to Reseller\n function publishCustomerToReseller(dashboardId, args, teamId, accountId, customerId) {\n\n // load all CSP Resellers\n return $eaBackend.dataGetCspResellers($scope.Profile.Id, $eaCurrentSession.DataToken).then(function (cspResellers) {\n\n // Open the Publish to Reseller Dialog\n var description = 'Please select a reseller your would like to publish the customer to';\n return $scope.openObjectPickerDialog('Select Reseller', description, 'fa-taxi', function (model) {\n return model.resellerName;\n }, function (model) {\n return model.resellerId;\n }, cspResellers, [], true).then(function (selectedReseller) {\n\n if (selectedReseller) {\n\n // Publish the customer to reseller\n return $eaBackend.dataPublishCspCustomer(teamId, selectedReseller.resellerId, accountId, customerId, $eaCurrentSession.DataToken).then(function () {\n\n // show\n ngToast.create({\n className: 'success',\n content: 'Great! The customer is published to the reseller!'\n });\n\n // we are done with this action\n return $eaWidgetDashboardManager.finishDashboardFunction(dashboardId, args, null, null);\n });\n }\n });\n });\n }\n\n // Publish to Reseller from Grid\n $eaWidgetDashboardManager.onDashboardFunction(dashboardId, 'func:55E8F243-E782-426C-825B-70E4C484846A', function (args) {\n return publishCustomerToReseller(dashboardId, args, cspTeamProfile.Id, $scope.activeDashboard.AccountModel.AccountId, args.args.PrimaryGroupId);\n });\n\n // Publish to Reseller from Actions Panel\n $eaWidgetDashboardManager.onDashboardFunction(dashboardId, 'func:CAD64FD1-CDAF-47A5-98FB-34E6E8CBF177', function (args) {\n return publishCustomerToReseller(dashboardId, args, cspTeamProfile.Id, $scope.activeDashboard.AccountModel.AccountId, args.args.CustomerId);\n });\n\n // Download Invoice\n $eaWidgetDashboardManager.onDashboardFunction(dashboardId, 'func:099FBA0F-6CFC-403F-B104-011BD8CE65AB', function (args) {\n\n // check\n var billingDate = new Date(args.args.period + '-' + ($scope.activeDashboard.AccountModel.BillingDay + 1));\n if (!(new Date() >= billingDate)) {\n // show\n ngToast.create({\n className: 'danger',\n content: 'Error! The invoice is not available right now, please try again later!'\n });\n\n // done\n return $eaWidgetDashboardManager.finishDashboardFunction(dashboardId, args, true, null);\n } else {\n // load the data\n $eaBackend.dataGetCspDownloadAccountInvoice(cspTeamProfile.Id, $scope.activeDashboard.AccountModel.AccountId, args.args.period, $eaCurrentSession.DataToken).then(function (downloadUri) {\n\n // redirect in a new tab to the file\n window.open(downloadUri + '&svp=' + $eaCurrentSession.getServiceProviderId(), 'download');\n\n // done\n return $eaWidgetDashboardManager.finishDashboardFunction(dashboardId, args, true, null);\n });\n }\n });\n\n // Open Customer Settings\n $eaWidgetDashboardManager.onDashboardFunction(dashboardId, 'func:EE74EAF3-E461-4A11-9E29-F9A9069799D1', function (args) {\n\n var customerId = args.args.PrimaryGroupId;\n if (!customerId)\n customerId = args.args.CustomerId;\n\n // load the margins\n return $eaBackend.dataCspGetResellerFeaturesForCustomer(cspTeamProfile.Id, $scope.activeDashboard.AccountModel.AccountId, customerId, $eaCurrentSession.DataToken).then(function (features) {\n\n var customer = {};\n if (args.args.ServiceItems && args.args.ServiceItems.length > 0) {\n customer = args.args.ServiceItems[0];\n } else {\n customer = args.args;\n }\n\n // show the dialog\n return $scope.openCspDefineResellerFeaturesDialog(features, customer, $scope.activeDashboard.AccountModel).then(function (updatedFeatures) {\n\n // save the margins\n return $eaBackend.dataCspSetResellerFeaturesForCustomer(cspTeamProfile.Id, $scope.activeDashboard.AccountModel.AccountId, customerId, updatedFeatures, $eaCurrentSession.DataToken).then(function () {\n\n // show\n ngToast.create({\n className: 'success',\n content: 'Great! New features are activated, it could take up to 24hrs until new data are visible!'\n });\n\n // done\n return $eaWidgetDashboardManager.finishDashboardFunction(dashboardId, args, true, null);\n });\n });\n });\n });\n });\n\n // build the ordered dashboards collection\n $scope.dashboardsOrdered = [];\n $scope.dashboardsOrdered.appendArray($scope.dashboards);\n $scope.dashboardsOrdered.sortOn('Name');\n }\n\n // mark the first dashboard as active\n if ($scope.dashboards.length > 0) {\n\n // reads the dashboard from last used dashboard\n var targetDashboard = $scope.dashboards[0];\n\n // check if we need to override this via active parameter\n if ($stateParams.active) { targetDashboard = $scope.dashboardsMap[$stateParams.active]; }\n\n // use the fallback\n if (!targetDashboard) { targetDashboard = $scope.dashboards[0]; }\n\n // activate our targetdashboard\n $scope.selectDashboard(targetDashboard);\n\n }\n\n // cache the accounts\n $scope.Accounts = cspAccounts;\n\n });\n }\n\n // load the accounts\n return loadDashboards($scope.Profile).then(function() {\n\n $scope.addAccount = function() {\n $state.go('authorized.csp.wadd', {resellerId: $stateParams.resellerId});\n };\n\n $scope.openEditCspAccountDialog = function() {\n\n // load the account including all secrets\n $eaCspService.loadAccount($scope.activeDashboard.Profile, $scope.activeDashboard.AccountModel.AccountId, $eaCurrentSession).then(function(loadedAccount) {\n\n // open the dialog\n var dialogPromise;\n\n if (loadedAccount.TierLevel && loadedAccount.TierLevel === 'EA') {\n dialogPromise = $scope.openCspUpdateEAAccountDialog(loadedAccount);\n } else if (loadedAccount.TierLevel && loadedAccount.TierLevel === 'AWS') {\n dialogPromise = $scope.openCspUpdateAWSAccountDialog(loadedAccount);\n } else {\n dialogPromise = $scope.openCspUpdateT1AccountDialog(loadedAccount);\n }\n\n // wait for finishing\n return dialogPromise.then(function (updatedAccountModel) {\n\n var actionPromise = $q.when();\n // check if we need to remove the account\n if (updatedAccountModel.action === 'remove') {\n actionPromise = $eaCspService.deleteAccount($scope.activeDashboard.Profile, loadedAccount, $eaCurrentSession).then(function () {\n $scope.refreshScreen();\n });\n } else if (updatedAccountModel.action === 'consent') {\n // generate the constent link\n actionPromise = $eaBackendAzureV2.dataCpvGetConsentLink(loadedAccount.TeamId, loadedAccount.AccountId, $eaCurrentSession.DataToken).then(function(result) {\n if (result && result.consentUrl) {\n // Redirect\n $window.open(result.consentUrl,'_blank');\n } else {\n // show message\n ngToast.create({\n className: 'danger',\n content: 'Oh Oh! Failed to retrieve the consent link, please try again!'\n });\n }\n });\n } else if (updatedAccountModel.action === 'update') {\n\n if (loadedAccount.TierLevel && loadedAccount.TierLevel === 'EA') {\n actionPromise = $eaBackendAzureV2.dataCspUpdateAccountEAV2(loadedAccount.TeamId, loadedAccount.AccountId, updatedAccountModel.account.Name, updatedAccountModel.account.Currency, updatedAccountModel.account.SecurityToken, updatedAccountModel.account.ExchangeRate, updatedAccountModel.account.DefaultResellerManagement, $eaCurrentSession.DataToken).then(function () {\n $scope.refreshScreen();\n });\n } else if (loadedAccount.TierLevel && loadedAccount.TierLevel === 'AWS') {\n actionPromise = $eaBackendAzureV2.dataCspUpdateAccountAWSV2(loadedAccount.TeamId, loadedAccount.AccountId, updatedAccountModel.account.Name, updatedAccountModel.account.Currency, updatedAccountModel.account.ExchangeRate, updatedAccountModel.account.DefaultResellerManagement, $eaCurrentSession.DataToken).then(function() {\n $scope.refreshScreen();\n });\n } else {\n // update the account\n actionPromise = $eaBackendAzureV2.dataCspUpdateAccountT1V2(loadedAccount.TeamId, loadedAccount.AccountId, updatedAccountModel.account.Name, updatedAccountModel.account.ClientId, updatedAccountModel.account.ClientSecret, updatedAccountModel.account.Domain, updatedAccountModel.account.BillingDay, updatedAccountModel.account.ExchangeRate, updatedAccountModel.account.AutoActivateCustomers, updatedAccountModel.account.DefaultResellerManagement, $eaCurrentSession.DataToken).then(function () {\n\n if ($scope.activeDashboard.AccountModel.BillingDay !== updatedAccountModel.account.BillingDay) {\n\n ngToast.create({\n className: 'info',\n content: 'Heads Up! You changed the BillingDay, please re-sync all customers otherwise the changed will not be effective'\n });\n\n }\n\n // update our selected account\n $scope.activeDashboard.AccountModel = updatedAccountModel.account;\n\n // done\n return $q.when();\n });\n }\n\n } else {\n console.log(updatedAccountModel.action + '-Action not supported');\n }\n\n // execute\n $busy.during(actionPromise).then(function () {\n\n // trigger data relaod\n $scope.reloadData($scope.Profile);\n\n // show message\n ngToast.create({\n className: 'success',\n content: 'Great! The CSP Account was updated successfully'\n });\n\n }).catch(function(e) {\n // show message\n ngToast.create({\n className: 'danger',\n content: 'Oh Oh! An error occurred when updating the CSP Account, please try again!'\n });\n });\n });\n });\n };\n\n $scope.openResellers = function()\n {\n $state.go('authorized.csp.resellermanagement', {resellerId: $stateParams.resellerId});\n };\n\n $scope.openVirtualMeters = function()\n {\n $window.location.href = '/app2/teams/' + $stateParams.resellerId + '/apps/settings/team/virtualmeters';\n }; \n\n $scope.openUpliftCategories = function()\n {\n $window.location.href = '/app2/teams/' + $stateParams.resellerId + '/apps/settings/team/upliftcategories';\n };\n\n $scope.openCustomerSegmentation = function() {\n $window.location.href = '/app2/teams/' + $stateParams.resellerId + '/apps/accounts/' + $state.params.active + '/customersegmentation';\n };\n\n $scope.openDownloadPriceSheetDialog = function() {\n\n // load the account including all secrets\n $eaCspService.loadAccount($scope.Profile, $scope.activeDashboard.AccountModel.AccountId, $eaCurrentSession).then(function(loadedAccount) {\n return $scope.openPriceSheetDownload(loadedAccount.TeamId, loadedAccount.AccountId, loadedAccount.Currency, loadedAccount.Country, $eaCurrentSession.DataToken);\n });\n };\n\n $scope.syncCustomers = function() {\n $eaBackend.dataCspSyncAccount($scope.Profile.Id, $scope.activeDashboard.AccountModel.AccountId, $eaCurrentSession.DataToken).then(function () {\n ngToast.create({\n className: 'success',\n content: 'Great! Data Sync for the account ' + $scope.activeDashboard.AccountModel.Name + ' is started. This can take a couple seconds or minutes. If you don\\'t see new customers after more than 15 minutes give us a note.'\n });\n });\n };\n\n $scope.registerCustomers = function() {\n\n if ($scope.activeDashboard.AccountModel.TierLevel === 'V1') {\n return $scope.openCspRegisterCustomerCostMgntDialog().then(function (newCustomerDialogResult) {\n return $eaBackend.dataCspRegisterCostMgntCustomer($scope.Profile.Id, $scope.activeDashboard.AccountModel.AccountId, newCustomerDialogResult.customer.CustomerName, newCustomerDialogResult.customer.HasConsumption, $eaCurrentSession.DataToken).then(function() {\n $scope.reloadData();\n });\n }).catch(function (result) {\n\n if (result && result == 'cancel') {\n return;\n }\n \n // notify regarding error\n ngToast.create({\n className: 'danger',\n content: 'Error! Failed to register CSP customer, please contact our support!'\n });\n });\n } else {\n return $scope.openCspRegisterCustomerDialog().then(function (newCustomerDialogResult) {\n return $eaBackend.dataCspRegisterCustomer($scope.Profile.Id, $scope.activeDashboard.AccountModel.AccountId, newCustomerDialogResult.customer.TenantIdOrDomain, $eaCurrentSession.DataToken).then(function () {\n $scope.reloadData();\n }).catch(function () {\n\n if (result && result == 'cancel') {\n return;\n }\n \n // notify regarding error\n ngToast.create({\n className: 'danger',\n content: 'Error! Failed to register CSP customer, please contact our support!'\n });\n });\n });\n }\n };\n\n $scope.toggleVersion = function() {\n if ($stateParams.version === 'v2') {\n $stateParams.version = 'v1';\n } else {\n $stateParams.version = 'v2';\n }\n\n $state.go('.', $stateParams,\n { notify: false });\n\n // reload\n location.reload();\n };\n\n // update the menu navbar\n $scope.updateControllerNavBarMenu();\n });\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('AcCspGsiCtrl', function ($scope, $state, $eaCspService, $eaCurrentSession, $busy, $q, $controller, $modal, $toolbar, $eaBackendDataModeSelector, $eaSession2, $eaWidgetDashboardManager, ngToast, $eaBackend, $eaBackendAzureV2, $timeout, $window, $stateParams, $acTimelineGenerator) {\n\n $.extend(self, $controller('GsiUpdateSettingsCtrlMixin', {$scope: $scope, $modal: $modal}));\n\n $scope.dashboardEditMode = false;\n $scope.activeDashboard = null;\n $scope.dataToken = $eaCurrentSession.DataToken;\n\n $scope.toggelEditMode = function() {\n $scope.dashboardEditMode = !$scope.dashboardEditMode;\n };\n\n // update the navbar menu\n $scope.updateControllerNavBarMenu = function() {\n\n // Add csp button\n $toolbar.addItem('gsi.switchToCsp', 'Cloud Solution Providers Portal', 'fa-map-marker', 'Visit the portal for Cloud Solution Providers', true, function() {\n $state.go('authorized.csp.accounts', {resellerId: $stateParams.resellerId});\n });\n\n // Open the contract settings dialog\n $toolbar.addItem('gsi.openSettings', 'Settings', 'fa-cog', \"Allows to edit the System Integrator Account\", true, $scope.openEditGsiSettingsDialog);\n\n // Reload operation\n $toolbar.addItem('gsi.performReload', 'Reload', 'fa-refresh', \"Current data will be refreshed\", true, $scope.reloadData);\n };\n\n var dashboardId = 'gsioverview';\n\n $scope.activeDashboard = {\n Id: dashboardId,\n Profile: $scope.Profile,\n Team: $scope.Profile.Id,\n ContractId: 'GSI:' + $scope.Profile.Id,\n Collection: 'gsi.v1',\n Layout: 'v1'\n };\n\n $scope.reloadData = function () {\n $eaWidgetDashboardManager.reload($scope.activeDashboard.Id);\n };\n\n $scope.openEditGsiSettingsDialog = function()\n {\n // load the SI\n return $eaBackend.dataCspGetGsiSettings($scope.Profile.Id, $eaCurrentSession.DataToken).then(function(settings) {\n\n // open dialog\n return $scope.openGsiUpdateSettingsDialog({ReferenceCurrency: settings.referenceCurrency}).then(function(settingsResult) {\n\n // Update\n return $eaBackend.dataCspSetGsiSettings($scope.Profile.Id, settingsResult.account.ReferenceCurrency, $eaCurrentSession.DataToken).then(function() {\n\n // reload\n $scope.reloadData();\n })\n });\n })\n };\n\n // update the menu navbar\n $scope.updateControllerNavBarMenu();\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('AcCspAddCtrl', function ($scope, $state, $stateParams, $rootScope, $acWizardHelpers) {\n\n // define the current state\n $scope.currentStep = $acWizardHelpers.getCurrentStep($state.current);\n\n // the error container\n $scope.registerError = null;\n\n // handle state changes to adapt the control\n $rootScope.$on('$stateChangeSuccess', function(event, toState, toParams, fromState, fromParams){\n $scope.currentStep = $acWizardHelpers.getCurrentStep(toState);\n });\n\n // just redirect to the step01 as default\n if ($state.current.name === 'authorized.csp.wadd') { return $state.go('authorized.csp.wadd.step01', {resellerId: $stateParams.resellerId}); }\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('AcCspAddStep01Ctrl', function ($scope, $state, $stateParams, $busy, $eaCurrentSession, $eaCspService) {\n\n // contains the form content\n $scope.formStep01 = {\n partnership: 'cspt1'\n };\n\n $scope.next = function() {\n\n if ($scope.formStep01.partnership === 'cspt1') {\n return $state.go('authorized.csp.wadd.step02-t1', {resellerId: $stateParams.resellerId});\n } else if ($scope.formStep01.partnership === 'cspt2') {\n return $state.go('authorized.csp.wadd.step02-t2', {resellerId: $stateParams.resellerId});\n } else if ($scope.formStep01.partnership === 'cspea') {\n return $state.go('authorized.csp.wadd.step02-ea', {resellerId: $stateParams.resellerId});\n } else if ($scope.formStep01.partnership === 'cspaws') {\n return $state.go('authorized.csp.wadd.step02-aws', {resellerId: $stateParams.resellerId});\n } else if ($scope.formStep01.partnership === 'cspv1') {\n return $state.go('authorized.csp.wadd.step02-v1', {resellerId: $stateParams.resellerId});\n } else if ($scope.formStep01.partnership === 'cspdemo') {\n return $state.go('authorized.csp.wadd.step02-demo', {resellerId: $stateParams.resellerId});\n }\n };\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('AcCspAddStep02T1Ctrl', function ($scope, $state, $stateParams, $busy, $eaCspService, $eaCurrentSession) {\n\n $scope.newAccount = {\n Name: \"\",\n ClientId: \"\",\n ClientSecret: \"\",\n Domain: \"\",\n BillingDay: 1,\n SyncCustomers: true,\n AutoActivateCustomers: false\n };\n\n $scope.errorRaised = false;\n\n\n $scope.next = function()\n {\n // reset the error\n $scope.errorRaised = false;\n\n // register the account\n return $busy.during($eaCspService.registerAccount($scope.Profile, $eaCurrentSession, $scope.newAccount.Name, $scope.newAccount.ClientId, $scope.newAccount.ClientSecret, $scope.newAccount.Domain, $scope.newAccount.BillingDay, $scope.newAccount.SyncCustomers, $scope.newAccount.AutoActivateCustomers).then(function() {\n $state.go('authorized.csp.wadd.step03', {resellerId: $stateParams.resellerId});\n })).catch(function() {\n $scope.errorRaised = true;\n })\n }\n\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('AcCspAddStep02T2Ctrl', function ($scope, $state, $stateParams, $busy, $eaCspService, $eaCurrentSession) {\n\n $scope.newAccount = {\n Name: \"\",\n Currency: \"\",\n Country: \"\",\n BillingDay: 1\n };\n\n $scope.errorRaised = false;\n\n\n $scope.next = function()\n {\n // reset the error\n $scope.errorRaised = false;\n\n // register the account\n return $busy.during($eaCspService.registerAccountT2($scope.Profile, $eaCurrentSession, $scope.newAccount.Name, $scope.newAccount.Currency, $scope.newAccount.Country, $scope.newAccount.BillingDay).then(function() {\n\n $state.go('authorized.csp.wadd.step03', {resellerId: $stateParams.resellerId});\n })).catch(function() {\n $scope.errorRaised = true;\n })\n }\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('AcCspAddStep02EACtrl', function ($scope, $state, $stateParams, $busy, $eaCspService, $eaCurrentSession, jwtHelper) {\n\n $scope.availableCustomerMappings = ['CostCenter', 'Department', 'Subscription', 'ResourceGroup', 'Account'];\n\n $scope.formAddToken = {\n name: null,\n ea: null,\n eaType: null,\n token: null,\n currency: null,\n customermapping: $scope.availableCustomerMappings[0]\n };\n\n $scope.errorRaised = false;\n\n\n $scope.next = function()\n {\n // reset the error\n $scope.errorRaised = false;\n\n\n // register the account\n return $busy.during($eaCspService.registerAccountEA($scope.Profile, $eaCurrentSession, $scope.formAddToken.name, $scope.formAddToken.currency, $scope.formAddToken.token, $scope.formAddToken.customermapping).then(function() {\n $state.go('authorized.csp.wadd.step03', {resellerId: $stateParams.resellerId});\n })).catch(function() {\n $scope.errorRaised = true;\n })\n };\n\n $scope.tokenFieldChanged = function() {\n\n try {\n // read the token from the input field\n var decodedToken = jwtHelper.decodeToken($scope.formAddToken.token);\n\n // check if we have an enrollment number, if so add\n if (decodedToken.EnrollmentNumber !== undefined) {\n $scope.formAddToken.ea = decodedToken.EnrollmentNumber;\n } else {\n $scope.formAddToken.ea = null;\n }\n\n // check what type the contract is\n if (decodedToken.ReportView !== undefined) {\n $scope.formAddToken.eaType = decodedToken.ReportView;\n } else {\n $scope.formAddToken.eaType = null;\n }\n } catch(e) {\n $scope.formAddToken.ea = null;\n $scope.formAddToken.eaType = null;\n }\n };\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('AcCspAddStep02AWSCtrl', function ($scope, $state, $stateParams, $busy, $eaCspService, $eaCurrentSession, jwtHelper, $eaBackend) {\n\n $scope.availableCustomerMappings = ['Payer Account', 'CostCenter', 'Department', 'Subscription', 'ResourceGroup'];\n\n $scope.form = {\n name:undefined,\n roleArn: undefined,\n externalId: undefined,\n bucket: undefined,\n prefix: undefined,\n reportname: undefined,\n customermapping: $scope.availableCustomerMappings[0]\n };\n\n var awsData = sessionStorage.getItem('csp.awsdata');\n if (awsData) {\n $scope.form = JSON.parse(awsData);\n }\n\n $scope.error = undefined;\n\n $scope.next = function()\n {\n if(location.href.indexOf('localhost') !== -1) {\n sessionStorage.setItem(\"csp.awsdata\", JSON.stringify($scope.form));\n }\n\n if ($scope.form.customermapping === 'Payer Account') {\n $scope.form.customermapping = 'Subscription';\n }\n\n $busy.setMessage(\"Verifying connection to AWS...\");\n $busy.during($eaBackend.dataAwsVerifyConnection($stateParams.resellerId, $scope.form.roleArn, $scope.form.externalId, $scope.form.bucket, $eaCurrentSession.DataToken)).then(function() {\n\n $busy.setMessage(\"Registering Contract...\");\n return $busy.during($eaBackend.dataCspAwsRegisterContract($stateParams.resellerId, $scope.form.name, $scope.form.roleArn, $scope.form.externalId, $scope.form.bucket, $scope.form.prefix, $scope.form.reportname, $scope.form.customermapping, $eaCurrentSession.DataToken)).then(function(contractId) {\n\n // show the finish page\n $state.go('authorized.csp.wadd.step03', {resellerId: $stateParams.resellerId});\n })\n }).catch(function(error) {\n\n if (error && error.data && error.data.message) {\n $scope.error = error.data.message;\n } else if (error && error.data) {\n $scope.error = error.data;\n } else {\n $scope.error = 'Unknown error'\n }\n })\n }\n\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('AcCspAddStep02DemoCtrl', function ($scope, $state, $stateParams, $busy, $eaCspService, $eaCurrentSession) {\n\n $scope.formData = {\n contractType: 'EA'\n };\n\n $scope.next = function() {\n\n // define the mapping\n var mapping = \"CostCenter\";\n if ($scope.formData.contractType === 'AWS') {\n mapping = 'Subscription';\n }\n\n // register the account\n return $busy.during($eaCspService.registerAccountDemo($scope.Profile, $scope.formData.contractType, mapping, $eaCurrentSession).then(function () {\n $state.go('authorized.csp.wadd.step03', {resellerId: $stateParams.resellerId});\n })).catch(function (error) {\n if (error && error.data && error.data.message) {\n $scope.error = error.data.message;\n } else if (error && error.data) {\n $scope.error = error.data;\n } else {\n $scope.error = 'Unknown error'\n }\n });\n }\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('AcCspAddStep02V1Ctrl', function ($scope, $state, $stateParams, $busy, $eaCspService, $eaCurrentSession, jwtHelper) {\n\n $scope.formAddContract = {\n name: null,\n currency: null\n };\n\n $scope.errorRaised = false;\n\n\n $scope.next = function()\n {\n // reset the error\n $scope.errorRaised = false;\n\n\n // register the account\n return $busy.during($eaCspService.registerAccountV1($scope.Profile, $eaCurrentSession, $scope.formAddContract.name, $scope.formAddContract.currency).then(function() {\n $state.go('authorized.csp.wadd.step03', {resellerId: $stateParams.resellerId});\n })).catch(function() {\n $scope.errorRaised = true;\n });\n };\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('AcCspAddStep03Ctrl', function ($scope, $state) {\n\n $scope.next = function() {\n\n };\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('CspUpdateT1AccountCtrlMixin', function($scope, $modal) {\n\n $scope.openCspUpdateT1AccountDialog = function(exitingAccountModel) {\n\n var modalInstance = $modal.open({\n templateUrl: \"views/csp/modals/modal_ac_csp_update_t1_account.html\",\n controller: 'ModalCspUpdateT1AccountCtrl',\n resolve: {\n AccountModel: function() {\n return exitingAccountModel ? exitingAccountModel : {};\n }\n }\n });\n\n // returns a promise\n return modalInstance.result;\n };\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('ModalCspUpdateT1AccountCtrl', function($scope, $modalInstance, AccountModel) {\n\n $scope.newAccount = {\n Name: \"\",\n ClientId: \"\",\n ClientSecret: \"\",\n Domain: \"\",\n BillingDay: 1,\n ExchangeRate: 1.0,\n AutoActivateCustomers: false,\n DefaultResellerManagement: false\n };\n\n $scope.updateMode = false;\n\n // Adjust the Name of the account model in case of missing\n if (!AccountModel.Name || AccountModel.Name.length == 0) {\n AccountModel.Name = AccountModel.Domain;\n }\n\n // edit the account model\n if (AccountModel && AccountModel.Name) {\n $scope.updateMode = true;\n $scope.newAccount = JSON.parse(JSON.stringify(AccountModel));\n $scope.newAccount.BillingDay == 0 ? $scope.newAccount.BillingDay = 1 : $scope.newAccount.BillingDay = $scope.newAccount.BillingDay;\n $scope.title = \"Update Cloud Solutions Provider Program Account\";\n } else {\n $scope.title = \"Register Cloud Solutions Provider Program Account\";\n }\n\n $scope.ok = function () {\n $modalInstance.close({ account: $scope.newAccount, action: $scope.updateMode ? 'update' : 'create'});\n };\n\n $scope.cancel = function () {\n $modalInstance.dismiss(\"cancel\")\n };\n\n $scope.removeAccount = function() {\n var ok = confirm('Do you really want to remove this account? This will remove all data from the system and you need to re-register the account later if required.');\n if (ok) { $modalInstance.close({action: 'remove'}); }\n };\n\n $scope.consentCPV = function() {\n $modalInstance.close({action: 'consent'});\n };\n\n});\n\n\n\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('CspUpdateEAAccountCtrlMixin', function($scope, $modal) {\n\n $scope.openCspUpdateEAAccountDialog = function(exitingAccountModel) {\n\n var modalInstance = $modal.open({\n templateUrl: \"views/csp/modals/modal_ac_csp_update_ea_account.html\",\n controller: 'ModalCspUpdateEAAccountCtrl',\n resolve: {\n AccountModel: function() {\n return exitingAccountModel ? exitingAccountModel : {};\n }\n }\n });\n\n // returns a promise\n return modalInstance.result;\n };\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('ModalCspUpdateEAAccountCtrl', function($scope, $modalInstance, AccountModel, jwtHelper) {\n\n $scope.newAccount = {\n Name: \"\",\n Currency: \"\",\n SecurityTokenExpirationDate: \"\",\n SecurityToken: undefined,\n SecurityTokenValid: false,\n SecurityTokenExpired: false,\n ExchangeRate: 1.0,\n DefaultResellerManagement: false\n };\n\n // Adjust the Name of the account model in case of missing\n if (!AccountModel.Name || AccountModel.Name.length == 0) {\n AccountModel.Name = AccountModel.Domain;\n }\n\n // initial set\n $scope.newAccount.Name = AccountModel.Name;\n $scope.newAccount.Currency = AccountModel.Currency;\n $scope.newAccount.SecurityTokenExpirationDate = AccountModel.TokenExpires ? new Date(AccountModel.TokenExpires) : new Date(\"2019-01-19\");\n $scope.newAccount.SecurityTokenExpired = ($scope.newAccount.SecurityTokenExpirationDate < new Date());\n $scope.newAccount.SecurityTokenValid = true;\n $scope.newAccount.ExchangeRate = AccountModel.ExchangeRate;\n $scope.newAccount.DefaultResellerManagement = AccountModel.DefaultResellerManagement;\n\n\n $scope.title = \"Update Cloud Solutions Provider Program Account\";\n\n $scope.ok = function () {\n $modalInstance.close({ account: $scope.newAccount, action: 'update' });\n };\n\n $scope.cancel = function () {\n $modalInstance.dismiss(\"cancel\")\n };\n\n $scope.removeAccount = function() {\n var ok = confirm('Do you really want to remove this account? This will remove all data from the system and you need to re-register the account later if required.');\n if (ok) { $modalInstance.close({action: \"remove\"}); }\n };\n\n $scope.verifySecurityToken = function(enteredToken) {\n\n // check the token structure\n var decodedToken = null;\n var tokenExpired = false;\n try {\n decodedToken = jwtHelper.decodeToken(enteredToken);\n tokenExpired = jwtHelper.isTokenExpired(enteredToken);\n } catch(error) {\n decodedToken = null;\n }\n\n if (decodedToken) {\n $scope.newAccount.SecurityTokenExpirationDate = new Date(decodedToken.exp * 1000);\n $scope.newAccount.SecurityTokenExpired = tokenExpired;\n $scope.newAccount.SecurityTokenValid = true;\n } else {\n $scope.newAccount.SecurityTokenValid = false;\n }\n }\n});\n\n\n\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('CspUpdateAWSAccountCtrlMixin', function($scope, $modal) {\n\n $scope.openCspUpdateAWSAccountDialog = function(exitingAccountModel) {\n\n var modalInstance = $modal.open({\n templateUrl: \"views/csp/modals/modal_ac_csp_update_aws_account.html\",\n controller: 'ModalCspUpdateAWSAccountCtrl',\n resolve: {\n AccountModel: function() {\n return exitingAccountModel ? exitingAccountModel : {};\n }\n }\n });\n\n // returns a promise\n return modalInstance.result;\n };\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('ModalCspUpdateAWSAccountCtrl', function($scope, $modalInstance, AccountModel, jwtHelper) {\n\n $scope.newAccount = {\n Name: \"\",\n Currency: \"\",\n ExchangeRate: 1.0,\n DefaultResellerManagement: false\n };\n\n // Adjust the Name of the account model in case of missing\n if (!AccountModel.Name || AccountModel.Name.length == 0) {\n AccountModel.Name = AccountModel.Domain;\n }\n\n // initial set\n $scope.newAccount.Name = AccountModel.Name;\n $scope.newAccount.Currency = AccountModel.Currency;\n $scope.newAccount.ExchangeRate = AccountModel.ExchangeRate;\n $scope.newAccount.DefaultResellerManagement = AccountModel.DefaultResellerManagement;\n\n\n $scope.title = \"Update Cloud Solutions Provider Program Account\";\n\n $scope.ok = function () {\n $modalInstance.close({ account: $scope.newAccount, action: 'update' });\n };\n\n $scope.cancel = function () {\n $modalInstance.dismiss(\"cancel\")\n };\n\n $scope.removeAccount = function() {\n var ok = confirm('Do you really want to remove this account? This will remove all data from the system and you need to re-register the account later if required.');\n if (ok) { $modalInstance.close({action: \"remove\"}); }\n };\n});\n\n\n\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('CspRegisterCustomerCtrlMixin', function($scope, $modal) {\n\n $scope.openCspRegisterCustomerDialog = function() {\n\n var modalInstance = $modal.open({\n templateUrl: \"views/csp/modals/modal_ac_csp_register_customer.html\",\n controller: 'ModalCspRegisterCustomerCtrl'\n });\n\n // returns a promise\n return modalInstance.result;\n };\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('ModalCspRegisterCustomerCtrl', function($scope, $modalInstance) {\n\n $scope.newCustomer= {\n TenantIdOrDomain: undefined\n };\n\n $scope.ok = function () {\n $modalInstance.close({ customer: $scope.newCustomer});\n };\n\n $scope.cancel = function () {\n $modalInstance.dismiss(\"cancel\");\n };\n\n});\n\n\n\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('CspRegisterCustomerCostMgntCtrlMixin', function($scope, $modal) {\n\n $scope.openCspRegisterCustomerCostMgntDialog = function() {\n\n var modalInstance = $modal.open({\n templateUrl: 'views/csp/modals/modal_ac_csp_register_customer_costmgnt.html',\n controller: 'ModalCspRegisterCustomerCostMgntCtrl'\n });\n\n // returns a promise\n return modalInstance.result;\n };\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('ModalCspRegisterCustomerCostMgntCtrl', function($scope, $modalInstance) {\n\n $scope.newCustomer= {\n CustomerName: undefined,\n HasConsumption: true\n };\n\n $scope.ok = function () {\n $modalInstance.close({ customer: $scope.newCustomer});\n };\n\n $scope.cancel = function () {\n $modalInstance.dismiss('cancel');\n };\n\n $scope.validateForm = function() {\n return $scope.newCustomer.CustomerName; \n }\n});\n\n\n\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('GsiUpdateSettingsCtrlMixin', function($scope, $modal) {\n\n $scope.openGsiUpdateSettingsDialog = function(existingGSIAccountModel) {\n\n var modalInstance = $modal.open({\n templateUrl: \"views/csp/modals/modal_ac_gsi_update_settings.html\",\n controller: 'ModalGsiUpdateSettingsCtrl',\n resolve: {\n SystemIntegratorAccountModel: function() {\n return existingGSIAccountModel;\n }\n }\n });\n\n // returns a promise\n return modalInstance.result;\n };\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('ModalGsiUpdateSettingsCtrl', function($scope, $modalInstance, SystemIntegratorAccountModel) {\n\n $scope.gsiAccountModel = SystemIntegratorAccountModel || { ReferenceCurrency: \"EUR\" };\n\n $scope.ok = function () {\n $modalInstance.close({ account: $scope.gsiAccountModel, action: 'update' });\n };\n\n $scope.cancel = function () {\n $modalInstance.dismiss(\"cancel\")\n };\n\n});\n\n\n\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('CspChooseCustomerCtrlMixin', function($scope, $modal, $controller, $q) {\n\n // Re-Using the object picker\n $.extend(self, $controller('ModalObjectPickerCtrlMixin', {$scope: $scope, $modal: $modal}));\n\n $scope.openCustomerChooser = function(customers /*, options*/) {\n\n var description = 'Please choose customers you want to perform the operation for:';\n\n // prepare the callbacks\n var getImageUrl = function(model) {\n return 'fa-building';\n };\n\n var getDisplayName = function(model) {\n return model.CustomerName;\n };\n\n var getDetailsString = function(model) {\n return model.CustomerId;\n };\n\n return $scope.openObjectPickerDialog('Choose customers', description, getImageUrl, getDisplayName, getDetailsString, customers, []);\n };\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('CspDefineResellerMarginCtrlMixin', function($scope, $modal) {\n\n $scope.openCspDefineResellerMarginDialog = function(resellerMargin, upliftCategories) {\n\n var modalInstance = $modal.open({\n templateUrl: \"views/csp/modals/modal_ac_csp_define_reseller_margin.html\",\n controller: 'ModalCspDefineResellerMarginCtrl',\n resolve: {\n ResellerMargin: function() {\n return resellerMargin ? resellerMargin : [];\n },\n UpliftCategories: function() {\n return upliftCategories ? upliftCategories : ['*'];\n }\n }\n });\n\n // returns a promise\n return modalInstance.result;\n };\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('ModalCspDefineResellerMarginCtrl', function($scope, $modalInstance, ResellerMargin, UpliftCategories) {\n\n $scope.updatedResellerMargins = JSON.parse(JSON.stringify(ResellerMargin));\n\n $scope.availableMatchKeys = JSON.parse(JSON.stringify(UpliftCategories));\n\n $scope.newMarginModel = {\n MatchKey: '*',\n Margin: 0,\n ValidUntil: ''\n };\n\n $scope.uiHelper = {\n datePopupOpen: false,\n datePopupOptions: {}\n };\n\n $scope.openDatePopup = function() {\n $scope.uiHelper.datePopupOpen = true;\n };\n\n $scope.deleteMargin = function(margin) {\n var idx = $scope.updatedResellerMargins.indexOf(margin);\n if (idx !== -1) { $scope.updatedResellerMargins.splice(idx, 1); }\n };\n\n $scope.addMargin = function() {\n\n // adapt value\n // if ($scope.newMarginModel.Margin > 1) { $scope.newMarginModel.Margin = $scope.newMarginModel.Margin / 100; };\n $scope.newMarginModel.Margin = $scope.newMarginModel.Margin / 100;\n\n // add\n $scope.updatedResellerMargins.push($scope.newMarginModel);\n\n // build new\n $scope.newMarginModel = {\n MatchKey: '*',\n Margin: 0,\n ValidUntil: ''\n };\n };\n\n $scope.ok = function () {\n // Ask\n var ok = confirm('Changing the margin/uplift outdates all cached reports, when the customer is visiting his portal ' +\n 'the next time it could take a very long time. You can force this process by visiting the portal ' +\n 'in admin on behalf of! Do you really want to change the margin/uplift values?');\n if (ok) {\n $modalInstance.close($scope.updatedResellerMargins);\n }\n };\n\n $scope.cancel = function () {\n $modalInstance.dismiss('cancel');\n };\n});\n\n\n\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('CspDefineResellerFilterCtrlMixin', function($scope, $modal) {\n\n $scope.openCspDefineResellerFilterDialog = function(existingResellerFilter) {\n\n var modalInstance = $modal.open({\n templateUrl: \"views/csp/modals/modal_ac_csp_define_reseller_filter.html\",\n controller: 'ModalCspDefineResellerFilterCtrl',\n resolve: {\n ResellerFilter: function() {\n return existingResellerFilter ? existingResellerFilter : {};\n }\n }\n });\n\n // returns a promise\n return modalInstance.result;\n };\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('ModalCspDefineResellerFilterCtrl', function($scope, $modalInstance, ResellerFilter, $eaFilterPanel) {\n\n $scope.activeFilter = JSON.parse(JSON.stringify(ResellerFilter));\n\n if (!$scope.activeFilter.Rules) { $scope.activeFilter.Rules = []; }\n\n $scope.availableFilterFields = $eaFilterPanel.buildFieldModelsFromArray([\n \"SubscriptionName\" ,\n \"ServiceName\",\n \"ServiceCategory\",\n \"ServiceType\",\n \"ServiceSize\",\n \"ServiceCosts\",\n \"ServiceQuantity\",\n \"ServiceUnit\",\n \"Tag\",\n \"CostCenter\",\n \"Department\",\n \"ResourceGroup\"\n ]);\n\n $scope.operators = $eaFilterPanel.availableOperations;\n\n $scope.conditions = $eaFilterPanel.availableConditions;\n\n $scope.ok = function() {\n\n // Ask\n var ok = confirm('Changing the filters outdates all cached reports, when the customer is visiting his portal ' +\n 'the next time it could take a very long time. You can force this process by visiting the portal ' +\n 'in admin on behalf of! Do you really want to change the filters?');\n\n if (ok) {\n $modalInstance.close($scope.activeFilter);\n }\n };\n\n $scope.cancel = function () {\n $modalInstance.dismiss(\"cancel\")\n };\n\n $scope.removeCondition = function(index) {\n $scope.activeFilter.Rules.splice(index, 1);\n };\n\n $scope.addCondition = function() {\n $scope.activeFilter.Rules.push($eaFilterPanel.buildRule('AND'));\n }\n});\n\n\n\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('CspDownloadPriceSheetCtrlMixin', function($scope, $modal, $controller, $q) {\n\n $scope.openPriceSheetDownload = function(teamId, contractId, currency, region, token) {\n\n var modalInstance = $modal.open({\n templateUrl: \"views/csp/modals/model-csp-download-price-sheet.html\",\n controller: 'ModalCspDownloadPriceSheetCtrl',\n resolve: {\n PriceSheetOptions: function() {\n return {\n TeamId: teamId,\n ContractId: contractId,\n Token: token,\n Currency: currency,\n Region: region\n };\n }\n }\n });\n\n // returns a promise\n return modalInstance.result;\n };\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('ModalCspDownloadPriceSheetCtrl', function($scope, $modalInstance, $eaBackendAzureCachedContentLoader, PriceSheetOptions, $eaBackendAzureV2, $eaDownload) {\n\n $scope.priceSheetOptions = {\n Region: PriceSheetOptions.Region,\n Locale: 'en-US',\n RCCurrency: PriceSheetOptions.Currency,\n Currency: PriceSheetOptions.Currency,\n ERate: 1.0\n };\n\n $scope.step = 0;\n\n $scope.cancel = function () {\n $modalInstance.dismiss(\"cancel\")\n };\n\n $scope.download = function() {\n\n // set the download mode\n $scope.step = 1;\n\n\n // build the options\n var requestOptions = {\n resourceEndpoint: $eaBackendAzureV2.dataGetPriceComparisionSheet,\n queryoptions: {\n region: $scope.priceSheetOptions.Region,\n locale: $scope.priceSheetOptions.Locale,\n currency: $scope.priceSheetOptions.RCCurrency,\n erate: $scope.priceSheetOptions.ERate\n }\n };\n\n // get the day definition\n var dayDefinition = (new Date()).currentDayDefinition();\n\n // load the data\n $eaBackendAzureCachedContentLoader.dataRequestCachedResourceWithRetry(PriceSheetOptions.TeamId, PriceSheetOptions.ContractId, undefined, dayDefinition, PriceSheetOptions.Token, undefined, false, requestOptions).then(function(content) {\n\n // offer for download\n $eaDownload.do(content, 'PriceComparisionSheet.csv', \"text/csv\");\n\n // move forward\n $scope.step = 3;\n })\n }\n\n\n});\n\n\n\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('CspDefineResellerFeaturesCtrlMixin', function($scope, $modal) {\n\n $scope.openCspDefineResellerFeaturesDialog = function(features, customer, account) {\n\n var modalInstance = $modal.open({\n templateUrl: \"views/csp/modals/modal_ac_csp_define_reseller_features.html\",\n controller: 'ModalCspDefineResellerFeaturesCtrl',\n resolve: {\n Features: function() {\n return features ? features : {};\n },\n Customer: function() {\n return customer ? customer : {};\n },\n Account: function() {\n return account ? account : {};\n }\n }\n });\n\n // returns a promise\n return modalInstance.result;\n };\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('ModalCspDefineResellerFeaturesCtrl', function($scope, $modalInstance, Customer, Features, Account) {\n\n $scope.features = JSON.parse(JSON.stringify(Features));\n $scope.customer = JSON.parse(JSON.stringify(Customer));\n $scope.account = JSON.parse(JSON.stringify(Account));\n \n $scope.ok = function() {\n $modalInstance.close($scope.features);\n };\n\n $scope.cancel = function () {\n $modalInstance.dismiss('cancel');\n };\n\n $scope.isDisabled = function(element) {\n switch(element)\n {\n case \"consumption\":\n return $scope.isDisabledConsumption();\n case \"reservation\":\n return $scope.isDisabledReservation();\n case \"office\":\n return $scope.isDisabledOffice(); \n case \"marketplace\":\n return $scope.isDisabledMarketplace(); \n default:\n return true; \n } \n }\n\n $scope.isDisabledConsumption = function() {\n return $scope.account.TierLevel !== 'V1'; \n }\n\n $scope.isDisabledReservation = function() {\n return $scope.account.TierLevel !== 'T1' && $scope.account.TierLevel !== 'T1N'; \n }\n\n $scope.isDisabledOffice = function() {\n return $scope.account.TierLevel !== 'T1' && $scope.account.TierLevel !== 'T1N';\n }\n \n $scope.isDisabledMarketplace = function() {\n return true;\n }\n});\n\n\n\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('AcCspResellerManagementCtrl', function ($scope, $state, $stateParams, $eaCspService, $eaCurrentSession, $busy, $q, $controller, $modal, $toolbar, $eaBackendDataModeSelector, $eaSession2, $eaWidgetDashboardManager, ngToast, $eaBackend, $eaBackendAzureV2, $timeout, $window, $acTimelineGenerator) {\n\n $.extend(self, $controller('CspResellerRegisterCtrlMixin', {$scope: $scope, $modal: $modal}));\n $.extend(self, $controller('CspDefineResellerMarginCtrlMixin', {$scope: $scope, $modal: $modal}));\n\n $scope.dashboardEditMode = false;\n $scope.activeDashboard = null;\n $scope.dataToken = $eaCurrentSession.DataToken;\n\n $scope.toggelEditMode = function() {\n $scope.dashboardEditMode = !$scope.dashboardEditMode;\n };\n\n // update the navbar menu\n $scope.updateControllerNavBarMenu = function() {\n\n // Open the contract settings dialog\n var backUri = $state.href('authorized.csp.accounts', { resellerId: $stateParams.resellerId }, {absolute: true});\n $toolbar.addItem('csp.reseller.back', 'Back', 'fa-chevron-left', null, true, backUri);\n\n // Reload operation\n $toolbar.addItem('csp.reseller.performReload', 'Reload', 'fa-refresh', \"Current data will be refreshed\", true, $scope.reloadData);\n };\n\n var dashboardId = 'resellerManagement';\n\n $scope.activeDashboard = {\n Id: dashboardId,\n Profile: $scope.Profile,\n Team: $scope.Profile.Id,\n ContractId: 'RESELLER:' + $scope.Profile.Id,\n Collection: 'reseller.v1',\n Layout: 'v1'\n };\n\n // Action: Register Reseller\n $eaWidgetDashboardManager.onDashboardFunction(dashboardId, 'func:12F2A20E-B5C7-4615-BDE1-867D31266A50', function (args) {\n\n $scope.openCspResellerRegisterDialog().then(function(resellerREgistrationResult) {\n\n // register\n $busy.setMessage(\"Registering new Reseller...\");\n\n return $busy.during($eaBackend.dataRegisterCspResellers($scope.Profile.Id, resellerREgistrationResult.account.Name, $eaCurrentSession.DataToken)).then(function() {\n $scope.reloadData();\n $eaWidgetDashboardManager.finishDashboardFunction(dashboardId, args, true, null);\n }).catch(function(e) {\n ngToast.danger(\"Error: Failed to register new reseller: \" + e.message);\n $eaWidgetDashboardManager.finishDashboardFunction(dashboardId, args, false, e);\n })\n })\n });\n\n // Action: Visit Reseller Portal\n $eaWidgetDashboardManager.onDashboardFunction(dashboardId, 'func:75FF743F-21BC-4208-BB05-7AC447A17E19', function(args) {\n\n // update our login sessiong with a new delegation token\n return $eaSession2.updateTokenFromSTS($eaCurrentSession, { delegate: args.args.TeamId }).then(function() {\n\n // build the url\n var url = $state.href('authorized.csp.accounts', {resellerId: args.args.TeamId }, {absolute: true});\n\n // open new window with the url\n $window.open(url, '_blank');\n\n // we are done with this action\n return $eaWidgetDashboardManager.finishDashboardFunction(dashboardId, args, null, null);\n }).catch(function() {\n\n ngToast.create({\n className: 'danger',\n content: 'Permission Denied! You have no access permissions to open the customer dashboard.'\n });\n\n // we are done with this action\n return $eaWidgetDashboardManager.finishDashboardFunction(dashboardId, args, null, null);\n })\n });\n\n // Action: UnPublish Customer\n $eaWidgetDashboardManager.onDashboardFunction(dashboardId, 'func:E6F0F729-6374-4A62-81A9-7D26EFE82346', function(args) {\n\n var deleteOk = confirm('Do you really want to remove the customer from this reseller?');\n if (deleteOk) {\n\n return $eaBackend.dataUnPublishCspCustomer($scope.Profile.Id, args.args.ResellerId, args.args.ResellerAccountId, args.args.CustomerId, $eaCurrentSession.DataToken).then(function() {\n $scope.reloadData();\n $eaWidgetDashboardManager.finishDashboardFunction(dashboardId, args, true, null);\n }).catch(function() {\n ngToast.create({\n className: 'danger',\n content: 'Error! Failed to remove customer.'\n });\n\n // we are done with this action\n return $eaWidgetDashboardManager.finishDashboardFunction(dashboardId, args, null, null);\n });\n } else {\n // we are done with this action\n return $eaWidgetDashboardManager.finishDashboardFunction(dashboardId, args, null, null);\n }\n });\n\n // Action: UnPublish All Customers\n $eaWidgetDashboardManager.onDashboardFunction(dashboardId, 'func:8910991F-B227-4A61-B4FB-3F2C6F69D276', function(args) {\n\n // no collection give up\n if (!args.args.Customers) {\n return $eaWidgetDashboardManager.finishDashboardFunction(dashboardId, args, true, null);\n }\n\n // check if we delete the reseller or the customers\n if (args.args.Customers.length === 1 && args.args.Customers[0].CustomerState === 'pseudo') {\n var deleteOk = confirm('Do you really want to remove the reseller?');\n if (deleteOk) {\n $eaBackend.dataDeleteEmptyCspResellers($scope.Profile.Id, args.args.Customers[0].ResellerId, $eaCurrentSession.DataToken).then(function () {\n ngToast.create({\n className: 'success',\n content: 'Success! Removed reseller ' + args.args.Customers[0].ResellerName\n });\n\n $scope.reloadData();\n }).catch(function () {\n ngToast.create({\n className: 'danger',\n content: 'Error! Failed to remove reseller ' + args.args.Customers[0].ResellerName + ', try again later'\n });\n });\n }\n } else {\n var deleteOk = confirm('Do you really want to remove all customers from this reseller? This process could take a couple minutes up to hours. After that you can come back to remove the reseller with the same action!');\n if (deleteOk) {\n args.args.Customers.forEach(function (customer) {\n\n $eaBackend.dataUnPublishCspCustomer($scope.Profile.Id, customer.ResellerId, customer.ResellerAccountId, customer.CustomerId, $eaCurrentSession.DataToken).then(function () {\n ngToast.create({\n className: 'success',\n content: 'Success! Schedule un-publishing of customer ' + customer.CustomerCompany\n });\n }).catch(function () {\n ngToast.create({\n className: 'danger',\n content: 'Error! Failed to schedule un-publishing of customer ' + customer.CustomerCompany + ', try again later'\n });\n });\n });\n }\n }\n\n return $eaWidgetDashboardManager.finishDashboardFunction(dashboardId, args, true, null);\n });\n\n // Action: Define reseller margins\n $eaWidgetDashboardManager.onDashboardFunction(dashboardId, 'func:AD35F300-7307-4E33-B69C-E5576CDCDA4D', function (args) {\n\n // load the uplift categories\n $eaBackend.dataCspGetUpliftCategories($scope.Profile.Id, $eaCurrentSession.DataToken).then(function(upliftCategories) {\n\n // load the margins\n return $eaBackend.dataCspGetResellerMarginForReseller($scope.Profile.Id, args.args.ResellerId, $eaCurrentSession.DataToken).then(function (resellerMargins) {\n\n // show the dialog\n return $scope.openCspDefineResellerMarginDialog(resellerMargins, upliftCategories).then(function (updatedMargins) {\n\n // save the margins\n return $eaBackend.dataCspSetResellerMarginForReseller($scope.Profile.Id, args.args.ResellerId, updatedMargins, $eaCurrentSession.DataToken).then(function () {\n\n // we are done with this action\n $eaWidgetDashboardManager.finishDashboardFunction(dashboardId, args, null, null);\n });\n });\n });\n });\n });\n\n $scope.reloadData = function () {\n $eaWidgetDashboardManager.reload($scope.activeDashboard.Id);\n };\n\n // update the menu navbar\n $scope.updateControllerNavBarMenu();\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('CspResellerRegisterCtrlMixin', function($scope, $modal) {\n\n $scope.openCspResellerRegisterDialog = function() {\n\n var modalInstance = $modal.open({\n templateUrl: \"views/csp/resellers/modals/ac_modal_reseller_register.html\",\n controller: 'CspResellerRegisterCtrl'\n });\n\n // returns a promise\n return modalInstance.result;\n };\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('CspResellerRegisterCtrl', function($scope, $modalInstance) {\n\n $scope.resellerAccountModel = { Name: undefined };\n\n $scope.ok = function () {\n $modalInstance.close({ account: $scope.resellerAccountModel, action: 'new' });\n };\n\n $scope.cancel = function () {\n $modalInstance.dismiss(\"cancel\")\n };\n\n});\n\n\n\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('EaAdminCtrl', function ($scope, $busy, $eaCurrentSession, $toolbar, $eaBackendAdmin) {\n\n // reset the error\n $scope.error = null;\n\n $scope.serviceProviderDefault = {\n Id: 'default',\n Name: 'Default'\n };\n\n $scope.serviceProvider = $scope.serviceProviderDefault;\n\n $scope.serviceProviders = [];\n\n $scope.updateNavBar = function() {\n\n // configure the toolbar\n $toolbar.addItem('admin.back', 'Back', 'fa-chevron-left', null, true, '/signin');\n\n if ($scope.authorizedAsAdmin) {\n\n $toolbar.addItem('admin.providers', $scope.serviceProvider ? $scope.serviceProvider.Name : 'Default', 'fa-globe', 'Active Service Provider', true, null);\n\n $scope.serviceProviders.forEach(function(provider) {\n $toolbar.addItem('admin.providers.' + provider.Id, provider.Name, 'fa-globe', provider.Name, true, $scope.switchServiceProviderCallback(provider), null, 'admin.providers');\n });\n\n $toolbar.addItem('admin.contracts', 'Contracts', 'fa-book', 'Shows all contracts in the system', true, '/admin/contracts');\n $toolbar.addItem('admin.users', 'Users', 'fa-users', 'Shows all users in the system', true, '/admin/users');\n $toolbar.addItem('admin.jobs', 'Jobs', 'fa-tasks', 'Shows all jobs in the system', true, '/admin/jobs');\n\n $toolbar.addItem('admin.performReload', 'Reload', 'fa-refresh', \"Current data will be refreshed\", true, $scope.reloadData);\n }\n };\n\n // check if we have ops permission\n $scope.authorizedAsAdmin = $eaCurrentSession.hasClaim('ops');\n\n // udpate the navbar\n $eaBackendAdmin.dataGetServiceProviders($eaCurrentSession.DataToken).then(function(providers) {\n\n $scope.serviceProviders = providers;\n $scope.serviceProviders.push($scope.serviceProviderDefault);\n $scope.updateNavBar();\n });\n\n var reloadOperation = null;\n $scope.onReload = function(cb) {\n reloadOperation = cb;\n };\n\n $scope.reloadData = function() {\n if (reloadOperation) {reloadOperation();}\n };\n\n $scope.switchServiceProviderCallback = function(targetServiceProvider) {\n return function() {\n $scope.serviceProvider = targetServiceProvider;\n $scope.updateNavBar();\n $scope.reloadData();\n }\n }\n\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('EaAdminContractsCtrl', function ($controller, $scope, $rootScope, $stateParams, $eaBackendAdmin, $busy, $modal, $q, jwtHelper, $eaCurrentSession) {\n\n function loadStats() {\n return $eaBackendAdmin.dataGetSpendingStats($scope.serviceProvider.Id, $eaCurrentSession.DataToken).then(function (stats) {\n $scope.error = null;\n $scope.orderByField = 'Enrollment';\n $scope.reverseSort = false;\n $scope.spendingStats = stats;\n\n\n // calculate the sums\n $scope.spendingKeys = [];\n $scope.spendingSumsAll = {};\n $scope.spendingSumsLastYear = {};\n $scope.spendingSumsLastMonth = {};\n\n $scope.spendingStats.forEach(function (stat) {\n if ($scope.spendingSumsAll[stat.Currency] === undefined) {\n $scope.spendingSumsAll[stat.Currency] = 0;\n $scope.spendingKeys.push(stat.Currency)\n }\n if (!$scope.spendingSumsLastYear[stat.Currency]) {\n $scope.spendingSumsLastYear[stat.Currency] = 0;\n }\n if (!$scope.spendingSumsLastMonth[stat.Currency]) {\n $scope.spendingSumsLastMonth[stat.Currency] = 0;\n }\n\n $scope.spendingSumsAll[stat.Currency] += stat.Spendings.all;\n $scope.spendingSumsLastYear[stat.Currency] += stat.Spendings.lastYear;\n $scope.spendingSumsLastMonth[stat.Currency] += stat.Spendings.lastMonth;\n });\n\n })\n }\n\n $scope.updateNavBar();\n\n $scope.verifyToken = function(token) {\n if (token === 'app-only') {\n return true;\n } else {\n try {\n return !jwtHelper.isTokenExpired(token);\n } catch(error) {\n return false;\n }\n }\n };\n\n $scope.syncCurrentMonth = function(teamId, userId, contract) {\n var currentMonthDefinition = (new Date()).currentMonthDefinition();\n\n var promise = null;\n\n if (teamId === 'personal') {\n promise = $eaBackendAdmin.dataPutPersonalContractsSyncMonth($scope.serviceProvider.Id, userId, contract, currentMonthDefinition, $eaCurrentSession.DataToken);\n } else {\n promise = $eaBackendAdmin.dataPutTeamContractsSyncMonth($scope.serviceProvider.Id, teamId, contract, currentMonthDefinition, $eaCurrentSession.DataToken);\n }\n\n // check promise\n promise.then(function() {\n alert(\"Sync triggered\");\n })\n };\n\n $scope.syncAll = function(teamId, userId, contract) {\n var currentMonthDefinition = (new Date()).currentMonthDefinition();\n\n var promise = null;\n\n if (teamId === 'personal') {\n promise = $eaBackendAdmin.dataPutPersonalContractsSync($scope.serviceProvider.Id, userId, contract, $eaCurrentSession.DataToken);\n } else {\n promise = $eaBackendAdmin.dataPutTeamContractsSync($scope.serviceProvider.Id, teamId, contract, $eaCurrentSession.DataToken);\n }\n\n // check promise\n promise.then(function() {\n alert(\"Sync triggered\");\n })\n };\n\n $scope.deleteUsageData = function(teamId, userId, contract) {\n if (confirm('Do you realy want to remove the usage data of contract' + contract + '?')) {\n var promise = null;\n\n if (teamId === 'personal') {\n promise = $eaBackendAdmin.dataDeletePersonalContractsReports($scope.serviceProvider.Id, userId, contract, $eaCurrentSession.DataToken);\n } else {\n promise = $eaBackendAdmin.dataDeleteTeamContractsReports($scope.serviceProvider.Id, teamId, contract, $eaCurrentSession.DataToken);\n }\n\n // check promise\n promise.then(function() {\n alert(\"Delete Contract triggered\");\n })\n }\n };\n\n $scope.onReload(function() {\n $busy.during(loadStats());\n });\n\n $busy.during(loadStats());\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('EaAdminUsersCtrl', function ($scope, $eaBackendAdmin, $busy, $eaCurrentSession, $eaSession2, $window, $controller, $modal, $eaBackendAdminV2) {\n $.extend(self, $controller('ModalAdminAddUserCtrlMixin', {$scope: $scope, $modal: $modal}));\n\n function loadUsers() {\n // load the users\n return $eaBackendAdmin.dataGetUsers($scope.serviceProvider.Id, $eaCurrentSession.DataToken).then(function (users) {\n\n // adapt the last login date and the state\n users.forEach(function(user) {\n\n // adapt the last login\n if (user.LastLogin === null) {\n user.LastLogin = '1970-01-01T00:00:00';\n }\n\n // adapt the status\n if (user.UserId.indexOf('PSEUDO') === 0) {\n user.Status = 'pending';\n } else {\n user.Status = 'active';\n }\n });\n\n $scope.error = null;\n $scope.orderByField = 'SignUp';\n $scope.reverseSort = true;\n $scope.users = users;\n });\n }\n\n $scope.updateNavBar();\n\n $busy.during(loadUsers());\n\n $scope.onReload(function() {\n $busy.during(loadUsers());\n });\n\n\n $scope.removeUser = function(user) {\n var deleteOk = confirm(\"Do you really want to remove user: \" + user.FirstName + ' ' + user.LastName);\n\n if (deleteOk) {\n\n // delete contract\n $busy.during($eaBackendAdmin.dataDeleteUser($scope.serviceProvider.Id, user.UserId, $eaCurrentSession.DataToken).finally(function() {\n\n // remove from array\n var idx = $scope.users.indexOf(user);\n if (idx !== -1) {\n $scope.users.splice(idx, 1);\n }\n\n }));\n }\n };\n\n $scope.actAsUser = function(user) {\n var actAsOk = confirm(\"Do you really want to switch to user: \" + user.FirstName + ' ' + user.LastName + ' (' + user.Contact + ')');\n if (actAsOk) { $eaSession2.openActAsSession(user.UserId, $scope.serviceProvider.Id); }\n };\n\n $scope.addNewUser = function() {\n $scope.openAddNewUser().then(function (result) { \n $eaBackendAdminV2.dataInviteUser(result.user.upn, $eaCurrentSession.DataToken).then(function() {\n $busy.during(loadUsers());\n }) \n })\n }\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('EaAdminJobsCtrl', function ($scope, $eaBackendAdminV2, $busy, $eaCurrentSession) {\n\n $scope.loadJobsDuring = 1;\n $scope.loadJobsForTeam = \"\";\n\n function loadJobs(hours, team) {\n // load the jobs\n return $eaBackendAdminV2.dataGetJobs(hours, team, $eaCurrentSession.DataToken).then(function (jobs) {\n\n $scope.error = null;\n\n $scope.runningJobs = [];\n $scope.delayedJobs = [];\n $scope.pendingJobs = [];\n $scope.otherJobs = [];\n\n jobs.items.forEach(function(job) {\n\n // adjust the worker url\n // acbackgroundstaging.deployment-586477d64d-v8r2m (v2)xx\n var podName = job.jobWorker.split(' ')[0];\n job.jobPodUri = 'http://127.0.0.1:8001/#!/log/default/' + podName + '/pod?namespace=default';\n \n // adjust the status\n if (job.jobStatus === 'running') {\n $scope.runningJobs.push(job);\n } else if (job.jobStatus === 'delayed') {\n $scope.delayedJobs.push(job);\n } else if (job.jobStatus === 'pending') {\n $scope.pendingJobs.push(job);\n } else {\n $scope.otherJobs.push(job);\n }\n })\n });\n }\n\n $scope.jobMoment = function(job) {\n return moment(job.jobStarted).fromNow();\n };\n\n $scope.jobDuration = function(job) {\n return job.jobDuration + ' seconds';\n };\n\n $scope.onReload(function() {\n $scope.reloadJobs();\n });\n\n $scope.reloadJobs = function() {\n $busy.during(loadJobs($scope.loadJobsDuring, $scope.loadJobsForTeam));\n };\n\n // init all\n $scope.updateNavBar();\n $scope.reloadJobs();\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('EaAdminJobsDetailsCtrl', function ($scope, $state, $eaBackendAdminV2, $busy, $eaCurrentSession, $base64, $eaConfig) {\n\n function loadEntries() {\n\n // generate one out if the month\n var jobPartitionHash = $state.params.jobpartition;\n\n // TestLogs202102WebJobsLogEntries/e971ab61-be79-4652-8cd6-dfd18be613d3\n\n if ($state.params.jobmonth) {\n jobPartitionHash = $base64.encode(($eaConfig.envType === 'production' ? 'ProdLogs' : 'TestLogs') + $state.params.jobmonth + 'WebJobsLogEntries/' + $state.params.jobpartition);\n }\n\n // load the jobs\n return $eaBackendAdminV2.dataGetJobEntries(jobPartitionHash, $eaCurrentSession.DataToken).then(function (entries) {\n $scope.error = null;\n $scope.entries = entries;\n });\n }\n\n $scope.onReload(function() {\n $busy.during(loadEntries());\n });\n\n // init all\n $scope.updateNavBar();\n $busy.during(loadEntries());\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('ModalAdminAddUserCtrl', function($scope, $modalInstance) {\n\n $scope.newUser= {\n upn: undefined\n };\n\n $scope.ok = function () {\n $modalInstance.close({ user: $scope.newUser});\n };\n\n $scope.cancel = function () {\n $modalInstance.dismiss(\"cancel\");\n };\n\n});\n\n\n\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('ModalAdminAddUserCtrlMixin', function($scope, $modal) {\n\n $scope.openAddNewUser = function() {\n\n var modalInstance = $modal.open({\n templateUrl: \"views/admin/modals/model_admin_add_user.html\",\n controller: 'ModalAdminAddUserCtrl'\n });\n\n // returns a promise\n return modalInstance.result;\n };\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').directive('eaContentCentered', function() {\n return {\n restrict: 'C',\n template: '
',\n transclude: true\n };\n});\n","'use strict';\n\n/*\n * This service just contains general settings which can be used from teh data sources.\n */\nangular.module('azureCostsFeApp').service('$acChartContainerHelpers', function($q) {\n var self = this;\n\n self.waitUntilChartContainerExists = function(containerId, defer) {\n defer = defer ? defer : $q.defer();\n\n var checkExist = setInterval(function() {\n if ($('div#' + containerId).length) {\n clearInterval(checkExist);\n defer.resolve();\n } else {\n self.waitUntilChartContainerExists(containerId, defer);\n }\n }, 100); // check every 100ms\n\n return defer.promise;\n };\n});\n","angular.module('azureCostsFeApp').directive('acChartRaw', function() {\n return {\n restrict: 'C',\n template: '
',\n controller: 'AcChartRawCtrl',\n scope: {\n uuid: '=',\n configureCallback: '=',\n dataCallback: '=',\n buildChartCallback: '='\n }\n };\n}).controller('AcChartRawCtrl', function($scope, $rootScope, $eaChartConfig, $acChartContainerHelpers, $q, $timeout) {\n\n // placeholder for the chart object as self\n $scope.chartElement = null;\n\n // define the chart container id\n $scope.chartContainerId = 'chart-container-' + $scope.uuid;\n\n function generateDiagram() {\n\n // build the diagram\n var areaOptions = $eaChartConfig.createAreaConfig();\n areaOptions.chart.renderTo = $scope.chartContainerId;\n\n // set some defaults to prevent crashes\n areaOptions.tooltip.enabled = false;\n areaOptions.yAxis.labels.enabled = false;\n areaOptions.xAxis.labels.enabled = false;\n\n // add the data elements\n var dataCallbackPromise = $q.when([]);\n if ($scope.dataCallback) { dataCallbackPromise = $q.when($scope.dataCallback(areaOptions.series)); }\n dataCallbackPromise.then(function () {\n\n // configure the chart\n var configCallbackPromise = $q.when([]);\n if ($scope.configureCallback) { configCallbackPromise = $q.when($scope.configureCallback(areaOptions)); }\n return configCallbackPromise.then(function() {\n\n // render the diagram\n $timeout(function() {\n $scope.chartElement = new Highcharts.Chart(areaOptions);\n if ($scope.buildChartCallback) {\n $scope.buildChartCallback($scope.chartElement);\n }\n }, 100);\n });\n });\n }\n\n // wait for a build request\n $rootScope.$on('build-chart-' + $scope.uuid, function() {\n // wait for the container\n return $acChartContainerHelpers.waitUntilChartContainerExists($scope.chartContainerId).then(function() {\n generateDiagram();\n });\n });\n\n});\n","/*\n * The elements section needs to have the following structure\n *\n * [\n * {\n * \"XXX\": \"Label\",\n * \"ZZZ\": \"Value\"\n * }\n * ]\n *\n * The property value-field-name defines the field which contains the value of the series. The property\n * label-field-name defines the name which is used in the legend.\n */\nangular.module('azureCostsFeApp').directive('acChartArea', function() {\n return {\n restrict: 'C',\n template: '',\n controller: 'AcChartAreaCtrl',\n scope: {\n uuid: '=',\n elements: '=',\n valueFieldName: '=',\n labelFieldName: '=',\n options: '='\n }\n };\n}).controller('AcChartAreaCtrl', function($scope, $eaChartConfig, $element) {\n\n // placeholder for the chart object as self\n $scope.chartElement = null;\n\n // define the chart container id\n $scope.chartContainerId = 'chart-container-' + $scope.uuid;\n\n // replace the id if necessary\n if ($element[0].id === null || $element[0].id === undefined || $element[0].id === '') {\n $element[0].id = $scope.chartContainerId;\n } else {\n $scope.chartContainerId = $element[0].id;\n }\n\n function generateDiagram() {\n // generate the series\n var series = $scope.elements.map(function(element) {\n return { name: element[$scope.labelFieldName], y: element[$scope.valueFieldName]};\n });\n\n // build the diagram\n var areaOptions = $eaChartConfig.createAreaConfig();\n areaOptions.chart.renderTo = $scope.chartContainerId;\n areaOptions.series.push({ data: series});\n\n if ($scope.options && $scope.options.ToolTipTemplate) { areaOptions.tooltip.pointFormat = $scope.options.ToolTipTemplate; }\n\n // y-Axis\n if ($scope.options && $scope.options.YAxisTemplate) {\n areaOptions.yAxis.labels.enabled = true;\n\n if (angular.isFunction($scope.options.YAxisTemplate)) {\n areaOptions.yAxis.labels.formatter= $scope.options.YAxisTemplate;\n } else {\n areaOptions.yAxis.labels.format = $scope.options.YAxisTemplate;\n }\n }\n\n // x-Axis\n if ($scope.options && $scope.options.XAxisTemplate) {\n areaOptions.xAxis.labels.enabled = true;\n\n if (angular.isFunction($scope.options.XAxisTemplate)) {\n areaOptions.xAxis.labels.formatter= $scope.options.XAxisTemplate;\n } else {\n areaOptions.xAxis.labels.format = $scope.options.XAxisTemplate;\n }\n }\n\n areaOptions.xAxis.allowDecimals = false;\n\n $scope.chartElement = new Highcharts.Chart(areaOptions);\n }\n\n $scope.$watch('elements', function() {\n if ($scope.chartElement) {\n generateDiagram();\n }\n });\n\n generateDiagram();\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').directive('eaNotificationCenter', function () {\n return {\n template: '' +\n '
' +\n '

Running local!

\\n' +\n '

The Notifications Center is only available in a production ready environment

' +\n '
',\n restrict: 'C',\n controller: 'EaNotificationCenterCtrl',\n scope: true\n };\n}).controller('EaNotificationCenterCtrl', function($scope) {\n\n}).service('$eaNotificationCenter', function($rootScope, $stateParams, $location) {\n var self = this;\n\n self.show = function() {\n\n $rootScope.notificationCenterRunningLocal = (location.hostname === 'localhost' || location.hostname === '127.0.0.1');\n\n if (!$rootScope.notificationCenterRunningLocal) {\n\n if ($stateParams.teamid) {\n $rootScope.shownotificationspanelhref = '/app2/teams/' + $stateParams.teamid + '/apps/notificationcenter?embedded=1';\n } else if ($location.path().indexOf('/csp') === 0) {\n $rootScope.shownotificationspanelhref = '/app2/teams/' + $stateParams.resellerId + '/apps/notificationcenter?embedded=1';\n }\n }\n\n $rootScope.notificationCenterShow = true;\n };\n\n self.close = function() {\n $rootScope.notificationCenterShow = false;\n };\n\n self.isOpen = function() {\n return $rootScope.notificationCenterShow;\n }\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').directive('eaWidgetHost', function($compile) {\n return {\n templateUrl: 'views/directive_ea_widget_host.html',\n controller: 'EaWidgetHostCtrl',\n restrict: 'C',\n scope: {\n widgetFs: '=',\n widget: '=',\n dashboard: '=',\n uuid: '=',\n title: '=',\n team: '=',\n contract: '=',\n token: '=',\n options: '=',\n profiles: '=',\n cust01: '=',\n maxPeriods: '='\n },\n link: function link(scope, element/*, attrs*/) {\n var el = $compile('
')(scope);\n angular.element(element).append(el);\n }\n };\n}).controller('EaWidgetHostCtrl', function($scope, $compile, $element, $timeout, $rootScope, $eaWidgetDashboardManager, $q) {\n\n // set the active mode\n $scope.active = true;\n\n // set the loading mode\n $scope.loading = true;\n $scope.loadingMessage = undefined;\n\n // allows to enable and disable the loading mode\n $scope.setLoading = function(loading) {\n $scope.loading = loading;\n };\n\n $scope.setLoadingMesage = function(message) {\n $scope.loadingMessage= message;\n };\n\n // gives information about the active state\n $scope.isActive = function() {\n return $scope.active;\n };\n\n // when we navigate the widget should be disabled\n $rootScope.$on('$stateChangeStart', function() {\n console.log('Disabling widget ' + $scope.dashboard + '#' + $scope.uuid + ' because of navigation');\n $scope.active = false;\n });\n\n // This triggeres that the widget as self is ready with all things\n // to establish himself in the infrastructure. At this point no data are loaded at all\n $scope.finalizeRegistration = function() {\n $eaWidgetDashboardManager.finishWidgetRegistration($scope.dashboard, $scope.uuid);\n };\n\n // Notifies all dependent widgets that the data of this widget has changed\n $scope.refreshDependentWidgets = function() {\n $eaWidgetDashboardManager.refreshDependentWidgets($scope.dashboard, $scope.uuid);\n };\n\n // Post an action\n $scope.executeDashboardAction = function(functionId, args) {\n return $eaWidgetDashboardManager.sendDashboardFunction($scope.dashboard, functionId, args);\n };\n\n $scope.toggleState = function(actionProperty, stateKey) {\n $scope.options.dataItems[actionProperty + 'State'] = stateKey;\n $eaWidgetDashboardManager.reload($scope.dashboard);\n };\n\n $scope.isActiveState = function(actionProperty, stateKey) {\n return ($scope.options.dataItems[actionProperty + 'State'] === stateKey);\n };\n\n $scope.toggleStateFunc = function(action, stateKey) {\n $scope.options.dataItems[action['actionActive'] + 'State'] = stateKey;\n\n $scope.executeDashboardAction(action['actionToggle'], { state: stateKey }).then(function(reloadNeeded) {\n if (reloadNeeded) {\n $eaWidgetDashboardManager.reload($scope.dashboard);\n }\n });\n };\n\n $scope.isActiveStateFunc = function(action, stateKey) {\n return ($scope.options.dataItems[action['actionActive'] + 'State'] === stateKey);\n };\n\n // Initializing of widget\n $scope.onInitialize = function(cb) {\n $eaWidgetDashboardManager.onWidgetInitialize($scope.dashboard, $scope.uuid, function() {\n\n // initialize the states\n var actionInitializers = [];\n\n // check if we have actions\n if ($scope.options && $scope.options.periodItems && $scope.options.periodItems.actions) {\n\n $scope.options.periodItems.actions\n .filter(function(item) { return item.actionType === 'StateToggleFunc'; })\n .forEach(function (action) {\n actionInitializers.push($scope.executeDashboardAction(action['actionActive']).then(function(activeState) {\n $scope.options.dataItems[action['actionActive'] + 'State'] = activeState;\n return $q.when();\n }));\n });\n }\n\n return $q.all(actionInitializers).then(function() {\n $scope.active = true;\n return cb();\n });\n });\n };\n\n $scope.onReload = function(cb) {\n $eaWidgetDashboardManager.onWidgetReload($scope.dashboard, $scope.uuid, cb);\n };\n\n // Resize Handling\n var resizeCallback = null;\n $scope.onResize = function(cb) {\n resizeCallback = cb;\n };\n\n $scope.getSize = function () {\n return { 'h': $element.height(), 'w': $element.width() };\n };\n\n $scope.requestResize = function(newValue) {\n\n // get the newValue\n if (!newValue) { newValue = $scope.getSize(); }\n\n // adjust the correct size of the widget as self\n var widgetElement = angular.element($element).find('div.ea-widget');\n\n // check how much we need to remove becasue of title\n var titleHeight = angular.element($element).find('h1.widget-title').height();\n\n // set the height of the widget element\n angular.element(widgetElement).height(newValue.h - titleHeight);\n angular.element(widgetElement).width(newValue.w);\n\n // check if we need to call the child callback\n if (resizeCallback) { resizeCallback({ w: newValue.w, h: newValue.h - titleHeight }); }\n };\n\n $scope.$watch($scope.getSize, function (newValue/*, oldValue*/) {\n\n // from the height perspective we take a fixed value\n if ($scope.widgetFs === true) { newValue.h = window.innerHeight - 115; }\n\n // request the resize\n $scope.requestResize(newValue);\n }, true);\n\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').directive('eaWidgetDashboard', function () {\n return {\n template:\n '
' +\n '
    ' +\n '
  • ' +\n '
    ' +\n '
    ' +\n '
    0\" class=\"ea-widget-host-connected-flag\"' +\n 'popover-title=\"Connected Widget\" ' +\n 'popover-html-unsafe=\"This widget displays a connected view which will be influenced from an other widget directly.\"' +\n 'popover-trigger=\"mouseenter\" ' +\n 'popover-placement=\"left\">' +\n '
    ' +\n '
    ' +\n '' +\n '
    ' +\n '
    ' +\n '' +\n '
    ' +\n '
    ' +\n '' +\n '
    ' +\n '
  • '+\n '
'+\n '
' +\n '
' +\n '
' +\n '
' +\n '
' +\n '' +\n '
' +\n '
',\n restrict: 'EC',\n controller: 'EaWidgetDashboardCtrl',\n scope: {\n dashboard: '=',\n team: '=',\n contract: '=',\n token: '=',\n editMode: '=',\n profile: '=',\n collection: '=',\n layout: '=',\n maxPeriods: '=',\n cust01: '='\n }\n };\n}).controller('EaWidgetDashboardCtrl', function($scope, $rootScope, $eaDataCoordinator, $eaWidgetDashboardManager, $eaWidgetDashboardLayoutManager, $eaBackend, $window) {\n\n // define the fullscreen mode\n $scope.fullScreenMode = false;\n $scope.fullScreenItem = undefined;\n\n // configure the grid\n $scope.gridsterOpts = {\n columns: 12,\n rowHeight: 120,\n resizable: {\n enabled: false\n },\n draggable: {\n enabled: false\n }\n };\n\n // ensure we have an array\n $scope.dashboardItems = [];\n $scope.dashboardItemsBackUp = [];\n\n // initialize the laoyut version for this dashboard\n if ($scope.layout && $scope.dashboard) {\n $eaWidgetDashboardLayoutManager.overridLayoutVersion($scope.dashboard, $scope.layout);\n }\n\n // initialize the cache hash\n $eaDataCoordinator.invalidate($scope.profile.cacheHash);\n\n // establish the rebuild function for a dashboard\n function rebuild() {\n\n // register events from our manager service\n $eaWidgetDashboardManager.onDashboardEvent($scope.dashboard, 'reload', function() {\n\n // invalidate the cache\n $eaDataCoordinator.invalidate($scope.profile.cacheHash);\n\n // send a reload event for every dashboard item\n $scope.dashboardItems.forEach(function(item) {\n $eaWidgetDashboardManager.reloadWidget($scope.dashboard, item.uuid);\n });\n\n });\n\n $scope.dashboardItems = [];\n\n // load the items\n return $eaWidgetDashboardManager.loadDashboard($scope.dashboard, $scope.team, $scope.contract, $scope.token, $scope.collection).then(function(items) {\n\n // load the dashboard layout and override it\n return $eaBackend.dataGetDashboardLayout($scope.team, $scope.dashboard, $scope.collection, $scope.token).then(function(layoutItems) {\n\n // override the layout\n $eaWidgetDashboardLayoutManager.overrideDashboardLayout($scope.dashboard, layoutItems.items);\n\n // apply the layout\n $eaWidgetDashboardLayoutManager.extendLayout($scope.dashboard, items);\n\n // done\n $scope.dashboardItems = items;\n Array.prototype.push.apply($scope.dashboardItemsBackUp, items);\n });\n });\n }\n\n // register events from our manager service\n $eaWidgetDashboardManager.onDashboardEvent($scope.dashboard, 'rebuild', function() {\n rebuild();\n });\n\n\n $scope.$watch('editMode', function(newValue, oldValue) {\n\n $scope.gridsterOpts.resizable.enabled = $scope.editMode;\n $scope.gridsterOpts.draggable.enabled = $scope.editMode;\n\n if ($scope.editMode === false && newValue !== oldValue && oldValue === true) {\n // store the layout to server\n var items = $eaWidgetDashboardLayoutManager.getDashboardLayout($scope.dashboard);\n $eaBackend.dataPostDashboardLayout($scope.team, $scope.dashboard, $scope.collection, items, $scope.token);\n }\n\n });\n\n $scope.$watch('dashboard', function() {\n rebuild();\n });\n\n $scope.$watch('profile', function() {\n $eaDataCoordinator.invalidate($scope.profile.cacheHash);\n });\n\n // Check when the user moves the tiles around\n $scope.$watch('dashboardItems', function(items){\n if (items.length === 0) { return; }\n $eaWidgetDashboardLayoutManager.storeLayout($scope.dashboard, items);\n }, true);\n\n // Show on item in fullscreen mode\n $scope.enterFullScreen = function(item) {\n $scope.fullScreenItem = item;\n $scope.fullScreenMode = true;\n };\n\n $scope.leaveFullScreen = function(/* item */) {\n // leave full screen mode\n $scope.fullScreenMode = false;\n $scope.fullScreenItem = undefined;\n\n // rebuild charts\n rebuild();\n };\n\n $scope.deleteCustomWidget = function(item) {\n return $eaDataCoordinator.deleteModel($scope.team, $scope.contract, $scope.token, 'DashboardItemClass', item, {collection: $scope.collection}).then(function() {\n // rebuild charts\n rebuild();\n });\n };\n\n $scope.openCustomWidget = function(item) {\n\n // adjust the target url for relative uris\n var targetUri = item.options.src;\n\n if (item.options.src.indexOf('http') !== 0) {\n targetUri = item.options.src.split('?')[0];\n }\n\n // open new window with the url\n $window.open(targetUri, '_blank');\n\n }\n\n}).service('$eaWidgetDashboardManager', function($rootScope, $timeout, $q, $eaDataCoordinator, $eaUserProfile, rfc4122) {\n var self = this;\n\n var dashboardItemCache = {};\n var dashboardFunctionCache = {};\n\n function createDashboardBasedEventName(dashboardId, event) {\n return 'dashboard.' + dashboardId + '.' + event;\n }\n\n function createWidgetBasedEventName(dashboardId, widgetId, event) {\n return 'dashboard.' + dashboardId + '.widgets.' + widgetId + '.' + event;\n }\n\n function lookupDashboardItem(dashboardId, widgetId) {\n return dashboardItemCache[dashboardId][widgetId];\n }\n\n // loads the dashboard items from the datasource\n self.loadDashboard = function(dashboardId, team, contract, token, collection) {\n\n // resolve the user profile\n return $eaUserProfile.load(token).then(function(userProfile) {\n\n // resolve the team profile\n var teamProfile = $eaUserProfile.getTeam(userProfile, team);\n\n // load the dashboard information\n return $eaDataCoordinator.query(team, contract, token, 'DashboardItemClass', {collection: collection}).then(function(dashboardItems) {\n\n // store the information\n dashboardItemCache[dashboardId] = {};\n dashboardItems.forEach(function(item) {\n item._internalDashboardState = 0;\n item._internalDelayedActivations = [];\n item._internalReferencedBy = [];\n dashboardItemCache[dashboardId][item.ItemUuid] = item;\n });\n\n // convert the widgets\n return $q.when(dashboardItems.map(function(item) {\n return {\n sizeX: item.Size.x, sizeY: item.Size.y, row: item.Position.x, col: item.Position.y,\n widget: item.ItemType,\n uuid: item.ItemUuid,\n title: item.ItemTitle,\n wtype: item.ItemWidgetType ? item.ItemWidgetType : 'System',\n options: item.ItemOptions,\n connections: item.ItemDependencies,\n profiles: {\n user: userProfile,\n team: teamProfile\n }\n };\n }));\n });\n });\n };\n\n // allow to lookup dashboard item\n self.findDashboardItem = function(dashboardId, widgetId) {\n return lookupDashboardItem(dashboardId, widgetId);\n };\n\n // allows to reload the data\n self.reload = function(dashboardId) {\n $rootScope.$emit(createDashboardBasedEventName(dashboardId, 'reload'));\n };\n\n // allows to rebuild the data\n self.rebuild = function(dashboardId) {\n $rootScope.$emit(createDashboardBasedEventName(dashboardId, 'rebuild'));\n };\n\n self.reloadWidget = function(dashboardId, widgetId) {\n $rootScope.$emit(createWidgetBasedEventName(dashboardId, widgetId, 'reload'));\n };\n\n self.postDashboardEvent = function(dashboardId, eventName, payload) {\n $rootScope.$emit(createDashboardBasedEventName(dashboardId, eventName), payload);\n };\n\n self.onDashboardEvent = function(dashboardId, eventName, cb) {\n var eventName = createDashboardBasedEventName(dashboardId, eventName);\n var eventHandlerFunc = $rootScope.$on(eventName, function(event, args) {\n cb(args);\n });\n\n dashboardFunctionCache[eventName] = eventHandlerFunc;\n };\n\n self.offDashboardEvent = function(dashboardId, eventName) {\n var eventName = createDashboardBasedEventName(dashboardId, eventName);\n var eventHandlerFunc = dashboardFunctionCache[eventName];\n if (eventHandlerFunc) {\n eventHandlerFunc();\n delete dashboardFunctionCache[eventName];\n }\n };\n\n self.sendDashboardFunction = function(dashboardId, functionId, args) {\n var defer = $q.defer();\n\n // establish a listener for ack function\n var sessionAck = 'execute.ack.' + rfc4122.v4();\n self.onDashboardEvent(dashboardId, sessionAck, function(ackArgs) {\n\n // unregister listener\n self.offDashboardEvent(dashboardId, sessionAck);\n\n // process the result\n if (ackArgs.success) {\n return defer.resolve(ackArgs.result);\n } else {\n return defer.reject(ackArgs.error);\n }\n });\n\n // send teh event\n self.postDashboardEvent(dashboardId, 'execute.' + functionId, { func: functionId, ack: sessionAck, args: args});\n\n // done\n return defer.promise;\n };\n\n self.onDashboardFunction = function(dashboardId, functionId, cb) {\n return self.onDashboardEvent(dashboardId, 'execute.' + functionId, cb);\n };\n\n self.finishDashboardFunction = function(dashboardId, args, result, error) {\n var payload = {\n success: error ? false : true,\n result: result,\n error: error\n };\n\n self.postDashboardEvent(dashboardId, args.ack, payload);\n };\n\n self.finishWidgetRegistration = function(dashboardId, widgetId) {\n\n // log\n console.log('Processing widget registration: ' + dashboardId + '.' + widgetId);\n\n // check if all widgets available which are associated with this widget\n // if not put it on the pending registration list and initialize it later\n var dashboardItem = lookupDashboardItem(dashboardId, widgetId);\n if (!dashboardItem) { return; }\n\n var missingDependencies = [];\n if (dashboardItem.ItemDependencies && dashboardItem.ItemDependencies.length > 0) {\n\n // log\n console.log('Widget has depedencies, checking if we need to delay the activation');\n\n // check if we have all dependencies loads\n dashboardItem.ItemDependencies.forEach(function(dependency) {\n var referencedItem = lookupDashboardItem(dashboardId, dependency);\n if (!referencedItem ||referencedItem._internalDashboardState === 0) {\n // log\n console.log('\\tDependent widget not registered yet: ' + dashboardId + '.' + dependency);\n\n // register\n missingDependencies.push(dependency);\n referencedItem._internalDelayedActivations.push(dashboardItem);\n referencedItem._internalReferencedBy.push(dashboardItem);\n }\n });\n }\n\n // put the widget in the list of widget we need to initialize delayed or\n // jsut initialize it now\n if (missingDependencies.length === 0 ) {\n\n // mark the item as initialize\n dashboardItem._internalDashboardState = 1;\n\n // init the widget with data\n $timeout(function() {\n\n // send the message\n $rootScope.$emit(createWidgetBasedEventName(dashboardId, widgetId, 'initialize'));\n\n // try to finish the registration of all delayed activations\n if (dashboardItem._internalDelayedActivations.length > 0) {\n\n // log\n console.log('\\tActivating delayed activations...');\n\n dashboardItem._internalDelayedActivations.forEach(function(delayedItems) {\n self.finishWidgetRegistration(dashboardId, delayedItems.ItemUuid);\n });\n }\n\n }, 100);\n }\n };\n\n self.refreshDependentWidgets = function(dashboardId, widgetId) {\n\n // load the dependent items\n var dashboardItem = lookupDashboardItem(dashboardId, widgetId);\n if (!dashboardItem || !dashboardItem._internalReferencedBy || dashboardItem._internalReferencedBy.length === 0) { return; }\n\n // reload all dependent items\n dashboardItem._internalReferencedBy.forEach(function(item) {\n self.reloadWidget(dashboardId, item.ItemUuid);\n });\n\n };\n\n self.onWidgetInitialize = function(dashboardId, widgetId, cb) {\n\n console.log('Received onWidgetInitialize for ' + dashboardId + '.' + widgetId);\n\n $rootScope.$on(createWidgetBasedEventName(dashboardId, widgetId, 'initialize'), function() {\n cb().then(function() {\n console.log('Finsihed onWidgetInitialize for ' + dashboardId + '.' + widgetId);\n }).catch(function(error) {\n console.log('Failed onWidgetInitialize for ' + dashboardId + '.' + widgetId +': ' + error);\n });\n });\n };\n\n self.onWidgetReload = function(dashboardId, widgetId, cb) {\n $rootScope.$on(createWidgetBasedEventName(dashboardId, widgetId, 'reload'), cb);\n };\n\n self.addCustomWidget = function(dashboardId, team, contract, token, collection, widgetDescription) {\n\n // inject the custom widget flag\n widgetDescription.ItemWidgetType = 'CustomWidget';\n\n // inject the widget into the data source\n return $eaDataCoordinator.storeModel(team, contract, token, 'DashboardItemClass', widgetDescription, {collection: collection}).then(function() {\n\n // rebuild the dashboard\n self.postDashboardEvent(dashboardId, \"rebuild\", null);\n\n // done\n return $q.when(widgetDescription);\n });\n }\n\n}).service('$eaWidgetDashboardLayoutManager', function() {\n\n var self = this;\n\n var layoutSchemeVersion = 'v2';\n var layoutSchemeOverrides = {};\n\n function getLayoutSchemeVersion(dashboardId) {\n if (layoutSchemeOverrides[dashboardId]) {\n return layoutSchemeOverrides[dashboardId];\n } else {\n return layoutSchemeVersion;\n }\n }\n\n self.overridLayoutVersion = function(dashboardId, newVersion) {\n layoutSchemeOverrides[dashboardId] = newVersion;\n };\n\n self.storeLayout = function(dashboardId, dashboardItems) {\n console.log('Storing dashboard layout for ' + dashboardId);\n\n // prepare the payload\n var payload = {};\n dashboardItems.forEach(function(item) {\n payload[item.uuid] = { 'sizeX': item.sizeX,'sizeY': item.sizeY, 'row': item.row ,'col': item.col };\n });\n\n // store\n localStorage.setItem(dashboardId + '#' + getLayoutSchemeVersion(dashboardId) + '.layout', JSON.stringify(payload));\n };\n\n self.extendLayout = function(dashboardId, dashbordItems) {\n console.log('Loading dashboard layout for ' + dashboardId);\n\n // load the layout\n var layout = localStorage.getItem(dashboardId + '#' + getLayoutSchemeVersion(dashboardId) + '.layout');\n if (layout) {\n layout = JSON.parse(layout);\n\n dashbordItems.forEach(function(item) {\n angular.extend(item, layout[item.uuid]);\n });\n }\n };\n\n self.getDashboardLayout = function(dashboardId) {\n\n // load the layout\n var layout = localStorage.getItem(dashboardId + '#' + getLayoutSchemeVersion(dashboardId) + '.layout');\n if (!layout) { return []; }\n\n // parse\n layout = JSON.parse(layout);\n\n // convert into layout items\n var resultItems = [];\n Object.keys(layout).forEach(function(el) {\n resultItems.push(angular.extend(layout[el], { itemId: el }));\n });\n\n return resultItems;\n };\n\n self.overrideDashboardLayout = function(dashboardId, layoutItems) {\n // prepare the payload\n var payload = {};\n layoutItems.forEach(function(item) {\n payload[item.itemId] = { 'sizeX': item.sizeX,'sizeY': item.sizeY, 'row': item.row ,'col': item.col };\n });\n localStorage.setItem(dashboardId + '#' + getLayoutSchemeVersion(dashboardId) + '.layout', JSON.stringify(payload));\n }\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').directive('eaWidgetRepository', function () {\n return {\n templateUrl: 'views/directive_ea_widget_repository.html',\n restrict: 'C',\n controller: 'EaWidgetRepositoryCtrl',\n scope: {\n dashboard: '=',\n team: '=',\n contract: '=',\n token: '=',\n collection: '='\n }\n };\n}).controller('EaWidgetRepositoryCtrl', function($scope, $eaWidgetRepository, rfc4122, ngToast, $q, $eaBackend) {\n var self = this;\n\n $scope.selectedWidget = undefined;\n\n $scope.formData = {\n General: {\n Id: rfc4122.v4(),\n Title: '',\n Type: ''\n },\n\n IFrame: {\n Url: ''\n },\n\n Report: {\n Id: '',\n ShowGridActions: true,\n GridPageSize: 50,\n GridMode: 'table',\n GridPieBy: undefined,\n GridPieReduce: undefined,\n GridPieAt: undefined\n }\n };\n\n $scope.reportGridModes = [\n { id: 'table', name: 'Table'},\n { id: 'pie', name: 'Pie Chart'}\n ];\n\n $scope.reportGridPieOperations = [\n { id: 'count', name: 'Count'},\n { id: 'sum', name: 'Sum'},\n { id: 'min', name: 'Min'},\n { id: 'max', name: 'Max'},\n { id: 'avg', name: 'Avg'}\n ];\n\n $scope.loadedReports = [];\n\n function loadReportsFromReportCenter() {\n return $eaBackend.dataGetReportCenterReportDefinitions($scope.team, $scope.token).then(function(reports) {\n $scope.loadedReports = reports;\n return $q.when();\n })\n }\n\n function loadDataForWidgetInRepository(widgetType) {\n switch(widgetType) {\n case 'report':\n return loadReportsFromReportCenter();\n break;\n default:\n return $q.when();\n break;\n }\n }\n\n $scope.closePanel = function() {\n $eaWidgetRepository.hideRepository();\n };\n\n $scope.selectWidget = function(widgetType) {\n\n // execute the data loaded for this widget type\n return loadDataForWidgetInRepository(widgetType).then(function() {\n $scope.formData.General.Id = rfc4122.v4();\n $scope.selectedWidget = widgetType;\n });\n };\n\n $scope.cancelForm = function()\n {\n $scope.selectedWidget = undefined;\n };\n\n $scope.saveWidget = function() {\n\n // set the correct type\n $scope.formData.General.Type = $scope.selectedWidget;\n\n // close the panel\n $eaWidgetRepository.hideRepository();\n\n // register the widget\n return $eaWidgetRepository.registerCustomWidget($scope.dashboard, $scope.team, $scope.contract, $scope.token, $scope.collection, $scope.formData).then(function() {}, function(error) {\n\n // notify regarding error\n ngToast.create({\n className: 'danger',\n content: 'Error! Failed to attach widget: ' + error + ''\n });\n })\n }\n\n\n}).service('$eaWidgetRepository', function($rootScope, $eaWidgetDashboardManager) {\n var self = this;\n\n self.showRepository = function() {\n $rootScope.showWidgetRepository = true;\n };\n\n self.hideRepository = function() {\n $rootScope.showWidgetRepository = false;\n };\n\n self.registerCustomWidget = function(dashboardId, teamId, contractId, dataToken, collection, formData) {\n\n // build a typically widget\n var widgetDescription = {\n Size : {\n x: 4,\n y: 2\n },\n Position : {\n x: 0,\n y: 0\n },\n ItemType: formData.General.Type,\n ItemUuid: formData.General.Id,\n ItemTitle: formData.General.Title,\n ItemOptions: {\n collection: collection\n },\n ItemDependencies : []\n };\n\n // put the specific data into it\n switch(formData.General.Type) {\n case 'iframe': {\n widgetDescription.ItemOptions.src = formData.IFrame.Url;\n break;\n }\n case 'report': {\n widgetDescription.ItemType = 'iframe';\n widgetDescription.ItemOptions.src = '/app2/teams/'+ teamId + '/apps/reportcenter/'+ formData.Report.Id + '/show/latest?embedded=1&gridActions=' + (formData.Report.ShowGridActions ? '1' : '0') + '&gridPageSize=' + formData.Report.GridPageSize;\n\n if (formData.Report.GridMode && formData.Report.GridMode === 'pie') {\n widgetDescription.ItemOptions.src += '&gridMode=pie&gridPieBy=' + formData.Report.GridPieBy + '&gridPieReduce=' + formData.Report.GridPieReduce + '&gridPieAt=' + formData.Report.GridPieAt;\n }\n\n break;\n }\n default:\n break;\n }\n\n return $eaWidgetDashboardManager.addCustomWidget(dashboardId, teamId, contractId, dataToken, collection, widgetDescription);\n }\n});\n\n","'use strict';\n\n/*\n * This widget is able to render a stacked bar. The widget accepts the following additional options:\n *\n * - title - The title of the widget\n * - categories - The property we use to define the categories\n * - series - The property we use to define the series\n * - value - The property which will be aggregated in the series group\n * - filter - Check the general filter documentation\n *\n * The following JSON structure needs to be applied to the dashboards overview\n *\n * options: {\n * filter: [],\n * categories: 'spendings.Month',\n * series: 'spendings.SubscriptionId',\n * value: 'spendings.Costs'\n * }\n *\n */\nangular.module('azureCostsFeApp').directive('eaWidgetChartStackedBar', function() {\n return {\n restrict: 'C',\n template: '

Currently no data available

',\n controller: 'EaWidgetChartStackedBarCtrl'\n };\n}).controller('EaWidgetChartStackedBarCtrl', function($scope, $timeout, $filter, $interpolate, $eaChartConfig, $eaDataCoordinator, $eaDataGroupOperations, $eaDataAggregateOperations, $eaDataColorThemeGenerator, $acDpnService, $acLocaleService) {\n\n // store the chart element\n var chartElement = null;\n $scope.hasData = false;\n\n function buildDashboard() {\n\n // switch on the loading mode\n $scope.setLoading(true);\n\n // load the group option we want to use\n return $eaDataCoordinator.queryData($scope.team, $scope.contract, $scope.token, $scope.options.series, null).then(function(groupOption) {\n\n // check if we are active or not\n if (!$scope.isActive()) { return; }\n\n // the series property\n var seriesProperty = $scope.options.series;\n if (groupOption) { seriesProperty = groupOption.GroupProperty; }\n\n // load the data of the specific property by filter\n return $eaDataCoordinator.queryData($scope.team, $scope.contract, $scope.token, $scope.options.class, null).then(function(data) {\n\n // check if we are active or not\n if (!$scope.isActive()) { return; }\n\n // load the categories from the datasource if possible\n return $eaDataCoordinator.queryData($scope.team, $scope.contract, $scope.token, $scope.options.categories, null).then(function (loadedCategories) {\n\n // check if we are active or not\n if (!$scope.isActive()) { return; }\n\n // distinct the category values\n var categories = [];\n var categoryProperty = null;\n if (loadedCategories) {\n categories = loadedCategories.PeriodsAvailable;\n categoryProperty = loadedCategories.PeriodProperty;\n } else {\n categories = $eaDataAggregateOperations.execute('distinct', data, $scope.options.categories);\n categoryProperty = $scope.options.categories;\n }\n\n // prevent exception\n if (!categories) { categories = []; }\n\n var realCategoryCount = categories.length;\n\n // extend the categories to 12\n // this is our minimum amount of month we show\n if (categories.length < 12) {\n var newCategories = [];\n for(var i = 0; i < 12 -categories.length; i++) { newCategories.push(' '); }\n categories.forEach(function(e) { newCategories.push(e); })\n categories = newCategories;\n }\n\n // contains the aggregated values\n var predictionCategory = [];\n\n // group by our series attributeand by the categories attributes\n return $eaDataGroupOperations.groupBy(data, [seriesProperty, categoryProperty]).then(function (groupedData) {\n\n\n // check if we have data\n if (!groupedData || Object.keys(groupedData).length === 0) {\n\n // switch off the loading mode\n $scope.setLoading(false);\n\n // done without data\n return;\n }\n\n // define the series\n var series = [];\n var seriesHash = {};\n\n // visit every first level group\n Object.keys(groupedData).forEach(function (firstLevelGroupsKey) {\n\n // deifne the series name\n var seriesname = firstLevelGroupsKey;\n if (firstLevelGroupsKey === '') { seriesname = 'Without ' + seriesProperty; }\n\n // build a basic serie for this group\n var serie = {name: seriesname, display: undefined, type: 'column', data: []};\n\n // ensure we have the correct amount of elements\n categories.forEach(function () {\n serie.data.push(0);\n });\n\n // prepare the prediction field\n if (predictionCategory.length == 0) {\n categories.forEach(function () {\n predictionCategory.push(0);\n });\n }\n\n var firstLevelGroups = groupedData[firstLevelGroupsKey];\n\n Object.keys(firstLevelGroups).forEach(function (secondLevelGroupKeys) {\n\n // calculate the values\n var secondLevelGroup = firstLevelGroups[secondLevelGroupKeys];\n var aggregateValue = $eaDataAggregateOperations.execute($scope.options.func, secondLevelGroup, $scope.options.value);\n\n // get the correct index\n var color = $eaDataColorThemeGenerator.getColorFor($scope.contract + '#' + seriesProperty, seriesname.toLowerCase());\n\n // $scope.options.displayNameMapper\n if (secondLevelGroup && secondLevelGroup.length > 0 && $scope.options.displayNameMapper && $scope.options.displayNameMapper[seriesProperty]) {\n var displayValue = secondLevelGroup[0][$scope.options.displayNameMapper[seriesProperty]];\n serie.display = displayValue ? displayValue : serie.display;\n } else {\n var displayValue = Array.isArray(secondLevelGroup[0][seriesProperty]) ? seriesname : secondLevelGroup[0][seriesProperty];\n serie.display = displayValue ? displayValue : serie.display;\n }\n\n var categoryIndex = categories.indexOf(secondLevelGroupKeys);\n serie.data[categoryIndex] = {y: aggregateValue, color: color};\n predictionCategory[categoryIndex] += aggregateValue;\n });\n\n // add the serie\n series.push(serie);\n seriesHash[serie.name] = serie;\n });\n\n if ($scope.options.prediction && realCategoryCount >= 3) {\n // calculate the prediction (which is currently the average of the three month before)\n for (var i = categories.length - 1; i > 2; i--) {\n predictionCategory[i] = (predictionCategory[i - 1] + predictionCategory[i - 2] + predictionCategory[i - 1] - 3) / 3;\n }\n\n // set the first 0 values to 0\n predictionCategory[0] = null;\n predictionCategory[1] = null;\n predictionCategory[2] = null;\n\n var predictionSeries = {\n type: 'spline',\n name: 'Average',\n display: 'Trend',\n data: predictionCategory,\n marker: {\n lineWidth: 2,\n lineColor: '#F69D4D',\n fillColor: 'white'\n }\n };\n\n series.push(predictionSeries);\n seriesHash[predictionSeries.name] = predictionSeries;\n }\n\n // the highcharts container\n var containerId = 'chart-container-' + $scope.uuid;\n\n var stackBarOptions = $eaChartConfig.createStackedBarConfig();\n stackBarOptions.chart.renderTo = containerId;\n\n stackBarOptions.xAxis.categories = categories;\n stackBarOptions.series = series;\n\n var unitExpression = $interpolate($scope.options.unitLegend ? $scope.options.unitLegend : $scope.options.unit);\n stackBarOptions.yAxis.title.text = unitExpression(data[0]);\n\n var unitSymbolExpression = $interpolate($scope.options.unit);\n var unitSymbol = unitSymbolExpression(data[0]);\n\n // add a tooltip\n stackBarOptions.tooltip = {\n enabled: true,\n formatter: function() {\n var serie = seriesHash[this.series.name];\n if (!serie) { return \"\"; }\n\n var decimalSep = $acLocaleService.getDecimalSeperator();\n\n // convert the number\n var numberOutPut = $filter('currency')(this.y, '', 4);\n\n // do it better\n if (decimalSep === ',') {\n numberOutPut = numberOutPut.replace(',', 'X');\n numberOutPut = numberOutPut.replace('.', ',');\n numberOutPut = numberOutPut.replace('X', '.');\n }\n\n return '' + serie.display + '
' + numberOutPut + ' ' + unitSymbol + '';\n }\n };\n\n // switch off the loading mode\n $scope.setLoading(false);\n\n // Build the bar chart\n $timeout(function() {\n\n // check if we are active before painting to prevent exceptions\n if (!$scope.isActive()) { return; }\n\n // render the charts\n chartElement = new Highcharts.Chart(stackBarOptions);\n $scope.hasData = true;\n\n // resize the diagram\n $scope.requestResize();\n\n }, 100);\n });\n });\n });\n });\n }\n\n // initialize when the host is ready\n $scope.onInitialize(function() {\n\n // register operation for processing information\n $acDpnService.onProcessingItemsChanged(function(items) {\n\n if (items.length === 1) {\n $scope.setLoadingMesage('Processing of 1 new or updated report is pending, it takes just a couple seconds...');\n } else {\n $scope.setLoadingMesage('Processing of ' + items.length + ' new or updated reports are pending, it takes just a couple seconds...');\n }\n });\n\n $acDpnService.onProcessingFinished(function() {\n $scope.setLoadingMesage('All reports are processed');\n });\n\n // generate the dashboard\n return buildDashboard();\n });\n\n\n // establish the resize callback\n $scope.onResize(function(newSize) {\n if ( chartElement) { chartElement.setSize(newSize.w, newSize.h, false); }\n });\n\n $scope.onReload(function() {\n return buildDashboard();\n });\n\n // if we are here everyhting is ready to laod data\n $scope.finalizeRegistration();\n\n});\n","'use strict';\n\n/*\n * The following JSON structure needs to be applied to the dashboards overview\n *\n * options: {\n * filter: [],\n * value: {\n * property: 'spendings.Costs',\n * func: 'sum||count||avg',\n * max: 56575,\n * min: 0,\n * stops: [ [ stopValue, color], ... ]\n * }\n * }\n */\nangular.module('azureCostsFeApp').directive('eaWidgetChartArea', function() {\n return {\n restrict: 'C',\n template: '
',\n controller: 'EaWidgetChartAreaCtrl'\n };\n}).controller('EaWidgetChartAreaCtrl', function($scope, $eaChartConfig, $eaDataCoordinator, $eaDataAggregateOperations, $eaDataGroupOperations, $acDataSourceWidgetFunctions) {\n\n // store the chart element\n var chartElement = null;\n\n function buildDashboard() {\n\n // switch on the loading mode\n $scope.setLoading(true);\n\n\n // load the data of the specific property by filter\n return $eaDataCoordinator.queryData($scope.team, $scope.contract, $scope.token, $scope.options.class, {collection: $scope.options.collection, maxPeriods: $scope.maxPeriods}).then(function(data) {\n\n // check if we are active or not\n if (!$scope.isActive()) {\n $scope.setLoading(false);\n return;\n }\n\n // check if we got data\n if (!data) {\n $scope.setLoading(false);\n return;\n }\n\n // group by series key\n return $eaDataGroupOperations.groupBySingleDimension(data, $scope.options.series).then(function (groupedData) {\n\n // load the series keys\n var series = [];\n var allOver = 0;\n\n $acDataSourceWidgetFunctions.callWidgetFunction($scope.options.seriesValues, $scope).forEach(function(element) {\n\n // check if we have a value for this group\n var value = groupedData[element] ? groupedData[element].elements : null;\n if (value) {\n var y = $eaDataAggregateOperations.execute($scope.options.func, value, $scope.options.value, allOver);\n series.push({ name: element, y: y});\n allOver += $eaDataAggregateOperations.execute('sum', value, $scope.options.value);\n } else {\n series.push({ name: '', y: 0});\n }\n });\n\n // unit symbol\n var unitSymbol = data && data[0] ? data[0][$scope.options.unit] : null;\n if (!unitSymbol) {\n unitSymbol = '';\n }\n\n // the highcharts container\n var containerId = 'chart-container-' + $scope.uuid;\n\n var areaOptions = $eaChartConfig.createAreaConfig();\n areaOptions.chart.renderTo = containerId;\n areaOptions.series.push({ data: series});\n areaOptions.tooltip.pointFormat = $scope.options.valueLabel + ': {point.y:,.2f} ' + unitSymbol + '';\n\n // check if we are active before painting to prevent exceptions\n if (!$scope.isActive()) { return; }\n\n chartElement = new Highcharts.Chart(areaOptions);\n $scope.requestResize();\n\n // switch off the loading mode\n $scope.setLoading(false);\n });\n });\n }\n\n // establish the resize callback\n $scope.onResize(function(newSize) {\n if ( chartElement) { chartElement.setSize(newSize.w, newSize.h, false); }\n });\n\n // initialize when the host is ready\n $scope.onInitialize(function() {\n return buildDashboard();\n });\n\n $scope.onReload(function() {\n return buildDashboard();\n });\n\n // if we are here everyhting is ready to laod data\n $scope.finalizeRegistration();\n\n});\n","'use strict';\n\n/*\n * This widget is able to render a gauge by a give property. The value of this property will aggregated with one of the\n * following aggregate function:\n *\n * - sum\n * - count\n * - avg\n *\n * Beside this the widget accepts the following additional options:\n *\n * - title - The title of the widget\n * - min - The min value\n * - max - The max value\n * - stops - The different stops incl. color codes\n * - filter - Check the general filter documentation\n *\n * The following JSON structure needs to be applied to the dashboards overview\n *\n * options: {\n * filter: [],\n * value: {\n * property: 'spendings.Costs',\n * func: 'sum||count||avg',\n * max: 56575,\n * min: 0,\n * stops: [ [ stopValue, color], ... ]\n * }\n * }\n *\n */\nangular.module('azureCostsFeApp').directive('eaWidgetChartGauge', function() {\n return {\n restrict: 'C',\n template: '
',\n controller: 'EaWidgetChartGaugeCtrl'\n };\n}).controller('EaWidgetChartGaugeCtrl', ['$scope', '$eaChartConfig', '$eaDataCoordinator', '$eaDataAggregateOperations', function($scope, $eaChartConfig, $eaDataCoordinator, $eaDataAggregateOperations) {\n\n // store the chart element\n var chartElement = null;\n\n function buildDashboard() {\n\n // check if we are active or not\n if (!$scope.isActive()) { return; }\n\n // switch on the loading mode\n $scope.setLoading(true);\n\n // load the data of the specific property by filter\n return $eaDataCoordinator.queryData($scope.team, $scope.contract, $scope.token, $scope.options.value.class, {maxPeriods: $scope.maxPeriods}).then(function(data) {\n\n // apply the aggregate function to the data to get the single value\n var aggregatedValue = $eaDataAggregateOperations.execute($scope.options.value.func, data, $scope.options.value.property);\n\n // the highcharts container\n var containerId = 'chart-container-' + $scope.uuid;\n\n var gaugeOptions = $eaChartConfig.createGaugeConfig();\n gaugeOptions.chart.renderTo = containerId;\n gaugeOptions.yAxis.min = $scope.options.value.min;\n gaugeOptions.yAxis.max = $scope.options.value.max;\n gaugeOptions.yAxis.stops = $scope.options.value.stops;\n\n gaugeOptions.series.push({name: $scope.title, data: [aggregatedValue]});\n\n // check if we are active before painting to prevent exceptions\n if (!$scope.isActive()) { return; }\n\n chartElement = new Highcharts.Chart(gaugeOptions);\n $scope.requestResize();\n\n // switch off the loading mode\n $scope.setLoading(false);\n\n });\n }\n\n // establish the resize callback\n $scope.onResize(function(newSize) {\n if ( chartElement) { chartElement.setSize(newSize.w, newSize.h, false); }\n });\n\n // initialize when the host is ready\n $scope.onInitialize(function() {\n return buildDashboard();\n });\n\n $scope.onReload(function() {\n return buildDashboard();\n });\n\n // if we are here everyhting is ready to laod data\n $scope.finalizeRegistration();\n\n}]);\n","'use strict';\n\n/*\n options: {\n filter: [],\n class: 'SpendingEntryClass',\n group: 'SubscriptionName',\n value: 'ServiceCosts',\n func: 'sum',\n unit: '€'\n }\n*/\nangular.module('azureCostsFeApp').directive('eaWidgetChartPie', function() {\n return {\n restrict: 'C',\n template: '
',\n controller: 'EaWidgetChartPieCtrl'\n };\n}).controller('EaWidgetChartPieCtrl', function($scope, $eaChartConfig, $eaDataCoordinator, $eaDataGroupOperations, $eaDataAggregateOperations, $eaDataColorThemeGenerator) {\n\n // store the chart element\n var chartElement = null;\n var exitWidget = false;\n\n function buildDashboard() {\n\n // switch on the loading mode\n $scope.setLoading(true);\n\n // load the data of the specific property by filter\n return $eaDataCoordinator.queryData($scope.team, $scope.contract, $scope.token, $scope.options.class, {maxPeriods: $scope.maxPeriods}).then(function(data) {\n\n // check if we are active after data log\n if (!$scope.isActive()) { return; }\n\n // check if we got data\n if (!data) { return; }\n\n // group the elements\n return $eaDataGroupOperations.groupBySingleDimension(data, $scope.options.group).then(function (groupedData) {\n\n // the highcharts container\n var containerId = 'chart-container-' + $scope.uuid;\n\n // calculate the unit symbol\n var unitSymbol = $scope.options.unit;\n if (data.length > 0) {\n\n unitSymbol = data[0][$scope.options.unit];\n\n if (!unitSymbol) {\n unitSymbol = $scope.options.unit;\n }\n }\n\n var pieOptions = $eaChartConfig.createPieConfig();\n pieOptions.chart.renderTo = containerId;\n pieOptions.tooltip.pointFormat = $scope.options.valueLabel + ': {point.y:.2f}' + unitSymbol + ''\n\n pieOptions.series.push({\n name: 'Value',\n colorByPoint: true,\n data: []\n });\n\n // aggregate the groups\n var indexOfBiggestOne = -1;\n var lastBiggestValue = 0;\n Object.keys(groupedData).forEach(function(k) {\n\n var y = $eaDataAggregateOperations.execute($scope.options.func, groupedData[k].elements, $scope.options.value);\n if (y > lastBiggestValue) {\n lastBiggestValue = y;\n indexOfBiggestOne = pieOptions.series[0].data.length;\n }\n\n pieOptions.series[0].data.push({\n name: groupedData[k].name,\n y: y,\n color: $eaDataColorThemeGenerator.getColorFor($scope.contract + '#' + $scope.options.group , k)\n });\n\n });\n\n // slice the biggest on e\n if ( indexOfBiggestOne != -1) {\n pieOptions.series[0].data[indexOfBiggestOne].sliced = true;\n }\n\n // check if we are active before painting to prevent exceptions\n if (!$scope.isActive()) { return; }\n\n // build the chart\n chartElement = new Highcharts.Chart(pieOptions);\n $scope.requestResize();\n\n // switch off the loading mode\n $scope.setLoading(false);\n })\n });\n }\n\n // establish the resize callback\n $scope.onResize(function(newSize) {\n if ( chartElement) { chartElement.setSize(newSize.w, newSize.h, false); }\n });\n\n // initialize when the host is ready\n $scope.onInitialize(function() {\n return buildDashboard();\n });\n\n $scope.onReload(function() {\n return buildDashboard();\n });\n\n // if we are here everyhting is ready to laod data\n $scope.finalizeRegistration();\n\n});\n","'use strict';\n\n/*\n * This widget is able to render just a simple value by the following aggregate function:\n *\n * - sum\n * - count\n * - avg\n *\n * Beside this the widget accepts the following additional options:\n *\n * - title - The title of the widget\n * - filter - Check the general filter documentation\n *\n * The following JSON structure needs to be applied to the dashboards overview\n *\n * options: {\n * filter: [],\n * value: {\n * property: 'spendings.Costs',\n * func: 'sum||count||avg',\n * unit: '€'\n * }\n * }\n *\n */\nangular.module('azureCostsFeApp').directive('eaWidgetSimpleValue', function() {\n return {\n restrict: 'C',\n template: '

{{widgetValue}} {{widgetUnit}}

',\n controller: 'EaWidgetSimpleValueCtrl'\n };\n}).controller('EaWidgetSimpleValueCtrl', function($scope, $eaDataCoordinator, $eaDataAggregateOperations, $eaConfig) {\n\n // init the value\n $scope.widgetValue = 0;\n $scope.widgetUnit = $scope.options.value.unit;\n $scope.colorStyle = {};\n $scope.format = $scope.options.value.format || '(0.00 a)';\n\n // patch the values by config\n if ($scope.format.indexOf('config.') !== -1) {\n if ($eaConfig.numberFormat) {\n $scope.format = $eaConfig.numberFormat;\n } else {\n $scope.format = '(0.00 a)';\n }\n }\n\n function buildDashboard() {\n\n // switch on the loading mode\n $scope.setLoading(true);\n\n // load the data of the specific property by filter\n return $eaDataCoordinator.queryData($scope.team, $scope.contract, $scope.token, $scope.options.value.class, {maxPeriods: $scope.maxPeriods, collection: $scope.options.value.collection}).then(function(data) {\n\n // check if we are active or not\n if (!$scope.isActive()) { return; }\n\n // should we have no data just stay loading because it could be a connected datasource\n if (!data) { return; }\n\n // if we have data but only a [-1] means no data available\n if (data && data.length == 1 && data[0] == -1) {\n\n // mark the no data available text\n $scope.widgetValue = 'n/a';\n $scope.widgetUnit = '';\n\n } else {\n // apply the aggregate function to the data to get the single value\n var aggregatedValue = $eaDataAggregateOperations.execute($scope.options.value.func, data, $scope.options.value.property);\n\n // define the default value\n var prettyNumberValue = 0.0;\n\n if (!isNaN(aggregatedValue)) {\n\n // make the number pretty\n prettyNumberValue = numeral(aggregatedValue).format($scope.format);\n\n if ($scope.options.value.colorize) {\n\n if (aggregatedValue < 0) {\n $scope.colorStyle = { color: '#b1271b' }\n } else if (aggregatedValue > 0) {\n $scope.colorStyle = { color: '#b1cf95' }\n }\n }\n }\n\n // get teh unit value\n var unitValue = null;\n if (data && data[0]) { unitValue = data[0][$scope.options.value.unit]; }\n if (!unitValue) { unitValue = ''; }\n\n // apply the value\n $scope.widgetValue = prettyNumberValue;\n $scope.widgetUnit = unitValue;\n }\n\n // switch off the loading mode\n $scope.setLoading(false);\n\n });\n }\n\n // initialize when the host is ready\n $scope.onInitialize(function() {\n return buildDashboard();\n });\n\n $scope.onReload(function() {\n return buildDashboard();\n });\n\n // if we are here everyhting is ready to laod data\n $scope.finalizeRegistration();\n\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').directive('eaWidgetActionBoard', function() {\n return {\n restrict: 'C',\n template: '
' +\n '' +\n '
',\n controller: 'EaWidgetActionBoardCtrl'\n };\n}).controller('EaWidgetActionBoardCtrl', function($scope, $q, $eaDataCoordinator, $eaDataFilterOperations) {\n\n // prepare the filter\n var compiledFilter = $scope.options.value.filter ? $eaDataFilterOperations.compileFilter($scope.options.value.filter) : null;\n\n // store the items\n $scope.items = [];\n\n\n $scope.getActionStyle = function(action) {\n if ($scope.options.value.actionsAsLinks) {\n return \"\";\n } else {\n return \"btn btn-xs pull-right \" + action.Class;\n }\n };\n\n // filter operation\n function filter(elements) {\n if (compiledFilter) {\n return $eaDataFilterOperations.applyCompiledFilter(elements, compiledFilter);\n } else {\n return $q.when(elements);\n }\n }\n\n // build the dashboard\n function buildDashboard() {\n\n // switch on the loading mode\n $scope.setLoading(true);\n\n return $eaDataCoordinator.queryData($scope.team, $scope.contract, $scope.token, $scope.options.value.class, {collection: $scope.options.value.collection}).then(function (elements) {\n\n return filter(elements).then(function (filteredElements) {\n\n // map the result\n $scope.items = filteredElements.map(function (element) {\n\n var actions = [];\n\n if ($scope.options.value.actionTitle)\n {\n actions.push({ Action: $scope.options.value.actionTitle, Icon: $scope.options.value.actionIcon, Operation: $scope.options.value.actionOperation, Class: 'btn-default'});\n } else if ($scope.options.value.actions) {\n $scope.options.value.actions.forEach(function(action) {\n\n var actionVisible = true;\n\n if (action && action.actionHideProperty && action.actionHideValue) { \n var hideElements = action.actionHideValue.split(',');\n actionVisible = $scope.cust01 && $scope.cust01[action.actionHideProperty] && hideElements.indexOf($scope.cust01[action.actionHideProperty]) == -1;\n }\n\n if (actionVisible) {\n actions.push({\n Action: action.actionTitle,\n Icon: action.actionIcon,\n Operation: action.actionOperation,\n Class: action.actionClass ? action.actionClass : 'btn-default'\n });\n }\n })\n }\n\n return {\n Title: element[$scope.options.value.propertyTitle],\n Actions: actions,\n Element: element,\n Width: $scope.options.value.actionsAsLinks ? 20 * actions.length : 75 * actions.length\n }\n });\n\n // switch off the loading mode\n $scope.setLoading(false);\n\n // done\n return $scope.items;\n });\n });\n }\n\n $scope.executeAction = function(item, element) {\n $scope.executeDashboardAction(item.Operation, element).then(function() {\n buildDashboard();\n }).catch(function() {\n alert(\"Failed to perform action\");\n })\n };\n\n // establish the resize callback\n $scope.onResize(function(newSize) { });\n\n // initialize when the host is ready\n $scope.onInitialize(function() {\n return buildDashboard();\n });\n\n $scope.onReload(function() {\n return buildDashboard();\n });\n\n $scope.getStyle = function(item) {\n return { width: 'calc(100% - ' + item.Width + 'px)' } ;\n };\n\n // if we are here everyhting is ready to laod data\n $scope.finalizeRegistration();\n\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').directive('eaWidgetMap', function() {\n return {\n restrict: 'C',\n templateUrl: 'views/directive_ea_widget_map.html',\n controller: 'EaWidgetMapCtrl'\n };\n}).controller('EaWidgetMapCtrl', function($scope, $element, $q, $timeout) {\n\n function buildDashboard() {\n\n // switch on the loading mode\n $scope.setLoading(true);\n\n // switch off the loading mode\n $scope.setLoading(false);\n\n // trigger a resize during load\n $timeout(function() {\n $scope.requestResize();\n }, 500);\n\n // done\n return $q.when(true);\n }\n\n // establish the resize callback\n $scope.onResize(function(newSize) {\n\n // find the img element\n var imgElement = $element.find('img')[0];\n\n // calc ratio\n var ratio = imgElement.width / imgElement.height;\n\n // calc parent ratio\n var pratio=newSize.w / newSize.h;\n if (ratio < pratio) {\n angular.element(imgElement).width(imgElement.width);\n } else {\n angular.element(imgElement).width(newSize.w - 20);\n }\n\n });\n\n // initialize when the host is ready\n $scope.onInitialize(function() {\n return buildDashboard();\n });\n\n $scope.onReload(function() {\n return buildDashboard();\n });\n\n // if we are here everyhting is ready to laod data\n $scope.finalizeRegistration();\n\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').directive('eaWidgetWebPart', function() {\n return {\n restrict: 'C',\n template: '
',\n controller: 'EaWidgetWebPartCtrl'\n };\n}).controller('EaWidgetWebPartCtrl', function($scope, $q, $eaConfig, $eaDataCoordinator) {\n\n // get the html path\n $scope.html = $scope.options.html;\n\n // replace all variables\n $scope.html = $scope.html.replace(/\\{\\{data\\}\\}/g,$eaConfig.dataPath);\n\n // check if we need to replace with cdn\n if ($eaConfig.cdnEntrypoint && $scope.html[0] === '/') {\n $scope.html = $eaConfig.cdnEntrypoint + $scope.html\n }\n\n function loadWebPart() {\n\n if ($scope.options.class) {\n\n // switch on the loading mode\n $scope.setLoading(true);\n\n // load the date from source\n return $eaDataCoordinator.queryData($scope.team, $scope.contract, $scope.token, $scope.options.class, {collection: $scope.options.collection}).then(function(data) {\n $scope.Model = data;\n $scope.setLoading(false);\n return $q.when();\n });\n } else {\n $scope.setLoading(false);\n return $q.when();\n }\n }\n\n $scope.executeAction = function(actionId) {\n $scope.executeDashboardAction(actionId);\n };\n\n $scope.onResize(function(newSize) {\n return loadWebPart();\n });\n\n $scope.onInitialize(function() {\n return loadWebPart();\n });\n\n $scope.onReload(function() {\n return loadWebPart();\n });\n\n $scope.finalizeRegistration();\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').directive('eaWidgetGroupFilterListView', function() {\n return {\n restrict: 'C',\n templateUrl: 'views/directive_ea_group_filter_list_view.html',\n controller: 'EaWidgetGroupFilterListViewCtrl'\n };\n}).controller('EaWidgetGroupFilterListViewCtrl', function($scope, $q, $controller, $modal, $eaDataCoordinator, $eaBilling, $eaDataItemProcessorChain, $eaDataColorThemeGenerator, $eaWidgetGroupFilterListViewDataSources, $busy, $eaBackend, $eaUserProfile, $eaDataFilterOperations, $eaDataGroupOperations) {\n var self = this;\n\n // Mixins\n $.extend(self, $controller('ModalUpgradePlanCtrlMixin', {$scope: $scope, $modal: $modal }));\n $.extend(self, $controller('ModalCSVDataExportCtrlMixin', {$scope: $scope, $modal: $modal }));\n $.extend(self, $controller('EaWidgetGroupFilterListViewFiltersMixin', {$scope: $scope, $busy: $busy, $eaBackend: $eaBackend, $eaDataCoordinator: $eaDataCoordinator, $q: $q}));\n $.extend(self, $controller('EaWidgetGroupFilterListViewSortingMixin', {$scope: $scope }));\n $.extend(self, $controller('EaWidgetGroupFilterListViewExportMixin', {$scope: $scope }));\n\n // static data\n var monthNames = [ 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December' ];\n\n function applyStatePropery(property, currentState) {\n if (typeof(property) === 'object') {\n return property[currentState];\n } else {\n return property;\n }\n }\n\n // View Bags\n function setViewBagsDefault() {\n\n $scope.groupOptions = [];\n $scope.groupOption = null;\n $scope.groupOptionUpgradePlan = {GroupLabel: 'Add more Groups', GroupProperty: 'AddMoreGroups'};\n\n $scope.availablePeriods = [];\n $scope.selectedPeriod = null;\n $scope.selectedPeriodsMulti = {};\n $scope.selectedPeriodsMultiNormalized = [];\n\n $scope.periodActions = [];\n\n $scope.availableFilters = null;\n $scope.activeFilter = null;\n\n $scope.rawItems = [];\n $scope.rawItemsFiltered = [];\n\n $scope.groupedSpendingData = {};\n $scope.groupedAllCheckdPeriods = [];\n $scope.groupedServiceDefinitions = {};\n\n $scope.buildDashboardDefer = $q.defer();\n\n $scope.allowExport = !(!$scope.options.dataItems.exportable || $scope.options.dataItems.exportable === undefined);\n $scope.allowFiltering = false;\n\n $scope.itemIdProperty = applyStatePropery($scope.options.dataItems.itemId, $scope.options.dataItems.itemIdState);\n $scope.subitemIdProperty = applyStatePropery($scope.options.dataItems.subItemId, $scope.options.dataItems.subItemIdState);\n $scope.subitemIconProperty = applyStatePropery($scope.options.dataItems.subItemSymbol, $scope.options.dataItems.subItemSymbolState);\n $scope.itemCostProperty = applyStatePropery($scope.options.dataItems.property, $scope.options.dataItems.propertyState);\n $scope.itemQuantityProperty = applyStatePropery($scope.options.dataItems.propertyQuantity, $scope.options.dataItems.propertyQuantityState);\n $scope.lastSyncDateProperty = $scope.options.dataItems.lastSyncDate;\n $scope.allowZeroCostItems = applyStatePropery($scope.options.dataItems.enableZeroCostItems, $scope.options.dataItems.enableZeroCostItemsState);\n\n $scope.userProfile = null;\n\n $scope.noData = false;\n\n // handle filtering\n $scope.availableFilterFields = $scope.options.dataItems.filterProperties || [];\n $scope.availableFilterFieldMappings = $scope.options.dataItems.filterPropertyMapping || {};\n $scope.allowFiltering = ($scope.availableFilterFields.length > 0)\n\n if (!$scope.options.dataItems.filterClass) { $scope.options.dataItems.filterClass = \"SpendingFilterClass\"; }\n }\n\n function setGroupOptionsByQueryData() {\n\n // load the group options\n return $eaDataCoordinator.queryData($scope.team, $scope.contract, $scope.token, $scope.options.groupOptions.class, {collection: $scope.options.groupOptions.collection}).then(function (groupOptions) {\n $scope.groupOptions = [];\n\n var injectUpgradePlan = false;\n groupOptions.forEach(function (groupOption) {\n\n // check if we need to inject upgrade plan\n if (groupOption.RequiredPlan && !$eaBilling.hasRequiredPlan($scope.profiles.team.AccountPlan, groupOption.RequiredPlan)) {\n injectUpgradePlan = true;\n return;\n }\n\n // inject the element\n $scope.groupOptions.push(groupOption);\n });\n\n // inject the upgrade plan if required\n if (injectUpgradePlan) {\n $scope.groupOptions.push($scope.groupOptionUpgradePlan);\n }\n \n // remember on the last selected group option\n var previousSelectedGroupOption = localStorage.getItem($scope.dashboard + \"#\" + $scope.uuid + '.groupoption.selection');\n if (previousSelectedGroupOption) {\n try {\n debugger;\n $scope.groupOption = JSON.parse(previousSelectedGroupOption);\n } catch(e) {\n $scope.groupOption = groupOptions[0];\n }\n } else {\n // pre select the first group\n $scope.groupOption = groupOptions[0];\n }\n });\n }\n\n function updateGroupOptionsByDynamicPropertyPrefix() {\n\n // check if we have at least the professional plan\n if (!$eaBilling.hasRequiredPlan($scope.profiles.team.AccountPlan, 'professional')) { return $q.when(); }\n if (!$scope.groupedSpendingData.DynamicGroupOptions) { return $q.when(); }\n\n // sort the dynamic groups\n $scope.groupedSpendingData.DynamicGroupOptions.sortOn('GroupLabel');\n\n // add to the groups\n $scope.groupedSpendingData.DynamicGroupOptions.forEach(function(go) {\n $scope.groupOptions.push(go);\n });\n\n return $q.when();\n }\n\n function updateAvailableFiltersByDynamicPropertyPrefix() {\n\n // check if we have at least the professional plan\n if (!$eaBilling.hasRequiredPlan($scope.profiles.team.AccountPlan, 'professional')) { return $q.when(); }\n if (!$scope.groupedSpendingData.DynamicGroupOptions) { return $q.when(); }\n\n $scope.groupedSpendingData.DynamicGroupOptions.forEach(function(go) {\n $scope.availableFilterFields.push(go.GroupProperty);\n });\n\n return $q.when();\n }\n\n function setAvailablePeriodsByQueryData() {\n\n if (!$scope.options.periodItems)\n {\n $scope.availablePeriods = [];\n return $q.when();\n } else {\n // load the group options\n return $eaDataCoordinator.queryData($scope.team, $scope.contract, $scope.token, $scope.options.periodItems.class, {collection: $scope.options.periodItems.collection, maxPeriods: $scope.maxPeriods}).then(function (periodItems) {\n\n // define the periods\n $scope.availablePeriods = periodItems.map(function(p) {\n return p[$scope.options.periodItems.property];\n });\n\n // reduce the available periods if needed\n if (!$eaBilling.hasRequiredPlan($scope.profiles.team.AccountPlan, 'startup') && $scope.availablePeriods.length > 2) {\n\n // remove all reports until we have to\n $scope.availablePeriods.splice(0, $scope.availablePeriods.length - 2)\n } else if (!$eaBilling.hasRequiredPlan($scope.profiles.team.AccountPlan, 'professional') && $scope.availablePeriods.length > 24) {\n\n // remove all reports until we have to\n $scope.availablePeriods.splice(0, $scope.availablePeriods.length - 24)\n }\n\n // select the last one per default\n if ($scope.availablePeriods && $scope.availablePeriods.length > 0) { $scope.selectedPeriod = $scope.availablePeriods[$scope.availablePeriods.length -1]; };\n });\n }\n }\n\n function loadAvailableFiltersIfPossible() {\n\n if ($scope.allowFiltering) {\n // load the available filters\n return $eaDataCoordinator.queryData($scope.team, $scope.contract, $scope.token, $scope.options.dataItems.filterClass, {collection: $scope.options.dataItems.filterCollection}).then(function (dataFilters) {\n\n // oder the filters\n if (dataFilters) { dataFilters.sortOn('Name'); }\n\n // assign the filters\n $scope.availableFilters = dataFilters;\n\n // done\n return $q.resolve();\n });\n } else {\n\n // disable filtering\n $scope.allowFiltering = true;\n\n // done\n return $q.resolve();\n }\n }\n\n function loadServiceDefinitionMetadata() {\n return $eaDataCoordinator.queryData($scope.team, $scope.contract, $scope.token, 'ServiceDefinitionClass', null).then(function (elementMetaData) {\n return $eaDataGroupOperations.groupBy(elementMetaData, ['ServiceType']).then(function (groupedMetaData) {\n return groupedMetaData;\n });\n });\n }\n\n function renderDataByGroupAndPeriod(options) {\n options = options || {};\n\n // define the no data values\n $scope.noData = (!$scope.rawItems || $scope.rawItems.length === 0);\n\n // set the deferrer pending\n $scope.buildDashboardDefer = $q.defer();\n\n // define the group keys\n var primaryGroupKey = $scope.groupOption.GroupProperty;\n var primaryGroupKeyComparition = $scope.groupOption.Compare || 'CaseSensitive';\n var secondaryGroupKey = $scope.options.periodItems.property;\n\n // apply the filter mappings\n var adaptedFilter = $scope.activeFilter;\n if ($scope.activeFilter !== undefined && $scope.activeFilter !== null && $scope.availableFilterFieldMappings) {\n adaptedFilter = JSON.parse(JSON.stringify($scope.activeFilter));\n\n adaptedFilter.Rules.forEach(function(rule) {\n if ($scope.availableFilterFieldMappings[rule.Field]) {\n rule.Field = $scope.availableFilterFieldMappings[rule.Field];\n }\n });\n }\n\n // build the compiled filter\n var compiledFilter = $eaDataFilterOperations.compileFilter(adaptedFilter);\n\n // reset the pre-filtered items\n $scope.rawItemsFiltered = [];\n\n // contains all checked groups\n var allCheckedPeriods = [];\n\n // add the other selected groups\n $scope.selectedPeriodsMultiNormalized.forEach(function(checkedPeriod) {\n allCheckedPeriods.push(checkedPeriod);\n });\n\n // add the selectd one if required\n if (allCheckedPeriods.indexOf($scope.selectedPeriod) === - 1) {\n allCheckedPeriods.push($scope.selectedPeriod);\n }\n\n // generate the processor chain\n var processorChain = $eaDataItemProcessorChain.createProcesserChain();\n\n // filter out all element which are not matching our active Filter\n // and generate indirectly a list of all items filtered\n processorChain.onVisit(function(item, resultBucket) {\n\n // check if we have an active filter\n if (!$scope.activeFilter) { return $eaDataItemProcessorChain.Status.Next; }\n\n // apply the compiled filter\n if (compiledFilter(item)) {\n $scope.rawItemsFiltered.push(item);\n return $eaDataItemProcessorChain.Status.Next;\n } else {\n return $eaDataItemProcessorChain.Status.Skip;\n }\n });\n\n // filter out all elements which are not part of the selected period\n processorChain.onVisit(function(item, resultBucket) {\n\n // the item should have at least a cost value\n if(item[$scope.itemCostProperty] <= 0 && !$scope.allowZeroCostItems) {\n return $eaDataItemProcessorChain.Status.Skip;\n }\n\n // set the detected selectedPeriod\n if (!resultBucket.DetectedSelectedPeriod ) {\n resultBucket.DetectedSelectedPeriod = $scope.availablePeriods.length > 0 ? $scope.availablePeriods[0] : '';\n }\n\n // check if we have a better one\n if (item[secondaryGroupKey] > resultBucket.DetectedSelectedPeriod) {\n resultBucket.DetectedSelectedPeriod = item[secondaryGroupKey];\n }\n\n // check if we skip it\n return (allCheckedPeriods.indexOf(item[secondaryGroupKey]) !== -1) ? $eaDataItemProcessorChain.Status.Next : $eaDataItemProcessorChain.Status.Skip\n });\n\n // define the last sync date based on the selected data\n processorChain.onVisit(function(item, resultBucket) {\n\n if ($scope.lastSyncDateProperty && item[$scope.lastSyncDateProperty]) {\n // set the initial value\n if (!resultBucket.LastSyncDate) {\n resultBucket.LastSyncDate = item[$scope.lastSyncDateProperty];\n }\n\n // check if we need to update\n if (item[$scope.lastSyncDateProperty] > resultBucket.LastSyncDate) {\n resultBucket.LastSyncDate = item[$scope.lastSyncDateProperty];\n }\n }\n\n // done\n return $eaDataItemProcessorChain.Status.Next;\n });\n\n\n // build the history used for exports e.g.\n processorChain.onVisit(function(item, resultBucket) {\n\n // build the history\n resultBucket.History = resultBucket.History || {};\n\n // the item id\n var parentItemId = item[$scope.itemIdProperty];\n var itemId = item[$scope.subitemIdProperty];\n var itemKey = parentItemId + '-' + itemId;\n\n // add the serviec item if required\n if (!resultBucket.History[itemKey]) { resultBucket.History[itemKey] = JSON.parse(JSON.stringify(item)) }\n\n // add the costs for a specific period\n resultBucket.History[itemKey][item.ReportId + '-Costs'] = item[$scope.itemCostProperty];\n\n if ($scope.itemQuantityProperty && item[$scope.itemQuantityProperty]) {\n resultBucket.History[itemKey][item.ReportId + '-Quantity'] = item[$scope.itemQuantityProperty];\n } else if (item.ServiceMeters && item.ServicePrimaryMeter) {\n var meterIndex = item.ServiceMeters.buildIndex(\"Id\") || {};\n var meterModel = meterIndex[item.ServicePrimaryMeter] || { Quantity: 0.0 };\n resultBucket.History[itemKey][item.ReportId + '-Quantity'] = meterModel.Quantity;\n } else {\n resultBucket.History[itemKey][item.ReportId + '-Quantity'] = 0.0;\n }\n\n // done\n return $eaDataItemProcessorChain.Status.Next;\n });\n\n // applies the correct item template\n processorChain.onVisit(function(item, resultBucket) {\n\n // set the correct subitem view template\n if ($scope.options.dataItems.subItemViewTemplate) {\n item.viewTemplate = $scope.options.dataItems.subItemViewTemplate;\n } else {\n item.viewTemplate = 'ea-widget-group-filter-list-view-pg-subitem-default-template';\n }\n\n // done\n return $eaDataItemProcessorChain.Status.Next;\n });\n\n // build the dynamic group options\n processorChain.onVisit(function(item, resultBucket) {\n\n // check if we defined a specific prefix\n if (!$scope.options.groupOptions.dynamic) { return $eaDataItemProcessorChain.Status.Next; }\n\n // generate the dynamic group options\n if (!resultBucket.DynamicGroupOptions) { resultBucket.DynamicGroupOptions = []; resultBucket.DynamicGroupOptionsMap = {}; }\n\n // inject the properties\n Object.keys(item).forEach(function(k) {\n if (k.indexOf($scope.options.groupOptions.dynamic) !== 0) { return; }\n if (resultBucket.DynamicGroupOptionsMap[k]) { return; }\n\n var groupLabel = k.replace($scope.options.groupOptions.dynamic, '');\n groupLabel = groupLabel.capitalizeFirstLetter();\n\n var groupOptionModel = {GroupLabel: groupLabel, GroupProperty: k, GroupIcon: 'fa-globe', GroupDescription: $scope.options.groupOptions.dynamicDescription };\n\n if (!resultBucket.DynamicGroupOptionsMap[k]) {\n resultBucket.DynamicGroupOptions.push(groupOptionModel);\n resultBucket.DynamicGroupOptionsMap[k] = groupOptionModel;\n }\n });\n\n // done\n return $eaDataItemProcessorChain.Status.Next;\n });\n\n\n // build the primary and secondary group\n processorChain.onVisit(function(item, resultBucket) {\n\n // generate the primary group key values\n var primaryGroupKeyValues = item[primaryGroupKey];\n var primaryGroupKeyValuesWasArray = true;\n if (!angular.isArray(primaryGroupKeyValues)) { primaryGroupKeyValues ? primaryGroupKeyValues = [primaryGroupKeyValues] : primaryGroupKeyValues = []; primaryGroupKeyValuesWasArray = false; }\n\n // build the secondary group key value\n var secondaryGroupKeyValue = item[secondaryGroupKey];\n\n // check if we have group elements for the different pathes\n resultBucket['All'] = resultBucket['All'] || { ServiceCosts: 0, Count: 0, ServiceItems: [] };\n resultBucket.PrimaryGroups = resultBucket.PrimaryGroups || {};\n\n // add the item to the summary group\n var summaryGroup = resultBucket['All'];\n summaryGroup.ServiceCosts += item.ServiceCosts;\n summaryGroup.Count++;\n summaryGroup.ServiceItems.push(item);\n\n // inject currency\n resultBucket.Currency = {\n Symbol: item[$scope.options.dataItems.currencySymbol],\n String: item[$scope.options.dataItems.currency]\n };\n\n // in the case the group value area is empty we need to assign this item to a special group\n // call not_set\n if (primaryGroupKeyValues.length === 0) { primaryGroupKeyValues = ['Without ' + primaryGroupKey]; }\n\n // visit every primary group key value the item should become part of\n primaryGroupKeyValues.forEach(function(primaryGroupKeyValue) {\n\n // check if we need to compare case sensitive or insensitive\n if (primaryGroupKeyComparition === 'CaseInSensitive') {\n primaryGroupKeyValue = primaryGroupKeyValue.toLowerCase();\n }\n\n // generate the group\n resultBucket.PrimaryGroups[primaryGroupKeyValue] = resultBucket.PrimaryGroups[primaryGroupKeyValue] || { PrimaryGroupKey: primaryGroupKey, PrimaryGroupId: primaryGroupKeyValue, PrimaryGroupName: undefined, ServiceCosts: 0, Count: 0, SecondaryGroups: {}, ServiceItemsIdentifiers: [], ServiceItems: [] };\n resultBucket.PrimaryGroups[primaryGroupKeyValue].SecondaryGroups[secondaryGroupKeyValue] = resultBucket.PrimaryGroups[primaryGroupKeyValue].SecondaryGroups[secondaryGroupKeyValue] || { SecondaryGroupId: secondaryGroupKeyValue, SecondaryGroupName: undefined, SecondaryGroupKey: secondaryGroupKey, ServiceCosts: 0, Count: 0, ServiceItemsMap: {}};\n resultBucket.SecondaryGroupsSummary = resultBucket.SecondaryGroupsSummary || {};\n resultBucket.SecondaryGroupsSummary[secondaryGroupKeyValue] = resultBucket.SecondaryGroupsSummary[secondaryGroupKeyValue] || { SecondaryGroupId: secondaryGroupKeyValue, SecondaryGroupName: undefined, SecondaryGroupKey: secondaryGroupKey, ServiceCosts: 0, Count: 0 };\n\n // define the item id\n var itemIdProperty = $scope.itemIdProperty;\n var subitemIdProperty = $scope.subitemIdProperty;\n var itemCostProperty = $scope.itemCostProperty;\n\n // add the item to his primary group\n var primaryItemGroup = resultBucket.PrimaryGroups[primaryGroupKeyValue];\n if (primaryItemGroup.ServiceItemsIdentifiers.indexOf(item[subitemIdProperty]) === -1) {\n primaryItemGroup.ServiceItemsIdentifiers.push(item[subitemIdProperty]);\n primaryItemGroup.ServiceItems.push(item);\n }\n\n primaryItemGroup.ServiceCosts += item[$scope.options.dataItems.property];\n primaryItemGroup.Count++;\n\n // Calculate the primary GroupName\n var primaryGroupName = item[primaryGroupKey];\n\n // set in case it is array\n if (primaryGroupKeyValuesWasArray) {\n primaryGroupName = primaryGroupKeyValue;\n primaryGroupName = $scope.options.dataItems.primaryGroupNameMapping[primaryGroupName] || primaryGroupName;\n }\n\n // get the mapping\n if ($scope.options.dataItems.primaryGroupNameMapping && $scope.options.dataItems.primaryGroupNameMapping[primaryGroupKey]) {\n primaryGroupName = item[$scope.options.dataItems.primaryGroupNameMapping[primaryGroupKey]];\n }\n\n // check if we have a value otherwise we are using our fallback\n if (!primaryGroupName || primaryGroupName.length === 0) {\n primaryGroupName = primaryGroupKeyValue;\n }\n\n // assign the group name\n primaryItemGroup.PrimaryGroupName = primaryGroupName;\n\n // add the item to his secondary group\n var secondaryItemGroup = resultBucket.PrimaryGroups[primaryGroupKeyValue].SecondaryGroups[secondaryGroupKeyValue];\n var secondaryItemGroupSummary = resultBucket.SecondaryGroupsSummary[secondaryGroupKeyValue];\n\n secondaryItemGroup.ServiceItemsMap[item[subitemIdProperty]] = item;\n secondaryItemGroup.ServiceCosts += item[itemCostProperty];\n secondaryItemGroup.Count++;\n\n secondaryItemGroupSummary.ServiceCosts += item[itemCostProperty];\n secondaryItemGroupSummary.Count++;\n\n // Calculate the secondary GroupName\n secondaryItemGroup.SecondaryGroupName = item[secondaryGroupKey];\n secondaryItemGroupSummary.SecondaryGroupName = item[secondaryGroupKey];\n });\n\n // done\n $eaDataItemProcessorChain.Status.Next;\n });\n\n // process all the item specific handlers\n var globalResultBucket = {};\n processorChain.process($scope.rawItems, globalResultBucket);\n\n // dump stats\n console.log(\"Processor Chain Stats:\");\n globalResultBucket.ChainStats.forEach(function(cs, ci) {\n console.log('#' + ci + ' c: ' + cs.c + ' t: ' + cs.t + 'ms');\n });\n\n // check if we have a new selected period becuase of detection\n if (options.SetSelectedItemAutomatically && $scope.selectedPeriod != globalResultBucket.DetectedSelectedPeriod) {\n $scope.selectedPeriod = globalResultBucket.DetectedSelectedPeriod;\n options.SetSelectedItemAutomatically = false;\n return renderDataByGroupAndPeriod(options);\n }\n\n // check if we have data\n if (globalResultBucket.PrimaryGroups !== undefined && globalResultBucket.PrimaryGroups !== null) {\n\n // get the view templates\n var viewTemplates = $scope.options.dataItems.primaryGroupViewTemplates;\n if (!viewTemplates) { viewTemplates = {}; }\n\n // do a bit post processing\n Object.keys(globalResultBucket.PrimaryGroups).forEach(function (e) {\n\n // get the primary group\n var currentPrimaryGroup = globalResultBucket.PrimaryGroups[e];\n\n // Calculate the color for ever group\n currentPrimaryGroup.GroupColor = $eaDataColorThemeGenerator.getColorFor($scope.contract + '#' + currentPrimaryGroup.PrimaryGroupKey, currentPrimaryGroup.PrimaryGroupId);\n\n // add the default view template\n if (viewTemplates && viewTemplates[currentPrimaryGroup.PrimaryGroupKey]) {\n currentPrimaryGroup.viewTemplate = viewTemplates[currentPrimaryGroup.PrimaryGroupKey];\n } else {\n currentPrimaryGroup.viewTemplate = 'ea-widget-group-filter-list-view-pg-default-template';\n }\n\n // convert the promary groups to an array\n globalResultBucket.PrimaryGroupsList = globalResultBucket.PrimaryGroupsList || [];\n globalResultBucket.PrimaryGroupsList.push(currentPrimaryGroup);\n\n // Visit every secondary group summaries\n var lastSecondaryGroupSummary = undefined;\n Object.keys(globalResultBucket.SecondaryGroupsSummary).sort().forEach(function (secondaryGroupKeyValue) {\n if (!lastSecondaryGroupSummary) {\n lastSecondaryGroupSummary = globalResultBucket.SecondaryGroupsSummary[secondaryGroupKeyValue];\n lastSecondaryGroupSummary.ServiceCostsDiff = 0;\n lastSecondaryGroupSummary.ServiceCostsDiffRel = 0;\n return;\n }\n\n // generate the diff\n var currentSecondaryGroupSummary = globalResultBucket.SecondaryGroupsSummary[secondaryGroupKeyValue];\n currentSecondaryGroupSummary.ServiceCostsDiff = currentSecondaryGroupSummary.ServiceCosts - lastSecondaryGroupSummary.ServiceCosts;\n currentSecondaryGroupSummary.ServiceCostsDiffRel = (currentSecondaryGroupSummary.ServiceCosts / lastSecondaryGroupSummary.ServiceCosts) - 1;\n\n // set the last\n lastSecondaryGroupSummary = currentSecondaryGroupSummary;\n });\n\n // Visit every secondary group\n var lastSecondaryGroup = undefined;\n Object.keys(currentPrimaryGroup.SecondaryGroups).sort().forEach(function (secondaryGroupKeyId) {\n if (!lastSecondaryGroup) {\n lastSecondaryGroup = currentPrimaryGroup.SecondaryGroups[secondaryGroupKeyId];\n lastSecondaryGroup.ServiceCostsDiff = 0;\n lastSecondaryGroup.ServiceCostsDiffRel = 0;\n return;\n }\n\n // generate the diff\n var currentSecondaryGroup = currentPrimaryGroup.SecondaryGroups[secondaryGroupKeyId];\n currentSecondaryGroup.ServiceCostsDiff = currentSecondaryGroup.ServiceCosts - lastSecondaryGroup.ServiceCosts;\n currentSecondaryGroup.ServiceCostsDiffRel = (currentSecondaryGroup.ServiceCosts / lastSecondaryGroup.ServiceCosts) - 1;\n\n // set the last\n lastSecondaryGroup = currentSecondaryGroup;\n });\n });\n } else {\n $scope.noData = true;\n }\n\n // assign the used group option\n globalResultBucket.SelectedGroupOption = $scope.groupOption;\n\n // set the hinttext\n if ($scope.options.dataItems.hintText && $scope.options.dataItems.hintText.length > 0)\n {\n if ($scope.options.dataItems.hintText.indexOf('func:') === 0) {\n $scope.executeDashboardAction($scope.options.dataItems.hintText, { groupSepndingData: globalResultBucket, selectedPeriod: $scope.selectedPeriod }).then(function(generatedHintText) {\n globalResultBucket.HintText = generatedHintText\n })\n } else {\n globalResultBucket.HintText = $scope.options.dataItems.hintText;\n }\n }\n\n // assign the data\n $scope.groupedSpendingData = globalResultBucket;\n $scope.groupedAllCheckdPeriods = allCheckedPeriods.sort().reverse();\n\n // refresh dependent widgets\n $scope.refreshDependentWidgets();\n\n // commit the defer\n $scope.buildDashboardDefer.resolve($scope.groupedSpendingData);\n\n // return the promise\n return $scope.buildDashboardDefer.promise;\n }\n\n // generate the initial dashboard content\n function buildDashboard() {\n\n // enable loading\n $scope.setLoading(true);\n\n // set the view bags\n setViewBagsDefault();\n\n // get the user profile\n return $eaUserProfile.load($scope.token).then(function(userProfile) {\n\n $scope.userProfile = userProfile;\n\n // load the group options\n return setGroupOptionsByQueryData().then(function () {\n\n // load the available periods\n return setAvailablePeriodsByQueryData().then(function () {\n\n // load all filters\n return loadAvailableFiltersIfPossible().then(function () {\n\n // load the meta data\n return loadServiceDefinitionMetadata().then(function(groupedMetaData) {\n\n // set the meta data\n $scope.groupedServiceDefinitions = groupedMetaData;\n\n // load the data items\n return $eaDataCoordinator.queryData($scope.team, $scope.contract, $scope.token, $scope.options.dataItems.class, {collection: $scope.options.dataItems.collection}).then(function (dataItems) {\n\n // set the rawItems\n $scope.rawItems = dataItems;\n\n // render the data\n return renderDataByGroupAndPeriod({SetSelectedItemAutomatically: true}).then(function () {\n\n // update the group options in the case we have set dynamic prefix\n return updateGroupOptionsByDynamicPropertyPrefix().then(function() {\n\n // inject group options in filter fields\n return updateAvailableFiltersByDynamicPropertyPrefix().then(function() {\n\n // define the actions\n $scope.periodActions = [];\n\n\n if ($scope.options.periodItems.actions) {\n\n $scope.options.periodItems.actions.forEach(function(action) {\n var actionVisible = true;\n\n if (action && action.actionHideProperty && action.actionHideValue) { \n var hideElements = action.actionHideValue.split(','); \n actionVisible = $scope.cust01 && $scope.cust01[action.actionHideProperty] && hideElements.indexOf($scope.cust01[action.actionHideProperty]) == -1;\n }\n\n if (actionVisible) {\n $scope.periodActions.push(action);\n }\n })\n }\n\n\n // define primary actions\n $scope.primaryActions = $scope.options.primaryActions ? $scope.options.primaryActions : [];\n\n // done with loading\n $scope.setLoading(false);\n });\n });\n })\n });\n });\n });\n });\n });\n });\n }\n\n // called when selecting a gorup\n $scope.selectGroupOption = function(selectedGroupOption) {\n\n if (selectedGroupOption == $scope.groupOptionUpgradePlan) {\n $scope.openUpgradePlanWizard('startup', $scope.profiles.team, 'Enable Advanced Data Grouping by upgrading to a paid plan or starting your 14 days trial!');\n } else {\n $scope.groupOption = selectedGroupOption;\n localStorage.setItem($scope.dashboard + \"#\" + $scope.uuid + '.groupoption.selection', JSON.stringify(selectedGroupOption));\n $scope.refreshWidget();\n }\n };\n\n // allows to select a new period\n $scope.selectPeriod = function(period) {\n $scope.selectedPeriod = period;\n $scope.refreshWidget();\n };\n\n // we do not allow to expand the items\n $scope.groupItemExpanded = function (item, open) {\n if ($scope.options.dataItems.expandable) {\n item.viewOpen = open;\n } else {\n item.viewOpen = false;\n }\n };\n\n // generates the period label\n $scope.getPeriodLabel = function (period) {\n if (period === null || period === undefined) { return ''; }\n if (period.length != 7) { return period; }\n\n var monthLabelArray = period.split('-');\n var month = parseInt(monthLabelArray[1]) - 1;\n\n return monthNames[month] + ' ' + monthLabelArray[0];\n };\n\n // generates the pariod label short\n $scope.getPeriodLabelShort = function (period) {\n if (period === null || period === undefined) { return ''; }\n if (period.length != 7) { return period; }\n\n var monthLabelArray = period.split('-');\n var month = parseInt(monthLabelArray[1]) - 1;\n\n return monthNames[month].substr(0,3) + ' ' + monthLabelArray[0];\n };\n\n // allows to handle multi select of period groups\n $scope.changedSelectedPeriodMulti = function() {\n\n // reset the normalized selection\n $scope.selectedPeriodsMultiNormalized = [];\n\n // check if we have the right permissions\n if ( !$eaBilling.hasRequiredPlan($scope.profiles.team.AccountPlan, 'professional')) {\n\n // reset all selections\n $scope.selectedPeriodsMulti = [];\n\n // show the purchase information\n $scope.openUpgradePlanWizard('professional', $scope.profiles.team, 'Smart Compare is a feature available starting with the Professional plan. Try it out by upgrading your plan or starting a 14 days trial!');\n\n } else {\n // normalize the selected periods\n\n Object.keys($scope.selectedPeriodsMulti).forEach(function (k) {\n if ($scope.selectedPeriodsMulti[k]) {\n $scope.selectedPeriodsMultiNormalized.push(k);\n }\n });\n\n // order\n $scope.selectedPeriodsMultiNormalized.sort().reverse();\n\n // do it\n $scope.refreshWidget();\n }\n };\n\n $scope.calculateCellStyle = function(item, isHeader) {\n var factor = 0.20;\n if (item > factor) {\n return {\n 'background-color': 'rgba(239,55,14,0.6)',\n 'color': 'white',\n 'font-weight': 'bold',\n 'margin-left': isHeader ? '20px' : '10px',\n 'width': '90px',\n 'padding-right': '5px'\n };\n } if (item < -1 * factor) {\n return {\n 'background-color': 'rgba(108,178,4,0.6)',\n 'color': 'white',\n 'font-weight': 'bold',\n 'margin-left': isHeader ? '20px' : '10px',\n 'width': '90px',\n 'padding-right': '5px'\n };\n } else {\n return {\n 'margin-left': isHeader ? '20px' : '10px',\n 'width': '90px',\n 'padding-right': '5px'\n };\n }\n };\n\n $scope.calculateCostDiffsForService = function(primaryGroup, currentPeriodIndex, serviceIdentifier) {\n\n // check if we have a chance\n if ( !$scope.groupedAllCheckdPeriods || $scope.groupedAllCheckdPeriods.length <= 1 || currentPeriodIndex === $scope.groupedAllCheckdPeriods.length - 1) { return 0.0; }\n\n // get the right groupIds\n var currentGroupId = $scope.groupedAllCheckdPeriods[currentPeriodIndex];\n var prevGroupId = $scope.groupedAllCheckdPeriods[currentPeriodIndex + 1];\n\n // get the group elements for the pre group\n var currentServiceItemMap = primaryGroup.SecondaryGroups[currentGroupId];\n var currentService = currentServiceItemMap ? currentServiceItemMap.ServiceItemsMap[serviceIdentifier] : undefined;\n if (!currentService) { currentService = {}; currentService[$scope.itemCostProperty] = 0.0 };\n\n var prevServiceItemMap = primaryGroup.SecondaryGroups[prevGroupId];\n var prevService = prevServiceItemMap ? prevServiceItemMap.ServiceItemsMap[serviceIdentifier] : undefined;\n if (!prevService) { prevService = {}; prevService[$scope.itemCostProperty] = 0.0 };\n\n // calculate\n return (currentService[$scope.itemCostProperty] / prevService[$scope.itemCostProperty]) - 1;\n };\n\n $scope.calculateServiceCostsString = function(element) {\n try {\n if (!element) {\n return \"-/-\";\n } else if (element.ServiceCosts) {\n return element.ServiceCosts.toFixed(2) + ' ' + $scope.groupedSpendingData.Currency.Symbol;\n } else if (element[$scope.itemCostProperty]) {\n return element[$scope.itemCostProperty].toFixed(2) + ' ' + $scope.groupedSpendingData.Currency.Symbol;\n } else {\n return '0.00 ' + $scope.groupedSpendingData.Currency.Symbol;\n }\n } catch(e) {\n console.log(\"Error in calculateServiceCostsString\")\n console.log(e)\n console.log(element)\n return '-/-';\n }\n };\n\n $scope.getSubItemTitle = function(item) {\n var subItemId = $scope.options.dataItems.subItemId;\n if ($scope.options.dataItems.subItemGroupNameMapping) { subItemId = $scope.options.dataItems.subItemGroupNameMapping[subItemId]; }\n if (!subItemId) { subItemId = $scope.options.dataItems.subItemId; }\n return item[subItemId] ? item[subItemId] : item[$scope.options.dataItems.subItemId];\n };\n\n $scope.executeAction = function(actionItem) {\n $scope.executeDashboardAction(actionItem.actionOperation, { data: $scope.groupedSpendingData, period: $scope.selectedPeriod}).then(function() {\n renderDataByGroupAndPeriod();\n })\n };\n\n // refreshes the widgte content\n $scope.refreshWidget = function() {\n renderDataByGroupAndPeriod();\n };\n\n // initialize when the host is ready\n $scope.onInitialize(function() {\n return buildDashboard();\n });\n\n $scope.onReload(function() {\n return buildDashboard();\n });\n\n // register all datasources\n $eaWidgetGroupFilterListViewDataSources.registerDataSources($scope);\n\n // if we are here everyhting is ready to laod data\n $scope.finalizeRegistration();\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('EaWidgetGroupFilterListViewSortingMixin', function($scope) {\n\n $scope.sortOrderDesc = false;\n $scope.sortOrderByGroupName = true;\n $scope.sortOrderByPeriod = null;\n\n $scope.sortPrimaryGroups = function(groupItem) {\n if ($scope.sortOrderByPeriod) {\n var groupCollection = groupItem.SecondaryGroups[$scope.sortOrderByPeriod];\n if (!groupCollection) { return 0.0; }\n\n return groupCollection.ServiceCosts;\n } else {\n return groupItem.PrimaryGroupName;\n }\n };\n\n $scope.sortServiceItems = function(serviceItem) {\n\n var primaryGroupKeyComparition = $scope.groupOption.Compare || 'CaseSensitive';\n\n if ($scope.sortOrderByPeriod) {\n var groupKeyValue = serviceItem[$scope.groupOption.GroupProperty];\n if (!groupKeyValue) { return 0.0; }\n\n var groupKeyValueAdapted = groupKeyValue;\n if (angular.isArray(groupKeyValue)) {\n groupKeyValueAdapted = groupKeyValue[0];\n }\n\n // check if we need to compare case sensitive or insensitive\n if (primaryGroupKeyComparition === 'CaseInSensitive') {\n groupKeyValueAdapted = groupKeyValueAdapted.toLowerCase();\n }\n\n var groupCollection = $scope.groupedSpendingData.PrimaryGroups[groupKeyValueAdapted].SecondaryGroups[$scope.sortOrderByPeriod];\n if (!groupCollection) { return 0.0; }\n\n var service = groupCollection.ServiceItemsMap[serviceItem[$scope.subitemIdProperty]];\n if (!service) { return 0.0; }\n\n return service[$scope.itemCostProperty];\n } else {\n return serviceItem.ServiceName;\n }\n };\n\n $scope.setPrimaryGroupOrderSettings = function() {\n\n if ($scope.sortOrderByGroupName) {\n $scope.sortOrderDesc = !$scope.sortOrderDesc;\n } else {\n $scope.sortOrderByGroupName = true;\n $scope.sortOrderByPeriod = null;\n $scope.sortOrderDesc = false;\n }\n };\n\n $scope.setOrderByCosts = function(period) {\n if ($scope.sortOrderByPeriod && $scope.sortOrderByPeriod === period) {\n $scope.sortOrderDesc = !$scope.sortOrderDesc;\n } else if ($scope.sortOrderByPeriod) {\n $scope.sortOrderByGroupName = false;\n $scope.sortOrderByPeriod = period;\n } else {\n $scope.sortOrderByGroupName = false;\n $scope.sortOrderByPeriod = period;\n $scope.sortOrderDesc = false;\n }\n };\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('EaWidgetGroupFilterListViewFiltersMixin', function($scope, $busy, $eaBackend, $eaDataCoordinator, $eaFilterPanel, $q) {\n\n // Filter Handing\n $scope.resetFilter = function() {\n $scope.activeFilter = null;\n $scope.rawItemsFiltered = [];\n $scope.refreshWidget();\n };\n\n $scope.applyFilter = function(filter) {\n $scope.activeFilter = filter;\n $scope.rawItemsFiltered = [];\n $scope.refreshWidget();\n };\n\n $scope.removeFilter = function(filter, force) {\n // ask for removal\n var deleteOk = force;\n deleteOk = deleteOk || confirm('Do you really want to remove the filter: ' + (filter && filter.Name ? filter.Name : 'unknown') );\n\n // check\n if (deleteOk) {\n\n // remove from backend\n $busy.during($eaBackend.dataRemoveDataFilter(filter.TeamId, $scope.contract, filter.Id, $scope.token).then(function() {\n\n // remove from cached data\n $eaDataCoordinator.removeModels($scope.team, $scope.contract, 'SpendingFilterClass', ['Id'], [filter.Id]);\n\n return $eaDataCoordinator.queryData($scope.team, $scope.contract, $scope.token, 'SpendingFilterClass', null).then(function (dataFilters) {\n $scope.availableFilters = dataFilters;\n });\n }));\n }\n };\n\n $scope.createFilter = function(filter) {\n $scope.activeFilter = $eaFilterPanel.buildFilter($scope.userProfile.UserId);\n };\n\n $scope.saveFilter = function(teamFilter) {\n\n // check if it's a new filter or if we need to update the filter\n if (!$scope.activeFilter.Id) {\n\n // create the filter in the server\n return $busy.during($eaBackend.dataCreateDataFilter(teamFilter ? $scope.team : 'personal', $scope.contract, $scope.activeFilter, $scope.token).then(function(result) {\n\n // assign the new id\n $scope.activeFilter.Id = result.FilterId;\n\n // add the filter to the UI\n $eaDataCoordinator.addModels($scope.team, $scope.contract, 'SpendingFilterClass', [$scope.activeFilter]);\n\n // apply the filter\n $scope.applyFilter($scope.activeFilter);\n }));\n\n } else {\n\n // update the filter in storage\n return $busy.during($eaBackend.dataUpdateDataFilter(teamFilter ? $scope.team : 'personal', $scope.contract, $scope.activeFilter, $scope.token)).then(function() {\n\n // update the ui model\n $eaDataCoordinator.updateModels($scope.team, $scope.contract, 'SpendingFilterClass', ['Id'], [$scope.activeFilter.Id], ['Name', 'Rules', 'Owner', 'TeamId'], [$scope.activeFilter.Name, $scope.activeFilter.Rules, $scope.activeFilter.Owner, $scope.activeFilter.TeamId]);\n\n // ensure the filter is active\n $scope.applyFilter($scope.activeFilter);\n });\n }\n };\n\n $scope.shareFilter = function() {\n // save the personal filter\n $busy.during($scope.saveFilter(false).then(function() {\n\n // remove the ID\n var oldFilterId = $scope.activeFilter.Id;\n $scope.activeFilter.Id = null;\n\n // store the filter again for the team\n return $scope.saveFilter(true).then(function() {\n $scope.activeFilter.TeamId = $scope.team;\n return $scope.removeFilter({Id: oldFilterId, TeamId: 'personal'}, true);\n });\n\n }));\n };\n\n $scope.unShareFilter = function() {\n // save the team filter\n $busy.during($scope.saveFilter(true).then(function() {\n\n // remove the ID\n var oldFilterId = $scope.activeFilter.Id;\n $scope.activeFilter.Id = null;\n\n // store the filter again for the team\n return $scope.saveFilter(false).then(function() {\n $scope.activeFilter.TeamId = 'personal';\n return $scope.removeFilter({Id: oldFilterId, TeamId: $scope.team}, true);\n })\n }))\n };\n\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').controller('EaWidgetGroupFilterListViewExportMixin', function($scope, $eaDataExportOperations, $busy, $eaDownload) {\n\n $scope.exportData = function() {\n\n // open the dialog\n $scope.openExportWizard($scope.options.dataItems.exportheader, $scope.options.dataItems.exporttags).then(function(exportConfig) {\n\n // flatten our history\n var historyElements = Object.keys($scope.groupedSpendingData.History).map(function(elementKey) {\n return $scope.groupedSpendingData.History[elementKey];\n });\n\n // inject tag properties\n if (exportConfig.config.tagsToExport)\n {\n var splittedTags = exportConfig.config.tagsToExport.split(';');\n splittedTags.forEach(function(t) {\n exportConfig.header.push('tag:' + t);\n })\n }\n\n // inject the cost headers\n $scope.groupedAllCheckdPeriods.reverse().forEach(function(period) {\n\n if ($scope.itemCostProperty) {\n exportConfig.header.push(period + '-Costs');\n }\n\n if ($scope.itemQuantityProperty) {\n exportConfig.header.push(period + '-Quantity');\n }\n });\n\n // export the data\n return $busy.during($eaDataExportOperations.exportListTo('csv', historyElements, exportConfig.header, exportConfig.config).then(function (data) {\n $eaDownload.do(data, $scope.contract + '-' + $scope.selectedPeriod + \"-azure-costs.csv\", \"text/plain\");\n }));\n });\n };\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').service('$eaWidgetGroupFilterListViewDataSources', function($q, $eaDataSourceManager) {\n var self = this;\n\n\n self.registerDataSources = function(controllerScope)\n {\n // Register all datasources this widget offers\n // Data source the widget provides\n\n $eaDataSourceManager.registerDataSource(controllerScope.uuid, 'Items', null, function () {\n return controllerScope.buildDashboardDefer.promise.then(function () {\n return $q.when(controllerScope.rawItems);\n });\n });\n\n $eaDataSourceManager.registerDataSource(controllerScope.uuid, 'Items.Filtered', null, function () {\n return controllerScope.buildDashboardDefer.promise.then(function () {\n if (controllerScope.activeFilter) {\n return $q.when(controllerScope.rawItemsFiltered);\n } else {\n return $q.when(controllerScope.rawItems);\n }\n });\n });\n\n $eaDataSourceManager.registerDataSource(controllerScope.uuid, 'Items.Selected.Filtered', null, function () {\n return controllerScope.buildDashboardDefer.promise.then(function (groupSpendingData) {\n if (groupSpendingData.All && groupSpendingData.All.ServiceItems) {\n return $q.when(groupSpendingData.All.ServiceItems);\n } else {\n return $q.when([]);\n }\n });\n });\n\n $eaDataSourceManager.registerDataSource(controllerScope.uuid, 'Items.Checked.Filtered.Overall', null, function () {\n return controllerScope.buildDashboardDefer.promise.then(function (groupedSpendingData) {\n if (groupedSpendingData.All && groupedSpendingData.All.ServiceCosts && groupedSpendingData.Currency && groupedSpendingData.Currency.Symbol) {\n return $q.when([{\n ReportCurrencySymbol: groupedSpendingData.Currency.Symbol,\n ServiceCosts: groupedSpendingData.All.ServiceCosts\n }]);\n } else {\n return $q.when([]);\n }\n });\n });\n\n $eaDataSourceManager.registerDataSource(controllerScope.uuid, 'Groups', null, function () {\n return $q.when(controllerScope.groupOptions);\n });\n\n $eaDataSourceManager.registerDataSource(controllerScope.uuid, 'Groups.Active', null, function () {\n return controllerScope.buildDashboardDefer.promise.then(function (groupedSpendingData) {\n return $q.when(groupedSpendingData.SelectedGroupOption);\n })\n });\n\n $eaDataSourceManager.registerDataSource(controllerScope.uuid, 'Periods', null, function () {\n return $q.when({PeriodProperty: 'ReportId', PeriodsAvailable: controllerScope.availablePeriods});\n });\n };\n\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').directive('eaWidgetGroupFilterListViewPgTemplateHost', function($compile) {\n return {\n restrict: 'C',\n scope: {\n template: '='\n },\n link: function(scope, element) {\n element.attr('class', scope.template);\n $compile(element)(scope.$parent);\n }\n };\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').directive('eaWidgetGroupFilterListViewPgDefaultTemplate', function() {\n return {\n restrict: 'C',\n template:\n '
' +\n '
{{groupData.PrimaryGroupName}}
' +\n '
',\n scope: false\n };\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').directive('eaWidgetGroupFilterListViewPgSubitemDefaultTemplate', function() {\n return {\n restrict: 'C',\n template:\n '
' +\n '
' +\n '
{{getSubItemTitle(serviceItem)}}
' +\n '
',\n scope: false\n };\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').directive('eaWidgetGroupFilterListViewPgCspCustomerTemplate', function() {\n return {\n restrict: 'C',\n template:\n '
' +\n '
{{groupData.PrimaryGroupName}}' +\n '  ' +\n '  ' +\n '  ' +\n '  ' +\n '  ' +\n '  ' +\n '  ' +\n '  ' +\n '  ' +\n '  Reduced Earnings' +\n '  All Earnings' +\n // '  AOBO' +\n '  Azure Plan' +\n '  Alpha' +\n '  ' +\n '
' +\n '
',\n scope: false,\n controller: 'EaWidgetGroupFilterListViewPgCspCustomerTemplateCtrl'\n };\n}).controller('EaWidgetGroupFilterListViewPgCspCustomerTemplateCtrl', function($scope, $stateParams, $window) {\n\n $scope.syncHandlesEarnings = function(customerGroupData) {\n\n // check if we have data\n if (!customerGroupData || !customerGroupData.ServiceItems || customerGroupData.ServiceItems.length === 0) {\n return false;\n }\n\n // get the reference item\n var refItem = customerGroupData.ServiceItems[0];\n\n // debugger;\n return refItem.ReportLastSync && (moment(refItem.ReportLastSync) > moment(\"2020-05-04T22:00\"));\n };\n\n $scope.isCSP = function() {\n return ($scope.cust01 && $scope.cust01.TierLevel === 'T1');\n };\n\n $scope.isT1N = function() {\n return ($scope.cust01 && $scope.cust01.TierLevel === 'T1N');\n };\n\n $scope.isVirtual = function() { \n return ($scope.cust01 && $scope.cust01.TierLevel === 'V1');\n }\n\n $scope.isNewCommerce = function(customerGroupData) {\n\n // check if we have a service item\n // debugger;\n if (!customerGroupData.ServiceItems || customerGroupData.ServiceItems.length === 0) {\n return false;\n }\n\n // get the reference item\n var refItem = customerGroupData.ServiceItems[0];\n\n // debugger;\n return refItem.CustomerNewCommerce || false;\n };\n\n $scope.isAlpha = function(customerGroupData) {\n return $scope.isNewCommerce(customerGroupData);\n };\n\n $scope.hasFullEarnings = function(customerGroupData) {\n\n // no services\n if (!customerGroupData.ServiceItems || customerGroupData.ServiceItems.length === 0) {\n return true;\n }\n\n // check\n var partialEarnings = customerGroupData.ServiceItems.filter(function(a) { return a.FullEarnings === false });\n return !partialEarnings || partialEarnings.length === 0;\n };\n\n $scope.defineResellerMargin = function(customerGroupData) {\n $scope.executeDashboardAction('func:28A17E4C-960F-4D79-AD31-B6BBC9B7CFF0', customerGroupData);\n };\n\n $scope.defineResellerFilter = function(resellerFilterData) {\n $scope.executeDashboardAction('func:4A5811F8-8BA7-484F-9D18-138E4E2F3786', resellerFilterData);\n };\n\n $scope.openCustomerDashboard = function(customerGroupData, nomargin) {\n var canCustomerSelectVersion = $scope.showVersionChooser(customerGroupData);\n var teamId = customerGroupData.ServiceItems.length > 0 && customerGroupData.ServiceItems[0].CustomerTeamId ? customerGroupData.ServiceItems[0].CustomerTeamId : customerGroupData.PrimaryGroupId;\n $scope.executeDashboardAction('func:2929E37C-B3D7-483C-9BF9-4BFCA5D9C92D', { TeamId: teamId, Cycle: $scope.options.dataItems.propertyState, NoMargin: nomargin, ForceV2: !canCustomerSelectVersion });\n };\n\n $scope.toggleVersion = function(customerGroupData) {\n $scope.executeDashboardAction('func:9148E92E-6C1C-4846-BE9C-A8A5F9417AB5', customerGroupData);\n };\n\n $scope.updateVirtualMeters = function(customerGroupData) {\n $scope.executeDashboardAction('func:632E41FF-BE9B-4793-B22B-B71EC997FEE1', customerGroupData);\n };\n\n $scope.openCustomerSettings = function(customerGroupData) {\n $scope.executeDashboardAction('func:EE74EAF3-E461-4A11-9E29-F9A9069799D1', customerGroupData);\n };\n\n\n $scope.showVersionChooser = function(customerGroupData) {\n\n // check if we have a service item\n if (!customerGroupData.ServiceItems || customerGroupData.ServiceItems.length == 0) {\n return false;\n }\n\n // get the reference item\n var refItem = customerGroupData.ServiceItems[0];\n\n // check the activation date\n if (!refItem.ActivatedAt) {\n return true;\n } else if (refItem.ActivatedAt.indexOf('1970-') === 0) {\n return true;\n } else {\n return false;\n }\n };\n\n $scope.publishToReseller = function(customerGroupData) {\n $scope.executeDashboardAction('func:55E8F243-E782-426C-825B-70E4C484846A', customerGroupData);\n };\n\n $scope.manageVouchers = function(customerGroupData) {\n var targetUri = '/app2/teams/' + $stateParams.resellerId + '/apps/accounts/' + $stateParams.active + '/customers/' + customerGroupData.PrimaryGroupId + '/vouchers';\n console.log('Target-Uri is: ' + targetUri);\n $window.location.href = targetUri;\n };\n\n $scope.manageContainers = function(customerGroupData) {\n var targetUri = '/app2/teams/' + $stateParams.resellerId + '/apps/accounts/' + $stateParams.active + '/customers/' + customerGroupData.PrimaryGroupId + '/containers';\n console.log('Target-Uri is: ' + targetUri);\n $window.location.href = targetUri;\n };\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').directive('eaWidgetGroupFilterListViewPgSpendingsSubscriptionTemplate', function() {\n return {\n restrict: 'C',\n template: '
' +\n '
{{groupData.PrimaryGroupName}}
' +\n '' +\n '
',\n scope: false,\n controller: 'EaWidgetGroupFilterListViewPgSpendingsSubscriptionTemplateCtrl'\n };\n}).controller('EaWidgetGroupFilterListViewPgSpendingsSubscriptionTemplateCtrl', function($scope, $element, $controller, $modal, $q, gravatarService, $eaDataCoordinator, $eaBackend, $eaSession2, $eaBilling) {\n\n // include the required mixin\n $.extend(self, $controller('ModalObjectPickerCtrlMixin', {$scope: $scope, $modal: $modal }));\n $.extend(self, $controller('TeamManagementCtrlMixin', {$scope: $scope, $eaBackend: $eaBackend, $q: $q, $eaSession2: $eaSession2}));\n\n $scope.pgSpendingsSubscriptionsTemplateScope = {\n teamProfileMembers: [],\n allowPrimaryContact: ($scope.profiles.team.Id !== 'personal' && ($scope.profiles.team.Role == 'admin') && $eaBilling.hasRequiredPlan($scope.profiles.team.AccountPlan, 'enterprise'))\n };\n\n // check if we are allows to handle primary contacts\n if ($scope.pgSpendingsSubscriptionsTemplateScope.allowPrimaryContact) {\n\n // at this point start loading the group members should we are the admin\n $eaDataCoordinator.query($scope.team, $scope.contract, $scope.token, 'TeamMembershipEntryClass', null).then(function (teamMembers) {\n\n // cache\n $scope.pgSpendingsSubscriptionsTemplateScope.teamProfileMembers = teamMembers;\n\n // build the teammeber Index\n var teamMembersIndex = teamMembers.buildIndex('UserId');\n\n // load all the subscriptions\n return $eaDataCoordinator.query($scope.team, $scope.contract, $scope.token, 'SubscriptionEntryClass', null).then(function (subscriptions) {\n\n // build subscription index\n var subscriptionsIndex = subscriptions.buildIndex('SubscriptionId');\n\n // get the right contacts\n var subscription = subscriptionsIndex[$scope.groupData.PrimaryGroupId];\n if (!subscription) {\n return;\n }\n\n // assign the contacts\n $scope.groupData.Contacts = subscription.Contacts.map(function (c) {\n\n var user = teamMembersIndex[c];\n if (!user) {\n return {};\n }\n\n return {\n UserId: c,\n Contact: user.Contact,\n DisplayName: user.FirstName + ' ' + user.LastName\n };\n });\n })\n });\n }\n\n $scope.pgSpendingsSubscriptionsTemplate = {\n\n editPrimaryContacts: function (groupModel) {\n\n // var index groupContacts\n var lookupExistingContacts = groupModel.Contacts.buildIndex('UserId');\n\n // de-couple the groupModel\n var contacts = JSON.parse(JSON.stringify($scope.pgSpendingsSubscriptionsTemplateScope.teamProfileMembers)).filter(function (c) {\n return (c.Type !== 'app-only');\n });\n\n var existingContacts = [];\n contacts.forEach(function (c) {\n if (lookupExistingContacts[c.UserId]) {\n existingContacts.push(c);\n }\n });\n\n // description\n var description = 'Please select the users who should become responsible contacts for the subscription ' + groupModel.PrimaryGroupName + '. This helps to contact the right person to clarify unexpected spending changes.';\n\n var getDisplayName = function (model) {\n if ($scope.isUserPseudoUser(model)) {\n return model.Contact;\n } else {\n return model.FirstName + ' ' + model.LastName;\n }\n };\n\n var getDetailsString = function (model) {\n if ($scope.isUserPseudoUser(model)) {\n return 'Invitation pending';\n } else {\n return model.Contact;\n }\n };\n\n var getImageUrl = function (model) {\n return gravatarService.url(model.Contact, {size: 32, default: 'mm'});\n };\n\n $scope.openObjectPickerDialog('Select responsible user', description, getImageUrl, getDisplayName, getDetailsString, contacts, existingContacts).then(function (selectedUsers) {\n\n\n // geenerate the userIdList\n var userIdList = selectedUsers.map(function (user) {\n return user.UserId;\n });\n\n // update the contacts in the network\n $eaBackend.dataPutContractSubscription($scope.team, $scope.contract, groupModel.PrimaryGroupId, {Contacts: userIdList}, $scope.token).then(function () {\n\n // update the cache\n $eaDataCoordinator.updateModels($scope.team, $scope.contract, 'SubscriptionEntryClass', ['SubscriptionId'], [groupModel.PrimaryGroupId], 'Contacts', userIdList, 'set');\n\n // rerender\n $scope.refreshWidget();\n })\n })\n }\n };\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').directive('eaWidgetGroupFilterListViewPgSubitemSpendingsServiceTemplate', function() {\n return {\n restrict: 'C',\n template:\n '
' +\n '
{{getSubItemTitle(serviceItem)}}  
' +\n '
' +\n '
' +\n '
' +\n '
' +\n '
 Loading details ...
' +\n '
' +\n '
' +\n '
' +\n '' +\n '
'+\n '
' +\n '
' +\n '
' +\n '
0\">{{meter.name}} ({{meter.rate}})
' +\n '
' +\n '
',\n scope: false,\n controller: 'EaWidgetGroupFilterListViewPgSubitemSpendingsServiceTemplateCtrl'\n };\n}).controller('EaWidgetGroupFilterListViewPgSubitemSpendingsServiceTemplateCtrl', function($scope, $element, $controller, $state, $stateParams, $modal, $q, $window, $eaConfig, gravatarService, $eaDataCoordinator, $eaBackend, $eaDataAggregateOperations, $compile, $eaChartConfig, $eaBackendDataModeSelector, $timeout) {\n var self = this;\n var detailedChartElement = null;\n\n function getDayOfMonthByIndex(idx) {\n if ($eaBackendDataModeSelector.isBillingCycleEnabled()) {\n var dayofMonth = moment($scope.serviceItem.ReportId).add($eaBackendDataModeSelector.getBillingCycleDay() - 1, 'days').add(idx, 'days').date();\n return (\"0\" + dayofMonth).slice(-2);\n } else {\n return (\"0\" + (idx + 1)).slice(-2);\n }\n }\n\n function getDateNameByIndex(idx)\n {\n if ($eaBackendDataModeSelector.isBillingCycleEnabled()) {\n var m = moment($scope.serviceItem.ReportId).add($eaBackendDataModeSelector.getBillingCycleDay() - 1, 'days').add(idx, 'days');\n return m.format('YYYY-MM-DD');\n } else {\n return $scope.serviceItem.ReportId + '-' + getDayOfMonthByIndex(idx);\n }\n }\n\n function getMeterRateSafely(meter, reportId, currency) {\n\n // check the reportId\n if (!reportId) { return 'n/a'; }\n\n // check the meter\n if (!meter) { return 'n/a'; }\n\n // check the Rates\n if (meter.Rates.length == 0) { return 'n/a'; }\n\n var reportRates = meter.Rates[reportId + '-01T00:00:00'];\n if (!reportRates || reportRates.length == 0) { return 'n/a'; }\n\n var reportRate = reportRates[0] || reportRates['default'];\n if (!reportRate) { return 'n/a'; }\n\n return reportRate.toFixed(8) + ' ' + currency\n }\n\n function areDataInV2Mode(serviceItem) {\n return (Array.isArray(serviceItem.ServiceMeters));\n }\n\n // enable and disable tagging\n $scope.serviceItem.allowTagging = !($scope.selectedPeriodsMultiNormalized.length > 1);\n $scope.serviceItem.viewDayByDayCostsStatus = 'closed';\n $scope.serviceItem.viewDayByDayCostsId = 'DailyCostsChart-' + $scope.serviceItem.EntityId;\n\n $scope.switchDetailDiagramTo = function(target) {\n $scope.activeDetailDiagram = target;\n };\n\n var XAxisTemplate = function() {\n return getDayOfMonthByIndex(this.value);\n };\n\n var YAxisTemplateCurrency = function() {\n return this.value.toFixed(2) + ' ' + $scope.serviceItem.ReportCurrencySymbol;\n };\n\n var YAxisTemplateQuantity = function() {\n return this.value.toFixed(2) + ' ' + $scope.serviceItem.ServiceQuantityUnit;\n };\n\n function updateDiagram() {\n\n var metersDayByDayCosts = [];\n var metersDayByDayQuantity = [];\n\n if (areDataInV2Mode($scope.serviceItem)) {\n\n $scope.serviceItem.ServiceMeters.forEach(function (meter) {\n\n var viewDayByDayCostsAndQuantityData = [];\n\n for (var i = 0; i < meter.QuantityDaily.length; i++) {\n viewDayByDayCostsAndQuantityData.push({\n Day: getDateNameByIndex(i),\n Quantity: meter.QuantityDaily[i],\n Costs: meter.CostsDaily[i]\n })\n }\n\n var options = {\n Costs: dayByDayCostOptions,\n Quantity: {\n ToolTipTemplate: 'Service Quantity: {point.y:,.6f} ' + meter.Unit + '',\n YAxisTemplate: function () {\n return this.value.toFixed(2) + ' ' + meter.Unit;\n },\n XAxisTemplate: XAxisTemplate\n }\n };\n\n var meterName = meter.Region + '/' + meter.Category + '/' + meter.SubCategory + '/' + meter.Name;\n var meterRate = 'Costs: ' + meter.Costs.toFixed(8) + ' ' + $scope.serviceItem.ReportCurrencySymbol + ' / Rate: ' + getMeterRateSafely(meter, $scope.serviceItem.ReportId, $scope.serviceItem.ReportCurrencySymbol);\n metersDayByDayCosts.push({\n id: $scope.serviceItem.viewDayByDayCostsId + '.' + meter.Id,\n name: meterName,\n rate: meterRate,\n options: options,\n data: viewDayByDayCostsAndQuantityData\n });\n metersDayByDayQuantity.push({\n id: $scope.serviceItem.viewDayByDayCostsId + '.' + meter.Id,\n name: meterName,\n rate: meterRate,\n options: options,\n data: viewDayByDayCostsAndQuantityData\n });\n });\n } else {\n\n var viewDayByDayCostsData = [];\n var viewDayByDayQunatityData = [];\n\n // Convert the daily data to the required data\n if ($scope.serviceItem.ServiceDailyCosts) {\n for (var i = 0; i < $scope.serviceItem.ServiceDailyCosts.length; i++) {\n viewDayByDayCostsData.push({\n Day: getDateNameByIndex(i),\n Costs: $scope.serviceItem.ServiceDailyCosts[i]\n });\n }\n }\n\n if ($scope.serviceItem.ServiceDailyQuantities) {\n for (var i = 0; i < $scope.serviceItem.ServiceDailyQuantities.length; i++) {\n viewDayByDayQunatityData.push({\n Day: getDateNameByIndex(i),\n Quantity: $scope.serviceItem.ServiceDailyQuantities[i]\n });\n }\n }\n\n metersDayByDayCosts.push({\n id: $scope.serviceItem.viewDayByDayCostsId,\n name: \"\",\n options: {Costs: dayByDayCostOptions},\n data: viewDayByDayCostsData\n });\n metersDayByDayQuantity.push({\n id: $scope.serviceItem.viewDayByDayCostsId,\n name: \"\",\n options: {Quantity: dayByDayQunatityOptions},\n data: viewDayByDayQunatityData\n });\n }\n\n $scope.availableDetailDiagrams = [\n { id: 'costs', name: 'Costs', icon: 'fa-area-chart', meters: metersDayByDayCosts, dataValueFieldName:'Costs', dataLabelFieldName: 'Day'},\n { id: 'quantity', name: 'Quantity', icon: 'fa-area-chart', meters: metersDayByDayQuantity, dataValueFieldName:'Quantity', dataLabelFieldName:'Day'}\n ];\n\n // set the default detials\n $scope.switchDetailDiagramTo($scope.availableDetailDiagrams[0]);\n }\n\n // define the diagram options\n var dayByDayCostOptions = {\n ToolTipTemplate: 'Service Costs: {point.y:,.6f} ' + $scope.serviceItem.ReportCurrencySymbol + '',\n YAxisTemplate: YAxisTemplateCurrency,\n XAxisTemplate: XAxisTemplate\n };\n\n var dayByDayQunatityOptions = {\n ToolTipTemplate: 'Service Quantity: {point.y:,.6f} ' + $scope.serviceItem.ServiceQuantityUnit + '',\n YAxisTemplate: YAxisTemplateQuantity,\n XAxisTemplate: XAxisTemplate\n };\n\n // update the diagram\n updateDiagram();\n\n // Handle the tagging requests for a service\n $scope.addTag = function (service, tag) {\n\n // update the models in data cache with the new values\n $eaDataCoordinator.updateModels($scope.team, $scope.contract, 'SpendingEntryClass', ['ServiceName', 'ServiceCategory', 'SubscriptionId'], [service.ServiceName, service.ServiceCategory, service.SubscriptionId], 'ServiceTags', tag);\n $eaDataCoordinator.updateModels($scope.team, $scope.contract, 'SpendingEntryClass', ['ServiceName', 'ServiceCategory', 'SubscriptionId'], [service.ServiceName, service.ServiceCategory, service.SubscriptionId], 'ServiceTagsV3', tag);\n\n // create the tags array if needed\n if (!service.ServiceTags || !Array.isArray(service.ServiceTags)) { service.ServiceTags = []; }\n if (!service.ServiceTagsV3 || !Array.isArray(service.ServiceTagsV3)) { service.ServiceTagsV3 = []; }\n\n // update the ui model for this periond\n if (service.ServiceTags.indexOf(tag) === -1) { service.ServiceTags.push(tag); }\n if (service.ServiceTagsV3.indexOf(tag) === -1) { service.ServiceTagsV3.push(tag); }\n\n // update the history element\n var itemKey = service.SubscriptionId + '-' + service.ServiceId;\n $scope.groupedSpendingData.History[itemKey].ServiceTags = service.ServiceTags;\n $scope.groupedSpendingData.History[itemKey].ServiceTagsV3 = service.ServiceTagsV3;\n\n // send to the backend\n if (service.SchemaVersion === 'spendings.v3' || service.SchemaVersion === 'spendings.v2') {\n $eaBackend.dataSetServiceTagsV4($scope.team, $scope.contract, service.ServiceId, service.ServiceTags, $scope.token);\n } else {\n $eaBackend.dataSetServiceTagsV3($scope.team, $scope.contract, service.ServiceName, service.ServiceCategory, service.SubscriptionId, service.ServiceTagsV3, $scope.token);\n }\n };\n\n function removeTagFromUIElement(service, tagProperty, searchProperties, tagToRemove) {\n $scope.rawItems\n //.filter(function(a) { return a.ServiceId === service.ServiceId; })\n .filter(function(a) {\n var bPassed = true;\n\n searchProperties.forEach(function (sp) {\n if (a[sp] !== service[sp]) {\n bPassed = false;\n }\n });\n\n return bPassed;\n }).forEach(function(item) {\n\n var index = item.ServiceTags.indexOf(tagToRemove);\n if (index !== -1 ) { item.ServiceTags.splice(index, 1); }\n\n if (tagProperty) {\n index = item[tagProperty].indexOf(tagToRemove);\n if (index !== -1) {\n item[tagProperty].splice(index, 1);\n }\n }\n });\n }\n\n $scope.removeTag = function (service, tag) {\n\n // update the ui model for this periond\n var tagIndex = service.ServiceTags.indexOf(tag);\n if ( tagIndex !== -1) { service.ServiceTags.splice(tagIndex, 1); }\n\n // remove from history data\n var itemKey = service.SubscriptionId + '-' + service.ServiceId;\n $scope.groupedSpendingData.History[itemKey].ServiceTags.splice(tagIndex, 1);\n\n // remember if removed befor\n var removedBefore = false;\n\n // understand what type if tag is it\n var tagIndexV1 = service.ServiceTagsV1.indexOf(tag);\n if (tagIndexV1 !== -1) {\n removedBefore = true;\n service.ServiceTagsV1.splice(tagIndexV1, 1);\n $eaBackend.dataSetServiceTagsV1($scope.team, $scope.contract, service.ServiceName, service.ServiceTagsV1, $scope.token).then(function() {\n\n // update the models in data cache with the new values\n $eaDataCoordinator.updateModels($scope.team, $scope.contract, 'SpendingEntryClass', ['ServiceName'], [service.ServiceName], 'ServiceTagsV1', tag, 'remove');\n $eaDataCoordinator.updateModels($scope.team, $scope.contract, 'SpendingEntryClass', ['ServiceName'], [service.ServiceName], 'ServiceTags', tag, 'remove');\n\n // update the UI\n removeTagFromUIElement(service, undefined, ['ServiceName'], tag);\n })\n }\n\n var tagIndexV2 = service.ServiceTagsV2.indexOf(tag);\n if (tagIndexV2 !== -1) {\n removedBefore = true;\n service.ServiceTagsV2.splice(tagIndexV2, 1);\n $eaBackend.dataSetServiceTagsV2($scope.team, $scope.contract, service.ServiceName, service.ServiceCategory, service.ServiceTagsV2, $scope.token).then(function() {\n\n // update the models in data cache with the new values\n $eaDataCoordinator.updateModels($scope.team, $scope.contract, 'SpendingEntryClass', ['ServiceName', 'ServiceCategory'], [service.ServiceName, service.ServiceCategory], 'ServiceTagsV2', tag, 'remove');\n $eaDataCoordinator.updateModels($scope.team, $scope.contract, 'SpendingEntryClass', ['ServiceName', 'ServiceCategory'], [service.ServiceName, service.ServiceCategory], 'ServiceTags', tag, 'remove');\n\n // update the UI\n removeTagFromUIElement(service, 'ServiceTagsV2', ['ServiceName', 'ServiceCategory'], tag);\n })\n }\n\n // Handle V3 tags\n var tagIndexV3 = service.ServiceTagsV3.indexOf(tag);\n if (tagIndexV3 !== -1) {\n removedBefore = true;\n service.ServiceTagsV3.splice(tagIndexV3, 1);\n\n // remove from history data\n $scope.groupedSpendingData.History[itemKey].ServiceTagsV3.splice(tagIndexV3, 1);\n\n // remove the tag in backend\n $eaBackend.dataSetServiceTagsV3($scope.team, $scope.contract, service.ServiceName, service.ServiceCategory, service.SubscriptionId, service.ServiceTagsV3, $scope.token).then(function() {\n\n // update the models in data cache with the new values\n $eaDataCoordinator.updateModels($scope.team, $scope.contract, 'SpendingEntryClass', ['ServiceName', 'ServiceCategory', 'SubscriptionId'], [service.ServiceName, service.ServiceCategory, service.SubscriptionId], 'ServiceTagsV3', tag, 'remove');\n $eaDataCoordinator.updateModels($scope.team, $scope.contract, 'SpendingEntryClass', ['ServiceName', 'ServiceCategory', 'SubscriptionId'], [service.ServiceName, service.ServiceCategory, service.SubscriptionId], 'ServiceTags', tag, 'remove');\n\n // update the UI\n removeTagFromUIElement(service, 'ServiceTagsV3', ['ServiceName', 'ServiceCategory', 'SubscriptionId'], tag);\n })\n }\n\n if (!removedBefore) {\n // remove the tag in backend\n var removePromise;\n\n if (service.SchemaVersion === 'spendings.v3' || service.SchemaVersion === 'spendings.v2') {\n removePromise = $eaBackend.dataSetServiceTagsV4($scope.team, $scope.contract, service.ServiceId, service.ServiceTags, $scope.token);\n } else {\n\n // remove from history data\n $scope.groupedSpendingData.History[itemKey].ServiceTagsV3.splice(tagIndexV3, 1);\n\n removePromise = $eaBackend.dataSetServiceTagsV3($scope.team, $scope.contract, service.ServiceName, service.ServiceCategory, service.SubscriptionId, service.ServiceTagsV3, $scope.token);\n }\n removePromise.then(function() {\n\n // update the models in data cache with the new values\n $eaDataCoordinator.updateModels($scope.team, $scope.contract, 'SpendingEntryClass', ['ServiceName', 'ServiceCategory', 'SubscriptionId'], [service.ServiceName, service.ServiceCategory, service.SubscriptionId], 'ServiceTagsV3', tag, 'remove');\n $eaDataCoordinator.updateModels($scope.team, $scope.contract, 'SpendingEntryClass', ['ServiceName', 'ServiceCategory', 'SubscriptionId'], [service.ServiceName, service.ServiceCategory, service.SubscriptionId], 'ServiceTags', tag, 'remove');\n\n // update the UI\n removeTagFromUIElement(service, 'ServiceTagsV3', ['ServiceName', 'ServiceCategory', 'SubscriptionId'], tag);\n })\n }\n };\n\n $scope.queryTags = function (query) {\n // find the distince values of the tags property (filtered by query)\n return $eaDataAggregateOperations.distinct($scope.rawItems, 'ServiceTags', query);\n };\n\n\n self.getPopOverTitle = function(groupedServiceDefinitions, metaDataKeyValue, titleProperty) {\n var metaDataElement = groupedServiceDefinitions[metaDataKeyValue];\n if (metaDataElement && metaDataElement[0] && metaDataElement[0][titleProperty]) {\n return metaDataElement[0][titleProperty];\n } else {\n return metaDataKeyValue;\n }\n };\n\n self.getPopOverContent = function(groupedServiceDefinitions, metaDataKeyValue, contentProperty, element) {\n // get the default value\n var popOverContent = self.getPopOverTitle(groupedServiceDefinitions, metaDataKeyValue, contentProperty);\n\n // generate the service summary, a virtual property\n if (contentProperty === 'ServiceSummary') {\n\n var metaDataElement = groupedServiceDefinitions[metaDataKeyValue];\n if (metaDataElement && metaDataElement !== undefined) {\n metaDataElement = metaDataElement[0];\n }\n\n var serviceDescriptionHtml = '';\n\n // add the description\n if (metaDataElement && metaDataElement !== undefined) {\n serviceDescriptionHtml += '

' + metaDataElement.ServiceDescription + '

';\n }\n\n // handle quantity unit\n var unit = element.ServiceQuantityUnit;\n if (element.ServiceQuantityUnit == 'not_set') {\n unit = '';\n }\n\n // fill up optionla values\n if (!element.ServiceQuantity) {\n element.ServiceQuantity = 0.0;\n }\n\n var azureTags = [];\n Object.keys(element).forEach(function (k) {\n if (k.indexOf('AzureTag:') !== 0) {\n return;\n }\n azureTags.push({k: k.replace('AzureTag:', ''), v: element[k]});\n });\n\n // generate the popup\n serviceDescriptionHtml += '';\n serviceDescriptionHtml += '';\n serviceDescriptionHtml += '';\n serviceDescriptionHtml += '';\n serviceDescriptionHtml += '';\n serviceDescriptionHtml += '';\n serviceDescriptionHtml += '';\n serviceDescriptionHtml += '';\n serviceDescriptionHtml += '';\n\n // quantity only when we have no meters\n if (!Array.isArray(element.ServiceMeters)) {\n serviceDescriptionHtml += '';\n }\n\n // add the costs\n serviceDescriptionHtml += '';\n\n // visit all meters if available\n if (Array.isArray(element.ServiceMeters) && element.ServiceMeters.length > 0) {\n\n serviceDescriptionHtml += '';\n\n element.ServiceMeters.forEach(function(meter) {\n\n // Region / Category / SubCategory / Name 4545 Unit 565€\n serviceDescriptionHtml += '';\n serviceDescriptionHtml += '';\n });\n }\n\n\n if (azureTags.length > 0) {\n serviceDescriptionHtml += '';\n\n azureTags.forEach(function(tag) {\n serviceDescriptionHtml += '';\n });\n }\n\n serviceDescriptionHtml += '
General Information
Subscription:' + element.SubscriptionName + '
Name:' + element.ServiceName + '
Category:' + element.ServiceCategory + '
Type:' + element.ServiceType + '
Size:' + element.ServiceSize + '
Region:' + element.ServiceRegion + '
ResourceGroup:' + element.ResourceGroup + '
Quantity:' + element.ServiceQuantity.toFixed(8) + ' ' + unit + '
Costs:' + element.ServiceCosts.toFixed(8) + ' ' + element.ReportCurrencySymbol + '
Service Meters (Quantity/Costs/Rate)
' + meter.SubCategory + '' + meter.Quantity.toFixed(8) + ' ' + meter.Unit + ' / ' + meter.Costs.toFixed(8) + ' ' + element.ReportCurrencySymbol + ' / ' + getMeterRateSafely(meter, element.ReportId, element.ReportCurrencySymbol) + '
' + meter.Region + '/' + meter.Category + '/' + meter.SubCategory + '/' + meter.Name + '
Grouping Tags
' + tag.k + ':' + tag.v + '
';\n\n return serviceDescriptionHtml;\n }\n };\n\n // build the popup information\n $scope.serviceItem.PopoverTitle = $scope.serviceItem.ServiceName; // self.getPopOverTitle($scope.groupedServiceDefinitions, $scope.serviceItem.ServiceType, 'ServiceTitle');\n $scope.serviceItem.PopoverHtml = self.getPopOverContent($scope.groupedServiceDefinitions, $scope.serviceItem.ServiceType, 'ServiceSummary', $scope.serviceItem);\n\n // Allow to open the RI report\n $scope.riPurchaseReportPossible = function(serviceItem) {\n\n // check if the feature is enabled\n if (!$eaConfig.riEnabled) { return false; }\n\n // check if we have teh right service type\n if (serviceItem.ServiceType !== 'VirtualMachine' && serviceItem.ServiceCategory !== 'Virtual Machines') { return false;}\n\n // ok good to go\n return true;\n };\n\n $scope.openRIPurchaseReport = function(serviceItem)\n {\n var url = $state.href('authorized.teams.rimanagement', { service: serviceItem.ServiceId, contract: $stateParams.active });\n $window.open(url,'_blank');\n };\n\n\n $scope.isOpenedStateClosed = function(serviceItem) {\n return serviceItem.viewDayByDayCostsStatus === 'closed';\n };\n\n $scope.isOpenedStateOpened = function(serviceItem) {\n return serviceItem.viewDayByDayCostsStatus === 'opened';\n };\n\n $scope.isOpenedStateInProgress = function(serviceItem) {\n return serviceItem.viewDayByDayCostsStatus === 'progressing';\n };\n\n $scope.setOpenedStateClosed = function(serviceItem) {\n serviceItem.viewDayByDayCostsStatus = 'closed';\n };\n\n $scope.setOpenedStateOpened = function(serviceItem) {\n serviceItem.viewDayByDayCostsStatus = 'opened';\n };\n\n $scope.setOpenedStateProgress = function(serviceItem) {\n serviceItem.viewDayByDayCostsStatus = 'progressing';\n };\n\n $scope.toggleDetailViewOpenedState = function(serviceItem) {\n\n // check if we are closing\n if ($scope.isOpenedStateOpened(serviceItem)) {\n $scope.setOpenedStateClosed(serviceItem);\n return;\n }\n\n // check if we are in V2 mode if not render instantly\n if (!areDataInV2Mode(serviceItem)) {\n $scope.setOpenedStateOpened(serviceItem);\n return;\n }\n\n // now that we now we are in V2 mode check if we have preloaded data\n if (serviceItem.ServiceMeters != null && serviceItem.ServiceMeters.length > 0) {\n $scope.setOpenedStateOpened(serviceItem);\n return;\n }\n\n // start the progressing\n $scope.setOpenedStateProgress(serviceItem);\n\n // load the meter dynamically\n $eaBackend.dataGetMetersForService($scope.team, $scope.contract, serviceItem.ReportId, serviceItem.ServiceId, $scope.token).then(function(loadedMeters) {\n\n // set the meters\n if (loadedMeters && loadedMeters.Items) { serviceItem.ServiceMeters = loadedMeters.Items; }\n\n // update the diagram\n updateDiagram();\n\n // done\n $scope.setOpenedStateOpened(serviceItem);\n });\n }\n\n\n\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').directive('eaWidgetGroupFilterListViewPgCspResellerT2Template', function() {\n return {\n restrict: 'C',\n template:\n '
' +\n '
{{groupData.PrimaryGroupName}}' +\n '  ' +\n '  ' +\n '  ' +\n '
' +\n '
',\n scope: false,\n controller: 'EaWidgetGroupFilterListViewPgCspResellerT2TemplateCtrl'\n };\n}).controller('EaWidgetGroupFilterListViewPgCspResellerT2TemplateCtrl', function($scope) {\n\n $scope.openResellerPortal = function(customerGroupData) {\n if (customerGroupData.ServiceItems && customerGroupData.ServiceItems.length > 0 && customerGroupData.ServiceItems[0].ResellerTeamId) {\n $scope.executeDashboardAction('func:75FF743F-21BC-4208-BB05-7AC447A17E19', {TeamId: customerGroupData.ServiceItems[0].ResellerTeamId, ResellerId: customerGroupData.ServiceItems[0].ResellerAccountId});\n }\n };\n\n $scope.defineResellerMargin = function(customerGroupData) {\n if (customerGroupData.ServiceItems && customerGroupData.ServiceItems.length > 0 && customerGroupData.ServiceItems[0].ResellerTeamId) {\n $scope.executeDashboardAction('func:AD35F300-7307-4E33-B69C-E5576CDCDA4D', {ResellerTeamId: customerGroupData.ServiceItems[0].ResellerTeamId, ResellerId: customerGroupData.ServiceItems[0].ResellerId});\n }\n };\n\n $scope.unpublishAllCustomers = function(customerGroupData) {\n if (customerGroupData.ServiceItems && customerGroupData.ServiceItems.length > 0 && customerGroupData.ServiceItems[0].ResellerTeamId) {\n $scope.executeDashboardAction('func:8910991F-B227-4A61-B4FB-3F2C6F69D276', {TeamId: customerGroupData.ServiceItems[0].ResellerTeamId, ResellerId: customerGroupData.ServiceItems[0].ResellerAccountId, Customers: customerGroupData.ServiceItems});\n }\n };\n\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').directive('eaWidgetGroupFilterListViewPgSubItemCspResellerT2Template', function() {\n return {\n restrict: 'C',\n template:\n '
' +\n '
' +\n '
{{getSubItemTitle(serviceItem)}}' +\n '  ' +\n '
' +\n '
',\n scope: false,\n controller: 'EaWidgetGroupFilterListViewPgSubItemCspResellerT2TemplateCtrl'\n };\n}).controller('EaWidgetGroupFilterListViewPgSubItemCspResellerT2TemplateCtrl', function($scope) {\n\n $scope.unPublishCustomer = function(serviceItem) {\n $scope.executeDashboardAction('func:E6F0F729-6374-4A62-81A9-7D26EFE82346', {\n ResellerTeamId: serviceItem.ResellerTeamId,\n ResellerAccountId: serviceItem.ResellerAccountId,\n ResellerId: serviceItem.ResellerId,\n CustomerId: serviceItem.CustomerId\n });\n };\n});\n","'use strict';\n\n/*\n */\nangular.module('azureCostsFeApp').directive('eaWidgetRiPurchaseImpact', function() {\n return {\n restrict: 'C',\n templateUrl: 'views/directive_ea_ri_purchase_impact.html',\n controller: 'EaWidgetRiPurchaseImpactCtrl'\n };\n}).controller('EaWidgetRiPurchaseImpactCtrl', function($scope, $rootScope, $q, $state, $stateParams, $eaDataCoordinator, $eaWidgetRiPurchaseImpactDataSources, $eaUserProfile, $acCacheIdentifierGenerator) {\n\n // some UI states\n $scope.hasData = false;\n $scope.hasError = false;\n $scope.selectorHeight = 63;\n $scope.disclaimerHeight = 40;\n\n $scope.buildDashboardDefer = $q.defer();\n $scope.lastLoadedData;\n\n $scope.enrollments = [];\n $scope.currentEnrollment;\n\n $scope.virtualMachines = [];\n $scope.currentVirtualMachine;\n\n // other state internal\n var chartElement;\n var lastSize;\n\n function handleProfileData() {\n\n $eaUserProfile.getContracts($scope.profiles.user, $scope.team).forEach(function(contract) {\n\n var contractModel = {\n Name: contract.Definition === 'EA' ? 'EA-' + contract.Enrollment : contract.Name,\n Id: contract.Enrollment,\n Team: contract.Team\n };\n\n $scope.enrollments.push(contractModel);\n\n if (!$scope.currentEnrollment && $stateParams.contract && contractModel.Id === $stateParams.contract) {\n $scope.currentEnrollment = contractModel;\n }\n });\n\n if ($scope.enrollments.length > 0) { $scope.currentEnrollment = $scope.enrollments[0]; }\n }\n\n function handleVirtualMachines() {\n\n // load the virtual machines which are available\n return $eaDataCoordinator.queryData($scope.team, $scope.currentEnrollment.Id, $scope.token, 'RiAnalysisVirtualMachineItemClass', {collection: 'ri.v1'}).then(function (riVirtualMachines) {\n\n // set the vms\n $scope.virtualMachines = riVirtualMachines;\n\n // check if we have a special VM request in the url\n if ($stateParams.service)\n {\n riVirtualMachines.forEach(function(vm) {\n if (vm.serviceid === $stateParams.service) {\n $scope.currentVirtualMachine = vm;\n }\n });\n }\n\n // select the first one\n if (!$scope.currentVirtualMachine && $scope.virtualMachines.length > 0) {\n $scope.currentVirtualMachine = $scope.virtualMachines[0];\n }\n\n // done\n return $q.when();\n })\n }\n\n function buildDashboard() {\n\n // set the deferrer pending\n $scope.buildDashboardDefer = $q.defer();\n\n // register the build chart callback\n $scope.buildChartCallback = function (chartElementFromDirective) {\n\n // get the cart element\n chartElement = chartElementFromDirective;\n\n // adapt to last know size\n if (lastSize) {\n chartElement.setSize(lastSize.w, lastSize.h - $scope.selectorHeight - $scope.disclaimerHeight, false);\n }\n };\n\n // register the configure callback\n $scope.configureCallback = function (chartOptions) {\n\n // legend\n chartOptions.legend = {\n enabled: true\n };\n\n // tooltip\n chartOptions.tooltip = {\n enabled: true,\n headerFormat: '',\n formatter: function() {\n\n var dateLine = '' + moment(new Date($scope.lastLoadedData.startdate)).add('day', this.point.x).format('YYYY/MM/DD') + ' (' + this.series.name + ')
';\n var costsLine = '\\u25CF Costs: ' + this.point.y.toFixed(2) + $scope.lastLoadedData.currencysymbol + '
';\n\n if (this.series.name.toUpperCase().indexOf('FEE') !== -1) {\n return dateLine + costsLine;\n } else {\n\n // build the usage line\n var usageLine = '\\u25CF Usage: ' + ($scope.lastLoadedData.usages && $scope.lastLoadedData.usages.length > this.point.x ? $scope.lastLoadedData.usages[this.point.x].toFixed(2) + ' hrs' : 'n/a') + '
';\n\n // return the data\n return dateLine + costsLine + usageLine;\n }\n\n }\n };\n\n // xAxis\n chartOptions.xAxis = {\n tickInterval: 31,\n labels: {\n x: 50,\n formatter: function () {\n return moment($scope.lastLoadedData.startdate).add(this.value, 'days').format('MM/YY');\n }\n },\n plotLines: [{\n color: '#000000',\n dashStyle: 'longdashdot',\n value: $scope.lastLoadedData.projectionindex,\n width: 1\n }]\n };\n\n // yAxis\n chartOptions.yAxis = {\n title: {\n text: 'Accumulated Costs'\n }\n }\n };\n\n // regsiter the data callback\n $scope.dataCallback = function (seriesArray) {\n\n // load the spendings information from service layer\n // TODO: Ensure Retry is working when the report is in progress\n return $eaDataCoordinator.queryData($scope.team, $scope.currentEnrollment.Id, $scope.token, 'RiAnalysisResultItemClass', {\n ResourceInstanceId: $scope.currentVirtualMachine.serviceid,\n collection: 'ri.v1',\n cachedCollectionKey: 'RiAnalysisResultItemClass:' + $scope.team + ':' + $scope.currentEnrollment.Id + ':' + $scope.currentVirtualMachine.serviceid,\n query: {\n vmeter: $scope.currentVirtualMachine.vmeter\n }\n }).then(function (riAnalysisData) {\n\n if (riAnalysisData.error) {\n $scope.hasError = true;\n $scope.errorMessage = riAnalysisData.message;\n $scope.hasData = false;\n\n } else {\n // set the last loaded data\n $scope.lastLoadedData = riAnalysisData;\n\n // set that we have data\n $scope.hasData = true;\n $scope.hasError = false;\n\n // the last value\n var lastValue = 0;\n\n // prepare data\n var dataFromPast = [];\n var dataForFuture = [];\n var data1YearRi = [];\n\n for (var dataIndex = 0; dataIndex < riAnalysisData.spendings.length; dataIndex++) {\n\n // define the consumption values\n if (dataIndex < riAnalysisData.projectionindex) {\n dataFromPast.push([dataIndex, lastValue + riAnalysisData.spendings[dataIndex]]);\n } else if (dataIndex === riAnalysisData.projectionindex) {\n dataFromPast.push([dataIndex, lastValue + riAnalysisData.spendings[dataIndex]]);\n dataForFuture.push([dataIndex, lastValue + riAnalysisData.spendings[dataIndex]]);\n } else {\n dataForFuture.push([dataIndex, lastValue + riAnalysisData.spendings[dataIndex]]);\n }\n\n // span the ri values\n data1YearRi.push([dataIndex, riAnalysisData.rifees.y1]);\n\n // add the last value\n lastValue = lastValue + riAnalysisData.spendings[dataIndex];\n }\n\n // define the series\n seriesArray.push({\n type: 'area',\n color: '#b1cf95',\n name: 'Used Consumption',\n data: dataFromPast\n });\n\n seriesArray.push({\n type: 'area',\n color: '#e5efdb',\n name: 'Projected Consumption',\n data: dataForFuture\n });\n\n seriesArray.push({\n type: 'line',\n color: '#d38580',\n name: 'Annual RI Fee',\n data: data1YearRi,\n lineWidth: 1,\n dashStyle: 'Dash'\n });\n }\n\n // refresh dependent widgets\n $scope.refreshDependentWidgets();\n\n // commit the defer\n $scope.buildDashboardDefer.resolve();\n\n // done\n return $q.when();\n })\n };\n\n // trigger the build of the diagram\n $rootScope.$emit('build-chart-' + $scope.uuid);\n\n // return the promise\n return $scope.buildDashboardDefer.promise;\n }\n\n function processRefreshRequest() {\n\n // handle the profiles\n handleProfileData();\n\n // process all for the selected enrollment\n processChangeEnrollmentRequest();\n }\n\n function processChangeEnrollmentRequest() {\n // switch on the loading mode\n $scope.setLoading(true);\n\n // load the virtual machines\n return handleVirtualMachines().then(function() {\n\n // refresh the VM\n return processChangeVMRequest();\n })\n }\n\n function processChangeVMRequest() {\n\n // switch on the loading mode\n $scope.setLoading(true);\n\n // check if we have an active vm\n if ($scope.currentVirtualMachine) {\n\n return buildDashboard().then(function() {\n\n // switch off the loading mode\n $scope.setLoading(false);\n\n })\n } else {\n\n // switch off the loading mode\n $scope.setLoading(false);\n\n // done\n return $q.when();\n\n }\n }\n\n function resizeChart(newSize) {\n lastSize = newSize;\n if (chartElement) { chartElement.setSize(newSize.w, newSize.h - $scope.selectorHeight - $scope.disclaimerHeight, false); }\n }\n\n $scope.selectEnrollment = function(enrollment) {\n\n // set the current enrollment\n $scope.currentEnrollment = enrollment;\n\n // process the reuqest\n processChangeEnrollmentRequest();\n };\n\n $scope.selectVirtualMachine = function(vm) {\n\n $scope.currentVirtualMachine = vm;\n\n processChangeVMRequest();\n };\n\n $scope.reCalculateReports = function() {\n\n $acCacheIdentifierGenerator.updateDailyCacheLocalInjector('RiAnalysisResultItemClass');\n\n // refresh screen\n $state.go($state.current.name, { initial: null }, {reload: true});\n };\n\n // establish the resize callback\n $scope.onResize(function(newSize) {\n resizeChart(newSize);\n });\n\n // initialize when the host is ready\n $scope.onInitialize(processRefreshRequest);\n\n // rebuild the dashboard during reload\n $scope.onReload(processRefreshRequest);\n\n // register all datasources\n $eaWidgetRiPurchaseImpactDataSources.registerDataSources($scope);\n\n // if we are here everyhting is ready to load data\n $scope.finalizeRegistration();\n\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').service('$eaWidgetRiPurchaseImpactDataSources', function($q, $eaDataSourceManager, $eaDataAggregateOperations) {\n var self = this;\n\n\n self.registerDataSources = function(controllerScope)\n {\n // Register all datasources this widget offers\n // Data source the widget provides\n\n $eaDataSourceManager.registerDataSource(controllerScope.uuid, 'PotentialSavings', null, function () {\n return controllerScope.buildDashboardDefer.promise.then(function () {\n\n // cummolate the annual spendings\n var overAllSpendings = $eaDataAggregateOperations.sum(controllerScope.lastLoadedData.spendings);\n\n // diff from the costs for 1year\n var savaings1Year = overAllSpendings - controllerScope.lastLoadedData.rifees.y1;\n var savaings3Year = (overAllSpendings * 3) - controllerScope.lastLoadedData.rifees.y3;\n\n // build the result\n return $q.when([{ Year1: savaings1Year, Year3: savaings3Year, CurrencySymbol: controllerScope.lastLoadedData.currencysymbol}]);\n });\n });\n\n $eaDataSourceManager.registerDataSource(controllerScope.uuid, 'VMDetails', null, function () {\n return controllerScope.buildDashboardDefer.promise.then(function () {\n\n return $q.when({\n ConsumptionMeter: controllerScope.lastLoadedData.consumptionmeter,\n MachineType: controllerScope.lastLoadedData.machinetype,\n RIFeeY1: controllerScope.lastLoadedData.rifees.y1,\n RIFeeY3: controllerScope.lastLoadedData.rifees.y3,\n CurrencySymbol: controllerScope.lastLoadedData.currencysymbol,\n DailyBurnRate: controllerScope.lastLoadedData.burnrate,\n AvgRuntime: controllerScope.lastLoadedData.avgruntime,\n RIBreakEvenY1: controllerScope.lastLoadedData.breakeveny1,\n RIBreakEvenY3: controllerScope.lastLoadedData.breakeveny3\n });\n });\n });\n };\n\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').directive('eaWidgetIframe', function() {\n return {\n restrict: 'C',\n template: '
' +\n '' +\n '
',\n controller: 'EaWidgetIframeCtrl'\n };\n}).controller('EaWidgetIframeCtrl', function($scope, $q, $eaConfig, $eaDataCoordinator, $sce) {\n\n $scope.enableFrame = false;\n\n function loadIFrame() {\n\n if ($scope.options.src) {\n\n // get the uri\n $scope.targetPage = $scope.options.src;\n $scope.targetPageTrusted = $sce.trustAsResourceUrl($scope.targetPage);\n\n $scope.setLoading(false);\n $scope.enableFrame = true;\n return $q.when();\n } else {\n $scope.setLoading(true);\n return $q.when();\n }\n }\n\n $scope.onResize(function(newSize) {\n return $q.when();\n });\n\n $scope.onInitialize(function() {\n return loadIFrame();\n });\n\n $scope.onReload(function() {\n document.getElementById('iframe-' + $scope.uuid + '-frame').src += '';\n return $q.when();\n });\n\n $scope.finalizeRegistration();\n});\n","'use strict';\n\n/**\n * @ngdoc directive\n * @name azureCostsFeApp.directive:eaNavbar\n * @description\n * # eaNavbar\n */\nangular.module('azureCostsFeApp').directive('eaNavbar', function () {\n return {\n templateUrl: 'views/directive_ea_navbar.html',\n restrict: 'C',\n controller: 'EaNavbarCtrl',\n scope: {\n currentSession: '='\n }\n };\n}).controller('EaNavbarCtrl', function($scope, $q, $eaBackend, $state, $rootScope, $eaBackendDataModeSelector, $eaSession2, $location, $busy, $controller, $modal, $timeout, $toolbar, $eaTeamManagement, $eaBranding, $eaUserProfile, gravatarService, $eaConfig, $stateParams, $eaCspService, $window, $eaNotificationCenter) {\n var self = this;\n\n // inject mixins\n $.extend(self, $controller('SessionHelperCtrlMixin', {$scope: $scope, $eaBackendDataModeSelector: $eaBackendDataModeSelector, $eaSession2: $eaSession2, $state: $state }));\n $.extend(self, $controller('TeamsChooseTeamMixinCtrl', {$scope: $scope, $modal: $modal, $controller: $controller, $q: $q, $eaTeamManagement: $eaTeamManagement}));\n\n // define variables\n $scope.toolbarItems = $toolbar.items;\n $scope.title = $eaBranding.currentCompanyInformation.title;\n $scope.fullWidthHeader = true;\n\n function updateNavBarBasicMenu() {\n\n if ($scope.currentSession) {\n $eaUserProfile.load($scope.currentSession.DataToken).then(function (profile) {\n\n if ($scope.currentSession.isActAsSession()) {\n $toolbar.addItem('leaveActAs', 'Leave Act-As', 'fa-sign-out', null, true, $scope.leaveActAs, null);\n }\n\n // define the username\n var userName;\n if ($scope.currentSession.FirstName) { userName = $scope.currentSession.FirstName + ' '; } else { userName = ''; }\n if ($scope.currentSession.LastName) { userName = userName + $scope.currentSession.LastName; }\n if (!userName) { userName = $scope.currentSession.Contact; }\n\n // add the user item\n $toolbar.addItem('user', userName, 'img:' + gravatarService.url($scope.currentSession.Contact, { size: 20, default: 'mm'}), $scope.currentSession.Contact, true, null, 99);\n\n // figure out activeTeam\n var activeTeam = $stateParams.teamid || $stateParams.resellerId;\n\n // Add the manage team entry for all users who are not part of any team. This means the\n // useres are not manager and can upgrade to a team or to the admins of a team.\n if (!$eaTeamManagement.isPartOfAtLeastOneTime(profile)) {\n $toolbar.addItem('user.manageTeams', 'Manage Team', 'fa-users', null, true, '/teams/migrate', 10, 'user');\n } else if ($eaTeamManagement.isAdminInAtLeastOneTime(profile)) {\n $toolbar.addItem('user.manageTeams', 'Manage Team', 'fa-users', null, true, function() {\n $scope.openTeamChooser(profile, activeTeam, 'admin', $eaSession2.getSession()).then(function(selectedTeamId) {\n $state.go('authorized.teamsManage', {teamid: selectedTeamId});\n });\n }, 10, 'user');\n }\n\n\n if ($eaConfig.features.billing) {\n $toolbar.addItem('user.billing', 'Billing', 'fa-dollar', null, true, '/billing', 20, 'user');\n }\n\n if ($location.path().indexOf('/csp') === 0) {\n $toolbar.addItem('user.csp', 'My Spending Portal', 'fa-bar-chart', null, true, '/signin?csp=false', 25, 'user');\n }\n\n if ($eaTeamManagement.isAdminInAtLeastOneTime(profile)) {\n $toolbar.addItem('user.reportcenter', 'Report Center', 'fa-pie-chart', null, true, function () {\n\n if ($stateParams.teamid) {\n $window.location.href = '/app2/teams/' + $stateParams.teamid + '/apps/reportcenter';\n } else if ($location.path().indexOf('/csp') === 0) {\n $window.location.href = '/app2/teams/' + $stateParams.resellerId + '/apps/reportcenter';\n }\n }, 28, 'user');\n }\n \n if ($eaConfig.features && $eaConfig.features.support) {\n $toolbar.addItem('user.feedback', 'Your Feedback', 'fa-lightbulb-o', null, true, 'https://azurecostmonitor.uservoice.com/', 30, 'user');\n $toolbar.addItem('user.support', 'Contact Support', 'fa-support', null, true, 'https://azurecostmonitor.uservoice.com/', 40, 'user');\n }\n\n $toolbar.addItem('user.divider', 'DIVIDER', null, null, true, null, 50, 'user');\n\n if ($scope.currentSession.hasClaim('ops')) {\n $toolbar.addItem('ops.admin', 'Admin', 'fa-user-secret', null, true, '/admin/users', 70, 'user');\n $toolbar.addItem('ops.divider', 'DIVIDER', null, null, true, null, 80, 'user');\n }\n\n if ($scope.currentSession.IdentityProvider === 'actAs') {\n $toolbar.addItem('user.leaveActAs', 'Leave Act-As', 'fa-sign-out', null, true, $scope.leaveActAs, 90, 'user');\n } else {\n $toolbar.addItem('user.refreshSession', 'Refresh Session', 'fa-refresh', null, true, $scope.refreshSession, 100, 'user');\n $toolbar.addItem('user.profile', 'Profile', 'fa-user', null, true, $scope.visitProfile, 110, 'user');\n $toolbar.addItem('user.signout', 'Sign Out', 'fa-power-off', null, true, $scope.signOut, 120, 'user');\n }\n\n // Notifications Panel operation\n $toolbar.addItem('notificationsPane.General', '', 'fa-bell-o', \"Open the notifications panel\", true, $scope.toggleNotificationsPanel);\n });\n }\n }\n\n function adaptHeaderWidth() {\n if ($location.path() === '/') {\n $scope.fullWidthHeader = false;\n } else {\n $scope.fullWidthHeader = true;\n }\n }\n\n // handle toolbar updates\n $toolbar.onUpdate( function() {\n adaptHeaderWidth();\n $scope.toolbarItems = $toolbar.items;\n });\n\n // handle session updates\n $eaSession2.onUpdate(function() {\n updateNavBarBasicMenu();\n });\n\n $eaSession2.onDestroying(function() {\n updateNavBarBasicMenu();\n });\n\n $rootScope.$on('$stateChangeSuccess', function() {\n updateNavBarBasicMenu();\n });\n\n $eaBranding.onUpdate(function() {\n $scope.title = $eaBranding.currentCompanyInformation.title;\n });\n\n $scope.toggleNotificationsPanel = function () {\n if ($eaNotificationCenter.isOpen()) {\n $eaNotificationCenter.close();\n } else {\n $eaNotificationCenter.show();\n }\n };\n\n // Manages the mobile menu when the browser window is too small\n $scope.toggleMobileNavMenuClasses = '';\n $scope.toggleMobileNavMenu = function() {\n if ($scope.toggleMobileNavMenuClasses === 'open-nav') {\n $scope.toggleMobileNavMenuClasses = '';\n } else {\n $scope.toggleMobileNavMenuClasses = 'open-nav';\n }\n };\n\n // initialize the navbar\n updateNavBarBasicMenu();\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').directive('eaListView', function () {\n return {\n template: '',\n restrict: 'C',\n controller: 'EaListViewCtrl',\n scope: true,\n transclude: true\n };\n}).controller('EaListViewCtrl', function() {\n\n\n});\n\nangular.module('azureCostsFeApp').directive('eaListViewItem', function () {\n return {\n template: '',\n restrict: 'C',\n controller: 'EaListViewItemCtrl',\n scope: {\n item: '=',\n onCollapse: '&'\n },\n transclude: true,\n link: function(scope, element) {\n scope.initializeWithElement(element);\n }\n };\n}).controller('EaListViewItemCtrl', ['$scope', function($scope) {\n var htmlElement;\n\n // define the state\n $scope.subItemsCollapsed = true;\n\n // Initializes the controller and will be called from the link function\n $scope.initializeWithElement = function(element) {\n htmlElement = element;\n\n // collapse the element\n htmlElement.find('.ea-list-view-subitems').addClass('collapse');\n\n // check what we have open or not\n if (htmlElement.find('.ea-list-view-subitems').hasClass('open')) {\n $scope.subItemsCollapsed = false;\n }\n\n // inject the click binding for toggling state\n htmlElement.find('.ea-list-view-item-content').bind('click', function(e) {\n if (angular.element(e.target).hasClass('ea-list-view-item-content') || angular.element(e.target).parent('a').length === 0) {\n $scope.subItemsCollapsed = !$scope.subItemsCollapsed;\n $scope.$apply();\n e.preventDefault();\n }\n });\n };\n\n // change the classes in html element when the collapsed property is changed\n $scope.$watch('subItemsCollapsed', function() {\n\n if ($scope.subItemsCollapsed) {\n htmlElement.find('.ea-list-view-subitems.collapse').removeClass('in');\n } else {\n htmlElement.find('.ea-list-view-subitems.collapse').addClass('in');\n }\n\n $scope.onCollapse({ item: $scope.item, open: !$scope.subItemsCollapsed});\n });\n}]);\n","'use strict';\n\n/**\n * @ngdoc directive\n * @name azureCostsFeApp.directive:eaNavbar\n * @description\n * # eaNavbar\n */\nangular.module('azureCostsFeApp').directive('eaFileDropZone', function () {\n return {\n templateUrl: 'views/directive_ea_file_drop_zone.html',\n restrict: 'C',\n controller: 'EaFileDropZoneCtrl',\n scope: {\n image: '=',\n upload: '&'\n },\n link: function(scope, element, attrs, controller) {\n controller.init(element);\n }\n };\n}).controller('EaFileDropZoneCtrl', ['$scope', function($scope) {\n var self = this;\n\n var htmlElement = null;\n\n $scope.handleDrop = function(e) {\n\n // prevent standard behaviour\n e.stopPropagation();\n e.preventDefault();\n\n // check if we have no file\n if (event.dataTransfer.files.length === 0) {\n return;\n }\n\n // collect file to transfer\n var fileToUpload = event.dataTransfer.files[0];\n\n // set the image in the tag\n var reader = new FileReader();\n reader.onload = function (e) {\n $scope.image = e.target.result;\n $scope.$apply();\n };\n reader.readAsDataURL(fileToUpload);\n\n // upload the file in his original location\n $scope.upload({ image: fileToUpload}).catch(function() {\n // handle error\n $scope.image = undefined;\n $scope.$apply();\n });\n };\n\n self.init = function(element) {\n htmlElement = element;\n\n // establish the listener\n var dropBox = angular.element(htmlElement).find('.drop-box');\n\n // enabled drag and drop operations\n dropBox.bind('dragover', function (e) {\n e.stopPropagation();\n e.preventDefault();\n });\n\n // handles the drop\n dropBox.bind('drop', $scope.handleDrop);\n };\n\n}]);\n","'use strict';\n\nangular.module('azureCostsFeApp').directive('eaTagList', function () {\n return {\n templateUrl: 'views/directive_ea_tag_list.html',\n restrict: 'C',\n controller: 'EaTagListCtrl',\n scope: {\n service: '=',\n tagProperty: '=',\n tagAdded: '&',\n tagRemoved: '&',\n tagAutoComplete: '&'\n }\n };\n}).controller('EaTagListCtrl', ['$scope', function($scope) {\n\n // defines a couple standard keys\n var KEYS = {\n backspace: 8,\n tab: 9,\n enter: 13,\n escape: 27,\n space: 32,\n up: 38,\n down: 40,\n comma: 188\n };\n\n $scope.currentTagValue = undefined;\n $scope.currentTagProposal = [];\n\n $scope.reset = function() {\n $scope.currentTagValue = undefined;\n $scope.currentTagProposal = [];\n };\n\n $scope.onSubmit = function() {\n // add the tag\n $scope.tagAdded({service: $scope.service, tag: $scope.currentTagValue});\n\n // reset the form\n $scope.reset();\n };\n\n $scope.onRemove = function(tag) {\n $scope.tagRemoved({service: $scope.service, tag: tag});\n };\n\n $scope.onKey = function(event) {\n\n if (event) {\n\n // check if we have hotkeys\n if (event.keyCode === KEYS.escape) {\n\n // reset\n $scope.reset();\n\n // prevent default behaviour\n event.preventDefault();\n\n // done\n return;\n }\n }\n\n // check if we have an empty query\n if ($scope.currentTagValue === '') {\n\n // reset\n $scope.reset();\n }\n\n // query for tag proposals\n $scope.currentTagProposal = $scope.tagAutoComplete({service: $scope.service, query: $scope.currentTagValue});\n };\n\n $scope.onTagSelected = function(tagValue) {\n $scope.currentTagValue = tagValue;\n $scope.onSubmit();\n };\n}]);\n","'use strict';\n\nangular.module('azureCostsFeApp').directive('eaBrandingTheme', function() {\n return {\n restrict: 'C',\n templateUrl: 'views/directive_ea_branding_theme.html',\n controller: 'EaBrandingCtrl',\n scope: true\n };\n}).controller('EaBrandingCtrl', ['$scope', '$eaBranding', function($scope, $eaBranding) {\n\n // set the default values\n $scope.colors = $eaBranding.currentColors;\n $scope.customCss = $eaBranding.currentCustomCss;\n\n // establish an update handler\n $eaBranding.onUpdate(function() {\n\n // set the updatd values\n $scope.colors = $eaBranding.currentColors;\n $scope.customCss = $eaBranding.currentCustomCss;\n });\n}]);\n","'use strict';\n\nangular.module('azureCostsFeApp').directive('eaTrial', function () {\n return {\n templateUrl: 'views/directive_ea_trial.html',\n restrict: 'C',\n controller: 'EaTrialCtrl',\n scope: {\n team: '=',\n profile: '='\n }\n };\n}).controller('EaTrialCtrl', function($scope, $eaBilling, $eaUserProfile, $eaConfig) {\n\n $scope.open = false;\n $scope.showTrial = $eaConfig.features.billing;\n\n $scope.toggleState = function() {\n $scope.open = !$scope.open;\n };\n\n function setTrialSettings() {\n if ($scope.team && $scope.profile && $eaBilling.isInTrial($scope.team)) {\n $scope.trialEnds = $scope.team.TrialEnds;\n\n var teamFromProfile = $eaUserProfile.getTeam($scope.profile, $scope.team.Id);\n $scope.isAccountOwner = $eaBilling.isAccountOwner($scope.profile.UserId, teamFromProfile);\n }\n }\n\n $scope.$watch('team', function () {\n setTrialSettings();\n });\n\n $scope.$watch('profile', function () {\n setTrialSettings();\n });\n\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').directive('eaUpgradePlan', function () {\n return {\n templateUrl: 'views/directive_ea_upgrade_plan.html',\n restrict: 'C',\n transclude: true,\n controller: 'EaUpgradePlanCtrl',\n scope: {\n team: '=',\n requiredPlan: '=',\n realElement: '=',\n onAction: '&'\n }\n };\n}).controller('EaUpgradePlanCtrl', function($q, $element, $scope, $eaSession2, $eaBilling, $eaUserProfile, $state, $eaConfig) {\n\n $scope.showTrial = $eaConfig.features.billing;\n\n var loadTeamPromise = null;\n\n if (typeof $scope.team === 'string') {\n loadTeamPromise = $eaUserProfile.load($eaSession2.getSession().DataToken).then(function(userProfile) {\n // get the team profile\n $scope.team = $eaUserProfile.getTeam(userProfile, $scope.team);\n });\n } else {\n loadTeamPromise = $q.when();\n }\n\n loadTeamPromise.then(function() {\n $scope.trialPossible = false;\n\n // check if we have the required plan\n if ($eaBilling.hasRequiredPlan($scope.team.AccountPlan, $scope.requiredPlan)) {\n\n // if so hide the element\n angular.element($element).addClass('hidden');\n\n // show the real element\n if ($scope.realElement) { angular.element('#' + $scope.realElement).removeClass('hidden'); }\n\n } else {\n\n // if not show the element\n angular.element($element).removeClass('hidden');\n\n // hide the real element\n if ($scope.realElement) { angular.element('#' + $scope.realElement).addClass('hidden'); }\n\n }\n\n // just define if it's possible to start a trial\n $scope.trialPossible = !$eaBilling.hasEverStartedTrial($scope.team);\n\n // check if caller is account owner\n $scope.isAccountOwner = $eaBilling.isAccountOwner($eaSession2.getSession().UserId, $scope.team);\n\n });\n\n $scope.startTrial = function() {\n // notify the coller\n if ($scope.onAction) { $scope.onAction(); }\n\n // start the trial\n $state.go('authorized.profileBillingStartTrial');\n };\n\n $scope.upgradePlan = function() {\n\n // notify the caller\n if ($scope.onAction) { $scope.onAction(); }\n\n // navigate to the scope\n $state.go('authorized.profileBillingUpgradeEdition');\n };\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').directive('eaFilterPanel', function () {\n return {\n templateUrl: 'views/directive_ea_filter_panel.html',\n restrict: 'C',\n controller: 'EaFilterPanelCtrl',\n scope: {\n filter: '=',\n userId: '=',\n teamId: '=',\n teamRole: '=',\n fields: '=',\n save: '&',\n share: '&',\n unshare: '&'\n }\n };\n}).controller('EaFilterPanelCtrl', function($scope, $eaFilterPanel) {\n\n // This section implements the filter state in the user interface. When the filter is not collapsed\n // the user can see the filter editor\n $scope.collapsed = true;\n\n $scope.toggleEditor = function() {\n $scope.collapsed = !$scope.collapsed;\n };\n\n // observes the filter element to make a couple UI decissions\n $scope.$watch('filter', function () {\n\n // create a duplicate of the filter\n $scope.filterWorkingCopy = $eaFilterPanel.buildFilter($scope.userId);\n $eaFilterPanel.updateFilterWithFilter($scope.filter, $scope.filterWorkingCopy);\n\n // collapse or ellapse the panel\n if ($scope.collapsed && $scope.filterWorkingCopy) {\n $scope.collapsed = ($scope.filterWorkingCopy.Id !== null);\n }\n }, true);\n\n // Defines available information for the UI\n $scope.operators = $eaFilterPanel.availableOperations;\n $scope.fieldModels = $eaFilterPanel.buildFieldModelsFromArray($scope.fields);\n\n $scope.conditions = $eaFilterPanel.availableConditions;\n\n // Allows to add an condition\n $scope.addCondition = function () {\n $scope.filterWorkingCopy.Rules.push($eaFilterPanel.buildRule('AND'));\n };\n\n // Removes a rule\n $scope.removeCondition = function (index) {\n $scope.filterWorkingCopy.Rules.splice(index, 1);\n };\n\n // Delegates the save operation to parent\n $scope.saveFilter = function() {\n // replicate the filter\n $eaFilterPanel.updateFilterWithFilter($scope.filterWorkingCopy, $scope.filter);\n\n // save it via parent\n $scope.save({teamFilter: $scope.filterWorkingCopy.TeamId === 'personal' ? false : true});\n };\n\n $scope.shareFilter = function() {\n // replicate the filter\n $eaFilterPanel.updateFilterWithFilter($scope.filterWorkingCopy, $scope.filter);\n\n // save it via parent\n $scope.share();\n };\n\n $scope.unShareFilter = function() {\n // replicate the filter\n $eaFilterPanel.updateFilterWithFilter($scope.filterWorkingCopy, $scope.filter);\n\n // save it via parent\n $scope.unshare();\n };\n\n}).service('$eaFilterPanel', function(){\n var self = this;\n\n self.buildFilter = function(owner) {\n return {\n Id: null,\n Name: 'New Filter',\n TeamId: 'personal',\n Owner: owner,\n Rules: [\n {\n Operator: 'WHERE',\n Field: null,\n Condition: null,\n Value: null,\n Compare: 'CaseSensitive'\n }\n ]\n };\n };\n\n self.buildRule = function(operator) {\n return {\n Operator: operator,\n Field: null,\n Condition: null,\n Value: null,\n Compare: 'CaseSensitive'\n };\n };\n\n self.updateFilterWithFilter = function(srcFilter, targetFilter) {\n targetFilter.Id = srcFilter.Id;\n targetFilter.Name = srcFilter.Name;\n targetFilter.Owner = srcFilter.Owner;\n targetFilter.TeamId = srcFilter.TeamId;\n\n // remove the rules\n targetFilter.Rules = [];\n\n // copy the rules\n srcFilter.Rules.forEach(function(rule) {\n var ruleCopy = self.buildRule(rule.Operator);\n ruleCopy.Field = rule.Field;\n ruleCopy.Condition = rule.Condition;\n ruleCopy.Value = rule.Value;\n ruleCopy.Compare = rule.Compare;\n targetFilter.Rules.push(ruleCopy);\n });\n };\n\n self.buildFieldModelsFromArray = function(fields) {\n return fields.map(function(f) {\n return { name: f };\n });\n };\n\n self.availableOperations = [\n { name: 'AND' },\n { name: 'OR' }\n ];\n\n self.availableConditions = [\n { name: '=' },\n { name: '<>' },\n { name: '<' },\n { name: '<=' },\n { name: '>' },\n { name: '>=' },\n { name: 'contains' },\n { name: 'notContains' },\n { name: 'startsWith' },\n { name: 'notStartsWith' },\n { name: 'hasValue' }\n ];\n\n});\n","'use strict';\n\n/**\n * @ngdoc service\n * @name azureCostsFeApp.eaBackend\n * @description\n * # eaBackend\n * Service in the azureCostsFeApp.\n */\nangular.module('azureCostsFeApp').service('$eaBackendDataModeSelector', function eaBackend() {\n var self = this;\n\n self.BillingCycleActive = false;\n self.BillingCycleDay = 1;\n self.NoMargin = false;\n\n self.enableBillingCycle = function(enable, day) {\n self.BillingCycleActive = enable;\n self.BillingCycleDay = day ? day : 1;\n };\n\n self.isBillingCycleEnabled = function() {\n return self.BillingCycleActive;\n };\n\n self.getBillingCycleDay = function() {\n return self.BillingCycleDay;\n };\n\n self.enableNoMargin = function(enable) {\n self.NoMargin = enable;\n };\n\n self.isNoMarginEnabled = function() {\n return self.NoMargin;\n }\n\n}).service('$eaBackend', function eaBackend($eaBackendAzure, $eaBackendAzureV2, $eaBackendDataModeSelector, $q) {\n var self = this;\n\n self.stsUpdateToken = function(options, dataToken) {\n return $eaBackendAzure.stsUpdateToken(options, dataToken);\n };\n\n self.dataPostProfileTouch = function(dataToken) {\n return $eaBackendAzure.dataPostProfileTouch(dataToken);\n };\n\n self.dataGetProfile = function(dataToken) {\n return $eaBackendAzure.dataGetProfile(dataToken);\n };\n\n self.dataUpdateProfile = function(profileProperties, dataToken) {\n return $eaBackendAzure.dataUpdateProfile(profileProperties, dataToken);\n };\n\n self.dataGetContracts = function(teamId, dataToken) {\n return $eaBackendAzure.dataGetContracts(teamId, dataToken);\n };\n\n self.dataGetContract = function(teamId, contract, dataToken) {\n return $eaBackendAzure.dataGetContract(teamId, contract, dataToken);\n };\n\n self.dataGetContractInfo = function(teamId, contract, dataToken) {\n return $eaBackendAzureV2.dataGetContractInfo(teamId, contract, dataToken);\n };\n\n self.dataPostPurgeContractReports = function(teamId, contract, dataToken) {\n return $eaBackendAzureV2.dataPostPurgeContractReports(teamId, contract, dataToken);\n };\n\n self.dataGetContractSubscriptions = function(teamId, contract, dataToken, options) {\n return $eaBackendAzure.dataGetContractSubscriptions(teamId, contract, dataToken, options);\n };\n\n self.dataGetContractSubscriptionsVerifyConnection = function(teamId, contract, subscriptionId, offerid, country, currency, dataToken) {\n return $eaBackendAzure.dataGetContractSubscriptionsVerifyConnection(teamId, contract, subscriptionId, offerid, country, currency, dataToken);\n };\n\n self.dataPutContractSubscription = function(teamId, contract, subscriptionId, updatedFields, dataToken) {\n return $eaBackendAzure.dataPutContractSubscription(teamId, contract, subscriptionId, updatedFields, dataToken);\n };\n\n self.dataGetContractReports = function(teamId, contract, dataToken) {\n return $eaBackendAzureV2.dataGetContractReportsV2(teamId, contract, dataToken);\n };\n\n self.dataGetContractReportData = function(teamId, contract, report, cacheIdentifier, dataToken, retry) {\n return $eaBackendAzure.dataGetContractReportData(teamId, contract, report, cacheIdentifier, dataToken, retry);\n };\n\n self.dataGetContractReportDataV3 = function(teamId, contract, report, cacheIdentifier, dataToken, retry) {\n return $eaBackendAzureV2.dataGetContractReportDataV3(teamId, contract, report, cacheIdentifier, dataToken, retry);\n };\n\n self.dataRegisterContract = function(teamid, contract, token, dataToken) {\n return $eaBackendAzure.dataRegisterContract(teamid, contract, token, dataToken);\n };\n\n self.dataPostRatePlanRegistrationId = function(teamid, callbackUri, directoryDomain, defaultCurrency, dataToken) {\n return $eaBackendAzure.dataPostRatePlanRegistrationId(teamid, callbackUri, directoryDomain, defaultCurrency, dataToken);\n };\n\n self.dataAllSyncReports = function(team, contract, dataToken) {\n return $eaBackendAzure.dataAllSyncReports(team, contract, dataToken);\n };\n\n self.dataMonthSyncReports = function(team, contract, month, dataToken) {\n return $eaBackendAzure.dataMonthSyncReports(team, contract, month, dataToken);\n };\n\n self.dataMonthSyncReportsV2 = function(teamid, contract, months, dataToken)\n {\n return $eaBackendAzureV2.dataMonthSyncReportsV2(teamid, contract, months, dataToken);\n };\n\n self.dataUpdateContract = function(teamid, contract, contractInformation, dataToken) {\n return $eaBackendAzure.dataUpdateContract(teamid, contract, contractInformation, dataToken);\n };\n\n self.dataDeleteContract = function(teamid, contract, dataToken) {\n return $eaBackendAzureV2.dataDeleteContract(teamid, contract, dataToken);\n };\n\n self.dataSetServiceTagsV1 = function(teamid, contract, serviceName, serviceTags, dataToken) {\n return $eaBackendAzure.dataSetServiceTagsV1(teamid, contract, serviceName, serviceTags, dataToken);\n };\n\n self.dataSetServiceTagsV2 = function(teamid, contract, serviceName, serviceType, serviceTags, dataToken) {\n return $eaBackendAzure.dataSetServiceTagsV2(teamid, contract, serviceName, serviceType, serviceTags, dataToken);\n };\n\n self.dataSetServiceTagsV3 = function(teamid, contract, serviceName, serviceType, serviceSubscriptionId, serviceTags, dataToken) {\n return $eaBackendAzure.dataSetServiceTagsV3(teamid, contract, serviceName, serviceType, serviceSubscriptionId, serviceTags, dataToken);\n };\n\n self.dataSetServiceTagsV4 = function(teamid, contract, serviceId, serviceTags, dataToken) {\n return $eaBackendAzureV2.dataSetServiceTagsV4(teamid, contract, serviceId, serviceTags, dataToken);\n };\n\n /*\n * History API\n */\n self.dataGetContractReportHistory = function(teamid, contract, dataToken) {\n return $eaBackendAzure.dataGetContractReportHistory(teamid, contract, dataToken);\n };\n\n self.dataGetContractReportHistoryV3 = function(teamid, contract, cacheIdentifier, dataToken, retry) {\n return $eaBackendAzureV2.dataGetContractReportHistoryV3(teamid, contract, cacheIdentifier, dataToken, retry);\n };\n\n /*\n * MetaData API\n */\n self.dataGetMetadata = function(collection, dataToken) {\n return $eaBackendAzure.dataGetMetadata(collection, dataToken);\n };\n\n /*\n * Team API\n */\n self.dataMigrateToTeamAccount = function(teamName, dataToken) {\n return $eaBackendAzure.dataMigrateToTeamAccount(teamName, dataToken);\n };\n\n self.dataGetTeamProfile = function(teamid, members, dataToken) {\n return $eaBackendAzure.dataGetTeamProfile(teamid, members, dataToken);\n };\n\n self.dataInviteUserToTeam = function(teamid, contact, role, subscriptions, callback, dataToken) {\n return $eaBackendAzure.dataInviteUserToTeam(teamid, contact, role, subscriptions, callback, dataToken);\n };\n\n self.dataInviteUserToTeamV2 = function(teamid, contact, role, fullAccess, callback, dataToken) {\n return $eaBackendAzureV2.dataInviteUserToTeamV2(teamid, contact, role, fullAccess, callback, dataToken);\n };\n\n self.dataReInviteUserToTeam = function(teamid, invitationid, callback, dataToken) {\n return $eaBackendAzure.dataReInviteUserToTeam(teamid, invitationid, callback, dataToken);\n };\n\n self.dataRemoveUserFromTeam = function(teamid, userid, dataToken) {\n return $eaBackendAzure.dataRemoveUserFromTeam(teamid, userid, dataToken);\n };\n\n self.dataUpdateTeamProfile = function(teamid, profile, dataToken) {\n return $eaBackendAzure.dataUpdateTeamProfile(teamid, profile, dataToken);\n };\n\n self.dataUpdateTeamImage = function(teamid, teamImageFile, dataToken) {\n return $eaBackendAzure.dataUpdateTeamImage(teamid, teamImageFile, dataToken);\n };\n\n self.dataUpdateTeamMembership = function(teamid, userid, role, subscriptions, contact, dataToken) {\n return $eaBackendAzure.dataUpdateTeamMembership(teamid, userid, role, subscriptions, contact, dataToken);\n };\n\n self.dataRegisterAppToTeam = function(teamid, name, clientId, clientSecret, role, subscriptions, dataToken) {\n return $eaBackendAzure.dataRegisterAppToTeam(teamid, name, clientId, clientSecret, role, subscriptions, dataToken);\n };\n\n self.dataRegisterUserToTeam = function(teamid, contact, role, subscriptions, dataToken) {\n return $eaBackendAzure.dataRegisterUserToTeam(teamid, contact, role, subscriptions, dataToken);\n };\n\n self.dataGetTeamImageLocation = function(teamid, dataToken) {\n return $eaBackendAzure.dataGetTeamImageLocation(teamid, dataToken);\n };\n\n self.helperGetAvailableSubscriptions = function(teamid, dataToken) {\n var defer = $q.defer();\n\n // query the contracts\n self.dataGetContracts(teamid, dataToken).then(function(contracts) {\n\n var subscritpionsForContractPromisses = [];\n var contractsCollection = [];\n contracts.forEach(function(contract) {\n contractsCollection.push(contract);\n subscritpionsForContractPromisses.push(self.dataGetContractSubscriptions(teamid, contract.Enrollment, dataToken));\n });\n\n return $q.all(subscritpionsForContractPromisses).then(function(results) {\n\n var resultModel = [];\n results.forEach(function(result, idx) {\n resultModel.push({ Contract: contractsCollection[idx], Subscriptions: result});\n });\n\n defer.resolve(resultModel);\n });\n }).catch(function(error) {\n defer.reject(error);\n });\n\n return defer.promise;\n };\n\n /*\n * Notification Settings API\n */\n self.dataGetContractNotifcationSettings = function(teamid, contract, dataToken) {\n return $eaBackendAzure.dataGetContractNotifcationSettings(teamid, contract, dataToken);\n };\n\n self.dataGetContractNotifcationSettingsForUser = function(teamid, contract, targetUserId, dataToken) {\n return $eaBackendAzure.dataGetContractNotifcationSettingsForUser(teamid, contract, targetUserId, dataToken);\n };\n\n self.updateGetContractNotifcationSettings = function(teamid, contract, notificationSettings, dataToken, options) {\n return $eaBackendAzure.updateGetContractNotifcationSettings(teamid, contract, notificationSettings, dataToken, options);\n };\n\n self.updateGetContractNotifcationSettingsForUser = function(teamid, contract, targetUserId, notificationSettings, dataToken, options) {\n return $eaBackendAzure.updateGetContractNotifcationSettingsForUser(teamid, contract, targetUserId, notificationSettings, dataToken, options);\n };\n\n self.triggerContractNotificationForUser = function(teamId, userId, contractId, dataToken) {\n return $eaBackendAzureV2.triggerContractNotificationForUser(teamId, userId, contractId, dataToken);\n };\n\n /*\n * Branding API\n */\n self.dataUpdateBranding = function(teamid, brandingSettings, dataToken) {\n return $eaBackendAzure.dataUpdateBranding(teamid, brandingSettings, dataToken);\n };\n\n self.dataGetBranding = function(teamid) {\n return $eaBackendAzure.dataGetBranding(teamid);\n };\n\n self.dataGetBucket = function(bucketname) {\n return $eaBackendAzure.dataGetBucket(bucketname);\n };\n\n self.dataGetTeamBuckets = function(teamid, dataToken) {\n return $eaBackendAzure.dataGetTeamBuckets(teamid, dataToken);\n };\n\n self.dataCreateTeamBucket = function(teamid, bucketName, dataToken) {\n return $eaBackendAzure.dataCreateTeamBucket(teamid, bucketName, dataToken);\n };\n\n self.dataDeleteTeamBucket = function(teamid, bucketName, dataToken) {\n return $eaBackendAzure.dataDeleteTeamBucket(teamid, bucketName, dataToken);\n };\n\n /*\n * Azure AAD API (Data Token required)\n */\n self.dataGetAADConnections = function(teamid, dataToken) {\n return $eaBackendAzure.dataGetAADConnections(teamid, dataToken);\n };\n\n self.dataRegisterAADConnection = function(teamid, connectionData, dataToken) {\n return $eaBackendAzure.dataRegisterAADConnection(teamid, connectionData, dataToken);\n };\n\n self.dataDeleteAADConnection = function(teamid, aadId, dataToken) {\n return $eaBackendAzure.dataDeleteAADConnection(teamid, aadId, dataToken);\n };\n\n self.dataGetAuthInformation = function(teamid) {\n return $eaBackendAzure.dataGetAuthInformation(teamid);\n };\n\n self.dataGetAADConnectionGroups = function(teamid, tenantId, dataToken) {\n return $eaBackendAzure.dataGetAADConnectionGroups(teamid, tenantId, dataToken);\n };\n\n /*\n * Billing API\n */\n self.dataStartTrial = function(plan, dataToken) {\n return $eaBackendAzure.dataStartTrial(plan, dataToken);\n };\n\n self.dataPurchase = function(plan, dataToken) {\n return $eaBackendAzure.dataPurchase(plan, dataToken);\n };\n\n\n self.dataUpdateBillingInformation = function(billingAddress, dataToken) {\n return $eaBackendAzure.dataUpdateBillingInformation(billingAddress, dataToken);\n };\n\n self.dataGetBillingInformation = function(dataToken) {\n return $eaBackendAzure.dataGetBillingInformation(dataToken);\n };\n\n /*\n * Data Filter API\n */\n self.dataCreateDataFilter = function(teamid, resourceCollection, filter, dataToken) {\n return $eaBackendAzure.dataCreateDataFilter(teamid, resourceCollection, filter, dataToken);\n };\n\n self.dataGetDataFilters = function(teamid, resourceCollection, dataToken) {\n return $eaBackendAzure.dataGetDataFilters(teamid, resourceCollection, dataToken);\n };\n\n self.dataUpdateDataFilter = function(teamid, resourceCollection, filter, dataToken) {\n return $eaBackendAzure.dataUpdateDataFilter(teamid, resourceCollection, filter, dataToken);\n };\n\n self.dataRemoveDataFilter = function(teamid, resourceCollection, filterid, dataToken) {\n return $eaBackendAzure.dataRemoveDataFilter(teamid, resourceCollection, filterid, dataToken);\n };\n\n /*\n * CSP\n */\n self.dataCspEnroll = function(teamName, dataToken) {\n return $eaBackendAzure.dataCspEnroll(teamName, dataToken);\n };\n\n self.dataCspGetAccounts = function(teamId, dataToken) {\n return $eaBackendAzure.dataCspGetAccounts(teamId, dataToken);\n };\n\n self.dataCspGetAccount = function(teamId, accountId, dataToken) {\n return $eaBackendAzureV2.dataCspGetAccount(teamId, accountId, dataToken).then(function(account) {\n return {\n AccountId: accountId,\n TeamId: teamId,\n Name: account.name,\n ClientId: account.clientId,\n ClientSecret: account.clientSecret,\n Domain: account.domain,\n Currency:account.currency,\n Country:account.country,\n BillingDay:account.billingDay,\n TierLevel:account.tierLevel,\n SyncCustomers:account.syncCustomers,\n AutoActivateCustomers:account.autoActivateCustomers,\n DefaultResellerManagement:account.defaultResellerManagement,\n ExchangeRate:account.exchangeRate,\n TokenExpires:account.tokenExpires\n };\n });\n };\n\n self.dataCspRegisterAccount = function(teamId, name, clientId, clientSecret, domain, billingDay, syncCustomers, autoActivateCustomers, dataToken) {\n return $eaBackendAzureV2.dataCspRegisterAccountT1V2(teamId, name, clientId, clientSecret, domain, billingDay, syncCustomers, autoActivateCustomers, dataToken);\n };\n\n self.dataCspRegisterAccountT2 = function(teamId, name, currency, country, billingDay, dataToken) {\n return $eaBackendAzure.dataCspRegisterAccountT2(teamId, name, currency, country, billingDay, dataToken);\n };\n\n self.dataCspRegisterAccountEA = function(teamId, name, currency, token, cmapping, dataToken) {\n return $eaBackendAzureV2.dataCspRegisterAccountEAV2(teamId, name, currency, token, cmapping, dataToken);\n };\n\n self.dataCspRegisterAccountV1 = function(teamId, name, currency, dataToken) {\n return $eaBackendAzureV2.dataCspRegisterAccountV1(teamId, name, currency, dataToken);\n };\n\n self.dataCspRegisterAccountDemo = function(teamId, name, contractType, currency, cmapping, dataToken) {\n return $eaBackendAzureV2.dataCspRegisterAccountDemo(teamId, name, contractType, currency, cmapping, dataToken);\n };\n\n self.dataCspUpdateAccountAWSV2 = function(teamId, accountId, name, currency, exchangeRate, defaultResellerManagement, dataToken) {\n return $eaBackendAzureV2.dataCspUpdateAccountAWSV2(teamId, accountId, name, currency, exchangeRate, defaultResellerManagement, dataToken);\n };\n\n self.dataCspUpdateAccount = function(teamId, accountId, name, clientId, clientSecret, domain, billingDay, dataToken) {\n return $eaBackendAzure.dataCspUpdateAccount(teamId, accountId, name, clientId, clientSecret, domain, billingDay, dataToken);\n };\n\n self.dataCspDeleteAccount = function(teamId, accountId, dataToken) {\n return $eaBackendAzure.dataCspDeleteAccount(teamId, accountId, dataToken);\n };\n\n self.dataCspSyncAccount = function(teamId, accountId, dataToken) {\n return $eaBackendAzureV2.dataCspSyncAccount(teamId, accountId, dataToken);\n };\n\n self.dataCspUpdateVirtualMetersForCustomerInAccount = function(teamId, accountId, customerId, month, dataToken) {\n return $eaBackendAzureV2.dataCspUpdateVirtualMetersForCustomerInAccount(teamId, accountId, customerId, month, dataToken);\n };\n\n self.dataCspRegisterCustomer = function(teamId, accountId, tenantIdOrDomain, dataToken) {\n return $eaBackendAzureV2.dataCspRegisterCustomer(teamId, accountId, tenantIdOrDomain, dataToken);\n };\n\n self.dataCspRegisterCostMgntCustomer = function(teamId, accountId, customerName, hasConsumption, dataToken) {\n return $eaBackendAzureV2.dataCspRegisterCostMgntCustomer(teamId, accountId, customerName, hasConsumption, dataToken);\n };\n\n self.dataCspGetCustomersInAccount = function(teamId, accountId, dataToken) {\n return $eaBackendAzureV2.dataCspGetCustomersInAccount(teamId, accountId, dataToken);\n };\n\n self.dataCspGetCustomersSpendingsInAccountV2 = function(viewId, teamId, accountId, month, dataToken, cacheIdentifierMap, retry) {\n return $eaBackendAzureV2.dataCspGetCustomersSpendingsInAccountV2(viewId, teamId, accountId, month, dataToken, cacheIdentifierMap, retry);\n };\n\n self.dataCspActiveCustomersInAccount = function(teamId, accountId, customerId, dataToken) {\n return $eaBackendAzureV2.dataCspActiveCustomersInAccount(teamId, accountId, customerId, dataToken);\n };\n\n self.dataCspDeActiveCustomersInAccount = function(teamId, accountId, customerId, dataToken) {\n return $eaBackendAzureV2.dataCspDeActiveCustomersInAccount(teamId, accountId, customerId, dataToken);\n };\n\n self.dataCspGetGsiSettings = function(teamId, dataToken) {\n return $eaBackendAzureV2.dataCspGetGsiSettings(teamId, dataToken);\n };\n\n self.dataCspSetGsiSettings = function(teamId, gsiCurrency, dataToken) {\n return $eaBackendAzureV2.dataCspSetGsiSettings(teamId, gsiCurrency, dataToken);\n };\n\n self.dataCspGetCustomersSpendingsInAccount = function(teamId, accountId, month, dataToken) {\n return $eaBackendAzure.dataCspGetCustomersSpendingsInAccount(teamId, accountId, month, dataToken);\n };\n\n self.dataCspSyncCustomerInAccount = function(teamId, accountId, customerId, optionalMonth, dataToken) {\n return $eaBackendAzureV2.dataCspSyncCustomerInAccount(teamId, accountId, customerId, optionalMonth, dataToken);\n };\n\n self.dataCspGetResellerMarginForCustomer = function(teamId, accountId, customerId, dataToken) {\n return $eaBackendAzureV2.dataCspGetResellerMarginForCustomer(teamId, accountId, customerId, dataToken);\n };\n\n self.dataCspSetResellerMarginForCustomer = function(teamId, accountId, customerId, margins, dataToken) {\n return $eaBackendAzureV2.dataCspSetResellerMarginForCustomer(teamId, accountId, customerId, margins, dataToken);\n };\n\n self.dataCspGetResellerFilterForCustomer = function(teamId, accountId, customerId, dataToken) {\n return $eaBackendAzureV2.dataCspGetResellerFilterForCustomer(teamId, accountId, customerId, dataToken);\n };\n\n self.dataCspSetResellerFilterForCustomer = function(teamId, accountId, customerId, filter, dataToken) {\n return $eaBackendAzureV2.dataCspSetResellerFilterForCustomer(teamId, accountId, customerId, filter, dataToken);\n };\n\n self.dataCspUpgradeResellerVersionForCustomer = function(teamId, accountId, customerId, dataToken) {\n return $eaBackendAzureV2.dataCspUpgradeResellerVersionForCustomer(teamId, accountId, customerId, dataToken);\n };\n\n self.dataCspGetResellerFeaturesForCustomer = function(teamId, accountId, customerId, dataToken) {\n return $eaBackendAzureV2.dataCspGetResellerFeaturesForCustomer(teamId, accountId, customerId, dataToken);\n };\n\n self.dataCspSetResellerFeaturesForCustomer = function(teamId, accountId, customerId, features, dataToken) {\n return $eaBackendAzureV2.dataCspSetResellerFeaturesForCustomer(teamId, accountId, customerId, features, dataToken);\n };\n\n self.dataCspGetUpliftCategories = function(teamId, dataToken) {\n return $eaBackendAzureV2.dataCspGetUpliftCategories(teamId, dataToken);\n };\n /*\n * AWS API\n */\n self.dataAwsVerifyConnection = function(teamId, roleArn, externalId, bucket, dataToken) {\n return $eaBackendAzureV2.dataAwsVerifyConnection(teamId, roleArn, externalId, bucket, dataToken);\n };\n\n self.dataAwsRegisterContract = function(teamId, roleArn, externalId, bucket, prefix, reportname, dataToken)\n {\n return $eaBackendAzureV2.dataAwsRegisterContract(teamId, roleArn, externalId, bucket, prefix, reportname, dataToken);\n };\n\n /*\n * GCP API\n */\n self.dataGcpVerifyConnection = function(teamId, accountKey, dataSetName, dataToken) {\n return $eaBackendAzureV2.dataGcpVerifyConnection(teamId, accountKey, dataSetName, dataToken);\n };\n\n self.dataGcpRegisterContract = function(teamId, accountKey, dataSetName, dataToken)\n {\n return $eaBackendAzureV2.dataGcpRegisterContract(teamId, accountKey, dataSetName, dataToken);\n };\n\n /*\n * EA API\n */\n self.dataEARegisterContract = function(teamId, contractId, eaToken, dataToken)\n {\n return $eaBackendAzureV2.dataEARegisterContract(teamId, contractId, eaToken, dataToken);\n };\n\n self.dataCostMgntRegisterContract = function(teamId, dataToken)\n {\n return $eaBackendAzureV2.dataCostMgntRegisterContract(teamId, dataToken);\n };\n\n self.dataCostMgntAddContainerToContract = function(teamId, contractId, storageAccountName, storageAccountKey, reportContainer, reportFolder, dataToken) {\n return $eaBackendAzureV2.dataCostMgntAddContainerToContract(teamId, contractId, storageAccountName, storageAccountKey, reportContainer, reportFolder, dataToken);\n }\n\n /*\n * Demo Mode API\n */\n self.dataDemoRegisterContract = function(teamId, dataToken) {\n return $eaBackendAzureV2.dataDemoRegisterContract(teamId, dataToken);\n };\n\n /*\n * Service Charts API\n */\n self.dataGetServiceCharts = function(group) {\n return $eaBackendAzure.dataGetServiceCharts(group);\n };\n\n /*\n * RI Analysis\n */\n\n self.dataGetRiVirtualMachines = function(teamId, contract, cacheIdentifier, dataToken, retry) {\n return $eaBackendAzureV2.dataGetRiVirtualMachines(teamId, contract, cacheIdentifier, dataToken, retry);\n };\n\n self.dataGetRiAnalysisResult = function(teamId, contract, resourceInstanceId, cacheIdentifier, dataToken, retry, queryoptions) {\n return $eaBackendAzureV2.dataGetRiAnalysisResult(teamId, contract, resourceInstanceId, cacheIdentifier, dataToken, retry, queryoptions);\n };\n\n /*\n * Report Center API for Widgets\n */\n self.dataGetReportCenterReportDefinitions = function(teamid, dataToken) {\n return $eaBackendAzureV2.dataGetReportCenterReportDefinitions(teamid, dataToken);\n };\n\n /*\n * Hashes\n */\n self.dataGetTeamHashes = function(teamId, hashCategory, dataToken) {\n return $eaBackendAzureV2.dataGetTeamHashes(teamId, hashCategory, dataToken).then(function(result) {\n var map = {};\n result.forEach(function(item) {\n map[item.key] = item.value;\n });\n\n return map;\n })\n };\n\n self.dataGetTeamHash = function(teamId, hashCategory, hashId, dataToken) {\n return $eaBackendAzureV2.dataGetTeamHash(teamId, hashCategory, hashId, dataToken);\n };\n\n /*\n * Reseller\n */\n self.dataGetCspResellers = function(teamId, dataToken) {\n return $eaBackendAzureV2.dataGetCspResellers(teamId, dataToken);\n };\n\n self.dataRegisterCspResellers = function(teamId, resellerName, dataToken) {\n return $eaBackendAzureV2.dataRegisterCspResellers(teamId, resellerName, dataToken);\n };\n\n self.dataDeleteEmptyCspResellers = function(teamId, resellerId, dataToken) {\n return $eaBackendAzureV2.dataDeleteEmptyCspResellers(teamId, resellerId, dataToken);\n };\n\n self.dataPublishCspCustomer = function(teamId, resellerId, accountId, customerId, dataToken) {\n return $eaBackendAzureV2.dataPublishCspCustomer(teamId, resellerId, accountId, customerId, dataToken);\n };\n\n self.dataUnPublishCspCustomer = function(teamId, resellerId, resellerAccountId, customerId, dataToken) {\n return $eaBackendAzureV2.dataUnPublishCspCustomer(teamId, resellerId, resellerAccountId, customerId, dataToken);\n };\n\n self.dataGetCspResellerSummary = function(teamId, reportId, cacheIdentifier, dataToken, retry) {\n return $eaBackendAzureV2.dataGetCspResellerSummary(teamId, reportId, cacheIdentifier, dataToken, retry);\n };\n\n self.dataGetCspDownloadAccountInvoice = function(teamid, accountId, month, dataToken) {\n return $eaBackendAzureV2.dataGetCspDownloadAccountInvoice(teamid, accountId, month, dataToken);\n };\n\n self.dataCspAwsRegisterContract = function(teamId, accountName, roleArn, externalId, bucket, prefix, reportname, customerMapping, dataToken) {\n return $eaBackendAzureV2.dataCspAwsRegisterContract(teamId, accountName, roleArn, externalId, bucket, prefix, reportname, customerMapping, dataToken);\n };\n\n self.dataCspSetResellerMarginForReseller = function(teamId, resellerId, margins, dataToken) {\n return $eaBackendAzureV2.dataCspSetResellerMarginForReseller(teamId, resellerId, margins, dataToken);\n };\n\n self.dataCspGetResellerMarginForReseller = function(teamId, resellerId, dataToken) {\n return $eaBackendAzureV2.dataCspGetResellerMarginForReseller(teamId, resellerId, dataToken);\n };\n\n self.dataGetDashboardLayout = function(teamId, dashboardId, dashboardVersion, dataToken) {\n return $eaBackendAzureV2.dataGetDashboardLayout(teamId, dashboardId, dashboardVersion, dataToken);\n };\n\n self.dataPostDashboardLayout = function(teamId, dashboardId, dashboardVersion, dashboardLayoutItems, dataToken) {\n return $eaBackendAzureV2.dataPostDashboardLayout(teamId, dashboardId, dashboardVersion, dashboardLayoutItems, dataToken);\n };\n\n self.dataGetDashboardWidgets = function(teamId, dashboardId, dataToken) {\n return $eaBackendAzureV2.dataGetDashboardWidgets(teamId, dashboardId, dataToken);\n };\n\n self.dataPostDashboardWidget = function(teamId, dashboardId, widgetDescription, dataToken) {\n return $eaBackendAzureV2.dataPostDashboardWidget(teamId, dashboardId, widgetDescription, dataToken);\n };\n\n self.dataDeletDashboardWidget = function(teamId, dashboardId, widgetId, dataToken) {\n return $eaBackendAzureV2.dataDeletDashboardWidget(teamId, dashboardId, widgetId, dataToken);\n };\n\n self.dataGetContractTags = function(teamId, contractId, dataToken) {\n return $eaBackendAzureV2.dataGetContractTags(teamId, contractId, dataToken);\n };\n\n self.dataGetMetersForService = function(teamId, contractId, month, serviceId, dataToken) {\n return $eaBackendAzureV2.dataGetMetersForService(teamId, contractId, month, serviceId, dataToken);\n };\n\n self.dataCpvGetConsentLink = function(teamId, accountId, dataToken) {\n return $eaBackendAzureV2.dataCpvGetConsentLink(teamId, accountId, dataToken);\n };\n });\n","'use strict';\n\nangular.module('azureCostsFeApp').service('$eaBackendBase', function($q) {\n var self = this;\n\n // is responsible for setting the auth header\n self.getDefaultHeaders = function(jwtToken) {\n return {\n 'Authorization': function () {\n return 'Bearer ' + jwtToken;\n }\n };\n };\n\n self.getDefaultHeadersImageUpload = function(jwtToken) {\n return {\n 'Authorization': function () {\n return 'Bearer ' + jwtToken;\n },\n 'Content-Type': function () {\n return undefined;\n }\n };\n };\n\n // Extract the body data\n self.extractDataFromResponse = function(requestPromise) {\n var defer = $q.defer();\n\n requestPromise.then(function (result) {\n if (result.status === 200 || result.status === 201 || result.status === 202) {\n defer.resolve(result.data);\n } else {\n defer.reject({status: result.status ? result.status : 500, data: result.data ? result.data : null});\n }\n }).catch(function (result) {\n defer.reject({status: result.status ? result.status : 500, data: result.data ? result.data : null});\n });\n\n return defer.promise;\n };\n\n self.extractDataFromLocationHeader = function(requestPromise) {\n return requestPromise.then(function (result) {\n\n // split the header\n var splittedHeader = result.headers('Location').split('/');\n\n // take the last value\n return $q.when({\n url: result.headers('Location'),\n entityId: splittedHeader[splittedHeader.length - 1]\n });\n })\n };\n\n});\n","'use strict';\n\n/**\n * @ngdoc service\n * @name azureCostsFeApp.eaBackendAdmin\n * @description\n * # eaBackendAzure\n * Service in the azureCostsFeApp.\n */\nangular.module('azureCostsFeApp').service('$eaBackendAdmin', function($q, $timeout, $http, $eaBackendBase, $eaConfig) {\n var self = this;\n\n // This is the main uri of the backend\n var adminUri = ($eaConfig.apiProtocol ? $eaConfig.apiProtocol : 'https') + '://' + $eaConfig.apiHost + '/admin/v1';\n\n /*\n * Admin API\n */\n\n self.dataGetServiceProviders = function(dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.get(adminUri + '/serviceproviders', {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataGetSpendingStats = function(providerId, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.get(adminUri + '/' + providerId + '/spendings/stats', {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataGetUsers = function(providerId, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.get(adminUri + '/' + providerId + '/users', {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataDeleteUser = function(providerId, userid, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.delete(adminUri + '/' + providerId + '/users/' + userid, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataPutTeamContractsSyncMonth = function(providerId, teamid, contract, month, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.put(adminUri + '/' + providerId + '/teams/' + teamid + '/contracts/' + contract + '/reports/' + month + '/sync', {}, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataPutPersonalContractsSyncMonth = function(providerId, userid, contract, month, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.put(adminUri + '/' + providerId + '/personal/' + userid + '/contracts/' + contract + '/reports/' + month + '/sync', {}, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataPutTeamContractsSync = function(providerId, teamid, contract, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.put(adminUri + '/' + providerId + '/teams/' + teamid + '/contracts/' + contract + '/reports/sync', {}, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataPutPersonalContractsSync = function(providerId, userid, contract, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.put(adminUri + '/' + providerId + '/personal/' + userid + '/contracts/' + contract + '/reports/sync', {}, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataDeleteTeamContractsReports = function(providerId, teamid, contract, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.delete(adminUri + '/' + providerId + '/teams/' + teamid + '/contracts/' + contract + '/reports', {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataDeletePersonalContractsReports = function(providerId, userid, contract, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.delete(adminUri + '/' + providerId + '/personal/' + userid + '/contracts/' + contract + '/reports', {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n});\n","'use strict';\n\n/**\n * @ngdoc service\n * @name azureCostsFeApp.eaBackendAdmin\n * @description\n * # eaBackendAzure\n * Service in the azureCostsFeApp.\n */\nangular.module('azureCostsFeApp').service('$eaBackendAdminV2', function($q, $timeout, $http, $eaBackendBase, $eaConfig) {\n var self = this;\n\n // This is the main uri of the backend\n var adminUri = ($eaConfig.apiProtocol ? $eaConfig.apiProtocol : 'https') + '://' + $eaConfig.apiHostAdminV2 + '/api/v2';\n\n self.dataGetJobs = function(hours, optionalTeam, dataToken) {\n\n var teamFilter = \"\";\n if (optionalTeam) { teamFilter = '&teamId=' + optionalTeam; }\n return $eaBackendBase.extractDataFromResponse($http.get(adminUri + '/jobs?hours=' + hours + teamFilter, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataGetJobEntries = function(partitionKey, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.get(adminUri + '/jobs/' + partitionKey + '/entries', {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataInviteUser = function(userUpn, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.post(adminUri + '/users', { Upn: userUpn}, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n});\n","'use strict';\n\n/**\n * @ngdoc service\n * @name azureCostsFeApp.eaBackendAzure\n * @description\n * # eaBackendAzure\n * Service in the azureCostsFeApp.\n */\nangular.module('azureCostsFeApp').service('$eaBackendAzureV2', function($q, $timeout, $http, $eaConfig, $eaBackendBase, $base64, $eaBackendDataModeSelector, $acWaitHelpers, rfc4122) {\n var self = this;\n\n var backendUriV2 = ($eaConfig.apiProtocol ? $eaConfig.apiProtocol : 'https') + '://' + $eaConfig.apiHostV2 + '/api/v2';\n\n self.dataGetContractReportsV2 = function(teamId, contract, dataToken) {\n var queryParameters = '';\n if ($eaBackendDataModeSelector.isBillingCycleEnabled()) { var queryParameters = '?billing=true'; }\n return $eaBackendBase.extractDataFromResponse($http.get(backendUriV2 + '/teams/' + teamId + '/contracts/' + contract + '/reports' + queryParameters, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n // Is using the new Core API\n self.dataGetContractReportDataV3 = function(teamId, contract, report, cacheIdentifier, dataToken, retry) {\n var queryParameters = '';\n\n // build the cache identifier\n if (cacheIdentifier !== undefined && cacheIdentifier !== null) {\n queryParameters = '?cache=' + cacheIdentifier + '&age=31557600';\n }\n\n // generate the cycle parameter\n if ($eaBackendDataModeSelector.isBillingCycleEnabled()) {\n if (queryParameters === '') { queryParameters = '?'; } else { queryParameters += '&'; }\n queryParameters += 'cycle=billing&day=' + $eaBackendDataModeSelector.getBillingCycleDay();\n }\n\n // generate the nomargin parameter\n if ($eaBackendDataModeSelector.isNoMarginEnabled()) {\n if (queryParameters === '') { queryParameters = '?'; } else { queryParameters += '&'; }\n queryParameters += 'nomargin=true';\n }\n\n // add no mers\n if (queryParameters === '') { queryParameters = '?'; } else { queryParameters += '&'; }\n queryParameters += 'nometers=true';\n\n // add the retry parameter\n if (retry)\n {\n if (queryParameters === '') { queryParameters = '?'; } else { queryParameters += '&'; }\n queryParameters += 'retry=true';\n }\n\n // user our api boost hosts, generate the index based on report name\n return $eaBackendBase.extractDataFromResponse($http.get(backendUriV2 + '/teams/' + teamId + '/contracts/' + contract + '/reports/' + report + queryParameters, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataGetContractReportHistoryV3 = function(teamId, contract, cacheIdentifier, dataToken, retry) {\n\n // build the query parameter\n var queryParameters = '';\n\n // build the cache identifier\n if (cacheIdentifier !== undefined && cacheIdentifier !== null) {\n queryParameters = 'cache=' + cacheIdentifier + '&age=31557600&';\n }\n\n // generate the time\n var endDate = moment().format('YYYY-MM-DD');\n var startDate = moment().add(-31, \"days\").format('YYYY-MM-DD');\n queryParameters += \"startDay=\" + startDate + \"&endDay=\" + endDate;\n\n // generate the nomargin parameter\n if ($eaBackendDataModeSelector.isNoMarginEnabled()) {\n queryParameters += '&nomargin=true';\n }\n\n // add the retry parameter if needed\n if (retry) {queryParameters += \"&retry=true\"; }\n\n // query\n return $eaBackendBase.extractDataFromResponse($http.get(backendUriV2 + '/teams/' + teamId + '/contracts/' + contract + '/history/daily?' + queryParameters, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataCspGetAccount = function(teamId, accountId, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.get(backendUriV2 + '/csps/' + teamId + '/accounts/' + accountId, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataCspRegisterAccountT1V2 = function(teamId, name, clientId, clientSecret, domain, billingDay, syncCustomers, autoActivateCustomers, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.post(backendUriV2 + '/csps/' + teamId + '/accounts/t1', { Name: name, ClientId: clientId, ClientSecret: clientSecret, Domain: domain, BillingDay: billingDay, Initialize: true, SyncCustomers: syncCustomers, AutoActivateCustomers: autoActivateCustomers}, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataCspRegisterAccountEAV2 = function(teamId, name, currency, token, cmapping, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.post(backendUriV2 + '/csps/' + teamId + '/accounts/ea', { Name: name, SecurityToken: token, Currency: currency, CustomerMapping: cmapping, Initialize: true}, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataCspRegisterAccountV1 = function(teamId, name, currency, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.post(backendUriV2 + '/csps/' + teamId + '/accounts/virtual', { Name: name, Currency: currency }, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataCspRegisterAccountDemo = function(teamId, name, contractType, currency, cmapping, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.post(backendUriV2 + '/csps/' + teamId + '/accounts/demo', { Name: name, Currency: currency, CustomerMapping: cmapping, Initialize: true, FakeServiceType: contractType}, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataCspMonthSyncReportsV2 = function(teamId, accountId, month, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.post(backendUriV2 + '/csps/' + teamId + '/accounts/' + accountId + '/reports/' + month + '/sync', undefined, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataCspSyncCustomerInAccount = function(teamId, accountId, customerId, optionalMonth, dataToken) {\n var query = optionalMonth ? '?month=' + optionalMonth : '';\n return $eaBackendBase.extractDataFromResponse($http.post(backendUriV2 + '/csps/' + teamId + '/accounts/' + accountId + '/customers/' + customerId + '/sync' + query, {}, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataCspUpdateAccountEAV2 = function(teamId, accountId, name, currency, token, exchangeRate, defaultResellerManagement, dataToken) {\n\n // define the payload\n var updateAccountPayload = { Name: name, Currency: currency, ExchangeRate: exchangeRate, DefaultResellerManagement: defaultResellerManagement };\n if (token) { updateAccountPayload.SecurityToken = token; }\n\n // send the request\n return $eaBackendBase.extractDataFromResponse($http.put(backendUriV2 + '/csps/' + teamId + '/accounts/' + accountId + '/ea', updateAccountPayload, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataCspUpdateAccountAWSV2 = function(teamId, accountId, name, currency, exchangeRate, defaultResellerManagement, dataToken) {\n\n // define the payload\n var updateAccountPayload = { Name: name, Currency: currency, ExchangeRate: exchangeRate, DefaultResellerManagement: defaultResellerManagement };\n\n // send the request\n return $eaBackendBase.extractDataFromResponse($http.put(backendUriV2 + '/csps/' + teamId + '/accounts/' + accountId + '/aws', updateAccountPayload, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataCspUpdateAccountT1V2 = function(teamId, accountId, name, clientId, clientSecret, domain, billingDay, exchangeRate, autoActivateCustomers, defaultResellerManagement, dataToken) {\n\n // define the payload\n var updateAccountPayload = { Name: name, ClientId: clientId, ClientSecret: clientSecret, Domain: domain, BillingDay: billingDay, ExchangeRate: exchangeRate, AutoActivateCustomers: autoActivateCustomers, DefaultResellerManagement: defaultResellerManagement };\n\n // send the request\n return $eaBackendBase.extractDataFromResponse($http.put(backendUriV2 + '/csps/' + teamId + '/accounts/' + accountId + '/t1', updateAccountPayload, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataCspRegisterCustomer = function(teamId, accountId, tenantIdOrDomain, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.post(backendUriV2 + '/csps/' + teamId + '/accounts/' + accountId + '/customers', { domain: tenantIdOrDomain }, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataCspRegisterCostMgntCustomer = function(teamId, accountId, customerName, hasConsumption, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.post(backendUriV2 + '/csps/' + teamId + '/accounts/' + accountId + '/customers', { HasConsumption: hasConsumption, CustomerName: customerName, CustomerSubType: 'AzureCostMgnt'}, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n // api/v2/csps/{teamId}/accounts/{accountId}/spendings\")]\n self.dataCspGetCustomersSpendingsInAccountV2 = function(viewId, teamId, accountId, month, dataToken, cacheIdentifierMap, retry) {\n\n var queryParameters = '?';\n\n // build the date\n var reportMonth = month + '-01';\n\n var splitedMonth = month.split('-');\n var daysInMonth = Date.getDaysInMonth(parseInt(splitedMonth[0]), parseInt(splitedMonth[1]));\n var reportMonthEnd = month + '-' + daysInMonth.toString().padStart(2, '0');\n\n // generate the cycle parameter\n if ($eaBackendDataModeSelector.isBillingCycleEnabled() && $eaBackendDataModeSelector.getBillingCycleDay() !== 1) {\n\n // start the month in the last month\n var reportMonth = moment(reportMonth).subtract(1, 'months').toDate();\n\n // set the start date\n reportMonth = reportMonth.currentMonthDefinition() + '-' + $eaBackendDataModeSelector.getBillingCycleDay().toString().padStart(2, '0');\n\n // next month\n var nextDate = new Date(reportMonth).addDays(31);\n reportMonthEnd = nextDate.currentMonthDefinition() + '-' + ($eaBackendDataModeSelector.getBillingCycleDay() - 1).toString().padStart(2, '0');\n }\n\n // set parameters\n queryParameters += \"startTime=\" + reportMonth + 'T00:00:00.000Z';\n queryParameters += \"&endTime=\" + reportMonthEnd + 'T00:00:00.000Z';\n\n // add the view id\n queryParameters += \"&viewId=\" + viewId;\n\n // add the cache\n cacheIdentifierMap[reportMonth] = cacheIdentifierMap[reportMonth] || rfc4122.v4();\n queryParameters += \"&cache=\" + cacheIdentifierMap[reportMonth];\n\n // retry\n if (retry) { queryParameters += '&retry=true'; }\n\n return $eaBackendBase.extractDataFromResponse($http.get(backendUriV2 + '/csps/' + teamId + '/accounts/' + accountId + '/spendings' + queryParameters, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataCspGetCustomersInAccount = function(teamId, accountId, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.get(backendUriV2 + '/csps/' + teamId + '/accounts/' + accountId + '/customers', {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataCspActiveCustomersInAccount = function(teamId, accountId, customerId, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.post(backendUriV2 + '/csps/' + teamId + '/accounts/' + accountId + '/customers/' + customerId + '/activate', {}, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataCspDeActiveCustomersInAccount = function(teamId, accountId, customerId, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.post(backendUriV2 + '/csps/' + teamId + '/accounts/' + accountId + '/customers/' + customerId + '/deactivate', {}, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataCspGetGsiSettings = function(teamId, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.get(backendUriV2 + '/csps/' + teamId + '/gsisettings', {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataCspSetGsiSettings = function(teamId, gsiCurrency, dataToken) {\n var payload = { ReferenceCurrency: gsiCurrency };\n return $eaBackendBase.extractDataFromResponse($http.put(backendUriV2 + '/csps/' + teamId + '/gsisettings', payload, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataMonthSyncReportsV2 = function(teamid, contract, months, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.post(backendUriV2 + '/teams/' + teamid + '/contracts/' + contract + '/reports/sync', months.map(function(month) { return { \"reportId\": month } }), {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataSetServiceTagsV4 = function(teamid, contract, serviceId, serviceTags, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.put(backendUriV2 + '/teams/' + teamid + '/contracts/' + contract + '/services/' + serviceId + '/tags', { tags: serviceTags }, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataCspSyncAccount = function(teamId, accountId, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.post(backendUriV2 + '/csps/' + teamId + '/accounts/' + accountId + '/sync', {}, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataCspUpdateVirtualMetersForCustomerInAccount = function(teamId, accountId, customerId, month, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.post(backendUriV2 + '/csps/' + teamId + '/accounts/' + accountId + '/customers/' + customerId + '/updatevmeters', { Month: month }, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataCspUpgradeResellerVersionForCustomer = function(teamId, accountId, customerId, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.post(backendUriV2 + '/csps/' + teamId + '/accounts/' + accountId + '/customers/' + customerId + '/version', {}, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n /*\n * AWS API\n */\n self.dataAwsVerifyConnection = function(teamId, roleArn, externalId, bucket, dataToken)\n {\n return $eaBackendBase.extractDataFromResponse($http.post(backendUriV2 + '/teams/' + teamId + '/contracts/aws/verify', { AssumedRole: roleArn, ExternalId: externalId, Bucket: bucket}, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataAwsRegisterContract = function(teamId, roleArn, externalId, bucket, prefix, reportname, dataToken)\n {\n return $eaBackendBase.extractDataFromLocationHeader($http.post(backendUriV2 + '/teams/' + teamId + '/contracts/aws', {\n AssumedRole: roleArn, ExternalId: externalId,\n Bucket: bucket, BucketPrefix: prefix,\n ReportName: reportname,\n Initialize: true\n }, {headers: $eaBackendBase.getDefaultHeaders(dataToken)})).then(function(result) {\n return $q.when(result.entityId);\n });\n };\n\n self.dataEARegisterContract = function(teamId, contractId, eaToken, dataToken)\n {\n return $eaBackendBase.extractDataFromLocationHeader($http.post(backendUriV2 + '/teams/' + teamId + '/contracts/ea', {\n ContractId: contractId,\n Token: eaToken,\n Initialize: true\n }, {headers: $eaBackendBase.getDefaultHeaders(dataToken)})).then(function() {\n return $q.when(contractId);\n });\n };\n\n self.dataCostMgntRegisterContract = function(teamId, dataToken)\n {\n return $eaBackendBase.extractDataFromLocationHeader($http.post(backendUriV2 + '/teams/' + teamId + '/contracts/azurecostmgnt', \n {}, \n {headers: $eaBackendBase.getDefaultHeaders(dataToken)})).then(function(result) {\n return $q.when(result.entityId);\n });\n };\n\n self.dataCostMgntAddContainerToContract = function(teamId, contractId, storageAccountName, storageAccountKey, reportContainer, reportFolder, dataToken) {\n return $eaBackendBase.extractDataFromLocationHeader($http.post(backendUriV2 + '/teams/' + teamId + '/contracts/azurecostmgnt/' + contractId + '/containers', {\n AccountName: storageAccountName,\n AccountKey: storageAccountKey,\n ReportContainer: reportContainer,\n ReportFolder: reportFolder, \n }, {headers: $eaBackendBase.getDefaultHeaders(dataToken)})).then(function(result) {\n return $q.when(result.entityId);\n });\n }\n\n self.dataDemoRegisterContract = function(teamId, dataToken)\n {\n return $eaBackendBase.extractDataFromLocationHeader($http.post(backendUriV2 + '/teams/' + teamId + '/contracts/demo', {}, {headers: $eaBackendBase.getDefaultHeaders(dataToken)})).then(function(result) {\n return $q.when(result.entityId);\n });\n };\n\n /*\n * GCP APi\n */\n self.dataGcpVerifyConnection = function(teamId, accountKey, dataSetName, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.post(backendUriV2 + '/teams/' + teamId + '/contracts/gcp/verify', { ServiceAccountKey: accountKey, BillingDataSet: dataSetName }, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataGcpRegisterContract = function(teamId, accountKey, dataSetName, dataToken) {\n return $eaBackendBase.extractDataFromLocationHeader($http.post(backendUriV2 + '/teams/' + teamId + '/contracts/gcp', {\n ServiceAccountKey: accountKey, BillingDataSet: dataSetName,\n Initialize: true\n }, {headers: $eaBackendBase.getDefaultHeaders(dataToken)})).then(function(result) {\n return $q.when(result.entityId);\n });\n };\n\n /*\n * RI Analysis API\n */\n\n self.dataGetRiVirtualMachines = function(teamId, contract, cacheIdentifier, dataToken, retry) {\n var queryParameters = '';\n\n // build the cache identifier\n if (cacheIdentifier !== undefined && cacheIdentifier !== null) {\n queryParameters = '?cache=' + cacheIdentifier + '&age=31557600';\n }\n\n // add the retry parameter\n if (retry) {\n if (queryParameters === '') {\n queryParameters = '?';\n } else {\n queryParameters += '&';\n }\n queryParameters += 'retry=true';\n }\n\n // user our api boost hosts, generate the index based on report name\n return $eaBackendBase.extractDataFromResponse($http.get(backendUriV2 + '/teams/' + teamId + '/contracts/' + contract + '/ri/vms/' + queryParameters, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataGetRiAnalysisResult = function(teamId, contract, resourceInstanceId, cacheIdentifier, dataToken, retry, queryoptions) {\n var queryParameters = '';\n\n // build the cache identifier\n if (cacheIdentifier !== undefined && cacheIdentifier !== null) {\n queryParameters = '?cache=' + cacheIdentifier + '&age=31557600';\n }\n\n // add the retry parameter\n if (retry)\n {\n if (queryParameters === '') { queryParameters = '?'; } else { queryParameters += '&'; }\n queryParameters += 'retry=true';\n }\n\n // add query options\n if (queryoptions) {\n Object.keys(queryoptions).forEach(function(qk) {\n queryParameters += '&' + qk + '=' + queryoptions[qk] ;\n })\n }\n\n // user our api boost hosts, generate the index based on report name\n return $eaBackendBase.extractDataFromResponse($http.get(backendUriV2 + '/teams/' + teamId + '/contracts/' + contract + '/ri/' + resourceInstanceId + '/analysis' + queryParameters, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n /*\n * Price Sheet\n */\n self.dataGetPriceComparisionSheet = function(teamId, contract, notUsedResourceId, cacheIdentifier, dataToken, retry, queryOptions) {\n var queryParameters = '';\n\n // build the cache identifier\n if (cacheIdentifier !== undefined && cacheIdentifier !== null) {\n queryParameters = '?cache=' + cacheIdentifier + '&age=31557600';\n }\n\n // add the retry parameter\n if (retry) {\n if (queryParameters === '') {\n queryParameters = '?';\n } else {\n queryParameters += '&';\n }\n queryParameters += 'retry=true';\n }\n\n // add our normal values\n if (queryParameters === '') {\n queryParameters = '?';\n } else {\n queryParameters += '&';\n }\n\n queryParameters += 'region=' + queryOptions.region + '&locale=' + queryOptions.locale + '¤cy=' + queryOptions.currency + '&erate=' + queryOptions.erate;\n\n // user our api boost hosts, generate the index based on report name\n return $eaBackendBase.extractDataFromResponse($http.get(backendUriV2 + '/teams/' + teamId + '/contracts/' + contract + '/pricesheet/' + queryParameters, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n /*\n * Report Center API for Widgets\n */\n self.dataGetReportCenterReportDefinitions = function(teamid, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.get(backendUriV2 + '/teams/' + teamid + '/reportcenter/v2/definitions', {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n /*\n * Teaming API\n */\n\n self.dataInviteUserToTeamV2 = function(teamid, contact, role, fullAccess, callback, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.post(backendUriV2 + '/teams/' + teamid + '/invitations', { Contact: contact, Role: role, FullAccess: fullAccess, Callback: callback}, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n /*\n * Cache Hashes\n */\n self.dataGetTeamHashes = function(teamId, hashCategory, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.get(backendUriV2 + '/teams/' + teamId + '/hashes/categories/' + hashCategory, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataGetTeamHash = function(teamId, hashCategory, hashId, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.get(backendUriV2 + '/teams/' + teamId + '/hashes/categories/' + hashCategory + '/' + hashId, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n /*\n * Reseller\n */\n\n self.dataGetCspResellers = function(teamId, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.get(backendUriV2 + '/csps/' + teamId + '/resellers', {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataRegisterCspResellers = function(teamId, resellerName, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.post(backendUriV2 + '/csps/' + teamId + '/resellers', { Name: resellerName }, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataDeleteEmptyCspResellers = function(teamId, resellerId, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.delete(backendUriV2 + '/csps/' + teamId + '/resellers/' + resellerId, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataPublishCspCustomer = function(teamId, resellerId, accountId, customerId, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.post(backendUriV2 + '/csps/' + teamId + '/resellers/' + resellerId + '/customers', { AccountId: accountId, CustomerId: customerId }, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataUnPublishCspCustomer = function(teamId, resellerId, resellerAccountId, customerId, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.delete(backendUriV2 + '/csps/' + teamId + '/resellers/' + resellerId + '/accounts/' + resellerAccountId + '/customers/' + customerId, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataGetCspResellerSummary = function(teamId, reportId, cacheIdentifier, dataToken, retry)\n {\n var queryParameters = '';\n\n // build the cache identifier\n if (cacheIdentifier !== undefined && cacheIdentifier !== null) {\n queryParameters = '?cache=' + cacheIdentifier + '&age=31557600';\n }\n\n // add the retry parameter\n if (retry)\n {\n if (queryParameters === '') { queryParameters = '?'; } else { queryParameters += '&'; }\n queryParameters += 'retry=true';\n }\n\n // user our api boost hosts, generate the index based on report name\n return $eaBackendBase.extractDataFromResponse($http.get(backendUriV2 + '/csps/' + teamId + '/resellers/summary/' + reportId + queryParameters, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataCspSetResellerMarginForReseller = function(teamId, resellerId, margins, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.put(backendUriV2 + '/csps/' + teamId + '/resellers/margins/' + resellerId, { margins: margins }, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataCspGetResellerMarginForReseller = function(teamId, resellerId, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.get(backendUriV2 + '/csps/' + teamId + '/resellers/margins/' + resellerId, {headers: $eaBackendBase.getDefaultHeaders(dataToken)})).then(function(responseData) {\n return responseData.margins.map(function(m) {\n return { MatchKey: m.matchKey || '*', Margin: m.margin, ValidUntil: m.validUntil };\n });\n });\n };\n\n /*\n * CSP\n */\n self.dataGetCspDownloadAccountInvoice = function(teamid, accountId, month, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.get(backendUriV2 + '/csps/' + teamid + '/accounts/' + accountId + '/invoices/' + month + '/requestdownload', {headers: $eaBackendBase.getDefaultHeaders(dataToken)})).then(function(oneTimeDownloadTicketResponse) {\n return backendUriV2 + '/csps/' + teamid + '/invoices/download?ticket=' + oneTimeDownloadTicketResponse.oneTimeDownloadTicket\n })\n };\n\n self.dataCspAwsRegisterContract = function(teamId, accountName, roleArn, externalId, bucket, prefix, reportname, customerMapping, dataToken)\n {\n return $eaBackendBase.extractDataFromLocationHeader($http.post(backendUriV2 + '/csps/' + teamId + '/accounts/aws', {\n Name: accountName,\n AssumedRole: roleArn,\n ExternalId: externalId,\n BucketName: bucket,\n Prefix: prefix,\n ReportName: reportname,\n CustomerMapping: customerMapping,\n Initialize: true\n }, {headers: $eaBackendBase.getDefaultHeaders(dataToken)})).then(function(result) {\n return $q.when(result.entityId);\n });\n };\n\n\n self.dataCspGetResellerMarginForCustomer = function(teamId, accountId, customerId, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.get(backendUriV2 + '/csps/' + teamId + '/accounts/' + accountId + '/customers/' + customerId + '/margins', {headers: $eaBackendBase.getDefaultHeaders(dataToken)})).then(function(responseData) {\n return responseData.margins.map(function(m) {\n return { MatchKey: m.matchKey || '*', Margin: m.margin, ValidUntil: m.validUntil };\n });\n });\n };\n\n self.dataCspSetResellerMarginForCustomer = function(teamId, accountId, customerId, margins, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.put(backendUriV2 + '/csps/' + teamId + '/accounts/' + accountId + '/customers/' + customerId + '/margins', { margins: margins }, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataCspGetResellerFeaturesForCustomer = function(teamId, accountId, customerId, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.get(backendUriV2 + '/csps/' + teamId + '/accounts/' + accountId + '/customers/' + customerId + '/features', {headers: $eaBackendBase.getDefaultHeaders(dataToken)}))\n };\n\n self.dataCspSetResellerFeaturesForCustomer = function(teamId, accountId, customerId, features, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.post(backendUriV2 + '/csps/' + teamId + '/accounts/' + accountId + '/customers/' + customerId + '/features', features, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataPostPurgeContractReports = function(teamId, contract, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.post(backendUriV2 + '/teams/' + teamId + '/contracts/' + contract + '/reports/purge-caches', {}, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataGetContractInfo = function(teamId, contract, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.get(backendUriV2 + '/teams/' + teamId + '/contracts/' + contract + '/info', {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.triggerContractNotificationForUser = function(teamId, userId, contractId, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.post(backendUriV2 + '/teams/' + teamId + '/contracts/' + contractId + '/notify', { userid: userId}, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataCspGetUpliftCategories = function(teamId, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.get(backendUriV2 + '/csps/' + teamId + '/settings/upliftcategories', {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n // Dashboard Layout\n\n self.dataGetDashboardLayout = function(teamId, dashboardId, dashboardVersion, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.get(backendUriV2 + '/teams/' + teamId + '/dashboards/' + dashboardId + '/layout?version=' + dashboardVersion, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}))\n };\n\n self.dataPostDashboardLayout = function(teamId, dashboardId, dashboardVersion, dashboardLayoutItems, dataToken) {\n var model = {\n version: dashboardVersion,\n items: dashboardLayoutItems\n };\n\n return $eaBackendBase.extractDataFromResponse($http.post(backendUriV2 + '/teams/' + teamId + '/dashboards/' + dashboardId + '/layout', model, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}))\n };\n\n self.dataGetDashboardWidgets = function(teamId, dashboardId, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.get(backendUriV2 + '/teams/' + teamId + '/dashboards/' + dashboardId + '/widgets', {headers: $eaBackendBase.getDefaultHeaders(dataToken)}))\n };\n\n self.dataPostDashboardWidget = function(teamId, dashboardId, widgetDescription, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.post(backendUriV2 + '/teams/' + teamId + '/dashboards/' + dashboardId + '/widgets', { ItemId: widgetDescription.ItemUuid, WidgetDescription: widgetDescription}, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}))\n };\n\n self.dataDeletDashboardWidget = function(teamId, dashboardId, widgetId, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.delete(backendUriV2 + '/teams/' + teamId + '/dashboards/' + dashboardId + '/widgets/' + widgetId, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}))\n };\n\n // tags\n self.dataGetContractTags = function(teamId, contractId, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.get(backendUriV2 + '/teams/' + teamId + '/contracts/' + contractId + '/tags', {headers: $eaBackendBase.getDefaultHeaders(dataToken)}))\n };\n\n self.dataGetMetersForService = function(teamId, contractId, month, serviceId, dataToken) {\n\n // generate the nomargin parameter\n var queryParameters = '';\n if ($eaBackendDataModeSelector.isNoMarginEnabled()) {\n if (queryParameters === '') { queryParameters = '?'; } else { queryParameters += '&'; }\n queryParameters += 'nomargin=true';\n }\n\n return $eaBackendBase.extractDataFromResponse($http.get(backendUriV2 + '/teams/' + teamId + '/contracts/' + contractId + '/reports/' + month + '/services/' + serviceId + '/meters' + queryParameters, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}))\n };\n\n self.dataCspGetResellerFilterForCustomer = function(teamId, accountId, customerId, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.get(backendUriV2 + '/csps/' + teamId + '/accounts/' + accountId + '/customers/' + customerId + '/filter', {headers: $eaBackendBase.getDefaultHeaders(dataToken)})).then(function(fm) {\n return fm.filter;\n });\n };\n\n self.dataCspSetResellerFilterForCustomer = function(teamId, accountId, customerId, filter, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.put(backendUriV2 + '/csps/' + teamId + '/accounts/' + accountId + '/customers/' + customerId + '/filter', { Filter: filter }, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataCpvGetConsentLink = function(teamId, accountId, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.get(backendUriV2 + '/cpv/' + teamId + '/accounts/' + accountId + '/consent', {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataDeleteContract = function(teamid, contract, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.delete(backendUriV2 + '/teams/' + teamid + '/contracts/' + contract, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n }\n \n});","'use strict';\n\nangular.module('azureCostsFeApp').service('$eaBackendAzureCachedContentLoader', function($q, $timeout, $http, $eaConfig, $eaBackendBase, $base64, $eaBackendDataModeSelector, $acDpnService, $acCacheIdentifierGenerator, $eaBackend) {\n var self = this;\n\n self.dataRequestCachedResourceWithRetry = function(teamid, contractNumber, resourceId, cacheIdentifier, jwtToken, timeout, retry, options) {\n\n // set the timeout to a value\n if (timeout) { timeout = timeout + 5; } else { timeout = 5; }\n if (timeout > 15 ) { timeout = 15; }\n\n // add nice notification\n $acDpnService.addProcessingItem(resourceId);\n\n // start the load process\n var loadPromise = $q.when(options.resourceEndpoint(teamid, contractNumber, resourceId, cacheIdentifier, jwtToken, retry, options.queryoptions));\n\n // handle the reload request\n return loadPromise.then(function(resultData) {\n\n // should we have an error code 202 wait for 30 seconds\n if (resultData.status === 202) {\n\n // wait 30 second\n return $timeout(function() {}, timeout * 1000).then(function() {\n\n // try to reload the data\n return self.dataRequestCachedResourceWithRetry(teamid, contractNumber, resourceId, cacheIdentifier, jwtToken, timeout, true, options);\n\n });\n\n } else {\n\n // mark the report as done\n $acDpnService.removeProcessingItem(resourceId);\n\n // return the loaded data\n return $q.when(resultData);\n }\n });\n };\n\n // resourceInfomrmation: [{ Id, CacheHash}]\n // options: { cacheIdentifierExtension, resourceEndpoint }\n self.dataRequestCachedResourcesWithRetry = function(teamid, contractNumber, resourceInformation, jwtToken, options) {\n options = options || {};\n\n var reportLoadPromisses = [];\n\n // visit the reports\n resourceInformation.forEach(function (resource) {\n\n // generate the cacheIdentifier\n var cacheIdentifier = resource.CacheIdentifier;\n if (!cacheIdentifier) {\n cacheIdentifier = $acCacheIdentifierGenerator.buildCacheIdentifier(jwtToken, resource.CacheHash, options.cacheIdentifierExtenion);\n }\n\n // the process of reloading\n reportLoadPromisses.push(self.dataRequestCachedResourceWithRetry(teamid, contractNumber, resource.Id, cacheIdentifier, jwtToken, undefined, false, options));\n });\n\n return $q.all(reportLoadPromisses);\n };\n\n});\n\n","'use strict';\n\nangular.module('azureCostsFeApp').service('$eaReportData', function($eaBackend, $eaBackendDataModeSelector, $q, $acCacheIdentifierGenerator, $timeout, $acDpnService) {\n var self = this;\n\n /*\n * Loads the meta data about a contract. This includes the contract as self and available reports\n * in our system\n */\n self.loadContractDetails = function(teamId, contractNumber, jwtToken, optionalParams) {\n\n // define the parameters\n optionalParams = optionalParams || {};\n optionalParams.maxPeriods = optionalParams.maxPeriods || 12;\n\n // get the contract\n return $eaBackend.dataGetContract(teamId, contractNumber, jwtToken).then(function(contractInformation) {\n\n // get the reports\n return $eaBackend.dataGetContractReports(teamId, contractNumber, jwtToken).then(function (contractReports) {\n\n // just take the last 12 months at max\n var contractReports = contractReports;\n if (contractReports.length > optionalParams.maxPeriods) { contractReports = contractReports.slice(0, optionalParams.maxPeriods); }\n var contractReportsSmall = contractReports.map(function(report) { return report.Id; });\n\n // assign the reports\n contractInformation.Reports = contractReportsSmall;\n contractInformation.ReportsFull = contractReports;\n\n // good to go\n return contractInformation;\n });\n });\n };\n\n self.loadReportHistory = function(teamid, contractNumber, jwtToken) {\n return $eaBackend.dataGetContractReportHistory(teamid, contractNumber, jwtToken);\n };\n\n});\n","'use strict';\n\n/**\n * @ngdoc service\n * @name azureCostsFeApp.eaBackendAzure\n * @description\n * # eaBackendAzure\n * Service in the azureCostsFeApp.\n */\nangular.module('azureCostsFeApp').service('$eaBackendAzure', function($q, $timeout, $http, $eaConfig, $eaBackendBase, $base64, $eaBackendDataModeSelector) {\n var self = this;\n\n // This is the main uri of the backend\n var backendUri = ($eaConfig.apiProtocol ? $eaConfig.apiProtocol : 'https') + '://' + $eaConfig.apiHost + '/api/v1';\n\n var backendBoostUris = $eaConfig.apiBoostHosts.map(function(apiBoostHost) {\n return ($eaConfig.apiProtocol ? $eaConfig.apiProtocol : 'https') + '://' + apiBoostHost+ '/api/v1';\n });\n\n var stsUri = ($eaConfig.stsProtocol ? $eaConfig.stsProtocol : 'https') + '://' + $eaConfig.stsHost + '/sts';\n\n var monUri = ($eaConfig.apiProtocol ? $eaConfig.apiProtocol : 'https') + '://' + $eaConfig.apiHost + '/mon';\n\n self.stsUpdateToken = function(options, dataToken) {\n options = options || {};\n\n /*jshint camelcase: false */\n var body = { grant_type: 'update_token' };\n if (options.delegate) { body.delegate = options.delegate; }\n\n // ask for token update\n return $eaBackendBase.extractDataFromResponse($http.post(stsUri+ '/issue/oauth/token', body, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataPostProfileTouch = function(dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.post(backendUri + '/me', null, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataGetProfile = function(dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.get(backendUri + '/me', {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataUpdateProfile = function(profileProperties, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.put(backendUri + '/me', profileProperties, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataGetContracts = function(teamId, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.get(backendUri + '/teams/' + teamId + '/contracts', {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataGetContract = function(teamId, contract, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.get(backendUri + '/teams/' + teamId + '/contracts/' + contract , {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataGetContractSubscriptions = function(teamId, contract, dataToken, options) {\n var baseUri = backendUri + '/teams/' + teamId + '/contracts/' + contract + '/subscriptions';\n if (options && options.verify) { baseUri += '?verify=true'; }\n return $eaBackendBase.extractDataFromResponse($http.get(baseUri, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataPutContractSubscription = function(teamId, contract, subscriptionId, updatedFields, dataToken) {\n var baseUri = backendUri + '/teams/' + teamId + '/contracts/' + contract + '/subscriptions/' + subscriptionId;\n return $eaBackendBase.extractDataFromResponse($http.put(baseUri, updatedFields, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataGetContractSubscriptionsVerifyConnection = function(teamId, contract, subscriptionId, offerid, country, currency, dataToken) {\n var baseUri = backendUri + '/teams/' + teamId + '/contracts/' + contract + '/subscriptions/' + subscriptionId + '/verify-connection?offerId=' + encodeURIComponent(offerid) + '&country=' + encodeURIComponent(country) + '¤cy=' + encodeURIComponent(currency);\n return $eaBackendBase.extractDataFromResponse($http.get(baseUri, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataGetContractReportData = function(teamId, contract, report, cacheIdentifier, dataToken, retry) {\n var queryParameters = '';\n\n // build the cache identifier\n if (cacheIdentifier !== undefined && cacheIdentifier !== null) {\n queryParameters = '?cache=' + cacheIdentifier + '&age=31557600';\n }\n\n // generate the cycle parameter\n if ($eaBackendDataModeSelector.isBillingCycleEnabled()) {\n if (queryParameters === '') { queryParameters = '?'; } else { queryParameters += '&'; }\n queryParameters += 'cycle=billing';\n }\n\n // generate the nomargin parameter\n if ($eaBackendDataModeSelector.isNoMarginEnabled()) {\n if (queryParameters === '') { queryParameters = '?'; } else { queryParameters += '&'; }\n queryParameters += 'nomargin=true';\n }\n\n // add the retry parameter\n if (retry)\n {\n if (queryParameters === '') { queryParameters = '?'; } else { queryParameters += '&'; }\n queryParameters += 'retry=true';\n }\n\n // user our api boost hosts, generate the index based on report name\n var boostIndex = (parseInt(report.split('-')[1]) % backendBoostUris.length);\n return $eaBackendBase.extractDataFromResponse($http.get(backendBoostUris[boostIndex] + '/teams/' + teamId + '/contracts/' + contract + '/reports/' + report + queryParameters, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataRegisterContract = function(teamid, contract, token, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.post(backendUri + '/teams/' + teamid + '/contracts', { Enrollment: contract, Token: token }, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataPostRatePlanRegistrationId = function(teamid, callbackUri, directoryDomain, defaultCurrency, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.post(backendUri + '/teams/' + teamid + '/contracts/registrationid', { Callback: callbackUri, DirectoryDomain: directoryDomain, DefaultCurrency: defaultCurrency }, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataAllSyncReports = function(teamid, contract, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.post(backendUri + '/teams/' + teamid + '/contracts/' + contract + '/reports/sync', null, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataMonthSyncReports = function(teamid, contract, month, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.post(backendUri + '/teams/' + teamid + '/contracts/' + contract + '/reports/' + month + '/sync', null, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataUpdateContract = function(teamid, contract, contractInformation, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.put(backendUri + '/teams/' + teamid + '/contracts/' + contract, contractInformation, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataSetServiceTagsV1 = function(teamid, contract, serviceName, serviceTags, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.put(backendUri + '/teams/' + teamid + '/contracts/' + contract + '/services/' + $base64.encode(serviceName) + '/tags?enc=64', { tags: serviceTags }, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataSetServiceTagsV2 = function(teamid, contract, serviceName, serviceType, serviceTags, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.put(backendUri + '/teams/' + teamid + '/contracts/' + contract + '/servicetypes/' + serviceType + '/services/' + $base64.encode(serviceName) + '/tags?enc=64', { tags: serviceTags }, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataSetServiceTagsV3 = function(teamid, contract, serviceName, serviceType, serviceSubscriptionId, serviceTags, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.put(backendUri + '/teams/' + teamid + '/contracts/' + contract + '/subscriptions/' + serviceSubscriptionId + '/servicetypes/' + serviceType + '/services/' + $base64.encode(serviceName) + '/tags?enc=64', { tags: serviceTags }, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataUpdateTeamImage = function(teamid, teamImageFile, dataToken) {\n\n // generate the form data\n var fd = new FormData();\n fd.append('file', teamImageFile);\n\n // upload the file\n return $eaBackendBase.extractDataFromResponse($http.post(backendUri + '/teams/' + teamid + '/image', fd, {headers: $eaBackendBase.getDefaultHeadersImageUpload(dataToken)}));\n };\n\n self.dataGetTeamImageLocation = function(teamid) {\n var defer = $q.defer();\n\n $http.head(backendUri + '/public/teams/' + teamid + '/image').then(function() {\n defer.resolve(backendUri + '/public/teams/' + teamid + '/image');\n }).catch(function() {\n defer.resolve(undefined);\n });\n\n return defer.promise;\n };\n\n /*\n * Notification Settings API\n */\n self.dataGetContractNotifcationSettings = function(teamid, contract, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.get(backendUri + '/teams/' + teamid + '/contracts/' + contract + '/notifications', {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataGetContractNotifcationSettingsForUser = function(teamid, contract, targetUserId, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.get(backendUri + '/teams/' + teamid + '/contracts/' + contract + '/notifications/' + targetUserId, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.updateGetContractNotifcationSettings = function(teamid, contract, notificationSettings, dataToken, options) {\n return $eaBackendBase.extractDataFromResponse($http.post(backendUri + '/teams/' + teamid + '/contracts/' + contract + '/notifications', { NotificationSettings: notificationSettings, Options: options }, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.updateGetContractNotifcationSettingsForUser = function(teamid, contract, targetUserId, notificationSettings, dataToken, options) {\n return $eaBackendBase.extractDataFromResponse($http.post(backendUri + '/teams/' + teamid + '/contracts/' + contract + '/notifications/' + targetUserId, { NotificationSettings: notificationSettings, Options: options }, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n /*\n * History API\n */\n self.dataGetContractReportHistory = function(teamid, contract, dataToken) {\n\n // generate the nomargin parameter\n var queryParameters = '';\n if ($eaBackendDataModeSelector.isNoMarginEnabled()) {\n queryParameters = '?nomargin=true';\n }\n\n return $eaBackendBase.extractDataFromResponse($http.get(backendUri + '/teams/' + teamid + '/contracts/' + contract + '/history/daily' + queryParameters, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n\n /*\n * MetaData API\n */\n self.dataGetMetadata = function(collection, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.get(backendUri + '/metadata/' + collection, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n /*\n * Teaming API\n */\n self.dataMigrateToTeamAccount = function(teamName,dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.post(backendUri + '/teams/convert', { Name: teamName }, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataGetTeamProfile = function(teamid, members, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.get(backendUri + '/teams/' + teamid + '?members=' + (members ? '1' : '0'), {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataInviteUserToTeam = function(teamid, contact, role, subscriptions, callback, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.post(backendUri + '/teams/' + teamid + '/invitations', { Contact: contact, Role: role, Subscriptions: subscriptions, Callback: callback}, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataReInviteUserToTeam = function(teamid, invitationid, callback, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.put(backendUri + '/teams/' + teamid + '/invitations/' + invitationid, { Callback: callback }, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataRemoveUserFromTeam = function(teamid, userid, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.delete(backendUri + '/teams/' + teamid + '/members/' + userid, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataUpdateTeamProfile = function(teamid, profile, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.put(backendUri + '/teams/' + teamid, profile, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataUpdateTeamMembership = function(teamid, userid, role, subscriptions, contact, dataToken) {\n var body = {};\n\n if (role) { body.Role = role; }\n if (subscriptions) { body.Subscriptions = subscriptions; }\n if (contact) { body.Contact = contact; }\n\n return $eaBackendBase.extractDataFromResponse($http.put(backendUri + '/teams/' + teamid + '/members/' + userid, body, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataRegisterAppToTeam = function(teamid, name, clientId, clientSecret, role, subscriptions, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.post(backendUri + '/teams/' + teamid + '/apps', { Name: name, ClientId: clientId, ClientSecret: clientSecret, Role: role, Subscriptions: subscriptions }, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataRegisterUserToTeam = function(teamid, contact, role, subscriptions, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.post(backendUri + '/teams/' + teamid + '/users', { Contact: contact, Role: role, Subscriptions: subscriptions}, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n /*\n * Branding API\n */\n self.dataUpdateBranding = function(teamid, brandingSettings, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.post(backendUri + '/teams/' + teamid + '/css', brandingSettings, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataGetBranding = function(teamid) {\n return $eaBackendBase.extractDataFromResponse($http.get(backendUri + '/public/teams/' + teamid + '/css'));\n };\n\n self.dataGetBucket = function(bucketname) {\n return $eaBackendBase.extractDataFromResponse($http.get(backendUri + '/public/buckets/' + bucketname));\n };\n\n self.dataGetTeamBuckets = function(teamid, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.get(backendUri + '/teams/' + teamid + '/buckets', {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataCreateTeamBucket = function(teamid, bucketName, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.post(backendUri + '/teams/' + teamid + '/buckets/' + bucketName, null, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataDeleteTeamBucket = function(teamid, bucketName, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.delete(backendUri + '/teams/' + teamid + '/buckets/' + bucketName, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n /*\n * Azure AAD API (Data Token required)\n */\n self.dataGetAADConnections = function(teamid, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.get(backendUri + '/teams/' + teamid + '/aad', {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataRegisterAADConnection = function(teamid, connectionData, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.post(backendUri + '/teams/' + teamid + '/aad', connectionData, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataDeleteAADConnection = function(teamid, aadId, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.delete(backendUri + '/teams/' + teamid + '/aad/' + aadId, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataGetAuthInformation = function(teamid) {\n return $eaBackendBase.extractDataFromResponse($http.get(backendUri + '/public/teams/' + teamid + '/auth'));\n };\n\n self.dataGetAADConnectionGroups = function(teamid, tenantId, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.get(backendUri + '/teams/' + teamid + '/aad/' + tenantId + '/groups', {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n /*\n * Billing API\n */\n self.dataStartTrial = function(plan, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.post(backendUri + '/me/trial/' + plan, null, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataPurchase = function(plan, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.post(backendUri + '/me/purchase/' + plan, null, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataUpdateBillingInformation = function(billingAddress, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.put(backendUri + '/me/billing', { PaymentMethod: 'invoice', InvoiceAddress: billingAddress }, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataGetBillingInformation = function(dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.get(backendUri + '/me/billing', {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n /*\n * Data Filter API\n */\n self.dataCreateDataFilter = function(teamid, ea, filter, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.post(backendUri + '/teams/' + teamid + '/contracts/' + ea + '/filters', filter, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataGetDataFilters = function(teamid, ea, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.get(backendUri + '/teams/' + teamid + '/contracts/' + ea + '/filters', {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataRemoveDataFilter = function(teamid, ea, filterid, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.delete(backendUri + '/teams/' + teamid + '/contracts/' + ea + '/filters/' + filterid, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataUpdateDataFilter = function(teamid, ea, filter, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.put(backendUri + '/teams/' + teamid + '/contracts/' + ea + '/filters/' + filter.Id, filter, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n /*\n * CSPs\n */\n self.dataCspEnroll = function(teamName, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.post(backendUri + '/csps/enroll', { Name: teamName }, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataCspGetAccounts = function(teamId, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.get(backendUri + '/csps/' + teamId + '/accounts', {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataCspRegisterAccountT2 = function(teamId, name, currency, country, billingDay, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.post(backendUri + '/csps/' + teamId + '/accounts', { TierLevel: 'T2', Name: name, Currency: currency, Country: country, BillingDay: billingDay}, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataCspUpdateAccount = function(teamId, accountId, name, clientId, clientSecret, domain, billingDay, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.put(backendUri + '/csps/' + teamId + '/accounts/' + accountId, { Name: name, ClientId: clientId, ClientSecret: clientSecret, Domain: domain, BillingDay: billingDay}, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataCspDeleteAccount = function(teamId, accountId, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.delete(backendUri + '/csps/' + teamId + '/accounts/' + accountId, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataCspGetCustomersInAccount = function(teamId, accountId, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.get(backendUri + '/csps/' + teamId + '/accounts/' + accountId + '/customers', {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataCspGetCustomersSpendingsInAccount = function(teamId, accountId, month, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.get(backendUri + '/csps/' + teamId + '/accounts/' + accountId + '/spendings/' + month, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataCspGetResellerFilterForCustomer = function(teamId, accountId, customerId, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.get(backendUri + '/csps/' + teamId + '/accounts/' + accountId + '/customers/' + customerId + '/filter', {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n self.dataCspSetResellerFilterForCustomer = function(teamId, accountId, customerId, filter, dataToken) {\n return $eaBackendBase.extractDataFromResponse($http.put(backendUri + '/csps/' + teamId + '/accounts/' + accountId + '/customers/' + customerId + '/filter', filter, {headers: $eaBackendBase.getDefaultHeaders(dataToken)}));\n };\n\n /*\n * Debug API\n */\n self.dataMonDebugCsp = function(clientId, clientSecret, domain, optionalUserCredentials) {\n\n var headers = {};\n\n if (optionalUserCredentials) {\n var auth = $base64.encode(optionalUserCredentials.Username + \":\" + optionalUserCredentials.Password);\n headers = {\"Authorization\": \"Basic \" + auth};\n }\n\n return $eaBackendBase.extractDataFromResponse($http.get(monUri+ '/debug/csp?clientId=' + clientId + '&clientSecret=' + clientSecret + '&domain=' + domain, {headers: headers}));\n };\n\n /*\n * Service Charts API\n */\n self.dataGetServiceCharts = function() {\n return $q.when([\n {\n position: 1,\n lastPosition: 3,\n name: 'Azure Virtual Machines'\n },\n {\n position: 2,\n lastPosition: 2,\n name: 'Azure Virtual Machines'\n },\n {\n position: 3,\n lastPosition: 1,\n name: 'Azure Virtual Machines'\n },\n {\n position: 4,\n lastPosition: 4,\n name: 'Azure Virtual Machines'\n },\n {\n position: 5,\n lastPosition: 6,\n name: 'Azure Virtual Machines'\n },\n {\n position: 6,\n lastPosition: 7,\n name: 'Azure Virtual Machines'\n },\n {\n position: 7,\n lastPosition: 5,\n name: 'Azure Virtual Machines'\n },\n {\n position: 8,\n lastPosition: 6,\n name: 'Azure Virtual Machines'\n },\n {\n position: 9,\n lastPosition: 9,\n name: 'Azure Virtual Machines'\n },\n {\n position: 10,\n lastPosition: 10,\n name: 'Azure Virtual Machines'\n }\n ]);\n };\n });\n","'use strict';\n\n/*\n * This service implements the API to the session behaviour of the application. In controllers\n * the application should use lazy() to ensure a session is available. There are some event handlers\n *\n * onUpdate -> Is triggered when the session object is updated or created. All session plugins should register for this\n * onRegister -> Is triggered when the user was registered newly in the system.\n */\nangular.module('azureCostsFeApp').service('$eaSession2', function($location, $q, $eaBackend, $eaBackendDataModeSelector, $eaConfig, jwtHelper, $window, $state, $eaBucket, rfc4122) {\n\n function SessionModel(sessionData) {\n var selfSessionModel = this;\n\n selfSessionModel.UserId = sessionData.UserId;\n selfSessionModel.FirstName = sessionData.FirstName;\n selfSessionModel.LastName = sessionData.LastName;\n selfSessionModel.IdentityProvider = sessionData.IdentityProvider;\n selfSessionModel.IdentityProviderId = sessionData.IdentityProviderId;\n selfSessionModel.IdentityProviderToken = sessionData.IdentityProviderToken;\n selfSessionModel.Contact = sessionData.Contact;\n selfSessionModel.Avatar = sessionData.Avatar;\n selfSessionModel.DataToken = sessionData.DataToken;\n selfSessionModel.LoginCount = sessionData.LoginCount;\n selfSessionModel.Surveys = sessionData.Surveys;\n selfSessionModel.ActAs = sessionData.ActAs ? sessionData.ActAs : false;\n\n selfSessionModel.isActAsSession = function() {\n return selfSessionModel.ActAs;\n };\n\n selfSessionModel.getServiceProviderId = function() {\n if (!selfSessionModel.DataToken) {\n return 'default';\n }\n\n try {\n var decodedToken = jwtHelper.decodeToken(selfSessionModel.DataToken);\n if (!decodedToken ||!decodedToken.svp) {\n return 'default';\n } else {\n return decodedToken.svp;\n }\n } catch(error) {\n return 'default';\n }\n };\n\n selfSessionModel.hasCap = function(cap) {\n if (!selfSessionModel.DataToken) {\n return false;\n }\n\n try {\n var decodedToken = jwtHelper.decodeToken(selfSessionModel.DataToken);\n\n // no caps return false\n if (!decodedToken.cap ||decodedToken.cap.length == 0) {\n return false;\n }\n\n // check\n return (decodedToken.cap.indexOf(cap) !== -1);\n } catch(error) {\n return false;\n }\n };\n\n selfSessionModel.hasClaim = function(claim) {\n return selfSessionModel.hasClaims([claim]);\n };\n\n selfSessionModel.hasClaims = function(claims) {\n if (!selfSessionModel.DataToken) {\n return false;\n }\n\n if (!claims || claims.length === 0) {\n return true;\n }\n\n try {\n var decodedToken = jwtHelper.decodeToken(selfSessionModel.DataToken);\n\n // currently a permission means the attribute is true in the token\n var claimMissing = false;\n claims.every(function(claim) {\n if (!decodedToken[claim]) {\n claimMissing = true;\n return false;\n } else {\n return true;\n }\n });\n\n return !claimMissing;\n } catch(error) {\n return false;\n }\n };\n\n selfSessionModel.isCapabilityActivated = function(cap) {\n var decodedToken = jwtHelper.decodeToken(selfSessionModel.DataToken);\n if (!decodedToken || !decodedToken.cap || decodedToken.cap.length === 0) {\n return false;\n } else {\n return (decodedToken.cap.indexOf(cap) !== -1);\n }\n };\n }\n\n var self = this;\n var activeSession = null;\n var actAsModeEanbled = false;\n\n var eventCallBacks = {\n onUpdate: [],\n onRegister: [],\n onDestroying: [],\n onDestroyed: []\n };\n\n self.onUpdate = function(onUpdateCallback) {\n eventCallBacks.onUpdate.push(onUpdateCallback);\n };\n\n self.onRegister = function(onUpdateCallback) {\n eventCallBacks.onRegister.push(onUpdateCallback);\n };\n\n self.onDestroying = function(onUpdateCallback) {\n eventCallBacks.onDestroying.push(onUpdateCallback);\n };\n\n self.onDestroyed = function(onUpdateCallback) {\n eventCallBacks.onDestroyed.push(onUpdateCallback);\n };\n\n function triggerEvent(eventName, param) {\n var eventCallbackCollection = eventCallBacks[eventName];\n if (eventCallbackCollection) {\n eventCallbackCollection.forEach(function(evcb) {\n evcb(param);\n });\n }\n }\n\n self.lazy = function(optionalRequiredPermissions) {\n var defer = $q.defer();\n\n // try to load the session from cache, if so we have a page reload and we need to send the update\n // event as well\n var cachedSessionModel = JSON.parse(sessionStorage.getItem('com.azure-costs.session'));\n if (!activeSession && cachedSessionModel) {\n activeSession = new SessionModel(cachedSessionModel);\n triggerEvent('onUpdate', activeSession);\n }\n\n // check if we have an active session\n if (!activeSession) {\n\n // check if we have a prefix\n var bucketLookupPromise = $q.when(undefined);\n if ($eaBucket.hashHostPrefix()) {\n\n // try to resolve the bucket prefix into a team id\n bucketLookupPromise = $eaBucket.getTeamIdFromHostSegment().then(function (teamId) {\n\n // try to load the auth information\n return $eaBackend.dataGetAuthInformation(teamId).then(function (authInfo) {\n\n // check if we need to redirect to AAD automatically, if not\n // we just render the idps\n var authProvider;\n if (authInfo.aad && authInfo.aad.DefaultIdentityProvider) {\n authProvider = 'aad';\n }\n\n // done\n return $q.when(authProvider);\n });\n }).catch(function() {\n return $q.when(undefined);\n });\n }\n\n // wait for the bucket lookup\n bucketLookupPromise.then(function(bucketIdp) {\n\n // ok we need to create one which means a redirect to our Idp integration\n console.log('BucketIdp:' + bucketIdp);\n\n // build the oauth2 url\n var oAuth2State = encodeURIComponent($location.$$absUrl);\n var oAuth2Callback = encodeURIComponent($eaConfig.stsRedirectUri);\n\n // handle idp parameter to force it\n var idp = $location.search().idp;\n if (idp === 'offline') {\n // go to our callback directly\n /*jshint camelcase: false */\n return $state.go('ssoCallback', {access_token: 'offline', state: oAuth2State});\n } else {\n // attach an idp parameter to our sts if required\n var idpState = '';\n if (idp !== undefined && idp !== null) {\n idpState = '&idp=' + idp;\n } else if (bucketIdp !== undefined && bucketIdp !== null) {\n idpState = '&idp=' + bucketIdp;\n }\n\n // visit our sts\n $window.location = ($eaConfig.stsProtocol ? $eaConfig.stsProtocol : 'https') + '://' + $eaConfig.stsHost + '/sts/issue/oauth/authorize?client_id=' + $eaConfig.stsClientId + '&response_type=token&redirect_uri=' + oAuth2Callback + '&state=' + oAuth2State + idpState;\n }\n });\n } else {\n\n // check if we have specific permissions\n if (activeSession.hasClaims(optionalRequiredPermissions)) {\n // return the session which was generated from the idp integration\n defer.resolve(activeSession);\n } else {\n defer.reject(new Error('Permission denied'));\n }\n }\n\n return defer.promise;\n };\n\n self.destroySession = function() {\n\n // inform the plugins\n triggerEvent('onDestroying', activeSession);\n\n // destroy the session\n activeSession = null;\n\n // destroy the cache\n sessionStorage.removeItem('com.azure-costs.session');\n\n // inform the plugins\n triggerEvent('onDestroyed', activeSession);\n };\n\n /*\n * Generates just a session model without interactiving with our backend\n */\n self.generateSession = function(id, firstName, lastName, contact, avatar, loginCount, surveyAtLogin, idpType, idpId, idpToken, dataToken, optionalRegisterHint, optionalActAsMode) {\n\n // build the session object\n activeSession = new SessionModel({\n UserId: id,\n FirstName: firstName, LastName: lastName, Contact: contact, Avatar: avatar,\n LoginCount: loginCount,\n IdentityProvider: idpType, IdentityProviderId: idpId, IdentityProviderToken: idpToken,\n DataToken: dataToken,\n Surveys: { Influencer: surveyAtLogin},\n ActAs: optionalActAsMode});\n\n // execute all session plugins by triggering the update event\n if (optionalRegisterHint) {\n triggerEvent('onRegister', activeSession);\n } else {\n triggerEvent('onUpdate', activeSession);\n }\n\n // cache the active session\n sessionStorage.setItem('com.azure-costs.session', JSON.stringify(activeSession));\n\n // return the result\n return $q.when(activeSession);\n };\n\n self.getSession = function() {\n return activeSession;\n };\n\n self.signOut = function(idp) {\n\n // get the redirect uri\n var redirectUri = $state.href('public.signin', {}, {absolute: true});\n var idpParam = '';\n if (idp) {\n redirectUri = $state.href('public.signin', {idp: idp}, {absolute: true});\n idpParam = '&idp=' + idp;\n }\n\n // call the logout endpoint\n $window.location = ($eaConfig.stsProtocol ? $eaConfig.stsProtocol : 'https') + '://' + $eaConfig.stsHost + '/sts/logout?redirect=' + encodeURIComponent(redirectUri) + idpParam;\n };\n\n self.leaveActAs = function() {\n\n // set as the current one\n sessionStorage.setItem('com.azure-costs.session', null);\n\n // close the browser window\n $window.close();\n };\n\n self.updateTokenFromSTS = function(currentSessionService, options) {\n\n // get the current session\n var currentSession = self.getSession();\n\n // update the token\n return $eaBackend.stsUpdateToken(options, currentSession.DataToken).then(function(updatedToken) {\n\n // update the token\n /*jshint camelcase: false */\n currentSession.DataToken = updatedToken.access_token;\n /*jshint camelcase: false */\n currentSessionService.DataToken = updatedToken.access_token;\n\n // cache the active session\n sessionStorage.setItem('com.azure-costs.session', JSON.stringify(currentSession));\n\n // done\n return $q.when(currentSession);\n });\n };\n\n self.visitProfileInSTS = function(newTab) {\n var target = ($eaConfig.stsProtocol ? $eaConfig.stsProtocol : 'https') + '://' + $eaConfig.stsHost + '/sts/account';;\n\n if (newTab) {\n $window.open(target, '_blank');\n } else {\n $window.location = target;\n }\n };\n\n self.openActAsSession = function(actAsUserId, serviceProviderId) {\n\n // define the protocol\n var hostProtocol = $eaConfig.stsProtocol ? $eaConfig.stsProtocol : 'https';\n if ($eaConfig.feHost === 'localhost')\n hostProtocol = 'http';\n\n // build the oauth2 url\n var oAuth2State = encodeURIComponent(($eaConfig.feProtocol ? $eaConfig.feProtocol : 'https') + '://actas-' + sha1(actAsUserId + '.' + rfc4122.v4()) + '.' + $eaConfig.feHost + ($eaConfig.fePort ? ':' + $eaConfig.fePort : '') + '/app');\n var oAuth2Callback = encodeURIComponent($eaConfig.stsRedirectUri);\n var location =\n hostProtocol + '://' +\n $eaConfig.stsHost +\n '/sts/issue/oauth/authorize?client_id=' + $eaConfig.stsClientId +\n '&response_type=token' +\n '&scope=actas;' + actAsUserId + ';sp;' + serviceProviderId +\n '&redirect_uri=' + oAuth2Callback +\n '&state=' + oAuth2State;\n\n // open the url\n $window.open(location, actAsUserId);\n };\n\n self.setActAsMode = function() {\n actAsModeEanbled = true;\n }\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').service('$eaConfig', function($location, envDeployment, $q) {\n\n var productionApiHost = 'costs-api-v3.azurewebsites.net';\n var productionApiHostV2 = 'prod-ac-v2-web.azurewebsites.net';\n var productionApiAdminHostV2 = 'prod-ac-v2-web-admin.azurewebsites.net';\n var productionApiBoostHosts = undefined;\n var productionTitle = 'azure costs';\n\n var productionConfiguration = {\n\n // Host of the backend (V2)\n apiHost: productionApiHost,\n apiHostV2: productionApiHostV2,\n apiHostAdminV2: productionApiAdminHostV2,\n apiBoostHosts: productionApiBoostHosts,\n\n // Frontend host\n feHost: 'azure-costs.com',\n\n // AAD Link Config\n aadHost: 'azure-costs.com',\n\n // Sts Config\n stsHost: 'azure-costs.com',\n stsClientId: 'costsfe',\n stsRedirectUri: 'https://azure-costs.com/app/sso/callback',\n\n // Authorization Configuration\n authClientId: '0000000044136B0F',\n authRedirectUri: 'https://azure-costs.com/app/auth.html',\n\n // define environment typ\n envType: 'production',\n\n // define the cdnhost\n cdn: 'cdnHostProd',\n\n // define features\n features: {\n buckets: true,\n csp: true,\n fastspring: true,\n billing: true,\n support: true\n },\n\n // ui\n appTitle: productionTitle\n };\n\n var productionLocalConfiguration = {\n\n // Host of the backend (V2)\n apiHost: productionApiHost,\n apiHostV2: productionApiHostV2,\n apiHostAdminV2: productionApiAdminHostV2,\n\n // Frontend host\n feHost: 'localhost:9000',\n\n // AAD Link Config\n aadHost: 'azure-costs.com',\n\n // Sts Config\n stsHost: 'azure-costs.com',\n stsClientId: 'costsfedev',\n stsRedirectUri: 'http://localhost:9000/app/sso/callback',\n\n // Authorization Configuration\n authClientId: '0000000044136B0F',\n authRedirectUri: 'https://azure-costs.com/app/auth.html',\n\n // define environment typ\n envType: 'local',\n\n // define the cdnhost\n cdn: undefined,\n\n // define features\n features: {\n buckets: true,\n csp: true,\n fastspring: true,\n billing: true,\n support: true\n },\n\n // ui\n appTitle: productionTitle\n };\n\n var testConfiguration = {\n\n // Host of the backend\n apiHost: 'costs-api-test-v2.azurewebsites.net',\n apiHostV2: 'dev-ac-v2-web.azurewebsites.net',\n apiHostAdminV2: 'dev-ac-v2-web-admin.azurewebsites.net',\n\n // Frontend host\n feHost: 'costs-test.azurewebsites.net',\n\n // AAD Link Config\n aadHost: 'costs-test.azurewebsites.net',\n\n // Sts Config\n stsHost: 'costs-test.azurewebsites.net',\n stsClientId: 'costsfetest',\n stsRedirectUri: 'https://costs-test.azurewebsites.net/app/sso/callback',\n\n // define environment typ\n envType: 'test',\n\n // define the cdnhost\n cdn: 'cdnHostDev',\n\n // define features\n features: {\n buckets: true,\n csp: true,\n fastspring: true,\n billing: true,\n support: true\n },\n\n // ui\n appTitle: 'cloud costs'\n };\n\n var devConfiguration = {\n\n // Host of the backend\n apiHost: 'costs-api-test-v2.azurewebsites.net',\n apiHostV2: 'dev-ac-v2-web.azurewebsites.net',\n apiHostAdminV2: 'dev-ac-v2-web-admin.azurewebsites.net',\n\n // Frontend host\n\n feHost: $location.$$host,\n feProtocol: 'http',\n fePort: 9000,\n\n // AAD Link Config\n aadHost: 'costs-test.azurewebsites.net',\n\n // Sts Config\n stsHost: 'costs-test.azurewebsites.net',\n stsClientId: 'costsfedev',\n stsRedirectUri: 'http://' + $location.$$host + ':9000/app/sso/callback',\n\n // define environment typ\n envType: 'local',\n\n // define the cdnhost\n cdn: undefined,\n\n // define features\n features: {\n buckets: true,\n csp: true,\n fastspring: true,\n billing: true,\n support: true\n },\n\n // ui\n appTitle: productionTitle\n};\n\nvar serviceProviderGermanCloudConfiguration = {\n\n // Host of the backend (V2)\n apiHost: productionApiHost,\n apiHostV2: productionApiHostV2,\n apiHostAdminV2: productionApiAdminHostV2,\n apiBoostHosts: productionApiBoostHosts,\n\n // Frontend host\n feHost: 'azure-costs.de',\n\n // AAD Link Config\n aadHost: 'azure-costs.de',\n\n // Sts Config\n stsHost: 'azure-costs.de',\n stsClientId: '5B68BA87-175C-4E54-B228-A8F844823BBF',\n stsRedirectUri: 'https://azure-costs.de/app/sso/callback',\n\n // define environment typ\n envType: 'production',\n\n // define the cdnhost\n cdn: 'cdnHostProd',\n\n // define features\n features: {\n buckets: false,\n csp: true,\n fastspring: true,\n billing: true,\n support: true\n },\n\n // svp information\n svp: {\n contact: 'helper@azure-costs.com'\n },\n\n // ui\n appTitle: productionTitle\n };\n\n var serviceProviderMatrixConfiguration = {\n\n // Host of the backend (V2)\n apiHost: productionApiHost,\n apiHostV2: productionApiHostV2,\n apiHostAdminV2: productionApiAdminHostV2,\n apiBoostHosts: productionApiBoostHosts,\n\n // Frontend host\n feHost: 'cloudcosts.matrix42.com',\n\n // AAD Link Config\n aadHost: 'cloudcosts.matrix42.com',\n\n // Sts Config\n stsHost: 'cloudcosts.matrix42.com',\n stsClientId: '6ED1E682-4324-40A7-92B4-6EA244440884',\n stsRedirectUri: 'https://cloudcosts.matrix42.com/app/sso/callback',\n\n // define environment typ\n envType: 'production',\n\n // define the cdnhost\n cdn: 'cdnHostProd',\n\n // define features\n features: {\n buckets: false,\n csp: true,\n fastspring: false,\n billing: false,\n support: true\n },\n\n // svp information\n svp: {\n contact: 'support@matrix42.com'\n },\n\n // ui\n appTitle: 'Matrix42 Cloud Costs'\n };\n\n var serviceProviderCentralityConfiguration = {\n\n // Host of the backend (V2)\n apiHost: productionApiHost,\n apiHostV2: productionApiHostV2,\n apiHostAdminV2: productionApiAdminHostV2,\n apiBoostHosts: productionApiBoostHosts,\n\n // Frontend host\n feHost: 'customer.centrality.com',\n\n // AAD Link Config\n aadHost: 'customer.centrality.com',\n\n // Sts Config\n stsHost: 'customer.centrality.com',\n stsClientId: '62FDDE45-2A58-4F96-85C6-E007300BE1FC',\n stsRedirectUri: 'https://customer.centrality.com/app/sso/callback',\n\n // define environment typ\n envType: 'production',\n\n // define the cdnhost\n cdn: 'cdnHostProd',\n\n // define features\n features: {\n buckets: false,\n csp: true,\n fastspring: false,\n billing: false,\n support: true\n },\n\n // svp information\n svp: {\n contact: 'info@centrality.com'\n },\n\n // ui\n appTitle: productionTitle\n };\n\n // define the domain to serviceprovider map\n var svpMap = { \n 'azure-costs.de': serviceProviderGermanCloudConfiguration,\n 'cloudcosts.matrix42.com': serviceProviderMatrixConfiguration,\n 'customer.centrality.com': serviceProviderCentralityConfiguration\n };\n\n function isLocalHostSetup() {\n var currentHost = $location.host();\n return (currentHost === 'localhost' || currentHost === '127.0.0.1' || currentHost === '0.0.0.0');\n }\n\n function isDevSetup() {\n var currentHost = $location.host();\n return (currentHost.indexOf('costs-test.azurewebsites.net') !== -1) || (currentHost.indexOf('costs-test-fe.azurewebsites.net') !== -1);\n }\n\n // use prod as default\n var activeConfiguration = productionConfiguration;\n\n // check if we have different config\n if (isLocalHostSetup()) {\n activeConfiguration = devConfiguration;\n } else if (isDevSetup()) {\n activeConfiguration = testConfiguration;\n }\n\n // lookup the service provider map\n var activeSvpConfiguration = svpMap[$location.host()];\n if (activeSvpConfiguration) {\n activeConfiguration = activeSvpConfiguration;\n }\n\n // Set this for production only testing\n // activeConfiguration = productionLocalConfiguration;\n\n // inject the application specific config\n activeConfiguration.deployment = envDeployment;\n\n // generate the cdn entrypoint\n activeConfiguration.cdnEntrypoint = undefined;\n if (activeConfiguration.cdn) {\n activeConfiguration.cdnEntrypoint = 'https://' + activeConfiguration.deployment[activeConfiguration.cdn];\n }\n\n // generate the data path\n activeConfiguration.dataPath = '/app/data';\n if (activeConfiguration.envType !== 'local') {\n activeConfiguration.dataPath += '-' + activeConfiguration.deployment.deploymentUUID;\n }\n\n // ensure we have at least one boost host\n if (!activeConfiguration.apiBoostHosts || activeConfiguration.apiBoostHosts.length === 0) {\n activeConfiguration.apiBoostHosts = [activeConfiguration.apiHost];\n }\n\n // inject some helper function\n activeConfiguration.verifyFeature = function(feature) {\n if (activeConfiguration.features[feature] === true) {\n return $q.when(true);\n } else {\n return $q.reject(new Error(feature + ' not enabled'));\n }\n };\n\n // allow to enable and disable ri functionaliy\n activeConfiguration.riEnabled = false;\n\n return activeConfiguration;\n\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').service('$eaTeamManagement', ['$q', '$eaBackend', function($q, $eaBackend) {\n var self = this;\n\n // Check if we have at least one contract which is part of a\n // team. This is indicated when the contract list contains one contract\n // which is part ofa team different to personal\n self.isPartOfAtLeastOneTime = function(profile) {\n return (self.getTeams(profile).length > 0);\n };\n\n self.isAdminInAtLeastOneTime = function(profile) {\n return (profile.Teams.filter(function(team) {\n return team.Role === 'admin' && team.Id !== 'personal';\n }).length > 0);\n };\n\n self.isAdminInOfTeam = function(profile, teamId) {\n return (profile.Teams.filter(function(team) {\n return team.Role === 'admin' && team.Id !== 'personal' && team.Id === teamId;\n }).length > 0);\n };\n\n /*\n * Gets the teams execept personal\n */\n self.getTeams = function(profile) {\n return profile.Teams.filter(function(team) {\n return (team.Id !== 'personal');\n });\n };\n\n /*\n * Returns the teams filtered by a given role\n */\n self.getTeamsByRole = function(profile, role) {\n return self.getTeams(profile).filter(function(team) {\n return (team.Role === role || team.Role === 'admin');\n });\n };\n\n self.getTeamProfilesByRole = function(profile, role, members, dataToken) {\n\n var teams = self.getTeamsByRole(profile, role);\n\n var teamProfilePromisses = [];\n teams.forEach(function(team) {\n teamProfilePromisses.push($eaBackend.dataGetTeamProfile(team.Id, members, dataToken).then(function(teamProfile) {\n // inject the role\n teamProfile.Role = team.Role;\n return teamProfile;\n }).catch(function(/* e */) {\n return null;\n }));\n });\n\n return $q.all(teamProfilePromisses).then(function(teams) {\n return teams.filter(function(team) {\n return (team !== null && team !== undefined);\n });\n });\n };\n\n\n self.getTeamProfileById = function(teamId, members, dataToken) {\n return $eaBackend.dataGetTeamProfile(teamId, members, dataToken);\n }\n\n}]);\n","'use strict';\n\nangular.module('azureCostsFeApp').service('$eaTemplateCachingStrategy', ['$eaConfig', function($eaConfig) {\n var self = this;\n\n self.processRequest = function(requestConfig) {\n\n // patch the uri\n if (requestConfig.url.indexOf('?') === -1) {\n requestConfig.url = requestConfig.url + '?v=' + $eaConfig.deployment.deploymentUUID;\n } else {\n requestConfig.url = requestConfig.url + '&v=' + $eaConfig.deployment.deploymentUUID;\n }\n\n // done\n return requestConfig;\n };\n}]);\n","'use strict';\n\nangular.module('azureCostsFeApp').service('$eaBranding', function($q, $http, $rootScope, $eaBackend, $eaConfig, $location, $eaBucket) {\n var self = this;\n\n var defaultColors = {\n generalBackgroundColor: '#fff',\n headerBackgroundColor: 'rgba(255,255,255,.97)',\n headerFontColor: '##8f8f8f',\n headerFontColorHover: '#1dabec',\n bodyLineColor: '#dddddd',\n buttonDefaultColor: '#1dabec',\n buttonDefaultHoverColor: '#444',\n buttonPrimaryColor: '#89c402',\n buttonPrimaryHoverColor: '#333',\n reportItemColor: '#777',\n reportItemColorHover: '#1dabec'\n };\n\n var defaultCustomCss = '';\n\n var defaultCompanyInformation = {\n logo: null,\n title: $eaConfig.appTitle || 'azure costs'\n };\n\n self.currentColors = defaultColors;\n self.currentCompanyInformation = defaultCompanyInformation;\n self.currentCustomCss = defaultCustomCss;\n\n self.loadBrandingFromHostSegment = function() {\n\n if ($eaBucket.hashHostPrefix()) {\n $eaBucket.getTeamIdFromHostSegment().then(function (teamId) {\n return self.loadBranding(teamId);\n });\n } else {\n return $q.when();\n }\n };\n\n self.loadBranding = function(teamid) {\n var defer = $q.defer();\n\n $eaBackend.dataGetBranding(teamid).then(function(brandingSettings) {\n\n // set the current values\n self.currentCompanyInformation = brandingSettings.company ? brandingSettings.company : defaultCompanyInformation;\n self.currentColors = brandingSettings.colors;\n self.currentCustomCss = brandingSettings.css;\n\n // notify the change\n $rootScope.$emit('branding.updated');\n\n // done\n defer.resolve();\n }).catch(function() {\n defer.resolve();\n });\n\n return defer.promise;\n };\n\n self.onUpdate = function(callback) {\n $rootScope.$on('branding.updated', callback);\n };\n\n self.setColors = function(colors) {\n self.currentColors = colors;\n $rootScope.$emit('branding.updated');\n };\n\n self.setCustomCss = function(css) {\n self.currentCustomCss = css;\n $rootScope.$emit('branding.updated');\n };\n\n self.setCompany = function(company) {\n self.currentCompanyInformation = company;\n $rootScope.$emit('branding.updated');\n };\n\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').service('$eaBilling', [ '$q', '$eaBackend', function($q, $eaBackend) {\n var self = this;\n\n var planValueOrder = {\n 'basic': 100,\n 'startup': 200,\n 'professional': 300,\n 'enterprise': 400,\n 'csp': 500\n };\n\n var planDisplayText = {\n 'csp': 'Cloud Solutions Provider'\n }\n\n\n // Loads the billing information\n self.loadBillingInformation = function(session) {\n return $eaBackend.dataGetBillingInformation(session.DataToken);\n };\n\n // Checks if we are in trial mode or not\n self.isInTrial = function(billingOrTeamInformation) {\n\n // check if we have a trial ends date\n if (!billingOrTeamInformation.TrialEnds || billingOrTeamInformation.TrialEnds === '') {\n return false;\n }\n\n // compare the trialends date with the current date\n var trialEndsDate = new Date(billingOrTeamInformation.TrialEnds);\n var now = new Date();\n return (trialEndsDate > now);\n };\n\n // checks if we have a value in the TrialsEnds property which indicates that\n // the user ever started a trial\n // ### TODO Change This to an other property###\n self.hasEverStartedTrial = function(billingOrTeamInformation) {\n return (billingOrTeamInformation.TrialEnds !== undefined && billingOrTeamInformation.TrialEnds !== null);\n };\n\n // calculates the actual retention period for the billing settings\n self.calculateRetentionPeriod = function(billingOrTeamInformation) {\n if (billingOrTeamInformation.CurrentPlan === 'basic' || self.isInTrial(billingOrTeamInformation)) {\n return 0;\n } else if (billingOrTeamInformation.Period) {\n return billingOrTeamInformation.Period;\n } else {\n return 12;\n }\n };\n\n // calcualtes the current plan price\n self.calculateCurrentPlanPrice = function(billingOrTeamInformation) {\n var billing = (typeof billingOrTeamInformation === 'string') ? { CurrentPlan: billingOrTeamInformation } : billingOrTeamInformation;\n\n if (self.isInTrial(billing)) {\n return 0.00;\n } else if (billing.CurrentPlan === 'basic') {\n return 0.00;\n } else if (billing.CurrentPlan === 'startup') {\n return 29.00;\n } else if (billing.CurrentPlan === 'professional') {\n return 79.00;\n } else {\n return 199.00;\n }\n };\n\n self.isPlanHigherThanPlan = function(planA, planB) {\n var valuePlanA = planValueOrder[planA] || 0;\n var valuePlanB = planValueOrder[planB] || 0;\n\n return valuePlanA > valuePlanB;\n };\n\n self.hasRequiredPlan = function(currentPlan, requiredPlan) {\n if (currentPlan === requiredPlan) {\n return true;\n } else {\n return self.isPlanHigherThanPlan(currentPlan, requiredPlan);\n }\n };\n\n self.getDisplayTextForPlan = function(plan) {\n if (planDisplayText[plan]) {\n return planDisplayText[plan];\n } else {\n return plan.charAt(0).toUpperCase() + plan.slice(1);\n }\n };\n\n // allows to purchase a subscription\n self.purchase = function(plan, dataToken) {\n return $eaBackend.dataPurchase(plan, dataToken);\n };\n\n // checks if the calling user as the account owner for this team\n self.isAccountOwner = function(userId, teamFromProfile) {\n return (teamFromProfile.Id === 'personal' || userId === teamFromProfile.AccountOwner);\n };\n}]);\n","'use strict';\n\nangular.module('azureCostsFeApp').service('$eaLiveId', ['$http', function($http) {\n var self = this;\n\n self.loadProfile = function(accesstoken) {\n return $http({\n method: 'GET',\n url: 'https://apis.live.net/v5.0/me?access_token=' + accesstoken,\n transformRequest: [function(data, headersGetter){\n var headers = headersGetter();\n delete headers.Authorization;\n delete headers.authorization;\n\n // We need to return the data for the next in\n // transformation chain\n return data;\n }].concat($http.defaults.transformRequest)}).then(function(profile) {\n return profile.data;\n });\n };\n\n}]);\n","'use strict';\n\n/*\n * This service gives access to the users full profile which contains\n * the different teams a user is part of or the different contracts a user\n * can use.\n */\nangular.module('azureCostsFeApp').service('$eaUserProfile', ['$eaBackend', '$q', '$rootScope', function($eaBackend, $q, $rootScope) {\n var self = this;\n var cachedProfile = null;\n\n /* Invalidate the cache when ever we naviagte away */\n $rootScope.$on('$locationChangeStart', function() {\n cachedProfile = null;\n });\n\n $rootScope.$on('$stateChangeStart', function() {\n cachedProfile = null;\n });\n\n self.invalidate = function() {\n cachedProfile = null;\n };\n\n self.load = function(dataToken, force) {\n\n if (cachedProfile && !force) {\n return $q.when(cachedProfile);\n } else {\n return $eaBackend.dataGetProfile(dataToken).then(function(profile) {\n\n // duplicate the profile\n var duplicatedProfile = JSON.parse(JSON.stringify(profile));\n\n // use only values which are important for the hash\n var finalCacheProfile = {};\n finalCacheProfile.Capabilities = duplicatedProfile.Capabilities;\n finalCacheProfile.Teams = duplicatedProfile.Teams;\n finalCacheProfile.UserId = duplicatedProfile.UserId;\n\n // generate a profile hash\n var shaObj = new jsSHA('SHA-1', 'TEXT');\n shaObj.update(JSON.stringify(finalCacheProfile));\n var hash = shaObj.getHash('HEX');\n\n // assign to the profile\n profile.cacheHash = hash;\n\n cachedProfile = profile;\n return profile;\n });\n }\n };\n\n function ContractCollection(dataElements) {\n var selfContractCollecton = this;\n var data = dataElements ? dataElements : [];\n\n selfContractCollecton.push = function(contract) {\n data.push(contract);\n };\n\n selfContractCollecton.getAt = function(index) {\n return data[index];\n };\n\n selfContractCollecton.__defineGetter__('length', function() {\n return data.length;\n });\n\n selfContractCollecton.first = function() {\n if (selfContractCollecton.length === 0) {\n return null;\n } else {\n return selfContractCollecton.getAt(0);\n }\n };\n\n selfContractCollecton.find = function(teamid, enrollment) {\n return new ContractCollection(data.filter(function(element) {\n return ((element.Enrollment === enrollment) && (element.Team === teamid));\n }));\n };\n\n selfContractCollecton.forEach = function(cb) {\n data.forEach(cb);\n };\n\n selfContractCollecton.toArray = function() {\n return data.map(function(m) { return m; });\n }\n }\n\n self.getContracts = function(profile, filterByTeam) {\n var contracts = new ContractCollection();\n\n profile.Teams.forEach(function(team) {\n\n /* Filter by Team */\n if (filterByTeam && filterByTeam !== team.Id) { return; }\n\n /* Use the subscriptions if posible */\n if ( team.Subscriptions && Object.keys(team.Subscriptions).length > 0 && team.Subscriptions['*'] === undefined) {\n\n // index the contract details by id\n var contractIndex = team.ContractsEx ? team.ContractsEx.buildIndex('Id') : {};\n\n // do it\n Object.keys(team.Subscriptions).forEach(function (enrollmentNumber) {\n if (team.Subscriptions[enrollmentNumber].length > 0) {\n contracts.push({Team: team.Id, Enrollment: enrollmentNumber, Name: contractIndex[enrollmentNumber].Name, Role: team.Role, Definition: contractIndex[enrollmentNumber].Definition, Periods: contractIndex[enrollmentNumber].Periods || 12, ResellerApiVersion: contractIndex[enrollmentNumber].ResellerApiVersion || 'v1' });\n }\n });\n /* otherwise it looks like personal */\n } else {\n if (!team.ContractsEx) { team.ContractsEx = []; }\n team.ContractsEx.forEach(function(contract) {\n contracts.push({Team: team.Id, Enrollment: contract.Id, Name: contract.Name, Role: team.Role, Definition: contract.Definition, Periods: contract.Periods || 12, ResellerApiVersion: contract.ResellerApiVersion || 'v1' });\n });\n }\n });\n\n return contracts;\n };\n\n self.getTeam = function(profile, teamId) {\n var result = profile.Teams.filter(function(team) {\n return (team.Id === teamId);\n });\n\n if (result.length > 0) {\n return result[0];\n } else {\n return null;\n }\n };\n\n}]);\n","'use strict';\n\nangular.module('azureCostsFeApp').service('$eaBucket', [ '$q', '$eaBackend', '$eaConfig', '$location', function($q, $eaBackend, $eaConfig, $location) {\n var self = this;\n\n function resolveHostSegmentToTeamId() {\n // load the branding\n var hostSegment = $location.host().split('.')[0];\n\n if (hostSegment.split('-').length === 5) {\n return $q.when(hostSegment);\n } else {\n // resolve the host segment into team id\n return $eaBackend.dataGetBucket(hostSegment).then(function(bucketModel) {\n return bucketModel.TeamIdentifier;\n });\n }\n }\n\n self.getTeamIdFromHostSegment = function() {\n\n // check if we have a host prefix\n if ($location.host().indexOf($eaConfig.feHost)) {\n return resolveHostSegmentToTeamId();\n } else {\n return $q.when();\n }\n };\n\n self.hashHostPrefix = function() {\n return ($location.host().indexOf($eaConfig.feHost) > 0);\n };\n\n}]);\n","'use strict';\n\nangular.module('azureCostsFeApp').service('$eaLocalSettings', function() {\n var self = this;\n\n var settingsStorageVersion = 'v1';\n var defaultValues = {};\n\n function defineSettingsValueAccessor(valueName, defaultValue) {\n\n // register the default value\n defaultValues[valueName] = defaultValue;\n\n // define the setter\n self.__defineSetter__(valueName, function(value) {\n localStorage.setItem('com.azure-costs.settings.' + settingsStorageVersion + '.' + valueName, value);\n });\n\n // define the getter\n self.__defineGetter__(valueName, function() {\n\n var value = localStorage.getItem('com.azure-costs.settings.' + settingsStorageVersion + '.' + valueName);\n if (value) { return value; }\n\n return defaultValues[valueName];\n });\n\n }\n\n // active dashboard\n defineSettingsValueAccessor('activeDashboard', 'default');\n});\n","'use strict';\n\n/*\n * This service is responsible to handle everyhting around our analytics data. This means the service is\n * responsible to load a specific collection from the network or give the collection out from the cache.\n *\n * Normally we load data collections in a specific timeframe which is currently 12 months\n */\nangular.module('azureCostsFeApp').service('$eaDataCoordinator', function($q, $eaDataRawSources, $eaDataSourceManager, rfc4122) {\n var self = this;\n var cache = {};\n var currentCacheHash = '';\n\n // register all global data sources\n $eaDataRawSources.registerDataSources();\n\n // This function returns a promise which will be ready as soon the data for the give collection\n // is in the cache. A collection can also be some virtual thing which will be calculated in a back\n // ground worker. Currently the system supports the following collections\n function queryRawDataFromBackend(teamid, contract, dataToken, className, optionalParams) {\n optionalParams = optionalParams || {};\n\n var useCacheIfPossible = true;\n\n // try to split the classname to get the host\n var classNameValues = className.split('.');\n var hostName = 'global';\n var classNameValue = className;\n if (classNameValues.length >= 2) {\n hostName = classNameValues[0];\n classNameValues.splice(0,1);\n classNameValue = classNameValues.join('.');\n }\n\n // only global namespace is allowed to use caching\n if (hostName !== 'global') { useCacheIfPossible = false; }\n\n // check if we ask for a valid collection\n var loadDataCallback = $eaDataSourceManager.queryDataSource(hostName, classNameValue, optionalParams.collection);\n if (!loadDataCallback) {\n return $q.reject(new Error('Invalid collection ' + optionalParams.collection + ' for datasource ' + hostName + ':' + classNameValue));\n }\n\n // generate the collection cache key\n var cachedCollectionKey = className + ':' + teamid + ':' + contract;\n if (optionalParams && optionalParams.cachedCollectionKey) { cachedCollectionKey = optionalParams.cachedCollectionKey; }\n\n // check if we have the collection in cache\n var cachedCollection = null;\n if (useCacheIfPossible) { cachedCollection = cache[cachedCollectionKey]; }\n\n // check if the cachedCollection is a promise. If so it's currently a network in\n // progress and we just register a then on this\n if (cachedCollection && angular.isFunction(cachedCollection.then)) {\n return cachedCollection;\n // check if we have just data\n } else if (cachedCollection) {\n return $q.when(cachedCollection);\n } else {\n // build a promise\n var defer = $q.defer();\n\n // add the promise to the collection cache\n cache[cachedCollectionKey] = defer.promise;\n\n // load the data\n loadDataCallback(teamid, contract, dataToken, className, currentCacheHash, optionalParams).then(function(data) {\n // add the data to the cache\n cache[cachedCollectionKey] = data;\n\n // done\n defer.resolve(data);\n }).catch(function (error) {\n defer.reject(error);\n });\n\n // return the promise\n return defer.promise;\n }\n }\n\n self.query = function(teamid, contract, dataToken, className, optionalParams) {\n return queryRawDataFromBackend(teamid, contract, dataToken, className, optionalParams);\n };\n\n self.queryData = function(teamid, contract, dataToken, className, optionalParams) {\n return self.query(teamid, contract, dataToken, className, optionalParams).then(function(data) {\n // TODO: apply the filter operation on the data\n\n // return the values\n return $q.when(data);\n });\n };\n\n function selectModels(teamid, contract, className, searchKeys, searchValues) {\n // generate the collection cache key\n var cachedCollectionKey = className + ':' + teamid + ':' + contract;\n\n // load the cached collection\n var models = cache[cachedCollectionKey];\n if (!models || models.length === 0) { return; }\n\n // search and update the model\n return models.filter(function(m) {\n\n // the result\n var result = true;\n\n // check for every key\n searchKeys.forEach(function(k, idx) {\n result = result && (m[k] && (m[k] === searchValues[idx]));\n });\n\n // done\n return result;\n\n });\n }\n\n // Allows to manioulate a property of a specific model in the cache. This will not change\n // anything on the server\n self.updateModels = function(teamid, contract, className, searchKeys, searchValues, propertyKey, propertyValue, propertyOperation) {\n selectModels(teamid, contract, className, searchKeys, searchValues).forEach(function(m) {\n if (m[propertyKey] && Array.isArray(m[propertyKey])) {\n if (propertyOperation === 'remove') {\n var elementIndex = m[propertyKey].indexOf(propertyValue);\n if (elementIndex !== -1) {\n m[propertyKey].splice(elementIndex, 1);\n }\n } if (propertyOperation === 'set') {\n m[propertyKey] = propertyValue;\n } else {\n if (m[propertyKey].indexOf(propertyValue) === -1) {\n m[propertyKey].push(propertyValue);\n }\n }\n } else {\n m[propertyKey] = m[propertyValue];\n }\n });\n };\n\n\n // Allows to remove a list of elements from the cache\n self.removeModels = function(teamid, contract, className, searchKeys, searchValues) {\n\n // generate the collection cache key\n var cachedCollectionKey = className + ':' + teamid + ':' + contract;\n\n // load the cached collection\n var models = cache[cachedCollectionKey];\n if (!models) { return; }\n\n // finde the models\n selectModels(teamid, contract, className, searchKeys, searchValues).forEach(function(m) {\n var idx = models.indexOf(m);\n models.splice(idx, 1);\n });\n };\n\n // Allows to add elemnets to the cache\n self.addModels = function(teamid, contract, className, elementsToAdd) {\n\n // generate the collection cache key\n var cachedCollectionKey = className + ':' + teamid + ':' + contract;\n\n // load the cached collection\n var models = cache[cachedCollectionKey];\n if (!models) { return; }\n\n elementsToAdd.forEach(function(element) {\n models.push(element);\n });\n };\n\n self.storeModel = function(teamid, contract, dataToken, className, modelToStore, optionalParams) {\n\n // try to split the classname to get the host\n var classNameValues = className.split('.');\n var hostName = 'global';\n var classNameValue = className;\n if (classNameValues.length >= 2) {\n hostName = classNameValues[0];\n classNameValues.splice(0,1);\n classNameValue = classNameValues.join('.');\n }\n\n // invalidate cache\n var cachedCollectionKey = className + ':' + teamid + ':' + contract;\n delete cache[cachedCollectionKey];\n\n // check if we ask for a valid collection\n var operationCallback = $eaDataSourceManager.queryInsertOrMergeDataSourceOperation(hostName, classNameValue, optionalParams.collection);\n if (!operationCallback) {\n return $q.reject(new Error('StoreModel: Invalid collection ' + optionalParams.collection + ' for datasource ' + hostName + ':' + classNameValue));\n } else {\n return operationCallback(teamid, contract, dataToken, className, modelToStore, optionalParams);\n }\n };\n\n self.deleteModel = function(teamid, contract, dataToken, className, modelToDelete, optionalParams) {\n\n // try to split the classname to get the host\n var classNameValues = className.split('.');\n var hostName = 'global';\n var classNameValue = className;\n if (classNameValues.length >= 2) {\n hostName = classNameValues[0];\n classNameValues.splice(0,1);\n classNameValue = classNameValues.join('.');\n }\n\n // invalidate cache\n var cachedCollectionKey = className + ':' + teamid + ':' + contract;\n delete cache[cachedCollectionKey];\n\n // check if we ask for a valid collection\n var operationCallback = $eaDataSourceManager.queryDeleteDataSourceOperation(hostName, classNameValue, optionalParams.collection);\n if (!operationCallback) {\n return $q.reject(new Error('DeleteModel: Invalid collection ' + optionalParams.collection + ' for datasource ' + hostName + ':' + classNameValue));\n } else {\n return operationCallback(teamid, contract, dataToken, className, modelToDelete, optionalParams);\n }\n };\n\n // Invalidates all cached collections so that everything need to be reloaded from the network again\n self.invalidate = function(cacheHash) {\n cache = {};\n currentCacheHash = cacheHash || rfc4122.v4();\n };\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').service('$eaDataAggregateOperations', function() {\n var self = this;\n\n self.sum = function(data, property) {\n var result = 0;\n data.forEach(function(element) {\n\n if (property) {\n result += element[property];\n } else {\n result += element\n }\n });\n return result;\n };\n\n self.count = function(reportsData, property) {\n if (property && !Array.isArray(reportsData)) {\n return reportsData[property].length;\n } else {\n return reportsData.length;\n }\n };\n\n self.avg = function(reportsData, property) {\n var c = self.count(reportsData, property);\n var s = self.sum(reportsData, property);\n return s / c;\n };\n\n self.distinct = function(reportsData, property, containsValue) {\n var result = [];\n\n function addToResultIfFitsToContainsValue(element) {\n\n if (!containsValue) {\n result.push(element);\n } if (element && element.indexOf && element.indexOf(containsValue) !== -1) {\n result.push(element);\n }\n }\n\n // check if we have data\n if (!reportsData || reportsData.length === 0) { return []; }\n\n // distinct the values\n reportsData.forEach(function(element) {\n var v = element[property];\n\n if (Array.isArray(v)) {\n v.forEach(function(i) {\n if (result.indexOf(i) === -1) {\n addToResultIfFitsToContainsValue(i);\n }\n });\n } else {\n if (result.indexOf(v) === -1) {\n addToResultIfFitsToContainsValue(v);\n }\n }\n });\n\n // sort\n result.sort();\n\n // done\n return result;\n };\n\n self.sumplusaggr = function(data, property, prevValue)\n {\n return self.sum(data, property) + prevValue;\n }\n\n var operations = {\n sum: self.sum,\n count: self.count,\n avg: self.avg,\n distinct: self.distinct,\n sumplusaggr: self.sumplusaggr\n };\n\n self.execute = function(func, reportsData, property, other) {\n var op = operations[func];\n if (op) {\n return op(reportsData, property, other);\n } else {\n return -1;\n }\n };\n\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').service('$eaDataGroupOperations', function($q) {\n var self = this;\n\n function groupBy(data, keys) {\n\n if (keys.length === 0) { return data; }\n\n // The current key to perform the grouping on:\n var key = keys[0];\n\n // Loop through the data and construct buckets for\n // all of the unique keys:\n var groups = {};\n for (var i = 0; i < data.length; i++)\n {\n var row = data[i];\n var groupValue = row[key];\n\n if (groups[groupValue] === undefined)\n {\n groups[groupValue] = [];\n }\n\n groups[groupValue].push(row);\n }\n\n // Remove the first element from the groups array:\n keys.reverse();\n keys.pop();\n keys.reverse();\n\n // If there are no more keys left, we're done:\n if (keys.length === 0) { return groups; }\n\n // Otherwise, handle further groupings:\n for (var group in groups)\n {\n groups[group] = groupBy(groups[group], keys.slice());\n }\n\n return groups;\n }\n\n function addElementToGroupSafely(groupedResult, groupKeyValue, groupElement) {\n\n // get the lowercase key value\n var groupKeyValueLowerCases = groupKeyValue.toLowerCase();\n\n // generate a new group if needed\n if (groupedResult[groupKeyValueLowerCases] === undefined) { groupedResult[groupKeyValueLowerCases] = { elements: [], name: groupKeyValue }; }\n\n // add the element\n groupedResult[groupKeyValueLowerCases].elements.push(groupElement);\n }\n\n self.groupBy = function(data, properties) {\n if (data) {\n return $q.when(groupBy(data, properties));\n } else {\n return $q.when({});\n }\n };\n\n self.groupBySingleDimension = function(data, property) {\n\n var groupedResult = {};\n\n data.forEach(function(element) {\n\n var groupKeyValue = element[property];\n if (!groupKeyValue) { return; }\n\n if (Array.isArray(groupKeyValue) && groupKeyValue.length > 0) {\n groupKeyValue.forEach(function (groupKeyChildValue) {\n\n // ignore invalid values\n if (groupKeyChildValue === null || groupKeyChildValue === undefined) { return; }\n\n // add to goup\n addElementToGroupSafely(groupedResult, groupKeyChildValue, element);\n });\n } else if (Array.isArray(groupKeyValue) && groupKeyValue.length === 0) {\n addElementToGroupSafely(groupedResult, '- no tag -', element);\n } else {\n addElementToGroupSafely(groupedResult,groupKeyValue, element);\n }\n });\n\n return $q.when(groupedResult);\n };\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').service('$eaDataFilterOperations', function($q) {\n var self = this;\n\n var fieldPropertyMapping = {\n 'SubscriptionName': 'SubscriptionName',\n 'ServiceName': 'ServiceName',\n 'ServiceCategory': 'ServiceCategory',\n 'ServiceType': 'ServiceType',\n 'ServiceSize': 'ServiceSize',\n 'ServiceCosts': 'ServiceCosts',\n 'ServiceQuantity': 'ServiceQuantity',\n 'ServiceUnit' : 'ServiceQuantityUnit',\n 'Tag': 'ServiceTags',\n 'CostCenter': 'CostCenter',\n 'Department': 'Department',\n 'ResourceGroup': 'ResourceGroup'\n };\n\n // ReportLastSync: Sat Nov 07 2015 09:13:20 GMT+0100 (CET)\n // ReportMonth: \"11\"\n // ReportYear: \"2015\"\n\n var conditionOperations = {\n '=': function(left, right) {\n return (left === right);\n },\n '<>': function(left, right) {\n return left !== right;\n },\n '<': function(left, right) {\n return left < right;\n },\n '<=': function(left, right) {\n return left <= right;\n },\n '>': function(left, right) {\n return left > right;\n },\n '>=': function(left, right) {\n return left >= right;\n },\n 'contains': function(left, right) {\n return (left.indexOf(right) !== -1);\n },\n 'notContains': function(left, right) {\n return (left.indexOf(right) === -1);\n },\n 'startsWith': function(left, right) {\n return (left.indexOf(right) === 0);\n },\n 'notStartsWith': function(left, right) {\n return (left.indexOf(right) !== 0);\n }\n };\n\n var conditionOperationsValueForUndefined = {\n '=': false,\n '<>': true,\n '<': true,\n '<=': true,\n '>': false,\n '>=': false,\n 'contains': false,\n 'notContains': true,\n 'startsWith': false,\n 'notStartsWith': true\n };\n\n function createFilterGroups(rules) {\n // build the filter tree\n var filterGroups= [];\n\n var currentFilterChilds = [];\n\n rules.forEach(function(filterElement) {\n\n // check if we need to create a new group\n if (filterElement.Operator === 'OR') {\n\n // add the element to the groups\n filterGroups.push(currentFilterChilds);\n\n // recreate the element\n currentFilterChilds = [];\n }\n\n // add the element to the group\n currentFilterChilds.push(filterElement);\n });\n\n // we need to add the last child\n filterGroups.push(currentFilterChilds);\n\n return filterGroups;\n }\n\n self.compileFilter = function(filterToApply) {\n if (!filterToApply || !filterToApply.Id) { return function() { return true; }; }\n\n var filterGroups= createFilterGroups(filterToApply.Rules);\n\n // return the filter function\n return function(element) {\n\n // contains the global state\n var passedRuleCheck = false;\n\n // visit every filter group until the first filter group\n // could be validated\n filterGroups.every(function(filterSubGroup) {\n\n // visit every subgroup\n passedRuleCheck = filterSubGroup.every(function(filterElement) {\n\n // map the field alue\n var fieldPropertyMapped = fieldPropertyMapping[filterElement.Field];\n if (!fieldPropertyMapped) { fieldPropertyMapped = filterElement.Field; }\n\n // read the field value\n var fieldValue = element[fieldPropertyMapped];\n\n // check if we have a value\n if (!fieldValue) {\n return conditionOperationsValueForUndefined[filterElement.Condition];\n }\n\n // check if we need to convert the rule data to a number\n var ruleValue = filterElement.Value;\n if (!isNaN(fieldValue)) {\n ruleValue = parseFloat(filterElement.Value);\n }\n\n // compare strings correctly\n if (filterElement.Compare === 'CaseInSensitive') {\n fieldValue = typeof fieldValue === 'string' ? fieldValue.toLowerCase() : fieldValue;\n ruleValue = typeof ruleValue === 'string' ? ruleValue.toLowerCase() : ruleValue;\n }\n\n // check if we pass the test\n if (!conditionOperations[filterElement.Condition](fieldValue, ruleValue)) {\n return false;\n } else {\n return true;\n }\n });\n\n if (passedRuleCheck) {\n return false;\n } else {\n return true;\n }\n });\n\n // return the global result\n return passedRuleCheck;\n };\n };\n\n self.applyFilter = function(data, filterToApply) {\n\n // if no filter applied return the element\n if (!filterToApply || !filterToApply.Id) { return $q.when(data); }\n\n // compile the filter\n var compiledFilter = self.compileFilter(filterToApply);\n\n // filter the elements\n return self.applyCompiledFilter(data, compiledFilter);\n };\n\n self.applyCompiledFilter = function(data, compiledFilter) {\n\n var filteredElements = data.filter(function(element) {\n return compiledFilter(element);\n });\n\n // done\n return $q.when(filteredElements);\n };\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').service('$eaDataColorThemeGenerator', function() {\n var self = this;\n\n /*\n * Helper to calculate the colors in a correct way based on our base color\n * color map. In addition it allows to shade when the base color map is out of\n * range.\n */\n function intToHexCodeString(n) {\n n = parseInt(n, 10);\n\n if (isNaN(n)) {\n return '00';\n } else {\n n = Math.max(0, Math.min(n, 255));\n\n return '0123456789ABCDEF'.charAt((n - n % 16) / 16) + '0123456789ABCDEF'.charAt(n % 16);\n }\n }\n\n function rgbToHexWebCode(R,G,B) {return '#' + intToHexCodeString(R)+intToHexCodeString(G)+intToHexCodeString(B); }\n\n function hexWebCodeShadeRelative(color, percent) {\n\n /*jshint bitwise: false*/\n var f=parseInt(color.slice(1),16),t=percent<0?0:255,p=percent<0?percent*-1:percent,R=f>>16,G=f>>8&0x00FF,B=f&0x0000FF;\n return '#'+(0x1000000+(Math.round((t-R)*p)+R)*0x10000+(Math.round((t-G)*p)+G)*0x100+(Math.round((t-B)*p)+B)).toString(16).slice(1);\n }\n\n /*\n * Defines the base color palette we can use for the diagram\n */\n var baseColorPalette = [\n // Red: 242, 80, 34, #F25022\n rgbToHexWebCode(242, 80, 34),\n\n // Green: 127, 186, 34, #7FBA22\n rgbToHexWebCode(127,186,34),\n\n // Gray: 150, 150, 150, #1BA4EF\n rgbToHexWebCode(150,150, 150),\n\n // Yellow: 253, 185, 44, #FDB92C\n rgbToHexWebCode(253, 185, 44),\n\n // #194280\n //rgbToHexWebCode(25, 66, 128)\n\n // 89, 200, 242\n rgbToHexWebCode(89, 200, 242)\n ];\n\n function getSubscriptionColorByIndex(colorIndex) {\n\n var moduloResult = colorIndex % baseColorPalette.length;\n var divResult = Math.floor(colorIndex / baseColorPalette.length);\n\n var baseColor = baseColorPalette[moduloResult];\n while(divResult > 0 ) {\n divResult--;\n baseColor = hexWebCodeShadeRelative(baseColor, -0.2);\n }\n\n return baseColor;\n }\n\n var colorStreamLastIndexMap = {};\n var colorIndexMap = {};\n\n // This method implements the existing color theme generator and ensures\n // that for a give tag-value the system returns the same color\n self.getColorFor = function(dataStreamType, colorTagValue) {\n\n // check parameters\n if (!dataStreamType || !colorTagValue) { return getSubscriptionColorByIndex(0); }\n\n // generate the color stream index\n var colorStreamIndex = dataStreamType + '#' + colorTagValue.toLowerCase();\n\n // check if we have an index for this pair\n var index = colorIndexMap[colorStreamIndex];\n if (index === undefined) {\n\n // get the last index of this stream\n index = colorStreamLastIndexMap[dataStreamType];\n if (index === undefined) { index = 0; } else { index++; }\n\n // assign the index to this color stream\n colorIndexMap[colorStreamIndex] = index;\n\n // store this index as last index\n colorStreamLastIndexMap[dataStreamType] = index;\n }\n\n // generate the color by index\n return getSubscriptionColorByIndex(index);\n };\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').service('$eaDataSourceManager', function($q) {\n var self = this;\n\n var dataSources = {};\n\n // This function allows to register a new data source. Every data source needs to offer a query callback which can\n // be used to get data from the source. This query callback needs to have he following siganture\n //\n // function(teamid, contract, dataToken, className, optionalPrams)\n //\n // dataSourceHost - A unique identifier of the hosting service for the datasource\n // className - The type of elements this datasource will return\n // collection - Defines the specific bucket we get the data from\n //\n // Hint: dataSourceHost + className must be unique, together\n //\n self.registerDataSource = function(dataSourceHost, className, collection, queryCallback, storeCallback, deleteCallback) {\n dataSources[dataSourceHost + '#' + className + '#' + (collection ? collection : 'default')] = {\n query: queryCallback,\n store: storeCallback,\n delete: deleteCallback\n };\n };\n\n // Allows to query data from a data source. This calls are never cached so when you query information\n // from a source with high latency (e.g. the network) please use the $eaDataCoordinator service because\n // of the build in caching features.\n //\n self.queryDataSource = function(dataSourceHost, className, collection) {\n var dataSource = dataSources[dataSourceHost + '#' + className + '#' + (collection ? collection : 'default')];\n if (dataSource) {\n return dataSource.query;\n } else {\n return dataSource;\n }\n };\n\n self.queryInsertOrMergeDataSourceOperation = function(dataSourceHost, className, collection) {\n\n // get the datasource\n var dataSource = dataSources[dataSourceHost + '#' + className + '#' + (collection ? collection : 'default')];\n if (!dataSource) {\n return $q.reject(\"DataSource not found\");\n } else if (!dataSource.store) {\n return $q.reject(\"DataSource Store operation not supported\");\n } else {\n return dataSource.store;\n }\n };\n\n self.queryDeleteDataSourceOperation = function(dataSourceHost, className, collection) {\n\n // get the datasource\n var dataSource = dataSources[dataSourceHost + '#' + className + '#' + (collection ? collection : 'default')];\n if (!dataSource) {\n return $q.reject(\"DataSource not found\");\n } else if (!dataSource.delete) {\n return $q.reject(\"DataSource Delete operation not supported\");\n } else {\n return dataSource.delete;\n }\n };\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').service('$eaDataRawSources', function($q, $http, $injector, $eaDataSourceManager, $eaReportData, $eaBackend, moment, $eaBackendBase, $acDataSourceClasses, $acDataSourceSettings, $acDataSourceHelper) {\n var self = this;\n var registeredPlugins = [];\n\n function loadServiceTypeMetainformation(/*teamid, contract, dataToken, className, cacheHash, optionalParams*/) {\n // load the service definitions from the server\n return $acDataSourceSettings.loadDataFromStaticUrl('service_definitions.json').then(function(result) {\n\n var models = [];\n\n result.forEach(function(item) {\n var model = new $acDataSourceClasses.ServiceDefinitionClass();\n model.ServiceType = item.ServiceType;\n model.ServiceTitle = item.ServiceTitle;\n model.ServiceDescription = item.ServiceDescription;\n models.push(model);\n });\n\n return $q.when(models);\n });\n }\n\n // register the global data sources\n self.registerDataSources = function() {\n\n // general data\n $eaDataSourceManager.registerDataSource('global', 'ServiceDefinitionClass', null, loadServiceTypeMetainformation);\n\n // get the module\n var mod = angular.module('azureCostsFeApp');\n\n // visit all service\n mod._invokeQueue.forEach(function(item) {\n\n // we only work with services\n if (item[1] !== 'service') { return; }\n\n // every service needs to start with $acDataSource-prefix\n if (item[2][0].indexOf('$acDataSource') !== 0) { return; }\n\n // check if the service was registered\n if (registeredPlugins.indexOf(item[2][0]) !== -1) {\n console.log(\"!!!ALERT!!!: Datasource Plugin \" + item[2][0] + \" was used one times more, looks like you forgot to rename a copied service\")\n return;\n }\n\n // add the service plugin\n registeredPlugins.push(item[2][0]);\n\n // instanciate the service\n var serviceToWorkWith = $injector.get(item[2][0]);\n\n // check if we implement our interface\n if (!angular.isFunction(serviceToWorkWith.registerDataSources)) {return; }\n\n // register the data sources\n console.log('Register Datasources from ' + item[2][0]);\n serviceToWorkWith.registerDataSources($eaDataSourceManager);\n });\n };\n\n});\n\n\n","'use strict';\n\nangular.module('azureCostsFeApp').service('$eaDataExportOperations', function($q) {\n var self = this;\n var csvDelimiter = ';';\n\n function addToResultSafely(result, value) {\n if (!result) {\n return value;\n } else if (result[result.length - 1] === '\\n') {\n return result + value;\n } else {\n return result + csvDelimiter + value;\n }\n }\n\n self.exportListTo = function(format, data, headerProperties, options) {\n if (headerProperties.length === 0) {\n return $q.when('No Header');\n }\n\n // check the aount of data\n if (data === null ||data === undefined ||data.length === 0) {\n return $q.when('No Data');\n }\n\n // generate the headline\n var result;\n headerProperties.forEach(function (k) {\n\n // check if we need to generate sub-subElement\n if (angular.isObject(k)) {\n k[(Object.keys(k)[0])].forEach(function(s) {\n // remove String in the property\n s = s.replace('String', '');\n\n // uppercase the string\n s = s.capitalizeFirstLetter();\n\n // assign\n result = addToResultSafely(result, s);\n });\n } else {\n // remove String in the property\n k = k.replace('String', '');\n\n // remove tag if needd\n k = k.replace('tag:', '');\n\n // uppercase the string\n k = k.capitalizeFirstLetter();\n\n // assign\n result = addToResultSafely(result, k);\n }\n });\n\n result += '\\r\\n';\n\n // visit every element\n data.forEach(function(line) {\n\n // visit the properties\n headerProperties.forEach(function(k) {\n\n var subKeys = [];\n\n if (angular.isObject(k)) {\n subKeys = k[Object.keys(k)[0]];\n k = Object.keys(k)[0];\n }\n\n if (k.startsWith('tag:')) {\n var tagName = k.replace('tag:', '');\n\n if (line.GroupTags) {\n result = addToResultSafely(result, line.GroupTags[tagName] || line.GroupTags[tagName.downCaseFirstLetter()] || 'Default');\n } else if (line['AzureTag:' + tagName])\n {\n result = addToResultSafely(result, line['AzureTag:' + tagName]);\n } else {\n result = addToResultSafely(result, 'Default');\n }\n } else {\n var value = line[k];\n if (csvDelimiter === ',' && Array.isArray(value)) {\n result = addToResultSafely(result, value.join(';'));\n } else if (angular.isObject(value) && !angular.isArray(value)) {\n subKeys.forEach(function (sk) {\n var subKeyValue = value[sk] ? value[sk] : 0;\n result = addToResultSafely(result, subKeyValue.toFixed(20).replace('.', options.decimalSeparator));\n });\n } else if (angular.isNumber(value)) {\n result = addToResultSafely(result, value.toFixed(20).replace('.', options.decimalSeparator));\n } else if (value === undefined || value === null) {\n result = addToResultSafely(result, '');\n } else {\n result = addToResultSafely(result, value.toString());\n }\n }\n });\n\n result += '\\r\\n';\n });\n\n // done\n return $q.when(result);\n };\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').service('$eaDataJoinOperations', function() {\n var self = this;\n\n function isObject(val) {\n if (val === null) { return false;}\n return ( (typeof val === 'function') || (typeof val === 'object') );\n }\n\n /*\n * This operation joins the leftData with the rightData and is able\n * to build new object whcih contains the different value of two properties with the same name\n */\n self.join = function(dataArrays, objectIdentifier, objectonizePropertiesWithKey) {\n\n // some checks\n if (!dataArrays || dataArrays.length === 0) { return []; }\n\n // our caches\n var groupedDataArrays = {};\n var flatDataArray = [];\n\n // visit every data array\n var dataArrayIndex = 0;\n dataArrays.forEach(function(dataArray) {\n\n // get the index\n dataArrayIndex = dataArrays.indexOf(dataArray);\n\n // visit every element\n dataArray.forEach(function(dataElement) {\n\n // ensure the dataElement contains the objectIdentifier\n var objIdentifierValue = dataElement[objectIdentifier];\n if (!objIdentifierValue) { return; }\n\n // check what we need to do, just add the element or merge into\n var objectClone = null;\n if (!groupedDataArrays[objIdentifierValue]) {\n\n // generate the clone\n objectClone = JSON.parse(JSON.stringify(dataElement));\n groupedDataArrays[objIdentifierValue] = objectClone;\n flatDataArray.push(objectClone);\n\n // add the initial marker\n if (dataArrayIndex === 0) {\n /*jshint -W069 */\n objectClone['PartOfInitialArray'] = true;\n } else {\n /*jshint -W069 */\n objectClone['PartOfInitialArray'] = false;\n }\n\n } else {\n objectClone = groupedDataArrays[objIdentifierValue];\n }\n\n // just handle the objectonize-Properties\n if (objectonizePropertiesWithKey) {\n\n Object.keys(objectonizePropertiesWithKey).forEach(function(tokenizeKey) {\n\n // get the right sub key\n var tokenizeSubKey = dataElement[objectonizePropertiesWithKey[tokenizeKey]];\n\n // read the value from our data element\n var tokenizeValue = dataElement[tokenizeKey];\n\n // extend the key\n tokenizeKey = tokenizeKey + 'Aggregated';\n\n // read the existing property\n var targetProperty = objectClone[tokenizeKey];\n\n // generate the object\n if (!isObject(targetProperty)) {\n objectClone[tokenizeKey] = {};\n targetProperty = objectClone[tokenizeKey];\n }\n\n // assign the value\n targetProperty[tokenizeSubKey] = tokenizeValue;\n });\n }\n });\n\n });\n\n // done\n return flatDataArray;\n };\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').service('$eaDataItemProcessorChain', function() {\n var self = this;\n\n var ProcesserChain = function() {\n var chain = this;\n\n var callbacks = [];\n\n chain.onVisit = function(cb) {\n callbacks.push(cb);\n };\n\n chain.process = function(dataItems, resultBucket) {\n\n // inject our statistics\n resultBucket.ChainStats = [];\n callbacks.forEach(function() { resultBucket.ChainStats.push({c: 0, t: 0}); });\n\n // visit all items\n dataItems.forEach(function(dataItem) {\n\n var chainIndex = 0;\n\n callbacks.every(function(cb) {\n\n // start time\n var start = new Date();\n\n // process the item\n var resultItemProcessing = cb(dataItem, resultBucket);\n\n // end time\n var end = new Date();\n\n // count the items\n resultBucket.ChainStats[chainIndex].c++;\n resultBucket.ChainStats[chainIndex].t += end - start;\n\n // increase the index\n chainIndex++;\n\n // process the result\n switch(resultItemProcessing) {\n case self.Status.Skip:\n return 0;\n case self.Status.Next:\n return 1;\n }\n });\n });\n };\n };\n\n self.Status = {\n Next: 1,\n Skip: 0\n };\n\n self.createProcesserChain= function() {\n return new ProcesserChain();\n };\n});\n","'use strict';\n\n/*\n * This service is able to handle date time manipulation when it comes to timelines\n * we are using in Azure Costs, e.g. required month for the last 12 month\n */\nangular.module('azureCostsFeApp').service('$acTimelineGenerator', function(moment) {\n var self = this;\n\n // This function generates a list of month in the report id format (YYYY-MM). The\n // monthCount can be positive for a line of month in the future and negative\n // for a line of month in the past, e.g. createMonthList(-12) returns a list of\n // month for the last year\n self.createMonthList = function(monthCount, startDate) {\n startDate = startDate ? startDate : (new Date());\n\n // define the direction\n var internalMonthCount = monthCount;\n var directionForward = true;\n\n if (monthCount < 0) {\n internalMonthCount = (-1) * monthCount;\n directionForward = false;\n }\n\n // visit every month\n var monthList = [];\n for(var monthIndex = 0; monthIndex < internalMonthCount; monthIndex++) {\n\n // define the new moment\n var newMoment = moment(startDate).add(monthIndex, 'months');\n if (!directionForward) {\n newMoment = moment(startDate).add((-1) * monthIndex, 'months');\n }\n\n // generate the report\n monthList.push(newMoment.format('YYYY-MM'));\n }\n\n return monthList.sort();\n };\n\n // Allows to add a month to an existing date\n self.addMonth = function(startDate, amount) {\n return moment(startDate).add(amount ? amount : 1, 'months').toDate();\n };\n\n self.addDay = function(startDate, amount) {\n return moment(startDate).add(amount ? amount : 1, 'days').toDate();\n };\n\n self.getCurrentYear = function() {\n return moment(new Date()).year();\n }\n});\n","'use strict';\n\n/*\n * This service is able to handle date time manipulation when it comes to timelines\n * we are using in Azure Costs, e.g. required month for the last 12 month\n */\nangular.module('azureCostsFeApp').service('$acLocaleService', function() {\n var self = this;\n\n self.getDecimalSeperator = function() {\n var n = 1.1;\n n = n.toLocaleString().substring(1, 2);\n return n;\n }\n\n});\n","'use strict';\n\n/*\n * This service is able to handle date time manipulation when it comes to timelines\n * we are using in Azure Costs, e.g. required month for the last 12 month\n */\nangular.module('azureCostsFeApp').service('$acCacheIdentifierGenerator', function($base64, jwtHelper, rfc4122) {\n var self = this;\n\n self.buildCacheIdentifier = function (dataTokenJwt, reportCacheHash, profileCacheHash) {\n\n // generate a new jwtUserId just in case the jwt token is invalid\n var jwtUserId = $base64.encode((new Date()).toDateString());\n\n // decode the given data token and override the userid\n if (dataTokenJwt) {\n var jwtDecoded = jwtHelper.decodeToken(dataTokenJwt);\n if (jwtDecoded && jwtDecoded.uid) {\n jwtUserId = jwtDecoded.uid;\n }\n }\n\n // check if we have a profile cache hash\n if (profileCacheHash) {\n jwtUserId += profileCacheHash;\n }\n\n // attache the report cache hash as well\n return $base64.encode(reportCacheHash) + '.' + jwtUserId;\n };\n\n self.updateDailyCacheLocalInjector = function(localInjector) {\n var v = rfc4122.v4();\n var localInjectorKey = 'ac.caching.injectors.' + localInjector;\n localStorage.setItem(localInjectorKey, v);\n return v;\n };\n\n self.buildDailyCacheIdentifier = function(localInjector) {\n\n // build the reference date\n var refDate = moment().format('YYYY-MM-DD');\n\n // read the local injector id\n var localInjectorKey = 'ac.caching.injectors.' + localInjector;\n var localInjectorValue = localStorage.getItem(localInjectorKey) || self.updateDailyCacheLocalInjector(localInjector);\n\n // generate the new cache value\n return $base64.encode(localInjectorValue + ':' + refDate);\n }\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').service('$acDataSourceHelper', function($acDataSourceSettings, $acDataSourceClasses, $q, $eaReportData, $eaBackend, $acTimelineGenerator, $injector, $eaBackendAzureCachedContentLoader, $base64) {\n var self = this;\n\n self.getStoreDashboardItemsCallback = function() {\n return function(teamid, contract, dataToken, className, itemToStore, optionalParams) {\n return $eaBackend.dataPostDashboardWidget(teamid, contract, itemToStore, dataToken).then(function() {\n return $q.when(itemToStore);\n }) ;\n }\n };\n\n self.getDeleteDashboardItemsCallback = function() {\n return function(teamid, contract, dataToken, className, itemToDelete, optionalParams) {\n return $eaBackend.dataDeletDashboardWidget(teamid, contract, itemToDelete.uuid, dataToken);\n }\n };\n\n self.getQueryDashboardItemsCallback = function(dataFileName) {\n\n return function(teamid, contract, dataToken, className, cacheHash, optionalParams) {\n\n // load the static dashboard elements from our default dashboard\n return $acDataSourceSettings.loadDataFromStaticUrl(dataFileName).then(function (items) {\n\n // inject the result items\n var resultItems = items.map(function (item) {\n return new $acDataSourceClasses.DashboardItemClass(item);\n });\n\n if (contract === 'CSP:Welcome') {\n return $q.when(resultItems);\n } else {\n return $eaBackend.dataGetDashboardWidgets(teamid, contract, dataToken).then(function (loadedItems) {\n\n // inject the loaded items\n loadedItems.forEach(function (item) {\n resultItems.push(new $acDataSourceClasses.DashboardItemClass(item));\n });\n\n // done\n return $q.when(resultItems);\n });\n };\n });\n }\n };\n\n self.registerDataSourceDashboardItemClass = function(dataSourceManager, collectionId, dataFileName) {\n dataSourceManager.registerDataSource('global', 'DashboardItemClass', collectionId, self.getQueryDashboardItemsCallback(dataFileName), self.getStoreDashboardItemsCallback(), self.getDeleteDashboardItemsCallback());\n };\n\n self.registerDataSourcePeriodClass = function(dataSourceManager, collectionId) {\n\n dataSourceManager.registerDataSource('global', 'PeriodClass', collectionId, function (teamid, contract, dataToken, className, cacheHash, optionalParams) {\n\n // load the available reports\n return self.queryDataSource(teamid, contract, dataToken, 'ReportClass', optionalParams).then(function(availableReports) {\n\n // generate the monthlist\n var monthList = [];\n availableReports.Reports.forEach(function(r) { monthList.push(r); });\n monthList.sort();\n\n // extract the Pariods out of it\n var monthList = monthList.map(function(month) {\n return $acDataSourceClasses.PeriodClass({ReportId: month});\n });\n\n return $q.when(monthList);\n });\n });\n };\n\n self.registerDataSourceReportClass = function(dataSourceManager, collectionId) {\n\n dataSourceManager.registerDataSource('global', 'ReportClass', collectionId, function (teamid, contract, dataToken, className, cacheHash, optionalParams) {\n\n // load the values from the backend\n return $eaReportData.loadContractDetails(teamid, contract, dataToken, optionalParams).then(function (loadedData) {\n\n // generate a report model\n var reportModel = new $acDataSourceClasses.ReportClass({Contract: contract});\n reportModel.Definition = loadedData.Definition;\n reportModel.DailyReportEnbaled = loadedData.DailyReport;\n reportModel.DailyReportBreakDownFirst = loadedData.DailyReportBreakDownFirst;\n reportModel.DailyReportBreakDownSecond = loadedData.DailyReportBreakDownSecond;\n reportModel.MonthlyCostLimit = loadedData.MonthlyCostLimit;\n reportModel.Currency = loadedData.Currency;\n reportModel.CreatedAt = loadedData.CreatedAt ? new Date(loadedData.CreatedAt) : null;\n reportModel.UpdatedAt = loadedData.LastTouch ? new Date(loadedData.LastTouch) : null;\n reportModel.Token = loadedData.Token;\n reportModel.Reports = loadedData.Reports;\n reportModel.ReportsFull = loadedData.ReportsFull;\n\n // done\n return $q.when(reportModel);\n });\n });\n };\n\n self.registerDataSourceSpendingFilerClass = function(dataSourceManager, collectionId) {\n\n dataSourceManager.registerDataSource('global', 'SpendingFilterClass', collectionId, function (teamid, contract, dataToken/* , className, cacheHash, optionalParams*/) {\n return $eaBackend.dataGetDataFilters(teamid, contract, dataToken).then(function(availableFilters) {\n return availableFilters.map(function(e) {\n var item = new $acDataSourceClasses.SpendingFilterClass();\n item.Id = e.Id;\n item.Name = e.Name;\n item.Owner = e.Owner;\n item.Rules = e.Rules;\n item.TeamId = e.TeamId;\n return item;\n });\n });\n });\n };\n\n self.registerDataSourceSpendingEntryClassWithMappingCallback = function(dataSourceManager, collectionId, version, mappingCallback) {\n dataSourceManager.registerDataSource('global', 'SpendingEntryClass', collectionId, function (teamid, contract, dataToken, className, cacheHash, optionalParams) {\n return self.queryDataSource(teamid, contract, dataToken, 'ReportClass', optionalParams).then(function (reportsInfo) {\n\n function resourceLoadRouting(teamid, contractNumber, resourceId, cacheIdentifier, jwtToken, retry)\n {\n if (version == 1) {\n return $eaBackend.dataGetContractReportData(teamid, contractNumber, resourceId, cacheIdentifier, jwtToken, retry);\n } else {\n return $eaBackend.dataGetContractReportDataV3(teamid, contractNumber, resourceId, cacheIdentifier, jwtToken, retry);\n }\n }\n\n return $eaBackendAzureCachedContentLoader.dataRequestCachedResourcesWithRetry(teamid, contract, reportsInfo.ReportsFull, dataToken, {cacheIdentifierExtenion: cacheHash, resourceEndpoint: resourceLoadRouting}).then(function (loadedData) {\n return mappingCallback(teamid, contract, dataToken, reportsInfo, loadedData);\n });\n });\n });\n };\n\n self.registerDataSourceSpendingHistoryEntryClassWithMappingCallback = function(dataSourceManager, collectionId, version, mappingCallback) {\n dataSourceManager.registerDataSource('global', 'SpendingHistoryEntryClass', collectionId, function (teamid, contract, dataToken, className, cacheHash, optionalParams) {\n return self.queryDataSource(teamid, contract, dataToken, 'ReportClass', optionalParams).then(function (reportsInfo) {\n\n function resourceLoadRouting(teamid, contractNumber, resourceId, cacheIdentifier, jwtToken, retry)\n {\n if (version == 1) {\n return $eaBackend.dataGetContractReportHistory(teamid, contractNumber, jwtToken);\n } else {\n return $eaBackend.dataGetContractReportHistoryV3(teamid, contractNumber, cacheIdentifier, jwtToken, retry);\n }\n }\n\n // check if we have no reports\n if (reportsInfo.ReportsFull.length == 0) { return $q.when([]); }\n\n // generate the cache hash (last 2 months)\n var cacheHash = \"\";\n var reportsSorted = reportsInfo.ReportsFull.sortOn('Month');\n if (reportsSorted.length > 1) {\n cacheHash = reportsSorted[reportsInfo.ReportsFull.length - 1].CacheHash + reportsSorted[reportsInfo.ReportsFull.length - 2].CacheHash;\n } else if (reportsSorted.length > 0) {\n cacheHash = reportsSorted[reportsInfo.ReportsFull.length - 1].CacheHash\n } else {\n cacheHash = \"\";\n }\n\n // trigger the data load\n return $eaBackendAzureCachedContentLoader.dataRequestCachedResourcesWithRetry(teamid, contract, [{ Id: 'history', CacheHash: cacheHash}], dataToken, {cacheIdentifierExtenion: cacheHash, resourceEndpoint: resourceLoadRouting}).then(function (loadedData) {\n return mappingCallback(teamid, contract, dataToken, reportsInfo, loadedData);\n });\n });\n });\n };\n\n self.registerDataSourceSpendingEntryClassForCoreApi = function(dataSourceManager, collectionId) {\n\n self.registerDataSourceSpendingEntryClassWithMappingCallback(dataSourceManager, collectionId, 2, function(teamid, contract, dataToken, reportsInfo, loadedData) {\n\n return $eaBackend.dataGetContractTags(teamid, contract, dataToken).then(function(loadedTags) {\n\n // safety\n if (!loadedTags) { loadedTags = { items: []}; }\n if (!loadedTags.items) { loadedTags.items = []; }\n\n // support old tags\n loadedTags.items.forEach(function(tagElement) {\n\n try {\n // decode from base64\n var decodedKey = $base64.decode(tagElement.serviceId);\n if (decodedKey && decodedKey.split('/').length == 3) {\n var decodedKeySplit = decodedKey.split('/');\n tagElement.serviceId = ('b64:' + decodedKeySplit[0] + '/' + decodedKeySplit[2]).toLowerCase();\n }\n } catch(exc) {}\n });\n\n var models = [];\n var indexLoadedTags = loadedTags && loadedTags.items ? loadedTags.items.buildIndex('serviceId') : {};\n\n // the hash for tags\n var azureTagCaseAdaptionHash = {};\n\n loadedData.forEach(function(services) {\n\n services.forEach(function (service) {\n\n // This API does not support V1 Tags\n service.ServiceTagsV1 = [];\n service.ServiceTagsV2 = [];\n\n // we load the tags from the external API\n service.ServiceTagsV3 = [];\n\n if (indexLoadedTags[service.ServiceId] && indexLoadedTags[service.ServiceId].tags) {\n\n // load and filter tags\n var loadedTags = indexLoadedTags[service.ServiceId].tags.filter(function(value, index, self) { return self.indexOf(value) === index; });\n if (!loadedTags) { loadedTags = []; }\n\n // assign tags\n service.ServiceTagsV3.push.apply(service.ServiceTagsV3, loadedTags);\n }\n\n // add the old tags\n var tagName = ('b64:' + service.SubscriptionId + '/' + service.ServiceName).toLowerCase();\n if (indexLoadedTags[tagName] && indexLoadedTags[tagName].tags) {\n\n // load and filter tags\n var loadedTags = indexLoadedTags[tagName].tags.filter(function(value, index, self) { return self.indexOf(value) === index; });\n if (!loadedTags) { loadedTags = []; }\n\n // filter out existing tags\n loadedTags = loadedTags.filter(function(value) { return service.ServiceTagsV3.indexOf(value) === -1 });\n\n // assign tags\n service.ServiceTagsV3.push.apply(service.ServiceTagsV3, loadedTags);\n }\n\n // map all\n service.ServiceTags = service.ServiceTagsV3;\n\n service.ServiceDailyCosts = [];\n service.ServiceDailyQuantities = [];\n service.SchemaVersion = collectionId;\n\n if (service.GroupTags && Object.keys(service.GroupTags).length > 0) {\n\n Object.keys(service.GroupTags).forEach(function (k) {\n\n // check if we had the tag before\n if (!azureTagCaseAdaptionHash[k.toUpperCase()]) {\n azureTagCaseAdaptionHash[k.toUpperCase()] = k;\n }\n\n // get the correct tagname just in case of case sensitive duplicates\n var correctedTagName = 'AzureTag:' + azureTagCaseAdaptionHash[k.toUpperCase()];\n service[correctedTagName] = service.GroupTags[k];\n });\n }\n\n // Ensure the meters are an empty valid array\n service.ServiceMeters = [];\n\n // add the model\n models.push(service);\n });\n });\n\n return $q.when(models);\n });\n });\n };\n\n self.queryDataSource = function(teamId, contract, dataToken, dataSourceClass, optionalParams) {\n // inject dynamically to prevent circular dependency\n var $eaDataCoordinator = $injector.get('$eaDataCoordinator');\n\n // load the available reports\n return $eaDataCoordinator.query(teamId, contract, dataToken, dataSourceClass, optionalParams);\n };\n\n self.getCurrencySymbolFromCurrency = function(currency) {\n\n if ( currency === 'EUR') {\n return '€';\n } else if ( currency === 'USD') {\n return '$';\n } else {\n return currency;\n }\n }\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').service('$acDataSourceHelperCspGenericSummary', function($acDataSourceSettings, $acDataSourceClasses, $q, $eaReportData, $eaBackend, $acTimelineGenerator, $injector, $eaBackendAzureCachedContentLoader) {\n var self = this;\n\n\n self.loadGenericView = function (teamid, accountId, viewId, collection, dataToken, className, currentHashKey, optionalParams) {\n // inject dynamically to prevent circular dependency\n var $eaDataCoordinator = $injector.get('$eaDataCoordinator');\n\n // duplicate options\n var duplicatedOptions = JSON.parse(JSON.stringify(optionalParams));\n duplicatedOptions.collection = collection;\n\n // build the hashkey\n var hashKeyPartition = 'CSPAggregationCustomer.forAccount.' + viewId + '.' + accountId;\n\n // load the current hashes for this report category\n return $eaBackend.dataGetTeamHashes(teamid, hashKeyPartition, dataToken).then(function(hashMap) {\n\n // ensure we have a map\n if (!hashMap) { hashMap = {}; }\n\n // load the available periods\n return $eaDataCoordinator.query(teamid, accountId, dataToken, 'PeriodClass', duplicatedOptions).then(function (periods) {\n\n // prepare the data\n var resultData = [];\n\n // build resource information\n var resourceInformation = periods.map(function(period) {\n return {\n Id: period.ReportId,\n CacheIdentifier: 'empty',\n CacheHash: 'empty'\n }\n });\n\n // load the resources\n return $eaBackendAzureCachedContentLoader.dataRequestCachedResourcesWithRetry(teamid, accountId, resourceInformation, dataToken, {\n resourceEndpoint: function(teamid, contractNumber, resourceId, cacheIdentifier, jwtToken, retry) {\n return $eaBackend.dataCspGetCustomersSpendingsInAccountV2(viewId, teamid, accountId, resourceId, jwtToken, hashMap, retry);\n }\n }).then(function (loadedItems) {\n if (Array.isArray(loadedItems)) {\n loadedItems.forEach(function(items) {\n resultData.appendArray(items);\n })\n }\n\n return $q.when(resultData);\n });\n });\n });\n };\n});\n","'use strict';\n\n/*\n * This service allows to send messages to the frontend when ever the data processing\n * takes a while\n */\nangular.module('azureCostsFeApp').service('$acDpnService', function($rootScope) {\n var self = this;\n\n var processingItems = [];\n\n self.addProcessingItem = function(itemId)\n {\n // add the item\n if (processingItems.indexOf(itemId) === -1) {\n processingItems.push(itemId);\n }\n\n // update the listener\n $rootScope.$emit('acDpnService.processingItemAdded', itemId);\n };\n\n self.removeProcessingItem = function(itemId)\n {\n var idx = processingItems.indexOf(itemId);\n\n if (idx > -1) {\n processingItems.splice(idx, 1);\n }\n\n // update the listener\n $rootScope.$emit('acDpnService.processingItemRemoved', itemId);\n\n if (processingItems.length === 0)\n {\n // update the listener\n $rootScope.$emit('acDpnService.processingFinished', itemId);\n }\n };\n\n self.onProcessingItemsChanged = function(cb)\n {\n $rootScope.$on('acDpnService.processingItemAdded', function (event, data) {\n cb(processingItems);\n });\n\n $rootScope.$on('acDpnService.processingItemRemoved', function (event, data) {\n cb(processingItems);\n });\n };\n\n self.onProcessingFinished = function(cb)\n {\n $rootScope.$on('acDpnService.processingFinished', function (event, data) {\n cb();\n });\n };\n});\n","'use strict';\n\n/**\n * @ngdoc service\n * @name azureCostsFeApp.eaBackend\n * @description\n * # eaBackend\n * Service in the azureCostsFeApp.\n */\nangular.module('azureCostsFeApp').service('$acWizardHelpers', function() {\n var self = this;\n\n self.getCurrentStep = function(currentState)\n {\n try {\n var splittedState = currentState.name.split('.');\n return splittedState[splittedState.length - 1].split('-')[0];\n } catch(e) {\n return 'step01';\n }\n }\n\n});\n\n\n","'use strict';\n\nangular.module('azureCostsFeApp').service('$acWaitHelpers', function($q, $timeout) {\n var self = this;\n\n self.wait = function(seconds)\n {\n var defer = $q.defer();\n\n $timeout(function() {\n defer.resolve();\n }, seconds * 1000);\n\n return defer.promise;\n }\n\n});\n\n\n","'use strict';\n\n/*\n * This service just contains general settings which can be used from teh data sources.\n */\nangular.module('azureCostsFeApp').service('$acDataSourceSettings', function($eaBackendBase, $http, $q, $acDataSourceClasses, $eaConfig) {\n var self = this;\n\n self.loadDataFromStaticUrl = function(url) {\n\n // define the load url\n var loadUrl = $eaConfig.dataPath + '/' + url;\n\n // replace with cdnEntrypoint if possible\n if ($eaConfig.cdnEntrypoint && loadUrl[0] === '/') {\n loadUrl = $eaConfig.cdnEntrypoint + loadUrl\n }\n\n return $eaBackendBase.extractDataFromResponse($http.get(loadUrl));\n };\n\n self.loadStaticDataGenericCallback = function(teamid, contract, dataToken, className, cacheHash, optionalParams) {\n // add group options if required\n optionalParams = optionalParams || {};\n\n // set the collection parameter\n optionalParams.collection = optionalParams.collection || 'default';\n\n // get the class model from className\n var classModel = $acDataSourceClasses[className];\n if (!classModel) { return $q.reject(new Error('Invalid class name: ' + className)); }\n\n // load by collection\n return self.loadDataFromStaticUrl('static_' + className + '_' + optionalParams.collection + '.json').then(function(data) {\n return $q.when(data.map(function(item) {\n return new classModel(item);\n }));\n });\n }\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').service('$acDataSourceClasses', function() {\n var self = this;\n\n self.DashboardItemClass = function(initialData) {\n initialData = initialData || {};\n\n return {\n Size: {\n x: initialData.Size && initialData.Size.x ? initialData.Size.x : 0,\n y: initialData.Size && initialData.Size.y ? initialData.Size.y : 0\n },\n Position: {\n x: initialData.Position && initialData.Position.x ? initialData.Position.x : 0,\n y: initialData.Position && initialData.Position.y ? initialData.Position.y : 0\n },\n ItemType: initialData.ItemType || '',\n ItemUuid: initialData.ItemUuid || '',\n ItemTitle: initialData.ItemTitle || '',\n ItemOptions: initialData.ItemOptions || {},\n ItemDependencies: initialData.ItemDependencies || [],\n ItemWidgetType: initialData.ItemWidgetType || 'System'\n };\n };\n\n self.ReportClass = function(initialData) {\n return {\n Contract: initialData.Contract,\n Definition: 'unknown',\n DailyReportEnbaled: false,\n DailyReportBreakDownFirst: '',\n DailyReportBreakDownSecond: '',\n MonthlyCostLimit: 0,\n Currency: '€',\n CreatedAt: null,\n UpdatedAt: null,\n Token: null,\n Reports: []\n };\n };\n\n self.SpendingEntryClass = function() {\n return {\n ReportId: '',\n ReportMonth: -1,\n ReportYear: -1,\n ReportLastSync: 'Xxx',\n ReportCurrency: 'EUR',\n ReportCurrencySymbol: '€',\n ServiceId: '',\n ServiceName: '',\n ServiceCosts: '',\n ServiceType: '',\n ServiceCategory: '',\n ServiceSize: '',\n ServiceTags: [],\n ServiceIcon: '',\n SubscriptionName: '',\n SubscriptionId: '',\n CostCenter: '',\n Department: '',\n ResourceGroup: ''\n };\n };\n\n self.SubscriptionEntryClass = function() {\n return {\n SubscriptionId: '',\n SubscriptionName: '',\n OfferingType: '',\n Country: '',\n Contacts: []\n };\n };\n\n self.TeamMembershipEntryClass = function() {\n return {\n TeamId: '',\n UserId: '',\n FirstName: '',\n LastName: '',\n Contact: '',\n LastLogin: null,\n LoginCount: 0,\n Role: '',\n SignUp: null,\n SubscriptionPermissions: null,\n LiveId: null,\n Type: ''\n };\n };\n\n self.SpendingHistoryEntryClass = function() {\n return {\n HistoryDay: '0000-00-00',\n HistoryCurrency: 'EUR',\n HisotryCurrencySymbol: '€',\n HistoryDayOverallCosts: '',\n SubscriptionId: '',\n SubscriptionDayCosts: '',\n SubscriptionDayCostsDiff: ''\n };\n };\n\n self.ServiceDefinitionClass = function() {\n return {\n ServiceType: '',\n ServiceTitle: '',\n ServiceDescription: ''\n };\n };\n\n self.SpendingFilterClass = function() {\n return {\n Id: '',\n Name: '',\n Owner: '',\n Rules: null,\n TeamId: 'personal'\n };\n };\n\n self.SpendingGroupOptionClass = function(initialData) {\n return {\n GroupLabel: initialData.GroupLabel || undefined,\n GroupProperty: initialData.GroupProperty || undefined,\n RequiredPlan: initialData.RequiredPlan || undefined,\n Compare: initialData.Compare ||'CaseSensitive'\n };\n };\n\n self.PeriodClass = function(initialData) {\n return {\n ReportId: initialData.ReportId\n };\n };\n\n self.ResellerCustomerEntryClass = function() {\n return {\n ReportId: '',\n ReportMonth: -1,\n ReportYear: -1,\n ReportLastSync: 'Xxx',\n ReportCurrency: 'EUR',\n ReportCurrencySymbol: '€',\n AccountId: '',\n CustomerId: '',\n CustomerCompany: '',\n CustomerContact: '',\n CustomerDomain: '',\n CustomerState: '',\n CustomerTenantId: '',\n EntitlementId: '',\n EntitlementName: '',\n Costs: 0.0\n };\n };\n\n self.ResellerCustomerClass = function() {\n return {\n AccountId: '',\n CustomerId: '',\n CustomerCompany: '',\n CustomerContact: '',\n CustomerDomain: '',\n CustomerState: '',\n CustomerTenantId: '',\n ActivatedAt: null,\n NewCommerce: false\n };\n };\n\n self.ReportClassificationClass = function(initialData) {\n return {\n ReportPeriod: initialData.ReportPeriod\n };\n };\n\n self.ResellerT2CustomerEntryClass = function() {\n return {\n ReportId: '',\n ReportMonth: -1,\n ReportYear: -1,\n ReportCurrency: 'EUR',\n ReportCurrencySymbol: '€',\n ResellerAccountId: '',\n ResellerAccountName: '',\n ResellerTeamId: '',\n CustomerId: '',\n CustomerCompany: '',\n CustomerState: '',\n Costs: 0.0\n };\n };\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').service('$acDataSourceWidgetFunctions', function() {\n var self = this;\n\n var localFunction = {};\n\n // calculates the series value for the history diagram\n localFunction['func:0B851B23-0FA1-4450-A859-7861B3F1E01D'] = function(dasboardItemScope) {\n var days = [];\n for (var startDay = -29; startDay <= 0; startDay++) {\n days.push(moment().add(startDay, 'days').format('YYYY-MM-DD'));\n }\n return days;\n };\n\n self.callWidgetFunction = function(functionId, dasboardItemScope, args) {\n var localfunc = localFunction[functionId];\n if (!localfunc) {\n return null;\n } else {\n return localfunc(dasboardItemScope);\n }\n };\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').service('$acDataSourceV1Spendings', function($acDataSourceHelper, $acDataSourceSettings, $acDataSourceClasses, $q, $eaReportData) {\n var self = this;\n\n function generateServiceIconClass(serviceModel) {\n\n // get the icon type\n var iconClass = serviceModel.ServiceCategory.toLowerCase();\n\n // replace spaces with _\n iconClass = iconClass.replace(/ /g, '_');\n\n return iconClass;\n }\n\n function mapSpendingEntries(teamid, contract, dataToken, reportsInfo, loadedData)\n {\n // adapt the data\n var models = [];\n\n // the hash for tags\n var azureTagCaseAdaptionHash = {};\n\n loadedData.forEach(function (report) {\n\n // check if we did not get data\n if (typeof(report) === 'string') {\n console.log(\"Report has no values, skipping\");\n return;\n }\n\n report.services.forEach(function (service) {\n \n // generate the model\n var model = new $acDataSourceClasses.SpendingEntryClass();\n\n // fill the normal properties\n model.ReportId = report.year + '-' + report.month;\n model.ReportMonth = report.month;\n model.ReportYear = report.year;\n model.ReportLastSync = report.lastSync ? new Date(report.lastSync) : null;\n model.ReportCurrency = reportsInfo.Currency;\n model.ReportCurrencySymbol = $acDataSourceHelper.getCurrencySymbolFromCurrency(reportsInfo.Currency);\n model.ServiceId = service.serviceId;\n model.ServiceName = service.name;\n model.ServiceCosts = service.costs;\n model.ServiceCategory = service.type;\n model.ServiceType = service.subtype;\n model.ServiceSize = service.size;\n model.ServiceQuantity = service.quantity;\n model.ServiceQuantityUnit = service.unit;\n model.ServiceTags = service.tags;\n model.ServiceTagsV1 = service.tagsV1;\n model.ServiceTagsV2 = service.tagsV2;\n model.ServiceTagsV3 = service.tagsV3;\n model.SubscriptionName = service.subscription;\n model.SubscriptionId = service.subscriptionId;\n model.CostCenter = service.costcenter;\n model.Department = service.department;\n model.ResourceGroup = service.resourcegroup;\n model.ResourceUri = service.resourecuri;\n model.EntityId = model.ReportId + '-' + model.ServiceId;\n model.ServiceDailyCosts = service.dailyCosts;\n model.ServiceDailyQuantities = service.dailyQuantity;\n model.ServiceIcon = 'servicetype ' + generateServiceIconClass(model);\n\n // generate the dynamic tag properties\n if (service.azureTags) {\n\n Object.keys(service.azureTags).forEach(function (k) {\n\n // check if we had the tag before\n if (!azureTagCaseAdaptionHash[k.toUpperCase()]) {\n azureTagCaseAdaptionHash[k.toUpperCase()] = k;\n }\n\n // get the correct tagname just in case of case sensitive duplicates\n var correctedTagName = 'AzureTag:' + azureTagCaseAdaptionHash[k.toUpperCase()];\n model[correctedTagName] = service.azureTags[k];\n })\n }\n\n // add the model\n models.push(model);\n });\n });\n\n // done\n return $q.when(models);\n }\n\n function loadReportHistoryData(teamid, contract, dataToken, className, cacheHash, optionalParams) {\n\n // load the values from the backend\n return $eaReportData.loadContractDetails(teamid, contract, dataToken, optionalParams).then(function(contractDetails) {\n\n // load the historical data (we support last 30 days\n return $eaReportData.loadReportHistory(teamid, contract, dataToken).then(function(historyData) {\n\n var result = [];\n\n // visit every day\n Object.keys(historyData).forEach(function(day) {\n\n var dayData = historyData[day];\n var overallCosts = dayData.overall;\n\n // get the daybefore\n var dayBefore = historyData[moment(day).add(-1, 'days').format('YYYY-MM-DD')];\n if (!dayBefore) { dayBefore = dayData; }\n\n // visit every subscription\n Object.keys(dayData).forEach(function(subscription) {\n if (subscription !== 'overall') {\n\n // ensure we have a day before\n if (!dayBefore[subscription]) { dayBefore[subscription] = 0.0; }\n /*jshint -W069 */\n if (!dayBefore['overall']) { dayBefore['overall'] = 0.0; }\n\n // build the entity\n var entry = new $acDataSourceClasses.SpendingHistoryEntryClass();\n entry.HistoryDay = day;\n entry.HistoryCurrency = contractDetails.Currency;\n entry.HistoryCurrencySymbol = $acDataSourceHelper.getCurrencySymbolFromCurrency(contractDetails.Currency);\n entry.HistoryDayOverallCosts = overallCosts;\n entry.HistoryDayOverallCostsDiff = overallCosts - dayBefore['overall'];\n entry.SubscriptionId = subscription;\n entry.SubscriptionDayCosts = dayData[subscription];\n entry.SubscriptionDayCostsDiff = dayData[subscription] - dayBefore[subscription];\n\n // check the first day in month\n if (moment(day).date() === 1) {\n entry.SubscriptionDayCostsDiff = entry.SubscriptionDayCosts;\n entry.HistoryDayOverallCostsDiff = entry.HistoryDayOverallCosts;\n }\n\n // should we have negative values set to 0\n if (entry.SubscriptionDayCostsDiff < 0) { entry.SubscriptionDayCostsDiff = 0; }\n if (entry.HistoryDayOverallCostsDiff < 0) { entry.HistoryDayOverallCostsDiff = 0; }\n\n // done\n result.push(entry);\n }\n });\n });\n\n return $q.when(result);\n });\n });\n }\n\n function mapSpendingHistoryEntries(teamid, contract, dataToken, reportsInfo, loadedData)\n {\n var result = [];\n\n // check\n if (!Array.isArray(loadedData) || loadedData.length <= 0) {\n return $q.when([]);\n }\n\n // get the data\n var historyData = loadedData[0];\n\n // visit every day\n Object.keys(historyData).forEach(function(day) {\n\n var dayData = historyData[day];\n var overallCosts = dayData.overall;\n\n // get the daybefore\n var dayBefore = historyData[moment(day).add(-1, 'days').format('YYYY-MM-DD')];\n if (!dayBefore) { dayBefore = dayData; }\n\n // visit every subscription\n Object.keys(dayData).forEach(function(subscription) {\n if (subscription !== 'overall') {\n\n // ensure we have a day before\n if (!dayBefore[subscription]) { dayBefore[subscription] = 0.0; }\n /*jshint -W069 */\n if (!dayBefore['overall']) { dayBefore['overall'] = 0.0; }\n\n // build the entity\n var entry = new $acDataSourceClasses.SpendingHistoryEntryClass();\n entry.HistoryDay = day;\n entry.HistoryCurrency = reportsInfo.Currency;\n entry.HistoryCurrencySymbol = $acDataSourceHelper.getCurrencySymbolFromCurrency(reportsInfo.Currency);\n entry.HistoryDayOverallCosts = overallCosts;\n entry.HistoryDayOverallCostsDiff = overallCosts - dayBefore['overall'];\n entry.SubscriptionId = subscription;\n entry.SubscriptionDayCosts = dayData[subscription];\n entry.SubscriptionDayCostsDiff = dayData[subscription] - dayBefore[subscription];\n\n // check the first day in month\n if (moment(day).date() === 1) {\n entry.SubscriptionDayCostsDiff = entry.SubscriptionDayCosts;\n entry.HistoryDayOverallCostsDiff = entry.HistoryDayOverallCosts;\n }\n\n // should we have negative values set to 0\n if (entry.SubscriptionDayCostsDiff < 0) { entry.SubscriptionDayCostsDiff = 0; }\n if (entry.HistoryDayOverallCostsDiff < 0) { entry.HistoryDayOverallCostsDiff = 0; }\n\n // done\n result.push(entry);\n }\n });\n });\n\n return $q.when(result);\n }\n\n self.registerDataSources = function(dataSourceManager) {\n\n // loads the different group options\n dataSourceManager.registerDataSource('global', 'SpendingGroupOptionClass', 'spendings', $acDataSourceSettings.loadStaticDataGenericCallback);\n\n // Register load for ReportClasses\n $acDataSourceHelper.registerDataSourceReportClass(dataSourceManager, null);\n $acDataSourceHelper.registerDataSourceReportClass(dataSourceManager, 'spendings');\n\n // Register load for Spendings\n $acDataSourceHelper.registerDataSourceSpendingEntryClassWithMappingCallback(dataSourceManager, null, 1, mapSpendingEntries);\n $acDataSourceHelper.registerDataSourceSpendingEntryClassWithMappingCallback(dataSourceManager, 'spendings', 1, mapSpendingEntries);\n\n // Register load for SpendingFilterClass\n $acDataSourceHelper.registerDataSourceSpendingFilerClass(dataSourceManager, null);\n $acDataSourceHelper.registerDataSourceSpendingFilerClass(dataSourceManager, 'spendings');\n\n // Register load for SpendingHistoryEntryClass\n $acDataSourceHelper.registerDataSourceSpendingHistoryEntryClassWithMappingCallback(dataSourceManager, null, 1, mapSpendingHistoryEntries);\n $acDataSourceHelper.registerDataSourceSpendingHistoryEntryClassWithMappingCallback(dataSourceManager, 'spendings', 1, mapSpendingHistoryEntries);\n }\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').service('$acDataSourceV2Spendings', function($acDataSourceSettings, $acDataSourceClasses, $q, $eaBackend, $injector, $acDataSourceHelper) {\n var self = this;\n\n // load the subscriptions\n function loadSubscriptions(teamid, contract, dataToken /*, className, optionalParams */) {\n return $eaBackend.dataGetContractSubscriptions(teamid, contract, dataToken).then(function(loadedSubscriptions) {\n\n var models = [];\n\n loadedSubscriptions.forEach(function(subscription) {\n\n var model = new $acDataSourceClasses.SubscriptionEntryClass();\n model.SubscriptionId = subscription.Id;\n model.SubscriptionName = subscription.Name;\n model.OfferingType = subscription.Offering;\n model.Country = subscription.Country;\n model.Contacts = subscription.Contacts ? subscription.Contacts : [];\n models.push(model);\n });\n\n return $q.when(models);\n });\n }\n\n // called from our infrastructure to the define the different\n // datasources this service handles\n self.registerDataSources = function(dataSourceManager) {\n\n // register the dashboard items for the csp portal\n $acDataSourceHelper.registerDataSourceDashboardItemClass(dataSourceManager, null, 'spending_dashboard_definitions.json');\n $acDataSourceHelper.registerDataSourceDashboardItemClass(dataSourceManager, 'spendings.v2', 'spending_dashboard_definitions_v2.json');\n\n // Register the correct Report loader\n $acDataSourceHelper.registerDataSourceReportClass(dataSourceManager, 'spendings.v2');\n\n // loads the subscription entries\n dataSourceManager.registerDataSource('global', 'SubscriptionEntryClass', null, loadSubscriptions);\n $acDataSourceHelper.registerDataSourceSpendingEntryClassForCoreApi(dataSourceManager, 'spendings.v2');\n\n // loads the different group options\n dataSourceManager.registerDataSource('global', 'SpendingGroupOptionClass', 'spendings.v2', $acDataSourceSettings.loadStaticDataGenericCallback);\n\n // load the available periods\n $acDataSourceHelper.registerDataSourcePeriodClass(dataSourceManager, 'spendings');\n };\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').service('$acDataSourceV3Spendings', function($acDataSourceHelper, $acDataSourceSettings, $acDataSourceClasses, $q) {\n var self = this;\n\n function mapSpendingHistoryEntries(teamid, contract, dataToken, reportsInfo, loadedData) {\n\n if (!Array.isArray(loadedData) || loadedData.length !== 1) {\n return $q.when([]);\n }\n\n // get the data\n var historyData = loadedData[0];\n\n // set the result\n var result = [];\n\n // visit every item\n historyData.ServiceCosts.forEach(function (item, itemIdx) {\n\n // build the entity\n var entry = new $acDataSourceClasses.SpendingHistoryEntryClass();\n entry.HistoryDay = moment(historyData.StartDate).add(itemIdx, 'days').format(\"YYYY-MM-DD\");\n entry.HistoryCurrency = reportsInfo.Currency;\n entry.HistoryCurrencySymbol = $acDataSourceHelper.getCurrencySymbolFromCurrency(reportsInfo.Currency);\n entry.HistoryDayOverallCosts = item;\n entry.SubscriptionId = 'All';\n entry.SubscriptionDayCosts = item;\n\n // done\n result.push(entry);\n });\n\n return $q.when(result);\n }\n\n self.registerDataSources = function(dataSourceManager) {\n\n // define the collectionid\n var collectionId = 'spendings.v3';\n\n // load the correct data file\n $acDataSourceHelper.registerDataSourceDashboardItemClass(dataSourceManager, collectionId, 'spending_dashboard_definitions_v3.json');\n\n // loads the different group options\n dataSourceManager.registerDataSource('global', 'SpendingGroupOptionClass', collectionId, $acDataSourceSettings.loadStaticDataGenericCallback);\n\n // Register the generic method to load PeriodClasses correctly\n $acDataSourceHelper.registerDataSourcePeriodClass(dataSourceManager, collectionId);\n\n // Register the correct Report loader\n $acDataSourceHelper.registerDataSourceReportClass(dataSourceManager, collectionId);\n\n // Register the data report content loader\n $acDataSourceHelper.registerDataSourceSpendingEntryClassForCoreApi(dataSourceManager, collectionId);\n\n // History\n $acDataSourceHelper.registerDataSourceSpendingHistoryEntryClassWithMappingCallback(dataSourceManager, 'spendings.v2', 2, mapSpendingHistoryEntries);\n $acDataSourceHelper.registerDataSourceSpendingHistoryEntryClassWithMappingCallback(dataSourceManager, collectionId, 3, mapSpendingHistoryEntries);\n };\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').service('$acDataSourceCsp', function($acDataSourceSettings, $acDataSourceHelper, $acDataSourceClasses, $q, $eaBackend, $acTimelineGenerator, $injector, $eaBackendDataModeSelector, $acDataSourceHelperCspGenericSummary) {\n var self = this;\n\n function loadCSPDashboardItemsByTemplate(teamid, contract, dataToken, className, currentHashKey, optionalParams, dashboardTemplate) {\n var query = $acDataSourceHelper.getQueryDashboardItemsCallback(dashboardTemplate);\n return query(teamid, contract, dataToken, className, currentHashKey, optionalParams);\n }\n\n // defines all functions for the CSP dashboard\n function loadCSPDashboardItems(teamid, contract, dataToken, className, currentHashKey, optionalParams) {\n var dashboardTemplate = 'csp_account_dashboard_definitions.json';\n if (contract === 'CSP:Welcome') { dashboardTemplate = 'csp_welcome_dashboard_definitions.json'; }\n return loadCSPDashboardItemsByTemplate(teamid, contract, dataToken, className, currentHashKey, optionalParams, dashboardTemplate);\n }\n\n function loadCSPDashboardItemsT2(teamid, contract, dataToken, className, currentHashKey, optionalParams) {\n var dashboardTemplate = 'csp_account_t2_dashboard_definitions.json';\n if (contract === 'CSP:Welcome') { dashboardTemplate = 'csp_welcome_dashboard_definitions.json'; }\n return loadCSPDashboardItemsByTemplate(teamid, contract, dataToken, className, currentHashKey, optionalParams, dashboardTemplate);\n }\n\n function loadCSPDashboardItemsV2(teamid, contract, dataToken, className, currentHashKey, optionalParams) {\n var dashboardTemplate = 'csp_account_dashboard_definitions_v2.json';\n if (optionalParams && optionalParams.collection && optionalParams.collection === 'csp.ea.v2') { dashboardTemplate = 'csp_account_ea_dashboard_definitions_v2.json'; };\n if (contract === 'CSP:Welcome') { dashboardTemplate = 'csp_welcome_dashboard_definitions.json'; }\n return loadCSPDashboardItemsByTemplate(teamid, contract, dataToken, className, currentHashKey, optionalParams, dashboardTemplate);\n }\n\n function loadCSPDashboardItemsT2V2(teamid, contract, dataToken, className, currentHashKey, optionalParams) {\n var dashboardTemplate = 'csp_account_t2_dashboard_definitions.json';\n if (contract === 'CSP:Welcome') { dashboardTemplate = 'csp_welcome_dashboard_definitions.json'; }\n return loadCSPDashboardItemsByTemplate(teamid, contract, dataToken, className, currentHashKey, optionalParams, dashboardTemplate);\n }\n\n // loads all customer report items for a specific contract\n function loadCustomerReportItems(teamid, contract, dataToken, className, currentHashKey, optionalParams) {\n\n // inject dynamically to prevent circular dependency\n var $eaDataCoordinator = $injector.get('$eaDataCoordinator');\n\n // load the available periods\n return $eaDataCoordinator.query(teamid, contract, dataToken, 'PeriodClass', optionalParams).then(function(periods) {\n\n // load the customer index first\n return $eaDataCoordinator.query(teamid, contract, dataToken, 'ResellerCustomerClass', optionalParams).then(function(customers) {\n\n // get the accountid\n var accountId = contract.split(':')[1];\n\n // loading the account\n return $eaBackend.dataCspGetAccount(teamid, accountId, dataToken).then(function (account) {\n\n // index the customer array\n var customerIndex = customers.buildIndex('CustomerTenantId');\n\n // query the required data\n var pendingPeriodRequests = [];\n periods.forEach(function (period) {\n\n var result = [];\n\n // now load the reports for the last 12 months\n var pendingPeriodCall = $eaBackend.dataCspGetCustomersSpendingsInAccount(teamid, accountId, period.ReportId, dataToken).then(function (spendings) {\n\n spendings.forEach(function (spending) {\n\n var customerReport = new $acDataSourceClasses.ResellerCustomerEntryClass();\n customerReport.ReportId = spending.ReportId;\n customerReport.ReportMonth = spending.ReportId.split('-')[1];\n customerReport.ReportYear = spending.ReportId.split('-')[0];\n customerReport.ReportLastSync = null;\n customerReport.ReportCurrency = account.Currency;\n customerReport.ReportCurrencySymbol = account.Currency && account.Currency === 'EUR' ? '€' : account.Currency;\n customerReport.AccountId = spending.AccountId;\n\n var customer = customerIndex[spending.MicrosoftCustomerId];\n if (customer) {\n customerReport.CustomerId = customer.CustomerId;\n customerReport.CustomerCompany = customer.CustomerCompany;\n customerReport.CustomerContact = customer.CustomerContact;\n customerReport.CustomerDomain = customer.CustomerDomain;\n customerReport.CustomerState = customer.CustomerState;\n customerReport.CustomerTenantId = customer.CustomerTenantId;\n customerReport.ActivatedAt = customer.ActivatedAt;\n customerReport.CustomerNewCommerce = customer.newCommerce || false;\n }\n\n customerReport.Costs = spending.Costs;\n\n // override the billing cycle\n if ($eaBackendDataModeSelector.isBillingCycleEnabled() && $eaBackendDataModeSelector.getBillingCycleDay() !== 1) {\n customerReport.Costs = spending.CostsBC ? spending.CostsBC : 0.0;\n }\n\n customerReport.EntitlementId = spending.EntitlementId;\n customerReport.EntitlementName = spending.EntitlementName;\n customerReport.EntitlementSymbol = \"servicetype azure_app_service\";\n\n result.push(customerReport);\n });\n\n return $q.when(result);\n });\n\n pendingPeriodRequests.push(pendingPeriodCall);\n });\n\n return $q.all(pendingPeriodRequests).then(function (results) {\n var resultList = [];\n results.forEach(function (result) {\n resultList.push.apply(resultList, result);\n });\n\n return $q.when(resultList);\n });\n });\n });\n });\n }\n\n function loadCustomerReportItemsV2(teamid, contract, dataToken, className, currentHashKey, optionalParams) {\n\n // get the accountid\n var accountId = contract.split(':')[1];\n\n // load the data\n return $acDataSourceHelperCspGenericSummary.loadGenericView(teamid, accountId, 'meter', 'csp', dataToken, className, currentHashKey, optionalParams);\n }\n\n function loadAllCustomerItems(teamid, contract, dataToken, className, currentHashKey, optionalParams) {\n var accountId = contract.split(':')[1];\n\n // load the customers of a reseller\n return $eaBackend.dataCspGetCustomersInAccount(teamid, accountId, dataToken).then(function(customers) {\n\n var result = [];\n\n customers.forEach(function(customer) {\n var customerReport = new $acDataSourceClasses.ResellerCustomerClass();\n customerReport.AccountId = accountId;\n customerReport.CustomerId = customer.microsoftCustomerId;\n customerReport.CustomerCompany = customer.customerCompany;\n customerReport.CustomerContact = customer.customerContact;\n customerReport.CustomerDomain = customer.customerDefaultDomain;\n customerReport.CustomerState = customer.state;\n customerReport.CustomerTenantId = customer.customerTenantId;\n customerReport.CustomerTeamId = customer.customerTeamId ? customer.customerTeamId : customer.microsoftCustomerId;\n customerReport.CustomerContractId = customer.customerContractId ? customer.customerContractId : customer.customerTenantId;\n customerReport.CustomerNewCommerce = customer.newCommerce || false;\n\n // set the correct activation date\n if (customer.activatedAt == null ||customer.activatedAt === undefined) {\n customerReport.ActivatedAt = undefined;\n } else if (customer.activatedAt.indexOf('1970-') === 0) {\n customerReport.ActivatedAt = undefined;\n } else {\n customerReport.ActivatedAt = customer.activatedAt;\n }\n\n result.push(customerReport);\n });\n\n // order ersult\n result.sortOn('CustomerCompany');\n\n // done\n return $q.when(result);\n });\n }\n\n // load the available periods\n function loadAvailablePeriodClasses() {\n\n var startDate = new Date();\n if ($eaBackendDataModeSelector.isBillingCycleEnabled()) {\n startDate = $acTimelineGenerator.addMonth(new Date());\n }\n var monthCount = 13;\n\n var monthList = $acTimelineGenerator.createMonthList(-1 * monthCount, startDate).map(function(month) {\n return $acDataSourceClasses.PeriodClass({ReportId: month});\n });\n\n return $q.when(monthList);\n }\n\n // defines all functions for the CSP account model\n // ###\n\n // defines all functions for the CSP customer model\n // ###\n\n // called from our infrastructure to the define the different\n // datasources this service handles\n self.registerDataSources = function(dataSourceManager) {\n\n // register the dashboard items for the csp portal\n dataSourceManager.registerDataSource('global', 'DashboardItemClass', 'csp', loadCSPDashboardItems, $acDataSourceHelper.getStoreDashboardItemsCallback(), $acDataSourceHelper.getDeleteDashboardItemsCallback());\n dataSourceManager.registerDataSource('global', 'DashboardItemClass', 'csp.t2', loadCSPDashboardItemsT2, $acDataSourceHelper.getStoreDashboardItemsCallback(), $acDataSourceHelper.getDeleteDashboardItemsCallback());\n dataSourceManager.registerDataSource('global', 'DashboardItemClass', 'csp.v2', loadCSPDashboardItemsV2, $acDataSourceHelper.getStoreDashboardItemsCallback(), $acDataSourceHelper.getDeleteDashboardItemsCallback());\n dataSourceManager.registerDataSource('global', 'DashboardItemClass', 'csp.ea.v2', loadCSPDashboardItemsV2, $acDataSourceHelper.getStoreDashboardItemsCallback(), $acDataSourceHelper.getDeleteDashboardItemsCallback());\n dataSourceManager.registerDataSource('global', 'DashboardItemClass', 'csp.t2.v2', loadCSPDashboardItemsT2V2, $acDataSourceHelper.getStoreDashboardItemsCallback(), $acDataSourceHelper.getDeleteDashboardItemsCallback());\n\n // loads the different group options\n dataSourceManager.registerDataSource('global', 'SpendingGroupOptionClass', 'csp', $acDataSourceSettings.loadStaticDataGenericCallback);\n\n // spending filter class\n $acDataSourceHelper.registerDataSourceSpendingFilerClass(dataSourceManager, 'csp');\n\n // loads the customer index\n dataSourceManager.registerDataSource('global', 'ResellerCustomerClass', 'csp', loadAllCustomerItems);\n\n // loads the customer data\n dataSourceManager.registerDataSource('global', 'ResellerCustomerEntryClass', 'csp', loadCustomerReportItems);\n dataSourceManager.registerDataSource('global', 'ResellerCustomerEntryClass', 'csp.v2', loadCustomerReportItemsV2);\n dataSourceManager.registerDataSource('global', 'ResellerCustomerEntryClass', 'csp.ea.v2', loadCustomerReportItemsV2);\n\n\n // load the available periods\n dataSourceManager.registerDataSource('global', 'PeriodClass', 'csp', loadAvailablePeriodClasses);\n };\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').service('$acDataSourceCspGsi', function($acDataSourceSettings, $acDataSourceHelper, $acDataSourceClasses, $q, $eaBackend, $acTimelineGenerator, $injector, $eaBackendDataModeSelector, $acDataSourceHelperCspGenericSummary) {\n var self = this;\n\n function loadCSPDashboardItemsByTemplate(dashboardTemplate) {\n return $acDataSourceSettings.loadDataFromStaticUrl(dashboardTemplate).then(function(items) {\n return $q.when(items.map(function(item) { return new $acDataSourceClasses.DashboardItemClass(item); }))\n });\n }\n\n function loadCSPGsiDashboardItems(teamid, contract, dataToken, className, currentHashKey, optionalParams) {\n var dashboardTemplate = 'csp_gsi_dashboard_definitions.json';\n return loadCSPDashboardItemsByTemplate(dashboardTemplate);\n }\n\n // load the available periods\n function loadAvailablePeriodClasses() {\n\n var monthList = $acTimelineGenerator.createMonthList(-13, $acTimelineGenerator.addMonth(new Date())).map(function(month) {\n return $acDataSourceClasses.PeriodClass({ReportId: month});\n });\n\n return $q.when(monthList);\n }\n\n function loadAccountReportItems(teamid, contract, dataToken, className, currentHashKey, optionalParams) {\n\n // prepare result items\n var resultItems = [];\n\n // load gsi settingsd\n return $eaBackend.dataCspGetGsiSettings(teamid, dataToken).then(function(gsiAccount) {\n\n // get all acocunts becasue we do not have a contractId\n return $eaBackend.dataCspGetAccounts(teamid, dataToken).then(function(accounts) {\n\n return accounts.forEachExecuteAsyncOperationParallel($q, function(account) {\n\n return $acDataSourceHelperCspGenericSummary.loadGenericView(teamid, account.AccountId, 'v2customer', 'gsi.v1', dataToken, className, currentHashKey, optionalParams).then(function (result) {\n\n resultItems.appendArray(result.map(function (item) {\n\n // map in our standard ICON\n item.CustomerIcon = 'fa-building-o';\n\n // map in the account information\n item.AccountName = account.Name;\n item.AccountCountry = account.Country;\n item.AccountCurrency = account.Currency;\n item.AccountExchangeRate = account.ExchangeRate;\n item.AccountType = account.TierLevel;\n\n // convert the costs to the right currency\n item.Costs = item.Costs * item.AccountExchangeRate;\n\n // adjust the currency symbols\n item.ReportCurrency = gsiAccount.referenceCurrency;\n item.ReportCurrencySymbol = gsiAccount.referenceCurrencySymbol;\n\n // done\n return item;\n }));\n })\n });\n }).then(function() {\n return $q.when(resultItems);\n })\n });\n }\n\n self.registerDataSources = function(dataSourceManager) {\n\n // register the dashboard items for the gsi portal\n dataSourceManager.registerDataSource('global', 'DashboardItemClass', 'gsi.v1', loadCSPGsiDashboardItems);\n\n // loads the different group options\n dataSourceManager.registerDataSource('global', 'SpendingGroupOptionClass', 'gsi.v1', $acDataSourceSettings.loadStaticDataGenericCallback);\n\n // spending filter class\n $acDataSourceHelper.registerDataSourceSpendingFilerClass(dataSourceManager, 'gsi.v1');\n\n // load the data\n dataSourceManager.registerDataSource('global', 'ResellerCustomerEntryClass', 'gsi.v1', loadAccountReportItems);\n\n // load the available periods\n dataSourceManager.registerDataSource('global', 'PeriodClass', 'gsi.v1', loadAvailablePeriodClasses);\n };\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').service('$acDataSourceTeaming', function($acDataSourceSettings, $acDataSourceClasses, $q, $eaBackend) {\n var self = this;\n\n function loadTeamMembership(teamid, contract, dataToken /*, className, currentHashKey, optionalParams */) {\n return $eaBackend.dataGetTeamProfile(teamid, true, dataToken).then(function(loadedTeamProfile) {\n\n var models = [];\n\n if (loadedTeamProfile.Members !== null && loadedTeamProfile.Members !== undefined) {\n loadedTeamProfile.Members.forEach(function (member) {\n var memberModel = new $acDataSourceClasses.TeamMembershipEntryClass();\n memberModel.TeamId = loadedTeamProfile.Id;\n memberModel.UserId = member.UserId;\n memberModel.FirstName = member.FirstName;\n memberModel.LastName = member.LastName;\n memberModel.Contact = member.Contact;\n memberModel.LastLogin = member.LastLogin;\n memberModel.LoginCount = member.Logins;\n memberModel.Role = member.Role;\n memberModel.SignUp = member.SignUp;\n memberModel.SubscriptionPermissions = member.Subscriptions;\n memberModel.LiveId = member.LiveId;\n memberModel.Type = member.Type;\n models.push(memberModel);\n });\n }\n\n return models;\n });\n }\n\n // called from our infrastructure to the define the different\n // datasources this service handles\n self.registerDataSources = function(dataSourceManager) {\n\n // Allows to load the membership\n dataSourceManager.registerDataSource('global', 'TeamMembershipEntryClass', null, loadTeamMembership);\n\n };\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').service('$acDataSourceRi', function($acDataSourceSettings, $acDataSourceHelper, $acDataSourceClasses, $q, $eaBackend, $eaBackendAzureCachedContentLoader, $acCacheIdentifierGenerator) {\n var self = this;\n\n function loadRIDashboardItemsByTemplate(dashboardTemplate) {\n return $acDataSourceSettings.loadDataFromStaticUrl(dashboardTemplate).then(function(items) {\n return $q.when(items.map(function(item) { return new $acDataSourceClasses.DashboardItemClass(item); }))\n });\n }\n\n // The RI Dashboard Template loaded\n function loadRIDashboardItems(teamid, contract, dataToken, className, currentHashKey, optionalParams) {\n var dashboardTemplate = 'ri_purchase_dashboard_definitions.json';\n if (contract === 'RI:Welcome') { dashboardTemplate = 'ri_welcome_dashboard_definitions.json'; }\n return loadRIDashboardItemsByTemplate(dashboardTemplate);\n }\n\n // called from our infrastructure to the define the different\n // datasources this service handles\n self.registerDataSources = function(dataSourceManager) {\n\n // our collection id\n var collectionId = 'ri.v1';\n\n // register the dashboard items for the csp portal\n dataSourceManager.registerDataSource('global', 'DashboardItemClass', 'ri', loadRIDashboardItems);\n\n // register the data load stuff\n dataSourceManager.registerDataSource('global', 'RiAnalysisResultItemClass', collectionId, function (teamid, contract, dataToken, className, cacheHash, optionalParams) {\n\n // generate the cacheIdentifier\n var cacheIdentifier = $acCacheIdentifierGenerator.buildDailyCacheIdentifier(className);\n return $eaBackendAzureCachedContentLoader.dataRequestCachedResourceWithRetry(teamid, contract, optionalParams.ResourceInstanceId, cacheIdentifier, dataToken, undefined, false, {cacheIdentifierExtenion: cacheIdentifier, resourceEndpoint: $eaBackend.dataGetRiAnalysisResult, queryoptions:optionalParams.query });\n });\n\n dataSourceManager.registerDataSource('global', 'RiAnalysisVirtualMachineItemClass', collectionId, function (teamid, contract, dataToken, className, cacheHash, optionalParams) {\n return $eaBackendAzureCachedContentLoader.dataRequestCachedResourceWithRetry(teamid, contract, undefined, cacheHash, dataToken, undefined, false, {cacheIdentifierExtenion: cacheHash, resourceEndpoint: function(teamId, contract, resourceInstanceId, cacheIdentifier, dataToken, retry) {\n return $eaBackend.dataGetRiVirtualMachines(teamId, contract, cacheHash, dataToken, retry);\n }});\n });\n };\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').service('$acDataSourceCspResellerManagement', function($acDataSourceSettings, $acDataSourceHelper, $acDataSourceClasses, $q, $eaBackend, $acTimelineGenerator, $injector, $eaBackendDataModeSelector, $acDataSourceHelperCspGenericSummary, $eaBackendAzureCachedContentLoader, rfc4122) {\n var self = this;\n\n function loadCSPDashboardItemsByTemplate(dashboardTemplate) {\n return $acDataSourceSettings.loadDataFromStaticUrl(dashboardTemplate).then(function(items) {\n return $q.when(items.map(function(item) { return new $acDataSourceClasses.DashboardItemClass(item); }))\n });\n }\n\n function loadCSPResellerDashboardItems(teamid, contract, dataToken, className, currentHashKey, optionalParams) {\n var dashboardTemplate = 'csp_reseller_dashboard_definitions.json';\n return loadCSPDashboardItemsByTemplate(dashboardTemplate);\n }\n\n // load the available periods\n function loadAvailablePeriodClasses() {\n\n var monthList = $acTimelineGenerator.createMonthList(-13, $acTimelineGenerator.addMonth(new Date())).map(function(month) {\n return $acDataSourceClasses.PeriodClass({ReportId: month});\n });\n\n return $q.when(monthList);\n }\n\n function loadResellerItems(teamid, contract, dataToken, className, currentHashKey, optionalParams) {\n\n function resourceLoadRouting(teamid, contractNumber, resourceId, cacheIdentifier, jwtToken, retry) {\n return $eaBackend.dataGetCspResellerSummary(teamid, resourceId, cacheIdentifier, jwtToken, retry);\n }\n\n // prepare result items\n var resultItems = [];\n\n // load the current hashes for this report category\n return $eaBackend.dataGetTeamHashes(teamid, 'ResellerSummary', dataToken).then(function(hashesMap) {\n\n // ensure we have at least an empty hashmap\n hashesMap = hashesMap || {};\n\n // get all periods\n return loadAvailablePeriodClasses().then(function (periods) {\n\n return periods.forEachExecuteAsyncOperationParallel($q, function (period) {\n\n // build the hash key \n var cacheHash = hashesMap[period.ReportId] || rfc4122.v4();\n\n // load the resources\n return $eaBackendAzureCachedContentLoader.dataRequestCachedResourcesWithRetry(teamid, contract, [{\n Id: period.ReportId,\n CacheIdentifier: cacheHash\n }], dataToken, {\n resourceEndpoint: resourceLoadRouting\n }).then(function (loadedSummaryData) {\n\n if (Array.isArray(loadedSummaryData)) {\n resultItems.appendArray(loadedSummaryData[0]);\n }\n })\n }).then(function () {\n return $q.when(resultItems);\n });\n });\n });\n }\n\n self.registerDataSources = function(dataSourceManager) {\n\n // register the dashboard items for the gsi portal\n dataSourceManager.registerDataSource('global', 'DashboardItemClass', 'reseller.v1', loadCSPResellerDashboardItems);\n\n // loads the different group options\n dataSourceManager.registerDataSource('global', 'SpendingGroupOptionClass', 'reseller.v1', $acDataSourceSettings.loadStaticDataGenericCallback);\n\n // spending filter class\n $acDataSourceHelper.registerDataSourceSpendingFilerClass(dataSourceManager, 'reseller.v1');\n\n // load the data\n dataSourceManager.registerDataSource('global', 'ResellerT2CustomerEntryClass', 'reseller.v1', loadResellerItems);\n\n // load the available periods\n dataSourceManager.registerDataSource('global', 'PeriodClass', 'reseller.v1', loadAvailablePeriodClasses);\n };\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').service('$eaBlog', function($http, $q) {\n var self = this;\n\n self.get = function(maxElements) {\n maxElements = maxElements || 5;\n\n return $http.get('https://public-api.wordpress.com/rest/v1/sites/35723366/posts/?pretty=true&order_by=date&category=azure-cost-monitor&number=' + maxElements).then(function(result) {\n if (result.status === 200 || result.status === 201) {\n return $q.when(result.data.posts);\n } else {\n return $q.reject();\n }\n }).catch(function(){\n return $q.reject();\n });\n };\n\n self.shortenedExcerpt = function(blogEntry, length) {\n\n // remove elements\n blogEntry.excerpt = blogEntry.excerpt.removeHeading('

');\n blogEntry.excerpt = blogEntry.excerpt.removeTrailing('\\n');\n blogEntry.excerpt = blogEntry.excerpt.removeTrailing('

');\n blogEntry.excerpt = blogEntry.excerpt.removeTrailing('[…]');\n\n // shorten\n var shortenText = null;\n if (blogEntry.excerpt.length < length) {\n shortenText = blogEntry.excerpt;\n } else {\n shortenText = blogEntry.excerpt.substring(0, length);\n }\n\n // cut on the last word\n var lastSpace = shortenText.lastIndexOf(' ');\n return shortenText.substring(0, lastSpace);\n };\n\n});\n","'use strict';\n\nangular.module('azureCostsFeApp').service('$eaDownload', function() {\n var self = this;\n\n // For updates check http://danml.com/download.html\n self.do = function(data, strFileName, strMimeType) {\n\n var self = window, // this script is only for browsers anyway...\n u = 'application/octet-stream', // this default mime also triggers iframe downloads\n m = strMimeType || u,\n x = data,\n D = document,\n a = D.createElement('a'),\n z = function(a){return String(a);},\n B = (self.Blob || self.MozBlob || self.WebKitBlob || z);\n B=B.call ? B.bind(self) : Blob ;\n var fn = strFileName || 'download',\n blob,\n fr;\n\n function d2b(u) {\n var p= u.split(/[:;,]/),\n t= p[1],\n dec= p[2] === 'base64' ? atob : decodeURIComponent,\n bin= dec(p.pop()),\n mx= bin.length,\n i= 0,\n uia= new Uint8Array(mx);\n\n for(i;i