##// END OF EJS Templates
components: admin panel componentized
ergo -
Show More
@@ -0,0 +1,31 b''
1 // # Copyright (C) 2010-2016 RhodeCode GmbH
2 // #
3 // # This program is free software: you can redistribute it and/or modify
4 // # it under the terms of the GNU Affero General Public License, version 3
5 // # (only), as published by the Free Software Foundation.
6 // #
7 // # This program is distributed in the hope that it will be useful,
8 // # but WITHOUT ANY WARRANTY; without even the implied warranty of
9 // # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 // # GNU General Public License for more details.
11 // #
12 // # You should have received a copy of the GNU Affero General Public License
13 // # along with this program. If not, see <http://www.gnu.org/licenses/>.
14 // #
15 // # This program is dual-licensed. If you wish to learn more about the
16 // # AppEnlight Enterprise Edition, including its added features, Support
17 // # services, and proprietary license terms, please see
18 // # https://rhodecode.com/licenses/
19
20 angular.module('appenlight.components.adminView', [])
21 .component('adminView', {
22 templateUrl: 'components/views/admin-view/admin-view.html',
23 controller: AdminViewController
24 });
25
26 AdminViewController.$inject = ['$state'];
27
28 function AdminViewController($state) {
29 this.$state = $state;
30 console.info('AdminViewController');
31 }
This diff has been collapsed as it changes many lines, (11722 lines changed) Show them Hide them
@@ -2703,6 +2703,15 b" angular.module('appenlight.components', ["
2703 'appenlight.components.jiraIntegrationConfigView',
2703 'appenlight.components.jiraIntegrationConfigView',
2704 'appenlight.components.slackIntegrationConfigView',
2704 'appenlight.components.slackIntegrationConfigView',
2705 'appenlight.components.webhooksIntegrationConfigView',
2705 'appenlight.components.webhooksIntegrationConfigView',
2706 'appenlight.components.adminView',
2707 'appenlight.components.adminApplicationsListView',
2708 'appenlight.components.adminUsersListView',
2709 'appenlight.components.adminUsersCreateView',
2710 'appenlight.components.adminGroupsListView',
2711 'appenlight.components.adminGroupsCreateView',
2712 'appenlight.components.adminConfigurationView',
2713 'appenlight.components.adminSystemView',
2714 'appenlight.components.adminPartitionsView',
2706 'appenlight.components.settingsView'
2715 'appenlight.components.settingsView'
2707 ]);
2716 ]);
2708 angular.module('appenlight.directives', [
2717 angular.module('appenlight.directives', [
@@ -2988,3642 +2997,3426 b' function kickstartAE(initialUserData) {'
2988 );
2997 );
2989
2998
2990
2999
2991 $templateCache.put('components/views/applications-integrations-view/applications-integrations-view.html',
3000 $templateCache.put('components/views/admin-applications-list-view/admin-applications-list-view.html',
2992 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.application && $state.is('applications.integrations')\"></ng-include>\n" +
3001 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.applications\"></ng-include>\n" +
2993 "\n" +
2994 "<ui-view>\n" +
2995 " <div class=\"panel panel-default\" ng-show=\"!$ctrl.loading.application\">\n" +
2996 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
2997 " <div class=\"panel-body\">\n" +
2998 "\n" +
3002 "\n" +
2999 " <a class=\"btn btn-default integration\"\n" +
3003 "<div class=\"panel panel-default\" ng-if=\"!$ctrl.loading.applications\">\n" +
3000 " data-ui-sref=\"applications.integrations.edit({resourceId:$ctrl.resource.resource_id, integration:'bitbucket'})\">\n" +
3004 " <div class=\"panel-heading\">\n" +
3001 " <span class=\"fa fa-fw fa-bitbucket fa-3x pull-left\"></span>\n" +
3002 " <strong>Bitbucket</strong>\n" +
3003 "\n" +
3005 "\n" +
3004 " <p>Send issues and reports to Bitbucket</p>\n" +
3006 " Currently active applications: {{$ctrl.applications.length}}\n" +
3005 " </a>\n" +
3006 "\n" +
3007 "\n" +
3007 " <a class=\"btn btn-default integration\"\n" +
3008 " </div>\n" +
3008 " data-ui-sref=\"applications.integrations.edit({resourceId:$ctrl.resource.resource_id, integration:'campfire'})\">\n" +
3009 " <span class=\"fa fa-fw fa-comment fa-3x pull-left\"></span>\n" +
3010 " <strong>Campfire</strong>\n" +
3011 "\n" +
3009 "\n" +
3012 " <p>Receive reports and alerts in your Campfire rooms</p>\n" +
3010 " <table st-table=\"displayedCollection\" st-safe-src=\"$ctrl.applications\" class=\"table table-striped\">\n" +
3013 " </a>\n" +
3011 " <thead>\n" +
3012 " <tr>\n" +
3013 " <th st-sort=\"resource_name\"><a>Application name</a></th>\n" +
3014 " <th st-sort=\"owner_user_name\"><a>Owner User</a></th>\n" +
3015 " <th st-sort=\"owner_group_name\"><a>Owner Group</a></th>\n" +
3016 " <th class=\"options\"></th>\n" +
3017 " </tr>\n" +
3018 " <tr>\n" +
3019 " <th><input st-search=\"resource_name\" placeholder=\"search for application\" class=\"form-control\" type=\"search\" st-delay=\"1\"/></th>\n" +
3020 " <th><input st-search=\"owner_user_name\" placeholder=\"search for user\" class=\"form-control\" type=\"search\" st-delay=\"1\"/></th>\n" +
3021 " <th><input st-search=\"owner_group_name\" placeholder=\"search for group\" class=\"form-control\" type=\"search\" st-delay=\"1\"/></th>\n" +
3022 " <th></th>\n" +
3023 " </tr>\n" +
3024 " </thead>\n" +
3025 " <tbody>\n" +
3014 "\n" +
3026 "\n" +
3015 " <a class=\"btn btn-default integration\"\n" +
3027 " <tr ng-repeat=\"resource in displayedCollection track by resource.resource_id\">\n" +
3016 " data-ui-sref=\"applications.integrations.edit({resourceId:$ctrl.resource.resource_id, integration:'flowdock'})\">\n" +
3028 " <td> {{resource.resource_name}}</td>\n" +
3017 " <span class=\"fa fa-fw fa-envelope fa-3x pull-left\"></span>\n" +
3029 " <td>{{resource.owner_user_name}}</td>\n" +
3018 " <strong>Flowdock</strong>\n" +
3030 " <td>{{resource.owner_group_name}}</td>\n" +
3031 " <td>\n" +
3032 " <a class=\"btn btn-default btn-sm\" data-ui-sref=\"applications.update({resourceId:resource.resource_id})\" data-toggle=\"tooltip\" title=\"Update application\"><span class=\"fa fa-cog\"></span></a>\n" +
3033 " </td>\n" +
3034 " </tr>\n" +
3035 " <tfoot>\n" +
3036 " <tr>\n" +
3037 " <td colspan=\"4\" class=\"text-center\">\n" +
3038 " <div st-pagination=\"\" st-items-by-page=\"100\" st-displayed-pages=\"7\"></div>\n" +
3039 " </td>\n" +
3040 " </tr>\n" +
3041 " </tfoot>\n" +
3042 " </tbody>\n" +
3043 " </table>\n" +
3019 "\n" +
3044 "\n" +
3020 " <p>Receive reports and alerts on your Flowdock team\n" +
3045 "</div>\n"
3021 " inbox</p>\n" +
3046 );
3022 " </a>\n" +
3047
3048
3049 $templateCache.put('components/views/admin-configuration-view/admin-configuration-view.html',
3050 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.config\"></ng-include>\n" +
3023 "\n" +
3051 "\n" +
3024 " <a class=\"btn btn-default integration\"\n" +
3052 "<div class=\"panel panel-default\" ng-show=\"!$ctrl.loading.config\">\n" +
3025 " data-ui-sref=\"applications.integrations.edit({resourceId:$ctrl.resource.resource_id, integration:'github'})\">\n" +
3053 " <div class=\"panel-heading\">\n" +
3026 " <span class=\"fa fa-fw fa-github fa-3x pull-left\"></span>\n" +
3054 " <h3 class=\"panel-title\">Basic Configuration</h3>\n" +
3027 " <strong>Github</strong>\n" +
3055 " </div>\n" +
3056 " <div class=\"panel-body\">\n" +
3057 " <h2>Visual</h2>\n" +
3058 " <form class=\"form-horizontal\">\n" +
3059 " <div class=\"form-group\">\n" +
3060 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
3061 " Footer HTML\n" +
3062 " </label>\n" +
3063 " <div class=\"col-sm-8 col-lg-9\">\n" +
3064 " <textarea class=\"form-control\" type=\"text\" ng-model=\"$ctrl.configs.global.template_footer_html.value\" style=\"min-height: 150px\"></textarea>\n" +
3065 " </div>\n" +
3066 " </div>\n" +
3067 " </form>\n" +
3028 "\n" +
3068 "\n" +
3029 " <p>Send issues and reports to Github</p>\n" +
3069 " <h2>Functional</h2>\n" +
3030 " </a>\n" +
3031 "\n" +
3070 "\n" +
3032 " <a class=\"btn btn-default integration\"\n" +
3071 " <form class=\"form-horizontal\">\n" +
3033 " data-ui-sref=\"applications.integrations.edit({resourceId:$ctrl.resource.resource_id, integration:'hipchat'})\">\n" +
3072 " <div class=\"form-group\">\n" +
3034 " <span class=\"fa fa-fw fa-comment fa-3x pull-left\"></span>\n" +
3073 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
3035 " <strong>HipChat</strong>\n" +
3074 " Show user groups to non-admin users\n" +
3075 " </label>\n" +
3076 " <div class=\"col-sm-8 col-lg-9\">\n" +
3077 " <button type=\"button\" class=\"btn btn-default\" ng-model=\"$ctrl.configs.global.list_groups_to_non_admins.value\" uib-btn-checkbox>\n" +
3078 " Enable\n" +
3079 " </button>\n" +
3080 " </div>\n" +
3081 " </div>\n" +
3082 " </form>\n" +
3036 "\n" +
3083 "\n" +
3037 " <p>Receive reports and alerts in your Hipchat chanels</p>\n" +
3084 " <h2>Global Rate Limiting</h2>\n" +
3038 " </a>\n" +
3039 "\n" +
3085 "\n" +
3040 " <a class=\"btn btn-default integration\"\n" +
3086 " <form class=\"form-horizontal\">\n" +
3041 " data-ui-sref=\"applications.integrations.edit({resourceId:$ctrl.resource.resource_id, integration:'jira'})\">\n" +
3087 " <div class=\"form-group\">\n" +
3042 " <span class=\"fa fa-fw fa-ticket fa-3x pull-left\"></span>\n" +
3088 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
3043 " <strong>Jira</strong>\n" +
3089 " Ignore reports per minute/per application\n" +
3090 " </label>\n" +
3091 " <div class=\"col-sm-8 col-lg-9\">\n" +
3092 " <input class=\"form-control\" type=\"number\" ng-model=\"$ctrl.configs.global.per_application_reports_rate_limit.value\" />\n" +
3093 " </div>\n" +
3094 " </div>\n" +
3044 "\n" +
3095 "\n" +
3045 " <p>Send issues and reports to Jira</p>\n" +
3096 " <div class=\"form-group\">\n" +
3046 " </a>\n" +
3097 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
3098 " Ignore logs per minute/per application\n" +
3099 " </label>\n" +
3100 " <div class=\"col-sm-8 col-lg-9\">\n" +
3101 " <input class=\"form-control\" type=\"number\" ng-model=\"$ctrl.configs.global.per_application_logs_rate_limit.value\" />\n" +
3102 " </div>\n" +
3103 " </div>\n" +
3047 "\n" +
3104 "\n" +
3048 " <a class=\"btn btn-default integration\"\n" +
3105 " <div class=\"form-group\">\n" +
3049 " data-ui-sref=\"applications.integrations.edit({resourceId:$ctrl.resource.resource_id, integration:'slack'})\">\n" +
3106 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
3050 " <span class=\"fa fa-fw fa-comment fa-3x pull-left\"></span>\n" +
3107 " Ignore metrics per minute/per application\n" +
3051 " <strong>Slack</strong>\n" +
3108 " </label>\n" +
3109 " <div class=\"col-sm-8 col-lg-9\">\n" +
3110 " <input class=\"form-control\" type=\"number\" ng-model=\"$ctrl.configs.global.per_application_metrics_rate_limit.value\" />\n" +
3111 " </div>\n" +
3112 " </div>\n" +
3052 "\n" +
3113 "\n" +
3053 " <p>Receive reports and alerts in your Slack chanels</p>\n" +
3114 " </form>\n" +
3054 " </a>\n" +
3055 "\n" +
3115 "\n" +
3056 " <a class=\"btn btn-default integration\"\n" +
3116 " <hr/>\n" +
3057 " data-ui-sref=\"applications.integrations.edit({resourceId:$ctrl.resource.resource_id, integration:'webhooks'})\">\n" +
3058 " <span class=\"fa fa-fw fa-cloud-upload fa-3x pull-left\"></span>\n" +
3059 " <strong>Webhooks</strong>\n" +
3060 "\n" +
3117 "\n" +
3061 " <p>Notify third party API's of your reports and alerts</p>\n" +
3118 " <a class=\"btn btn-primary\" ng-click=\"$ctrl.save()\">Save configuration</a>\n" +
3062 " </a>\n" +
3063 " </div>\n" +
3064 " </div>\n" +
3119 " </div>\n" +
3065 "</ui-view>\n"
3066 );
3067
3068
3069 $templateCache.put('components/views/applications-list-view/applications-list-view.html',
3070 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.applications\"></ng-include>\n" +
3071 "\n" +
3120 "\n" +
3072 "<div class=\"panel panel-default\" ng-show=\"!$ctrl.loading.applications\">\n" +
3121 "</div>\n" +
3073 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
3074 " <div class=\"panel-body\" ng-if=\"$ctrl.applications.length === 0 \">\n" +
3075 "\n" +
3122 "\n" +
3076 " <p>You have to create a new application first.</p>\n" +
3077 "\n" +
3123 "\n" +
3124 "<div class=\"panel panel-default\">\n" +
3125 " <div class=\"panel-heading\">\n" +
3126 " <h3 class=\"panel-title\">Plugin Configuration</h3>\n" +
3127 " </div>\n" +
3128 " <div class=\"panel-body\">\n" +
3129 " <plugin-config section=\"'admin.config'\">\n" +
3130 " </plugin-config>\n" +
3078 " </div>\n" +
3131 " </div>\n" +
3079 "\n" +
3080 " <table class=\"table table-striped\" ng-if=\"$ctrl.applications.length > 0\">\n" +
3081 " <thead>\n" +
3082 " <tr>\n" +
3083 " <th class=\"resource_name\">Resource Name</th>\n" +
3084 " <th class=\"domains\">Domains</th>\n" +
3085 " <th class=\"options\">Options</th>\n" +
3086 " </tr>\n" +
3087 " </thead>\n" +
3088 " <tbody>\n" +
3089 " <tr class=\"r{{$index+1}}\" ng-repeat=\"application in $ctrl.applications\">\n" +
3090 " <td>{{application.resource_name}}</td>\n" +
3091 " <td>{{application.domains}}</td>\n" +
3092 " <td class=\"options\">\n" +
3093 " <a class=\"btn btn-default\" data-ui-sref=\"applications.update({resourceId:application.resource_id})\" data-toggle=\"tooltip\" title=\"Update application\"><span class=\"fa fa-cog\"></span> Update</a>\n" +
3094 " <a class=\"btn btn-default\" data-ui-sref=\"applications.integrations({resourceId:application.resource_id})\" data-toggle=\"tooltip\" title=\"Manage Integrations\"><span class=\"fa fa-wrench\"></span> Integrations</a>\n" +
3095 " </td>\n" +
3096 " </tr>\n" +
3097 " </tbody>\n" +
3098 " </table>\n" +
3099 "\n" +
3100 "</div>\n"
3132 "</div>\n"
3101 );
3133 );
3102
3134
3103
3135
3104 $templateCache.put('components/views/applications-purge-logs-view/applications-purge-logs-view.html',
3136 $templateCache.put('components/views/admin-groups-create-view/admin-groups-create-view.html',
3105 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.applications\"></ng-include>\n" +
3137 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.group\"></ng-include>\n" +
3138 "\n" +
3139 "<div ng-show=\"!$ctrl.loading.group\">\n" +
3106 "\n" +
3140 "\n" +
3107 "<div ng-show=\"!$ctrl.loading.applications\">\n" +
3108 " <div class=\"panel panel-default\">\n" +
3141 " <div class=\"panel panel-default\">\n" +
3109 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
3110 " <div class=\"panel-body\">\n" +
3142 " <div class=\"panel-body\">\n" +
3111 "\n" +
3143 " <form name=\"$ctrl.groupForm\" class=\"form-horizontal\" ng-submit=\"$ctrl.createGroup()\">\n" +
3112 " <form method=\"post\" class=\"form-horizontal\" name=\"$ctrl.form\" ng-submit=\"$ctrl.purgeLogs()\">\n" +
3144 " <div class=\"form-group\" id=\"row-group_name\">\n" +
3113 " <div class=\"form-group\">\n" +
3145 " <data-form-errors errors=\"$ctrl.groupForm.ae_validation.group_name\"></data-form-errors>\n" +
3114 " <label class=\"control-label col-sm-3 col-lg-2\">Application:</label>\n" +
3146 " <label for=\"group_name\" id=\"label-group_name\" class=\"control-label col-sm-4 col-lg-3\">\n" +
3115 "\n" +
3147 " Group name\n" +
3116 " <div class=\"col-sm-9 col-lg-10 form-inline\">\n" +
3148 " <span class=\"required\">*</span>\n" +
3117 " <select ng-model=\"$ctrl.selectedResource\" ng-change=\"$ctrl.getCommonKeys()\"\n" +
3149 " </label>\n" +
3118 " ng-options=\"r.resource_id as r.resource_name for r in $ctrl.applications\" class=\"form-control\"></select>\n" +
3150 " <div class=\"col-sm-8 col-lg-9\">\n" +
3151 " <input class=\"form-control\" id=\"group_name\" name=\"group_name\" type=\"text\" ng-model=\"$ctrl.group.group_name\">\n" +
3119 " </div>\n" +
3152 " </div>\n" +
3120 " </div>\n" +
3153 " </div>\n" +
3121 "\n" +
3154 "\n" +
3122 " <div class=\"form-group\">\n" +
3155 " <div class=\"form-group\" id=\"row-description\">\n" +
3123 " <label class=\"control-label col-sm-3 col-lg-2\">Namespace:</label>\n" +
3156 " <data-form-errors errors=\"$ctrl.groupForm.ae_validation.description\"></data-form-errors>\n" +
3124 "\n" +
3157 " <label for=\"description\" id=\"label-description\" class=\"control-label col-sm-4 col-lg-3\">\n" +
3125 " <div class=\"col-sm-9 col-lg-10\">\n" +
3158 " Description\n" +
3126 " <input type=\"text\" name=\"namespace\" ng-model=\"$ctrl.namespace\"\n" +
3159 " <span class=\"required\">*</span>\n" +
3127 " placeholder=\"Namespace to filter on\" uib-typeahead=\"ns for ns in $ctrl.commonNamespaces\"\n" +
3160 " </label>\n" +
3128 " class=\"form-control\">\n" +
3161 " <div class=\"col-sm-8 col-lg-9\">\n" +
3162 " <input class=\"form-control\" id=\"description\" name=\"description\" type=\"text\" ng-model=\"$ctrl.group.description\">\n" +
3129 " </div>\n" +
3163 " </div>\n" +
3130 " </div>\n" +
3164 " </div>\n" +
3131 "\n" +
3165 "\n" +
3132 " <div class=\"form-group\">\n" +
3133 " <label class=\"control-label col-sm-3 col-lg-2\"></label>\n" +
3134 "\n" +
3166 "\n" +
3135 " <div class=\"col-sm-8 col-lg-9 \">\n" +
3167 " <div class=\"form-group\" id=\"row-submit\">\n" +
3136 " <input class=\"form-control btn btn-primary\" name=\"submit\" type=\"submit\" value=\"Purge logs meeting the criteria\">\n" +
3168 " <label for=\"submit\" id=\"label-submit\" class=\"control-label col-sm-4 col-lg-3\">\n" +
3169 " </label>\n" +
3170 " <div class=\"col-sm-8 col-lg-9\">\n" +
3171 " <input class=\"form-control btn btn-primary\" id=\"submit\" name=\"submit\" type=\"submit\" value=\"{{$ctrl.$state.params.groupId ? 'Update' : 'Add'}} Group\">\n" +
3137 " </div>\n" +
3172 " </div>\n" +
3138 " </div>\n" +
3173 " </div>\n" +
3139 "\n" +
3140 " </form>\n" +
3174 " </form>\n" +
3141 " </div>\n" +
3175 " </div>\n" +
3142 " </div>\n" +
3176 " </div>\n" +
3143 "</div>\n"
3144 );
3145
3146
3147 $templateCache.put('components/views/applications-update-view/applications-update-view.html',
3148 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.application\"></ng-include>\n" +
3149 "\n" +
3177 "\n" +
3150 "<div ng-show=\"!$ctrl.loading.application\">\n" +
3151 "\n" +
3178 "\n" +
3152 " <div class=\"panel panel-default\">\n" +
3179 " <div class=\"panel panel-default\" ng-if=\"$ctrl.group.id\">\n" +
3153 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
3180 " <div class=\"panel-heading\">\n" +
3181 " <h3 class=\"panel-title\">Permissions summary</h3>\n" +
3182 " </div>\n" +
3154 " <div class=\"panel-body\">\n" +
3183 " <div class=\"panel-body\">\n" +
3184 " <h3>Direct application permissions</h3>\n" +
3155 "\n" +
3185 "\n" +
3156 " <div class=\"row\" ng-show=\"$ctrl.resource.resource_id\">\n" +
3186 " <ul class=\"list-group\">\n" +
3157 " <div class=\"col-sm-6\">\n" +
3187 " <li ng-repeat=\"perm in $ctrl.resourcePermissions.group.application\" class=\"animate-repeat list-group-item\">\n" +
3188 " <strong>{{ perm.self.resource_name }}</strong>\n" +
3158 "\n" +
3189 "\n" +
3159 " <uib-tabset>\n" +
3190 " <div class=\"pull-right\">\n" +
3160 " <uib-tab>\n" +
3161 " <uib-tab-heading>\n" +
3162 " API keys\n" +
3163 " </uib-tab-heading>\n" +
3164 "\n" +
3191 "\n" +
3165 " <p><strong>PRIVATE API KEY:</strong></p>\n" +
3192 " <span class=\"btn btn-primary btn-xs m-r-1\" disabled ng-repeat=\"perm_name in perm.permissions\">{{ perm.self.owner ? 'Resource owner' : perm_name }}</span>\n" +
3166 " <p>\n" +
3167 " <div class=\"well well-sm\">{{ $ctrl.resource.api_key }}</div>\n" +
3168 " </p>\n" +
3169 " <p><strong>PUBLIC API KEY</strong> (for javascript clients):</p>\n" +
3170 " <p>\n" +
3171 " <div class=\"well well-sm\">{{ $ctrl.resource.public_key }}</div>\n" +
3172 " </p>\n" +
3173 " <p><small>Your key will be used to identify to which application your data\n" +
3174 " belongs to please keep them private at all times.</small></p>\n" +
3175 "\n" +
3176 " </uib-tab>\n" +
3177 "\n" +
3178 " <uib-tab>\n" +
3179 " <uib-tab-heading>\n" +
3180 " <span class=\"btn btn-danger btn-xs\"><span class=\"fa fa-exclamation-triangle\"></span></span> Regenerate API keys\n" +
3181 " </uib-tab-heading>\n" +
3182 " <p>Are you sure you want to regenerate API KEY for this application?</p>\n" +
3183 " <p>All client application keys will need to be updated.</p>\n" +
3184 " <form ng-submit=\"$ctrl.regenerateAPIKeys()\" name=\"$ctrl.regenerateAPIKeysForm\" class=\"form-inline\">\n" +
3185 " <data-form-errors errors=\"$ctrl.regenerateAPIKeysForm.ae_validation.password\"></data-form-errors>\n" +
3186 " <div class=\"form-group\">\n" +
3187 " <input type=\"password\" name=\"confirm\"\n" +
3188 " placeholder=\"Enter your password to proceed\" class=\"form-control\" ng-model=\"$ctrl.regenerateAPIKeysPassword\">\n" +
3189 " <input type=\"submit\" class=\"btn btn-danger\" value=\"Confirm\">\n" +
3190 " </div>\n" +
3191 " </form>\n" +
3192 " </uib-tab>\n" +
3193 " </uib-tabset>\n" +
3194 " </div>\n" +
3195 " <div class=\"col-sm-6 text-center\">\n" +
3196 " <h2 class=\"m-t-0\">How to connect your application?</h2>\n" +
3197 " <p>Visit our <a href=\"{{AeConfig.urls.docs}}\"><strong>developer documentation</strong></a> for step-by-step integration instructions.</p>\n" +
3198 " <div class=\"clearfix\"></div>\n" +
3199 " <p class=\"text-center\">\n" +
3200 " <a href=\"{{AeConfig.urls.docs}}\"><img src=\"/static/appenlight/images/logos/django_small.png\" alt=\"Django Logo\">\n" +
3201 " <img src=\"/static/appenlight/images/logos/pyramid_small.png\" alt=\"Pyramid Logo\">\n" +
3202 " <img src=\"/static/appenlight/images/logos/flask_small.png\" alt=\"Flask Logo\"></a>\n" +
3203 "\n" +
3193 "\n" +
3204 " <a href=\"{{AeConfig.urls.docs}}\"><img src=\"/static/appenlight/images/logos/js_small.png\" alt=\"Javascript Logo\">\n" +
3194 " <a class=\"btn btn-default btn-xs\" data-uib-tooltip=\"Visit Application\" data-ui-sref=\"applications.update({resourceId:perm.self.resource_id})\">\n" +
3205 " <img src=\"/static/appenlight/images/logos/nodejs.png\" alt=\"Node.js\"></a>\n" +
3195 " <span class=\"fa fa-cog\"></span>\n" +
3206 " <img src=\"/static/appenlight/images/logos/ruby_small.png\" alt=\"Ruby Logo\">\n" +
3207 " <img src=\"/static/appenlight/images/logos/php_small.png\" alt=\"PHP Logo\">\n" +
3208 " </a>\n" +
3196 " </a>\n" +
3209 "\n" +
3210 " </p>\n" +
3211 " </div>\n" +
3212 " </div>\n" +
3213 "\n" +
3214 " <hr ng-show=\"$ctrl.resource.resource_id\">\n" +
3215 "\n" +
3216 " <form method=\"post\" class=\"form-horizontal\" name=\"$ctrl.BasicForm\" ng-submit=\"$ctrl.updateBasicForm()\" novalidate>\n" +
3217 " <div class=\"form-group\">\n" +
3218 " <data-form-errors errors=\"$ctrl.BasicForm.ae_validation.resource_name\"></data-form-errors>\n" +
3219 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
3220 " Application name\n" +
3221 " <span class=\"required\">*</span>\n" +
3222 " </label>\n" +
3223 "\n" +
3224 " <div class=\" col-sm-8 col-lg-9 \">\n" +
3225 " <input class=\"form-control\" name=\"resource_name\" placeholder=\"Application Name\" type=\"text\" ng-model=\"$ctrl.resource.resource_name\">\n" +
3226 " </div>\n" +
3227 "\n" +
3228 "\n" +
3229 " </div>\n" +
3197 " </div>\n" +
3198 " </li>\n" +
3199 " </ul>\n" +
3230 "\n" +
3200 "\n" +
3231 " <div class=\"form-group\">\n" +
3201 " <h3>Direct dashboard permissions</h3>\n" +
3232 " <data-form-errors errors=\"$ctrl.BasicForm.ae_validation.domains\"></data-form-errors>\n" +
3233 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
3234 " Domain names for CORS headers\n" +
3235 " </label>\n" +
3236 " <div class=\" col-sm-8 col-lg-9 \">\n" +
3237 " <textarea class=\"form-control\" name=\"domains\" ng-model=\"$ctrl.resource.domains\"></textarea>\n" +
3238 " <p class=\"description\">Required for Javascript error tracking (one line one domain, skip http:// part)</p>\n" +
3239 " </div>\n" +
3240 "\n" +
3241 "\n" +
3202 "\n" +
3242 " </div>\n" +
3203 " <ul class=\"list-group\">\n" +
3243 " <div class=\"form-group\" ng-show=\"$ctrl.resource.resource_id\">\n" +
3204 " <li ng-repeat=\"perm in $ctrl.resourcePermissions.group.dashboard\" class=\"animate-repeat list-group-item\">\n" +
3244 " <data-form-errors errors=\"$ctrl.BasicForm.ae_validation.default_grouping\"></data-form-errors>\n" +
3205 " <strong>{{ perm.self.resource_name }}</strong>\n" +
3245 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
3246 " Default grouping for errors\n" +
3247 " </label>\n" +
3248 " <div class=\" col-sm-8 col-lg-9 \">\n" +
3249 " <select class=\"form-control\" name=\"default_grouping\" ng-model=\"$ctrl.resource.default_grouping\" ng-options=\"i[0] as i[1] for i in $ctrl.groupingOptions\"></select>\n" +
3250 " </div>\n" +
3251 "\n" +
3206 "\n" +
3252 " </div>\n" +
3207 " <div class=\"pull-right\">\n" +
3253 " <div class=\"form-group\" ng-show=\"$ctrl.resource.resource_id\">\n" +
3208 " <span class=\"btn btn-primary btn-xs m-r-1\" disabled ng-repeat=\"perm_name in perm.permissions\">{{ perm.self.owner ? 'Resource owner' : perm_name }}</span>\n" +
3254 " <data-form-errors errors=\"$ctrl.BasicForm.ae_validation.error_report_threshold\"></data-form-errors>\n" +
3255 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
3256 " Alert on error reports\n" +
3257 " <span class=\"required\">*</span>\n" +
3258 " </label>\n" +
3259 " <div class=\" col-sm-8 col-lg-9 \">\n" +
3260 " <input class=\"form-control\" name=\"error_report_threshold\" type=\"text\" ng-model=\"$ctrl.resource.error_report_threshold\">\n" +
3261 " <p class=\"description\">Application requires to send at least this amount of error reports per minute to open alert</p>\n" +
3262 " </div>\n" +
3263 " </div>\n" +
3264 " <div class=\"form-group\" ng-show=\"$ctrl.resource.resource_id\">\n" +
3265 " <data-form-errors errors=\"$ctrl.BasicForm.ae_validation.slow_report_threshold\"></data-form-errors>\n" +
3266 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
3267 " Alert on slow reports\n" +
3268 " <span class=\"required\">*</span>\n" +
3269 " </label>\n" +
3270 "\n" +
3209 "\n" +
3271 " <div class=\" col-sm-8 col-lg-9 \">\n" +
3210 " <a class=\"btn btn-default btn-xs\" data-uib-tooltip=\"Visit Dashboard\" data-ui-sref=\"dashboard.update({resourceId:perm.self.resource_id})\">\n" +
3272 " <input class=\"form-control\" name=\"slow_report_threshold\" type=\"text\" ng-model=\"$ctrl.resource.slow_report_threshold\">\n" +
3211 " <span class=\"fa fa-cog\"></span>\n" +
3273 " <p class=\"description\">Application requires to send at least this amount of slow reports per minute to open alert</p>\n" +
3212 " </a>\n" +
3274 " </div>\n" +
3275 " </div>\n" +
3276 " <div class=\"form-group\" ng-show=\"$ctrl.resource.resource_id\">\n" +
3277 " <data-form-errors errors=\"$ctrl.BasicForm.ae_validation.allow_permanent_storage\"></data-form-errors>\n" +
3278 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
3279 " Permanent logs\n" +
3280 " </label>\n" +
3281 " <div class=\" col-sm-8 col-lg-9\">\n" +
3282 " <input class=\"form-control\" name=\"allow_permanent_storage\" type=\"checkbox\" ng-model=\"$ctrl.resource.allow_permanent_storage\">\n" +
3283 " <p class=\"description\">Allow permanent storage of logs in separate DB partitions (only administrator can enable this feature)</p>\n" +
3284 " </div>\n" +
3285 " </div>\n" +
3213 " </div>\n" +
3286 " <div class=\"form-group\">\n" +
3214 " </li>\n" +
3287 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
3215 " </ul>\n" +
3288 "\n" +
3289 " </label>\n" +
3290 "\n" +
3216 "\n" +
3291 " <div class=\" col-sm-8 col-lg-9 \">\n" +
3292 " <input class=\"form-control btn btn-primary\" name=\"submit\" type=\"submit\" value=\"{{$ctrl.resource.resource_id? 'Update' : 'Create'}} Application\">\n" +
3293 " </div>\n" +
3294 " </div>\n" +
3295 " </form>\n" +
3296 " </div>\n" +
3217 " </div>\n" +
3218 "\n" +
3297 " </div>\n" +
3219 " </div>\n" +
3298 "\n" +
3220 "\n" +
3299 " <div class=\"panel panel-default\" ng-show=\"$ctrl.resource.resource_id\">\n" +
3221 "\n" +
3222 " <div class=\"panel panel-default\" ng-if=\"$ctrl.group.id\">\n" +
3300 " <div class=\"panel-heading\">\n" +
3223 " <div class=\"panel-heading\">\n" +
3301 " <h3 class=\"panel-title\">Plugins</h3>\n" +
3224 " <h3 class=\"panel-title\">User list</h3>\n" +
3302 " </div>\n" +
3225 " </div>\n" +
3303 " <div class=\"panel-body\">\n" +
3226 " <div class=\"panel-body\">\n" +
3304 "\n" +
3227 "\n" +
3305 " <plugin-config resource=\"$ctrl.resource\"\n" +
3228 " <form name=\"add_permission\" class=\"form-inline\" ng-submit=\"$ctrl.addUser()\">\n" +
3306 " section=\"'application.update'\"\n" +
3229 " <div class=\"form-group\">\n" +
3307 " ng-if=\"$ctrl.resource.resource_id\">\n" +
3230 " <input placeholder=\"Username or email\" type=\"text\" class=\"autocomplete form-control\" ng-model=\"$ctrl.form.autocompleteUser\" uib-typeahead=\"u for u in $ctrl.searchUsers($viewValue) | limitTo:8\" typeahead-loading=\"searchingUsers\" typeahead-wait-ms=\"250\"/>\n" +
3308 " </plugin-config>\n" +
3231 " </div>\n" +
3232 " <div class=\"form-group\">\n" +
3233 " <button class=\"btn btn-info\" ng-disabled=\"!$ctrl.form.autocompleteUser\"><span class=\"fa fa-user\"></span> Add user</button>\n" +
3234 " </div>\n" +
3235 " </form>\n" +
3309 "\n" +
3236 "\n" +
3310 " </div>\n" +
3237 " </div>\n" +
3311 " </div>\n" +
3312 "\n" +
3238 "\n" +
3313 " <div class=\"panel panel-default m-t-1\" ng-show=\"$ctrl.resource.resource_id\">\n" +
3239 " <table st-table=\"displayedCollection\" st-safe-src=\"$ctrl.users\" class=\"table table-striped\">\n" +
3314 " <div class=\"panel-heading\">\n" +
3240 " <thead>\n" +
3315 " <h3 class=\"panel-title\">API Testing</h3>\n" +
3241 " <tr>\n" +
3316 " </div>\n" +
3242 " <th st-sort=\"user_name\"><a>Username</a></th>\n" +
3317 " <div class=\"panel-body\">\n" +
3243 " <th st-sort=\"email\"><a>Email</a></th>\n" +
3318 " <p>Please be sure to add at least one <a data-ui-sref=\"user.alert_channels.email\"><strong>email alert channel</strong></a> for your account.</p>\n" +
3244 " <th st-sort=\"status\"><a>Status</a></th>\n" +
3319 " <p>This will enable AppEnlight to send you notification emails about errors inside your $ctrl.</p>\n" +
3245 " <th st-sort=\"first_name\"><a>First Name</a></th>\n" +
3320 " <p><strong>After this is done you can use this CURL commands to test APIs:</strong></p>\n" +
3246 " <th st-sort=\"last_name\"><a>Last Name</a></th>\n" +
3321 " <p>(Please note that the data like execution times is semi randomly generated)</p>\n" +
3247 " <th st-sort=\"last_login_date\"><a>Last login</a></th>\n" +
3322 " <uib-tabset>\n" +
3248 " <th class=\"options\" style=\"width: 130px\"></th>\n" +
3323 " <uib-tab>\n" +
3249 " </tr>\n" +
3324 " <uib-tab-heading>\n" +
3250 " <tr>\n" +
3325 " Log API\n" +
3251 " <th><input st-search=\"user_name\" placeholder=\"search for user name\" class=\"form-control\" type=\"search\" st-delay=\"1\"/></th>\n" +
3326 " </uib-tab-heading>\n" +
3252 " <th><input st-search=\"email\" placeholder=\"search for email\" class=\"form-control\" type=\"search\" st-delay=\"1\"/></th>\n" +
3253 " <th></th>\n" +
3254 " <th><input st-search=\"first_name\" placeholder=\"search for first name\" class=\"form-control\" type=\"search\" st-delay=\"1\"/></th>\n" +
3255 " <th><input st-search=\"last_name\" placeholder=\"search for last name\" class=\"form-control\" type=\"search\" st-delay=\"1\"/></th>\n" +
3256 " <th><input st-search=\"last_login_date\" placeholder=\"search for last name\" class=\"form-control\" type=\"search\" st-delay=\"1\"/></th>\n" +
3257 " <th></th>\n" +
3258 " </tr>\n" +
3259 " </thead>\n" +
3260 " <tbody>\n" +
3327 "\n" +
3261 "\n" +
3328 " <div class=\"codehilite\">\n" +
3262 " <tr ng-repeat=\"user in displayedCollection\">\n" +
3329 " <pre class=\"m-a-0\">\n" +
3263 " <td><img src=\"{{user.gravatar_url}}\" class=\"avatar\"> {{user.user_name}}</td>\n" +
3330 "curl -H \"Content-Type: application/json\" -k {{AeConfig.urls.baseUrl}}api/logs?protocol_version=0.5\\&ampapi_key={{$ctrl.resource.api_key}} -d '\n" +
3264 " <td>{{user.email}}</td>\n" +
3331 " [\n" +
3265 " <td class=\"text-center\"><span class=\"fa\" ng-class=\"{'fa-check-circle':user.status, 'fa-times':!user.status}\"></span></td>\n" +
3332 " {\n" +
3266 " <td>{{user.first_name}}</td>\n" +
3333 " \"log_level\": \"WARNING\",\n" +
3267 " <td>{{user.last_name}}</td>\n" +
3334 " \"message\": \"OMG ValueError happened\",\n" +
3268 " <td><span data-uib-tooltip=\"{{user.last_login_date}}\">{{user.last_login_date | isoToRelativeTime}}</span></td>\n" +
3335 " \"namespace\": \"some.namespace.indicator\",\n" +
3269 " <td>\n" +
3336 " \"request_id\": \"SOME_UUID\",\n" +
3270 " <a class=\"btn btn-default btn-sm\" data-ui-sref=\"admin.user.update({userId:user.id})\"><span class=\"fa fa-cog\"></span></a>\n" +
3337 " \"permanent\": false,\n" +
3271 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
3338 " \"primary_key\": \"random_key\",\n" +
3272 " <a class=\"btn btn-danger btn-sm\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span></a>\n" +
3339 " \"server\": \"some.server.hostname\",\n" +
3273 " <ul class=\"dropdown-menu\">\n" +
3340 " \"date\": \"{{$ctrl.momentJs.utc().milliseconds(0).toISOString()}}\",\n" +
3274 " <li><a>No</a></li>\n" +
3341 " \"tags\": [[\"tag1\",\"value\"], [\"tag2\", 5]]\n" +
3275 " <li><a ng-click=\"$ctrl.removeUser(user)\">Yes</a></li>\n" +
3342 " },\n" +
3276 " </ul>\n" +
3343 " {\n" +
3277 " </span>\n" +
3344 " \"log_level\": \"ERROR\",\n" +
3278 " </tr>\n" +
3345 " \"message\": \"OMG ValueError happened2\",\n" +
3279 " <tfoot>\n" +
3346 " \"namespace\": \"some.namespace.indicator\",\n" +
3280 " <tr>\n" +
3347 " \"request_id\": \"SOME_UUID\",\n" +
3281 " <td colspan=\"7\" class=\"text-center\">\n" +
3348 " \"permanent\": false,\n" +
3282 " <div st-pagination=\"\" st-items-by-page=\"50\" st-displayed-pages=\"7\"></div>\n" +
3349 " \"server\": \"some.server.hostname\",\n" +
3283 " </td>\n" +
3350 " \"date\": \"{{$ctrl.momentJs.utc().milliseconds(0).toISOString()}}\"\n" +
3284 " </tr>\n" +
3351 " }\n" +
3285 " </tfoot>\n" +
3352 " ]'\n" +
3286 " </tbody>\n" +
3353 " </pre>\n" +
3287 " </table>\n" +
3354 " </div>\n" +
3355 "\n" +
3288 "\n" +
3356 " </uib-tab>\n" +
3289 " </div>\n" +
3357 "\n" +
3290 "\n" +
3358 " <uib-tab>\n" +
3359 " <uib-tab-heading>\n" +
3360 " Report API\n" +
3361 " </uib-tab-heading>\n" +
3362 "\n" +
3291 "\n" +
3363 " <div class=\"codehilite\">\n" +
3292 "</div>\n"
3364 " <pre class=\"m-a-0\">\n" +
3293 );
3365 "curl -H \"Content-Type: application/json\" -k {{AeConfig.urls.baseUrl}}api/reports?protocol_version=0.5\\&ampapi_key={{$ctrl.resource.api_key}} -d '\n" +
3294
3366 " [{\n" +
3295
3367 " \"client\": \"your-client-name-python\",\n" +
3296 $templateCache.put('components/views/admin-groups-list-view/admin-groups-list-view.html',
3368 " \"language\": \"python\",\n" +
3297 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.groups\"></ng-include>\n" +
3369 " \"view_name\": \"views/foo:bar\",\n" +
3370 " \"server\": \"SERVERNAME/INSTANCENAME\",\n" +
3371 " \"priority\": 5,\n" +
3372 " \"error\": \"OMG ValueError happened\",\n" +
3373 " \"occurences\":1,\n" +
3374 " \"http_status\": 500,\n" +
3375 " \"tags\": [[\"tag1\",\"value\"], [\"tag2\", 5]],\n" +
3376 " \"username\": \"USER\",\n" +
3377 " \"url\": \"HTTP://SOMEURL\",\n" +
3378 " \"ip\": \"127.0.0.1\",\n" +
3379 " \"start_time\": \"{{$ctrl.momentJs.utc().milliseconds(0).toISOString()}}\",\n" +
3380 " \"end_time\": \"{{$ctrl.momentJs.utc().milliseconds(0).add(2, 'seconds').toISOString()}}\",\n" +
3381 " \"user_agent\": \"BROWSER_AGENT\",\n" +
3382 " \"extra\": [[\"message\",\"CUSTOM MESSAGE\"], [\"custom_value\", \"some payload\"]],\n" +
3383 " \"request_id\": \"SOME_UUID\",\n" +
3384 " \"request\": {\"REQUEST_METHOD\": \"GET\",\n" +
3385 " \"PATH_INFO\": \"/FOO/BAR\",\n" +
3386 " \"POST\": {\"FOO\":\"BAZ\",\"XXX\":\"YYY\"}\n" +
3387 " },\n" +
3388 " \"slow_calls\":[{\n" +
3389 " \"start\": \"{{$ctrl.momentJs.utc().milliseconds(0).toISOString()}}\",\n" +
3390 " \"end\": \"{{$ctrl.momentJs.utc().milliseconds(0).add(1, 'seconds').toISOString()}}\",\n" +
3391 " \"type\": \"sql\",\n" +
3392 " \"subtype\": \"postgresql\",\n" +
3393 " \"parameters\": [\"QPARAM1\",\"QPARAM2\",\"QPARAMX\"],\n" +
3394 " \"statement\": \"QUERY\"\n" +
3395 " }],\n" +
3396 " \"request_stats\": {\n" +
3397 " \"main\": 2.50779,\n" +
3398 " \"nosql\": 0.01008,\n" +
3399 " \"nosql_calls\": 17.0,\n" +
3400 " \"remote\": 0.0,\n" +
3401 " \"remote_calls\": 0.0,\n" +
3402 " \"sql\": 1,\n" +
3403 " \"sql_calls\": 1.0,\n" +
3404 " \"tmpl\": 0.0,\n" +
3405 " \"tmpl_calls\": 0.0,\n" +
3406 " \"custom\": 0.0,\n" +
3407 " \"custom_calls\": 0.0\n" +
3408 " },\n" +
3409 " \"traceback\": [\n" +
3410 " {\"cline\": \"return foo_bar_baz(1,2,3)\",\n" +
3411 " \"file\": \"somedir/somefile.py\",\n" +
3412 " \"fn\": \"somefunction\",\n" +
3413 " \"line\": 454,\n" +
3414 " \"vars\": [[\"a_list\",\n" +
3415 " [\"1\",2,\"4\",\"5\",6]],\n" +
3416 " [\"b\", {\"1\": \"2\", \"ccc\": \"ddd\", \"1\": \"a\"}],\n" +
3417 " [\"obj\", \"object object at 0x7f0030853dc0\"]]\n" +
3418 " },\n" +
3419 " {\"cline\": \"OMG ValueError happened\",\n" +
3420 " \"file\": \"\",\n" +
3421 " \"fn\": \"\",\n" +
3422 " \"line\": \"\",\n" +
3423 " \"vars\": []}\n" +
3424 " ]\n" +
3425 " }]'\n" +
3426 " </pre>\n" +
3427 " </div>\n" +
3428 "\n" +
3298 "\n" +
3429 " </uib-tab>\n" +
3299 "<div class=\"panel panel-default\" ng-show=\"!$ctrl.loading.groups\">\n" +
3430 "\n" +
3300 "\n" +
3431 " <uib-tab>\n" +
3301 " <table st-table=\"displayedCollection\" st-safe-src=\"$ctrl.groups\" class=\"table table-striped\">\n" +
3302 " <thead>\n" +
3303 " <tr>\n" +
3304 " <th st-sort=\"group_name\"><a>Group name</a></th>\n" +
3305 " <th st-sort=\"description\"><a>Description</a></th>\n" +
3306 " <th st-sort=\"members\"><a>Member count</a></th>\n" +
3307 " <th class=\"options\"></th>\n" +
3308 " </tr>\n" +
3309 " <tr>\n" +
3310 " <th><input st-search=\"group_name\" placeholder=\"search for group name\" class=\"form-control\" type=\"search\" st-delay=\"1\"/></th>\n" +
3311 " <th><input st-search=\"description\" placeholder=\"search for description\" class=\"form-control\" type=\"search\" st-delay=\"1\"/></th>\n" +
3312 " <th></th>\n" +
3313 " <th></th>\n" +
3314 " </tr>\n" +
3315 " </thead>\n" +
3316 " <tbody>\n" +
3432 "\n" +
3317 "\n" +
3433 " <uib-tab-heading>\n" +
3318 " <tr ng-repeat=\"group in displayedCollection track by group.id\">\n" +
3434 " Metrics API\n" +
3319 " <td>{{group.group_name}}</td>\n" +
3435 " </uib-tab-heading>\n" +
3320 " <td>{{group.description}}</td>\n" +
3321 " <td>{{group.member_count}}</td>\n" +
3322 " <td>\n" +
3323 " <a class=\"btn btn-default btn-sm\" data-ui-sref=\"admin.group.update({groupId:group.id})\"><span class=\"fa fa-cog\"></span></a>\n" +
3324 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
3325 " <a class=\"btn btn-danger btn-sm\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span></a>\n" +
3326 " <ul class=\"dropdown-menu\">\n" +
3327 " <li><a>No</a></li>\n" +
3328 " <li><a ng-click=\"$ctrl.removeGroup(group)\">Yes</a></li>\n" +
3329 " </ul>\n" +
3330 " </span>\n" +
3331 " </tr>\n" +
3332 " <tfoot>\n" +
3333 " <tr>\n" +
3334 " <td colspan=\"4\" class=\"text-center\">\n" +
3335 " <div st-pagination=\"\" st-items-by-page=\"100\" st-displayed-pages=\"7\"></div>\n" +
3336 " </td>\n" +
3337 " </tr>\n" +
3338 " </tfoot>\n" +
3339 " </tbody>\n" +
3340 " </table>\n" +
3436 "\n" +
3341 "\n" +
3437 " <div class=\"codehilite\">\n" +
3342 "</div>\n" +
3438 " <pre class=\"m-a-0\">\n" +
3343 "\n"
3439 "curl -H \"Content-Type: application/json\" -k {{AeConfig.urls.baseUrl}}api/general_metrics?protocol_version=0.5\\&ampapi_key={{$ctrl.resource.api_key}} -d '\n" +
3344 );
3440 " [{\n" +
3345
3441 " \"namespace\": \"some.monitor\",\n" +
3346
3442 " \"timestamp\": \"{{$ctrl.momentJs.utc().milliseconds(0).toISOString()}}\",\n" +
3347 $templateCache.put('components/views/admin-partitions-view/admin-partitions-view.html',
3443 " \"server_name\": \"server.name\",\n" +
3348 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.partitions\"></ng-include>\n" +
3444 " \"tags\": [[\"value1\", 15.7], [\"value2\", 26]]}]'\n" +
3445 " </pre>\n" +
3446 " </div>\n" +
3447 "\n" +
3349 "\n" +
3448 " </uib-tab>\n" +
3350 "<div ng-show=\"!$ctrl.loading.partitions\">\n" +
3449 "\n" +
3351 "\n" +
3450 " <uib-tab>\n" +
3352 " <div class=\"panel panel-default\">\n" +
3353 " <div class=\"panel-heading\">\n" +
3354 " DELETE Daily Partitions\n" +
3355 " </div>\n" +
3451 "\n" +
3356 "\n" +
3452 " <uib-tab-heading>\n" +
3357 " <form name=\"$ctrl.dailyPartitionsForm\"\n" +
3453 " Request Stats API\n" +
3358 " novalidate ng-submit=\"$ctrl.partitionsDelete('dailyPartitions')\"\n" +
3454 " </uib-tab-heading>\n" +
3359 " class=\"form-inline\"\n" +
3360 " ng-class=\"{'has-error':$ctrl.dailyPartitionsForm.$invalid}\">\n" +
3455 "\n" +
3361 "\n" +
3456 " <div class=\"codehilite\">\n" +
3362 " <div class=\"panel-body\">\n" +
3457 " <pre class=\"m-a-0\">\n" +
3458 "curl -H \"Content-Type: application/json\" -k {{AeConfig.urls.baseUrl}}api/request_stats?protocol_version=0.5\\&ampapi_key={{$ctrl.resource.api_key}} -d '\n" +
3459 " [{\"server\": \"some.server.hostname\",\n" +
3460 " \"timestamp\": \"{{$ctrl.momentJs.utc().milliseconds(0).toISOString()}}\",\n" +
3461 " \"metrics\": [[\"dir/module:func\",\n" +
3462 " {\"custom\": 0.0,\n" +
3463 " \"custom_calls\": 0,\n" +
3464 " \"main\": 0.01664,\n" +
3465 " \"nosql\": 0.00061,\n" +
3466 " \"nosql_calls\": 23,\n" +
3467 " \"remote\": 0.0,\n" +
3468 " \"remote_calls\": 0,\n" +
3469 " \"requests\": 1,\n" +
3470 " \"sql\": 0.00105,\n" +
3471 " \"sql_calls\": 2,\n" +
3472 " \"tmpl\": 0.0,\n" +
3473 " \"tmpl_calls\": 0}],\n" +
3474 " [\"SomeView.function\",\n" +
3475 " {\"custom\": 0.0,\n" +
3476 " \"custom_calls\": 0,\n" +
3477 " \"main\": 0.647261,\n" +
3478 " \"nosql\": 0.306554,\n" +
3479 " \"nosql_calls\": 140,\n" +
3480 " \"remote\": 0.0,\n" +
3481 " \"remote_calls\": 0,\n" +
3482 " \"requests\": 28,\n" +
3483 " \"sql\": 0.0,\n" +
3484 " \"sql_calls\": 0,\n" +
3485 " \"tmpl\": 0.0,\n" +
3486 " \"tmpl_calls\": 0}]]\n" +
3487 " }]'\n" +
3488 " </pre>\n" +
3489 " </div>\n" +
3490 "\n" +
3363 "\n" +
3491 " </uib-tab>\n" +
3364 " <input type=\"text\" name=\"confirm\"\n" +
3365 " placeholder=\"Enter CONFIRM to proceed\" class=\"form-control input-autosize\" confirm-validate required ng-model=\"$ctrl.dailyConfirm\">\n" +
3366 " <input type=\"submit\" class=\"btn btn-danger\" ng-disabled=\"$ctrl.dailyPartitionsForm.$invalid\">\n" +
3367 " <input type=\"checkbox\" ng-model=\"$ctrl.dailyChecked\" ng-change=\"$ctrl.setCheckedList('dailyPartitions')\"> Check All\n" +
3492 "\n" +
3368 "\n" +
3493 " </uib-tabset>\n" +
3369 " </div>\n" +
3494 "\n" +
3370 "\n" +
3495 " </div>\n" +
3371 " <table class=\"table table-striped\">\n" +
3496 " </div>\n" +
3372 " <tr>\n" +
3373 " <th class=\"c1 date\">Date</th>\n" +
3374 " <th class=\"c2 indices\">Indices</th>\n" +
3375 " </tr>\n" +
3376 " <tr class=\"r{{$index}}\" ng-repeat=\"row in $ctrl.dailyPartitions\">\n" +
3377 " <td class=\"c1\">{{row[0]}}</td>\n" +
3378 " <td class=\"c2\">\n" +
3379 " <ul class=\"list-group\">\n" +
3380 " <li class=\"list-group-item\" ng-repeat=\"partition in row[1].elasticsearch\">\n" +
3381 " <input name=\"es_index\" type=\"checkbox\" ng-model=\"partition.checked\"> ES: {{partition.name}}\n" +
3382 " </li>\n" +
3383 " <li class=\"list-group-item\" ng-repeat=\"partition in row[1].pg\">\n" +
3384 " <input name=\"pg_index\" type=\"checkbox\" ng-model=\"partition.checked\"> PG: {{partition.name}}\n" +
3385 " </li>\n" +
3386 " </ul>\n" +
3387 " </td>\n" +
3388 " </tr>\n" +
3389 " </table>\n" +
3390 " </form>\n" +
3497 "\n" +
3391 "\n" +
3498 " <permissions-form resource=\"$ctrl.resource\" current-permissions=\"$ctrl.resource.current_permissions\"\n" +
3392 " </div>\n" +
3499 " possible-permissions=\"$ctrl.resource.possible_permissions\" ng-if=\"$ctrl.resource.resource_id\"></permissions-form>\n" +
3500 "\n" +
3393 "\n" +
3501 " <div class=\"panel panel-info\" ng-show=\"$ctrl.resource.resource_id\">\n" +
3394 " <div class=\"panel panel-default\">\n" +
3502 " <div class=\"panel-heading\">\n" +
3395 " <div class=\"panel-heading\">\n" +
3503 " <h3 class=\"panel-title\">Postprocessing</h3>\n" +
3396 " DELETE Permanent Partitions\n" +
3504 " </div>\n" +
3397 " </div>\n" +
3505 " <div class=\"panel-body\">\n" +
3506 " <p>This section allows you influence the rating of report groups - if rule is matched once its not executed anymore</p>\n" +
3507 "\n" +
3508 " <p>\n" +
3509 " <a class=\"btn btn-info\" ng-click=\"$ctrl.addRule()\"><span class=\"fa fa-plus-circle\"></span> Add rule</a>\n" +
3510 " </p>\n" +
3511 "\n" +
3398 "\n" +
3512 " <post-process-action action=\"action\" resource=\"$ctrl.resource\" ng-repeat=\"action in $ctrl.resource.postprocessing_rules\"></post-process-action>\n" +
3399 " <form name=\"$ctrl.permanentPartitionsForm\" novalidate\n" +
3513 " </div>\n" +
3400 " ng-submit=\"$ctrl.partitionsDelete('permanentPartitions')\"\n" +
3514 " </div>\n" +
3401 " class=\"form-inline\"\n" +
3402 " ng-class=\"{'has-error':$ctrl.permanentPartitionsForm.$invalid}\">\n" +
3515 "\n" +
3403 "\n" +
3516 " <div class=\"panel panel-danger\" ng-show=\"$ctrl.resource.resource_id\">\n" +
3517 " <div class=\"panel-heading\">\n" +
3518 " <h3 class=\"panel-title\">Administration</h3>\n" +
3519 " </div>\n" +
3520 " <div class=\"panel-body\">\n" +
3521 " <h2>Transfer ownership</h2>\n" +
3522 " <p>Please note that by transfering ownership you WILL lose access to the application data and new owner needs to give you access permission</p>\n" +
3523 " <div class=\"confirmation_form\" ng-submit=\"$ctrl.transferApplication()\">\n" +
3524 " <form class=\"form-horizontal\" name=\"$ctrl.formTransfer\">\n" +
3525 " <div class=\"form-group\">\n" +
3526 " <data-form-errors errors=\"$ctrl.formTransfer.ae_validation.password\"></data-form-errors>\n" +
3527 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
3528 " Password\n" +
3529 " </label>\n" +
3530 " <div class=\"col-sm-8 col-lg-9\">\n" +
3531 " <input class=\"form-control\" name=\"password\" type=\"password\" ng-model=\"$ctrl.formTransferModel.password\">\n" +
3532 " </div>\n" +
3533 " </div>\n" +
3534 " <div class=\"form-group\">\n" +
3535 " <data-form-errors errors=\"$ctrl.formTransfer.ae_validation.user_name\"></data-form-errors>\n" +
3536 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
3537 " New owners username\n" +
3538 " </label>\n" +
3539 " <div class=\"col-sm-8 col-lg-9\">\n" +
3540 " <input class=\"form-control\" name=\"user_name\" type=\"text\" ng-model=\"$ctrl.formTransferModel.user_name\">\n" +
3541 " </div>\n" +
3542 " </div>\n" +
3543 " <div class=\"form-group\">\n" +
3544 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
3545 " </label>\n" +
3546 " <div class=\"col-sm-8 col-lg-9\">\n" +
3547 " <button class=\"btn btn-danger\">\n" +
3548 " <span class=\"fa fa-user-plus\"></span>\n" +
3549 " Transfer ownership of application\n" +
3550 " </button>\n" +
3551 " </div>\n" +
3552 " </div>\n" +
3553 " </form>\n" +
3554 " </div>\n" +
3555 "\n" +
3404 "\n" +
3556 " <hr/>\n" +
3405 " <div class=\"panel-body\">\n" +
3557 "\n" +
3406 "\n" +
3558 " <h2>Remove application</h2>\n" +
3407 " <div class=\"form-group\">\n" +
3559 " <p><strong>This operation will wipe out all data from database - there is no undo.</strong></p>\n" +
3408 " <input type=\"text\" name=\"confirm\"\n" +
3409 " placeholder=\"Enter CONFIRM to proceed\" class=\"form-control\" confirm-validate required ng-model=\"$ctrl.permConfirm\">\n" +
3410 " <input type=\"submit\" class=\"btn btn-danger\" ng-disabled=\"$ctrl.permanentPartitionsForm.$invalid\">\n" +
3411 " <input type=\"checkbox\" ng-model=\"$ctrl.permChecked\" ng-change=\"$ctrl.setCheckedList('permanentPartitions')\"> Check All\n" +
3412 " </div>\n" +
3560 "\n" +
3413 "\n" +
3561 " <div class=\"confirmation_form\">\n" +
3414 " </div>\n" +
3562 " <form class=\"form-horizontal\" name=\"$ctrl.formDelete\" ng-submit=\"$ctrl.deleteApplication()\">\n" +
3415 "\n" +
3563 " <div class=\"form-group\">\n" +
3416 " <table class=\"table table-striped\">\n" +
3564 " <data-form-errors errors=\"$ctrl.formDelete.ae_validation.password\"></data-form-errors>\n" +
3417 " <tr>\n" +
3565 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
3418 " <th class=\"c1 date\">Date</th>\n" +
3566 " Password\n" +
3419 " <th class=\"c2 indices\">Indices</th>\n" +
3567 " </label>\n" +
3420 " </tr>\n" +
3568 " <div class=\"col-sm-8 col-lg-9\">\n" +
3421 " <tr class=\"r{{$index}}\" ng-repeat=\"row in $ctrl.permanentPartitions\">\n" +
3569 " <input class=\"form-control\" name=\"password\" type=\"password\" ng-model=\"$ctrl.formDeleteModel.password\">\n" +
3422 " <td class=\"c1\">{{row[0]}}</td>\n" +
3570 " </div>\n" +
3423 " <td class=\"c2\">\n" +
3571 " </div>\n" +
3424 " <ul class=\"list-group\">\n" +
3572 " <div class=\"form-group\">\n" +
3425 " <li class=\"list-group-item\" ng-repeat=\"partition in row[1].elasticsearch\">\n" +
3573 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
3426 " <input name=\"es_index\" type=\"checkbox\" ng-model=\"partition.checked\"> ES: {{partition.name}}\n" +
3427 " </li>\n" +
3428 " <li class=\"list-group-item\" ng-repeat=\"partition in row[1].pg\">\n" +
3429 " <input name=\"pg_index\" type=\"checkbox\" ng-model=\"partition.checked\"> PG: {{partition.name}}\n" +
3430 " </li>\n" +
3431 " </ul>\n" +
3432 " </td>\n" +
3433 " </tr>\n" +
3434 " </table>\n" +
3435 " </form>\n" +
3574 "\n" +
3436 "\n" +
3575 " </label>\n" +
3576 " <div class=\"col-sm-8 col-lg-9\">\n" +
3577 " <button class=\"btn btn-danger\">\n" +
3578 " <span class=\"fa fa-trash-o\"></span>\n" +
3579 " Delete my application\n" +
3580 " </button>\n" +
3581 " </div>\n" +
3582 " </div>\n" +
3583 " </form>\n" +
3584 " </div>\n" +
3585 " </div>\n" +
3586 " </div>\n" +
3437 " </div>\n" +
3438 "\n" +
3587 "</div>\n"
3439 "</div>\n"
3588 );
3440 );
3589
3441
3590
3442
3591 $templateCache.put('components/views/event-browser/event-browser.html',
3443 $templateCache.put('components/views/admin-system-view/admin-system-view.html',
3592 "<div class=\"panel panel-default\">\n" +
3444 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.system\"></ng-include>\n" +
3593 " <div class=\"panel-body\">\n" +
3594 "\n" +
3445 "\n" +
3595 " <h1>Event history</h1>\n" +
3446 "<div ng-if=\"$ctrl.loading.system == false\">\n" +
3447 " <div class=\"row\">\n" +
3448 " <div class=\"col-sm-12\">\n" +
3449 " <div class=\"panel panel-default\">\n" +
3450 " <div class=\"panel-heading\">\n" +
3451 " <h3 class=\"panel-title\">\n" +
3452 " System Info\n" +
3453 " </h3>\n" +
3454 " </div>\n" +
3455 " <div class=\"panel-body\">\n" +
3596 "\n" +
3456 "\n" +
3597 " <table class=\"table table-striped event-table\">\n" +
3457 " <p><strong>System Load:</strong>\n" +
3598 " <tr ng-repeat=\"event in $ctrl.events track by event.id\">\n" +
3458 " 1min: {{$ctrl.systemLoad[0]}}, 5min: {{$ctrl.systemLoad[1]}}, 15min: {{$ctrl.systemLoad[2]}}\n" +
3599 " <td class=\"text-center icons\">\n" +
3459 " </p>\n" +
3600 " <span ng-if=\"event.event_type === 1\" class=\"fa fa-exclamation-triangle fa-2x\" style=\"color:orangered\"></span>\n" +
3460 " <p><strong>Awaiting tasks:</strong>\n" +
3601 " <span ng-if=\"event.event_type === 3\" class=\"fa fa-clock-o fa-2x\" style=\"color:darkorange\"></span>\n" +
3461 " <ul>\n" +
3602 " <span ng-if=\"event.event_type === 7\" class=\"fa fa-question-circle fa-2x\" style=\"color:dimgrey\"></span>\n" +
3462 " <li>reports: {{$ctrl.queueStats.waiting_reports}}</li>\n" +
3603 " <span ng-if=\"event.event_type === 9\" class=\"fa fa-line-chart fa-2x\" style=\"color:green\"></span>\n" +
3463 " <li>logs: {{$ctrl.queueStats.waiting_logs}}</li>\n" +
3604 " </td>\n" +
3464 " <li>metrics: {{$ctrl.queueStats.waiting_metrics}}</li>\n" +
3605 " <td>\n" +
3465 " <li>other: {{$ctrl.queueStats.waiting_other}}</li>\n" +
3606 " <p>For <strong>{{ event.resource_name }}</strong></p>\n" +
3466 " </ul>\n" +
3467 " </p>\n" +
3468 " <p><strong>Queue stats from last minute:</strong>\n" +
3469 " <ul>\n" +
3470 " <li>Processed reports: {{$ctrl.queueStats.processed_reports}}</li>\n" +
3471 " <li>Processed logs: {{$ctrl.queueStats.processed_logs}}</li>\n" +
3472 " <li>Processed metrics: {{$ctrl.queueStats.processed_metrics}}</li>\n" +
3473 " </ul>\n" +
3474 " </p>\n" +
3607 "\n" +
3475 "\n" +
3608 " <p>{{ event.text }}</p>\n" +
3476 " <p><strong>Disks:</strong>\n" +
3609 " <small class=\"date\" data-uib-tooltip=\"{{event.start_date}}\"> created:\n" +
3477 " <ul>\n" +
3610 " <iso-to-relative-time time=\"{{event.start_date}}\"/>\n" +
3478 " <li ng-repeat=\"disk in $ctrl.disks\">\n" +
3611 " </small>\n" +
3479 " <strong>{{disk.device}}</strong> {{disk.free}}/{{disk.total}}, {{disk.percentage}}% used\n" +
3612 " <small class=\"date\" ng-show=\"event.end_date\" data-uib-tooltip=\"{{event.end_date}}\"> | closed:\n" +
3480 " </li>\n" +
3613 " <iso-to-relative-time time=\"{{event.end_date}}\"/>\n" +
3481 " </ul>\n" +
3614 " </small>\n" +
3482 " </p>\n" +
3615 " </td>\n" +
3616 " <td class=\"options\">\n" +
3617 "\n" +
3483 "\n" +
3618 " <span class=\"dropdown pull-right\" ng-if=\"event.status === 1\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
3484 " <p><strong>Process stats:</strong>\n" +
3619 " <a class=\"dropdown-toggle btn btn-danger\" data-uib-dropdown-toggle>\n" +
3485 " <ul>\n" +
3620 " <span class=\"fa fa-exclamation-circle\"></span>\n" +
3486 " <li>FD soft limits: {{$ctrl.selfInfo.fds.soft}}</li>\n" +
3621 " </a>\n" +
3487 " <li>FD hard limits: {{$ctrl.selfInfo.fds.hard}}</li>\n" +
3622 " <ul class=\"dropdown-menu\">\n" +
3488 " <li>Memlock soft limits: {{$ctrl.selfInfo.memlock.soft}}</li>\n" +
3623 " <li>\n" +
3489 " <li>Memlock hard limits: {{$ctrl.selfInfo.memlock.hard}}</li>\n" +
3624 " <a ng-click=\"$ctrl.closeEvent(event)\">Close event</a>\n" +
3490 " </ul>\n" +
3625 " <a>Do nothing</a>\n" +
3491 " </p>\n" +
3626 " </li>\n" +
3627 " </ul>\n" +
3628 " </span>\n" +
3629 "\n" +
3492 "\n" +
3630 " </td>\n" +
3493 " </div>\n" +
3631 " </tr>\n" +
3494 " </div>\n" +
3632 " </table>\n" +
3495 " </div>\n" +
3633 " </div>\n" +
3496 " </div>\n" +
3634 "</div>\n"
3497 " <div class=\"row\">\n" +
3635 );
3498 " <div class=\"col-sm-12\">\n" +
3636
3637
3638 $templateCache.put('components/views/index-dashboard/index-dashboard.html',
3639 "<style type=\"text/css\">\n" +
3640 " #metrics_chart .c3-line {\n" +
3641 " stroke-width: 0px;\n" +
3642 " }\n" +
3643 "\n" +
3499 "\n" +
3644 " #metrics_chart .c3-area {\n" +
3500 " <div class=\"panel panel-default\">\n" +
3645 " stroke-width: 0;\n" +
3501 " <div class=\"panel-body\">\n" +
3646 " opacity: 0.75;\n" +
3647 " }\n" +
3648 "</style>\n" +
3649 "\n" +
3502 "\n" +
3650 "<div class=\"row\">\n" +
3503 " <uib-tabset>\n" +
3651 " <div class=\"col-sm-12 dashboard\" id=\"content\">\n" +
3504 " <uib-tab>\n" +
3652 " <div ng-if=\"!$ctrl.stateHolder.AeUser.applications.length\">\n" +
3505 " <uib-tab-heading>\n" +
3506 " Postgresql Tables\n" +
3507 " </uib-tab-heading>\n" +
3653 "\n" +
3508 "\n" +
3654 " <div ng-include=\"'templates/quickstart.html'\"></div>\n" +
3509 " <table class=\"table table-striped\">\n" +
3510 " <thead>\n" +
3511 " <tr>\n" +
3512 " <th class=\"c1 tablename\">Table name</th>\n" +
3513 " <th class=\"c2 size_human\">Size</th>\n" +
3514 " </tr>\n" +
3515 " </thead>\n" +
3516 " <tbody>\n" +
3517 " <tr class=\"r{{$index}}\" ng-repeat=\"row in $ctrl.DBtables\">\n" +
3518 " <td class=\"c1\">{{row.table_name}}</td>\n" +
3519 " <td class=\"c2\">{{row.size_human}}</td>\n" +
3520 " </tr>\n" +
3521 " </tbody>\n" +
3522 " </table>\n" +
3655 "\n" +
3523 "\n" +
3656 " </div>\n" +
3524 " </uib-tab>\n" +
3657 "\n" +
3525 "\n" +
3658 " <div ng-if=\"$ctrl.stateHolder.AeUser.applications.length\">\n" +
3526 " <uib-tab>\n" +
3527 " <uib-tab-heading>\n" +
3528 " Elasticsearch Indices\n" +
3529 " </uib-tab-heading>\n" +
3659 "\n" +
3530 "\n" +
3660 " <div class=\"row\">\n" +
3531 " <table class=\"table table-striped\">\n" +
3661 " <div class=\"col-sm-6\">\n" +
3532 " <thead>\n" +
3662 " <div class=\"panel panel-default\">\n" +
3533 " <tr>\n" +
3663 " <div class=\"panel-body\">\n" +
3534 " <th class=\"c1 tablename\">Index name</th>\n" +
3664 " <form class=\"graph-type form-inline\">\n" +
3535 " <th class=\"c2 size_human\">Size</th>\n" +
3665 " <select ng-model=\"$ctrl.resource\" ng-options=\"r.resource_id as r.resource_name for r in $ctrl.stateHolder.AeUser.applications\" ng-change=\"$ctrl.updateSearchParams()\"\n" +
3536 " </tr>\n" +
3666 " class=\"SelectField form-control input-sm slim-input\"></select>\n" +
3537 " </thead>\n" +
3538 " <tbody>\n" +
3539 " <tr class=\"r{{$index}}\" ng-repeat=\"row in $ctrl.ESIndices\">\n" +
3540 " <td class=\"c1\">{{row.name}}</td>\n" +
3541 " <td class=\"c2\">{{row.size_human}}</td>\n" +
3542 " </tr>\n" +
3543 " </tbody>\n" +
3544 " </table>\n" +
3667 "\n" +
3545 "\n" +
3668 " <select class=\"SelectField form-control input-sm slim-input\" ng-model=\"$ctrl.timeSpan\"\n" +
3546 " </uib-tab>\n" +
3669 " ng-options=\"i as i.label for i in $ctrl.timeOptions | objectToOrderedArray:'minutes'\" ng-change=\"$ctrl.updateSearchParams()\"\n" +
3670 " class=\"SelectField\"></select>\n" +
3671 "\n" +
3547 "\n" +
3548 " <uib-tab>\n" +
3549 " <uib-tab-heading>\n" +
3550 " Processes\n" +
3551 " </uib-tab-heading>\n" +
3672 "\n" +
3552 "\n" +
3673 " <div class=\"btn-group\">\n" +
3553 " <table class=\"table table-striped\">\n" +
3674 " <button type=\"button\" class=\"btn btn-primary btn-sm\" ng-model=\"$ctrl.graphType.selected\" ng-change=\"$ctrl.updateSearchParams()\"\n" +
3554 " <thead>\n" +
3675 " uib-btn-radio=\"'requests_graphs'\" data-uib-tooltip=\"Requests per second\">\n" +
3555 " <tr>\n" +
3676 " <span class=\"fa fa-line-chart\"></span>\n" +
3556 " <th class=\"c1 tablename\">Owner</th>\n" +
3677 " </button>\n" +
3557 " <th class=\"c2 tablename\">PID</th>\n" +
3678 " <button type=\"button\" class=\"btn btn-primary btn-sm\" ng-model=\"$ctrl.graphType.selected\" ng-change=\"$ctrl.updateSearchParams()\"\n" +
3558 " <th class=\"c3 tablename\">CPU</th>\n" +
3679 " uib-btn-radio=\"'response_graphs'\" data-uib-tooltip=\"Average response time\">\n" +
3559 " <th class=\"c4 tablename\">MEM</th>\n" +
3680 " <span class=\"fa fa-random\"></span>\n" +
3560 " <th class=\"c4 tablename\">Name</th>\n" +
3681 " </button>\n" +
3561 " </tr>\n" +
3682 " <button type=\"button\" class=\"btn btn-primary btn-sm\" ng-model=\"$ctrl.graphType.selected\" ng-change=\"$ctrl.updateSearchParams()\"\n" +
3562 " </thead>\n" +
3683 " uib-btn-radio=\"'metrics_graphs'\" data-uib-tooltip=\"Time spent per request\">\n" +
3563 " <tbody>\n" +
3684 " <span class=\"fa fa-bar-chart-o\"></span>\n" +
3564 " <tr class=\"r{{$index}}\" ng-repeat-start=\"row in $ctrl.processInfo\">\n" +
3685 " </button>\n" +
3565 " <td class=\"c1\">{{row.owner}}</td>\n" +
3686 " <button type=\"button\" class=\"btn btn-primary btn-sm\" ng-model=\"$ctrl.graphType.selected\" ng-change=\"$ctrl.updateSearchParams()\"\n" +
3566 " <td class=\"c2\">{{row.pid}}</td>\n" +
3687 " uib-btn-radio=\"'report_graphs'\" data-uib-tooltip=\"Errors\">\n" +
3567 " <td class=\"c3\">{{row.cpu}}</td>\n" +
3688 " <span class=\"fa fa-exclamation-triangle\"></span>\n" +
3568 " <td class=\"c4\">{{row.mem_usage}} ({{row.mem_percentage}}%)</td>\n" +
3689 " </button>\n" +
3569 " <td class=\"c5\"><strong>{{row.name}}</strong></td>\n" +
3690 " <button type=\"button\" class=\"btn btn-primary btn-sm\" ng-model=\"$ctrl.graphType.selected\" ng-change=\"$ctrl.updateSearchParams()\"\n" +
3570 " </tr>\n" +
3691 " uib-btn-radio=\"'slow_report_graphs'\" data-uib-tooltip=\"Slow reports\">\n" +
3571 " <tr ng-repeat-end>\n" +
3692 " <span class=\"fa fa-clock-o\"></span>\n" +
3572 " <td colspan=\"5\" class=\"word-wrap\">{{row.command}}</td>\n" +
3693 " </button>\n" +
3573 " </tr>\n" +
3694 " </div>\n" +
3574 " </tbody>\n" +
3695 " </form>\n" +
3575 " </table>\n" +
3696 " <div class=\"clearfix\"></div>\n" +
3697 "\n" +
3576 "\n" +
3698 " <p ng-if=\"$ctrl.loading.series != false\" class=\"text-center\">\n" +
3577 " </uib-tab>\n" +
3699 " <span class=\"fa fa-cog fa-spin fa-5x loader\"></span>\n" +
3700 " </p>\n" +
3701 "\n" +
3578 "\n" +
3702 " <div ng-if=\"$ctrl.loading.series == false\">\n" +
3579 " <uib-tab>\n" +
3703 " <div ng-if=\"$ctrl.graphType.selected == 'requests_graphs'\">\n" +
3580 " <uib-tab-heading>\n" +
3704 " <c3chart data-domid=\"reponse_chart\" data-data=\"$ctrl.requestsChartData\" data-config=\"$ctrl.requestsChartConfig\" update=\"true\">\n" +
3581 " Python packages\n" +
3705 " </c3chart>\n" +
3582 " </uib-tab-heading>\n" +
3706 " </div>\n" +
3707 "\n" +
3583 "\n" +
3708 " <div ng-if=\"$ctrl.graphType.selected == 'response_graphs'\">\n" +
3584 " <table class=\"table\">\n" +
3709 " <c3chart data-domid=\"reponse_chart\" data-data=\"$ctrl.responseChartData\" data-config=\"$ctrl.responseChartConfig\" update=\"true\">\n" +
3585 " <tr ng-repeat=\"package in $ctrl.packages\">\n" +
3710 " </c3chart>\n" +
3586 " <td>{{package.name}}</td>\n" +
3711 " </div>\n" +
3587 " <td>{{package.version}}</td>\n" +
3588 " </tr>\n" +
3589 " </table>\n" +
3590 " </p>\n" +
3712 "\n" +
3591 "\n" +
3713 " <div ng-if=\"$ctrl.graphType.selected == 'metrics_graphs'\">\n" +
3592 " </uib-tab>\n" +
3714 " <c3chart data-domid=\"metrics_chart\" data-data=\"$ctrl.metricsChartData\" data-config=\"$ctrl.metricsChartConfig\" update=\"true\">\n" +
3715 " </c3chart>\n" +
3716 " </div>\n" +
3717 " <div ng-if=\"$ctrl.graphType.selected == 'report_graphs'\">\n" +
3718 " <c3chart data-domid=\"reports_chart\" data-data=\"$ctrl.reportChartData\" data-config=\"$ctrl.reportChartConfig\" update=\"true\">\n" +
3719 " </c3chart>\n" +
3720 " </div>\n" +
3721 "\n" +
3593 "\n" +
3722 " <div ng-if=\"$ctrl.graphType.selected == 'slow_report_graphs'\">\n" +
3594 " </uib-tabset>\n" +
3723 " <c3chart data-domid=\"slow_reports_chart\" data-data=\"$ctrl.reportSlowChartData\" data-config=\"$ctrl.reportSlowChartConfig\" update=\"true\">\n" +
3595 " </div>\n" +
3724 " </c3chart>\n" +
3596 " </div>\n" +
3725 " </div>\n" +
3597 " </div>\n" +
3726 "\n" +
3598 " </div>\n" +
3727 " <p ng-if=\"$ctrl.graphType.selected == 'requests_graphs'\" class=\"text-center\">\n" +
3599 "</div>\n"
3728 " <small>Average requests per second from all servers</small>\n" +
3600 );
3729 " </p>\n" +
3601
3602
3603 $templateCache.put('components/views/admin-users-create-view/admin-users-create-view.html',
3604 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.user\"></ng-include>\n" +
3730 "\n" +
3605 "\n" +
3731 " <p ng-if=\"$ctrl.graphType.selected == 'response_graphs'\" class=\"text-center\">\n" +
3606 "<div ng-show=\"!$ctrl.loading.user\">\n" +
3732 " <small>Average response time from all servers</small>\n" +
3733 " </p>\n" +
3734 "\n" +
3607 "\n" +
3735 " <p ng-if=\"$ctrl.graphType.selected == 'metrics_graphs'\" class=\"text-center\">\n" +
3608 " <div class=\"panel panel-default\">\n" +
3736 " <small>Aggregated average time spent per request - broken to layers</small>\n" +
3609 " <div class=\"panel-body\">\n" +
3737 " </p>\n" +
3738 "\n" +
3610 "\n" +
3739 " <p ng-if=\"$ctrl.graphType.selected == 'report_graphs'\" class=\"text-center\">\n" +
3611 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\" ng-if=\"$ctrl.user.id\">\n" +
3740 " <small>Aggregated reports sent by your application</small>\n" +
3612 " <a class=\"btn btn-default\" data-uib-dropdown-toggle><span class=\"fa fa-user-secret\"></span> Re-login to user</a>\n" +
3741 " </p>\n" +
3613 " <ul class=\"dropdown-menu\">\n" +
3614 " <li><a>No</a></li>\n" +
3615 " <li><a ng-click=\"$ctrl.reloginUser(user)\">Yes</a></li>\n" +
3616 " </ul>\n" +
3617 " </span>\n" +
3742 "\n" +
3618 "\n" +
3743 " <p ng-if=\"$ctrl.graphType.selected == 'slow_report_graphs'\" class=\"text-center\">\n" +
3619 " <form name=\"$ctrl.profileForm\" class=\"form-horizontal\" ng-submit=\"$ctrl.createUser()\">\n" +
3744 " <small>Aggregated slow reports sent by your application</small>\n" +
3620 " <div class=\"form-group\" id=\"row-user_name\">\n" +
3745 " </p>\n" +
3621 " <data-form-errors errors=\"$ctrl.profileForm.ae_validation.user_name\"></data-form-errors>\n" +
3746 " </div>\n" +
3622 " <label for=\"user_name\" id=\"label-user_name\" class=\"control-label col-sm-4 col-lg-3\">\n" +
3747 " </div>\n" +
3623 " User name\n" +
3624 " <span class=\"required\">*</span>\n" +
3625 " </label>\n" +
3626 " <div class=\"col-sm-8 col-lg-9\">\n" +
3627 " <input class=\"form-control\" id=\"user_name\" name=\"user_name\" type=\"text\" ng-model=\"$ctrl.user.user_name\">\n" +
3748 " </div>\n" +
3628 " </div>\n" +
3749 " </div>\n" +
3629 " </div>\n" +
3750 "\n" +
3630 "\n" +
3631 " <div class=\"form-group\" id=\"row-user_password\">\n" +
3632 " <data-form-errors errors=\"$ctrl.profileForm.ae_validation.user_password\"></data-form-errors>\n" +
3633 " <label for=\"user_password\" id=\"label-user_password\" class=\"control-label col-sm-4 col-lg-3\">\n" +
3634 " Password\n" +
3635 " <span class=\"required\">*</span>\n" +
3636 " </label>\n" +
3637 " <div class=\"col-sm-8 col-lg-9\">\n" +
3638 " <input class=\"form-control\" id=\"user_password\" name=\"user_password\" type=\"password\" ng-model=\"$ctrl.user.user_password\">\n" +
3751 "\n" +
3639 "\n" +
3752 " <div class=\"col-sm-6\">\n" +
3640 " <p class=\"m-t-1\"><a class=\"btn btn-info btn-sm\" ng-click=\"$ctrl.generatePassword()\"><span class=\"fa fa-lock\"></span> Generate password</a>\n" +
3753 "\n" +
3641 " <span ng-show=\"$ctrl.gen_pass.length > 0\">(generated password: {{$ctrl.gen_pass}})</span>\n" +
3754 " <div id=\"server-container\">\n" +
3642 " </p>\n" +
3755 "\n" +
3756 " <div ng-if=\"$ctrl.loading.apdex==false\" class=\"text-center m-b-1\">\n" +
3757 "\n" +
3758 " <a data-ui-sref=\"report.list({resource:$ctrl.resource, start_date:$ctrl.startDateFilter})\" class=\"combined-stat text-center\" id=\"error-rate\">\n" +
3759 " <small>Exceptions</small>\n" +
3760 " <br/>\n" +
3761 " <strong>{{ $ctrl.exceptions|numberToThousands}}</strong>\n" +
3762 " <span class=\"fa fa-chevron-right\"></span>\n" +
3763 " </a><!--\n" +
3764 "\n" +
3765 " --><a data-ui-sref=\"report.list_slow({resource:$ctrl.resource, min_duration:4, start_date:$ctrl.startDateFilter})\" class=\"combined-stat text-center\" id=\"frustrating-requests\" data-uib-tooltip=\"Requests over 4s\">\n" +
3766 " <small>Frustrating req.</small>\n" +
3767 " <br/>\n" +
3768 " <strong>{{$ctrl.frustratingRequests|numberToThousands}}</strong>\n" +
3769 " <span class=\"fa fa-chevron-right\"></span>\n" +
3770 " </a><!--\n" +
3771 "\n" +
3643 "\n" +
3772 " --><a data-ui-sref=\"report.list_slow({resource:$ctrl.resource, min_duration:1, max_duration:4, start_date:$ctrl.startDateFilter})\" class=\"combined-stat text-center\" id=\"tolerated-requests\"\n" +
3644 " </div>\n" +
3773 " data-uib-tooltip=\"Requests under 4s\">\n" +
3645 " </div>\n" +
3774 " <small>Tolerated req.</small>\n" +
3775 " <br/>\n" +
3776 " <strong>{{$ctrl.toleratedRequests|numberToThousands}}</strong>\n" +
3777 " <span class=\"fa fa-chevron-right\"></span>\n" +
3778 " </a><!--\n" +
3779 " \n" +
3780 " --><a class=\"combined-stat text-center\" id=\"satisfying-requests\" data-uib-tooltip=\"Requests under 1s\">\n" +
3781 " <small>Satisfying req.</small>\n" +
3782 " <br/>\n" +
3783 " <strong>{{$ctrl.satisfyingRequests|numberToThousands}}</strong>\n" +
3784 " </a><!--\n" +
3785 "\n" +
3646 "\n" +
3786 " --><a data-ui-sref=\"uptime({resource:$ctrl.resource})\" class=\"combined-stat text-center\" id=\"uptime-stats\" data-uib-tooltip=\"Uptime\">\n" +
3787 " <small>Uptime</small>\n" +
3788 " <br/>\n" +
3789 " <strong>{{$ctrl.uptimeStats}}%</strong>\n" +
3790 " <span class=\"fa fa-chevron-right\"></span>\n" +
3791 " </a>\n" +
3792 "\n" +
3647 "\n" +
3793 " <div class=\"clearfix\"></div>\n" +
3648 " <div class=\"form-group\" id=\"row-email\">\n" +
3794 " </div>\n" +
3649 " <data-form-errors errors=\"$ctrl.profileForm.ae_validation.email\"></data-form-errors>\n" +
3650 " <label for=\"email\" id=\"label-email\" class=\"control-label col-sm-4 col-lg-3\">\n" +
3651 " Email Address\n" +
3652 " <span class=\"required\">*</span>\n" +
3653 " </label>\n" +
3654 " <div class=\"col-sm-8 col-lg-9\">\n" +
3655 " <input class=\"form-control\" id=\"email\" name=\"email\" type=\"text\" ng-model=\"$ctrl.user.email\">\n" +
3656 " </div>\n" +
3657 " </div>\n" +
3795 "\n" +
3658 "\n" +
3796 " <div id=\"apdex-rate\" class=\"m-b-1 panel panel-default\">\n" +
3659 " <div class=\"form-group\" id=\"row-first_name\">\n" +
3797 " <table class=\"servers table table-striped\">\n" +
3660 " <data-form-errors errors=\"$ctrl.profileForm.ae_validation.first_name\"></data-form-errors>\n" +
3798 " <thead>\n" +
3661 " <label for=\"first_name\" id=\"label-first_name\" class=\"control-label col-sm-4 col-lg-3\">\n" +
3799 " <tr>\n" +
3662 " First Name\n" +
3800 " <th></th>\n" +
3663 " </label>\n" +
3801 " <th>Server</th>\n" +
3664 " <div class=\"col-sm-8 col-lg-9\">\n" +
3802 " <th>Apdex\n" +
3665 " <input class=\"form-control\" id=\"first_name\" name=\"first_name\" type=\"text\" ng-model=\"$ctrl.user.first_name\">\n" +
3803 " <span class=\"fa fa-question-circle\"\n" +
3666 " </div>\n" +
3804 " data-uib-tooltip=\"Application Performance Index - measures viewer satisfaction based on response times and error rates\"></span>\n" +
3667 " </div>\n" +
3805 " </th>\n" +
3668 " <div class=\"form-group\" id=\"row-last_name\">\n" +
3806 " <th>rpm</th>\n" +
3669 " <data-form-errors errors=\"$ctrl.profileForm.ae_validation.last_name\"></data-form-errors>\n" +
3807 " <th>avg. response</th>\n" +
3670 " <label for=\"last_name\" id=\"label-last_name\" class=\"control-label col-sm-4 col-lg-3\">\n" +
3808 " </tr>\n" +
3671 " Last Name\n" +
3809 " </thead>\n" +
3672 " </label>\n" +
3810 " <tbody>\n" +
3673 " <div class=\"col-sm-8 col-lg-9\">\n" +
3811 " <tr ng-if=\"$ctrl.loading.apdex!=false\" class=\"text-center\">\n" +
3674 " <input class=\"form-control\" id=\"last_name\" name=\"last_name\" type=\"text\" ng-model=\"$ctrl.user.last_name\">\n" +
3812 " <td colspan=\"5\"><span class=\"fa fa-cog fa-spin fa-5x loader\"></span></td>\n" +
3675 " </div>\n" +
3813 " </tr>\n" +
3676 " </div>\n" +
3814 " <tr ng-repeat=\"server in $ctrl.apdexStats\" class=\"{{ server | apdexValue }}\"\n" +
3815 " ng-if=\"$ctrl.loading.apdex==false\">\n" +
3816 " <td><span class=\"fa fa-hdd-o\"></span></td>\n" +
3817 " <td>\n" +
3818 " <small><strong>{{ server.name }}</strong></small>\n" +
3819 " </td>\n" +
3820 " <td class=\"apdex\">\n" +
3821 " <small><strong>{{ server.apdex }} %</strong></small>\n" +
3822 " </td>\n" +
3823 " <td>\n" +
3824 " <small><strong>{{ server.rpm }}rpm</strong></small>\n" +
3825 " </td>\n" +
3826 " <td>\n" +
3827 " <small><strong>{{ server.avg_response_time }}s</strong></small>\n" +
3828 " </td>\n" +
3829 " </tr>\n" +
3830 " </tbody>\n" +
3831 " </table>\n" +
3832 "\n" +
3677 "\n" +
3833 " </div>\n" +
3678 " <div class=\"form-group\" id=\"row-status\">\n" +
3679 " <data-form-errors errors=\"$ctrl.profileForm.ae_validation.status\"></data-form-errors>\n" +
3680 " <label for=\"status\" id=\"label-status\" class=\"control-label col-sm-4 col-lg-3\">\n" +
3681 " Active\n" +
3682 " </label>\n" +
3683 " <div class=\"col-sm-8 col-lg-9\">\n" +
3684 " <input checked class=\"form-control\" id=\"status\" name=\"status\" type=\"checkbox\" ng-model=\"$ctrl.user.status\">\n" +
3834 " </div>\n" +
3685 " </div>\n" +
3686 " </div>\n" +
3835 "\n" +
3687 "\n" +
3688 " <div class=\"form-group\" id=\"row-submit\">\n" +
3689 " <label for=\"submit\" id=\"label-submit\" class=\"control-label col-sm-4 col-lg-3\">\n" +
3690 " </label>\n" +
3691 " <div class=\"col-sm-8 col-lg-9\">\n" +
3692 " <input class=\"form-control btn btn-primary\" id=\"submit\" name=\"submit\" type=\"submit\" value=\"{{$ctrl.$state.params.userId ? 'Update' : 'Add'}} User\">\n" +
3693 " </div>\n" +
3836 " </div>\n" +
3694 " </div>\n" +
3695 " </form>\n" +
3696 " </div>\n" +
3697 " </div>\n" +
3837 "\n" +
3698 "\n" +
3838 "\n" +
3699 "\n" +
3839 " </div>\n" +
3700 " <div class=\"panel panel-default\" ng-if=\"$ctrl.user.id\">\n" +
3701 " <div class=\"panel-heading\">\n" +
3702 " <h3 class=\"panel-title\">Permission Summary</h3>\n" +
3703 " </div>\n" +
3704 " <div class=\"panel-body\">\n" +
3705 " <h3>Direct application permissions</h3>\n" +
3840 "\n" +
3706 "\n" +
3841 " <div class=\"row\">\n" +
3707 " <ul class=\"list-group\">\n" +
3842 " <div class=\"col-sm-6\">\n" +
3708 " <li ng-repeat=\"perm in $ctrl.resourcePermissions.user.application\" class=\"animate-repeat list-group-item\">\n" +
3709 " <strong>{{ perm.self.resource_name }}</strong>\n" +
3710 " <div class=\"pull-right\">\n" +
3843 "\n" +
3711 "\n" +
3844 " <div class=\"panel panel-default\">\n" +
3712 " <span class=\"btn btn-primary btn-xs m-r-1\" disabled ng-repeat=\"perm_name in perm.permissions\">{{ perm.self.owner ? 'Resource owner' : perm_name }}</span>\n" +
3845 " <div class=\"panel-heading position-relative\">\n" +
3846 " <h3 class=\"panel-title\"><span class=\"fa fa-exclamation-triangle\"></span> Newest errors (real-time)\n" +
3847 " </h3>\n" +
3848 " <a tooltip-append-to-body=\"true\" data-uib-tooltip=\"Play/Pause stream\" class=\"btn btn-primary btn-sm pause_stream\" ng-model=\"$ctrl.stream.paused\" uib-btn-checkbox>\n" +
3849 " <span class=\"fa {{stream.paused ? 'fa-play' : 'fa-pause'}}\"></span>\n" +
3850 " </a>\n" +
3851 " <a tooltip-append-to-body=\"true\" data-uib-tooltip=\"Limit reports to current application\" class=\"btn btn-primary btn-sm limit_stream\" ng-model=\"$ctrl.stream.filtered\" uib-btn-checkbox>\n" +
3852 " <span class=\"fa fa-lock\"></span>\n" +
3853 " </a>\n" +
3854 "\n" +
3713 "\n" +
3714 " <a class=\"btn btn-default btn-xs\" data-uib-tooltip=\"Visit Application\" data-ui-sref=\"applications.update({resourceId:perm.self.resource_id})\">\n" +
3715 " <span class=\"fa fa-cog\"></span>\n" +
3716 " </a>\n" +
3717 " </div>\n" +
3718 " </li>\n" +
3719 " </ul>\n" +
3855 "\n" +
3720 "\n" +
3856 " </div>\n" +
3721 " <h3>Direct dashboard permissions</h3>\n" +
3857 " <div class=\"panel-body\">\n" +
3858 "\n" +
3722 "\n" +
3859 " <p ng-if=\"$ctrl.stream.reports.length === 0\">No new reports</p>\n" +
3723 " <ul class=\"list-group\">\n" +
3724 " <li ng-repeat=\"perm in $ctrl.resourcePermissions.user.dashboard\" class=\"animate-repeat list-group-item\">\n" +
3725 " <strong>{{ perm.self.resource_name }}</strong>\n" +
3726 " <div class=\"pull-right\">\n" +
3860 "\n" +
3727 "\n" +
3861 " <div small-report-list reports=\"$ctrl.stream.reports\" applications=\"$ctrl.applications\"></div>\n" +
3728 " <span class=\"btn btn-primary btn-xs m-r-1\" disabled ng-repeat=\"perm_name in perm.permissions\">{{ perm.self.owner ? 'Resource owner' : perm_name }}</span>\n" +
3862 " </div>\n" +
3863 " </div>\n" +
3864 " </div>\n" +
3865 "\n" +
3729 "\n" +
3866 " <div class=\"col-sm-6\">\n" +
3730 " <a class=\"btn btn-default btn-xs\" data-uib-tooltip=\"Visit Dashboard\" data-ui-sref=\"dashboard.update({resourceId:perm.self.resource_id})\">\n" +
3731 " <span class=\"fa fa-cog\"></span>\n" +
3732 " </a>\n" +
3733 " </div>\n" +
3734 " </li>\n" +
3735 " </ul>\n" +
3867 "\n" +
3736 "\n" +
3868 " <div class=\"panel panel-default\">\n" +
3737 " </div>\n" +
3869 " <div class=\"panel-heading\">\n" +
3870 " <h3 class=\"panel-title\"><span class=\"fa fa-sort-amount-desc\"></span> Request breakdown over {{ $ctrl.timeSpan.label }}</h3>\n" +
3871 " </div>\n" +
3872 " <div class=\"panel-body\" id=\"view-breakdown-container\">\n" +
3873 " <p ng-if=\"$ctrl.loading.requestsBreakdown!=false\" class=\"text-center\">\n" +
3874 " <span class=\"fa fa-cog fa-spin fa-5x loader\"></span>\n" +
3875 " </p>\n" +
3876 "\n" +
3738 "\n" +
3877 " <div class=\"report-list\">\n" +
3739 " </div>\n" +
3878 " <div ng-if=\"$ctrl.loading.requestsBreakdown==false\" ng-repeat=\"view in $ctrl.requestsBreakdown\">\n" +
3879 " <div class=\"view-info\">\n" +
3880 " <div class=\"view-name\">\n" +
3881 " <div class=\"bar\" style=\"width: {{view.percentage}}%\">\n" +
3882 " </div>\n" +
3883 " </div>\n" +
3884 " <strong ng-if=\"view.latest_details.length\">\n" +
3885 " <a data-ui-sref=\"report.list_slow({view_name:view.view_name})\">{{view.view_name}}</a></strong>\n" +
3886 " <strong ng-if=\"!view.latest_details.length\">{{view.view_name}}</strong>\n" +
3887 "\n" +
3740 "\n" +
3888 " <div class=\"stats\">\n" +
3889 " <small>\n" +
3890 " avg. response <strong>{{view.avg_response}}s</strong> in\n" +
3891 " <span class=\"requests\"\n" +
3892 " data-uib-tooltip=\"Requests\"><strong>{{view.requests|numberToThousands}}</strong> requests</span>\n" +
3893 "\n" +
3741 "\n" +
3894 " <span ng-if=\"view.latest_details\">\n" +
3742 "</div>\n"
3895 " &nbsp;&nbsp; Latest reports:\n" +
3743 );
3896 " <a ng-repeat=\"d in view.latest_details\" target=\"_blank\" ui-sref=\"report.view_detail({groupId:d.group_id, reportId:d.report_id})\"> <strong>{{$index+1}}</strong></a>\n" +
3744
3897 " </span>\n" +
3745
3898 " </small>\n" +
3746 $templateCache.put('components/views/admin-users-list-view/admin-users-list-view.html',
3899 " </div>\n" +
3747 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.users\"></ng-include>\n" +
3900 "\n" +
3748 "\n" +
3901 " </div>\n" +
3749 "<div ng-show=\"!$ctrl.loading.users\">\n" +
3902 "\n" +
3750 "\n" +
3903 " </div>\n" +
3751 " <div class=\"panel panel-default\">\n" +
3904 " </div>\n" +
3905 "\n" +
3752 "\n" +
3753 " <div class=\"panel-heading\">\n" +
3754 " {{$ctrl.activeUsers}} active out of {{$ctrl.users.length}} users\n" +
3755 " </div>\n" +
3906 "\n" +
3756 "\n" +
3907 " </div>\n" +
3908 " </div>\n" +
3909 "\n" +
3910 " </div>\n" +
3911 "\n" +
3912 " </div>\n" +
3913 "\n" +
3914 " <div class=\"row\">\n" +
3915 " <div class=\"col-sm-6\">\n" +
3916 "\n" +
3917 " <div class=\"panel panel-default\">\n" +
3918 " <div class=\"panel-heading\">\n" +
3919 " <h3 class=\"panel-title\">\n" +
3920 " <span class=\"fa fa-exclamation-triangle\"></span> Report groups trending over {{ $ctrl.timeSpan.label }}\n" +
3921 " </h3>\n" +
3922 " </div>\n" +
3923 " <div class=\"panel-body\">\n" +
3924 " <p ng-if=\"$ctrl.loading.reports != false\" class=\"text-center\">\n" +
3925 " <span class=\"fa fa-cog fa-spin fa-5x loader\"></span>\n" +
3926 " </p>\n" +
3927 "\n" +
3928 " <p ng-if=\"$ctrl.trendingReports.length == 0 && $ctrl.loading.reports == false\">\n" +
3929 " No reports found\n" +
3930 " </p>\n" +
3931 "\n" +
3932 " <div small-report-group-list groups=\"$ctrl.trendingReports\" applications=\"$ctrl.applications\" ng-if=\"$ctrl.loading.reports==false\"></div>\n" +
3933 " </div>\n" +
3934 " </div>\n" +
3935 "\n" +
3936 " </div>\n" +
3937 "\n" +
3938 " <div class=\"col-sm-6\">\n" +
3939 "\n" +
3940 "\n" +
3941 " <div class=\"panel panel-default\">\n" +
3942 " <div class=\"panel-heading\">\n" +
3943 " <h3 class=\"panel-title\">\n" +
3944 " Most common slow calls over {{ $ctrl.timeSpan.label }}\n" +
3945 " </h3>\n" +
3946 " </div>\n" +
3947 " <div class=\"panel-body\">\n" +
3948 "\n" +
3949 " <div ng-if=\"$ctrl.loading.slowCalls!=false\" class=\"text-center\">\n" +
3950 " <span class=\"fa fa-cog fa-spin fa-5x loader\"></span>\n" +
3951 " </div>\n" +
3952 "\n" +
3953 " <table id=\"slow-statements\" ng-if=\"$ctrl.loading.slowCalls==false\">\n" +
3954 " <tbody>\n" +
3955 " <tr ng-repeat=\"call in $ctrl.slowCalls\">\n" +
3956 " <td class=\"occurences\">\n" +
3957 " <span class=\"occurences\" data-uib-tooltip=\"Occurences\">{{call.occurences|numberToThousands}}</span>\n" +
3958 " </td>\n" +
3959 " <td class=\"ellipsis\">\n" +
3960 " <small title=\"{{call.statement}}\" class=\"statement\">{{call.statement}}</small>\n" +
3961 " <br/>\n" +
3962 " <span class=\"type\">{{call.statement_type}}</span>\n" +
3963 " <span class=\"subtype\">{{call.statement_subtype}}</span>\n" +
3964 " <span class=\"duration\" data-uib-tooltip=\"Average duration\">{{call.total_duration/call.occurences|round:2}}s</span>\n" +
3965 " <span class=\"report-list\">\n" +
3966 " Latest reports:\n" +
3967 " <a ng-repeat=\"d in call.latest_details\" target=\"_blank\" ui-sref=\"report.view_detail({groupId:d.group_id, reportId:d.report_id})\"> <strong>{{$index+1}}</strong> </a>\n" +
3968 " </span>\n" +
3969 " </td>\n" +
3970 " </tr>\n" +
3971 " </tbody>\n" +
3972 " </table>\n" +
3973 "\n" +
3757 "\n" +
3758 " <table st-table=\"displayedCollection\" st-safe-src=\"$ctrl.users\" class=\"table table-striped\">\n" +
3759 " <thead>\n" +
3760 " <tr>\n" +
3761 " <th class=\"user_name\" st-sort=\"user_name\"><a>Username</a></th>\n" +
3762 " <th class=\"email\" st-sort=\"email\"><a>Email</a></th>\n" +
3763 " <th class=\"status\" st-sort=\"status\"><a>Status</a></th>\n" +
3764 " <th st-sort=\"first_name\"><a>First Name</a></th>\n" +
3765 " <th st-sort=\"last_name\"><a>Last Name</a></th>\n" +
3766 " <th st-sort=\"last_login_date\"><a>Last login</a></th>\n" +
3767 " <th class=\"options\"></th>\n" +
3768 " </tr>\n" +
3769 " <tr>\n" +
3770 " <th><input st-search=\"user_name\" placeholder=\"search for user name\" class=\"form-control\" type=\"search\" st-delay=\"1\"/></th>\n" +
3771 " <th><input st-search=\"email\" placeholder=\"search for email\" class=\"form-control\" type=\"search\" st-delay=\"1\"/></th>\n" +
3772 " <th></th>\n" +
3773 " <th><input st-search=\"first_name\" placeholder=\"search for first name\" class=\"form-control\" type=\"search\" st-delay=\"1\"/></th>\n" +
3774 " <th><input st-search=\"last_name\" placeholder=\"search for last name\" class=\"form-control\" type=\"search\" st-delay=\"1\"/></th>\n" +
3775 " <th><input st-search=\"last_login_date\" placeholder=\"search for last name\" class=\"form-control\" type=\"search\" st-delay=\"1\"/></th>\n" +
3776 " <th></th>\n" +
3777 " </tr>\n" +
3778 " </thead>\n" +
3779 " <tbody>\n" +
3974 "\n" +
3780 "\n" +
3975 " </div>\n" +
3781 " <tr ng-repeat=\"user in displayedCollection track by user.id\">\n" +
3976 " </div>\n" +
3782 " <td><img src=\"{{user.gravatar_url}}\" class=\"avatar\"> {{user.user_name}}</td>\n" +
3783 " <td class=\"word-wrap small\">{{user.email}}</td>\n" +
3784 " <td class=\"text-center\"><span class=\"fa\" ng-class=\"{'fa-check-circle':user.status, 'fa-times':!user.status}\"></span></td>\n" +
3785 " <td class=\"word-wrap small\">{{user.first_name}}</td>\n" +
3786 " <td class=\"word-wrap small\">{{user.last_name}}</td>\n" +
3787 " <td><span data-uib-tooltip=\"{{user.last_login_date}}\" class=\"small\">{{user.last_login_date | isoToRelativeTime}}</span></td>\n" +
3788 " <td>\n" +
3789 " <a class=\"btn btn-default btn-sm\" data-ui-sref=\"admin.user.update({userId:user.id})\"><span class=\"fa fa-cog\"></span></a>\n" +
3790 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
3791 " <a class=\"btn btn-danger btn-sm\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span></a>\n" +
3792 " <ul class=\"dropdown-menu\">\n" +
3793 " <li><a>No</a></li>\n" +
3794 " <li><a ng-click=\"$ctrl.removeUser(user)\">Yes</a></li>\n" +
3795 " </ul>\n" +
3796 " </span>\n" +
3797 " </tr>\n" +
3798 " <tfoot>\n" +
3799 " <tr>\n" +
3800 " <td colspan=\"6\" class=\"text-center\">\n" +
3801 " <div st-pagination=\"\" st-items-by-page=\"100\" st-displayed-pages=\"7\"></div>\n" +
3802 " </td>\n" +
3803 " </tr>\n" +
3804 " </tfoot>\n" +
3805 " </tbody>\n" +
3806 " </table>\n" +
3977 "\n" +
3807 "\n" +
3978 "\n" +
3808 "\n" +
3979 " </div>\n" +
3809 " </div>\n" +
3810 "</div>\n"
3811 );
3812
3813
3814 $templateCache.put('components/views/admin-view/admin-view.html',
3815 "<div class=\"row\">\n" +
3816 " <div class=\"col-sm-3\" id=\"menu\">\n" +
3817 " <div class=\"panel panel-default\">\n" +
3818 " <div class=\"panel-heading\">Users and groups</div>\n" +
3819 " <ul class=\"list-group\">\n" +
3820 " <li class=\"list-group-item\" ui-sref-active=\"active\"><a data-ui-sref=\"admin.user.list\"> Users</a></li>\n" +
3821 " <li class=\"list-group-item\" ui-sref-active=\"active\"><a data-ui-sref=\"admin.user.create\"> Create user</a></li>\n" +
3822 " <li class=\"list-group-item\" ui-sref-active=\"active\"><a data-ui-sref=\"admin.group.list\"> Groups</a></li>\n" +
3823 " <li class=\"list-group-item\" ui-sref-active=\"active\"><a data-ui-sref=\"admin.group.create\"> Create group</a></li>\n" +
3824 " </ul>\n" +
3825 " </div>\n" +
3826 " <div class=\"panel panel-default\">\n" +
3827 " <div class=\"panel-heading\">Resources</div>\n" +
3828 " <ul class=\"list-group\">\n" +
3829 " <li class=\"list-group-item\" ui-sref-active=\"active\"><a data-ui-sref=\"admin.application.list\"> List applications</a></li>\n" +
3830 " </ul>\n" +
3831 " </div>\n" +
3980 "\n" +
3832 "\n" +
3981 " </div>\n" +
3833 " <div class=\"panel panel-default\">\n" +
3834 " <div class=\"panel-heading\">System</div>\n" +
3835 " <ul class=\"list-group\">\n" +
3836 " <li class=\"list-group-item\" ui-sref-active=\"active\"><a data-ui-sref=\"admin.configs.list\"> Config variables</a></li>\n" +
3837 " <li class=\"list-group-item\" ui-sref-active=\"active\"><a data-ui-sref=\"admin.system\"> System</a></li>\n" +
3838 " <li class=\"list-group-item\" ui-sref-active=\"active\"><a data-ui-sref=\"admin.partitions\"> Partition Management</a></li>\n" +
3839 " </ul>\n" +
3982 " </div>\n" +
3840 " </div>\n" +
3983 " </div>\n" +
3841 " </div>\n" +
3842 "\n" +
3843 " <div class=\"col-sm-9\" ui-view></div>\n" +
3984 "</div>\n"
3844 "</div>\n"
3985 );
3845 );
3986
3846
3987
3847
3988 $templateCache.put('components/views/integrations/bitbucket-integration-config-view/bitbucket-integration-config-view.html',
3848 $templateCache.put('components/views/applications-integrations-view/applications-integrations-view.html',
3989 "<ng-include src=\"'templates/loader.html'\" ng-if=\"integrations.loading.application || $ctrl.loading.integration\"></ng-include>\n" +
3849 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.application && $state.is('applications.integrations')\"></ng-include>\n" +
3990 "\n" +
3850 "\n" +
3991 "<div class=\"panel panel-default\" ng-show=\"!integrations.loading.application && !$ctrl.loading.integration\">\n" +
3851 "<ui-view>\n" +
3992 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
3852 " <div class=\"panel panel-default\" ng-show=\"!$ctrl.loading.application\">\n" +
3993 " <div class=\"panel-body\">\n" +
3853 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
3854 " <div class=\"panel-body\">\n" +
3994 "\n" +
3855 "\n" +
3995 " <h1>Bitbucket Integration</h1>\n" +
3856 " <a class=\"btn btn-default integration\"\n" +
3857 " data-ui-sref=\"applications.integrations.edit({resourceId:$ctrl.resource.resource_id, integration:'bitbucket'})\">\n" +
3858 " <span class=\"fa fa-fw fa-bitbucket fa-3x pull-left\"></span>\n" +
3859 " <strong>Bitbucket</strong>\n" +
3996 "\n" +
3860 "\n" +
3997 " <form name=\"$ctrl.integrationForm\" ng-submit=\"$ctrl.configureIntegration()\" class=\"form-horizontal\">\n" +
3861 " <p>Send issues and reports to Bitbucket</p>\n" +
3998 " <div class=\"form-group\">\n" +
3862 " </a>\n" +
3999 "\n" +
3863 "\n" +
4000 " <label class=\"control-label col-sm-3 col-lg-2\">Repository</label>\n" +
3864 " <a class=\"btn btn-default integration\"\n" +
3865 " data-ui-sref=\"applications.integrations.edit({resourceId:$ctrl.resource.resource_id, integration:'campfire'})\">\n" +
3866 " <span class=\"fa fa-fw fa-comment fa-3x pull-left\"></span>\n" +
3867 " <strong>Campfire</strong>\n" +
4001 "\n" +
3868 "\n" +
4002 " <div class=\"col-sm-8 col-lg-9\">\n" +
3869 " <p>Receive reports and alerts in your Campfire rooms</p>\n" +
3870 " </a>\n" +
4003 "\n" +
3871 "\n" +
4004 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.user_name\"></data-form-errors>\n" +
3872 " <a class=\"btn btn-default integration\"\n" +
4005 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.repo_name\"></data-form-errors>\n" +
3873 " data-ui-sref=\"applications.integrations.edit({resourceId:$ctrl.resource.resource_id, integration:'flowdock'})\">\n" +
3874 " <span class=\"fa fa-fw fa-envelope fa-3x pull-left\"></span>\n" +
3875 " <strong>Flowdock</strong>\n" +
4006 "\n" +
3876 "\n" +
4007 " <div class=\"input-group\">\n" +
3877 " <p>Receive reports and alerts on your Flowdock team\n" +
4008 " <div class=\"input-group-addon\">https://bitbucket.org/</div>\n" +
3878 " inbox</p>\n" +
4009 " <input class=\"form-control\" ng-model=\"$ctrl.config.user_name\" placeholder=\"user\" type=\"text\">\n" +
3879 " </a>\n" +
4010 " <div class=\"input-group-addon\">/</div>\n" +
4011 " <input class=\"form-control\" ng-model=\"$ctrl.config.repo_name\" placeholder=\"repo_name\" type=\"text\">\n" +
4012 " </div>\n" +
4013 "\n" +
3880 "\n" +
4014 " </div>\n" +
3881 " <a class=\"btn btn-default integration\"\n" +
4015 " </div>\n" +
3882 " data-ui-sref=\"applications.integrations.edit({resourceId:$ctrl.resource.resource_id, integration:'github'})\">\n" +
4016 " <div class=\"form-group\">\n" +
3883 " <span class=\"fa fa-fw fa-github fa-3x pull-left\"></span>\n" +
3884 " <strong>Github</strong>\n" +
4017 "\n" +
3885 "\n" +
4018 " <label class=\"control-label col-sm-3 col-lg-2\"></label>\n" +
3886 " <p>Send issues and reports to Github</p>\n" +
3887 " </a>\n" +
4019 "\n" +
3888 "\n" +
4020 " <div class=\"col-sm-8 col-lg-9\">\n" +
3889 " <a class=\"btn btn-default integration\"\n" +
4021 " <input type=\"submit\" class=\"btn btn-primary\" value=\"Use this repo\">\n" +
3890 " data-ui-sref=\"applications.integrations.edit({resourceId:$ctrl.resource.resource_id, integration:'hipchat'})\">\n" +
4022 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
3891 " <span class=\"fa fa-fw fa-comment fa-3x pull-left\"></span>\n" +
4023 " <a class=\"btn btn-danger\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span> Remove Integration</a>\n" +
3892 " <strong>HipChat</strong>\n" +
4024 " <ul class=\"dropdown-menu\">\n" +
4025 " <li><a>No</a></li>\n" +
4026 " <li><a ng-click=\"$ctrl.removeIntegration()\">Yes</a></li>\n" +
4027 " </ul>\n" +
4028 " </span>\n" +
4029 " </div>\n" +
4030 " </div>\n" +
4031 " </form>\n" +
4032 "\n" +
3893 "\n" +
4033 " <p class=\"m-t-1\">Remember you first need to\n" +
3894 " <p>Receive reports and alerts in your Hipchat chanels</p>\n" +
4034 " <strong>\n" +
3895 " </a>\n" +
4035 " <a data-ui-sref=\"user.profile.identities\">authorize your user account</a></strong>\n" +
4036 " with Bitbucket before we can send issues on your behalf.</p>\n" +
4037 "\n" +
3896 "\n" +
4038 " <p>Every user will have to authorize AppEnlight to access Bitbucket to be able to post issues.</p>\n" +
3897 " <a class=\"btn btn-default integration\"\n" +
3898 " data-ui-sref=\"applications.integrations.edit({resourceId:$ctrl.resource.resource_id, integration:'jira'})\">\n" +
3899 " <span class=\"fa fa-fw fa-ticket fa-3x pull-left\"></span>\n" +
3900 " <strong>Jira</strong>\n" +
3901 "\n" +
3902 " <p>Send issues and reports to Jira</p>\n" +
3903 " </a>\n" +
3904 "\n" +
3905 " <a class=\"btn btn-default integration\"\n" +
3906 " data-ui-sref=\"applications.integrations.edit({resourceId:$ctrl.resource.resource_id, integration:'slack'})\">\n" +
3907 " <span class=\"fa fa-fw fa-comment fa-3x pull-left\"></span>\n" +
3908 " <strong>Slack</strong>\n" +
3909 "\n" +
3910 " <p>Receive reports and alerts in your Slack chanels</p>\n" +
3911 " </a>\n" +
3912 "\n" +
3913 " <a class=\"btn btn-default integration\"\n" +
3914 " data-ui-sref=\"applications.integrations.edit({resourceId:$ctrl.resource.resource_id, integration:'webhooks'})\">\n" +
3915 " <span class=\"fa fa-fw fa-cloud-upload fa-3x pull-left\"></span>\n" +
3916 " <strong>Webhooks</strong>\n" +
4039 "\n" +
3917 "\n" +
3918 " <p>Notify third party API's of your reports and alerts</p>\n" +
3919 " </a>\n" +
3920 " </div>\n" +
4040 " </div>\n" +
3921 " </div>\n" +
4041 "</div>\n"
3922 "</ui-view>\n"
4042 );
3923 );
4043
3924
4044
3925
4045 $templateCache.put('components/views/integrations/campfire-integration-config-view/campfire-integration-config-view.html',
3926 $templateCache.put('components/views/applications-list-view/applications-list-view.html',
4046 "<ng-include src=\"'templates/loader.html'\" ng-if=\"integrations.loading.application || $ctrl.loading.integration\"></ng-include>\n" +
3927 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.applications\"></ng-include>\n" +
4047 "\n" +
3928 "\n" +
4048 "<div class=\"panel panel-default\" ng-show=\"!integrations.loading.application && !$ctrl.loading.integration\">\n" +
3929 "<div class=\"panel panel-default\" ng-show=\"!$ctrl.loading.applications\">\n" +
4049 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
3930 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
4050 " <div class=\"panel-body\">\n" +
3931 " <div class=\"panel-body\" ng-if=\"$ctrl.applications.length === 0 \">\n" +
4051 " <h1>Campfire Integration</h1>\n" +
4052 "\n" +
4053 " <form name=\"$ctrl.integrationForm\" ng-submit=\"$ctrl.configureIntegration()\" class=\"form-horizontal\">\n" +
4054 "\n" +
3932 "\n" +
4055 " <div class=\"form-group\">\n" +
3933 " <p>You have to create a new application first.</p>\n" +
4056 "\n" +
3934 "\n" +
4057 " <label class=\"control-label col-sm-3 col-lg-2\">Account name</label>\n" +
3935 " </div>\n" +
4058 " <div class=\"col-sm-8 col-lg-9\">\n" +
4059 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.user_name\"></data-form-errors>\n" +
4060 "\n" +
3936 "\n" +
4061 " <div class=\"input-group\">\n" +
3937 " <table class=\"table table-striped\" ng-if=\"$ctrl.applications.length > 0\">\n" +
4062 " <div class=\"input-group-addon\">http://</div>\n" +
3938 " <thead>\n" +
4063 " <input class=\"form-control\" ng-model=\"$ctrl.config.account\" placeholder=\"account\">\n" +
3939 " <tr>\n" +
4064 " <div class=\"input-group-addon\">.campfirenow.com</div>\n" +
3940 " <th class=\"resource_name\">Resource Name</th>\n" +
4065 " </div>\n" +
3941 " <th class=\"domains\">Domains</th>\n" +
4066 " </div>\n" +
3942 " <th class=\"options\">Options</th>\n" +
4067 " </div>\n" +
3943 " </tr>\n" +
4068 "\n" +
3944 " </thead>\n" +
4069 " <div class=\"form-group\">\n" +
3945 " <tbody>\n" +
4070 " <label class=\"control-label col-sm-3 col-lg-2\">API Token</label>\n" +
3946 " <tr class=\"r{{$index+1}}\" ng-repeat=\"application in $ctrl.applications\">\n" +
4071 " <div class=\"col-sm-8 col-lg-9\">\n" +
3947 " <td>{{application.resource_name}}</td>\n" +
4072 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.api_token\"></data-form-errors>\n" +
3948 " <td>{{application.domains}}</td>\n" +
4073 " <input class=\"form-control\" ng-model=\"$ctrl.config.api_token\" placeholder=\"Your API token\">\n" +
3949 " <td class=\"options\">\n" +
4074 " </div>\n" +
3950 " <a class=\"btn btn-default\" data-ui-sref=\"applications.update({resourceId:application.resource_id})\" data-toggle=\"tooltip\" title=\"Update application\"><span class=\"fa fa-cog\"></span> Update</a>\n" +
4075 " </div>\n" +
3951 " <a class=\"btn btn-default\" data-ui-sref=\"applications.integrations({resourceId:application.resource_id})\" data-toggle=\"tooltip\" title=\"Manage Integrations\"><span class=\"fa fa-wrench\"></span> Integrations</a>\n" +
4076 "\n" +
3952 " </td>\n" +
4077 " <div class=\"form-group\">\n" +
3953 " </tr>\n" +
4078 " <label class=\"control-label col-sm-3 col-lg-2\">Room ID list</label>\n" +
3954 " </tbody>\n" +
4079 " <div class=\"col-sm-8 col-lg-9\">\n" +
3955 " </table>\n" +
4080 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.rooms\"></data-form-errors>\n" +
4081 " <input class=\"form-control\" ng-model=\"$ctrl.config.rooms\" placeholder=\"Room ID list\">\n" +
4082 " <p>\n" +
4083 " <small>Room ID list separated by comma</small>\n" +
4084 " </p>\n" +
4085 " </div>\n" +
4086 " </div>\n" +
4087 " <div class=\"form-group\">\n" +
4088 " <input type=\"submit\" class=\"btn btn-primary\" value=\"Connect to Campfire\">\n" +
4089 "\n" +
4090 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
4091 " <a class=\"btn btn-danger\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span> Remove Integration</a>\n" +
4092 " <ul class=\"dropdown-menu\">\n" +
4093 " <li><a>No</a></li>\n" +
4094 " <li><a ng-click=\"$ctrl.removeIntegration()\">Yes</a></li>\n" +
4095 " </ul>\n" +
4096 " </span>\n" +
4097 "\n" +
4098 " <div class=\"btn-group\" uib-dropdown>\n" +
4099 " <button id=\"single-button\" type=\"button\" class=\"btn btn-info\" uib-dropdown-toggle>\n" +
4100 " Test integration <span class=\"caret\"></span>\n" +
4101 " </button>\n" +
4102 " <ul class=\"dropdown-menu\" role=\"menu\" aria-labelledby=\"single-button\">\n" +
4103 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('report_notification')\">Test report notification</a></li>\n" +
4104 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('error_alert')\">Test error alert</a></li>\n" +
4105 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('uptime_alert')\">Test uptime alert</a></li>\n" +
4106 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('chart_alert')\">Test chart alert</a></li>\n" +
4107 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('daily_digest')\">Test daily digest</a></li>\n" +
4108 " </ul>\n" +
4109 " </div>\n" +
4110 "\n" +
4111 " </div>\n" +
4112 "\n" +
4113 " </form>\n" +
4114 "\n" +
3956 "\n" +
4115 " </div>\n" +
4116 "</div>\n"
3957 "</div>\n"
4117 );
3958 );
4118
3959
4119
3960
4120 $templateCache.put('components/views/integrations/flowdock-integration-config-view/flowdock-integration-config-view.html',
3961 $templateCache.put('components/views/applications-purge-logs-view/applications-purge-logs-view.html',
4121 "<ng-include src=\"'templates/loader.html'\" ng-if=\"integrations.loading.application || $ctrl.loading.integration\"></ng-include>\n" +
3962 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.applications\"></ng-include>\n" +
4122 "\n" +
4123 "<div class=\"panel panel-default\" ng-show=\"!integrations.loading.application && !$ctrl.loading.integration\">\n" +
4124 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
4125 " <div class=\"panel-body\">\n" +
4126 "\n" +
4127 " <h1>Flowdock Integration</h1>\n" +
4128 "\n" +
4129 " <form name=\"$ctrl.integrationForm\" ng-submit=\"$ctrl.configureIntegration()\" class=\"form-horizontal\">\n" +
4130 "\n" +
3963 "\n" +
4131 " <div class=\"form-group\">\n" +
3964 "<div ng-show=\"!$ctrl.loading.applications\">\n" +
3965 " <div class=\"panel panel-default\">\n" +
3966 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
3967 " <div class=\"panel-body\">\n" +
4132 "\n" +
3968 "\n" +
4133 " <label class=\"control-label col-sm-3 col-lg-2\">API Token</label>\n" +
3969 " <form method=\"post\" class=\"form-horizontal\" name=\"$ctrl.form\" ng-submit=\"$ctrl.purgeLogs()\">\n" +
3970 " <div class=\"form-group\">\n" +
3971 " <label class=\"control-label col-sm-3 col-lg-2\">Application:</label>\n" +
4134 "\n" +
3972 "\n" +
4135 " <div class=\"col-sm-8 col-lg-9\">\n" +
3973 " <div class=\"col-sm-9 col-lg-10 form-inline\">\n" +
4136 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.api_token\"></data-form-errors>\n" +
3974 " <select ng-model=\"$ctrl.selectedResource\" ng-change=\"$ctrl.getCommonKeys()\"\n" +
4137 " <input class=\"form-control\" ng-model=\"$ctrl.config.api_token\" placeholder=\"Your API token\" type=\"text\">\n" +
3975 " ng-options=\"r.resource_id as r.resource_name for r in $ctrl.applications\" class=\"form-control\"></select>\n" +
3976 " </div>\n" +
4138 " </div>\n" +
3977 " </div>\n" +
4139 "\n" +
3978 "\n" +
3979 " <div class=\"form-group\">\n" +
3980 " <label class=\"control-label col-sm-3 col-lg-2\">Namespace:</label>\n" +
4140 "\n" +
3981 "\n" +
4141 " </div>\n" +
3982 " <div class=\"col-sm-9 col-lg-10\">\n" +
4142 "\n" +
3983 " <input type=\"text\" name=\"namespace\" ng-model=\"$ctrl.namespace\"\n" +
4143 " <div class=\"form-group\">\n" +
3984 " placeholder=\"Namespace to filter on\" uib-typeahead=\"ns for ns in $ctrl.commonNamespaces\"\n" +
4144 "\n" +
3985 " class=\"form-control\">\n" +
4145 " <label class=\"control-label col-sm-3 col-lg-2\"></label>\n" +
4146 "\n" +
4147 " <div class=\"col-sm-8 col-lg-9\">\n" +
4148 "\n" +
4149 " <input type=\"submit\" class=\"btn btn-primary\" value=\"Connect to Flowdock\">\n" +
4150 "\n" +
4151 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
4152 " <a class=\"btn btn-danger\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span> Remove Integration</a>\n" +
4153 " <ul class=\"dropdown-menu\">\n" +
4154 " <li><a>No</a></li>\n" +
4155 " <li><a ng-click=\"$ctrl.removeIntegration()\">Yes</a></li>\n" +
4156 " </ul>\n" +
4157 " </span>\n" +
4158 " <div class=\"btn-group\" uib-dropdown>\n" +
4159 " <button id=\"single-button\" type=\"button\" class=\"btn btn-info\" uib-dropdown-toggle>\n" +
4160 " Test integration <span class=\"caret\"></span>\n" +
4161 " </button>\n" +
4162 " <ul class=\"dropdown-menu\" role=\"menu\" aria-labelledby=\"single-button\">\n" +
4163 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('report_notification')\">Test report notification</a></li>\n" +
4164 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('error_alert')\">Test error alert</a></li>\n" +
4165 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('uptime_alert')\">Test uptime alert</a></li>\n" +
4166 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('chart_alert')\">Test chart alert</a></li>\n" +
4167 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('daily_digest')\">Test daily digest</a></li>\n" +
4168 " </ul>\n" +
4169 " </div>\n" +
3986 " </div>\n" +
4170 " </div>\n" +
3987 " </div>\n" +
4171 " </div>\n" +
4172 "\n" +
3988 "\n" +
3989 " <div class=\"form-group\">\n" +
3990 " <label class=\"control-label col-sm-3 col-lg-2\"></label>\n" +
4173 "\n" +
3991 "\n" +
4174 " </form>\n" +
3992 " <div class=\"col-sm-8 col-lg-9 \">\n" +
3993 " <input class=\"form-control btn btn-primary\" name=\"submit\" type=\"submit\" value=\"Purge logs meeting the criteria\">\n" +
3994 " </div>\n" +
3995 " </div>\n" +
4175 "\n" +
3996 "\n" +
3997 " </form>\n" +
3998 " </div>\n" +
4176 " </div>\n" +
3999 " </div>\n" +
4177 "</div>\n"
4000 "</div>\n"
4178 );
4001 );
4179
4002
4180
4003
4181 $templateCache.put('components/views/integrations/github-integration-config-view/github-integration-config-view.html',
4004 $templateCache.put('components/views/applications-update-view/applications-update-view.html',
4182 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.application || $ctrl.loading.integration\"></ng-include>\n" +
4005 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.application\"></ng-include>\n" +
4183 "\n" +
4184 "<div class=\"panel panel-default\" ng-show=\"!$ctrl.loading.application && !$ctrl.loading.integration\">\n" +
4185 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
4186 " <div class=\"panel-body\">\n" +
4187 "\n" +
4006 "\n" +
4188 " <h1>Github Integration</h1>\n" +
4007 "<div ng-show=\"!$ctrl.loading.application\">\n" +
4189 "\n" +
4008 "\n" +
4190 " <form name=\"$ctrl.integrationForm\" ng-submit=\"$ctrl.configureIntegration()\" class=\"form-horizontal\">\n" +
4009 " <div class=\"panel panel-default\">\n" +
4010 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
4011 " <div class=\"panel-body\">\n" +
4191 "\n" +
4012 "\n" +
4013 " <div class=\"row\" ng-show=\"$ctrl.resource.resource_id\">\n" +
4014 " <div class=\"col-sm-6\">\n" +
4192 "\n" +
4015 "\n" +
4193 " <div class=\"form-group\">\n" +
4016 " <uib-tabset>\n" +
4017 " <uib-tab>\n" +
4018 " <uib-tab-heading>\n" +
4019 " API keys\n" +
4020 " </uib-tab-heading>\n" +
4194 "\n" +
4021 "\n" +
4195 " <label class=\"control-label col-sm-3 col-lg-2\">Repository</label>\n" +
4022 " <p><strong>PRIVATE API KEY:</strong></p>\n" +
4023 " <p>\n" +
4024 " <div class=\"well well-sm\">{{ $ctrl.resource.api_key }}</div>\n" +
4025 " </p>\n" +
4026 " <p><strong>PUBLIC API KEY</strong> (for javascript clients):</p>\n" +
4027 " <p>\n" +
4028 " <div class=\"well well-sm\">{{ $ctrl.resource.public_key }}</div>\n" +
4029 " </p>\n" +
4030 " <p><small>Your key will be used to identify to which application your data\n" +
4031 " belongs to please keep them private at all times.</small></p>\n" +
4196 "\n" +
4032 "\n" +
4197 " <div class=\"col-sm-8 col-lg-9\">\n" +
4033 " </uib-tab>\n" +
4198 "\n" +
4034 "\n" +
4199 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.user_name\"></data-form-errors>\n" +
4035 " <uib-tab>\n" +
4200 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.repo_name\"></data-form-errors>\n" +
4036 " <uib-tab-heading>\n" +
4037 " <span class=\"btn btn-danger btn-xs\"><span class=\"fa fa-exclamation-triangle\"></span></span> Regenerate API keys\n" +
4038 " </uib-tab-heading>\n" +
4039 " <p>Are you sure you want to regenerate API KEY for this application?</p>\n" +
4040 " <p>All client application keys will need to be updated.</p>\n" +
4041 " <form ng-submit=\"$ctrl.regenerateAPIKeys()\" name=\"$ctrl.regenerateAPIKeysForm\" class=\"form-inline\">\n" +
4042 " <data-form-errors errors=\"$ctrl.regenerateAPIKeysForm.ae_validation.password\"></data-form-errors>\n" +
4043 " <div class=\"form-group\">\n" +
4044 " <input type=\"password\" name=\"confirm\"\n" +
4045 " placeholder=\"Enter your password to proceed\" class=\"form-control\" ng-model=\"$ctrl.regenerateAPIKeysPassword\">\n" +
4046 " <input type=\"submit\" class=\"btn btn-danger\" value=\"Confirm\">\n" +
4047 " </div>\n" +
4048 " </form>\n" +
4049 " </uib-tab>\n" +
4050 " </uib-tabset>\n" +
4051 " </div>\n" +
4052 " <div class=\"col-sm-6 text-center\">\n" +
4053 " <h2 class=\"m-t-0\">How to connect your application?</h2>\n" +
4054 " <p>Visit our <a href=\"{{AeConfig.urls.docs}}\"><strong>developer documentation</strong></a> for step-by-step integration instructions.</p>\n" +
4055 " <div class=\"clearfix\"></div>\n" +
4056 " <p class=\"text-center\">\n" +
4057 " <a href=\"{{AeConfig.urls.docs}}\"><img src=\"/static/appenlight/images/logos/django_small.png\" alt=\"Django Logo\">\n" +
4058 " <img src=\"/static/appenlight/images/logos/pyramid_small.png\" alt=\"Pyramid Logo\">\n" +
4059 " <img src=\"/static/appenlight/images/logos/flask_small.png\" alt=\"Flask Logo\"></a>\n" +
4201 "\n" +
4060 "\n" +
4202 " <div class=\"input-group\">\n" +
4061 " <a href=\"{{AeConfig.urls.docs}}\"><img src=\"/static/appenlight/images/logos/js_small.png\" alt=\"Javascript Logo\">\n" +
4203 " <div class=\"input-group-addon\">https://api.github.com/</div>\n" +
4062 " <img src=\"/static/appenlight/images/logos/nodejs.png\" alt=\"Node.js\"></a>\n" +
4204 " <input class=\"form-control\" ng-model=\"$ctrl.config.user_name\" placeholder=\"user\" type=\"text\">\n" +
4063 " <img src=\"/static/appenlight/images/logos/ruby_small.png\" alt=\"Ruby Logo\">\n" +
4205 " <div class=\"input-group-addon\">/</div>\n" +
4064 " <img src=\"/static/appenlight/images/logos/php_small.png\" alt=\"PHP Logo\">\n" +
4206 " <input class=\"form-control\" ng-model=\"$ctrl.config.repo_name\" placeholder=\"repo_name\" type=\"text\">\n" +
4065 " </a>\n" +
4207 " </div>\n" +
4208 "\n" +
4066 "\n" +
4067 " </p>\n" +
4209 " </div>\n" +
4068 " </div>\n" +
4210 " </div>\n" +
4069 " </div>\n" +
4211 "\n" +
4070 "\n" +
4212 " <div class=\"form-group\">\n" +
4071 " <hr ng-show=\"$ctrl.resource.resource_id\">\n" +
4213 "\n" +
4072 "\n" +
4214 " <label class=\"control-label col-sm-3 col-lg-2\"></label>\n" +
4073 " <form method=\"post\" class=\"form-horizontal\" name=\"$ctrl.BasicForm\" ng-submit=\"$ctrl.updateBasicForm()\" novalidate>\n" +
4074 " <div class=\"form-group\">\n" +
4075 " <data-form-errors errors=\"$ctrl.BasicForm.ae_validation.resource_name\"></data-form-errors>\n" +
4076 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
4077 " Application name\n" +
4078 " <span class=\"required\">*</span>\n" +
4079 " </label>\n" +
4215 "\n" +
4080 "\n" +
4216 " <input type=\"submit\" class=\"btn btn-primary\" value=\"Use this repo\">\n" +
4081 " <div class=\" col-sm-8 col-lg-9 \">\n" +
4082 " <input class=\"form-control\" name=\"resource_name\" placeholder=\"Application Name\" type=\"text\" ng-model=\"$ctrl.resource.resource_name\">\n" +
4083 " </div>\n" +
4217 "\n" +
4084 "\n" +
4218 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
4219 " <a class=\"btn btn-danger\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span> Remove Integration</a>\n" +
4220 " <ul class=\"dropdown-menu\">\n" +
4221 " <li><a>No</a></li>\n" +
4222 " <li><a ng-click=\"$ctrl.removeIntegration()\">Yes</a></li>\n" +
4223 " </ul>\n" +
4224 " </span>\n" +
4225 "\n" +
4085 "\n" +
4226 " </div>\n" +
4086 " </div>\n" +
4227 " </form>\n" +
4228 "\n" +
4087 "\n" +
4229 " <p class=\"m-t-1\">Remember you first need to\n" +
4088 " <div class=\"form-group\">\n" +
4230 " <strong>\n" +
4089 " <data-form-errors errors=\"$ctrl.BasicForm.ae_validation.domains\"></data-form-errors>\n" +
4231 " <a data-ui-sref=\"user.profile.identities\">authorize your user account</a></strong>\n" +
4090 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
4232 " with Github before we can send issues on your behalf.</p>\n" +
4091 " Domain names for CORS headers\n" +
4092 " </label>\n" +
4093 " <div class=\" col-sm-8 col-lg-9 \">\n" +
4094 " <textarea class=\"form-control\" name=\"domains\" ng-model=\"$ctrl.resource.domains\"></textarea>\n" +
4095 " <p class=\"description\">Required for Javascript error tracking (one line one domain, skip http:// part)</p>\n" +
4096 " </div>\n" +
4233 "\n" +
4097 "\n" +
4234 " <p>Every user will have to authorize AppEnlight to access Github to be able to post issues.</p>\n" +
4235 "\n" +
4098 "\n" +
4236 " <div class=\"panel panel-warning\">\n" +
4099 " </div>\n" +
4237 " <div class=\"panel-heading\">Private repository access</div>\n" +
4100 " <div class=\"form-group\" ng-show=\"$ctrl.resource.resource_id\">\n" +
4238 " <div class=\"panel-body\">\n" +
4101 " <data-form-errors errors=\"$ctrl.BasicForm.ae_validation.default_grouping\"></data-form-errors>\n" +
4239 " <p>If you need access to private repositories <a data-ui-sref=\"user.profile.identities\">profile page</a> allows you to require token including private repository permissions.</p>\n" +
4102 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
4103 " Default grouping for errors\n" +
4104 " </label>\n" +
4105 " <div class=\" col-sm-8 col-lg-9 \">\n" +
4106 " <select class=\"form-control\" name=\"default_grouping\" ng-model=\"$ctrl.resource.default_grouping\" ng-options=\"i[0] as i[1] for i in $ctrl.groupingOptions\"></select>\n" +
4107 " </div>\n" +
4240 "\n" +
4108 "\n" +
4241 " <p>Registration page OAuth does NOT give you token with private repository access permissions.</p>\n" +
4109 " </div>\n" +
4242 " </div>\n" +
4110 " <div class=\"form-group\" ng-show=\"$ctrl.resource.resource_id\">\n" +
4243 " </div>\n" +
4111 " <data-form-errors errors=\"$ctrl.BasicForm.ae_validation.error_report_threshold\"></data-form-errors>\n" +
4112 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
4113 " Alert on error reports\n" +
4114 " <span class=\"required\">*</span>\n" +
4115 " </label>\n" +
4116 " <div class=\" col-sm-8 col-lg-9 \">\n" +
4117 " <input class=\"form-control\" name=\"error_report_threshold\" type=\"text\" ng-model=\"$ctrl.resource.error_report_threshold\">\n" +
4118 " <p class=\"description\">Application requires to send at least this amount of error reports per minute to open alert</p>\n" +
4119 " </div>\n" +
4120 " </div>\n" +
4121 " <div class=\"form-group\" ng-show=\"$ctrl.resource.resource_id\">\n" +
4122 " <data-form-errors errors=\"$ctrl.BasicForm.ae_validation.slow_report_threshold\"></data-form-errors>\n" +
4123 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
4124 " Alert on slow reports\n" +
4125 " <span class=\"required\">*</span>\n" +
4126 " </label>\n" +
4244 "\n" +
4127 "\n" +
4245 " </div>\n" +
4128 " <div class=\" col-sm-8 col-lg-9 \">\n" +
4246 "</div>\n"
4129 " <input class=\"form-control\" name=\"slow_report_threshold\" type=\"text\" ng-model=\"$ctrl.resource.slow_report_threshold\">\n" +
4247 );
4130 " <p class=\"description\">Application requires to send at least this amount of slow reports per minute to open alert</p>\n" +
4248
4131 " </div>\n" +
4249
4132 " </div>\n" +
4250 $templateCache.put('components/views/integrations/hipchat-integration-config-view/hipchat-integration-config-view.html',
4133 " <div class=\"form-group\" ng-show=\"$ctrl.resource.resource_id\">\n" +
4251 "<ng-include src=\"'templates/loader.html'\" ng-if=\"integrations.loading.application || $ctrl.loading.integration\"></ng-include>\n" +
4134 " <data-form-errors errors=\"$ctrl.BasicForm.ae_validation.allow_permanent_storage\"></data-form-errors>\n" +
4135 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
4136 " Permanent logs\n" +
4137 " </label>\n" +
4138 " <div class=\" col-sm-8 col-lg-9\">\n" +
4139 " <input class=\"form-control\" name=\"allow_permanent_storage\" type=\"checkbox\" ng-model=\"$ctrl.resource.allow_permanent_storage\">\n" +
4140 " <p class=\"description\">Allow permanent storage of logs in separate DB partitions (only administrator can enable this feature)</p>\n" +
4141 " </div>\n" +
4142 " </div>\n" +
4143 " <div class=\"form-group\">\n" +
4144 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
4252 "\n" +
4145 "\n" +
4253 "<div class=\"panel panel-default\" ng-show=\"!integrations.loading.application && !$ctrl.loading.integration\">\n" +
4146 " </label>\n" +
4254 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
4255 " <div class=\"panel-body\">\n" +
4256 "\n" +
4147 "\n" +
4257 " <h1>Hipchat Integration</h1>\n" +
4148 " <div class=\" col-sm-8 col-lg-9 \">\n" +
4149 " <input class=\"form-control btn btn-primary\" name=\"submit\" type=\"submit\" value=\"{{$ctrl.resource.resource_id? 'Update' : 'Create'}} Application\">\n" +
4150 " </div>\n" +
4151 " </div>\n" +
4152 " </form>\n" +
4153 " </div>\n" +
4154 " </div>\n" +
4258 "\n" +
4155 "\n" +
4259 " <form name=\"$ctrl.integrationForm\" ng-submit=\"$ctrl.configureIntegration()\" class=\"form-horizontal\">\n" +
4156 " <div class=\"panel panel-default\" ng-show=\"$ctrl.resource.resource_id\">\n" +
4157 " <div class=\"panel-heading\">\n" +
4158 " <h3 class=\"panel-title\">Plugins</h3>\n" +
4159 " </div>\n" +
4160 " <div class=\"panel-body\">\n" +
4260 "\n" +
4161 "\n" +
4261 " <div class=\"form-group\">\n" +
4162 " <plugin-config resource=\"$ctrl.resource\"\n" +
4262 " <label class=\"control-label col-sm-3 col-lg-2\">API Token</label>\n" +
4163 " section=\"'application.update'\"\n" +
4164 " ng-if=\"$ctrl.resource.resource_id\">\n" +
4165 " </plugin-config>\n" +
4263 "\n" +
4166 "\n" +
4264 " <div class=\"col-sm-8 col-lg-9\">\n" +
4167 " </div>\n" +
4265 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.api_token\"></data-form-errors>\n" +
4168 " </div>\n" +
4266 " <input class=\"form-control\" ng-model=\"$ctrl.config.api_token\" placeholder=\"Your API token\" type=\"text\">\n" +
4267 " </div>\n" +
4268 " </div>\n" +
4269 "\n" +
4169 "\n" +
4270 " <div class=\"form-group\">\n" +
4170 " <div class=\"panel panel-default m-t-1\" ng-show=\"$ctrl.resource.resource_id\">\n" +
4171 " <div class=\"panel-heading\">\n" +
4172 " <h3 class=\"panel-title\">API Testing</h3>\n" +
4173 " </div>\n" +
4174 " <div class=\"panel-body\">\n" +
4175 " <p>Please be sure to add at least one <a data-ui-sref=\"user.alert_channels.email\"><strong>email alert channel</strong></a> for your account.</p>\n" +
4176 " <p>This will enable AppEnlight to send you notification emails about errors inside your $ctrl.</p>\n" +
4177 " <p><strong>After this is done you can use this CURL commands to test APIs:</strong></p>\n" +
4178 " <p>(Please note that the data like execution times is semi randomly generated)</p>\n" +
4179 " <uib-tabset>\n" +
4180 " <uib-tab>\n" +
4181 " <uib-tab-heading>\n" +
4182 " Log API\n" +
4183 " </uib-tab-heading>\n" +
4271 "\n" +
4184 "\n" +
4272 " <label class=\"control-label col-sm-3 col-lg-2\">Room ID list</label>\n" +
4185 " <div class=\"codehilite\">\n" +
4186 " <pre class=\"m-a-0\">\n" +
4187 "curl -H \"Content-Type: application/json\" -k {{AeConfig.urls.baseUrl}}api/logs?protocol_version=0.5\\&ampapi_key={{$ctrl.resource.api_key}} -d '\n" +
4188 " [\n" +
4189 " {\n" +
4190 " \"log_level\": \"WARNING\",\n" +
4191 " \"message\": \"OMG ValueError happened\",\n" +
4192 " \"namespace\": \"some.namespace.indicator\",\n" +
4193 " \"request_id\": \"SOME_UUID\",\n" +
4194 " \"permanent\": false,\n" +
4195 " \"primary_key\": \"random_key\",\n" +
4196 " \"server\": \"some.server.hostname\",\n" +
4197 " \"date\": \"{{$ctrl.momentJs.utc().milliseconds(0).toISOString()}}\",\n" +
4198 " \"tags\": [[\"tag1\",\"value\"], [\"tag2\", 5]]\n" +
4199 " },\n" +
4200 " {\n" +
4201 " \"log_level\": \"ERROR\",\n" +
4202 " \"message\": \"OMG ValueError happened2\",\n" +
4203 " \"namespace\": \"some.namespace.indicator\",\n" +
4204 " \"request_id\": \"SOME_UUID\",\n" +
4205 " \"permanent\": false,\n" +
4206 " \"server\": \"some.server.hostname\",\n" +
4207 " \"date\": \"{{$ctrl.momentJs.utc().milliseconds(0).toISOString()}}\"\n" +
4208 " }\n" +
4209 " ]'\n" +
4210 " </pre>\n" +
4211 " </div>\n" +
4273 "\n" +
4212 "\n" +
4274 " <div class=\"col-sm-8 col-lg-9\">\n" +
4213 " </uib-tab>\n" +
4275 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.rooms\"></data-form-errors>\n" +
4276 " <input class=\"form-control\" ng-model=\"$ctrl.config.rooms\" placeholder=\"Room ID list\" type=\"text\">\n" +
4277 "\n" +
4214 "\n" +
4278 " <p>\n" +
4215 " <uib-tab>\n" +
4279 " <small>Room ID list separated by comma</small>\n" +
4216 " <uib-tab-heading>\n" +
4280 " </p>\n" +
4217 " Report API\n" +
4281 " </div>\n" +
4218 " </uib-tab-heading>\n" +
4282 "\n" +
4219 "\n" +
4283 " </div>\n" +
4220 " <div class=\"codehilite\">\n" +
4221 " <pre class=\"m-a-0\">\n" +
4222 "curl -H \"Content-Type: application/json\" -k {{AeConfig.urls.baseUrl}}api/reports?protocol_version=0.5\\&ampapi_key={{$ctrl.resource.api_key}} -d '\n" +
4223 " [{\n" +
4224 " \"client\": \"your-client-name-python\",\n" +
4225 " \"language\": \"python\",\n" +
4226 " \"view_name\": \"views/foo:bar\",\n" +
4227 " \"server\": \"SERVERNAME/INSTANCENAME\",\n" +
4228 " \"priority\": 5,\n" +
4229 " \"error\": \"OMG ValueError happened\",\n" +
4230 " \"occurences\":1,\n" +
4231 " \"http_status\": 500,\n" +
4232 " \"tags\": [[\"tag1\",\"value\"], [\"tag2\", 5]],\n" +
4233 " \"username\": \"USER\",\n" +
4234 " \"url\": \"HTTP://SOMEURL\",\n" +
4235 " \"ip\": \"127.0.0.1\",\n" +
4236 " \"start_time\": \"{{$ctrl.momentJs.utc().milliseconds(0).toISOString()}}\",\n" +
4237 " \"end_time\": \"{{$ctrl.momentJs.utc().milliseconds(0).add(2, 'seconds').toISOString()}}\",\n" +
4238 " \"user_agent\": \"BROWSER_AGENT\",\n" +
4239 " \"extra\": [[\"message\",\"CUSTOM MESSAGE\"], [\"custom_value\", \"some payload\"]],\n" +
4240 " \"request_id\": \"SOME_UUID\",\n" +
4241 " \"request\": {\"REQUEST_METHOD\": \"GET\",\n" +
4242 " \"PATH_INFO\": \"/FOO/BAR\",\n" +
4243 " \"POST\": {\"FOO\":\"BAZ\",\"XXX\":\"YYY\"}\n" +
4244 " },\n" +
4245 " \"slow_calls\":[{\n" +
4246 " \"start\": \"{{$ctrl.momentJs.utc().milliseconds(0).toISOString()}}\",\n" +
4247 " \"end\": \"{{$ctrl.momentJs.utc().milliseconds(0).add(1, 'seconds').toISOString()}}\",\n" +
4248 " \"type\": \"sql\",\n" +
4249 " \"subtype\": \"postgresql\",\n" +
4250 " \"parameters\": [\"QPARAM1\",\"QPARAM2\",\"QPARAMX\"],\n" +
4251 " \"statement\": \"QUERY\"\n" +
4252 " }],\n" +
4253 " \"request_stats\": {\n" +
4254 " \"main\": 2.50779,\n" +
4255 " \"nosql\": 0.01008,\n" +
4256 " \"nosql_calls\": 17.0,\n" +
4257 " \"remote\": 0.0,\n" +
4258 " \"remote_calls\": 0.0,\n" +
4259 " \"sql\": 1,\n" +
4260 " \"sql_calls\": 1.0,\n" +
4261 " \"tmpl\": 0.0,\n" +
4262 " \"tmpl_calls\": 0.0,\n" +
4263 " \"custom\": 0.0,\n" +
4264 " \"custom_calls\": 0.0\n" +
4265 " },\n" +
4266 " \"traceback\": [\n" +
4267 " {\"cline\": \"return foo_bar_baz(1,2,3)\",\n" +
4268 " \"file\": \"somedir/somefile.py\",\n" +
4269 " \"fn\": \"somefunction\",\n" +
4270 " \"line\": 454,\n" +
4271 " \"vars\": [[\"a_list\",\n" +
4272 " [\"1\",2,\"4\",\"5\",6]],\n" +
4273 " [\"b\", {\"1\": \"2\", \"ccc\": \"ddd\", \"1\": \"a\"}],\n" +
4274 " [\"obj\", \"object object at 0x7f0030853dc0\"]]\n" +
4275 " },\n" +
4276 " {\"cline\": \"OMG ValueError happened\",\n" +
4277 " \"file\": \"\",\n" +
4278 " \"fn\": \"\",\n" +
4279 " \"line\": \"\",\n" +
4280 " \"vars\": []}\n" +
4281 " ]\n" +
4282 " }]'\n" +
4283 " </pre>\n" +
4284 " </div>\n" +
4284 "\n" +
4285 "\n" +
4285 " <div class=\"form-group\">\n" +
4286 " </uib-tab>\n" +
4286 " <label class=\"control-label col-sm-3 col-lg-2\"></label>\n" +
4287 " <div class=\"col-sm-8 col-lg-9\">\n" +
4288 " <input type=\"submit\" class=\"btn btn-primary\" value=\"Connect to Hipchat\">\n" +
4289 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
4290 " <a class=\"btn btn-danger\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span> Remove Integration</a>\n" +
4291 " <ul class=\"dropdown-menu\">\n" +
4292 " <li><a>No</a></li>\n" +
4293 " <li><a ng-click=\"$ctrl.removeIntegration()\">Yes</a></li>\n" +
4294 " </ul>\n" +
4295 " </span>\n" +
4296 "\n" +
4287 "\n" +
4297 " <div class=\"btn-group\" uib-dropdown>\n" +
4288 " <uib-tab>\n" +
4298 " <button id=\"single-button\" type=\"button\" class=\"btn btn-info\" uib-dropdown-toggle>\n" +
4289 "\n" +
4299 " Test integration <span class=\"caret\"></span>\n" +
4290 " <uib-tab-heading>\n" +
4300 " </button>\n" +
4291 " Metrics API\n" +
4301 " <ul class=\"dropdown-menu\" role=\"menu\" aria-labelledby=\"single-button\">\n" +
4292 " </uib-tab-heading>\n" +
4302 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('report_notification')\">Test report notification</a></li>\n" +
4303 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('error_alert')\">Test error alert</a></li>\n" +
4304 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('uptime_alert')\">Test uptime alert</a></li>\n" +
4305 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('chart_alert')\">Test chart alert</a></li>\n" +
4306 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('daily_digest')\">Test daily digest</a></li>\n" +
4307 " </ul>\n" +
4308 " </div>\n" +
4309 "\n" +
4293 "\n" +
4294 " <div class=\"codehilite\">\n" +
4295 " <pre class=\"m-a-0\">\n" +
4296 "curl -H \"Content-Type: application/json\" -k {{AeConfig.urls.baseUrl}}api/general_metrics?protocol_version=0.5\\&ampapi_key={{$ctrl.resource.api_key}} -d '\n" +
4297 " [{\n" +
4298 " \"namespace\": \"some.monitor\",\n" +
4299 " \"timestamp\": \"{{$ctrl.momentJs.utc().milliseconds(0).toISOString()}}\",\n" +
4300 " \"server_name\": \"server.name\",\n" +
4301 " \"tags\": [[\"value1\", 15.7], [\"value2\", 26]]}]'\n" +
4302 " </pre>\n" +
4310 " </div>\n" +
4303 " </div>\n" +
4311 " </div>\n" +
4312 "\n" +
4304 "\n" +
4313 " </form>\n" +
4305 " </uib-tab>\n" +
4314 "\n" +
4306 "\n" +
4315 " </div>\n" +
4307 " <uib-tab>\n" +
4316 "</div>\n"
4317 );
4318
4319
4320 $templateCache.put('components/views/integrations/jira-integration-config-view/jira-integration-config-view.html',
4321 "<ng-include src=\"'templates/loader.html'\" ng-if=\"integrations.loading.application || $ctrl.loading.integration\"></ng-include>\n" +
4322 "\n" +
4323 "<div class=\"panel panel-default\" ng-show=\"!integrations.loading.application && !$ctrl.loading.integration\">\n" +
4324 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
4325 " <div class=\"panel-body\">\n" +
4326 "\n" +
4308 "\n" +
4327 " <h1>Jira Integration</h1>\n" +
4309 " <uib-tab-heading>\n" +
4310 " Request Stats API\n" +
4311 " </uib-tab-heading>\n" +
4328 "\n" +
4312 "\n" +
4329 " <form name=\"$ctrl.integrationForm\" ng-submit=\"$ctrl.configureIntegration()\" class=\"form-horizontal\">\n" +
4313 " <div class=\"codehilite\">\n" +
4314 " <pre class=\"m-a-0\">\n" +
4315 "curl -H \"Content-Type: application/json\" -k {{AeConfig.urls.baseUrl}}api/request_stats?protocol_version=0.5\\&ampapi_key={{$ctrl.resource.api_key}} -d '\n" +
4316 " [{\"server\": \"some.server.hostname\",\n" +
4317 " \"timestamp\": \"{{$ctrl.momentJs.utc().milliseconds(0).toISOString()}}\",\n" +
4318 " \"metrics\": [[\"dir/module:func\",\n" +
4319 " {\"custom\": 0.0,\n" +
4320 " \"custom_calls\": 0,\n" +
4321 " \"main\": 0.01664,\n" +
4322 " \"nosql\": 0.00061,\n" +
4323 " \"nosql_calls\": 23,\n" +
4324 " \"remote\": 0.0,\n" +
4325 " \"remote_calls\": 0,\n" +
4326 " \"requests\": 1,\n" +
4327 " \"sql\": 0.00105,\n" +
4328 " \"sql_calls\": 2,\n" +
4329 " \"tmpl\": 0.0,\n" +
4330 " \"tmpl_calls\": 0}],\n" +
4331 " [\"SomeView.function\",\n" +
4332 " {\"custom\": 0.0,\n" +
4333 " \"custom_calls\": 0,\n" +
4334 " \"main\": 0.647261,\n" +
4335 " \"nosql\": 0.306554,\n" +
4336 " \"nosql_calls\": 140,\n" +
4337 " \"remote\": 0.0,\n" +
4338 " \"remote_calls\": 0,\n" +
4339 " \"requests\": 28,\n" +
4340 " \"sql\": 0.0,\n" +
4341 " \"sql_calls\": 0,\n" +
4342 " \"tmpl\": 0.0,\n" +
4343 " \"tmpl_calls\": 0}]]\n" +
4344 " }]'\n" +
4345 " </pre>\n" +
4346 " </div>\n" +
4330 "\n" +
4347 "\n" +
4331 " <div class=\"form-group\" id=\"row-host_name\">\n" +
4348 " </uib-tab>\n" +
4332 "\n" +
4349 "\n" +
4333 " <label class=\"control-label col-sm-3 col-lg-2\">\n" +
4350 " </uib-tabset>\n" +
4334 " Server URL <span class=\"required\">*</span>\n" +
4335 " </label>\n" +
4336 " <div class=\"col-sm-8 col-lg-9\">\n" +
4337 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.host_name\"></data-form-errors>\n" +
4338 " <input class=\"form-control\" id=\"host_name\" name=\"host_name\" type=\"text\" ng-model=\"$ctrl.config.host_name\">\n" +
4339 "\n" +
4351 "\n" +
4340 " <p>\n" +
4352 " </div>\n" +
4341 " <small>https://servername.atlassian.net</small>\n" +
4353 " </div>\n" +
4342 " </p>\n" +
4343 "\n" +
4354 "\n" +
4344 " </div>\n" +
4355 " <permissions-form resource=\"$ctrl.resource\" current-permissions=\"$ctrl.resource.current_permissions\"\n" +
4345 " </div>\n" +
4356 " possible-permissions=\"$ctrl.resource.possible_permissions\" ng-if=\"$ctrl.resource.resource_id\"></permissions-form>\n" +
4346 " <div class=\"form-group\" id=\"row-user_name\">\n" +
4347 "\n" +
4357 "\n" +
4348 " <label class=\"control-label col-sm-3 col-lg-2\">\n" +
4358 " <div class=\"panel panel-info\" ng-show=\"$ctrl.resource.resource_id\">\n" +
4349 " Username <span class=\"required\">*</span>\n" +
4359 " <div class=\"panel-heading\">\n" +
4350 " </label>\n" +
4360 " <h3 class=\"panel-title\">Postprocessing</h3>\n" +
4351 " <div class=\"col-sm-8 col-lg-9\">\n" +
4361 " </div>\n" +
4362 " <div class=\"panel-body\">\n" +
4363 " <p>This section allows you influence the rating of report groups - if rule is matched once its not executed anymore</p>\n" +
4352 "\n" +
4364 "\n" +
4353 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.user_name\"></data-form-errors>\n" +
4365 " <p>\n" +
4354 " <input class=\"form-control\" id=\"user_name\" name=\"user_name\" type=\"text\" ng-model=\"$ctrl.config.user_name\">\n" +
4366 " <a class=\"btn btn-info\" ng-click=\"$ctrl.addRule()\"><span class=\"fa fa-plus-circle\"></span> Add rule</a>\n" +
4367 " </p>\n" +
4355 "\n" +
4368 "\n" +
4356 " <p>\n" +
4369 " <post-process-action action=\"action\" resource=\"$ctrl.resource\" ng-repeat=\"action in $ctrl.resource.postprocessing_rules\"></post-process-action>\n" +
4357 " <small>user@email.com</small>\n" +
4370 " </div>\n" +
4358 " </p>\n" +
4371 " </div>\n" +
4359 "\n" +
4372 "\n" +
4360 " </div>\n" +
4373 " <div class=\"panel panel-danger\" ng-show=\"$ctrl.resource.resource_id\">\n" +
4374 " <div class=\"panel-heading\">\n" +
4375 " <h3 class=\"panel-title\">Administration</h3>\n" +
4376 " </div>\n" +
4377 " <div class=\"panel-body\">\n" +
4378 " <h2>Transfer ownership</h2>\n" +
4379 " <p>Please note that by transfering ownership you WILL lose access to the application data and new owner needs to give you access permission</p>\n" +
4380 " <div class=\"confirmation_form\" ng-submit=\"$ctrl.transferApplication()\">\n" +
4381 " <form class=\"form-horizontal\" name=\"$ctrl.formTransfer\">\n" +
4382 " <div class=\"form-group\">\n" +
4383 " <data-form-errors errors=\"$ctrl.formTransfer.ae_validation.password\"></data-form-errors>\n" +
4384 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
4385 " Password\n" +
4386 " </label>\n" +
4387 " <div class=\"col-sm-8 col-lg-9\">\n" +
4388 " <input class=\"form-control\" name=\"password\" type=\"password\" ng-model=\"$ctrl.formTransferModel.password\">\n" +
4389 " </div>\n" +
4390 " </div>\n" +
4391 " <div class=\"form-group\">\n" +
4392 " <data-form-errors errors=\"$ctrl.formTransfer.ae_validation.user_name\"></data-form-errors>\n" +
4393 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
4394 " New owners username\n" +
4395 " </label>\n" +
4396 " <div class=\"col-sm-8 col-lg-9\">\n" +
4397 " <input class=\"form-control\" name=\"user_name\" type=\"text\" ng-model=\"$ctrl.formTransferModel.user_name\">\n" +
4398 " </div>\n" +
4399 " </div>\n" +
4400 " <div class=\"form-group\">\n" +
4401 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
4402 " </label>\n" +
4403 " <div class=\"col-sm-8 col-lg-9\">\n" +
4404 " <button class=\"btn btn-danger\">\n" +
4405 " <span class=\"fa fa-user-plus\"></span>\n" +
4406 " Transfer ownership of application\n" +
4407 " </button>\n" +
4408 " </div>\n" +
4409 " </div>\n" +
4410 " </form>\n" +
4361 " </div>\n" +
4411 " </div>\n" +
4362 " <div class=\"form-group\" id=\"row-password\">\n" +
4363 "\n" +
4412 "\n" +
4364 " <label class=\"control-label col-sm-3 col-lg-2\">\n" +
4413 " <hr/>\n" +
4365 " Password <span class=\"required\">*</span>\n" +
4366 " </label>\n" +
4367 " <div class=\"col-sm-8 col-lg-9\">\n" +
4368 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.password\"></data-form-errors>\n" +
4369 " <input class=\"form-control\" id=\"password\" name=\"password\" type=\"password\" ng-model=\"$ctrl.config.password\">\n" +
4370 " </div>\n" +
4371 " </div>\n" +
4372 " <div class=\"form-group\" id=\"row-project\">\n" +
4373 "\n" +
4414 "\n" +
4374 " <label class=\"control-label col-sm-3 col-lg-2\">\n" +
4415 " <h2>Remove application</h2>\n" +
4375 " Project key <span class=\"required\">*</span>\n" +
4416 " <p><strong>This operation will wipe out all data from database - there is no undo.</strong></p>\n" +
4376 " </label>\n" +
4377 " <div class=\"col-sm-8 col-lg-9\">\n" +
4378 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.project\"></data-form-errors>\n" +
4379 " <input class=\"form-control\" id=\"project\" name=\"project\" type=\"text\" ng-model=\"$ctrl.config.project\">\n" +
4380 " </div>\n" +
4381 " </div>\n" +
4382 " <div class=\"form-group\" id=\"row-submit\">\n" +
4383 " <label class=\"control-label col-sm-3 col-lg-2\"></label>\n" +
4384 " <div class=\"col-sm-8 col-lg-9\">\n" +
4385 " <input class=\"form-control btn btn-primary\" id=\"submit\" name=\"submit\" type=\"submit\" value=\"Setup Jira\">\n" +
4386 "\n" +
4417 "\n" +
4387 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
4418 " <div class=\"confirmation_form\">\n" +
4388 " <a class=\"btn btn-danger\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span> Remove Integration</a>\n" +
4419 " <form class=\"form-horizontal\" name=\"$ctrl.formDelete\" ng-submit=\"$ctrl.deleteApplication()\">\n" +
4389 " <ul class=\"dropdown-menu\">\n" +
4420 " <div class=\"form-group\">\n" +
4390 " <li><a>No</a></li>\n" +
4421 " <data-form-errors errors=\"$ctrl.formDelete.ae_validation.password\"></data-form-errors>\n" +
4391 " <li><a ng-click=\"$ctrl.removeIntegration()\">Yes</a></li>\n" +
4422 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
4392 " </ul>\n" +
4423 " Password\n" +
4393 " </span>\n" +
4424 " </label>\n" +
4394 " </div>\n" +
4425 " <div class=\"col-sm-8 col-lg-9\">\n" +
4426 " <input class=\"form-control\" name=\"password\" type=\"password\" ng-model=\"$ctrl.formDeleteModel.password\">\n" +
4427 " </div>\n" +
4428 " </div>\n" +
4429 " <div class=\"form-group\">\n" +
4430 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
4431 "\n" +
4432 " </label>\n" +
4433 " <div class=\"col-sm-8 col-lg-9\">\n" +
4434 " <button class=\"btn btn-danger\">\n" +
4435 " <span class=\"fa fa-trash-o\"></span>\n" +
4436 " Delete my application\n" +
4437 " </button>\n" +
4438 " </div>\n" +
4439 " </div>\n" +
4440 " </form>\n" +
4395 " </div>\n" +
4441 " </div>\n" +
4442 " </div>\n" +
4443 " </div>\n" +
4444 "</div>\n"
4445 );
4446
4447
4448 $templateCache.put('components/views/event-browser/event-browser.html',
4449 "<div class=\"panel panel-default\">\n" +
4450 " <div class=\"panel-body\">\n" +
4396 "\n" +
4451 "\n" +
4397 " </form>\n" +
4452 " <h1>Event history</h1>\n" +
4453 "\n" +
4454 " <table class=\"table table-striped event-table\">\n" +
4455 " <tr ng-repeat=\"event in $ctrl.events track by event.id\">\n" +
4456 " <td class=\"text-center icons\">\n" +
4457 " <span ng-if=\"event.event_type === 1\" class=\"fa fa-exclamation-triangle fa-2x\" style=\"color:orangered\"></span>\n" +
4458 " <span ng-if=\"event.event_type === 3\" class=\"fa fa-clock-o fa-2x\" style=\"color:darkorange\"></span>\n" +
4459 " <span ng-if=\"event.event_type === 7\" class=\"fa fa-question-circle fa-2x\" style=\"color:dimgrey\"></span>\n" +
4460 " <span ng-if=\"event.event_type === 9\" class=\"fa fa-line-chart fa-2x\" style=\"color:green\"></span>\n" +
4461 " </td>\n" +
4462 " <td>\n" +
4463 " <p>For <strong>{{ event.resource_name }}</strong></p>\n" +
4464 "\n" +
4465 " <p>{{ event.text }}</p>\n" +
4466 " <small class=\"date\" data-uib-tooltip=\"{{event.start_date}}\"> created:\n" +
4467 " <iso-to-relative-time time=\"{{event.start_date}}\"/>\n" +
4468 " </small>\n" +
4469 " <small class=\"date\" ng-show=\"event.end_date\" data-uib-tooltip=\"{{event.end_date}}\"> | closed:\n" +
4470 " <iso-to-relative-time time=\"{{event.end_date}}\"/>\n" +
4471 " </small>\n" +
4472 " </td>\n" +
4473 " <td class=\"options\">\n" +
4398 "\n" +
4474 "\n" +
4475 " <span class=\"dropdown pull-right\" ng-if=\"event.status === 1\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
4476 " <a class=\"dropdown-toggle btn btn-danger\" data-uib-dropdown-toggle>\n" +
4477 " <span class=\"fa fa-exclamation-circle\"></span>\n" +
4478 " </a>\n" +
4479 " <ul class=\"dropdown-menu\">\n" +
4480 " <li>\n" +
4481 " <a ng-click=\"$ctrl.closeEvent(event)\">Close event</a>\n" +
4482 " <a>Do nothing</a>\n" +
4483 " </li>\n" +
4484 " </ul>\n" +
4485 " </span>\n" +
4399 "\n" +
4486 "\n" +
4487 " </td>\n" +
4488 " </tr>\n" +
4489 " </table>\n" +
4400 " </div>\n" +
4490 " </div>\n" +
4401 "</div>\n"
4491 "</div>\n"
4402 );
4492 );
4403
4493
4404
4494
4405 $templateCache.put('components/views/integrations/slack-integration-config-view/slack-integration-config-view.html',
4495 $templateCache.put('components/views/index-dashboard/index-dashboard.html',
4406 "<ng-include src=\"'templates/loader.html'\" ng-if=\"integrations.loading.application || $ctrl.loading.integration\"></ng-include>\n" +
4496 "<style type=\"text/css\">\n" +
4497 " #metrics_chart .c3-line {\n" +
4498 " stroke-width: 0px;\n" +
4499 " }\n" +
4407 "\n" +
4500 "\n" +
4408 "<div class=\"panel panel-default\" ng-show=\"!integrations.loading.application && !$ctrl.loading.integration\">\n" +
4501 " #metrics_chart .c3-area {\n" +
4409 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
4502 " stroke-width: 0;\n" +
4410 " <div class=\"panel-body\">\n" +
4503 " opacity: 0.75;\n" +
4504 " }\n" +
4505 "</style>\n" +
4411 "\n" +
4506 "\n" +
4412 " <h1>Slack Integration</h1>\n" +
4507 "<div class=\"row\">\n" +
4508 " <div class=\"col-sm-12 dashboard\" id=\"content\">\n" +
4509 " <div ng-if=\"!$ctrl.stateHolder.AeUser.applications.length\">\n" +
4413 "\n" +
4510 "\n" +
4414 " <form name=\"$ctrl.integrationForm\" ng-submit=\"$ctrl.configureIntegration()\" class=\"form-horizontal\">\n" +
4511 " <div ng-include=\"'templates/quickstart.html'\"></div>\n" +
4415 "\n" +
4512 "\n" +
4416 " <div class=\"form-group\">\n" +
4513 " </div>\n" +
4417 "\n" +
4514 "\n" +
4418 " <label class=\"control-label col-sm-3 col-lg-2\">\n" +
4515 " <div ng-if=\"$ctrl.stateHolder.AeUser.applications.length\">\n" +
4419 " API Token <span class=\"required\">*</span>\n" +
4420 " </label>\n" +
4421 " <div class=\"col-sm-8 col-lg-9\">\n" +
4422 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.webhook_url\"></data-form-errors>\n" +
4423 " <input class=\"form-control\" ng-model=\"$ctrl.config.webhook_url\" placeholder=\"Webhook URL\" type=\"webhook_url\">\n" +
4424 " </div>\n" +
4425 " </div>\n" +
4426 "\n" +
4516 "\n" +
4427 " <div class=\"form-group\">\n" +
4517 " <div class=\"row\">\n" +
4518 " <div class=\"col-sm-6\">\n" +
4519 " <div class=\"panel panel-default\">\n" +
4520 " <div class=\"panel-body\">\n" +
4521 " <form class=\"graph-type form-inline\">\n" +
4522 " <select ng-model=\"$ctrl.resource\" ng-options=\"r.resource_id as r.resource_name for r in $ctrl.stateHolder.AeUser.applications\" ng-change=\"$ctrl.updateSearchParams()\"\n" +
4523 " class=\"SelectField form-control input-sm slim-input\"></select>\n" +
4428 "\n" +
4524 "\n" +
4429 " <label class=\"control-label col-sm-3 col-lg-2\"></label>\n" +
4525 " <select class=\"SelectField form-control input-sm slim-input\" ng-model=\"$ctrl.timeSpan\"\n" +
4430 " <div class=\"col-sm-8 col-lg-9\">\n" +
4526 " ng-options=\"i as i.label for i in $ctrl.timeOptions | objectToOrderedArray:'minutes'\" ng-change=\"$ctrl.updateSearchParams()\"\n" +
4431 " <input type=\"submit\" class=\"btn btn-primary\"\n" +
4527 " class=\"SelectField\"></select>\n" +
4432 " value=\"Connect to Slack\">\n" +
4433 "\n" +
4528 "\n" +
4434 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
4435 " <a class=\"btn btn-danger\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span> Remove Integration</a>\n" +
4436 " <ul class=\"dropdown-menu\">\n" +
4437 " <li><a>No</a></li>\n" +
4438 " <li><a ng-click=\"$ctrl.removeIntegration()\">Yes</a></li>\n" +
4439 " </ul>\n" +
4440 " </span>\n" +
4441 "\n" +
4529 "\n" +
4442 " <div class=\"btn-group\" uib-dropdown>\n" +
4530 " <div class=\"btn-group\">\n" +
4443 " <button type=\"button\" class=\"btn btn-info\" uib-dropdown-toggle>\n" +
4531 " <button type=\"button\" class=\"btn btn-primary btn-sm\" ng-model=\"$ctrl.graphType.selected\" ng-change=\"$ctrl.updateSearchParams()\"\n" +
4444 " Test integration <span class=\"caret\"></span>\n" +
4532 " uib-btn-radio=\"'requests_graphs'\" data-uib-tooltip=\"Requests per second\">\n" +
4445 " </button>\n" +
4533 " <span class=\"fa fa-line-chart\"></span>\n" +
4446 " <ul class=\"dropdown-menu\" role=\"menu\" aria-labelledby=\"single-button\">\n" +
4534 " </button>\n" +
4447 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('report_notification')\">Test report notification</a></li>\n" +
4535 " <button type=\"button\" class=\"btn btn-primary btn-sm\" ng-model=\"$ctrl.graphType.selected\" ng-change=\"$ctrl.updateSearchParams()\"\n" +
4448 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('error_alert')\">Test error alert</a></li>\n" +
4536 " uib-btn-radio=\"'response_graphs'\" data-uib-tooltip=\"Average response time\">\n" +
4449 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('uptime_alert')\">Test uptime alert</a></li>\n" +
4537 " <span class=\"fa fa-random\"></span>\n" +
4450 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('chart_alert')\">Test chart alert</a></li>\n" +
4538 " </button>\n" +
4451 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('daily_digest')\">Test daily digest</a></li>\n" +
4539 " <button type=\"button\" class=\"btn btn-primary btn-sm\" ng-model=\"$ctrl.graphType.selected\" ng-change=\"$ctrl.updateSearchParams()\"\n" +
4452 " </ul>\n" +
4540 " uib-btn-radio=\"'metrics_graphs'\" data-uib-tooltip=\"Time spent per request\">\n" +
4453 " </div>\n" +
4541 " <span class=\"fa fa-bar-chart-o\"></span>\n" +
4454 " </div>\n" +
4542 " </button>\n" +
4455 " </div>\n" +
4543 " <button type=\"button\" class=\"btn btn-primary btn-sm\" ng-model=\"$ctrl.graphType.selected\" ng-change=\"$ctrl.updateSearchParams()\"\n" +
4456 " </form>\n" +
4544 " uib-btn-radio=\"'report_graphs'\" data-uib-tooltip=\"Errors\">\n" +
4545 " <span class=\"fa fa-exclamation-triangle\"></span>\n" +
4546 " </button>\n" +
4547 " <button type=\"button\" class=\"btn btn-primary btn-sm\" ng-model=\"$ctrl.graphType.selected\" ng-change=\"$ctrl.updateSearchParams()\"\n" +
4548 " uib-btn-radio=\"'slow_report_graphs'\" data-uib-tooltip=\"Slow reports\">\n" +
4549 " <span class=\"fa fa-clock-o\"></span>\n" +
4550 " </button>\n" +
4551 " </div>\n" +
4552 " </form>\n" +
4553 " <div class=\"clearfix\"></div>\n" +
4457 "\n" +
4554 "\n" +
4458 " </div>\n" +
4555 " <p ng-if=\"$ctrl.loading.series != false\" class=\"text-center\">\n" +
4459 "</div>\n"
4556 " <span class=\"fa fa-cog fa-spin fa-5x loader\"></span>\n" +
4460 );
4557 " </p>\n" +
4461
4462
4463 $templateCache.put('components/views/integrations/webhooks-integration-config-view/webhooks-integration-config-view.html',
4464 "<ng-include src=\"'templates/loader.html'\" ng-if=\"integrations.loading.application || $ctrl.loading.integration\"></ng-include>\n" +
4465 "\n" +
4558 "\n" +
4466 "<div class=\"panel panel-default\" ng-show=\"!integrations.loading.application && !$ctrl.loading.integration\">\n" +
4559 " <div ng-if=\"$ctrl.loading.series == false\">\n" +
4467 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
4560 " <div ng-if=\"$ctrl.graphType.selected == 'requests_graphs'\">\n" +
4468 " <div class=\"panel-body\">\n" +
4561 " <c3chart data-domid=\"reponse_chart\" data-data=\"$ctrl.requestsChartData\" data-config=\"$ctrl.requestsChartConfig\" update=\"true\">\n" +
4562 " </c3chart>\n" +
4563 " </div>\n" +
4469 "\n" +
4564 "\n" +
4470 " <h1>Webhooks Integration</h1>\n" +
4565 " <div ng-if=\"$ctrl.graphType.selected == 'response_graphs'\">\n" +
4566 " <c3chart data-domid=\"reponse_chart\" data-data=\"$ctrl.responseChartData\" data-config=\"$ctrl.responseChartConfig\" update=\"true\">\n" +
4567 " </c3chart>\n" +
4568 " </div>\n" +
4471 "\n" +
4569 "\n" +
4472 " <form name=\"$ctrl.integrationForm\" ng-submit=\"$ctrl.configureIntegration()\" class=\"form-horizontal\">\n" +
4570 " <div ng-if=\"$ctrl.graphType.selected == 'metrics_graphs'\">\n" +
4473 " <div class=\"form-group\" id=\"row-reports_webhook\">\n" +
4571 " <c3chart data-domid=\"metrics_chart\" data-data=\"$ctrl.metricsChartData\" data-config=\"$ctrl.metricsChartConfig\" update=\"true\">\n" +
4572 " </c3chart>\n" +
4573 " </div>\n" +
4574 " <div ng-if=\"$ctrl.graphType.selected == 'report_graphs'\">\n" +
4575 " <c3chart data-domid=\"reports_chart\" data-data=\"$ctrl.reportChartData\" data-config=\"$ctrl.reportChartConfig\" update=\"true\">\n" +
4576 " </c3chart>\n" +
4577 " </div>\n" +
4474 "\n" +
4578 "\n" +
4475 " <label class=\"control-label col-sm-3 col-lg-2\">\n" +
4579 " <div ng-if=\"$ctrl.graphType.selected == 'slow_report_graphs'\">\n" +
4476 " Reports webhook <span class=\"required\">*</span>\n" +
4580 " <c3chart data-domid=\"slow_reports_chart\" data-data=\"$ctrl.reportSlowChartData\" data-config=\"$ctrl.reportSlowChartConfig\" update=\"true\">\n" +
4477 " </label>\n" +
4581 " </c3chart>\n" +
4478 " <div class=\"col-sm-8 col-lg-9\">\n" +
4582 " </div>\n" +
4479 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.reports_webhook\"></data-form-errors>\n" +
4480 " <input class=\"form-control\" id=\"reports_webhook\" name=\"reports_webhook\" type=\"text\" ng-model=\"$ctrl.config.reports_webhook\">\n" +
4481 " </div>\n" +
4482 " </div>\n" +
4483 " <div class=\"form-group\" id=\"row-alerts_webhook\">\n" +
4484 "\n" +
4583 "\n" +
4485 " <label class=\"control-label col-sm-3 col-lg-2\">\n" +
4584 " <p ng-if=\"$ctrl.graphType.selected == 'requests_graphs'\" class=\"text-center\">\n" +
4486 " Alerts webhook <span class=\"required\">*</span>\n" +
4585 " <small>Average requests per second from all servers</small>\n" +
4487 " </label>\n" +
4586 " </p>\n" +
4488 " <div class=\"col-sm-8 col-lg-9\">\n" +
4489 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.alerts_webhook\"></data-form-errors>\n" +
4490 " <input class=\"form-control StringField None\" id=\"alerts_webhook\" name=\"alerts_webhook\" type=\"text\" ng-model=\"$ctrl.config.alerts_webhook\">\n" +
4491 " </div>\n" +
4492 "\n" +
4587 "\n" +
4588 " <p ng-if=\"$ctrl.graphType.selected == 'response_graphs'\" class=\"text-center\">\n" +
4589 " <small>Average response time from all servers</small>\n" +
4590 " </p>\n" +
4493 "\n" +
4591 "\n" +
4494 " </div>\n" +
4592 " <p ng-if=\"$ctrl.graphType.selected == 'metrics_graphs'\" class=\"text-center\">\n" +
4495 " <div class=\"form-group\" id=\"row-submit\">\n" +
4593 " <small>Aggregated average time spent per request - broken to layers</small>\n" +
4594 " </p>\n" +
4496 "\n" +
4595 "\n" +
4497 " <label class=\"control-label col-sm-3 col-lg-2\"></label>\n" +
4596 " <p ng-if=\"$ctrl.graphType.selected == 'report_graphs'\" class=\"text-center\">\n" +
4498 " <div class=\"col-sm-8 col-lg-9\">\n" +
4597 " <small>Aggregated reports sent by your application</small>\n" +
4499 " <input class=\"form-control btn btn-primary\" id=\"submit\" name=\"submit\" type=\"submit\" value=\"Setup webhooks\">\n" +
4598 " </p>\n" +
4500 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
4599 "\n" +
4501 " <a class=\"btn btn-danger\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span> Remove Integration</a>\n" +
4600 " <p ng-if=\"$ctrl.graphType.selected == 'slow_report_graphs'\" class=\"text-center\">\n" +
4502 " <ul class=\"dropdown-menu\">\n" +
4601 " <small>Aggregated slow reports sent by your application</small>\n" +
4503 " <li><a>No</a></li>\n" +
4602 " </p>\n" +
4504 " <li><a ng-click=\"$ctrl.removeIntegration()\">Yes</a></li>\n" +
4603 " </div>\n" +
4505 " </ul>\n" +
4604 " </div>\n" +
4506 " </span>\n" +
4605 " </div>\n" +
4507 " </div>\n" +
4606 " </div>\n" +
4508 " </div>\n" +
4509 " </form>\n" +
4510 " </div>\n" +
4511 "</div>\n"
4512 );
4513
4514
4515 $templateCache.put('components/views/logs-browser/logs-browser.html',
4516 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.isLoading.logs\"></ng-include>\n" +
4517 "\n" +
4607 "\n" +
4518 "<div ng-if=\"$ctrl.isLoading.logs === false\">\n" +
4519 "\n" +
4608 "\n" +
4520 " <p class=\"search-params\">\n" +
4609 " <div class=\"col-sm-6\">\n" +
4521 " <strong>Search params:</strong>\n" +
4522 " <span ng-repeat=\"tag in $ctrl.searchParams.tags\" class=\"tag\">\n" +
4523 " <strong>{{tag.type}}</strong>\n" +
4524 " {{ tag.type == 'resource' ? $ctrl.applications[tag.value].resource_name : tag.value }}\n" +
4525 "\n" +
4610 "\n" +
4526 " <a ng-click=\"$ctrl.removeSearchTag(tag)\"><span class=\"fa fa-times\"></span></a>\n" +
4611 " <div id=\"server-container\">\n" +
4527 " </span>\n" +
4528 " </p>\n" +
4529 "\n" +
4612 "\n" +
4530 " <p>\n" +
4613 " <div ng-if=\"$ctrl.loading.apdex==false\" class=\"text-center m-b-1\">\n" +
4531 "\n" +
4614 "\n" +
4532 " <script type=\"text/ng-template\" id=\"SearchTypeAheadUrl.html\">\n" +
4615 " <a data-ui-sref=\"report.list({resource:$ctrl.resource, start_date:$ctrl.startDateFilter})\" class=\"combined-stat text-center\" id=\"error-rate\">\n" +
4616 " <small>Exceptions</small>\n" +
4617 " <br/>\n" +
4618 " <strong>{{ $ctrl.exceptions|numberToThousands}}</strong>\n" +
4619 " <span class=\"fa fa-chevron-right\"></span>\n" +
4620 " </a><!--\n" +
4533 "\n" +
4621 "\n" +
4534 " </script>\n" +
4622 " --><a data-ui-sref=\"report.list_slow({resource:$ctrl.resource, min_duration:4, start_date:$ctrl.startDateFilter})\" class=\"combined-stat text-center\" id=\"frustrating-requests\" data-uib-tooltip=\"Requests over 4s\">\n" +
4623 " <small>Frustrating req.</small>\n" +
4624 " <br/>\n" +
4625 " <strong>{{$ctrl.frustratingRequests|numberToThousands}}</strong>\n" +
4626 " <span class=\"fa fa-chevron-right\"></span>\n" +
4627 " </a><!--\n" +
4535 "\n" +
4628 "\n" +
4536 " <form class=\"form\">\n" +
4629 " --><a data-ui-sref=\"report.list_slow({resource:$ctrl.resource, min_duration:1, max_duration:4, start_date:$ctrl.startDateFilter})\" class=\"combined-stat text-center\" id=\"tolerated-requests\"\n" +
4537 " <div class=\"typeahead-tags\">\n" +
4630 " data-uib-tooltip=\"Requests under 4s\">\n" +
4538 " <input type=\"text\" id=\"typeAhead\" ng-model=\"$ctrl.filterTypeAhead\" placeholder=\"Start typing to filter logs for events, filter by servers, namespaces, levels.\"\n" +
4631 " <small>Tolerated req.</small>\n" +
4539 " ng-keydown=\"$ctrl.typeAheadTag($event)\"\n" +
4632 " <br/>\n" +
4540 " uib-typeahead=\"tag as tag.text for tag in $ctrl.filterTypeAheadOptions | filter:$viewValue:$ctrl.aheadFilter\"\n" +
4633 " <strong>{{$ctrl.toleratedRequests|numberToThousands}}</strong>\n" +
4541 " typeahead-min-length=\"1\" class=\"form-control\"\n" +
4634 " <span class=\"fa fa-chevron-right\"></span>\n" +
4542 " typeahead-template-url=\"templates/directives/search_type_ahead.html\">\n" +
4635 " </a><!--\n" +
4543 " </div>\n" +
4636 " \n" +
4544 " </form>\n" +
4637 " --><a class=\"combined-stat text-center\" id=\"satisfying-requests\" data-uib-tooltip=\"Requests under 1s\">\n" +
4638 " <small>Satisfying req.</small>\n" +
4639 " <br/>\n" +
4640 " <strong>{{$ctrl.satisfyingRequests|numberToThousands}}</strong>\n" +
4641 " </a><!--\n" +
4545 "\n" +
4642 "\n" +
4546 " <div class=\"well animate-show position-absolute increse-zindex\" ng-if=\"$ctrl.showDatePicker\" ng-model=\"$ctrl.pickerDate\" ng-change=\"$ctrl.pickerDateChanged()\">\n" +
4643 " --><a data-ui-sref=\"uptime({resource:$ctrl.resource})\" class=\"combined-stat text-center\" id=\"uptime-stats\" data-uib-tooltip=\"Uptime\">\n" +
4547 " <uib-datepicker></uib-datepicker>\n" +
4644 " <small>Uptime</small>\n" +
4548 " </div>\n" +
4645 " <br/>\n" +
4646 " <strong>{{$ctrl.uptimeStats}}%</strong>\n" +
4647 " <span class=\"fa fa-chevron-right\"></span>\n" +
4648 " </a>\n" +
4549 "\n" +
4649 "\n" +
4550 " </p>\n" +
4650 " <div class=\"clearfix\"></div>\n" +
4651 " </div>\n" +
4551 "\n" +
4652 "\n" +
4552 " <div class=\"panel\">\n" +
4653 " <div id=\"apdex-rate\" class=\"m-b-1 panel panel-default\">\n" +
4654 " <table class=\"servers table table-striped\">\n" +
4655 " <thead>\n" +
4656 " <tr>\n" +
4657 " <th></th>\n" +
4658 " <th>Server</th>\n" +
4659 " <th>Apdex\n" +
4660 " <span class=\"fa fa-question-circle\"\n" +
4661 " data-uib-tooltip=\"Application Performance Index - measures viewer satisfaction based on response times and error rates\"></span>\n" +
4662 " </th>\n" +
4663 " <th>rpm</th>\n" +
4664 " <th>avg. response</th>\n" +
4665 " </tr>\n" +
4666 " </thead>\n" +
4667 " <tbody>\n" +
4668 " <tr ng-if=\"$ctrl.loading.apdex!=false\" class=\"text-center\">\n" +
4669 " <td colspan=\"5\"><span class=\"fa fa-cog fa-spin fa-5x loader\"></span></td>\n" +
4670 " </tr>\n" +
4671 " <tr ng-repeat=\"server in $ctrl.apdexStats\" class=\"{{ server | apdexValue }}\"\n" +
4672 " ng-if=\"$ctrl.loading.apdex==false\">\n" +
4673 " <td><span class=\"fa fa-hdd-o\"></span></td>\n" +
4674 " <td>\n" +
4675 " <small><strong>{{ server.name }}</strong></small>\n" +
4676 " </td>\n" +
4677 " <td class=\"apdex\">\n" +
4678 " <small><strong>{{ server.apdex }} %</strong></small>\n" +
4679 " </td>\n" +
4680 " <td>\n" +
4681 " <small><strong>{{ server.rpm }}rpm</strong></small>\n" +
4682 " </td>\n" +
4683 " <td>\n" +
4684 " <small><strong>{{ server.avg_response_time }}s</strong></small>\n" +
4685 " </td>\n" +
4686 " </tr>\n" +
4687 " </tbody>\n" +
4688 " </table>\n" +
4553 "\n" +
4689 "\n" +
4554 " <div class=\"panel-body\">\n" +
4690 " </div>\n" +
4555 " <c3chart data-domid=\"log_events_chart\" data-data=\"$ctrl.logEventsChartData\" data-config=\"$ctrl.logEventsChartConfig\">\n" +
4691 " </div>\n" +
4556 " </c3chart>\n" +
4557 " </div>\n" +
4558 " </div>\n" +
4559 "\n" +
4692 "\n" +
4693 " </div>\n" +
4560 "\n" +
4694 "\n" +
4561 " <div class=\"text-center\">\n" +
4562 " <uib-pagination total-items=\"$ctrl.itemCount\" items-per-page=\"$ctrl.itemsPerPage\" ng-model=\"$ctrl.page\" max-size=\"10\"\n" +
4563 " ng-change=\"$ctrl.paginationChange()\"\n" +
4564 " class=\"pagination pagination-sm\" boundary-links=\"true\" direction-links=\"false\"></uib-pagination>\n" +
4565 " </div>\n" +
4566 "\n" +
4695 "\n" +
4567 " <div class=\"panel panel-default\">\n" +
4696 " </div>\n" +
4568 "\n" +
4697 "\n" +
4569 " <table class=\"table table-striped log-list\">\n" +
4698 " <div class=\"row\">\n" +
4570 " <caption>Logs</caption>\n" +
4699 " <div class=\"col-sm-6\">\n" +
4571 " <thead>\n" +
4572 " <tr>\n" +
4573 " <th class=\"c1 resource\">Application</th>\n" +
4574 " <th class=\"c2 message\">Message</th>\n" +
4575 " <th class=\"c3 when\">When</th>\n" +
4576 " </tr>\n" +
4577 " </thead>\n" +
4578 " <tbody>\n" +
4579 " <tr ng-repeat=\"log in $ctrl.logsPage track by log.log_id\" class=\"{{$odd ? 'odd' : 'even'}}\">\n" +
4580 " <td class=\"c1\">\n" +
4581 " <a class=\"tag application\" ng-click=\"$ctrl.addSearchTag({type:'resource', value:log.resource_id})\">\n" +
4582 " <span class=\"name\">{{log.resource_name}}</span></a>\n" +
4583 " </td>\n" +
4584 " <td class=\"c2\">\n" +
4585 " <a class=\"tag {{log.log_level|lowercase}}\" ng-click=\"$ctrl.addSearchTag({type:'level', value:log.log_level})\">\n" +
4586 " <span class=\"name\">level:</span> {{log.log_level}}</a>\n" +
4587 " <a class=\"tag\" ng-click=\"$ctrl.addSearchTag({type:'namespace', value:log.namespace})\">\n" +
4588 " <span class=\"name\">namespace:</span> {{log.namespace}}</a>\n" +
4589 " <a ng-repeat=\"(tag, value) in log.tags\" class=\"tag\" ng-click=\"$ctrl.addSearchTag({type:tag, value:value})\">\n" +
4590 " <span class=\"name\">{{tag}}:</span> {{value}}</a>\n" +
4591 " <div class=\"log\">{{log.message}}</div>\n" +
4592 " </td>\n" +
4593 " <td class=\"c3 when\">\n" +
4594 " <a ng-click=\"$ctrl.filterId(log)\" data-uib-tooltip=\"{{log.timestamp}}\">\n" +
4595 " <iso-to-relative-time time=\"{{log.timestamp}}\"/>\n" +
4596 " </a>\n" +
4597 " </td>\n" +
4598 " </tr>\n" +
4599 "\n" +
4700 "\n" +
4600 " </tbody>\n" +
4701 " <div class=\"panel panel-default\">\n" +
4601 " </table>\n" +
4702 " <div class=\"panel-heading position-relative\">\n" +
4703 " <h3 class=\"panel-title\"><span class=\"fa fa-exclamation-triangle\"></span> Newest errors (real-time)\n" +
4704 " </h3>\n" +
4705 " <a tooltip-append-to-body=\"true\" data-uib-tooltip=\"Play/Pause stream\" class=\"btn btn-primary btn-sm pause_stream\" ng-model=\"$ctrl.stream.paused\" uib-btn-checkbox>\n" +
4706 " <span class=\"fa {{stream.paused ? 'fa-play' : 'fa-pause'}}\"></span>\n" +
4707 " </a>\n" +
4708 " <a tooltip-append-to-body=\"true\" data-uib-tooltip=\"Limit reports to current application\" class=\"btn btn-primary btn-sm limit_stream\" ng-model=\"$ctrl.stream.filtered\" uib-btn-checkbox>\n" +
4709 " <span class=\"fa fa-lock\"></span>\n" +
4710 " </a>\n" +
4602 "\n" +
4711 "\n" +
4603 " </div>\n" +
4604 "\n" +
4712 "\n" +
4605 " <div class=\"text-center\">\n" +
4713 " </div>\n" +
4606 " <uib-pagination total-items=\"$ctrl.itemCount\" items-per-page=\"$ctrl.itemsPerPage\" ng-model=\"$ctrl.page\" max-size=\"10\"\n" +
4714 " <div class=\"panel-body\">\n" +
4607 " ng-change=\"$ctrl.paginationChange()\"\n" +
4608 " class=\"pagination pagination-sm\" boundary-links=\"true\" direction-links=\"false\"></uib-pagination>\n" +
4609 " </div>\n" +
4610 "\n" +
4715 "\n" +
4611 "</div>\n"
4716 " <p ng-if=\"$ctrl.stream.reports.length === 0\">No new reports</p>\n" +
4612 );
4613
4614
4615 $templateCache.put('components/views/report-view/report-view.html',
4616 "<script type=\"text/ng-template\" id=\"slow_call.html\">\n" +
4617 " <table class=\"report-table\">\n" +
4618 " <tr>\n" +
4619 " <td class=\"table-label\">Type</td>\n" +
4620 " <td class=\"data\"><strong>{{call.type}}\n" +
4621 " ({{call.subtype}})\n" +
4622 " </strong></td>\n" +
4623 " </tr>\n" +
4624 " <tr>\n" +
4625 " <td class=\"table-label\">Duration</td>\n" +
4626 " <td class=\"data\"><strong class=\"textColor_1\">{{call.duration}}</strong></td>\n" +
4627 " </tr>\n" +
4628 " <tr>\n" +
4629 " <td class=\"table-label\">Start Time</td>\n" +
4630 " <td class=\"data\">{{call.timestamp}}</td>\n" +
4631 " </tr>\n" +
4632 " <tr>\n" +
4633 " <td class=\"table-label\">Statement</td>\n" +
4634 " <td class=\"data\">\n" +
4635 " <pre class=\"word-wrap\">{{call.statement}}</pre>\n" +
4636 " </td>\n" +
4637 " </tr>\n" +
4638 " <tr ng-if=\"call.location\">\n" +
4639 " <td class=\"table-label\">Location</td>\n" +
4640 " <td class=\"data\">{{call.location}}</td>\n" +
4641 " </tr>\n" +
4642 " <tr>\n" +
4643 " <td class=\"table-label\">Parameters</td>\n" +
4644 " <td class=\"\">\n" +
4645 " <div class=\"var-listing\" human-format vars=\"call.parameters\"></div>\n" +
4646 " </td>\n" +
4647 " </tr>\n" +
4648 " </table>\n" +
4649 "\n" +
4717 "\n" +
4650 " <div ng-if=\"call.children.length > 0\" class=\"subcalls p-l-8\">\n" +
4718 " <div small-report-list reports=\"$ctrl.stream.reports\" applications=\"$ctrl.applications\"></div>\n" +
4719 " </div>\n" +
4720 " </div>\n" +
4721 " </div>\n" +
4651 "\n" +
4722 "\n" +
4652 " <p><strong>\n" +
4723 " <div class=\"col-sm-6\">\n" +
4653 " <small>Sub-calls</small>\n" +
4654 " </strong></p>\n" +
4655 "\n" +
4724 "\n" +
4656 " <div class=\"panel panel-default\">\n" +
4725 " <div class=\"panel panel-default\">\n" +
4657 " <div ng-repeat=\"call in call.children\" ng-include=\"'slow_call.html'\" class=\"panel-body\"/>\n" +
4726 " <div class=\"panel-heading\">\n" +
4658 " </div>\n" +
4727 " <h3 class=\"panel-title\"><span class=\"fa fa-sort-amount-desc\"></span> Request breakdown over {{ $ctrl.timeSpan.label }}</h3>\n" +
4659 " </div>\n" +
4728 " </div>\n" +
4660 " </div>\n" +
4729 " <div class=\"panel-body\" id=\"view-breakdown-container\">\n" +
4730 " <p ng-if=\"$ctrl.loading.requestsBreakdown!=false\" class=\"text-center\">\n" +
4731 " <span class=\"fa fa-cog fa-spin fa-5x loader\"></span>\n" +
4732 " </p>\n" +
4661 "\n" +
4733 "\n" +
4662 "</script>\n" +
4734 " <div class=\"report-list\">\n" +
4735 " <div ng-if=\"$ctrl.loading.requestsBreakdown==false\" ng-repeat=\"view in $ctrl.requestsBreakdown\">\n" +
4736 " <div class=\"view-info\">\n" +
4737 " <div class=\"view-name\">\n" +
4738 " <div class=\"bar\" style=\"width: {{view.percentage}}%\">\n" +
4739 " </div>\n" +
4740 " </div>\n" +
4741 " <strong ng-if=\"view.latest_details.length\">\n" +
4742 " <a data-ui-sref=\"report.list_slow({view_name:view.view_name})\">{{view.view_name}}</a></strong>\n" +
4743 " <strong ng-if=\"!view.latest_details.length\">{{view.view_name}}</strong>\n" +
4663 "\n" +
4744 "\n" +
4664 "<script type=\"text/ng-template\" id=\"AssignReportCtrl.html\">\n" +
4745 " <div class=\"stats\">\n" +
4746 " <small>\n" +
4747 " avg. response <strong>{{view.avg_response}}s</strong> in\n" +
4748 " <span class=\"requests\"\n" +
4749 " data-uib-tooltip=\"Requests\"><strong>{{view.requests|numberToThousands}}</strong> requests</span>\n" +
4665 "\n" +
4750 "\n" +
4666 " <div class=\"modal-header\">\n" +
4751 " <span ng-if=\"view.latest_details\">\n" +
4667 " <h3>Assign users to report</h3>\n" +
4752 " &nbsp;&nbsp; Latest reports:\n" +
4668 " </div>\n" +
4753 " <a ng-repeat=\"d in view.latest_details\" target=\"_blank\" ui-sref=\"report.view_detail({groupId:d.group_id, reportId:d.report_id})\"> <strong>{{$index+1}}</strong></a>\n" +
4669 " <div class=\"modal-body\">\n" +
4754 " </span>\n" +
4755 " </small>\n" +
4756 " </div>\n" +
4670 "\n" +
4757 "\n" +
4671 " <ng-include src=\"'templates/loader.html'\" ng-if=\"ctrl.loading\"></ng-include>\n" +
4758 " </div>\n" +
4672 "\n" +
4759 "\n" +
4673 " <div class=\"row\" ng-if=\"!ctrl.loading\">\n" +
4760 " </div>\n" +
4674 " <div class=\"col-sm-6\">\n" +
4761 " </div>\n" +
4675 " <strong>Unassigned</strong>\n" +
4676 "\n" +
4762 "\n" +
4677 " <div class=\"user-assignment\" ng-repeat=\"user in ctrl.unAssignedUsers\"\n" +
4678 " ng-click=\"ctrl.reassignUser(user)\">\n" +
4679 " <img ng-src=\"{{user.gravatar_url}}\"/>\n" +
4680 " <strong>{{user.user_name}}</strong><br/>\n" +
4681 " {{user.name}}\n" +
4682 " <div class=\"clear\"></div>\n" +
4683 " </div>\n" +
4684 " </div>\n" +
4685 "\n" +
4763 "\n" +
4686 " <div class=\"col-sm-6\">\n" +
4764 " </div>\n" +
4687 " <strong>Assigned</strong>\n" +
4765 " </div>\n" +
4688 "\n" +
4766 "\n" +
4689 " <div class=\"user-assignment\" ng-repeat=\"user in ctrl.assignedUsers\" ng-click=\"ctrl.reassignUser(user)\">\n" +
4690 " <img ng-src=\"{{user.gravatar_url}}\"/>\n" +
4691 " {{user.user_name}}<br/>\n" +
4692 " {{user.name}}\n" +
4693 " <div class=\"clear\"></div>\n" +
4694 " </div>\n" +
4767 " </div>\n" +
4768 "\n" +
4695 " </div>\n" +
4769 " </div>\n" +
4696 " </div>\n" +
4697 " </div>\n" +
4698 " <div class=\"modal-footer\">\n" +
4699 " <button class=\"btn btn-primary\" ng-click=\"ctrl.ok()\">OK</button>\n" +
4700 " <button class=\"btn btn-warning\" ng-click=\"ctrl.cancel()\">Cancel</button>\n" +
4701 " </div>\n" +
4702 "</script>\n" +
4703 "\n" +
4770 "\n" +
4704 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.is_loading.report\"></ng-include>\n" +
4771 " <div class=\"row\">\n" +
4772 " <div class=\"col-sm-6\">\n" +
4705 "\n" +
4773 "\n" +
4706 "<div ng-if=\"!$ctrl.is_loading.report && $ctrl.report === null\">\n" +
4774 " <div class=\"panel panel-default\">\n" +
4707 " <strong>OOPS something went wrong :(</strong>\n" +
4775 " <div class=\"panel-heading\">\n" +
4708 "</div>\n" +
4776 " <h3 class=\"panel-title\">\n" +
4777 " <span class=\"fa fa-exclamation-triangle\"></span> Report groups trending over {{ $ctrl.timeSpan.label }}\n" +
4778 " </h3>\n" +
4779 " </div>\n" +
4780 " <div class=\"panel-body\">\n" +
4781 " <p ng-if=\"$ctrl.loading.reports != false\" class=\"text-center\">\n" +
4782 " <span class=\"fa fa-cog fa-spin fa-5x loader\"></span>\n" +
4783 " </p>\n" +
4709 "\n" +
4784 "\n" +
4710 "<div ng-if=\"$ctrl.report !== null && !$ctrl.is_loading.report\">\n" +
4785 " <p ng-if=\"$ctrl.trendingReports.length == 0 && $ctrl.loading.reports == false\">\n" +
4786 " No reports found\n" +
4787 " </p>\n" +
4711 "\n" +
4788 "\n" +
4712 " <div ng-if=\"$ctrl.stateHolder.AeUser.id\" class=\"row\">\n" +
4789 " <div small-report-group-list groups=\"$ctrl.trendingReports\" applications=\"$ctrl.applications\" ng-if=\"$ctrl.loading.reports==false\"></div>\n" +
4713 " <div class=\"col-lg-12\">\n" +
4790 " </div>\n" +
4714 " <a onclick=\"window.history.back()\" class=\"btn btn-default\" ng-if=\"$ctrl.window.history.length > 2\"><span class=\"fa fa-arrow-circle-o-left\"></span>\n" +
4791 " </div>\n" +
4715 " Go back</a>\n" +
4716 " <a class=\"btn btn-default\" ng-click=\"$ctrl.assignUsersModal()\" ng-if=\"$ctrl.reportType == 'report'\"><span\n" +
4717 " class=\"fa fa-flag\"></span> Assign report\n" +
4718 " to user</a>\n" +
4719 "\n" +
4792 "\n" +
4720 " <a class=\"btn {{ $ctrl.report.group.fixed ? 'btn-success' : 'btn-default'}}\" ng-click=\"$ctrl.markFixed()\"\n" +
4793 " </div>\n" +
4721 " ng-if=\"$ctrl.reportType == 'report'\">\n" +
4722 " <span class=\"fa fa-check\"></span> Mark fixed</a>\n" +
4723 "\n" +
4794 "\n" +
4724 " <span class=\"dropdown\" ng-if=\"$ctrl.report.application.integrations.length\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
4795 " <div class=\"col-sm-6\">\n" +
4725 " <a class=\"dropdown-toggle btn btn-default\" data-uib-dropdown-toggle>\n" +
4726 " <span class=\"fa fa-send\"></span> Integrations\n" +
4727 " </a>\n" +
4728 " <ul class=\"dropdown-menu\">\n" +
4729 " <li ng-repeat=\"choice in $ctrl.report.application.integrations\">\n" +
4730 " <a ng-click=\"$ctrl.runIntegration(choice.name)\">{{choice.action}}</a>\n" +
4731 " </li>\n" +
4732 " </ul>\n" +
4733 " </span>\n" +
4734 "\n" +
4796 "\n" +
4735 " <a class=\"btn btn-default\" ng-click=\"$ctrl.markPublic()\">Make {{$ctrl.group.public ? 'private' : 'public'}}</a>\n" +
4736 "\n" +
4797 "\n" +
4737 "<span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
4798 " <div class=\"panel panel-default\">\n" +
4738 " <a class=\"btn btn-danger\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span> Delete</a>\n" +
4799 " <div class=\"panel-heading\">\n" +
4739 " <ul class=\"dropdown-menu\">\n" +
4800 " <h3 class=\"panel-title\">\n" +
4740 " <li><a>No</a></li>\n" +
4801 " Most common slow calls over {{ $ctrl.timeSpan.label }}\n" +
4741 " <li><a ng-click=\"$ctrl.delete()\">Yes</a></li>\n" +
4802 " </h3>\n" +
4742 " </ul>\n" +
4803 " </div>\n" +
4743 "</span>\n" +
4804 " <div class=\"panel-body\">\n" +
4744 " </div>\n" +
4745 " </div>\n" +
4746 "\n" +
4805 "\n" +
4747 " <div class=\"row\">\n" +
4806 " <div ng-if=\"$ctrl.loading.slowCalls!=false\" class=\"text-center\">\n" +
4748 " <div class=\"col-lg-4\">\n" +
4807 " <span class=\"fa fa-cog fa-spin fa-5x loader\"></span>\n" +
4808 " </div>\n" +
4749 "\n" +
4809 "\n" +
4750 " <div class=\"panel panel-default m-t-1\">\n" +
4810 " <table id=\"slow-statements\" ng-if=\"$ctrl.loading.slowCalls==false\">\n" +
4751 " <div class=\"panel-body\">\n" +
4811 " <tbody>\n" +
4752 "\n" +
4812 " <tr ng-repeat=\"call in $ctrl.slowCalls\">\n" +
4753 " <h3 class=\"m-t-0\">Report Information</h3>\n" +
4813 " <td class=\"occurences\">\n" +
4754 "\n" +
4814 " <span class=\"occurences\" data-uib-tooltip=\"Occurences\">{{call.occurences|numberToThousands}}</span>\n" +
4755 " <table class=\"report-table with-ellipsis\">\n" +
4815 " </td>\n" +
4756 " <tr>\n" +
4816 " <td class=\"ellipsis\">\n" +
4757 " <td class=\"table-label\">Occurences</td>\n" +
4817 " <small title=\"{{call.statement}}\" class=\"statement\">{{call.statement}}</small>\n" +
4758 " <td class=\"data\">{{$ctrl.report.group.occurences}}</td>\n" +
4818 " <br/>\n" +
4759 " </tr>\n" +
4819 " <span class=\"type\">{{call.statement_type}}</span>\n" +
4760 " <tr ng-if=\"$ctrl.report.http_status\">\n" +
4820 " <span class=\"subtype\">{{call.statement_subtype}}</span>\n" +
4761 " <td class=\"table-label\">HTTP status</td>\n" +
4821 " <span class=\"duration\" data-uib-tooltip=\"Average duration\">{{call.total_duration/call.occurences|round:2}}s</span>\n" +
4762 " <td class=\"data\">{{$ctrl.report.http_status}}</td>\n" +
4822 " <span class=\"report-list\">\n" +
4763 " </tr>\n" +
4823 " Latest reports:\n" +
4764 " <tr ng-if=\"$ctrl.report.group.priority\">\n" +
4824 " <a ng-repeat=\"d in call.latest_details\" target=\"_blank\" ui-sref=\"report.view_detail({groupId:d.group_id, reportId:d.report_id})\"> <strong>{{$index+1}}</strong> </a>\n" +
4765 " <td class=\"table-label\">Priority</td>\n" +
4825 " </span>\n" +
4766 " <td class=\"data\">{{$ctrl.report.group.priority}}</td>\n" +
4826 " </td>\n" +
4767 " </tr>\n" +
4827 " </tr>\n" +
4768 " <tr ng-if=\"$ctrl.report.group.public\">\n" +
4828 " </tbody>\n" +
4769 " <td class=\"table-label\">Public URL</td>\n" +
4829 " </table>\n" +
4770 " <td class=\"data\">\n" +
4771 " <form>\n" +
4772 " <textarea class=\"TextAreaField form-control\" id=\"public-url\" onclick=\"this.select()\">{{$ctrl.$state.href($ctrl.$state.current.name, $ctrl.$state.params, {absolute: true})}}</textarea>\n" +
4773 " </form>\n" +
4774 " </td>\n" +
4775 " </tr>\n" +
4776 " <tr data-uib-tooltip=\"{{$ctrl.report.url}}\">\n" +
4777 " <td class=\"table-label\">URL</td>\n" +
4778 " <td class=\"data ellipsis\"><a href=\"{{$ctrl.report.url}}\">{{$ctrl.report.url}}</a></td>\n" +
4779 " </tr>\n" +
4780 "\n" +
4781 " <tr ng-if=\"$ctrl.report.ip\">\n" +
4782 " <td class=\"table-label\">Remote IP</td>\n" +
4783 " <td class=\"data\">{{$ctrl.report.ip}}</td>\n" +
4784 " </tr>\n" +
4785 " <tr ng-if=\"$ctrl.report.user_agent\" data-uib-tooltip=\"{{$ctrl.report.user_agent}}\">\n" +
4786 " <td class=\"table-label\">User Agent</td>\n" +
4787 " <td class=\"data ellipsis\">{{$ctrl.report.user_agent}}</td>\n" +
4788 " </tr>\n" +
4789 " <tr ng-if=\"$ctrl.report.message\">\n" +
4790 " <td class=\"table-label\">Message</td>\n" +
4791 " <td class=\"data\">{{$ctrl.report.message}}</td>\n" +
4792 " </tr>\n" +
4793 " <tr ng-if=\"$ctrl.report.duration > 0\">\n" +
4794 " <td class=\"table-label\">Duration</td>\n" +
4795 " <td class=\"data\">\n" +
4796 " <span>{{$ctrl.report.duration}}s</span>\n" +
4797 " </td>\n" +
4798 " </tr>\n" +
4799 " <tr>\n" +
4800 " <td class=\"table-label\">First occured</td>\n" +
4801 " <td class=\"data\">\n" +
4802 " <span uib-tooltip=\"{{$ctrl.report.group.first_timestamp}}\"><iso-to-relative-time\n" +
4803 " time=\"{{$ctrl.report.group.first_timestamp}}\"/></span>\n" +
4804 " </td>\n" +
4805 " </tr>\n" +
4806 " <tr>\n" +
4807 " <td class=\"table-label\">Last occured</td>\n" +
4808 " <td class=\"data\">\n" +
4809 " <span uib-tooltip=\"{{$ctrl.report.group.last_timestamp}}\"><iso-to-relative-time\n" +
4810 " time=\"{{$ctrl.report.group.last_timestamp}}\"/></span>\n" +
4811 " </td>\n" +
4812 " </tr>\n" +
4813 " </table>\n" +
4814 "\n" +
4815 " <div ng-if=\"$ctrl.requestStats\">\n" +
4816 " <h3>Performance stats</h3>\n" +
4817 "\n" +
4830 "\n" +
4818 " <div class=\"perf_stats\">\n" +
4819 " <span class=\"stat\" ng-repeat=\"stat in $ctrl.requestStats\"\n" +
4820 " ng-if=\"stat.calls > 0 || stat.value > 0\"><strong>\n" +
4821 " <span class=\"{{stat.name}} bar\" style=\"width:10px\"></span> {{stat.calls}}\n" +
4822 " <span ng-if=\"stat.name!='main'\"><small>{{stat.name}} calls</small></span>\n" +
4823 " <span ng-if=\"stat.name=='main'\">\n" +
4824 " <span class=\"fa fa-question-circle\"\n" +
4825 " data-uib-tooltip=\"Execution time that didnt get assigned to other layers\"></span> Other</span>\n" +
4826 " </strong>\n" +
4827 " </span>\n" +
4828 "\n" +
4831 "\n" +
4829 " <div style=\"width: 100%; overflow:hidden\">\n" +
4830 " <div class=\"{{stat.name}} bar\" style=\"width:{{stat.percent}}%; height: 25px\"\n" +
4831 " ng-repeat=\"stat in $ctrl.requestStats\"\n" +
4832 " data-uib-tooltip=\"{{stat.value}}s - Cumulative time spent in this request on all {{ stat.name }} calls\"></div>\n" +
4833 " <div class=\"row\">\n" +
4834 " <div class=\"col-xs-6 text-left\">\n" +
4835 " <small>0s</small>\n" +
4836 " </div>\n" +
4837 " <div class=\"col-xs-6 text-right\">\n" +
4838 " <small>{{$ctrl.report.duration.toFixed(3)}}s</small>\n" +
4839 " </div>\n" +
4840 " </div>\n" +
4841 " </div>\n" +
4842 " </div>\n" +
4832 " </div>\n" +
4843 " </div>\n" +
4833 " </div>\n" +
4844 "\n" +
4834 "\n" +
4845 " <h3>Tags</h3>\n" +
4846 "\n" +
4847 " <table class=\"report-table with-tags\">\n" +
4848 " <tr ng-repeat=\"(tag, value) in $ctrl.report.tags\">\n" +
4849 " <td class=\"table-label\" ng-switch=\"tag\"><!--\n" +
4850 " --><span ng-switch-when=\"user_name\">Username/UID</span><!--\n" +
4851 " --><span ng-switch-when=\"view_name\">View Name</span><!--\n" +
4852 " --><span ng-switch-when=\"server_name\">Server Name</span><!--\n" +
4853 " --><span ng-switch-default>{{ tag }}</span>\n" +
4854 " </td>\n" +
4855 " <td class=\"data\"><a ng-click=\"$ctrl.searchTag(tag, value)\">{{ value }}</td>\n" +
4856 " </tr>\n" +
4857 " </table>\n" +
4858 "\n" +
4835 "\n" +
4859 " </div>\n" +
4836 " </div>\n" +
4837 "\n" +
4860 " </div>\n" +
4838 " </div>\n" +
4839 " </div>\n" +
4840 " </div>\n" +
4841 "</div>\n"
4842 );
4843
4844
4845 $templateCache.put('components/views/integrations/bitbucket-integration-config-view/bitbucket-integration-config-view.html',
4846 "<ng-include src=\"'templates/loader.html'\" ng-if=\"integrations.loading.application || $ctrl.loading.integration\"></ng-include>\n" +
4861 "\n" +
4847 "\n" +
4848 "<div class=\"panel panel-default\" ng-show=\"!integrations.loading.application && !$ctrl.loading.integration\">\n" +
4849 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
4850 " <div class=\"panel-body\">\n" +
4862 "\n" +
4851 "\n" +
4863 " </div>\n" +
4852 " <h1>Bitbucket Integration</h1>\n" +
4864 " <div class=\"col-lg-8\">\n" +
4865 " <div class=\"frames\">\n" +
4866 " <p class=\"text-center\">Report history</p>\n" +
4867 "\n" +
4853 "\n" +
4868 " <div class=\"panel\" ng-if=\"!$ctrl.is_loading.history\">\n" +
4854 " <form name=\"$ctrl.integrationForm\" ng-submit=\"$ctrl.configureIntegration()\" class=\"form-horizontal\">\n" +
4869 " <div class=\"panel-body\">\n" +
4855 " <div class=\"form-group\">\n" +
4870 " <c3chart data-domid=\"report_history_chart\" data-data=\"$ctrl.reportHistoryData\" data-config=\"$ctrl.reportHistoryConfig\">\n" +
4871 " </c3chart>\n" +
4872 " </div>\n" +
4873 " </div>\n" +
4874 "\n" +
4856 "\n" +
4875 " <div class=\"row m-b-1\">\n" +
4857 " <label class=\"control-label col-sm-3 col-lg-2\">Repository</label>\n" +
4876 " <div class=\"col-sm-2 text-left\">\n" +
4877 " <a class=\"switch_detail btn btn-sm btn-default {{$ctrl.report.group.previous_report ? '' : 'disabled'}}\"\n" +
4878 " ng-click=\"$ctrl.previousDetail()\">\n" +
4879 " <span class=\"fa fa-arrow-left\"></span>\n" +
4880 " Prev. detail</a>\n" +
4881 "\n" +
4858 "\n" +
4859 " <div class=\"col-sm-8 col-lg-9\">\n" +
4860 "\n" +
4861 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.user_name\"></data-form-errors>\n" +
4862 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.repo_name\"></data-form-errors>\n" +
4863 "\n" +
4864 " <div class=\"input-group\">\n" +
4865 " <div class=\"input-group-addon\">https://bitbucket.org/</div>\n" +
4866 " <input class=\"form-control\" ng-model=\"$ctrl.config.user_name\" placeholder=\"user\" type=\"text\">\n" +
4867 " <div class=\"input-group-addon\">/</div>\n" +
4868 " <input class=\"form-control\" ng-model=\"$ctrl.config.repo_name\" placeholder=\"repo_name\" type=\"text\">\n" +
4882 " </div>\n" +
4869 " </div>\n" +
4883 " <div class=\"col-sm-8 text-center\">\n" +
4870 "\n" +
4884 " <small>\n" +
4885 " <span uib-tooltip=\"{{$ctrl.report.start_time|isoToRelativeTime}}\" class=\"m-r-1\">\n" +
4886 " {{$ctrl.report.start_time.replace('T', ' ')}} UTC</span>\n" +
4887 " <span class=\"text-muted\">ID: {{$ctrl.report.request_id}}</span>\n" +
4888 " </small>\n" +
4889 " </div>\n" +
4890 " <div class=\"col-sm-2 text-right\">\n" +
4891 " <a class=\"switch_detail btn btn-sm btn-default {{$ctrl.report.group.next_report ? '' : 'disabled'}}\"\n" +
4892 " ng-click=\"$ctrl.nextDetail()\">\n" +
4893 " Next detail <span class=\"fa fa-arrow-right\"></span></a>\n" +
4894 " </div>\n" +
4895 " </div>\n" +
4871 " </div>\n" +
4872 " </div>\n" +
4873 " <div class=\"form-group\">\n" +
4896 "\n" +
4874 "\n" +
4897 " <h3 class=\"word-wrap\">{{$ctrl.report.error}}</h3>\n" +
4875 " <label class=\"control-label col-sm-3 col-lg-2\"></label>\n" +
4898 "\n" +
4876 "\n" +
4899 " <div ng-if=\"$ctrl.report.traceback\">\n" +
4877 " <div class=\"col-sm-8 col-lg-9\">\n" +
4878 " <input type=\"submit\" class=\"btn btn-primary\" value=\"Use this repo\">\n" +
4879 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
4880 " <a class=\"btn btn-danger\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span> Remove Integration</a>\n" +
4881 " <ul class=\"dropdown-menu\">\n" +
4882 " <li><a>No</a></li>\n" +
4883 " <li><a ng-click=\"$ctrl.removeIntegration()\">Yes</a></li>\n" +
4884 " </ul>\n" +
4885 " </span>\n" +
4886 " </div>\n" +
4887 " </div>\n" +
4888 " </form>\n" +
4900 "\n" +
4889 "\n" +
4901 " <h3><strong>Traceback</strong></h3>\n" +
4890 " <p class=\"m-t-1\">Remember you first need to\n" +
4891 " <strong>\n" +
4892 " <a data-ui-sref=\"user.profile.identities\">authorize your user account</a></strong>\n" +
4893 " with Bitbucket before we can send issues on your behalf.</p>\n" +
4902 "\n" +
4894 "\n" +
4903 " <div class=\"btn-group\">\n" +
4895 " <p>Every user will have to authorize AppEnlight to access Bitbucket to be able to post issues.</p>\n" +
4904 " <a ng-if=\"$ctrl.traceback.length-10 > 0 \" ng-click=\"$ctrl.showLong = !$ctrl.showLong\"\n" +
4905 " class=\"btn btn-default {{$ctrl.showLong ? 'active' : ''}}\">\n" +
4906 " <span class=\"fa fa-align-left\"></span>\n" +
4907 " <small>Show {{$ctrl.traceback.length-10}} remaining frames</small>\n" +
4908 " </a>\n" +
4909 "\n" +
4896 "\n" +
4910 " <a class=\"btn btn-default {{$ctrl.showRaw ? 'active' : ''}}\" ng-click=\"$ctrl.showRaw = !$ctrl.showRaw\">\n" +
4897 " </div>\n" +
4911 " <span class=\"fa fa-list\"></span>\n" +
4898 "</div>\n"
4912 " <small>Raw version</small>\n" +
4899 );
4913 " </a>\n" +
4900
4914 " </div>\n" +
4901
4902 $templateCache.put('components/views/integrations/campfire-integration-config-view/campfire-integration-config-view.html',
4903 "<ng-include src=\"'templates/loader.html'\" ng-if=\"integrations.loading.application || $ctrl.loading.integration\"></ng-include>\n" +
4915 "\n" +
4904 "\n" +
4916 " <div ng-if=\"$ctrl.showRaw\" class=\"m-t-1\">\n" +
4905 "<div class=\"panel panel-default\" ng-show=\"!integrations.loading.application && !$ctrl.loading.integration\">\n" +
4917 " <pre>{{$ctrl.rawTraceback}}</pre>\n" +
4906 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
4918 " </div>\n" +
4907 " <div class=\"panel-body\">\n" +
4919 " <div ng-if=\"!$ctrl.showRaw\" class=\"m-t-1\">\n" +
4908 " <h1>Campfire Integration</h1>\n" +
4920 "\n" +
4909 "\n" +
4921 " <div ng-repeat=\"frame in $ctrl.traceback\" class=\"frame {{$odd ? 'odd' : 'even'}}\"\n" +
4910 " <form name=\"$ctrl.integrationForm\" ng-submit=\"$ctrl.configureIntegration()\" class=\"form-horizontal\">\n" +
4922 " ng-if=\"$index >= $ctrl.traceback.length-10 || $ctrl.traceback.length <= 10 || $ctrl.showLong\">\n" +
4923 " <div class=\"frameline\" ng-if=\"frame.line\">\n" +
4924 " <a class=\"inspect_vars\" ng-click=\"frame.showVars = !frame.showVars\" ng-if=\"frame.vars\">\n" +
4925 " <span class=\"fa fa-search dim btn btn-default\"\n" +
4926 " uib-tooltip=\"Show local vars\"> </span>\n" +
4927 " </a>\n" +
4928 "\n" +
4911 "\n" +
4929 " <span class=\"no-vars\" ng-if=\"frame.vars.length == 0\"></span>\n" +
4912 " <div class=\"form-group\">\n" +
4930 "\n" +
4913 "\n" +
4931 " <span ng-if=\"frame.file\">\n" +
4914 " <label class=\"control-label col-sm-3 col-lg-2\">Account name</label>\n" +
4932 " <span class=\"mono\">File</span> <span class=\"file mono\">{{frame.file || 'Unknown file'}}</span>,\n" +
4915 " <div class=\"col-sm-8 col-lg-9\">\n" +
4933 " </span>\n" +
4916 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.user_name\"></data-form-errors>\n" +
4934 " <span ng-if=\"frame.module && !frame.file\">\n" +
4935 " <span class=\"mono\">Module</span> <span class=\"file mono\">{{frame.module || 'Unknown module'}}</span>,\n" +
4936 " </span>\n" +
4937 " <span class=\"mono\">line</span> <span class=\"line mono\">{{frame.line || 'Unknown line'}}</span>\n" +
4938 "\n" +
4917 "\n" +
4939 " <span ng-if=\"frame.fn\"><span class=\"mono\">in</span> <strong\n" +
4918 " <div class=\"input-group\">\n" +
4940 " class=\"fn mono\">{{frame.fn || 'Unknown function'}}</strong></span>\n" +
4919 " <div class=\"input-group-addon\">http://</div>\n" +
4920 " <input class=\"form-control\" ng-model=\"$ctrl.config.account\" placeholder=\"account\">\n" +
4921 " <div class=\"input-group-addon\">.campfirenow.com</div>\n" +
4922 " </div>\n" +
4923 " </div>\n" +
4924 " </div>\n" +
4941 "\n" +
4925 "\n" +
4942 " </div>\n" +
4926 " <div class=\"form-group\">\n" +
4943 " <div class=\"cline mono\" ng-if=\"frame.cline\">{{frame.cline || 'Unknown context'}}</div>\n" +
4927 " <label class=\"control-label col-sm-3 col-lg-2\">API Token</label>\n" +
4944 "\n" +
4928 " <div class=\"col-sm-8 col-lg-9\">\n" +
4945 " <div class=\"vars\" ng-if=\"frame.showVars\">\n" +
4929 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.api_token\"></data-form-errors>\n" +
4946 " <table class=\"var-listing small\">\n" +
4930 " <input class=\"form-control\" ng-model=\"$ctrl.config.api_token\" placeholder=\"Your API token\">\n" +
4947 " <tr ng-repeat=\"fvar in frame.vars track by $index\" class=\"frame {{$odd ? 'odd' : 'even'}}\">\n" +
4931 " </div>\n" +
4948 " <td class=\"var-label\">{{ fvar[0] }}</td>\n" +
4932 " </div>\n" +
4949 " <td>\n" +
4950 " <span human-format vars=\"fvar[1]\"></span>\n" +
4951 " </td>\n" +
4952 " </tr>\n" +
4953 " </table>\n" +
4954 "\n" +
4933 "\n" +
4955 " </div>\n" +
4934 " <div class=\"form-group\">\n" +
4956 " </div>\n" +
4935 " <label class=\"control-label col-sm-3 col-lg-2\">Room ID list</label>\n" +
4957 " </div>\n" +
4936 " <div class=\"col-sm-8 col-lg-9\">\n" +
4937 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.rooms\"></data-form-errors>\n" +
4938 " <input class=\"form-control\" ng-model=\"$ctrl.config.rooms\" placeholder=\"Room ID list\">\n" +
4939 " <p>\n" +
4940 " <small>Room ID list separated by comma</small>\n" +
4941 " </p>\n" +
4942 " </div>\n" +
4943 " </div>\n" +
4944 " <div class=\"form-group\">\n" +
4945 " <input type=\"submit\" class=\"btn btn-primary\" value=\"Connect to Campfire\">\n" +
4958 "\n" +
4946 "\n" +
4947 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
4948 " <a class=\"btn btn-danger\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span> Remove Integration</a>\n" +
4949 " <ul class=\"dropdown-menu\">\n" +
4950 " <li><a>No</a></li>\n" +
4951 " <li><a ng-click=\"$ctrl.removeIntegration()\">Yes</a></li>\n" +
4952 " </ul>\n" +
4953 " </span>\n" +
4959 "\n" +
4954 "\n" +
4955 " <div class=\"btn-group\" uib-dropdown>\n" +
4956 " <button id=\"single-button\" type=\"button\" class=\"btn btn-info\" uib-dropdown-toggle>\n" +
4957 " Test integration <span class=\"caret\"></span>\n" +
4958 " </button>\n" +
4959 " <ul class=\"dropdown-menu\" role=\"menu\" aria-labelledby=\"single-button\">\n" +
4960 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('report_notification')\">Test report notification</a></li>\n" +
4961 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('error_alert')\">Test error alert</a></li>\n" +
4962 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('uptime_alert')\">Test uptime alert</a></li>\n" +
4963 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('chart_alert')\">Test chart alert</a></li>\n" +
4964 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('daily_digest')\">Test daily digest</a></li>\n" +
4965 " </ul>\n" +
4960 " </div>\n" +
4966 " </div>\n" +
4961 "\n" +
4967 "\n" +
4968 " </div>\n" +
4962 "\n" +
4969 "\n" +
4963 " <uib-tabset>\n" +
4970 " </form>\n" +
4964 " <uib-tab select=\"$ctrl.selectedTab('slow_calls')\" active=\"$ctrl.tabs.slow_calls\">\n" +
4965 " <uib-tab-heading>\n" +
4966 " Slow Calls\n" +
4967 " </uib-tab-heading>\n" +
4968 "\n" +
4971 "\n" +
4969 " <h3><strong>Slow Calls</strong></h3>\n" +
4972 " </div>\n" +
4973 "</div>\n"
4974 );
4975
4976
4977 $templateCache.put('components/views/integrations/flowdock-integration-config-view/flowdock-integration-config-view.html',
4978 "<ng-include src=\"'templates/loader.html'\" ng-if=\"integrations.loading.application || $ctrl.loading.integration\"></ng-include>\n" +
4970 "\n" +
4979 "\n" +
4971 " <div ng-if=\"$ctrl.report.slow_calls.length > 0\">\n" +
4980 "<div class=\"panel panel-default\" ng-show=\"!integrations.loading.application && !$ctrl.loading.integration\">\n" +
4972 " <div ng-repeat=\"call in $ctrl.report.slow_calls\" ng-include=\"'slow_call.html'\"></div>\n" +
4981 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
4973 " </div>\n" +
4982 " <div class=\"panel-body\">\n" +
4974 "\n" +
4983 "\n" +
4975 " <div ng-if=\"$ctrl.report.slow_calls.length == 0\">\n" +
4984 " <h1>Flowdock Integration</h1>\n" +
4976 " No slow calls reported\n" +
4977 " </div>\n" +
4978 "\n" +
4985 "\n" +
4979 " </uib-tab>\n" +
4986 " <form name=\"$ctrl.integrationForm\" ng-submit=\"$ctrl.configureIntegration()\" class=\"form-horizontal\">\n" +
4980 "\n" +
4987 "\n" +
4988 " <div class=\"form-group\">\n" +
4981 "\n" +
4989 "\n" +
4982 " <uib-tab select=\"$ctrl.selectedTab('request_details')\" active=\"$ctrl.tabs.request_details\">\n" +
4990 " <label class=\"control-label col-sm-3 col-lg-2\">API Token</label>\n" +
4983 " <uib-tab-heading>\n" +
4984 " Request details\n" +
4985 " </uib-tab-heading>\n" +
4986 "\n" +
4991 "\n" +
4987 " <h3><strong>Extra</strong></h3>\n" +
4992 " <div class=\"col-sm-8 col-lg-9\">\n" +
4988 " <div class=\"var-listing\" human-format vars=\"$ctrl.report.extra\"></div>\n" +
4993 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.api_token\"></data-form-errors>\n" +
4989 " <h3><strong>Request details</strong></h3>\n" +
4994 " <input class=\"form-control\" ng-model=\"$ctrl.config.api_token\" placeholder=\"Your API token\" type=\"text\">\n" +
4990 " <div class=\"var-listing\" human-format vars=\"$ctrl.report.request\"></div>\n" +
4995 " </div>\n" +
4991 "\n" +
4996 "\n" +
4992 " </uib-tab>\n" +
4993 "\n" +
4997 "\n" +
4994 " <uib-tab select=\"$ctrl.selectedTab('logs')\" active=\"$ctrl.tabs.logs\">\n" +
4998 " </div>\n" +
4995 " <uib-tab-heading>\n" +
4996 " Logs\n" +
4997 " </uib-tab-heading>\n" +
4998 "\n" +
4999 "\n" +
4999 " <div ng-if=\"$ctrl.is_loading.logs!=false\" class=\"text-center\">\n" +
5000 " <div class=\"form-group\">\n" +
5000 " <span class=\"fa fa-cog fa-spin fa-3x loader\"></span>\n" +
5001 " </div>\n" +
5002 " <p ng-if=\"$ctrl.reportLogs.length == 0\"> No logs found</p>\n" +
5003 "\n" +
5001 "\n" +
5004 " <table class=\"table table-striped log-list\" ng-if=\"$ctrl.reportLogs.length > 0\">\n" +
5002 " <label class=\"control-label col-sm-3 col-lg-2\"></label>\n" +
5005 "\n" +
5003 "\n" +
5006 " <caption>Logs</caption>\n" +
5004 " <div class=\"col-sm-8 col-lg-9\">\n" +
5007 " <thead>\n" +
5008 " <tr>\n" +
5009 " <th class=\"message\">Message</th>\n" +
5010 " <th class=\"when\">When</th>\n" +
5011 " </tr>\n" +
5012 " </thead>\n" +
5013 " <tbody>\n" +
5014 " <tr ng-repeat=\"log in $ctrl.reportLogs track by log.log_id\">\n" +
5015 " <td>\n" +
5016 " <a class=\"tag {{log.log_level|lowercase}}\">\n" +
5017 " <span class=\"name\">level:</span> {{log.log_level}}</a>\n" +
5018 " <a class=\"tag\">\n" +
5019 " <span class=\"name\">namespace:</span> {{log.namespace}}</a>\n" +
5020 " <a ng-repeat=\"(tag, value) in log.tags\" class=\"tag\">\n" +
5021 " <span class=\"name\">{{tag}}:</span> {{value}}</a>\n" +
5022 " <div class=\"log\">\n" +
5023 " {{log.message}}\n" +
5024 " </div>\n" +
5025 " </td>\n" +
5026 " <td class=\"when\">\n" +
5027 " <a data-uib-tooltip=\"{{log.timestamp}}\">\n" +
5028 " <iso-to-relative-time time=\"{{log.timestamp}}\"/>\n" +
5029 " </a>\n" +
5030 " </td>\n" +
5031 " </tr>\n" +
5032 "\n" +
5005 "\n" +
5033 " </tbody>\n" +
5006 " <input type=\"submit\" class=\"btn btn-primary\" value=\"Connect to Flowdock\">\n" +
5034 " </table>\n" +
5035 "\n" +
5007 "\n" +
5036 " </uib-tab>\n" +
5008 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
5009 " <a class=\"btn btn-danger\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span> Remove Integration</a>\n" +
5010 " <ul class=\"dropdown-menu\">\n" +
5011 " <li><a>No</a></li>\n" +
5012 " <li><a ng-click=\"$ctrl.removeIntegration()\">Yes</a></li>\n" +
5013 " </ul>\n" +
5014 " </span>\n" +
5015 " <div class=\"btn-group\" uib-dropdown>\n" +
5016 " <button id=\"single-button\" type=\"button\" class=\"btn btn-info\" uib-dropdown-toggle>\n" +
5017 " Test integration <span class=\"caret\"></span>\n" +
5018 " </button>\n" +
5019 " <ul class=\"dropdown-menu\" role=\"menu\" aria-labelledby=\"single-button\">\n" +
5020 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('report_notification')\">Test report notification</a></li>\n" +
5021 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('error_alert')\">Test error alert</a></li>\n" +
5022 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('uptime_alert')\">Test uptime alert</a></li>\n" +
5023 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('chart_alert')\">Test chart alert</a></li>\n" +
5024 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('daily_digest')\">Test daily digest</a></li>\n" +
5025 " </ul>\n" +
5026 " </div>\n" +
5027 " </div>\n" +
5028 " </div>\n" +
5037 "\n" +
5029 "\n" +
5038 "\n" +
5030 "\n" +
5039 " <uib-tab select=\"$ctrl.selectedTab('comments')\" active=\"$ctrl.tabs.comments\">\n" +
5031 " </form>\n" +
5040 " <uib-tab-heading>\n" +
5041 " Comments\n" +
5042 " <span class=\"label label-info\">{{$ctrl.report.comments.length}}</span>\n" +
5043 "\n" +
5032 "\n" +
5044 " </uib-tab-heading>\n" +
5033 " </div>\n" +
5034 "</div>\n"
5035 );
5036
5037
5038 $templateCache.put('components/views/integrations/github-integration-config-view/github-integration-config-view.html',
5039 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.application || $ctrl.loading.integration\"></ng-include>\n" +
5045 "\n" +
5040 "\n" +
5046 " <h3><strong>Comments</strong></h3>\n" +
5041 "<div class=\"panel panel-default\" ng-show=\"!$ctrl.loading.application && !$ctrl.loading.integration\">\n" +
5042 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
5043 " <div class=\"panel-body\">\n" +
5047 "\n" +
5044 "\n" +
5048 " <p ng-if=\"$ctrl.report.comments.length == 0\">No comments yet - be first to add one!</p>\n" +
5045 " <h1>Github Integration</h1>\n" +
5049 "\n" +
5046 "\n" +
5050 " <div class=\"comment\" ng-repeat=\"comment in $ctrl.report.comments\">\n" +
5047 " <form name=\"$ctrl.integrationForm\" ng-submit=\"$ctrl.configureIntegration()\" class=\"form-horizontal\">\n" +
5051 " <p name=\"comment-{{comment.comment_id}}\"><span class=\"fa fa-comment\"></span>\n" +
5052 " <strong>{{comment.user_name}}</strong>\n" +
5053 " <iso-to-relative-time time=\"{{comment.created_timestamp}}\"/>\n" +
5054 " </p>\n" +
5055 " <p class=\"well\">{{comment.body}}</p>\n" +
5056 " </div>\n" +
5057 "\n" +
5048 "\n" +
5058 " <form name=\"commentForm\" ng-submit=\"$ctrl.addComment()\">\n" +
5059 " <div class=\"form-group\">\n" +
5060 " <textarea type=\"text\" class=\"form-control\" id=\"$ctrl.commentForm\" ng-model=\"$ctrl.comment\" required\n" +
5061 " mentio mentio-search=\"$ctrl.searchMentionedPeople(term)\" mentio-items=\"$ctrl.mentionedPeople| filter:label:typedTerm\" class=\"form-control\"></textarea>\n" +
5062 "\n" +
5049 "\n" +
5063 " </div>\n" +
5050 " <div class=\"form-group\">\n" +
5064 " <div class=\"form-group\">\n" +
5065 " <button class=\"btn btn-info\" ng-disabled=\"$ctrl.commentForm.$invalid\">Comment</button>\n" +
5066 " </div>\n" +
5067 " </form>\n" +
5068 "\n" +
5051 "\n" +
5069 " <div ng-repeat=\"comment in $ctrl.report.comments\" class=\"{{$odd ? 'odd' : 'even'}}\" class=\"repeat-animate\">\n" +
5052 " <label class=\"control-label col-sm-3 col-lg-2\">Repository</label>\n" +
5070 " </div>\n" +
5071 "\n" +
5053 "\n" +
5072 " </uib-tab>\n" +
5054 " <div class=\"col-sm-8 col-lg-9\">\n" +
5073 "\n" +
5055 "\n" +
5074 " <uib-tab select=\"$ctrl.selectedTab('affected_users')\" active=\"$ctrl.tabs.affected_users\">\n" +
5056 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.user_name\"></data-form-errors>\n" +
5075 " <uib-tab-heading>\n" +
5057 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.repo_name\"></data-form-errors>\n" +
5076 " Affected users\n" +
5077 " <span class=\"label label-warning\">{{$ctrl.report.affected_users_count}}</span>\n" +
5078 "\n" +
5058 "\n" +
5079 " </uib-tab-heading>\n" +
5059 " <div class=\"input-group\">\n" +
5060 " <div class=\"input-group-addon\">https://api.github.com/</div>\n" +
5061 " <input class=\"form-control\" ng-model=\"$ctrl.config.user_name\" placeholder=\"user\" type=\"text\">\n" +
5062 " <div class=\"input-group-addon\">/</div>\n" +
5063 " <input class=\"form-control\" ng-model=\"$ctrl.config.repo_name\" placeholder=\"repo_name\" type=\"text\">\n" +
5064 " </div>\n" +
5080 "\n" +
5065 "\n" +
5081 " <h3><strong>50 most affected users ID's by this issue:</strong></h3>\n" +
5066 " </div>\n" +
5082 " <ul class=\"affected-user-list\">\n" +
5067 " </div>\n" +
5083 " <li ng-repeat=\"user in $ctrl.report.top_affected_users\">\n" +
5084 " <strong>{{user.username}}</strong> <span class=\"badge\" uib-tooltip=\"occurences\">{{user.count}}</span>\n" +
5085 " </li>\n" +
5086 " </ul>\n" +
5087 "\n" +
5068 "\n" +
5088 " </uib-tab>\n" +
5069 " <div class=\"form-group\">\n" +
5089 "\n" +
5070 "\n" +
5090 " </uib-tabset>\n" +
5071 " <label class=\"control-label col-sm-3 col-lg-2\"></label>\n" +
5072 "\n" +
5073 " <input type=\"submit\" class=\"btn btn-primary\" value=\"Use this repo\">\n" +
5091 "\n" +
5074 "\n" +
5075 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
5076 " <a class=\"btn btn-danger\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span> Remove Integration</a>\n" +
5077 " <ul class=\"dropdown-menu\">\n" +
5078 " <li><a>No</a></li>\n" +
5079 " <li><a ng-click=\"$ctrl.removeIntegration()\">Yes</a></li>\n" +
5080 " </ul>\n" +
5081 " </span>\n" +
5092 "\n" +
5082 "\n" +
5093 " </div>\n" +
5083 " </div>\n" +
5084 " </form>\n" +
5085 "\n" +
5086 " <p class=\"m-t-1\">Remember you first need to\n" +
5087 " <strong>\n" +
5088 " <a data-ui-sref=\"user.profile.identities\">authorize your user account</a></strong>\n" +
5089 " with Github before we can send issues on your behalf.</p>\n" +
5090 "\n" +
5091 " <p>Every user will have to authorize AppEnlight to access Github to be able to post issues.</p>\n" +
5094 "\n" +
5092 "\n" +
5093 " <div class=\"panel panel-warning\">\n" +
5094 " <div class=\"panel-heading\">Private repository access</div>\n" +
5095 " <div class=\"panel-body\">\n" +
5096 " <p>If you need access to private repositories <a data-ui-sref=\"user.profile.identities\">profile page</a> allows you to require token including private repository permissions.</p>\n" +
5097 "\n" +
5098 " <p>Registration page OAuth does NOT give you token with private repository access permissions.</p>\n" +
5099 " </div>\n" +
5095 " </div>\n" +
5100 " </div>\n" +
5101 "\n" +
5096 " </div>\n" +
5102 " </div>\n" +
5097 "</div>\n"
5103 "</div>\n"
5098 );
5104 );
5099
5105
5100
5106
5101 $templateCache.put('components/views/reports-browser-view/reports-browser-view.html',
5107 $templateCache.put('components/views/integrations/hipchat-integration-config-view/hipchat-integration-config-view.html',
5102 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.is_loading\"></ng-include>\n" +
5108 "<ng-include src=\"'templates/loader.html'\" ng-if=\"integrations.loading.application || $ctrl.loading.integration\"></ng-include>\n" +
5103 "\n" +
5109 "\n" +
5104 "<div ng-if=\"$ctrl.is_loading === false\">\n" +
5110 "<div class=\"panel panel-default\" ng-show=\"!integrations.loading.application && !$ctrl.loading.integration\">\n" +
5111 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
5112 " <div class=\"panel-body\">\n" +
5105 "\n" +
5113 "\n" +
5106 " <p class=\"search-params\">\n" +
5114 " <h1>Hipchat Integration</h1>\n" +
5107 " <strong>Search params:</strong>\n" +
5108 " <span ng-repeat=\"tag in $ctrl.searchParams.tags\" class=\"tag\">\n" +
5109 " <strong>{{tag.type}}</strong>\n" +
5110 " {{ tag.type == 'resource' ? $ctrl.applications[tag.value].resource_name : tag.value }}\n" +
5111 "\n" +
5115 "\n" +
5112 " <a ng-click=\"$ctrl.removeSearchTag(tag)\"><span class=\"fa fa-times\"></span></a>\n" +
5116 " <form name=\"$ctrl.integrationForm\" ng-submit=\"$ctrl.configureIntegration()\" class=\"form-horizontal\">\n" +
5113 " </span>\n" +
5114 " </p>\n" +
5115 "\n" +
5117 "\n" +
5116 " <form class=\"form\">\n" +
5118 " <div class=\"form-group\">\n" +
5117 " <div class=\"typeahead-tags\">\n" +
5119 " <label class=\"control-label col-sm-3 col-lg-2\">API Token</label>\n" +
5118 " <input type=\"text\" id=\"typeAhead\" ng-model=\"$ctrl.filterTypeAhead\" placeholder=\"Start typing to filter reports - filter by tags, exception, priority or other properties.\"\n" +
5119 " ng-keydown=\"$ctrl.typeAheadTag($event)\"\n" +
5120 " uib-typeahead=\"tag as tag.text for tag in $ctrl.filterTypeAheadOptions | filter:$viewValue:aheadFilter\"\n" +
5121 " typeahead-min-length=\"1\" class=\"form-control\"\n" +
5122 " typeahead-template-url=\"templates/directives/search_type_ahead.html\">\n" +
5123 " </div>\n" +
5124 " </form>\n" +
5125 "\n" +
5120 "\n" +
5121 " <div class=\"col-sm-8 col-lg-9\">\n" +
5122 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.api_token\"></data-form-errors>\n" +
5123 " <input class=\"form-control\" ng-model=\"$ctrl.config.api_token\" placeholder=\"Your API token\" type=\"text\">\n" +
5124 " </div>\n" +
5125 " </div>\n" +
5126 "\n" +
5126 "\n" +
5127 " <div class=\"well position-absolute increse-zindex\" ng-show=\"$ctrl.showDatePicker\" ng-model=\"$ctrl.pickerDate\" ng-change=\"$ctrl.pickerDateChanged()\"\n" +
5127 " <div class=\"form-group\">\n" +
5128 " class=\"animate-show\">\n" +
5129 " <uib-datepicker></uib-datepicker>\n" +
5130 " </div>\n" +
5131 "\n" +
5128 "\n" +
5132 " </p>\n" +
5129 " <label class=\"control-label col-sm-3 col-lg-2\">Room ID list</label>\n" +
5133 "\n" +
5130 "\n" +
5131 " <div class=\"col-sm-8 col-lg-9\">\n" +
5132 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.rooms\"></data-form-errors>\n" +
5133 " <input class=\"form-control\" ng-model=\"$ctrl.config.rooms\" placeholder=\"Room ID list\" type=\"text\">\n" +
5134 "\n" +
5134 "\n" +
5135 " <div class=\"text-center\">\n" +
5135 " <p>\n" +
5136 " <uib-pagination total-items=\"$ctrl.itemCount\" items-per-page=\"$ctrl.itemsPerPage\" ng-model=\"$ctrl.page\" max-size=\"10\"\n" +
5136 " <small>Room ID list separated by comma</small>\n" +
5137 " class=\"pagination pagination-sm\" boundary-links=\"true\" direction-links=\"false\"\n" +
5137 " </p>\n" +
5138 " ng-change=\"$ctrl.paginationChange()\"\n" +
5138 " </div>\n" +
5139 " ng-show=\"!$ctrl.is_loading\"></uib-pagination>\n" +
5140 " </div>\n" +
5141 "\n" +
5139 "\n" +
5142 " <div class=\"panel panel-default\">\n" +
5140 " </div>\n" +
5143 " <!-- Default panel contents -->\n" +
5144 "\n" +
5141 "\n" +
5145 " <table class=\"table table-striped report-list\" ng-show=\"!$ctrl.is_loading\">\n" +
5142 " <div class=\"form-group\">\n" +
5146 " <caption>Reports</caption>\n" +
5143 " <label class=\"control-label col-sm-3 col-lg-2\"></label>\n" +
5147 " <thead>\n" +
5144 " <div class=\"col-sm-8 col-lg-9\">\n" +
5148 " <tr>\n" +
5145 " <input type=\"submit\" class=\"btn btn-primary\" value=\"Connect to Hipchat\">\n" +
5149 " <th class=\"c1 ordering occurences\">#</th>\n" +
5146 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
5150 " <th class=\"c2 application\">Application</th>\n" +
5147 " <a class=\"btn btn-danger\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span> Remove Integration</a>\n" +
5151 " <th class=\"c4 when\">When <input type=\"checkbox\" ng-model=\"$ctrl.notRelativeTime\"\n" +
5148 " <ul class=\"dropdown-menu\">\n" +
5152 " ng-change=\"$ctrl.changeRelativeTime()\"\n" +
5149 " <li><a>No</a></li>\n" +
5153 " title=\"Tick to see UTC time instead relative\"></th>\n" +
5150 " <li><a ng-click=\"$ctrl.removeIntegration()\">Yes</a></li>\n" +
5154 " <th class=\"c5 error_type\">Error</th>\n" +
5151 " </ul>\n" +
5155 " </tr>\n" +
5152 " </span>\n" +
5156 " </thead>\n" +
5157 " <tbody>\n" +
5158 " <tr ng-repeat=\"report in $ctrl.reportsPage track by report.id\">\n" +
5159 " <td class=\"c1 occurences\">\n" +
5160 " <span class=\"priority-{{report.group.priority}}\" data-uib-tooltip=\"Report priority\">{{report.group.priority}}</span>\n" +
5161 " <span class=\"count {{report.presentation.className}}\" data-uib-tooltip=\"{{report.presentation.tooltip}}\">\n" +
5162 " {{report.group.occurences|numberToThousands}}\n" +
5163 " </span>\n" +
5164 " </td>\n" +
5165 " <td class=\"c2 application\">\n" +
5166 " <div class=\"app_name\">{{report.resource_name}}</div>\n" +
5167 " <span class=\"server\">@{{report.tags.server_name}}</span></td>\n" +
5168 " <td class=\"c3 when\">\n" +
5169 " <span ng-show=\"!$ctrl.notRelativeTime\"><span data-uib-tooltip=\"{{report.group.last_timestamp}}\"><iso-to-relative-time\n" +
5170 " time=\"{{report.group.last_timestamp}}\"/></span>\n" +
5171 " </span>\n" +
5172 " <span ng-show=\"$ctrl.notRelativeTime\">{{report.group.last_timestamp.replace('T', ' ').slice(0,16)}}</span>\n" +
5173 " </td>\n" +
5174 " <td class=\"c4 report ellipsis\"><a ui-sref=\"report.view_detail({groupId:report.group.id, reportId:report.id})\" title=\"{{report.error}}\">{{report.error || 'Unknown Exception'}}</a> <br/>\n" +
5175 " <span class=\"url\">{{ report.tags.view_name || report.url_path}}</td>\n" +
5176 " </tr>\n" +
5177 "\n" +
5153 "\n" +
5178 " </tbody>\n" +
5154 " <div class=\"btn-group\" uib-dropdown>\n" +
5179 " </table>\n" +
5155 " <button id=\"single-button\" type=\"button\" class=\"btn btn-info\" uib-dropdown-toggle>\n" +
5180 " </div>\n" +
5156 " Test integration <span class=\"caret\"></span>\n" +
5157 " </button>\n" +
5158 " <ul class=\"dropdown-menu\" role=\"menu\" aria-labelledby=\"single-button\">\n" +
5159 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('report_notification')\">Test report notification</a></li>\n" +
5160 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('error_alert')\">Test error alert</a></li>\n" +
5161 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('uptime_alert')\">Test uptime alert</a></li>\n" +
5162 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('chart_alert')\">Test chart alert</a></li>\n" +
5163 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('daily_digest')\">Test daily digest</a></li>\n" +
5164 " </ul>\n" +
5165 " </div>\n" +
5181 "\n" +
5166 "\n" +
5167 " </div>\n" +
5168 " </div>\n" +
5182 "\n" +
5169 "\n" +
5183 " <div class=\"text-center\">\n" +
5170 " </form>\n" +
5184 " <uib-pagination total-items=\"$ctrl.itemCount\" items-per-page=\"$ctrl.itemsPerPage\" ng-model=\"$ctrl.page\" max-size=\"10\"\n" +
5185 " class=\"pagination pagination-sm\" boundary-links=\"true\" direction-links=\"false\"\n" +
5186 " ng-change=\"$ctrl.paginationChange()\"\n" +
5187 " ng-show=\"!$ctrl.is_loading\"></uib-pagination>\n" +
5188 " </div>\n" +
5189 "\n" +
5171 "\n" +
5172 " </div>\n" +
5190 "</div>\n"
5173 "</div>\n"
5191 );
5174 );
5192
5175
5193
5176
5194 $templateCache.put('components/views/reports-slow-browser-view/reports-slow-browser-view.html',
5177 $templateCache.put('components/views/integrations/jira-integration-config-view/jira-integration-config-view.html',
5195 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.is_loading\"></ng-include>\n" +
5178 "<ng-include src=\"'templates/loader.html'\" ng-if=\"integrations.loading.application || $ctrl.loading.integration\"></ng-include>\n" +
5196 "\n" +
5179 "\n" +
5197 "<div ng-if=\"$ctrl.is_loading === false\">\n" +
5180 "<div class=\"panel panel-default\" ng-show=\"!integrations.loading.application && !$ctrl.loading.integration\">\n" +
5181 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
5182 " <div class=\"panel-body\">\n" +
5198 "\n" +
5183 "\n" +
5199 " <p class=\"search-params\">\n" +
5184 " <h1>Jira Integration</h1>\n" +
5200 " <strong>Search params:</strong>\n" +
5201 " <span ng-repeat=\"tag in $ctrl.searchParams.tags\" class=\"tag\">\n" +
5202 " <strong>{{tag.type}}</strong>\n" +
5203 " {{ tag.type == 'resource' ? $ctrl.applications[tag.value].resource_name : tag.value }}\n" +
5204 "\n" +
5185 "\n" +
5205 " <a ng-click=\"$ctrl.removeSearchTag(tag)\"><span class=\"fa fa-times\"></span></a>\n" +
5186 " <form name=\"$ctrl.integrationForm\" ng-submit=\"$ctrl.configureIntegration()\" class=\"form-horizontal\">\n" +
5206 " </span>\n" +
5207 " </p>\n" +
5208 "\n" +
5187 "\n" +
5209 " <p>\n" +
5188 " <div class=\"form-group\" id=\"row-host_name\">\n" +
5210 "\n" +
5189 "\n" +
5211 " <form class=\"form\">\n" +
5190 " <label class=\"control-label col-sm-3 col-lg-2\">\n" +
5212 " <div class=\"typeahead-tags\">\n" +
5191 " Server URL <span class=\"required\">*</span>\n" +
5213 " <input type=\"text\" id=\"typeAhead\" ng-model=\"$ctrl.filterTypeAhead\" placeholder=\"Start typing to filter slowness reports - filter by tags, average response time, priority or other properties.\"\n" +
5192 " </label>\n" +
5214 " ng-keydown=\"$ctrl.typeAheadTag($event)\"\n" +
5193 " <div class=\"col-sm-8 col-lg-9\">\n" +
5215 " uib-typeahead=\"tag as tag.text for tag in $ctrl.filterTypeAheadOptions | filter:$viewValue:aheadFilter\"\n" +
5194 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.host_name\"></data-form-errors>\n" +
5216 " typeahead-min-length=\"1\" class=\"form-control\"\n" +
5195 " <input class=\"form-control\" id=\"host_name\" name=\"host_name\" type=\"text\" ng-model=\"$ctrl.config.host_name\">\n" +
5217 " typeahead-template-url=\"templates/directives/search_type_ahead.html\">\n" +
5218 " </div>\n" +
5219 " </form>\n" +
5220 "\n" +
5196 "\n" +
5197 " <p>\n" +
5198 " <small>https://servername.atlassian.net</small>\n" +
5199 " </p>\n" +
5221 "\n" +
5200 "\n" +
5222 " <div class=\"well position-absolute increse-zindex\" ng-show=\"$ctrl.showDatePicker\" ng-model=\"$ctrl.pickerDate\" ng-change=\"$ctrl.pickerDateChanged()\"\n" +
5201 " </div>\n" +
5223 " class=\"animate-show\">\n" +
5202 " </div>\n" +
5224 " <uib-datepicker></uib-datepicker>\n" +
5203 " <div class=\"form-group\" id=\"row-user_name\">\n" +
5225 " </div>\n" +
5226 "\n" +
5204 "\n" +
5227 " </p>\n" +
5205 " <label class=\"control-label col-sm-3 col-lg-2\">\n" +
5206 " Username <span class=\"required\">*</span>\n" +
5207 " </label>\n" +
5208 " <div class=\"col-sm-8 col-lg-9\">\n" +
5228 "\n" +
5209 "\n" +
5210 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.user_name\"></data-form-errors>\n" +
5211 " <input class=\"form-control\" id=\"user_name\" name=\"user_name\" type=\"text\" ng-model=\"$ctrl.config.user_name\">\n" +
5229 "\n" +
5212 "\n" +
5230 " <div class=\"text-center\">\n" +
5213 " <p>\n" +
5231 " <uib-pagination total-items=\"$ctrl.itemCount\" items-per-page=\"$ctrl.itemsPerPage\" ng-model=\"$ctrl.page\" max-size=\"10\"\n" +
5214 " <small>user@email.com</small>\n" +
5232 " class=\"pagination pagination-sm\" boundary-links=\"true\" direction-links=\"false\"\n" +
5215 " </p>\n" +
5233 " ng-change=\"$ctrl.paginationChange()\"\n" +
5234 " ng-show=\"!$ctrl.is_loading\"></uib-pagination>\n" +
5235 " </div>\n" +
5236 "\n" +
5216 "\n" +
5217 " </div>\n" +
5218 " </div>\n" +
5219 " <div class=\"form-group\" id=\"row-password\">\n" +
5237 "\n" +
5220 "\n" +
5238 " <div class=\"panel panel-default\">\n" +
5221 " <label class=\"control-label col-sm-3 col-lg-2\">\n" +
5239 " <!-- Default panel contents -->\n" +
5222 " Password <span class=\"required\">*</span>\n" +
5223 " </label>\n" +
5224 " <div class=\"col-sm-8 col-lg-9\">\n" +
5225 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.password\"></data-form-errors>\n" +
5226 " <input class=\"form-control\" id=\"password\" name=\"password\" type=\"password\" ng-model=\"$ctrl.config.password\">\n" +
5227 " </div>\n" +
5228 " </div>\n" +
5229 " <div class=\"form-group\" id=\"row-project\">\n" +
5240 "\n" +
5230 "\n" +
5241 " <table class=\"table table-striped report-list\" ng-show=\"!$ctrl.is_loading\">\n" +
5231 " <label class=\"control-label col-sm-3 col-lg-2\">\n" +
5242 " <caption>Slow Request Reports</caption>\n" +
5232 " Project key <span class=\"required\">*</span>\n" +
5243 " <thead>\n" +
5233 " </label>\n" +
5244 " <tr>\n" +
5234 " <div class=\"col-sm-8 col-lg-9\">\n" +
5245 " <td class=\"c1 ordering occurences\">#</td>\n" +
5235 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.project\"></data-form-errors>\n" +
5246 " <td class=\"c2 average_duration\">Avg. duration</td>\n" +
5236 " <input class=\"form-control\" id=\"project\" name=\"project\" type=\"text\" ng-model=\"$ctrl.config.project\">\n" +
5247 " <td class=\"c3 application\">Application</td>\n" +
5237 " </div>\n" +
5248 " <td class=\"c5 when\">When <input type=\"checkbox\" ng-model=\"$ctrl.notRelativeTime\"\n" +
5238 " </div>\n" +
5249 " ng-change=\"$ctrl.changeRelativeTime()\"\n" +
5239 " <div class=\"form-group\" id=\"row-submit\">\n" +
5250 " title=\"Tick to see UTC time instead relative\"></td>\n" +
5240 " <label class=\"control-label col-sm-3 col-lg-2\"></label>\n" +
5251 " <td class=\"c6 error_type\">Location</td>\n" +
5241 " <div class=\"col-sm-8 col-lg-9\">\n" +
5252 " </tr>\n" +
5242 " <input class=\"form-control btn btn-primary\" id=\"submit\" name=\"submit\" type=\"submit\" value=\"Setup Jira\">\n" +
5253 " </thead>\n" +
5254 " <tbody>\n" +
5255 " <tr ng-repeat=\"report in $ctrl.reportsPage track by report.id\">\n" +
5256 " <td class=\"c1 occurences\">\n" +
5257 " <span class=\"priority-{{report.group.priority}}\" data-uib-tooltip=\"Report priority\">{{report.group.priority}}</span>\n" +
5258 " <span class=\"count {{report.presentation.className}}\" data-uib-tooltip=\"{{report.presentation.tooltip}}\">\n" +
5259 " {{report.group.occurences|numberToThousands}}\n" +
5260 " </span>\n" +
5261 " </td>\n" +
5262 " <td class=\"c2 average_duration\">{{report.group.average_duration.toFixed(3)}}s</td>\n" +
5263 " <td class=\"c3 application\">\n" +
5264 " <div class=\"app_name\">{{report.resource_name}}</div>\n" +
5265 " <span class=\"server\">@{{report.tags.server_name}}</span></td>\n" +
5266 " <td class=\"c4 when\">\n" +
5267 " <span ng-show=\"!$ctrl.notRelativeTime\"><span data-uib-tooltip=\"{{report.group.last_timestamp}}\"><iso-to-relative-time\n" +
5268 " time=\"{{report.group.last_timestamp}}\"/></span>\n" +
5269 " </span>\n" +
5270 " <span ng-show=\"$ctrl.notRelativeTime\">{{report.group.last_timestamp.replace('T', ' ').slice(0,16)}}</span>\n" +
5271 " </td>\n" +
5272 " <td class=\"c5 report ellipsis\">\n" +
5273 " <a ui-sref=\"report.view_detail({groupId:report.group.id, reportId:report.id})\">{{ report.tags.view_name || report.url_path}} </span></a></td>\n" +
5274 " </td>\n" +
5275 " </tr>\n" +
5276 "\n" +
5243 "\n" +
5277 " </tbody>\n" +
5244 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
5278 " </table>\n" +
5245 " <a class=\"btn btn-danger\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span> Remove Integration</a>\n" +
5246 " <ul class=\"dropdown-menu\">\n" +
5247 " <li><a>No</a></li>\n" +
5248 " <li><a ng-click=\"$ctrl.removeIntegration()\">Yes</a></li>\n" +
5249 " </ul>\n" +
5250 " </span>\n" +
5251 " </div>\n" +
5252 " </div>\n" +
5279 "\n" +
5253 "\n" +
5280 " </div>\n" +
5254 " </form>\n" +
5281 "\n" +
5255 "\n" +
5282 " <div class=\"text-center\">\n" +
5283 " <uib-pagination total-items=\"$ctrl.itemCount\" items-per-page=\"$ctrl.itemsPerPage\" ng-model=\"$ctrl.page\" max-size=\"10\"\n" +
5284 " class=\"pagination pagination-sm\" boundary-links=\"true\" direction-links=\"false\"\n" +
5285 " ng-change=\"$ctrl.paginationChange()\"\n" +
5286 " ng-show=\"!$ctrl.is_loading\"></uib-pagination>\n" +
5287 " </div>\n" +
5288 "\n" +
5256 "\n" +
5257 " </div>\n" +
5289 "</div>\n"
5258 "</div>\n"
5290 );
5259 );
5291
5260
5292
5261
5293 $templateCache.put('components/views/settings-view/settings-view.html',
5262 $templateCache.put('components/views/integrations/slack-integration-config-view/slack-integration-config-view.html',
5294 "<div class=\"row\">\n" +
5263 "<ng-include src=\"'templates/loader.html'\" ng-if=\"integrations.loading.application || $ctrl.loading.integration\"></ng-include>\n" +
5295 " <div class=\"col-sm-3\" id=\"menu\">\n" +
5296 " <div class=\"panel panel-default\">\n" +
5297 " <div class=\"panel-heading\">Applications</div>\n" +
5298 " <ul class=\"list-group\">\n" +
5299 " <li class=\"list-group-item\" ui-sref-active-eq=\"active\"><a data-ui-sref=\"applications.list\"><span class=\"fa fa-cog\"></span> List applications</a></li>\n" +
5300 " <li class=\"list-group-item\" ui-sref-active-eq=\"active\"><a data-ui-sref=\"applications.update({resourceId:'new'})\"><span class=\"fa fa-plus-circle\"></span> Create application</a></li>\n" +
5301 " <li class=\"list-group-item\" ui-sref-active-eq=\"active\"><a data-ui-sref=\"applications.purge_logs\"><span class=\"fa fa-trash-o\"></span> Purge logs</a></li>\n" +
5302 " </ul>\n" +
5303 " </div>\n" +
5304 "\n" +
5305 "\n" +
5264 "\n" +
5306 " <div class=\"panel panel-default\">\n" +
5265 "<div class=\"panel panel-default\" ng-show=\"!integrations.loading.application && !$ctrl.loading.integration\">\n" +
5307 " <div class=\"panel-heading\">Settings</div>\n" +
5266 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
5308 " <ul class=\"list-group\">\n" +
5267 " <div class=\"panel-body\">\n" +
5309 " <li class=\"list-group-item\" ui-sref-active-eq=\"active\"><a data-ui-sref=\"user.profile.edit\"><span class=\"fa fa-user\"></span> Profile details</a></li>\n" +
5310 " <li class=\"list-group-item\" ui-sref-active-eq=\"active\"><a data-ui-sref=\"user.profile.password\"><span class=\"fa fa-lock\"></span> Change Password</a></li>\n" +
5311 " <li class=\"list-group-item\" ui-sref-active-eq=\"active\"><a data-ui-sref=\"user.profile.identities\"><span class=\"fa fa-link\"></span> External Identities</a></li>\n" +
5312 " <li class=\"list-group-item\" ui-sref-active-eq=\"active\"><a data-ui-sref=\"user.profile.auth_tokens\"><span class=\"fa fa-unlock\"></span> Auth Tokens</a></li>\n" +
5313 " </ul>\n" +
5314 " </div>\n" +
5315 "\n" +
5268 "\n" +
5316 " <div class=\"panel panel-default\">\n" +
5269 " <h1>Slack Integration</h1>\n" +
5317 " <div class=\"panel-heading\">Notifications</div>\n" +
5318 " <ul class=\"list-group\">\n" +
5319 " <li class=\"list-group-item\" ui-sref-active-eq=\"active\"><a data-ui-sref=\"user.alert_channels.list\"><span class=\"fa fa-bullhorn\"></span> Alert channels</a></li>\n" +
5320 " <li class=\"list-group-item\" ui-sref-active-eq=\"active\"><a data-ui-sref=\"user.alert_channels.email\"><span class=\"fa fa-envelope\"></span> Add email channel</a></li>\n" +
5321 " </ul>\n" +
5322 " </div>\n" +
5323 " </div>\n" +
5324 "\n" +
5270 "\n" +
5325 " <div class=\"col-sm-9\" ui-view></div>\n" +
5271 " <form name=\"$ctrl.integrationForm\" ng-submit=\"$ctrl.configureIntegration()\" class=\"form-horizontal\">\n" +
5326 "</div>\n"
5327 );
5328
5329
5330 $templateCache.put('components/views/user-alert-channel-email-new-view/user-alert-channel-email-new-view.html',
5331 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.email\"></ng-include>\n" +
5332 "\n" +
5272 "\n" +
5333 "<div ng-show=\"!$ctrl.loading.email\">\n" +
5273 " <div class=\"form-group\">\n" +
5334 "\n" +
5274 "\n" +
5335 " <div class=\"panel panel-default\">\n" +
5275 " <label class=\"control-label col-sm-3 col-lg-2\">\n" +
5336 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
5276 " API Token <span class=\"required\">*</span>\n" +
5337 " <div class=\"panel-body\">\n" +
5277 " </label>\n" +
5338 " <p>Adding email alert channel - after you authorize your email in the system we can send alerts directly to this mailbox.</p>\n" +
5278 " <div class=\"col-sm-8 col-lg-9\">\n" +
5339 " <form class=\"form-horizontal\" name=\"$ctrl.channelForm\" ng-submit=\"$ctrl.createChannel()\">\n" +
5279 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.webhook_url\"></data-form-errors>\n" +
5340 " <div class=\"form-group\" id=\"row-email\">\n" +
5280 " <input class=\"form-control\" ng-model=\"$ctrl.config.webhook_url\" placeholder=\"Webhook URL\" type=\"webhook_url\">\n" +
5341 " <data-form-errors errors=\"$ctrl.channelForm.ae_validation.email\"></data-form-errors>\n" +
5342 " <label id=\"label-email\" class=\"control-label col-sm-4 col-lg-3\">\n" +
5343 " Email Address\n" +
5344 " <span class=\"required\">*</span>\n" +
5345 " </label>\n" +
5346 " <div class=\"col-sm-8 col-lg-9\">\n" +
5347 " <input class=\"form-control\" type=\"text\" ng-model=\"$ctrl.form.email\">\n" +
5348 " </div>\n" +
5349 " </div>\n" +
5281 " </div>\n" +
5350 " <div class=\"form-group\">\n" +
5282 " </div>\n" +
5351 " <label for=\"submit\" class=\"control-label col-sm-4 col-lg-3\">\n" +
5283 "\n" +
5352 " </label>\n" +
5284 " <div class=\"form-group\">\n" +
5353 " <div class=\"col-sm-8 col-lg-9\">\n" +
5285 "\n" +
5354 " <input class=\"form-control btn btn-primary\" name=\"submit\" type=\"submit\" value=\"Add email channel\">\n" +
5286 " <label class=\"control-label col-sm-3 col-lg-2\"></label>\n" +
5287 " <div class=\"col-sm-8 col-lg-9\">\n" +
5288 " <input type=\"submit\" class=\"btn btn-primary\"\n" +
5289 " value=\"Connect to Slack\">\n" +
5290 "\n" +
5291 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
5292 " <a class=\"btn btn-danger\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span> Remove Integration</a>\n" +
5293 " <ul class=\"dropdown-menu\">\n" +
5294 " <li><a>No</a></li>\n" +
5295 " <li><a ng-click=\"$ctrl.removeIntegration()\">Yes</a></li>\n" +
5296 " </ul>\n" +
5297 " </span>\n" +
5298 "\n" +
5299 " <div class=\"btn-group\" uib-dropdown>\n" +
5300 " <button type=\"button\" class=\"btn btn-info\" uib-dropdown-toggle>\n" +
5301 " Test integration <span class=\"caret\"></span>\n" +
5302 " </button>\n" +
5303 " <ul class=\"dropdown-menu\" role=\"menu\" aria-labelledby=\"single-button\">\n" +
5304 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('report_notification')\">Test report notification</a></li>\n" +
5305 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('error_alert')\">Test error alert</a></li>\n" +
5306 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('uptime_alert')\">Test uptime alert</a></li>\n" +
5307 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('chart_alert')\">Test chart alert</a></li>\n" +
5308 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('daily_digest')\">Test daily digest</a></li>\n" +
5309 " </ul>\n" +
5355 " </div>\n" +
5310 " </div>\n" +
5356 " </div>\n" +
5311 " </div>\n" +
5357 " </form>\n" +
5312 " </div>\n" +
5358 " </div>\n" +
5313 " </form>\n" +
5314 "\n" +
5359 " </div>\n" +
5315 " </div>\n" +
5360 "</div>\n"
5316 "</div>\n"
5361 );
5317 );
5362
5318
5363
5319
5364 $templateCache.put('components/views/user-alert-channels-list-view/user-alert-channels-list-view.html',
5320 $templateCache.put('components/views/integrations/webhooks-integration-config-view/webhooks-integration-config-view.html',
5365 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.channels || $ctrl.loading.applications\"></ng-include>\n" +
5321 "<ng-include src=\"'templates/loader.html'\" ng-if=\"integrations.loading.application || $ctrl.loading.integration\"></ng-include>\n" +
5366 "\n" +
5367 "<div ng-if=\"!$ctrl.loading.channels && !$ctrl.loading.applications && !$ctrl.loading.actions\">\n" +
5368 "\n" +
5369 " <div class=\"panel panel-default\">\n" +
5370 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
5371 " <div class=\"panel-body\">\n" +
5372 " <h1>Report alert rules</h1>\n" +
5373 " <p>\n" +
5374 " <a class=\"btn btn-info\" ng-click=\"$ctrl.addAction()\"><span class=\"fa fa-plus-circle\"></span> Add top-level rule</a>\n" +
5375 " </p>\n" +
5376 "\n" +
5322 "\n" +
5377 " <report-alert-action action=\"action\" rule-definitions=\"$ctrl.ruleDefinitions\"\n" +
5323 "<div class=\"panel panel-default\" ng-show=\"!integrations.loading.application && !$ctrl.loading.integration\">\n" +
5378 " possible-channels=\"$ctrl.alertChannels\"\n" +
5324 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
5379 " actions=\"$ctrl.alertActions\" applications=\"$ctrl.applications\"\n" +
5325 " <div class=\"panel-body\">\n" +
5380 " ng-repeat=\"action in $ctrl.alertActions | filter: {type:'report'}\"></report-alert-action>\n" +
5381 "\n" +
5326 "\n" +
5382 " </div>\n" +
5327 " <h1>Webhooks Integration</h1>\n" +
5383 " </div>\n" +
5384 "\n" +
5328 "\n" +
5385 " <div class=\"panel panel-default\">\n" +
5329 " <form name=\"$ctrl.integrationForm\" ng-submit=\"$ctrl.configureIntegration()\" class=\"form-horizontal\">\n" +
5386 " <div class=\"panel-body\">\n" +
5330 " <div class=\"form-group\" id=\"row-reports_webhook\">\n" +
5387 " <h1>Alert channels</h1>\n" +
5388 "\n" +
5331 "\n" +
5389 " <p>Here you can configure your <em>alert channels</em>.</p>\n" +
5332 " <label class=\"control-label col-sm-3 col-lg-2\">\n" +
5333 " Reports webhook <span class=\"required\">*</span>\n" +
5334 " </label>\n" +
5335 " <div class=\"col-sm-8 col-lg-9\">\n" +
5336 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.reports_webhook\"></data-form-errors>\n" +
5337 " <input class=\"form-control\" id=\"reports_webhook\" name=\"reports_webhook\" type=\"text\" ng-model=\"$ctrl.config.reports_webhook\">\n" +
5338 " </div>\n" +
5339 " </div>\n" +
5340 " <div class=\"form-group\" id=\"row-alerts_webhook\">\n" +
5390 "\n" +
5341 "\n" +
5391 " <p>An alert channel serves as means of delivery of notifications about important events that happen in your applications.</p>\n" +
5342 " <label class=\"control-label col-sm-3 col-lg-2\">\n" +
5343 " Alerts webhook <span class=\"required\">*</span>\n" +
5344 " </label>\n" +
5345 " <div class=\"col-sm-8 col-lg-9\">\n" +
5346 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.alerts_webhook\"></data-form-errors>\n" +
5347 " <input class=\"form-control StringField None\" id=\"alerts_webhook\" name=\"alerts_webhook\" type=\"text\" ng-model=\"$ctrl.config.alerts_webhook\">\n" +
5348 " </div>\n" +
5392 "\n" +
5349 "\n" +
5393 " <div class=\"alert alert-success\">You can add more integrations that support different alert channels via application management panel.</div>\n" +
5394 "\n" +
5350 "\n" +
5395 " <table class=\"table table-striped\">\n" +
5351 " </div>\n" +
5396 " <tr ng-repeat=\"channel in $ctrl.alertChannels\" class=\"animate-repeat\">\n" +
5352 " <div class=\"form-group\" id=\"row-submit\">\n" +
5397 " <td><strong>{{ channel.channel_visible_value }}</strong></td>\n" +
5398 " <td class=\"text-right\">\n" +
5399 " <span class=\"btn btn-default\" data-uib-tooltip=\"Channel is {{ channel.channel_validated? '' :'NOT' }} validated\" tooltip-append-to-body=\"true\"\n" +
5400 " ng-class=\"{dim:!channel.channel_validated}\">\n" +
5401 " <span class=\"fa\" ng-class=\"{'fa-check-circle':channel.channel_validated, 'fa-times-circle':!channel.channel_validated}\"></span>\n" +
5402 " </span>\n" +
5403 " <a class=\"btn btn-default\" data-uib-tooltip=\"Press to turn {{ channel.send_alerts ? 'OFF' : 'ON' }} alerting on this chanel\"\n" +
5404 " ng-click=\"$ctrl.updateChannel(channel,'send_alerts')\" ng-class=\"{dim:!channel.send_alerts}\" tooltip-append-to-body=\"true\">\n" +
5405 " <span class=\"fa fa-rss\"></span> Alerts\n" +
5406 " </a>\n" +
5407 " <a class=\"btn btn-default\" data-uib-tooltip=\"Press to turn {{ channel.daily_digest ? 'OFF' : 'ON' }} daily digests on this channel\"\n" +
5408 " ng-click=\"$ctrl.updateChannel(channel,'daily_digest')\" ng-class=\"{dim:!channel.daily_digest}\" tooltip-append-to-body=\"true\">\n" +
5409 " <span class=\"fa fa-envelope\"></span> Daily digests\n" +
5410 " </a>\n" +
5411 "\n" +
5353 "\n" +
5354 " <label class=\"control-label col-sm-3 col-lg-2\"></label>\n" +
5355 " <div class=\"col-sm-8 col-lg-9\">\n" +
5356 " <input class=\"form-control btn btn-primary\" id=\"submit\" name=\"submit\" type=\"submit\" value=\"Setup webhooks\">\n" +
5412 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
5357 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
5413 " <a class=\"btn btn-default\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span> Remove</a>\n" +
5358 " <a class=\"btn btn-danger\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span> Remove Integration</a>\n" +
5414 " <ul class=\"dropdown-menu\">\n" +
5359 " <ul class=\"dropdown-menu\">\n" +
5415 " <li><a>No</a></li>\n" +
5360 " <li><a>No</a></li>\n" +
5416 " <li><a ng-click=\"$ctrl.removeChannel(channel)\">Yes</a></li>\n" +
5361 " <li><a ng-click=\"$ctrl.removeIntegration()\">Yes</a></li>\n" +
5417 " </ul>\n" +
5362 " </ul>\n" +
5418 " </span>\n" +
5363 " </span>\n" +
5419 "\n" +
5364 " </div>\n" +
5420 " </td>\n" +
5365 " </div>\n" +
5421 " </tr>\n" +
5366 " </form>\n" +
5422 " </table>\n" +
5423 "\n" +
5424 " </div>\n" +
5425 " </div>\n" +
5367 " </div>\n" +
5426 "\n" +
5427 "</div>\n"
5368 "</div>\n"
5428 );
5369 );
5429
5370
5430
5371
5431 $templateCache.put('components/views/user-auth-tokens-view/user-auth-tokens-view.html',
5372 $templateCache.put('components/views/logs-browser/logs-browser.html',
5432 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.tokens\"></ng-include>\n" +
5373 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.isLoading.logs\"></ng-include>\n" +
5433 "\n" +
5374 "\n" +
5434 "<div ng-show=\"!$ctrl.loading.tokens\">\n" +
5375 "<div ng-if=\"$ctrl.isLoading.logs === false\">\n" +
5435 "\n" +
5376 "\n" +
5436 " <div class=\"panel panel-default\">\n" +
5377 " <p class=\"search-params\">\n" +
5437 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
5378 " <strong>Search params:</strong>\n" +
5379 " <span ng-repeat=\"tag in $ctrl.searchParams.tags\" class=\"tag\">\n" +
5380 " <strong>{{tag.type}}</strong>\n" +
5381 " {{ tag.type == 'resource' ? $ctrl.applications[tag.value].resource_name : tag.value }}\n" +
5438 "\n" +
5382 "\n" +
5439 " <div class=\"panel-body\">\n" +
5383 " <a ng-click=\"$ctrl.removeSearchTag(tag)\"><span class=\"fa fa-times\"></span></a>\n" +
5384 " </span>\n" +
5385 " </p>\n" +
5440 "\n" +
5386 "\n" +
5441 " <div class=\"alert alert-success\">You can use those tokens to authenticate yourself when performing various API calls</div>\n" +
5387 " <p>\n" +
5442 "\n" +
5388 "\n" +
5443 " <hr/>\n" +
5389 " <script type=\"text/ng-template\" id=\"SearchTypeAheadUrl.html\">\n" +
5444 "\n" +
5390 "\n" +
5445 " <form method=\"post\" class=\"form-inline\" name=\"$ctrl.TokenForm\" ng-submit=\"$ctrl.addToken()\" novalidate>\n" +
5391 " </script>\n" +
5446 " <data-form-errors errors=\"$ctrl.TokenForm.ae_validation.description\"></data-form-errors>\n" +
5447 " <data-form-errors errors=\"$ctrl.TokenForm.ae_validation.expires\"></data-form-errors>\n" +
5448 " <div class=\"form-group\">\n" +
5449 " <label>\n" +
5450 " Description\n" +
5451 " </label>\n" +
5452 " <input class=\"form-control\" name=\"description\" placeholder=\"Token description\" type=\"text\" ng-model=\"$ctrl.form.description\">\n" +
5453 " </div>\n" +
5454 " <div class=\"form-group\">\n" +
5455 " <label>\n" +
5456 " Expires\n" +
5457 " </label>\n" +
5458 " <select class=\"form-control\" ng-model=\"$ctrl.form.expires\" ng-options=\"i.key as i.label for i in $ctrl.expireOptions | objectToOrderedArray:'minutes'\">\n" +
5459 " <option value=\"\">Never</option>\n" +
5460 " </select>\n" +
5461 " </div>\n" +
5462 " <div class=\"form-group\">\n" +
5463 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
5464 " </label>\n" +
5465 " <input class=\"form-control btn btn-primary\" name=\"submit\" type=\"submit\" value=\"Create Token\">\n" +
5466 " </div>\n" +
5467 " </form>\n" +
5468 "\n" +
5392 "\n" +
5393 " <form class=\"form\">\n" +
5394 " <div class=\"typeahead-tags\">\n" +
5395 " <input type=\"text\" id=\"typeAhead\" ng-model=\"$ctrl.filterTypeAhead\" placeholder=\"Start typing to filter logs for events, filter by servers, namespaces, levels.\"\n" +
5396 " ng-keydown=\"$ctrl.typeAheadTag($event)\"\n" +
5397 " uib-typeahead=\"tag as tag.text for tag in $ctrl.filterTypeAheadOptions | filter:$viewValue:$ctrl.aheadFilter\"\n" +
5398 " typeahead-min-length=\"1\" class=\"form-control\"\n" +
5399 " typeahead-template-url=\"templates/directives/search_type_ahead.html\">\n" +
5469 " </div>\n" +
5400 " </div>\n" +
5401 " </form>\n" +
5402 "\n" +
5403 " <div class=\"well animate-show position-absolute increse-zindex\" ng-if=\"$ctrl.showDatePicker\" ng-model=\"$ctrl.pickerDate\" ng-change=\"$ctrl.pickerDateChanged()\">\n" +
5404 " <uib-datepicker></uib-datepicker>\n" +
5405 " </div>\n" +
5406 "\n" +
5407 " </p>\n" +
5470 "\n" +
5408 "\n" +
5409 " <div class=\"panel\">\n" +
5471 "\n" +
5410 "\n" +
5411 " <div class=\"panel-body\">\n" +
5412 " <c3chart data-domid=\"log_events_chart\" data-data=\"$ctrl.logEventsChartData\" data-config=\"$ctrl.logEventsChartConfig\">\n" +
5413 " </c3chart>\n" +
5414 " </div>\n" +
5472 " </div>\n" +
5415 " </div>\n" +
5473 "\n" +
5416 "\n" +
5474 " <div class=\"panel panel-default\">\n" +
5417 "\n" +
5475 " <table st-table=\"displayedCollection\" st-safe-src=\"$ctrl.tokens\" class=\"table table-striped\">\n" +
5418 " <div class=\"text-center\">\n" +
5476 " <caption>Your current tokens</caption>\n" +
5419 " <uib-pagination total-items=\"$ctrl.itemCount\" items-per-page=\"$ctrl.itemsPerPage\" ng-model=\"$ctrl.page\" max-size=\"10\"\n" +
5420 " ng-change=\"$ctrl.paginationChange()\"\n" +
5421 " class=\"pagination pagination-sm\" boundary-links=\"true\" direction-links=\"false\"></uib-pagination>\n" +
5422 " </div>\n" +
5423 "\n" +
5424 " <div class=\"panel panel-default\">\n" +
5425 "\n" +
5426 " <table class=\"table table-striped log-list\">\n" +
5427 " <caption>Logs</caption>\n" +
5477 " <thead>\n" +
5428 " <thead>\n" +
5478 " <tr>\n" +
5429 " <tr>\n" +
5479 " <th st-sort=\"description\"><a>Description</a></th>\n" +
5430 " <th class=\"c1 resource\">Application</th>\n" +
5480 " <th class=\"created\"><a>Created</a></th>\n" +
5431 " <th class=\"c2 message\">Message</th>\n" +
5481 " <th class=\"expires\"><a>Expires</a></th>\n" +
5432 " <th class=\"c3 when\">When</th>\n" +
5482 " <th class=\"options\"></th>\n" +
5483 " </tr>\n" +
5484 " <tr>\n" +
5485 " <th><input st-search=\"description\" placeholder=\"search for description\" class=\"form-control\" type=\"search\" st-delay=\"1\"/></th>\n" +
5486 " <th></th>\n" +
5487 " <th></th>\n" +
5488 " <th></th>\n" +
5489 " </tr>\n" +
5433 " </tr>\n" +
5490 " </thead>\n" +
5434 " </thead>\n" +
5491 " <tbody>\n" +
5435 " <tbody>\n" +
5492 "\n" +
5436 " <tr ng-repeat=\"log in $ctrl.logsPage track by log.log_id\" class=\"{{$odd ? 'odd' : 'even'}}\">\n" +
5493 " <tr ng-repeat=\"token in displayedCollection\">\n" +
5437 " <td class=\"c1\">\n" +
5494 " <td><p>{{token.description}}</p>\n" +
5438 " <a class=\"tag application\" ng-click=\"$ctrl.addSearchTag({type:'resource', value:log.resource_id})\">\n" +
5495 " <pre ng-init=\"token.limit = 8\" ng-mouseover=\"token.limit = 99\" ng-mouseleave=\"token.limit = 8\">{{token.token| limitTo:token.limit}}...</pre>\n" +
5439 " <span class=\"name\">{{log.resource_name}}</span></a>\n" +
5496 " </td>\n" +
5440 " </td>\n" +
5497 " <td><span data-uib-tooltip=\"{{token.creation_date}}\">{{token.creation_date | isoToRelativeTime}}</span></td>\n" +
5441 " <td class=\"c2\">\n" +
5498 " <td><span ng-if=\"token.expires\" data-uib-tooltip=\"{{token.expires}}\">{{token.expires | isoToRelativeTime}}</span>\n" +
5442 " <a class=\"tag {{log.log_level|lowercase}}\" ng-click=\"$ctrl.addSearchTag({type:'level', value:log.log_level})\">\n" +
5499 " <span ng-if=\"!token.expires\">Never</span></td>\n" +
5443 " <span class=\"name\">level:</span> {{log.log_level}}</a>\n" +
5500 " <td>\n" +
5444 " <a class=\"tag\" ng-click=\"$ctrl.addSearchTag({type:'namespace', value:log.namespace})\">\n" +
5501 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
5445 " <span class=\"name\">namespace:</span> {{log.namespace}}</a>\n" +
5502 " <a class=\"btn btn-danger\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span></a>\n" +
5446 " <a ng-repeat=\"(tag, value) in log.tags\" class=\"tag\" ng-click=\"$ctrl.addSearchTag({type:tag, value:value})\">\n" +
5503 " <ul class=\"dropdown-menu\">\n" +
5447 " <span class=\"name\">{{tag}}:</span> {{value}}</a>\n" +
5504 " <li><a>No</a></li>\n" +
5448 " <div class=\"log\">{{log.message}}</div>\n" +
5505 " <li><a ng-click=\"$ctrl.removeToken(token)\">Yes</a></li>\n" +
5449 " </td>\n" +
5506 " </ul>\n" +
5450 " <td class=\"c3 when\">\n" +
5507 " </span>\n" +
5451 " <a ng-click=\"$ctrl.filterId(log)\" data-uib-tooltip=\"{{log.timestamp}}\">\n" +
5452 " <iso-to-relative-time time=\"{{log.timestamp}}\"/>\n" +
5453 " </a>\n" +
5508 " </td>\n" +
5454 " </td>\n" +
5509 " </tr>\n" +
5455 " </tr>\n" +
5456 "\n" +
5510 " </tbody>\n" +
5457 " </tbody>\n" +
5511 " </table>\n" +
5458 " </table>\n" +
5459 "\n" +
5460 " </div>\n" +
5461 "\n" +
5462 " <div class=\"text-center\">\n" +
5463 " <uib-pagination total-items=\"$ctrl.itemCount\" items-per-page=\"$ctrl.itemsPerPage\" ng-model=\"$ctrl.page\" max-size=\"10\"\n" +
5464 " ng-change=\"$ctrl.paginationChange()\"\n" +
5465 " class=\"pagination pagination-sm\" boundary-links=\"true\" direction-links=\"false\"></uib-pagination>\n" +
5512 " </div>\n" +
5466 " </div>\n" +
5513 "\n" +
5467 "\n" +
5514 "</div>\n"
5468 "</div>\n"
5515 );
5469 );
5516
5470
5517
5471
5518 $templateCache.put('components/views/user-identities-view/user-identities-view.html',
5472 $templateCache.put('components/views/report-view/report-view.html',
5519 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.identities\"></ng-include>\n" +
5473 "<script type=\"text/ng-template\" id=\"slow_call.html\">\n" +
5474 " <table class=\"report-table\">\n" +
5475 " <tr>\n" +
5476 " <td class=\"table-label\">Type</td>\n" +
5477 " <td class=\"data\"><strong>{{call.type}}\n" +
5478 " ({{call.subtype}})\n" +
5479 " </strong></td>\n" +
5480 " </tr>\n" +
5481 " <tr>\n" +
5482 " <td class=\"table-label\">Duration</td>\n" +
5483 " <td class=\"data\"><strong class=\"textColor_1\">{{call.duration}}</strong></td>\n" +
5484 " </tr>\n" +
5485 " <tr>\n" +
5486 " <td class=\"table-label\">Start Time</td>\n" +
5487 " <td class=\"data\">{{call.timestamp}}</td>\n" +
5488 " </tr>\n" +
5489 " <tr>\n" +
5490 " <td class=\"table-label\">Statement</td>\n" +
5491 " <td class=\"data\">\n" +
5492 " <pre class=\"word-wrap\">{{call.statement}}</pre>\n" +
5493 " </td>\n" +
5494 " </tr>\n" +
5495 " <tr ng-if=\"call.location\">\n" +
5496 " <td class=\"table-label\">Location</td>\n" +
5497 " <td class=\"data\">{{call.location}}</td>\n" +
5498 " </tr>\n" +
5499 " <tr>\n" +
5500 " <td class=\"table-label\">Parameters</td>\n" +
5501 " <td class=\"\">\n" +
5502 " <div class=\"var-listing\" human-format vars=\"call.parameters\"></div>\n" +
5503 " </td>\n" +
5504 " </tr>\n" +
5505 " </table>\n" +
5520 "\n" +
5506 "\n" +
5521 "<div ng-show=\"!$ctrl.loading.identities\">\n" +
5507 " <div ng-if=\"call.children.length > 0\" class=\"subcalls p-l-8\">\n" +
5522 "\n" +
5508 "\n" +
5523 " <div class=\"panel panel-default\">\n" +
5509 " <p><strong>\n" +
5524 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
5510 " <small>Sub-calls</small>\n" +
5525 " <div class=\"panel-body\">\n" +
5511 " </strong></p>\n" +
5526 "\n" +
5512 "\n" +
5527 " <div class=\"col-sm-6\">\n" +
5513 " <div class=\"panel panel-default\">\n" +
5528 " <p ng-show=\"$ctrl.identities.length === 0\">No external providers linked yet</p>\n" +
5514 " <div ng-repeat=\"call in call.children\" ng-include=\"'slow_call.html'\" class=\"panel-body\"/>\n" +
5529 " <ul class=\"list-group\">\n" +
5530 " <li ng-repeat=\"provider in $ctrl.identities\" class=\"animate-repeat list-group-item\">\n" +
5531 " <div class=\"pull-right\">\n" +
5532 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
5533 " <a class=\"btn btn-danger btn-xs\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span></a>\n" +
5534 " <ul class=\"dropdown-menu\">\n" +
5535 " <li><a>No</a></li>\n" +
5536 " <li><a ng-click=\"$ctrl.removeProvider(provider)\">Yes</a></li>\n" +
5537 " </ul>\n" +
5538 " </span>\n" +
5539 " </div>\n" +
5540 " <em>@{{ provider.provider }}</em>: <strong>{{ provider.id }}</strong>\n" +
5541 " </li>\n" +
5542 " </ul>\n" +
5543 " </div>\n" +
5544 " <div class=\"col-sm-6\">\n" +
5545 " <ul class=\"list-group\">\n" +
5546 " <li class=\"list-group-item\">\n" +
5547 " <a href=\"{{$ctrl.AeConfig.urls.social_auth.google}}\" target=\"_self\">\n" +
5548 " <span class=\"fa fa-google-plus-square fa-2x\"></span> Connect with Google</a>\n" +
5549 " </li>\n" +
5550 " <li class=\"list-group-item\">\n" +
5551 " <a href=\"{{$ctrl.AeConfig.urls.social_auth.twitter}}\" target=\"_self\">\n" +
5552 " <span class=\"fa fa-twitter fa-2x\"></span> Connect with Twitter</a>\n" +
5553 " </li>\n" +
5554 " <li class=\"list-group-item\">\n" +
5555 " <a href=\"{{$ctrl.AeConfig.urls.social_auth.bitbucket}}\" target=\"_self\">\n" +
5556 " <span class=\"fa fa-bitbucket fa-2x\"></span> Connect with Bitbucket</a>\n" +
5557 " </li>\n" +
5558 " <li class=\"list-group-item\">\n" +
5559 " <a href=\"{{$ctrl.AeConfig.urls.social_auth.github}}\" target=\"_self\">\n" +
5560 " <span class=\"fa fa-github fa-2x\"></span> Connect with Github including private repo access</a>\n" +
5561 " </li>\n" +
5562 " </ul>\n" +
5563 " </div>\n" +
5564 " </div>\n" +
5515 " </div>\n" +
5565 " </div>\n" +
5516 " </div>\n" +
5566 "</div>\n"
5517 " </div>\n" +
5567 );
5568
5569
5570 $templateCache.put('components/views/user-password-view/user-password-view.html',
5571 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.password\"></ng-include>\n" +
5572 "\n" +
5518 "\n" +
5573 "<div ng-show=\"!$ctrl.loading.password\">\n" +
5519 "</script>\n" +
5574 "\n" +
5520 "\n" +
5575 " <div class=\"panel panel-default\">\n" +
5521 "<script type=\"text/ng-template\" id=\"AssignReportCtrl.html\">\n" +
5576 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
5577 " <div class=\"panel-body\">\n" +
5578 "\n" +
5522 "\n" +
5579 " <form class=\"form-horizontal\" name=\"$ctrl.passwordForm\" ng-submit=\"$ctrl.updatePassword()\">\n" +
5523 " <div class=\"modal-header\">\n" +
5580 " <div class=\"form-group\" id=\"row-old_password\">\n" +
5524 " <h3>Assign users to report</h3>\n" +
5581 " <data-form-errors errors=\"$ctrl.passwordForm.ae_validation.old_password\"></data-form-errors>\n" +
5525 " </div>\n" +
5582 " <label for=\"old_password\" id=\"label-old_password\" class=\"control-label col-sm-4 col-lg-3\">\n" +
5526 " <div class=\"modal-body\">\n" +
5583 " Old Password\n" +
5527 "\n" +
5584 " <span class=\"required\">*</span>\n" +
5528 " <ng-include src=\"'templates/loader.html'\" ng-if=\"ctrl.loading\"></ng-include>\n" +
5585 " </label>\n" +
5529 "\n" +
5586 " <div class=\"col-sm-8 col-lg-9\">\n" +
5530 " <div class=\"row\" ng-if=\"!ctrl.loading\">\n" +
5587 " <input class=\"form-control\" id=\"old_password\" name=\"old_password\" type=\"password\" ng-model=\"$ctrl.form.old_password\">\n" +
5531 " <div class=\"col-sm-6\">\n" +
5588 " </div>\n" +
5532 " <strong>Unassigned</strong>\n" +
5589 " </div>\n" +
5533 "\n" +
5590 " <div class=\"form-group\" id=\"row-new_password\">\n" +
5534 " <div class=\"user-assignment\" ng-repeat=\"user in ctrl.unAssignedUsers\"\n" +
5591 " <data-form-errors errors=\"$ctrl.passwordForm.ae_validation.new_password\"></data-form-errors>\n" +
5535 " ng-click=\"ctrl.reassignUser(user)\">\n" +
5592 " <label for=\"new_password\" id=\"label-new_password\" class=\"control-label col-sm-4 col-lg-3\">\n" +
5536 " <img ng-src=\"{{user.gravatar_url}}\"/>\n" +
5593 " New Password\n" +
5537 " <strong>{{user.user_name}}</strong><br/>\n" +
5594 " <span class=\"required\">*</span>\n" +
5538 " {{user.name}}\n" +
5595 " </label>\n" +
5539 " <div class=\"clear\"></div>\n" +
5596 " <div class=\"col-sm-8 col-lg-9\">\n" +
5597 " <input class=\"form-control\" id=\"new_password\" name=\"new_password\" type=\"password\" ng-model=\"$ctrl.form.new_password\">\n" +
5598 " </div>\n" +
5599 " </div>\n" +
5600 " <div class=\"form-group\" id=\"row-new_password_confirm\">\n" +
5601 " <data-form-errors errors=\"$ctrl.passwordForm.ae_validation.new_password_confirm\"></data-form-errors>\n" +
5602 " <label for=\"new_password_confirm\" id=\"label-new_password_confirm\" class=\"control-label col-sm-4 col-lg-3\">\n" +
5603 " Confirm Password\n" +
5604 " <span class=\"required\">*</span>\n" +
5605 " </label>\n" +
5606 " <div class=\"col-sm-8 col-lg-9\">\n" +
5607 " <input class=\"form-control\" id=\"new_password_confirm\" name=\"new_password_confirm\" type=\"password\" ng-model=\"$ctrl.form.new_password_confirm\">\n" +
5608 " </div>\n" +
5609 " </div>\n" +
5610 " <div class=\"form-group\" id=\"row-submit\">\n" +
5611 " <label for=\"submit\" id=\"label-submit\" class=\"control-label col-sm-4 col-lg-3\"></label>\n" +
5612 " <div class=\"col-sm-8 col-lg-9\">\n" +
5613 " <input class=\"form-control SubmitField btn btn-primary\" id=\"submit\" name=\"submit\" type=\"submit\" value=\"Change Password\">\n" +
5614 " </div>\n" +
5615 " </div>\n" +
5540 " </div>\n" +
5616 " </form>\n" +
5541 " </div>\n" +
5542 "\n" +
5543 " <div class=\"col-sm-6\">\n" +
5544 " <strong>Assigned</strong>\n" +
5617 "\n" +
5545 "\n" +
5546 " <div class=\"user-assignment\" ng-repeat=\"user in ctrl.assignedUsers\" ng-click=\"ctrl.reassignUser(user)\">\n" +
5547 " <img ng-src=\"{{user.gravatar_url}}\"/>\n" +
5548 " {{user.user_name}}<br/>\n" +
5549 " {{user.name}}\n" +
5550 " <div class=\"clear\"></div>\n" +
5551 " </div>\n" +
5552 " </div>\n" +
5618 " </div>\n" +
5553 " </div>\n" +
5619 " </div>\n" +
5554 " </div>\n" +
5620 "</div>\n"
5555 " <div class=\"modal-footer\">\n" +
5621 );
5556 " <button class=\"btn btn-primary\" ng-click=\"ctrl.ok()\">OK</button>\n" +
5622
5557 " <button class=\"btn btn-warning\" ng-click=\"ctrl.cancel()\">Cancel</button>\n" +
5623
5558 " </div>\n" +
5624 $templateCache.put('components/views/user-profile-view/user-profile-view.html',
5559 "</script>\n" +
5625 "<ui-view></ui-view><ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.profile\"></ng-include>\n" +
5626 "\n" +
5560 "\n" +
5627 "<div ng-show=\"!$ctrl.loading.profile\">\n" +
5561 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.is_loading.report\"></ng-include>\n" +
5628 " <div class=\"panel panel-default\">\n" +
5629 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
5630 " <div class=\"panel-body\">\n" +
5631 " <form name=\"$ctrl.profileForm\" class=\"form-horizontal\" ng-submit=\"$ctrl.updateProfile()\">\n" +
5632 " <div class=\"form-group\" id=\"row-email\">\n" +
5633 " <data-form-errors errors=\"$ctrl.profileForm.ae_validation.email\"></data-form-errors>\n" +
5634 " <label for=\"email\" id=\"label-email\" class=\"control-label col-sm-4 col-lg-3\">\n" +
5635 " Email Address\n" +
5636 " <span class=\"required\">*</span>\n" +
5637 " </label>\n" +
5638 " <div class=\"col-sm-8 col-lg-9\">\n" +
5639 " <input class=\"form-control\" id=\"email\" name=\"email\" type=\"text\" ng-model=\"$ctrl.user.email\">\n" +
5640 " </div>\n" +
5641 " </div>\n" +
5642 "\n" +
5562 "\n" +
5643 " <div class=\"form-group\" id=\"row-first_name\">\n" +
5563 "<div ng-if=\"!$ctrl.is_loading.report && $ctrl.report === null\">\n" +
5644 " <data-form-errors errors=\"$ctrl.profileForm.ae_validation.first_name\"></data-form-errors>\n" +
5564 " <strong>OOPS something went wrong :(</strong>\n" +
5645 " <label for=\"first_name\" id=\"label-first_name\" class=\"control-label col-sm-4 col-lg-3\">\n" +
5565 "</div>\n" +
5646 " First Name\n" +
5647 " </label>\n" +
5648 " <div class=\"col-sm-8 col-lg-9\">\n" +
5649 " <input class=\"form-control\" id=\"first_name\" name=\"first_name\" type=\"text\" ng-model=\"$ctrl.user.first_name\">\n" +
5650 " </div>\n" +
5651 " </div>\n" +
5652 " <div class=\"form-group\" id=\"row-last_name\">\n" +
5653 " <data-form-errors errors=\"$ctrl.profileForm.ae_validation.last_name\"></data-form-errors>\n" +
5654 " <label for=\"last_name\" id=\"label-last_name\" class=\"control-label col-sm-4 col-lg-3\">\n" +
5655 " Last Name\n" +
5656 " </label>\n" +
5657 " <div class=\"col-sm-8 col-lg-9\">\n" +
5658 " <input class=\"form-control\" id=\"last_name\" name=\"last_name\" type=\"text\" ng-model=\"$ctrl.user.last_name\">\n" +
5659 " </div>\n" +
5660 " </div>\n" +
5661 " <div class=\"form-group\" id=\"row-company_name\">\n" +
5662 " <data-form-errors errors=\"$ctrl.profileForm.ae_validation.company_name\"></data-form-errors>\n" +
5663 " <label for=\"company_name\" id=\"label-company_name\" class=\"control-label col-sm-4 col-lg-3\">\n" +
5664 " Company Name\n" +
5665 " </label>\n" +
5666 " <div class=\"col-sm-8 col-lg-9\">\n" +
5667 " <input class=\"form-control\" id=\"company_name\" name=\"company_name\" type=\"text\" ng-model=\"$ctrl.user.company_name\">\n" +
5668 " </div>\n" +
5669 " </div>\n" +
5670 " <div class=\"form-group\" id=\"row-company_address\">\n" +
5671 " <data-form-errors errors=\"$ctrl.profileForm.ae_validation.company_address\"></data-form-errors>\n" +
5672 " <label for=\"company_address\" id=\"label-company_address\" class=\"control-label col-sm-4 col-lg-3\">\n" +
5673 " Company Address\n" +
5674 " </label>\n" +
5675 " <div class=\"col-sm-8 col-lg-9\">\n" +
5676 " <textarea class=\"form-control\" id=\"company_address\" name=\"company_address\" ng-model=\"$ctrl.user.company_address\"></textarea>\n" +
5677 " </div>\n" +
5678 " </div>\n" +
5679 " <div class=\"form-group\" id=\"row-zip_code\">\n" +
5680 " <data-form-errors errors=\"$ctrl.profileForm.ae_validation.zip_code\"></data-form-errors>\n" +
5681 " <label for=\"zip_code\" id=\"label-zip_code\" class=\"control-label col-sm-4 col-lg-3\">\n" +
5682 " ZIP code\n" +
5683 " </label>\n" +
5684 " <div class=\"col-sm-8 col-lg-9\">\n" +
5685 " <input class=\"form-control\" id=\"zip_code\" name=\"zip_code\" type=\"text\" ng-model=\"$ctrl.user.zip_code\">\n" +
5686 " </div>\n" +
5687 " </div>\n" +
5688 " <div class=\"form-group\" id=\"row-city\">\n" +
5689 " <data-form-errors errors=\"$ctrl.profileForm.ae_validation.city\"></data-form-errors>\n" +
5690 " <label for=\"city\" id=\"label-city\" class=\"control-label col-sm-4 col-lg-3\">\n" +
5691 " City\n" +
5692 " </label>\n" +
5693 " <div class=\"col-sm-8 col-lg-9\">\n" +
5694 " <input class=\"form-control\" id=\"city\" name=\"city\" type=\"text\" ng-model=\"$ctrl.user.city\">\n" +
5695 " </div>\n" +
5696 " </div>\n" +
5697 " <div class=\"form-group\" id=\"row-notifications\">\n" +
5698 " <data-form-errors errors=\"$ctrl.profileForm.ae_validation.notifications\"></data-form-errors>\n" +
5699 " <label for=\"notifications\" id=\"label-notifications\" class=\"control-label col-sm-4 col-lg-3\">\n" +
5700 " Account notifications\n" +
5701 " </label>\n" +
5702 " <div class=\"col-sm-8 col-lg-9\">\n" +
5703 " <input checked class=\"form-control\" id=\"notifications\" name=\"notifications\" type=\"checkbox\" ng-model=\"$ctrl.user.notifications\">\n" +
5704 " </div>\n" +
5705 " </div>\n" +
5706 " <div class=\"form-group\" id=\"row-submit\">\n" +
5707 " <label for=\"submit\" id=\"label-submit\" class=\"control-label col-sm-4 col-lg-3\">\n" +
5708 " </label>\n" +
5709 " <div class=\"col-sm-8 col-lg-9\">\n" +
5710 " <input class=\"form-control btn btn-primary\" id=\"submit\" name=\"submit\" type=\"submit\" value=\"Update Account\">\n" +
5711 " </div>\n" +
5712 " </div>\n" +
5713 " </form>\n" +
5714 " </div>\n" +
5715 " </div>\n" +
5716 "</div>\n"
5717 );
5718
5719
5720 $templateCache.put('directives/permissions/permissions.html',
5721 "<div class=\"panel panel-default\">\n" +
5722 " <div class=\"panel-heading\">\n" +
5723 " <h3 class=\"panel-title\">Permissions</h3>\n" +
5724 " </div>\n" +
5725 " <div class=\"panel-body\">\n" +
5726 " <p>Here you can <strong>set permissions</strong> for others to access your app data.</p>\n" +
5727 "\n" +
5728 " <p>For example you can let other staff member view or alter error reports.</p>\n" +
5729 "\n" +
5566 "\n" +
5730 " <div ng-if=\"permissions.possibleGroups.length > 0\">\n" +
5567 "<div ng-if=\"$ctrl.report !== null && !$ctrl.is_loading.report\">\n" +
5731 " <h3>Group permissions</h3>\n" +
5732 "\n" +
5568 "\n" +
5733 " <ul class=\"list-group\">\n" +
5569 " <div ng-if=\"$ctrl.stateHolder.AeUser.id\" class=\"row\">\n" +
5734 " <li ng-repeat=\"perm in permissions.currentPermissions.group\" class=\"animate-repeat list-group-item\">\n" +
5570 " <div class=\"col-lg-12\">\n" +
5735 " <strong>{{ perm.self.group_name }}</strong>\n" +
5571 " <a onclick=\"window.history.back()\" class=\"btn btn-default\" ng-if=\"$ctrl.window.history.length > 2\"><span class=\"fa fa-arrow-circle-o-left\"></span>\n" +
5736 " <div ng-repeat=\"perm_name in perm.permissions\" class=\"pull-right animate-repeat m-l-1\">\n" +
5572 " Go back</a>\n" +
5737 " <span ng-if=\"perm_name == '__all_permissions__'\">Resource owner</span>\n" +
5573 " <a class=\"btn btn-default\" ng-click=\"$ctrl.assignUsersModal()\" ng-if=\"$ctrl.reportType == 'report'\"><span\n" +
5738 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\" ng-if=\"perm_name != '__all_permissions__'\">\n" +
5574 " class=\"fa fa-flag\"></span> Assign report\n" +
5739 " <a class=\"btn btn-danger btn-xs\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span> {{ perm_name }}</a>\n" +
5575 " to user</a>\n" +
5740 " <ul class=\"dropdown-menu\">\n" +
5741 " <li><a>No</a></li>\n" +
5742 " <li><a ng-click=\"permissions.removeGroupPermission(perm_name, perm)\">Yes</a></li>\n" +
5743 " </ul>\n" +
5744 " </span>\n" +
5745 " </div>\n" +
5746 " </li>\n" +
5747 " </ul>\n" +
5748 "\n" +
5576 "\n" +
5749 " <form name=\"add_permission\" class=\"form-inline\" ng-submit=\"permissions.setGroupPermission()\">\n" +
5577 " <a class=\"btn {{ $ctrl.report.group.fixed ? 'btn-success' : 'btn-default'}}\" ng-click=\"$ctrl.markFixed()\"\n" +
5750 " <div class=\"form-group\">\n" +
5578 " ng-if=\"$ctrl.reportType == 'report'\">\n" +
5751 " <select class=\"form-control\" ng-model=\"permissions.form.selectedGroup\" ng-options=\"g.id as g.group_name for g in permissions.possibleGroups\"></select>\n" +
5579 " <span class=\"fa fa-check\"></span> Mark fixed</a>\n" +
5752 " </div>\n" +
5753 " <div class=\"form-group\">\n" +
5754 " <span ng-repeat=\"permission in permissions.possiblePermissions\">\n" +
5755 " <input type=\"checkbox\" ng-model=\"permissions.form.selectedGroupPermissions[permission]\"> {{ permission }}\n" +
5756 " </span>\n" +
5757 " </div>\n" +
5758 " <div class=\"form-group\">\n" +
5759 " <button class=\"btn btn-info\"><span class=\"fa fa-user\"></span> Give permission</button>\n" +
5760 " </div>\n" +
5761 " </form>\n" +
5762 "\n" +
5580 "\n" +
5763 " </div>\n" +
5581 " <span class=\"dropdown\" ng-if=\"$ctrl.report.application.integrations.length\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
5582 " <a class=\"dropdown-toggle btn btn-default\" data-uib-dropdown-toggle>\n" +
5583 " <span class=\"fa fa-send\"></span> Integrations\n" +
5584 " </a>\n" +
5585 " <ul class=\"dropdown-menu\">\n" +
5586 " <li ng-repeat=\"choice in $ctrl.report.application.integrations\">\n" +
5587 " <a ng-click=\"$ctrl.runIntegration(choice.name)\">{{choice.action}}</a>\n" +
5588 " </li>\n" +
5589 " </ul>\n" +
5590 " </span>\n" +
5764 "\n" +
5591 "\n" +
5765 " <h3>User permissions</h3>\n" +
5592 " <a class=\"btn btn-default\" ng-click=\"$ctrl.markPublic()\">Make {{$ctrl.group.public ? 'private' : 'public'}}</a>\n" +
5766 " <div>\n" +
5767 " <ul class=\"list-group\">\n" +
5768 " <li ng-repeat=\"perm in permissions.currentPermissions.user\" class=\"animate-repeat list-group-item\">\n" +
5769 " <strong>{{ perm.self.user_name }}</strong>\n" +
5770 " <div ng-repeat=\"perm_name in perm.permissions\" class=\"pull-right animate-repeat m-l-1\">\n" +
5771 " <span ng-if=\"perm_name == '__all_permissions__'\">Resource owner</span>\n" +
5772 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\" ng-if=\"perm_name != '__all_permissions__'\">\n" +
5773 " <a class=\"btn btn-danger btn-xs\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span> {{ perm_name }}</a>\n" +
5774 " <ul class=\"dropdown-menu\">\n" +
5775 " <li><a>No</a></li>\n" +
5776 " <li><a ng-click=\"permissions.removeUserPermission(perm_name,perm)\">Yes</a></li>\n" +
5777 " </ul>\n" +
5778 " </span>\n" +
5779 " </div>\n" +
5780 " </li>\n" +
5781 " </ul>\n" +
5782 " </div>\n" +
5783 " <div>\n" +
5784 " <p>First enter username or full email of person you want to give access to (the person needs to be <strong>already registered in AppEnlight</strong>)</p>\n" +
5785 "\n" +
5593 "\n" +
5786 " <form name=\"add_permission\" class=\"form-inline\" ng-submit=\"permissions.setUserPermission()\">\n" +
5594 "<span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
5787 " <div class=\"form-group\">\n" +
5595 " <a class=\"btn btn-danger\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span> Delete</a>\n" +
5788 " <input type=\"text\" class=\"autocomplete form-control\" placeholder=\"Search for user/email\" ng-model=\"permissions.form.autocompleteUser\"\n" +
5596 " <ul class=\"dropdown-menu\">\n" +
5789 " uib-typeahead=\"u.user for u in permissions.searchUsers($viewValue) | limitTo:8\" typeahead-loading=\"permissions.searchingUsers\" typeahead-wait-ms=\"250\"\n" +
5597 " <li><a>No</a></li>\n" +
5790 " typeahead-template-url=\"templates/directives/user_search_type_ahead.html\"\n" +
5598 " <li><a ng-click=\"$ctrl.delete()\">Yes</a></li>\n" +
5791 " />\n" +
5599 " </ul>\n" +
5792 " </div>\n" +
5600 "</span>\n" +
5793 " <div class=\"form-group\">\n" +
5601 " </div>\n" +
5794 " <span ng-repeat=\"permission in permissions.possiblePermissions\">\n" +
5795 " <input type=\"checkbox\" ng-model=\"permissions.form.selectedUserPermissions[permission]\"> {{ permission }}\n" +
5796 " </span>\n" +
5797 " </div>\n" +
5798 " <div class=\"form-group\">\n" +
5799 " <button class=\"btn btn-info\" ng-disabled=\"!permissions.form.autocompleteUser\"><span class=\"fa fa-user\"></span> Give permission</button>\n" +
5800 " </div>\n" +
5801 " </form>\n" +
5802 " </div>\n" +
5803 " </div>\n" +
5602 " </div>\n" +
5804 "</div>\n"
5805 );
5806
5807
5808 $templateCache.put('directives/plugin_config/plugin_config.html',
5809 "<div ng-repeat=\"tmpl in plugin_ctrlr.inclusions track by $index\">\n" +
5810 " <div><strong>Plugin: {{tmpl.name}}</strong></div>\n" +
5811 " <ng-include src=\"tmpl.template\"></ng-include>\n" +
5812 " <hr/>\n" +
5813 "</div>\n"
5814 );
5815
5816
5817 $templateCache.put('directives/postprocess_action/postprocess_action.html',
5818 "<div class=\"panel panel-default action\">\n" +
5819 " <div class=\"panel-body form-inline\">\n" +
5820 " <div class=\"pull-right\">\n" +
5821 " <span class=\"dropdown\" data-uib-dropdown>\n" +
5822 " <a class=\"btn btn-danger\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span></a>\n" +
5823 " <ul class=\"dropdown-menu\">\n" +
5824 " <li><a>No</a></li>\n" +
5825 " <li><a ng-click=\"ctrl.deleteAction(ctrl.action)\">Yes</a></li>\n" +
5826 " </ul>\n" +
5827 " </span>\n" +
5828 " </div>\n" +
5829 "\n" +
5603 "\n" +
5830 " <div class=\"form-group\">\n" +
5604 " <div class=\"row\">\n" +
5831 " <label>Action</label>\n" +
5605 " <div class=\"col-lg-4\">\n" +
5832 "\n" +
5833 " <div class=\"form-group\">\n" +
5834 " <select class=\"form-control\" ng-model=\"ctrl.action.new_value\" ng-options=\"f[0] as f[1] for f in ctrl.possibleActions\" ng-change=\"ctrl.setDirty()\"></select>\n" +
5835 " </div>\n" +
5836 "\n" +
5837 " <a class=\"btn btn-success\" ng-if=\"ctrl.action.dirty\" ng-click=\"ctrl.saveAction()\"><span class=\"fa fa-save\"></span> &nbsp;Save changes</a>\n" +
5838 "\n" +
5839 " </div>\n" +
5840 " <hr/>\n" +
5841 " <p>Meeting following criteria:</p>\n" +
5842 " <form-errors errors=\"ctrl.errors\"></form-errors>\n" +
5843 " {{ctrl.rule}}\n" +
5844 " <rule rule=\"ctrl.action.rule\" rule-definitions=\"ctrl.ruleDefinitions\" parent-rule=\"null\" parent-obj=\"ctrl.action\"></rule>\n" +
5845 " </div>\n" +
5846 "</div>\n"
5847 );
5848
5849
5850 $templateCache.put('directives/report_alert_action/report_alert_action.html',
5851 "<div class=\"panel panel-default action\">\n" +
5852 " <div class=\"panel-body form-inline\">\n" +
5853 " <div class=\"pull-right\">\n" +
5854 " <span class=\"dropdown\" data-uib-dropdown>\n" +
5855 " <a class=\"btn btn-danger\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span></a>\n" +
5856 " <ul class=\"dropdown-menu\">\n" +
5857 " <li><a>No</a></li>\n" +
5858 " <li><a ng-click=\"ctrl.deleteAction(ctrl.actions, ctrl.action)\">Yes</a></li>\n" +
5859 " </ul>\n" +
5860 " </span>\n" +
5861 " </div>\n" +
5862 "\n" +
5606 "\n" +
5863 " <div class=\"form-group\">\n" +
5607 " <div class=\"panel panel-default m-t-1\">\n" +
5864 " <label>Applies to</label>\n" +
5608 " <div class=\"panel-body\">\n" +
5865 " <select class=\"form-control\" ng-model=\"ctrl.action.resource_id\" ng-options=\"f.resource_id as f.resource_name for f in ctrl.applications\" ng-change=\"ctrl.setDirty()\">\n" +
5866 " <option value=\"\">All Resources</option>\n" +
5867 " </select>\n" +
5868 " </div>\n" +
5869 " <div class=\"form-group\">\n" +
5870 " <label>Notify</label>\n" +
5871 " <select class=\"form-control\" ng-model=\"ctrl.action.action\" ng-change=\"ctrl.setDirty()\" ng-options=\"f[0] as f[1] for f in ctrl.possibleNotifications\"></select>\n" +
5872 "\n" +
5609 "\n" +
5873 " <a class=\"btn btn-success\" ng-if=\"ctrl.action.dirty\" ng-click=\"ctrl.saveAction()\"><span class=\"fa fa-save\"></span> &nbsp;Save changes</a>\n" +
5610 " <h3 class=\"m-t-0\">Report Information</h3>\n" +
5874 "\n" +
5611 "\n" +
5875 " </div>\n" +
5612 " <table class=\"report-table with-ellipsis\">\n" +
5876 " <div>\n" +
5613 " <tr>\n" +
5877 " <p><strong>Channels:</strong></p>\n" +
5614 " <td class=\"table-label\">Occurences</td>\n" +
5878 " <ul class=\"list-group\">\n" +
5615 " <td class=\"data\">{{$ctrl.report.group.occurences}}</td>\n" +
5879 " <li class=\"list-group-item\" ng-repeat=\"channel in ctrl.action.channels\">\n" +
5616 " </tr>\n" +
5880 " <strong>{{channel.channel_visible_value}}</strong>\n" +
5617 " <tr ng-if=\"$ctrl.report.http_status\">\n" +
5881 " <div class=\"pull-right\">\n" +
5618 " <td class=\"table-label\">HTTP status</td>\n" +
5882 " <span class=\"dropdown\" data-uib-dropdown>\n" +
5619 " <td class=\"data\">{{$ctrl.report.http_status}}</td>\n" +
5883 " <a class=\"btn btn-danger btn-xs\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span></a>\n" +
5620 " </tr>\n" +
5884 " <ul class=\"dropdown-menu\">\n" +
5621 " <tr ng-if=\"$ctrl.report.group.priority\">\n" +
5885 " <li><a>No</a></li>\n" +
5622 " <td class=\"table-label\">Priority</td>\n" +
5886 " <li><a ng-click=\"ctrl.unBindChannel(channel)\">Yes</a></li>\n" +
5623 " <td class=\"data\">{{$ctrl.report.group.priority}}</td>\n" +
5887 " </ul>\n" +
5624 " </tr>\n" +
5888 " </span>\n" +
5625 " <tr ng-if=\"$ctrl.report.group.public\">\n" +
5889 " </div>\n" +
5626 " <td class=\"table-label\">Public URL</td>\n" +
5890 " </li>\n" +
5627 " <td class=\"data\">\n" +
5891 " </ul>\n" +
5628 " <form>\n" +
5892 " <div class=\"form-group\" ng-if=\"ctrl.possibleChannels.length\">\n" +
5629 " <textarea class=\"TextAreaField form-control\" id=\"public-url\" onclick=\"this.select()\">{{$ctrl.$state.href($ctrl.$state.current.name, $ctrl.$state.params, {absolute: true})}}</textarea>\n" +
5893 " <select class=\"form-control\" ng-model=\"ctrl.channelToBind\" ng-options=\"c as c.channel_visible_value for c in ctrl.possibleChannels |filter: c.supports_report_alerting\"></select>\n" +
5630 " </form>\n" +
5894 " <a class=\"btn btn-info\" ng-click=\"ctrl.bindChannel(channel, ctrl.action)\"><span class=\"fa fa-plus-circle\"></span> Add Channel</a>\n" +
5631 " </td>\n" +
5895 " </div>\n" +
5632 " </tr>\n" +
5896 " <div class=\"alert alert-danger\" ng-if=\"!ctrl.possibleChannels.length\">\n" +
5633 " <tr data-uib-tooltip=\"{{$ctrl.report.url}}\">\n" +
5897 " <span class=\"fa fa-exclamation-triangle \"></span>You need to create an alert channel before you can assign it to your rule.\n" +
5634 " <td class=\"table-label\">URL</td>\n" +
5898 " </div>\n" +
5635 " <td class=\"data ellipsis\"><a href=\"{{$ctrl.report.url}}\">{{$ctrl.report.url}}</a></td>\n" +
5636 " </tr>\n" +
5899 "\n" +
5637 "\n" +
5900 " </div>\n" +
5638 " <tr ng-if=\"$ctrl.report.ip\">\n" +
5901 " <hr/>\n" +
5639 " <td class=\"table-label\">Remote IP</td>\n" +
5902 " <p>Meeting following criteria:</p>\n" +
5640 " <td class=\"data\">{{$ctrl.report.ip}}</td>\n" +
5903 " <form-errors errors=\"ctrl.errors\"></form-errors>\n" +
5641 " </tr>\n" +
5904 " <rule rule=\"ctrl.action.rule\" rule-definitions=\"ctrl.ruleDefinitions\" parent-rule=\"null\" parent-obj=\"ctrl.action\"></rule>\n" +
5642 " <tr ng-if=\"$ctrl.report.user_agent\" data-uib-tooltip=\"{{$ctrl.report.user_agent}}\">\n" +
5905 " </div>\n" +
5643 " <td class=\"table-label\">User Agent</td>\n" +
5906 "</div>\n"
5644 " <td class=\"data ellipsis\">{{$ctrl.report.user_agent}}</td>\n" +
5907 );
5645 " </tr>\n" +
5908
5646 " <tr ng-if=\"$ctrl.report.message\">\n" +
5909
5647 " <td class=\"table-label\">Message</td>\n" +
5910 $templateCache.put('directives/rule_read_only/rule_read_only.html',
5648 " <td class=\"data\">{{$ctrl.report.message}}</td>\n" +
5911 "<div class=\"rule-read-only\">\n" +
5649 " </tr>\n" +
5650 " <tr ng-if=\"$ctrl.report.duration > 0\">\n" +
5651 " <td class=\"table-label\">Duration</td>\n" +
5652 " <td class=\"data\">\n" +
5653 " <span>{{$ctrl.report.duration}}s</span>\n" +
5654 " </td>\n" +
5655 " </tr>\n" +
5656 " <tr>\n" +
5657 " <td class=\"table-label\">First occured</td>\n" +
5658 " <td class=\"data\">\n" +
5659 " <span uib-tooltip=\"{{$ctrl.report.group.first_timestamp}}\"><iso-to-relative-time\n" +
5660 " time=\"{{$ctrl.report.group.first_timestamp}}\"/></span>\n" +
5661 " </td>\n" +
5662 " </tr>\n" +
5663 " <tr>\n" +
5664 " <td class=\"table-label\">Last occured</td>\n" +
5665 " <td class=\"data\">\n" +
5666 " <span uib-tooltip=\"{{$ctrl.report.group.last_timestamp}}\"><iso-to-relative-time\n" +
5667 " time=\"{{$ctrl.report.group.last_timestamp}}\"/></span>\n" +
5668 " </td>\n" +
5669 " </tr>\n" +
5670 " </table>\n" +
5912 "\n" +
5671 "\n" +
5913 " <span class=\"form-group\">\n" +
5672 " <div ng-if=\"$ctrl.requestStats\">\n" +
5914 " {{rule_ctrlr.readOnlyPossibleFields[rule_ctrlr.rule.field]}}\n" +
5673 " <h3>Performance stats</h3>\n" +
5915 " </span>\n" +
5916 "\n" +
5674 "\n" +
5917 " <span ng-if=\"rule_ctrlr.rule.field != '__AND__' && rule_ctrlr.rule.field !='__OR__' && rule_ctrlr.rule.field !='__NOT__'\">\n" +
5675 " <div class=\"perf_stats\">\n" +
5918 " is {{rule_ctrlr.ruleDefinitions.allOps[rule_ctrlr.rule.op]}} {{rule_ctrlr.rule.value}}\n" +
5676 " <span class=\"stat\" ng-repeat=\"stat in $ctrl.requestStats\"\n" +
5919 " </span>\n" +
5677 " ng-if=\"stat.calls > 0 || stat.value > 0\"><strong>\n" +
5678 " <span class=\"{{stat.name}} bar\" style=\"width:10px\"></span> {{stat.calls}}\n" +
5679 " <span ng-if=\"stat.name!='main'\"><small>{{stat.name}} calls</small></span>\n" +
5680 " <span ng-if=\"stat.name=='main'\">\n" +
5681 " <span class=\"fa fa-question-circle\"\n" +
5682 " data-uib-tooltip=\"Execution time that didnt get assigned to other layers\"></span> Other</span>\n" +
5683 " </strong>\n" +
5684 " </span>\n" +
5920 "\n" +
5685 "\n" +
5921 " <span ng-if=\"rule_ctrlr.rule.field == '__AND__' || rule_ctrlr.rule.field =='__OR__' || rule_ctrlr.rule.field =='__NOT__'\">\n" +
5686 " <div style=\"width: 100%; overflow:hidden\">\n" +
5922 " <p ng-if=\"parent\"><strong>Subrules</strong></p>\n" +
5687 " <div class=\"{{stat.name}} bar\" style=\"width:{{stat.percent}}%; height: 25px\"\n" +
5923 " <div ng-repeat=\"subrule in rule_ctrlr.rule.rules\" class=\"m-l-2\">\n" +
5688 " ng-repeat=\"stat in $ctrl.requestStats\"\n" +
5689 " data-uib-tooltip=\"{{stat.value}}s - Cumulative time spent in this request on all {{ stat.name }} calls\"></div>\n" +
5690 " <div class=\"row\">\n" +
5691 " <div class=\"col-xs-6 text-left\">\n" +
5692 " <small>0s</small>\n" +
5693 " </div>\n" +
5694 " <div class=\"col-xs-6 text-right\">\n" +
5695 " <small>{{$ctrl.report.duration.toFixed(3)}}s</small>\n" +
5696 " </div>\n" +
5697 " </div>\n" +
5698 " </div>\n" +
5699 " </div>\n" +
5700 " </div>\n" +
5701 "\n" +
5702 " <h3>Tags</h3>\n" +
5703 "\n" +
5704 " <table class=\"report-table with-tags\">\n" +
5705 " <tr ng-repeat=\"(tag, value) in $ctrl.report.tags\">\n" +
5706 " <td class=\"table-label\" ng-switch=\"tag\"><!--\n" +
5707 " --><span ng-switch-when=\"user_name\">Username/UID</span><!--\n" +
5708 " --><span ng-switch-when=\"view_name\">View Name</span><!--\n" +
5709 " --><span ng-switch-when=\"server_name\">Server Name</span><!--\n" +
5710 " --><span ng-switch-default>{{ tag }}</span>\n" +
5711 " </td>\n" +
5712 " <td class=\"data\"><a ng-click=\"$ctrl.searchTag(tag, value)\">{{ value }}</td>\n" +
5713 " </tr>\n" +
5714 " </table>\n" +
5924 "\n" +
5715 "\n" +
5925 " <div class=\"panel panel-default\">\n" +
5926 " <div class=\"panel-body form-inline\">\n" +
5927 " <recursive>\n" +
5928 " <rule-read-only rule=\"subrule\" rule-definitions=\"rule_ctrlr.ruleDefinitions\" parent-rule=\"null\" parent-obj=\"rule_ctrlr.parentObj\"></rule-read-only>\n" +
5929 " </recursive>\n" +
5930 " </div>\n" +
5716 " </div>\n" +
5931 " </div>\n" +
5717 " </div>\n" +
5932 " </div>\n" +
5933 "\n" +
5718 "\n" +
5934 " </span>\n" +
5935 "</div>\n"
5936 );
5937
5938
5939 $templateCache.put('directives/rule/rule.html',
5940 "<div class=\"rule form-inline\">\n" +
5941 "\n" +
5719 "\n" +
5942 " <div class=\"form-group\">\n" +
5720 " </div>\n" +
5943 " <select class=\"form-control\"\n" +
5721 " <div class=\"col-lg-8\">\n" +
5944 " ng-model=\"rule_ctrlr.rule.field\"\n" +
5722 " <div class=\"frames\">\n" +
5945 " ng-change=\"rule_ctrlr.fieldChange()\"\n" +
5723 " <p class=\"text-center\">Report history</p>\n" +
5946 " ng-options=\"key as label for (key, label) in rule_ctrlr.ruleDefinitions.possibleFields\"></select>\n" +
5947 " </div>\n" +
5948 "\n" +
5724 "\n" +
5949 " <div ng-if=\"rule_ctrlr.rule.field != '__AND__' && rule_ctrlr.rule.field !='__OR__' && rule_ctrlr.rule.field !='__NOT__'\" class=\"form-group\">\n" +
5725 " <div class=\"panel\" ng-if=\"!$ctrl.is_loading.history\">\n" +
5726 " <div class=\"panel-body\">\n" +
5727 " <c3chart data-domid=\"report_history_chart\" data-data=\"$ctrl.reportHistoryData\" data-config=\"$ctrl.reportHistoryConfig\">\n" +
5728 " </c3chart>\n" +
5729 " </div>\n" +
5730 " </div>\n" +
5950 "\n" +
5731 "\n" +
5951 " <select ng-model=\"rule_ctrlr.rule.op\" class=\"form-control\"\n" +
5732 " <div class=\"row m-b-1\">\n" +
5952 " ng-change=\"rule_ctrlr.setDirty()\"\n" +
5733 " <div class=\"col-sm-2 text-left\">\n" +
5953 " ng-options=\"op as rule_ctrlr.ruleDefinitions.allOps[op] for op in rule_ctrlr.ruleDefinitions.fieldOps[rule_ctrlr.rule.field]\">\n" +
5734 " <a class=\"switch_detail btn btn-sm btn-default {{$ctrl.report.group.previous_report ? '' : 'disabled'}}\"\n" +
5954 " </select>\n" +
5735 " ng-click=\"$ctrl.previousDetail()\">\n" +
5736 " <span class=\"fa fa-arrow-left\"></span>\n" +
5737 " Prev. detail</a>\n" +
5955 "\n" +
5738 "\n" +
5956 " <input type=\"text\" placeholder=\"Value\" ng-model=\"rule_ctrlr.rule.value\" ng-change=\"rule_ctrlr.setDirty()\" class=\"form-control\">\n" +
5739 " </div>\n" +
5740 " <div class=\"col-sm-8 text-center\">\n" +
5741 " <small>\n" +
5742 " <span uib-tooltip=\"{{$ctrl.report.start_time|isoToRelativeTime}}\" class=\"m-r-1\">\n" +
5743 " {{$ctrl.report.start_time.replace('T', ' ')}} UTC</span>\n" +
5744 " <span class=\"text-muted\">ID: {{$ctrl.report.request_id}}</span>\n" +
5745 " </small>\n" +
5746 " </div>\n" +
5747 " <div class=\"col-sm-2 text-right\">\n" +
5748 " <a class=\"switch_detail btn btn-sm btn-default {{$ctrl.report.group.next_report ? '' : 'disabled'}}\"\n" +
5749 " ng-click=\"$ctrl.nextDetail()\">\n" +
5750 " Next detail <span class=\"fa fa-arrow-right\"></span></a>\n" +
5751 " </div>\n" +
5752 " </div>\n" +
5957 "\n" +
5753 "\n" +
5958 " </div>\n" +
5754 " <h3 class=\"word-wrap\">{{$ctrl.report.error}}</h3>\n" +
5959 "\n" +
5755 "\n" +
5960 " <span ng-if=\"rule_ctrlr.rule.field == '__AND__' || rule_ctrlr.rule.field =='__OR__' || rule_ctrlr.rule.field =='__NOT__'\">\n" +
5756 " <div ng-if=\"$ctrl.report.traceback\">\n" +
5961 " <p ng-if=\"parent\"><strong>Subrules</strong></p>\n" +
5962 " <div ng-repeat=\"subrule in rule_ctrlr.rule.rules\" class=\"m-l-2\">\n" +
5963 " <div class=\"panel panel-default\">\n" +
5964 " <div class=\"panel-body form-inline\">\n" +
5965 " <recursive>\n" +
5966 " <rule rule=\"subrule\" rule-definitions=\"rule_ctrlr.ruleDefinitions\" parent-rule=\"rule_ctrlr.rule\" parent-obj=\"rule_ctrlr.parentObj\"></rule>\n" +
5967 " </recursive>\n" +
5968 " </div>\n" +
5969 " </div>\n" +
5970 " </div>\n" +
5971 "\n" +
5757 "\n" +
5972 " <span ng-if=\"(rule_ctrlr.config.disable_subrules == false) == false\" class=\"btn btn-info\" ng-click=\"rule_ctrlr.add()\"><span class=\"fa fa-plus-circle\"></span> Add rule</span>\n" +
5758 " <h3><strong>Traceback</strong></h3>\n" +
5973 "\n" +
5759 "\n" +
5974 " </span>\n" +
5760 " <div class=\"btn-group\">\n" +
5975 " <div class=\"pull-right\" ng-if=\"rule_ctrlr.parentRule\">\n" +
5761 " <a ng-if=\"$ctrl.traceback.length-10 > 0 \" ng-click=\"$ctrl.showLong = !$ctrl.showLong\"\n" +
5976 " <span class=\"dropdown\" data-uib-dropdown>\n" +
5762 " class=\"btn btn-default {{$ctrl.showLong ? 'active' : ''}}\">\n" +
5977 " <a class=\"btn btn-danger\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span></a>\n" +
5763 " <span class=\"fa fa-align-left\"></span>\n" +
5978 " <ul class=\"dropdown-menu\">\n" +
5764 " <small>Show {{$ctrl.traceback.length-10}} remaining frames</small>\n" +
5979 " <li><a>No</a></li>\n" +
5765 " </a>\n" +
5980 " <li><a ng-click=\"rule_ctrlr.deleteRule(rule_ctrlr.parentRule, rule_ctrlr.rule)\">Yes</a></li>\n" +
5981 " </ul>\n" +
5982 " </span>\n" +
5983 " </div>\n" +
5984 "</div>\n"
5985 );
5986
5987
5988 $templateCache.put('templates/admin/applications/applications_list.html',
5989 "<ng-include src=\"'templates/loader.html'\" ng-if=\"applications.loading.applications\"></ng-include>\n" +
5990 "\n" +
5766 "\n" +
5991 "<div class=\"panel panel-default\" ng-if=\"!applications.loading.applications\">\n" +
5767 " <a class=\"btn btn-default {{$ctrl.showRaw ? 'active' : ''}}\" ng-click=\"$ctrl.showRaw = !$ctrl.showRaw\">\n" +
5992 " <div class=\"panel-heading\">\n" +
5768 " <span class=\"fa fa-list\"></span>\n" +
5769 " <small>Raw version</small>\n" +
5770 " </a>\n" +
5771 " </div>\n" +
5993 "\n" +
5772 "\n" +
5994 " Currently active applications: {{applications.applications.length}}\n" +
5773 " <div ng-if=\"$ctrl.showRaw\" class=\"m-t-1\">\n" +
5774 " <pre>{{$ctrl.rawTraceback}}</pre>\n" +
5775 " </div>\n" +
5776 " <div ng-if=\"!$ctrl.showRaw\" class=\"m-t-1\">\n" +
5995 "\n" +
5777 "\n" +
5996 " </div>\n" +
5778 " <div ng-repeat=\"frame in $ctrl.traceback\" class=\"frame {{$odd ? 'odd' : 'even'}}\"\n" +
5779 " ng-if=\"$index >= $ctrl.traceback.length-10 || $ctrl.traceback.length <= 10 || $ctrl.showLong\">\n" +
5780 " <div class=\"frameline\" ng-if=\"frame.line\">\n" +
5781 " <a class=\"inspect_vars\" ng-click=\"frame.showVars = !frame.showVars\" ng-if=\"frame.vars\">\n" +
5782 " <span class=\"fa fa-search dim btn btn-default\"\n" +
5783 " uib-tooltip=\"Show local vars\"> </span>\n" +
5784 " </a>\n" +
5997 "\n" +
5785 "\n" +
5998 " <table st-table=\"displayedCollection\" st-safe-src=\"applications.applications\" class=\"table table-striped\">\n" +
5786 " <span class=\"no-vars\" ng-if=\"frame.vars.length == 0\"></span>\n" +
5999 " <thead>\n" +
6000 " <tr>\n" +
6001 " <th st-sort=\"resource_name\"><a>Application name</a></th>\n" +
6002 " <th st-sort=\"owner_user_name\"><a>Owner User</a></th>\n" +
6003 " <th st-sort=\"owner_group_name\"><a>Owner Group</a></th>\n" +
6004 " <th class=\"options\"></th>\n" +
6005 " </tr>\n" +
6006 " <tr>\n" +
6007 " <th><input st-search=\"resource_name\" placeholder=\"search for application\" class=\"form-control\" type=\"search\" st-delay=\"1\"/></th>\n" +
6008 " <th><input st-search=\"owner_user_name\" placeholder=\"search for user\" class=\"form-control\" type=\"search\" st-delay=\"1\"/></th>\n" +
6009 " <th><input st-search=\"owner_group_name\" placeholder=\"search for group\" class=\"form-control\" type=\"search\" st-delay=\"1\"/></th>\n" +
6010 " <th></th>\n" +
6011 " </tr>\n" +
6012 " </thead>\n" +
6013 " <tbody>\n" +
6014 "\n" +
6015 " <tr ng-repeat=\"resource in displayedCollection track by resource.resource_id\">\n" +
6016 " <td> {{resource.resource_name}}</td>\n" +
6017 " <td>{{resource.owner_user_name}}</td>\n" +
6018 " <td>{{resource.owner_group_name}}</td>\n" +
6019 " <td>\n" +
6020 " <a class=\"btn btn-default btn-sm\" data-ui-sref=\"applications.update({resourceId:resource.resource_id})\" data-toggle=\"tooltip\" title=\"Update application\"><span class=\"fa fa-cog\"></span></a>\n" +
6021 " </td>\n" +
6022 " </tr>\n" +
6023 " <tfoot>\n" +
6024 " <tr>\n" +
6025 " <td colspan=\"4\" class=\"text-center\">\n" +
6026 " <div st-pagination=\"\" st-items-by-page=\"100\" st-displayed-pages=\"7\"></div>\n" +
6027 " </td>\n" +
6028 " </tr>\n" +
6029 " </tfoot>\n" +
6030 " </tbody>\n" +
6031 " </table>\n" +
6032 "\n" +
5787 "\n" +
6033 "</div>\n"
5788 " <span ng-if=\"frame.file\">\n" +
6034 );
5789 " <span class=\"mono\">File</span> <span class=\"file mono\">{{frame.file || 'Unknown file'}}</span>,\n" +
6035
5790 " </span>\n" +
6036
5791 " <span ng-if=\"frame.module && !frame.file\">\n" +
6037 $templateCache.put('templates/admin/configs/edit.html',
5792 " <span class=\"mono\">Module</span> <span class=\"file mono\">{{frame.module || 'Unknown module'}}</span>,\n" +
6038 "<ng-include src=\"'templates/loader.html'\" ng-if=\"configs.loading.config\"></ng-include>\n" +
5793 " </span>\n" +
5794 " <span class=\"mono\">line</span> <span class=\"line mono\">{{frame.line || 'Unknown line'}}</span>\n" +
6039 "\n" +
5795 "\n" +
6040 "<div class=\"panel panel-default\" ng-show=\"!configs.loading.config\">\n" +
5796 " <span ng-if=\"frame.fn\"><span class=\"mono\">in</span> <strong\n" +
6041 " <div class=\"panel-heading\">\n" +
5797 " class=\"fn mono\">{{frame.fn || 'Unknown function'}}</strong></span>\n" +
6042 " <h3 class=\"panel-title\">Basic Configuration</h3>\n" +
6043 " </div>\n" +
6044 " <div class=\"panel-body\">\n" +
6045 " <h2>Visual</h2>\n" +
6046 " <form class=\"form-horizontal\">\n" +
6047 " <div class=\"form-group\">\n" +
6048 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
6049 " Footer HTML\n" +
6050 " </label>\n" +
6051 " <div class=\"col-sm-8 col-lg-9\">\n" +
6052 " <textarea class=\"form-control\" type=\"text\" ng-model=\"configs.configs.global.template_footer_html.value\" style=\"min-height: 150px\"></textarea>\n" +
6053 " </div>\n" +
6054 " </div>\n" +
6055 " </form>\n" +
6056 "\n" +
5798 "\n" +
6057 " <h2>Functional</h2>\n" +
5799 " </div>\n" +
5800 " <div class=\"cline mono\" ng-if=\"frame.cline\">{{frame.cline || 'Unknown context'}}</div>\n" +
6058 "\n" +
5801 "\n" +
6059 " <form class=\"form-horizontal\">\n" +
5802 " <div class=\"vars\" ng-if=\"frame.showVars\">\n" +
6060 " <div class=\"form-group\">\n" +
5803 " <table class=\"var-listing small\">\n" +
6061 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
5804 " <tr ng-repeat=\"fvar in frame.vars track by $index\" class=\"frame {{$odd ? 'odd' : 'even'}}\">\n" +
6062 " Show user groups to non-admin users\n" +
5805 " <td class=\"var-label\">{{ fvar[0] }}</td>\n" +
6063 " </label>\n" +
5806 " <td>\n" +
6064 " <div class=\"col-sm-8 col-lg-9\">\n" +
5807 " <span human-format vars=\"fvar[1]\"></span>\n" +
6065 " <button type=\"button\" class=\"btn btn-default\" ng-model=\"configs.configs.global.list_groups_to_non_admins.value\" uib-btn-checkbox>\n" +
5808 " </td>\n" +
6066 " Enable\n" +
5809 " </tr>\n" +
6067 " </button>\n" +
5810 " </table>\n" +
6068 " </div>\n" +
6069 " </div>\n" +
6070 " </form>\n" +
6071 "\n" +
5811 "\n" +
6072 " <h2>Global Rate Limiting</h2>\n" +
5812 " </div>\n" +
5813 " </div>\n" +
5814 " </div>\n" +
6073 "\n" +
5815 "\n" +
6074 " <form class=\"form-horizontal\">\n" +
6075 " <div class=\"form-group\">\n" +
6076 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
6077 " Ignore reports per minute/per application\n" +
6078 " </label>\n" +
6079 " <div class=\"col-sm-8 col-lg-9\">\n" +
6080 " <input class=\"form-control\" type=\"number\" ng-model=\"configs.configs.global.per_application_reports_rate_limit.value\" />\n" +
6081 " </div>\n" +
6082 " </div>\n" +
6083 "\n" +
5816 "\n" +
6084 " <div class=\"form-group\">\n" +
6085 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
6086 " Ignore logs per minute/per application\n" +
6087 " </label>\n" +
6088 " <div class=\"col-sm-8 col-lg-9\">\n" +
6089 " <input class=\"form-control\" type=\"number\" ng-model=\"configs.configs.global.per_application_logs_rate_limit.value\" />\n" +
6090 " </div>\n" +
5817 " </div>\n" +
6091 " </div>\n" +
6092 "\n" +
5818 "\n" +
6093 " <div class=\"form-group\">\n" +
6094 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
6095 " Ignore metrics per minute/per application\n" +
6096 " </label>\n" +
6097 " <div class=\"col-sm-8 col-lg-9\">\n" +
6098 " <input class=\"form-control\" type=\"number\" ng-model=\"configs.configs.global.per_application_metrics_rate_limit.value\" />\n" +
6099 " </div>\n" +
6100 " </div>\n" +
6101 "\n" +
5819 "\n" +
6102 " </form>\n" +
5820 " <uib-tabset>\n" +
5821 " <uib-tab select=\"$ctrl.selectedTab('slow_calls')\" active=\"$ctrl.tabs.slow_calls\">\n" +
5822 " <uib-tab-heading>\n" +
5823 " Slow Calls\n" +
5824 " </uib-tab-heading>\n" +
6103 "\n" +
5825 "\n" +
6104 " <hr/>\n" +
5826 " <h3><strong>Slow Calls</strong></h3>\n" +
6105 "\n" +
5827 "\n" +
6106 " <a class=\"btn btn-primary\" ng-click=\"configs.save()\">Save configuration</a>\n" +
5828 " <div ng-if=\"$ctrl.report.slow_calls.length > 0\">\n" +
6107 " </div>\n" +
5829 " <div ng-repeat=\"call in $ctrl.report.slow_calls\" ng-include=\"'slow_call.html'\"></div>\n" +
5830 " </div>\n" +
6108 "\n" +
5831 "\n" +
6109 "</div>\n" +
5832 " <div ng-if=\"$ctrl.report.slow_calls.length == 0\">\n" +
5833 " No slow calls reported\n" +
5834 " </div>\n" +
6110 "\n" +
5835 "\n" +
5836 " </uib-tab>\n" +
6111 "\n" +
5837 "\n" +
6112 "<div class=\"panel panel-default\">\n" +
6113 " <div class=\"panel-heading\">\n" +
6114 " <h3 class=\"panel-title\">Plugin Configuration</h3>\n" +
6115 " </div>\n" +
6116 " <div class=\"panel-body\">\n" +
6117 " <plugin-config section=\"'admin.config'\">\n" +
6118 " </plugin-config>\n" +
6119 " </div>\n" +
6120 "</div>\n"
6121 );
6122
6123
6124 $templateCache.put('templates/admin/configs/parent_view.html',
6125 "<div ui-view></div>"
6126 );
6127
6128
6129 $templateCache.put('templates/admin/groups/groups_create.html',
6130 "<ng-include src=\"'templates/loader.html'\" ng-if=\"group.loading.group\"></ng-include>\n" +
6131 "\n" +
5838 "\n" +
6132 "<div ng-show=\"!group.loading.group\">\n" +
5839 " <uib-tab select=\"$ctrl.selectedTab('request_details')\" active=\"$ctrl.tabs.request_details\">\n" +
5840 " <uib-tab-heading>\n" +
5841 " Request details\n" +
5842 " </uib-tab-heading>\n" +
6133 "\n" +
5843 "\n" +
6134 " <div class=\"panel panel-default\">\n" +
5844 " <h3><strong>Extra</strong></h3>\n" +
6135 " <div class=\"panel-body\">\n" +
5845 " <div class=\"var-listing\" human-format vars=\"$ctrl.report.extra\"></div>\n" +
6136 " <form name=\"group.groupForm\" class=\"form-horizontal\" ng-submit=\"group.createGroup()\">\n" +
5846 " <h3><strong>Request details</strong></h3>\n" +
6137 " <div class=\"form-group\" id=\"row-group_name\">\n" +
5847 " <div class=\"var-listing\" human-format vars=\"$ctrl.report.request\"></div>\n" +
6138 " <data-form-errors errors=\"group.groupForm.ae_validation.group_name\"></data-form-errors>\n" +
6139 " <label for=\"group_name\" id=\"label-group_name\" class=\"control-label col-sm-4 col-lg-3\">\n" +
6140 " Group name\n" +
6141 " <span class=\"required\">*</span>\n" +
6142 " </label>\n" +
6143 " <div class=\"col-sm-8 col-lg-9\">\n" +
6144 " <input class=\"form-control\" id=\"group_name\" name=\"group_name\" type=\"text\" ng-model=\"group.group.group_name\">\n" +
6145 " </div>\n" +
6146 " </div>\n" +
6147 "\n" +
5848 "\n" +
6148 " <div class=\"form-group\" id=\"row-description\">\n" +
5849 " </uib-tab>\n" +
6149 " <data-form-errors errors=\"group.groupForm.ae_validation.description\"></data-form-errors>\n" +
6150 " <label for=\"description\" id=\"label-description\" class=\"control-label col-sm-4 col-lg-3\">\n" +
6151 " Description\n" +
6152 " <span class=\"required\">*</span>\n" +
6153 " </label>\n" +
6154 " <div class=\"col-sm-8 col-lg-9\">\n" +
6155 " <input class=\"form-control\" id=\"description\" name=\"description\" type=\"text\" ng-model=\"group.group.description\">\n" +
6156 " </div>\n" +
6157 " </div>\n" +
6158 "\n" +
5850 "\n" +
5851 " <uib-tab select=\"$ctrl.selectedTab('logs')\" active=\"$ctrl.tabs.logs\">\n" +
5852 " <uib-tab-heading>\n" +
5853 " Logs\n" +
5854 " </uib-tab-heading>\n" +
6159 "\n" +
5855 "\n" +
6160 " <div class=\"form-group\" id=\"row-submit\">\n" +
5856 " <div ng-if=\"$ctrl.is_loading.logs!=false\" class=\"text-center\">\n" +
6161 " <label for=\"submit\" id=\"label-submit\" class=\"control-label col-sm-4 col-lg-3\">\n" +
5857 " <span class=\"fa fa-cog fa-spin fa-3x loader\"></span>\n" +
6162 " </label>\n" +
5858 " </div>\n" +
6163 " <div class=\"col-sm-8 col-lg-9\">\n" +
5859 " <p ng-if=\"$ctrl.reportLogs.length == 0\"> No logs found</p>\n" +
6164 " <input class=\"form-control btn btn-primary\" id=\"submit\" name=\"submit\" type=\"submit\" value=\"{{$state.params.groupId ? 'Update' : 'Add'}} Group\">\n" +
6165 " </div>\n" +
6166 " </div>\n" +
6167 " </form>\n" +
6168 " </div>\n" +
6169 " </div>\n" +
6170 "\n" +
5860 "\n" +
5861 " <table class=\"table table-striped log-list\" ng-if=\"$ctrl.reportLogs.length > 0\">\n" +
6171 "\n" +
5862 "\n" +
6172 " <div class=\"panel panel-default\" ng-if=\"group.group.id\">\n" +
5863 " <caption>Logs</caption>\n" +
6173 " <div class=\"panel-heading\">\n" +
5864 " <thead>\n" +
6174 " <h3 class=\"panel-title\">Permissions summary</h3>\n" +
5865 " <tr>\n" +
6175 " </div>\n" +
5866 " <th class=\"message\">Message</th>\n" +
6176 " <div class=\"panel-body\">\n" +
5867 " <th class=\"when\">When</th>\n" +
6177 " <h3>Direct application permissions</h3>\n" +
5868 " </tr>\n" +
5869 " </thead>\n" +
5870 " <tbody>\n" +
5871 " <tr ng-repeat=\"log in $ctrl.reportLogs track by log.log_id\">\n" +
5872 " <td>\n" +
5873 " <a class=\"tag {{log.log_level|lowercase}}\">\n" +
5874 " <span class=\"name\">level:</span> {{log.log_level}}</a>\n" +
5875 " <a class=\"tag\">\n" +
5876 " <span class=\"name\">namespace:</span> {{log.namespace}}</a>\n" +
5877 " <a ng-repeat=\"(tag, value) in log.tags\" class=\"tag\">\n" +
5878 " <span class=\"name\">{{tag}}:</span> {{value}}</a>\n" +
5879 " <div class=\"log\">\n" +
5880 " {{log.message}}\n" +
5881 " </div>\n" +
5882 " </td>\n" +
5883 " <td class=\"when\">\n" +
5884 " <a data-uib-tooltip=\"{{log.timestamp}}\">\n" +
5885 " <iso-to-relative-time time=\"{{log.timestamp}}\"/>\n" +
5886 " </a>\n" +
5887 " </td>\n" +
5888 " </tr>\n" +
6178 "\n" +
5889 "\n" +
6179 " <ul class=\"list-group\">\n" +
5890 " </tbody>\n" +
6180 " <li ng-repeat=\"perm in group.resourcePermissions.group.application\" class=\"animate-repeat list-group-item\">\n" +
5891 " </table>\n" +
6181 " <strong>{{ perm.self.resource_name }}</strong>\n" +
6182 "\n" +
5892 "\n" +
6183 " <div class=\"pull-right\">\n" +
5893 " </uib-tab>\n" +
6184 "\n" +
5894 "\n" +
6185 " <span class=\"btn btn-primary btn-xs m-r-1\" disabled ng-repeat=\"perm_name in perm.permissions\">{{ perm.self.owner ? 'Resource owner' : perm_name }}</span>\n" +
6186 "\n" +
5895 "\n" +
6187 " <a class=\"btn btn-default btn-xs\" data-uib-tooltip=\"Visit Application\" data-ui-sref=\"applications.update({resourceId:perm.self.resource_id})\">\n" +
5896 " <uib-tab select=\"$ctrl.selectedTab('comments')\" active=\"$ctrl.tabs.comments\">\n" +
6188 " <span class=\"fa fa-cog\"></span>\n" +
5897 " <uib-tab-heading>\n" +
6189 " </a>\n" +
5898 " Comments\n" +
6190 " </div>\n" +
5899 " <span class=\"label label-info\">{{$ctrl.report.comments.length}}</span>\n" +
6191 " </li>\n" +
6192 " </ul>\n" +
6193 "\n" +
5900 "\n" +
6194 " <h3>Direct dashboard permissions</h3>\n" +
5901 " </uib-tab-heading>\n" +
6195 "\n" +
5902 "\n" +
6196 " <ul class=\"list-group\">\n" +
5903 " <h3><strong>Comments</strong></h3>\n" +
6197 " <li ng-repeat=\"perm in group.resourcePermissions.group.dashboard\" class=\"animate-repeat list-group-item\">\n" +
6198 " <strong>{{ perm.self.resource_name }}</strong>\n" +
6199 "\n" +
5904 "\n" +
6200 " <div class=\"pull-right\">\n" +
5905 " <p ng-if=\"$ctrl.report.comments.length == 0\">No comments yet - be first to add one!</p>\n" +
6201 " <span class=\"btn btn-primary btn-xs m-r-1\" disabled ng-repeat=\"perm_name in perm.permissions\">{{ perm.self.owner ? 'Resource owner' : perm_name }}</span>\n" +
6202 "\n" +
5906 "\n" +
6203 " <a class=\"btn btn-default btn-xs\" data-uib-tooltip=\"Visit Dashboard\" data-ui-sref=\"dashboard.update({resourceId:perm.self.resource_id})\">\n" +
5907 " <div class=\"comment\" ng-repeat=\"comment in $ctrl.report.comments\">\n" +
6204 " <span class=\"fa fa-cog\"></span>\n" +
5908 " <p name=\"comment-{{comment.comment_id}}\"><span class=\"fa fa-comment\"></span>\n" +
6205 " </a>\n" +
5909 " <strong>{{comment.user_name}}</strong>\n" +
6206 " </div>\n" +
5910 " <iso-to-relative-time time=\"{{comment.created_timestamp}}\"/>\n" +
6207 " </li>\n" +
5911 " </p>\n" +
6208 " </ul>\n" +
5912 " <p class=\"well\">{{comment.body}}</p>\n" +
5913 " </div>\n" +
6209 "\n" +
5914 "\n" +
6210 " </div>\n" +
5915 " <form name=\"commentForm\" ng-submit=\"$ctrl.addComment()\">\n" +
5916 " <div class=\"form-group\">\n" +
5917 " <textarea type=\"text\" class=\"form-control\" id=\"$ctrl.commentForm\" ng-model=\"$ctrl.comment\" required\n" +
5918 " mentio mentio-search=\"$ctrl.searchMentionedPeople(term)\" mentio-items=\"$ctrl.mentionedPeople| filter:label:typedTerm\" class=\"form-control\"></textarea>\n" +
6211 "\n" +
5919 "\n" +
6212 " </div>\n" +
5920 " </div>\n" +
5921 " <div class=\"form-group\">\n" +
5922 " <button class=\"btn btn-info\" ng-disabled=\"$ctrl.commentForm.$invalid\">Comment</button>\n" +
5923 " </div>\n" +
5924 " </form>\n" +
5925 "\n" +
5926 " <div ng-repeat=\"comment in $ctrl.report.comments\" class=\"{{$odd ? 'odd' : 'even'}}\" class=\"repeat-animate\">\n" +
5927 " </div>\n" +
6213 "\n" +
5928 "\n" +
5929 " </uib-tab>\n" +
5930 "\n" +
5931 " <uib-tab select=\"$ctrl.selectedTab('affected_users')\" active=\"$ctrl.tabs.affected_users\">\n" +
5932 " <uib-tab-heading>\n" +
5933 " Affected users\n" +
5934 " <span class=\"label label-warning\">{{$ctrl.report.affected_users_count}}</span>\n" +
5935 "\n" +
5936 " </uib-tab-heading>\n" +
5937 "\n" +
5938 " <h3><strong>50 most affected users ID's by this issue:</strong></h3>\n" +
5939 " <ul class=\"affected-user-list\">\n" +
5940 " <li ng-repeat=\"user in $ctrl.report.top_affected_users\">\n" +
5941 " <strong>{{user.username}}</strong> <span class=\"badge\" uib-tooltip=\"occurences\">{{user.count}}</span>\n" +
5942 " </li>\n" +
5943 " </ul>\n" +
5944 "\n" +
5945 " </uib-tab>\n" +
5946 "\n" +
5947 " </uib-tabset>\n" +
5948 "\n" +
5949 "\n" +
5950 " </div>\n" +
6214 "\n" +
5951 "\n" +
6215 " <div class=\"panel panel-default\" ng-if=\"group.group.id\">\n" +
6216 " <div class=\"panel-heading\">\n" +
6217 " <h3 class=\"panel-title\">User list</h3>\n" +
6218 " </div>\n" +
5952 " </div>\n" +
6219 " <div class=\"panel-body\">\n" +
5953 " </div>\n" +
5954 "</div>\n"
5955 );
5956
5957
5958 $templateCache.put('components/views/reports-browser-view/reports-browser-view.html',
5959 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.is_loading\"></ng-include>\n" +
6220 "\n" +
5960 "\n" +
6221 " <form name=\"add_permission\" class=\"form-inline\" ng-submit=\"group.addUser()\">\n" +
5961 "<div ng-if=\"$ctrl.is_loading === false\">\n" +
6222 " <div class=\"form-group\">\n" +
5962 "\n" +
6223 " <input placeholder=\"Username or email\" type=\"text\" class=\"autocomplete form-control\" ng-model=\"group.form.autocompleteUser\" uib-typeahead=\"u for u in group.searchUsers($viewValue) | limitTo:8\" typeahead-loading=\"searchingUsers\" typeahead-wait-ms=\"250\"/>\n" +
5963 " <p class=\"search-params\">\n" +
6224 " </div>\n" +
5964 " <strong>Search params:</strong>\n" +
6225 " <div class=\"form-group\">\n" +
5965 " <span ng-repeat=\"tag in $ctrl.searchParams.tags\" class=\"tag\">\n" +
6226 " <button class=\"btn btn-info\" ng-disabled=\"!group.form.autocompleteUser\"><span class=\"fa fa-user\"></span> Add user</button>\n" +
5966 " <strong>{{tag.type}}</strong>\n" +
6227 " </div>\n" +
5967 " {{ tag.type == 'resource' ? $ctrl.applications[tag.value].resource_name : tag.value }}\n" +
6228 " </form>\n" +
5968 "\n" +
5969 " <a ng-click=\"$ctrl.removeSearchTag(tag)\"><span class=\"fa fa-times\"></span></a>\n" +
5970 " </span>\n" +
5971 " </p>\n" +
6229 "\n" +
5972 "\n" +
5973 " <form class=\"form\">\n" +
5974 " <div class=\"typeahead-tags\">\n" +
5975 " <input type=\"text\" id=\"typeAhead\" ng-model=\"$ctrl.filterTypeAhead\" placeholder=\"Start typing to filter reports - filter by tags, exception, priority or other properties.\"\n" +
5976 " ng-keydown=\"$ctrl.typeAheadTag($event)\"\n" +
5977 " uib-typeahead=\"tag as tag.text for tag in $ctrl.filterTypeAheadOptions | filter:$viewValue:aheadFilter\"\n" +
5978 " typeahead-min-length=\"1\" class=\"form-control\"\n" +
5979 " typeahead-template-url=\"templates/directives/search_type_ahead.html\">\n" +
6230 " </div>\n" +
5980 " </div>\n" +
5981 " </form>\n" +
5982 "\n" +
5983 "\n" +
5984 " <div class=\"well position-absolute increse-zindex\" ng-show=\"$ctrl.showDatePicker\" ng-model=\"$ctrl.pickerDate\" ng-change=\"$ctrl.pickerDateChanged()\"\n" +
5985 " class=\"animate-show\">\n" +
5986 " <uib-datepicker></uib-datepicker>\n" +
5987 " </div>\n" +
5988 "\n" +
5989 " </p>\n" +
5990 "\n" +
5991 "\n" +
5992 " <div class=\"text-center\">\n" +
5993 " <uib-pagination total-items=\"$ctrl.itemCount\" items-per-page=\"$ctrl.itemsPerPage\" ng-model=\"$ctrl.page\" max-size=\"10\"\n" +
5994 " class=\"pagination pagination-sm\" boundary-links=\"true\" direction-links=\"false\"\n" +
5995 " ng-change=\"$ctrl.paginationChange()\"\n" +
5996 " ng-show=\"!$ctrl.is_loading\"></uib-pagination>\n" +
5997 " </div>\n" +
5998 "\n" +
5999 " <div class=\"panel panel-default\">\n" +
6000 " <!-- Default panel contents -->\n" +
6231 "\n" +
6001 "\n" +
6232 " <table st-table=\"displayedCollection\" st-safe-src=\"group.users\" class=\"table table-striped\">\n" +
6002 " <table class=\"table table-striped report-list\" ng-show=\"!$ctrl.is_loading\">\n" +
6003 " <caption>Reports</caption>\n" +
6233 " <thead>\n" +
6004 " <thead>\n" +
6234 " <tr>\n" +
6005 " <tr>\n" +
6235 " <th st-sort=\"user_name\"><a>Username</a></th>\n" +
6006 " <th class=\"c1 ordering occurences\">#</th>\n" +
6236 " <th st-sort=\"email\"><a>Email</a></th>\n" +
6007 " <th class=\"c2 application\">Application</th>\n" +
6237 " <th st-sort=\"status\"><a>Status</a></th>\n" +
6008 " <th class=\"c4 when\">When <input type=\"checkbox\" ng-model=\"$ctrl.notRelativeTime\"\n" +
6238 " <th st-sort=\"first_name\"><a>First Name</a></th>\n" +
6009 " ng-change=\"$ctrl.changeRelativeTime()\"\n" +
6239 " <th st-sort=\"last_name\"><a>Last Name</a></th>\n" +
6010 " title=\"Tick to see UTC time instead relative\"></th>\n" +
6240 " <th st-sort=\"last_login_date\"><a>Last login</a></th>\n" +
6011 " <th class=\"c5 error_type\">Error</th>\n" +
6241 " <th class=\"options\" style=\"width: 130px\"></th>\n" +
6242 " </tr>\n" +
6243 " <tr>\n" +
6244 " <th><input st-search=\"user_name\" placeholder=\"search for user name\" class=\"form-control\" type=\"search\" st-delay=\"1\"/></th>\n" +
6245 " <th><input st-search=\"email\" placeholder=\"search for email\" class=\"form-control\" type=\"search\" st-delay=\"1\"/></th>\n" +
6246 " <th></th>\n" +
6247 " <th><input st-search=\"first_name\" placeholder=\"search for first name\" class=\"form-control\" type=\"search\" st-delay=\"1\"/></th>\n" +
6248 " <th><input st-search=\"last_name\" placeholder=\"search for last name\" class=\"form-control\" type=\"search\" st-delay=\"1\"/></th>\n" +
6249 " <th><input st-search=\"last_login_date\" placeholder=\"search for last name\" class=\"form-control\" type=\"search\" st-delay=\"1\"/></th>\n" +
6250 " <th></th>\n" +
6251 " </tr>\n" +
6012 " </tr>\n" +
6252 " </thead>\n" +
6013 " </thead>\n" +
6253 " <tbody>\n" +
6014 " <tbody>\n" +
6254 "\n" +
6015 " <tr ng-repeat=\"report in $ctrl.reportsPage track by report.id\">\n" +
6255 " <tr ng-repeat=\"user in displayedCollection\">\n" +
6016 " <td class=\"c1 occurences\">\n" +
6256 " <td><img src=\"{{user.gravatar_url}}\" class=\"avatar\"> {{user.user_name}}</td>\n" +
6017 " <span class=\"priority-{{report.group.priority}}\" data-uib-tooltip=\"Report priority\">{{report.group.priority}}</span>\n" +
6257 " <td>{{user.email}}</td>\n" +
6018 " <span class=\"count {{report.presentation.className}}\" data-uib-tooltip=\"{{report.presentation.tooltip}}\">\n" +
6258 " <td class=\"text-center\"><span class=\"fa\" ng-class=\"{'fa-check-circle':user.status, 'fa-times':!user.status}\"></span></td>\n" +
6019 " {{report.group.occurences|numberToThousands}}\n" +
6259 " <td>{{user.first_name}}</td>\n" +
6020 " </span>\n" +
6260 " <td>{{user.last_name}}</td>\n" +
6021 " </td>\n" +
6261 " <td><span data-uib-tooltip=\"{{user.last_login_date}}\">{{user.last_login_date | isoToRelativeTime}}</span></td>\n" +
6022 " <td class=\"c2 application\">\n" +
6262 " <td>\n" +
6023 " <div class=\"app_name\">{{report.resource_name}}</div>\n" +
6263 " <a class=\"btn btn-default btn-sm\" data-ui-sref=\"admin.user.update({userId:user.id})\"><span class=\"fa fa-cog\"></span></a>\n" +
6024 " <span class=\"server\">@{{report.tags.server_name}}</span></td>\n" +
6264 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
6025 " <td class=\"c3 when\">\n" +
6265 " <a class=\"btn btn-danger btn-sm\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span></a>\n" +
6026 " <span ng-show=\"!$ctrl.notRelativeTime\"><span data-uib-tooltip=\"{{report.group.last_timestamp}}\"><iso-to-relative-time\n" +
6266 " <ul class=\"dropdown-menu\">\n" +
6027 " time=\"{{report.group.last_timestamp}}\"/></span>\n" +
6267 " <li><a>No</a></li>\n" +
6028 " </span>\n" +
6268 " <li><a ng-click=\"group.removeUser(user)\">Yes</a></li>\n" +
6029 " <span ng-show=\"$ctrl.notRelativeTime\">{{report.group.last_timestamp.replace('T', ' ').slice(0,16)}}</span>\n" +
6269 " </ul>\n" +
6270 " </span>\n" +
6271 " </tr>\n" +
6272 " <tfoot>\n" +
6273 " <tr>\n" +
6274 " <td colspan=\"7\" class=\"text-center\">\n" +
6275 " <div st-pagination=\"\" st-items-by-page=\"50\" st-displayed-pages=\"7\"></div>\n" +
6276 " </td>\n" +
6030 " </td>\n" +
6031 " <td class=\"c4 report ellipsis\"><a ui-sref=\"report.view_detail({groupId:report.group.id, reportId:report.id})\" title=\"{{report.error}}\">{{report.error || 'Unknown Exception'}}</a> <br/>\n" +
6032 " <span class=\"url\">{{ report.tags.view_name || report.url_path}}</td>\n" +
6277 " </tr>\n" +
6033 " </tr>\n" +
6278 " </tfoot>\n" +
6034 "\n" +
6279 " </tbody>\n" +
6035 " </tbody>\n" +
6280 " </table>\n" +
6036 " </table>\n" +
6281 "\n" +
6282 " </div>\n" +
6037 " </div>\n" +
6283 "\n" +
6038 "\n" +
6284 "\n" +
6039 "\n" +
6040 " <div class=\"text-center\">\n" +
6041 " <uib-pagination total-items=\"$ctrl.itemCount\" items-per-page=\"$ctrl.itemsPerPage\" ng-model=\"$ctrl.page\" max-size=\"10\"\n" +
6042 " class=\"pagination pagination-sm\" boundary-links=\"true\" direction-links=\"false\"\n" +
6043 " ng-change=\"$ctrl.paginationChange()\"\n" +
6044 " ng-show=\"!$ctrl.is_loading\"></uib-pagination>\n" +
6045 " </div>\n" +
6046 "\n" +
6285 "</div>\n"
6047 "</div>\n"
6286 );
6048 );
6287
6049
6288
6050
6289 $templateCache.put('templates/admin/groups/groups_list.html',
6051 $templateCache.put('components/views/reports-slow-browser-view/reports-slow-browser-view.html',
6290 "<ng-include src=\"'templates/loader.html'\" ng-if=\"groups.loading.groups\"></ng-include>\n" +
6052 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.is_loading\"></ng-include>\n" +
6291 "\n" +
6292 "<div class=\"panel panel-default\" ng-show=\"!groups.loading.groups\">\n" +
6293 "\n" +
6053 "\n" +
6294 " <table st-table=\"displayedCollection\" st-safe-src=\"groups.groups\" class=\"table table-striped\">\n" +
6054 "<div ng-if=\"$ctrl.is_loading === false\">\n" +
6295 " <thead>\n" +
6296 " <tr>\n" +
6297 " <th st-sort=\"group_name\"><a>Group name</a></th>\n" +
6298 " <th st-sort=\"description\"><a>Description</a></th>\n" +
6299 " <th st-sort=\"members\"><a>Member count</a></th>\n" +
6300 " <th class=\"options\"></th>\n" +
6301 " </tr>\n" +
6302 " <tr>\n" +
6303 " <th><input st-search=\"group_name\" placeholder=\"search for group name\" class=\"form-control\" type=\"search\" st-delay=\"1\"/></th>\n" +
6304 " <th><input st-search=\"description\" placeholder=\"search for description\" class=\"form-control\" type=\"search\" st-delay=\"1\"/></th>\n" +
6305 " <th></th>\n" +
6306 " <th></th>\n" +
6307 " </tr>\n" +
6308 " </thead>\n" +
6309 " <tbody>\n" +
6310 "\n" +
6055 "\n" +
6311 " <tr ng-repeat=\"group in displayedCollection track by group.id\">\n" +
6056 " <p class=\"search-params\">\n" +
6312 " <td>{{group.group_name}}</td>\n" +
6057 " <strong>Search params:</strong>\n" +
6313 " <td>{{group.description}}</td>\n" +
6058 " <span ng-repeat=\"tag in $ctrl.searchParams.tags\" class=\"tag\">\n" +
6314 " <td>{{group.member_count}}</td>\n" +
6059 " <strong>{{tag.type}}</strong>\n" +
6315 " <td>\n" +
6060 " {{ tag.type == 'resource' ? $ctrl.applications[tag.value].resource_name : tag.value }}\n" +
6316 " <a class=\"btn btn-default btn-sm\" data-ui-sref=\"admin.group.update({groupId:group.id})\"><span class=\"fa fa-cog\"></span></a>\n" +
6317 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
6318 " <a class=\"btn btn-danger btn-sm\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span></a>\n" +
6319 " <ul class=\"dropdown-menu\">\n" +
6320 " <li><a>No</a></li>\n" +
6321 " <li><a ng-click=\"groups.removeGroup(group)\">Yes</a></li>\n" +
6322 " </ul>\n" +
6323 " </span>\n" +
6324 " </tr>\n" +
6325 " <tfoot>\n" +
6326 " <tr>\n" +
6327 " <td colspan=\"4\" class=\"text-center\">\n" +
6328 " <div st-pagination=\"\" st-items-by-page=\"100\" st-displayed-pages=\"7\"></div>\n" +
6329 " </td>\n" +
6330 " </tr>\n" +
6331 " </tfoot>\n" +
6332 " </tbody>\n" +
6333 " </table>\n" +
6334 "\n" +
6061 "\n" +
6335 "</div>\n" +
6062 " <a ng-click=\"$ctrl.removeSearchTag(tag)\"><span class=\"fa fa-times\"></span></a>\n" +
6336 "\n"
6063 " </span>\n" +
6337 );
6064 " </p>\n" +
6338
6339
6340 $templateCache.put('templates/admin/groups/parent_view.html',
6341 "<div ui-view></div>"
6342 );
6343
6344
6345 $templateCache.put('templates/admin/parent_view.html',
6346 "<div class=\"col-sm-3\" id=\"menu\">\n" +
6347 " <div class=\"panel panel-default\">\n" +
6348 " <div class=\"panel-heading\">Users and groups</div>\n" +
6349 " <ul class=\"list-group\">\n" +
6350 " <li class=\"list-group-item\" ui-sref-active=\"active\"><a data-ui-sref=\"admin.user.list\"> Users</a></li>\n" +
6351 " <li class=\"list-group-item\" ui-sref-active=\"active\"><a data-ui-sref=\"admin.user.create\"> Create user</a></li>\n" +
6352 " <li class=\"list-group-item\" ui-sref-active=\"active\"><a data-ui-sref=\"admin.group.list\"> Groups</a></li>\n" +
6353 " <li class=\"list-group-item\" ui-sref-active=\"active\"><a data-ui-sref=\"admin.group.create\"> Create group</a></li>\n" +
6354 " </ul>\n" +
6355 " </div>\n" +
6356 " <div class=\"panel panel-default\">\n" +
6357 " <div class=\"panel-heading\">Resources</div>\n" +
6358 " <ul class=\"list-group\">\n" +
6359 " <li class=\"list-group-item\" ui-sref-active=\"active\"><a data-ui-sref=\"admin.application.list\"> List applications</a></li>\n" +
6360 " </ul>\n" +
6361 " </div>\n" +
6362 "\n" +
6065 "\n" +
6363 " <div class=\"panel panel-default\">\n" +
6066 " <p>\n" +
6364 " <div class=\"panel-heading\">System</div>\n" +
6365 " <ul class=\"list-group\">\n" +
6366 " <li class=\"list-group-item\" ui-sref-active=\"active\"><a data-ui-sref=\"admin.configs.list\"> Config variables</a></li>\n" +
6367 " <li class=\"list-group-item\" ui-sref-active=\"active\"><a data-ui-sref=\"admin.system\"> System</a></li>\n" +
6368 " <li class=\"list-group-item\" ui-sref-active=\"active\"><a data-ui-sref=\"admin.partitions\"> Partition Management</a></li>\n" +
6369 " </ul>\n" +
6370 " </div>\n" +
6371 "</div>\n" +
6372 "\n" +
6067 "\n" +
6068 " <form class=\"form\">\n" +
6069 " <div class=\"typeahead-tags\">\n" +
6070 " <input type=\"text\" id=\"typeAhead\" ng-model=\"$ctrl.filterTypeAhead\" placeholder=\"Start typing to filter slowness reports - filter by tags, average response time, priority or other properties.\"\n" +
6071 " ng-keydown=\"$ctrl.typeAheadTag($event)\"\n" +
6072 " uib-typeahead=\"tag as tag.text for tag in $ctrl.filterTypeAheadOptions | filter:$viewValue:aheadFilter\"\n" +
6073 " typeahead-min-length=\"1\" class=\"form-control\"\n" +
6074 " typeahead-template-url=\"templates/directives/search_type_ahead.html\">\n" +
6075 " </div>\n" +
6076 " </form>\n" +
6373 "\n" +
6077 "\n" +
6374 "<div class=\"col-sm-9\" ui-view></div>\n"
6375 );
6376
6377
6378 $templateCache.put('templates/admin/partitions.html',
6379 "<ng-include src=\"'templates/loader.html'\" ng-if=\"partitions.loading.partitions\"></ng-include>\n" +
6380 "\n" +
6078 "\n" +
6381 "<div ng-show=\"!partitions.loading.partitions\">\n" +
6079 " <div class=\"well position-absolute increse-zindex\" ng-show=\"$ctrl.showDatePicker\" ng-model=\"$ctrl.pickerDate\" ng-change=\"$ctrl.pickerDateChanged()\"\n" +
6080 " class=\"animate-show\">\n" +
6081 " <uib-datepicker></uib-datepicker>\n" +
6082 " </div>\n" +
6382 "\n" +
6083 "\n" +
6383 " <div class=\"panel panel-default\">\n" +
6084 " </p>\n" +
6384 " <div class=\"panel-heading\">\n" +
6385 " DELETE Daily Partitions\n" +
6386 " </div>\n" +
6387 "\n" +
6085 "\n" +
6388 " <form name=\"partitions.dailyPartitionsForm\"\n" +
6389 " novalidate ng-submit=\"partitions.partitionsDelete('dailyPartitions')\"\n" +
6390 " class=\"form-inline\"\n" +
6391 " ng-class=\"{'has-error':partitions.dailyPartitionsForm.$invalid}\">\n" +
6392 "\n" +
6086 "\n" +
6393 " <div class=\"panel-body\">\n" +
6087 " <div class=\"text-center\">\n" +
6088 " <uib-pagination total-items=\"$ctrl.itemCount\" items-per-page=\"$ctrl.itemsPerPage\" ng-model=\"$ctrl.page\" max-size=\"10\"\n" +
6089 " class=\"pagination pagination-sm\" boundary-links=\"true\" direction-links=\"false\"\n" +
6090 " ng-change=\"$ctrl.paginationChange()\"\n" +
6091 " ng-show=\"!$ctrl.is_loading\"></uib-pagination>\n" +
6092 " </div>\n" +
6394 "\n" +
6093 "\n" +
6395 " <input type=\"text\" name=\"confirm\"\n" +
6396 " placeholder=\"Enter CONFIRM to proceed\" class=\"form-control input-autosize\" confirm-validate required ng-model=\"partitions.dailyConfirm\">\n" +
6397 " <input type=\"submit\" class=\"btn btn-danger\" ng-disabled=\"partitions.dailyPartitionsForm.$invalid\">\n" +
6398 " <input type=\"checkbox\" ng-model=\"partitions.dailyChecked\" ng-change=\"partitions.setCheckedList('dailyPartitions')\"> Check All\n" +
6399 "\n" +
6094 "\n" +
6400 " </div>\n" +
6095 " <div class=\"panel panel-default\">\n" +
6096 " <!-- Default panel contents -->\n" +
6401 "\n" +
6097 "\n" +
6402 " <table class=\"table table-striped\">\n" +
6098 " <table class=\"table table-striped report-list\" ng-show=\"!$ctrl.is_loading\">\n" +
6403 " <tr>\n" +
6099 " <caption>Slow Request Reports</caption>\n" +
6404 " <th class=\"c1 date\">Date</th>\n" +
6100 " <thead>\n" +
6405 " <th class=\"c2 indices\">Indices</th>\n" +
6101 " <tr>\n" +
6406 " </tr>\n" +
6102 " <td class=\"c1 ordering occurences\">#</td>\n" +
6407 " <tr class=\"r{{$index}}\" ng-repeat=\"row in partitions.dailyPartitions\">\n" +
6103 " <td class=\"c2 average_duration\">Avg. duration</td>\n" +
6408 " <td class=\"c1\">{{row[0]}}</td>\n" +
6104 " <td class=\"c3 application\">Application</td>\n" +
6409 " <td class=\"c2\">\n" +
6105 " <td class=\"c5 when\">When <input type=\"checkbox\" ng-model=\"$ctrl.notRelativeTime\"\n" +
6410 " <ul class=\"list-group\">\n" +
6106 " ng-change=\"$ctrl.changeRelativeTime()\"\n" +
6411 " <li class=\"list-group-item\" ng-repeat=\"partition in row[1].elasticsearch\">\n" +
6107 " title=\"Tick to see UTC time instead relative\"></td>\n" +
6412 " <input name=\"es_index\" type=\"checkbox\" ng-model=\"partition.checked\"> ES: {{partition.name}}\n" +
6108 " <td class=\"c6 error_type\">Location</td>\n" +
6413 " </li>\n" +
6109 " </tr>\n" +
6414 " <li class=\"list-group-item\" ng-repeat=\"partition in row[1].pg\">\n" +
6110 " </thead>\n" +
6415 " <input name=\"pg_index\" type=\"checkbox\" ng-model=\"partition.checked\"> PG: {{partition.name}}\n" +
6111 " <tbody>\n" +
6416 " </li>\n" +
6112 " <tr ng-repeat=\"report in $ctrl.reportsPage track by report.id\">\n" +
6417 " </ul>\n" +
6113 " <td class=\"c1 occurences\">\n" +
6418 " </td>\n" +
6114 " <span class=\"priority-{{report.group.priority}}\" data-uib-tooltip=\"Report priority\">{{report.group.priority}}</span>\n" +
6419 " </tr>\n" +
6115 " <span class=\"count {{report.presentation.className}}\" data-uib-tooltip=\"{{report.presentation.tooltip}}\">\n" +
6420 " </table>\n" +
6116 " {{report.group.occurences|numberToThousands}}\n" +
6421 " </form>\n" +
6117 " </span>\n" +
6118 " </td>\n" +
6119 " <td class=\"c2 average_duration\">{{report.group.average_duration.toFixed(3)}}s</td>\n" +
6120 " <td class=\"c3 application\">\n" +
6121 " <div class=\"app_name\">{{report.resource_name}}</div>\n" +
6122 " <span class=\"server\">@{{report.tags.server_name}}</span></td>\n" +
6123 " <td class=\"c4 when\">\n" +
6124 " <span ng-show=\"!$ctrl.notRelativeTime\"><span data-uib-tooltip=\"{{report.group.last_timestamp}}\"><iso-to-relative-time\n" +
6125 " time=\"{{report.group.last_timestamp}}\"/></span>\n" +
6126 " </span>\n" +
6127 " <span ng-show=\"$ctrl.notRelativeTime\">{{report.group.last_timestamp.replace('T', ' ').slice(0,16)}}</span>\n" +
6128 " </td>\n" +
6129 " <td class=\"c5 report ellipsis\">\n" +
6130 " <a ui-sref=\"report.view_detail({groupId:report.group.id, reportId:report.id})\">{{ report.tags.view_name || report.url_path}} </span></a></td>\n" +
6131 " </td>\n" +
6132 " </tr>\n" +
6133 "\n" +
6134 " </tbody>\n" +
6135 " </table>\n" +
6422 "\n" +
6136 "\n" +
6423 " </div>\n" +
6137 " </div>\n" +
6424 "\n" +
6138 "\n" +
6425 " <div class=\"panel panel-default\">\n" +
6139 " <div class=\"text-center\">\n" +
6426 " <div class=\"panel-heading\">\n" +
6140 " <uib-pagination total-items=\"$ctrl.itemCount\" items-per-page=\"$ctrl.itemsPerPage\" ng-model=\"$ctrl.page\" max-size=\"10\"\n" +
6427 " DELETE Permanent Partitions\n" +
6141 " class=\"pagination pagination-sm\" boundary-links=\"true\" direction-links=\"false\"\n" +
6142 " ng-change=\"$ctrl.paginationChange()\"\n" +
6143 " ng-show=\"!$ctrl.is_loading\"></uib-pagination>\n" +
6144 " </div>\n" +
6145 "\n" +
6146 "</div>\n"
6147 );
6148
6149
6150 $templateCache.put('components/views/settings-view/settings-view.html',
6151 "<div class=\"row\">\n" +
6152 " <div class=\"col-sm-3\" id=\"menu\">\n" +
6153 " <div class=\"panel panel-default\">\n" +
6154 " <div class=\"panel-heading\">Applications</div>\n" +
6155 " <ul class=\"list-group\">\n" +
6156 " <li class=\"list-group-item\" ui-sref-active-eq=\"active\"><a data-ui-sref=\"applications.list\"><span class=\"fa fa-cog\"></span> List applications</a></li>\n" +
6157 " <li class=\"list-group-item\" ui-sref-active-eq=\"active\"><a data-ui-sref=\"applications.update({resourceId:'new'})\"><span class=\"fa fa-plus-circle\"></span> Create application</a></li>\n" +
6158 " <li class=\"list-group-item\" ui-sref-active-eq=\"active\"><a data-ui-sref=\"applications.purge_logs\"><span class=\"fa fa-trash-o\"></span> Purge logs</a></li>\n" +
6159 " </ul>\n" +
6428 " </div>\n" +
6160 " </div>\n" +
6429 "\n" +
6161 "\n" +
6430 " <form name=\"partitions.permanentPartitionsForm\" novalidate\n" +
6431 " ng-submit=\"partitions.partitionsDelete('permanentPartitions')\"\n" +
6432 " class=\"form-inline\"\n" +
6433 " ng-class=\"{'has-error':partitions.permanentPartitionsForm.$invalid}\">\n" +
6434 "\n" +
6162 "\n" +
6163 " <div class=\"panel panel-default\">\n" +
6164 " <div class=\"panel-heading\">Settings</div>\n" +
6165 " <ul class=\"list-group\">\n" +
6166 " <li class=\"list-group-item\" ui-sref-active-eq=\"active\"><a data-ui-sref=\"user.profile.edit\"><span class=\"fa fa-user\"></span> Profile details</a></li>\n" +
6167 " <li class=\"list-group-item\" ui-sref-active-eq=\"active\"><a data-ui-sref=\"user.profile.password\"><span class=\"fa fa-lock\"></span> Change Password</a></li>\n" +
6168 " <li class=\"list-group-item\" ui-sref-active-eq=\"active\"><a data-ui-sref=\"user.profile.identities\"><span class=\"fa fa-link\"></span> External Identities</a></li>\n" +
6169 " <li class=\"list-group-item\" ui-sref-active-eq=\"active\"><a data-ui-sref=\"user.profile.auth_tokens\"><span class=\"fa fa-unlock\"></span> Auth Tokens</a></li>\n" +
6170 " </ul>\n" +
6171 " </div>\n" +
6435 "\n" +
6172 "\n" +
6436 " <div class=\"panel-body\">\n" +
6173 " <div class=\"panel panel-default\">\n" +
6174 " <div class=\"panel-heading\">Notifications</div>\n" +
6175 " <ul class=\"list-group\">\n" +
6176 " <li class=\"list-group-item\" ui-sref-active-eq=\"active\"><a data-ui-sref=\"user.alert_channels.list\"><span class=\"fa fa-bullhorn\"></span> Alert channels</a></li>\n" +
6177 " <li class=\"list-group-item\" ui-sref-active-eq=\"active\"><a data-ui-sref=\"user.alert_channels.email\"><span class=\"fa fa-envelope\"></span> Add email channel</a></li>\n" +
6178 " </ul>\n" +
6179 " </div>\n" +
6180 " </div>\n" +
6181 "\n" +
6182 " <div class=\"col-sm-9\" ui-view></div>\n" +
6183 "</div>\n"
6184 );
6185
6186
6187 $templateCache.put('components/views/user-alert-channel-email-new-view/user-alert-channel-email-new-view.html',
6188 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.email\"></ng-include>\n" +
6189 "\n" +
6190 "<div ng-show=\"!$ctrl.loading.email\">\n" +
6437 "\n" +
6191 "\n" +
6192 " <div class=\"panel panel-default\">\n" +
6193 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
6194 " <div class=\"panel-body\">\n" +
6195 " <p>Adding email alert channel - after you authorize your email in the system we can send alerts directly to this mailbox.</p>\n" +
6196 " <form class=\"form-horizontal\" name=\"$ctrl.channelForm\" ng-submit=\"$ctrl.createChannel()\">\n" +
6197 " <div class=\"form-group\" id=\"row-email\">\n" +
6198 " <data-form-errors errors=\"$ctrl.channelForm.ae_validation.email\"></data-form-errors>\n" +
6199 " <label id=\"label-email\" class=\"control-label col-sm-4 col-lg-3\">\n" +
6200 " Email Address\n" +
6201 " <span class=\"required\">*</span>\n" +
6202 " </label>\n" +
6203 " <div class=\"col-sm-8 col-lg-9\">\n" +
6204 " <input class=\"form-control\" type=\"text\" ng-model=\"$ctrl.form.email\">\n" +
6205 " </div>\n" +
6206 " </div>\n" +
6438 " <div class=\"form-group\">\n" +
6207 " <div class=\"form-group\">\n" +
6439 " <input type=\"text\" name=\"confirm\"\n" +
6208 " <label for=\"submit\" class=\"control-label col-sm-4 col-lg-3\">\n" +
6440 " placeholder=\"Enter CONFIRM to proceed\" class=\"form-control\" confirm-validate required ng-model=\"partitions.permConfirm\">\n" +
6209 " </label>\n" +
6441 " <input type=\"submit\" class=\"btn btn-danger\" ng-disabled=\"partitions.permanentPartitionsForm.$invalid\">\n" +
6210 " <div class=\"col-sm-8 col-lg-9\">\n" +
6442 " <input type=\"checkbox\" ng-model=\"partitions.permChecked\" ng-change=\"partitions.setCheckedList('permanentPartitions')\"> Check All\n" +
6211 " <input class=\"form-control btn btn-primary\" name=\"submit\" type=\"submit\" value=\"Add email channel\">\n" +
6212 " </div>\n" +
6443 " </div>\n" +
6213 " </div>\n" +
6214 " </form>\n" +
6215 " </div>\n" +
6216 " </div>\n" +
6217 "</div>\n"
6218 );
6219
6220
6221 $templateCache.put('components/views/user-alert-channels-list-view/user-alert-channels-list-view.html',
6222 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.channels || $ctrl.loading.applications\"></ng-include>\n" +
6444 "\n" +
6223 "\n" +
6445 " </div>\n" +
6224 "<div ng-if=\"!$ctrl.loading.channels && !$ctrl.loading.applications && !$ctrl.loading.actions\">\n" +
6225 "\n" +
6226 " <div class=\"panel panel-default\">\n" +
6227 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
6228 " <div class=\"panel-body\">\n" +
6229 " <h1>Report alert rules</h1>\n" +
6230 " <p>\n" +
6231 " <a class=\"btn btn-info\" ng-click=\"$ctrl.addAction()\"><span class=\"fa fa-plus-circle\"></span> Add top-level rule</a>\n" +
6232 " </p>\n" +
6233 "\n" +
6234 " <report-alert-action action=\"action\" rule-definitions=\"$ctrl.ruleDefinitions\"\n" +
6235 " possible-channels=\"$ctrl.alertChannels\"\n" +
6236 " actions=\"$ctrl.alertActions\" applications=\"$ctrl.applications\"\n" +
6237 " ng-repeat=\"action in $ctrl.alertActions | filter: {type:'report'}\"></report-alert-action>\n" +
6238 "\n" +
6239 " </div>\n" +
6240 " </div>\n" +
6241 "\n" +
6242 " <div class=\"panel panel-default\">\n" +
6243 " <div class=\"panel-body\">\n" +
6244 " <h1>Alert channels</h1>\n" +
6245 "\n" +
6246 " <p>Here you can configure your <em>alert channels</em>.</p>\n" +
6247 "\n" +
6248 " <p>An alert channel serves as means of delivery of notifications about important events that happen in your applications.</p>\n" +
6249 "\n" +
6250 " <div class=\"alert alert-success\">You can add more integrations that support different alert channels via application management panel.</div>\n" +
6446 "\n" +
6251 "\n" +
6447 " <table class=\"table table-striped\">\n" +
6252 " <table class=\"table table-striped\">\n" +
6448 " <tr>\n" +
6253 " <tr ng-repeat=\"channel in $ctrl.alertChannels\" class=\"animate-repeat\">\n" +
6449 " <th class=\"c1 date\">Date</th>\n" +
6254 " <td><strong>{{ channel.channel_visible_value }}</strong></td>\n" +
6450 " <th class=\"c2 indices\">Indices</th>\n" +
6255 " <td class=\"text-right\">\n" +
6451 " </tr>\n" +
6256 " <span class=\"btn btn-default\" data-uib-tooltip=\"Channel is {{ channel.channel_validated? '' :'NOT' }} validated\" tooltip-append-to-body=\"true\"\n" +
6452 " <tr class=\"r{{$index}}\" ng-repeat=\"row in partitions.permanentPartitions\">\n" +
6257 " ng-class=\"{dim:!channel.channel_validated}\">\n" +
6453 " <td class=\"c1\">{{row[0]}}</td>\n" +
6258 " <span class=\"fa\" ng-class=\"{'fa-check-circle':channel.channel_validated, 'fa-times-circle':!channel.channel_validated}\"></span>\n" +
6454 " <td class=\"c2\">\n" +
6259 " </span>\n" +
6455 " <ul class=\"list-group\">\n" +
6260 " <a class=\"btn btn-default\" data-uib-tooltip=\"Press to turn {{ channel.send_alerts ? 'OFF' : 'ON' }} alerting on this chanel\"\n" +
6456 " <li class=\"list-group-item\" ng-repeat=\"partition in row[1].elasticsearch\">\n" +
6261 " ng-click=\"$ctrl.updateChannel(channel,'send_alerts')\" ng-class=\"{dim:!channel.send_alerts}\" tooltip-append-to-body=\"true\">\n" +
6457 " <input name=\"es_index\" type=\"checkbox\" ng-model=\"partition.checked\"> ES: {{partition.name}}\n" +
6262 " <span class=\"fa fa-rss\"></span> Alerts\n" +
6458 " </li>\n" +
6263 " </a>\n" +
6459 " <li class=\"list-group-item\" ng-repeat=\"partition in row[1].pg\">\n" +
6264 " <a class=\"btn btn-default\" data-uib-tooltip=\"Press to turn {{ channel.daily_digest ? 'OFF' : 'ON' }} daily digests on this channel\"\n" +
6460 " <input name=\"pg_index\" type=\"checkbox\" ng-model=\"partition.checked\"> PG: {{partition.name}}\n" +
6265 " ng-click=\"$ctrl.updateChannel(channel,'daily_digest')\" ng-class=\"{dim:!channel.daily_digest}\" tooltip-append-to-body=\"true\">\n" +
6461 " </li>\n" +
6266 " <span class=\"fa fa-envelope\"></span> Daily digests\n" +
6462 " </ul>\n" +
6267 " </a>\n" +
6268 "\n" +
6269 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
6270 " <a class=\"btn btn-default\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span> Remove</a>\n" +
6271 " <ul class=\"dropdown-menu\">\n" +
6272 " <li><a>No</a></li>\n" +
6273 " <li><a ng-click=\"$ctrl.removeChannel(channel)\">Yes</a></li>\n" +
6274 " </ul>\n" +
6275 " </span>\n" +
6276 "\n" +
6463 " </td>\n" +
6277 " </td>\n" +
6464 " </tr>\n" +
6278 " </tr>\n" +
6465 " </table>\n" +
6279 " </table>\n" +
6466 " </form>\n" +
6467 "\n" +
6280 "\n" +
6281 " </div>\n" +
6468 " </div>\n" +
6282 " </div>\n" +
6469 "\n" +
6283 "\n" +
6470 "</div>\n"
6284 "</div>\n"
6471 );
6285 );
6472
6286
6473
6287
6474 $templateCache.put('templates/admin/system.html',
6288 $templateCache.put('components/views/user-auth-tokens-view/user-auth-tokens-view.html',
6475 "<ng-include src=\"'templates/loader.html'\" ng-if=\"system.loading.system\"></ng-include>\n" +
6289 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.tokens\"></ng-include>\n" +
6476 "\n" +
6477 "<div ng-if=\"system.loading.system == false\">\n" +
6478 " <div class=\"row\">\n" +
6479 " <div class=\"col-sm-12\">\n" +
6480 " <div class=\"panel panel-default\">\n" +
6481 " <div class=\"panel-heading\">\n" +
6482 " <h3 class=\"panel-title\">\n" +
6483 " System Info\n" +
6484 " </h3>\n" +
6485 " </div>\n" +
6486 " <div class=\"panel-body\">\n" +
6487 "\n" +
6290 "\n" +
6488 " <p><strong>System Load:</strong>\n" +
6291 "<div ng-show=\"!$ctrl.loading.tokens\">\n" +
6489 " 1min: {{system.systemLoad[0]}}, 5min: {{system.systemLoad[1]}}, 15min: {{system.systemLoad[2]}}\n" +
6490 " </p>\n" +
6491 " <p><strong>Awaiting tasks:</strong>\n" +
6492 " <ul>\n" +
6493 " <li>reports: {{system.queueStats.waiting_reports}}</li>\n" +
6494 " <li>logs: {{system.queueStats.waiting_logs}}</li>\n" +
6495 " <li>metrics: {{system.queueStats.waiting_metrics}}</li>\n" +
6496 " <li>other: {{system.queueStats.waiting_other}}</li>\n" +
6497 " </ul>\n" +
6498 " </p>\n" +
6499 " <p><strong>Queue stats from last minute:</strong>\n" +
6500 " <ul>\n" +
6501 " <li>Processed reports: {{system.queueStats.processed_reports}}</li>\n" +
6502 " <li>Processed logs: {{system.queueStats.processed_logs}}</li>\n" +
6503 " <li>Processed metrics: {{system.queueStats.processed_metrics}}</li>\n" +
6504 " </ul>\n" +
6505 " </p>\n" +
6506 "\n" +
6292 "\n" +
6507 " <p><strong>Disks:</strong>\n" +
6293 " <div class=\"panel panel-default\">\n" +
6508 " <ul>\n" +
6294 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
6509 " <li ng-repeat=\"disk in system.disks\">\n" +
6510 " <strong>{{disk.device}}</strong> {{disk.free}}/{{disk.total}}, {{disk.percentage}}% used\n" +
6511 " </li>\n" +
6512 " </ul>\n" +
6513 " </p>\n" +
6514 "\n" +
6295 "\n" +
6515 " <p><strong>Process stats:</strong>\n" +
6296 " <div class=\"panel-body\">\n" +
6516 " <ul>\n" +
6517 " <li>FD soft limits: {{system.selfInfo.fds.soft}}</li>\n" +
6518 " <li>FD hard limits: {{system.selfInfo.fds.hard}}</li>\n" +
6519 " <li>Memlock soft limits: {{system.selfInfo.memlock.soft}}</li>\n" +
6520 " <li>Memlock hard limits: {{system.selfInfo.memlock.hard}}</li>\n" +
6521 " </ul>\n" +
6522 " </p>\n" +
6523 "\n" +
6297 "\n" +
6524 " </div>\n" +
6298 " <div class=\"alert alert-success\">You can use those tokens to authenticate yourself when performing various API calls</div>\n" +
6525 " </div>\n" +
6526 " </div>\n" +
6527 " </div>\n" +
6528 " <div class=\"row\">\n" +
6529 " <div class=\"col-sm-12\">\n" +
6530 "\n" +
6299 "\n" +
6531 " <div class=\"panel panel-default\">\n" +
6300 " <hr/>\n" +
6532 " <div class=\"panel-body\">\n" +
6533 "\n" +
6301 "\n" +
6534 " <uib-tabset>\n" +
6302 " <form method=\"post\" class=\"form-inline\" name=\"$ctrl.TokenForm\" ng-submit=\"$ctrl.addToken()\" novalidate>\n" +
6535 " <uib-tab>\n" +
6303 " <data-form-errors errors=\"$ctrl.TokenForm.ae_validation.description\"></data-form-errors>\n" +
6536 " <uib-tab-heading>\n" +
6304 " <data-form-errors errors=\"$ctrl.TokenForm.ae_validation.expires\"></data-form-errors>\n" +
6537 " Postgresql Tables\n" +
6305 " <div class=\"form-group\">\n" +
6538 " </uib-tab-heading>\n" +
6306 " <label>\n" +
6539 "\n" +
6307 " Description\n" +
6540 " <table class=\"table table-striped\">\n" +
6308 " </label>\n" +
6541 " <thead>\n" +
6309 " <input class=\"form-control\" name=\"description\" placeholder=\"Token description\" type=\"text\" ng-model=\"$ctrl.form.description\">\n" +
6542 " <tr>\n" +
6310 " </div>\n" +
6543 " <th class=\"c1 tablename\">Table name</th>\n" +
6311 " <div class=\"form-group\">\n" +
6544 " <th class=\"c2 size_human\">Size</th>\n" +
6312 " <label>\n" +
6545 " </tr>\n" +
6313 " Expires\n" +
6546 " </thead>\n" +
6314 " </label>\n" +
6547 " <tbody>\n" +
6315 " <select class=\"form-control\" ng-model=\"$ctrl.form.expires\" ng-options=\"i.key as i.label for i in $ctrl.expireOptions | objectToOrderedArray:'minutes'\">\n" +
6548 " <tr class=\"r{{$index}}\" ng-repeat=\"row in system.DBtables\">\n" +
6316 " <option value=\"\">Never</option>\n" +
6549 " <td class=\"c1\">{{row.table_name}}</td>\n" +
6317 " </select>\n" +
6550 " <td class=\"c2\">{{row.size_human}}</td>\n" +
6318 " </div>\n" +
6551 " </tr>\n" +
6319 " <div class=\"form-group\">\n" +
6552 " </tbody>\n" +
6320 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
6553 " </table>\n" +
6321 " </label>\n" +
6554 "\n" +
6322 " <input class=\"form-control btn btn-primary\" name=\"submit\" type=\"submit\" value=\"Create Token\">\n" +
6555 " </uib-tab>\n" +
6323 " </div>\n" +
6556 "\n" +
6324 " </form>\n" +
6557 " <uib-tab>\n" +
6558 " <uib-tab-heading>\n" +
6559 " Elasticsearch Indices\n" +
6560 " </uib-tab-heading>\n" +
6561 "\n" +
6325 "\n" +
6562 " <table class=\"table table-striped\">\n" +
6326 " </div>\n" +
6563 " <thead>\n" +
6564 " <tr>\n" +
6565 " <th class=\"c1 tablename\">Index name</th>\n" +
6566 " <th class=\"c2 size_human\">Size</th>\n" +
6567 " </tr>\n" +
6568 " </thead>\n" +
6569 " <tbody>\n" +
6570 " <tr class=\"r{{$index}}\" ng-repeat=\"row in system.ESIndices\">\n" +
6571 " <td class=\"c1\">{{row.name}}</td>\n" +
6572 " <td class=\"c2\">{{row.size_human}}</td>\n" +
6573 " </tr>\n" +
6574 " </tbody>\n" +
6575 " </table>\n" +
6576 "\n" +
6327 "\n" +
6577 " </uib-tab>\n" +
6578 "\n" +
6328 "\n" +
6579 " <uib-tab>\n" +
6329 " </div>\n" +
6580 " <uib-tab-heading>\n" +
6581 " Processes\n" +
6582 " </uib-tab-heading>\n" +
6583 "\n" +
6330 "\n" +
6584 " <table class=\"table table-striped\">\n" +
6331 " <div class=\"panel panel-default\">\n" +
6585 " <thead>\n" +
6332 " <table st-table=\"displayedCollection\" st-safe-src=\"$ctrl.tokens\" class=\"table table-striped\">\n" +
6586 " <tr>\n" +
6333 " <caption>Your current tokens</caption>\n" +
6587 " <th class=\"c1 tablename\">Owner</th>\n" +
6334 " <thead>\n" +
6588 " <th class=\"c2 tablename\">PID</th>\n" +
6335 " <tr>\n" +
6589 " <th class=\"c3 tablename\">CPU</th>\n" +
6336 " <th st-sort=\"description\"><a>Description</a></th>\n" +
6590 " <th class=\"c4 tablename\">MEM</th>\n" +
6337 " <th class=\"created\"><a>Created</a></th>\n" +
6591 " <th class=\"c4 tablename\">Name</th>\n" +
6338 " <th class=\"expires\"><a>Expires</a></th>\n" +
6592 " </tr>\n" +
6339 " <th class=\"options\"></th>\n" +
6593 " </thead>\n" +
6340 " </tr>\n" +
6594 " <tbody>\n" +
6341 " <tr>\n" +
6595 " <tr class=\"r{{$index}}\" ng-repeat-start=\"row in system.processInfo\">\n" +
6342 " <th><input st-search=\"description\" placeholder=\"search for description\" class=\"form-control\" type=\"search\" st-delay=\"1\"/></th>\n" +
6596 " <td class=\"c1\">{{row.owner}}</td>\n" +
6343 " <th></th>\n" +
6597 " <td class=\"c2\">{{row.pid}}</td>\n" +
6344 " <th></th>\n" +
6598 " <td class=\"c3\">{{row.cpu}}</td>\n" +
6345 " <th></th>\n" +
6599 " <td class=\"c4\">{{row.mem_usage}} ({{row.mem_percentage}}%)</td>\n" +
6346 " </tr>\n" +
6600 " <td class=\"c5\"><strong>{{row.name}}</strong></td>\n" +
6347 " </thead>\n" +
6601 " </tr>\n" +
6348 " <tbody>\n" +
6602 " <tr ng-repeat-end>\n" +
6603 " <td colspan=\"5\" class=\"word-wrap\">{{row.command}}</td>\n" +
6604 " </tr>\n" +
6605 " </tbody>\n" +
6606 " </table>\n" +
6607 "\n" +
6349 "\n" +
6608 " </uib-tab>\n" +
6350 " <tr ng-repeat=\"token in displayedCollection\">\n" +
6351 " <td><p>{{token.description}}</p>\n" +
6352 " <pre ng-init=\"token.limit = 8\" ng-mouseover=\"token.limit = 99\" ng-mouseleave=\"token.limit = 8\">{{token.token| limitTo:token.limit}}...</pre>\n" +
6353 " </td>\n" +
6354 " <td><span data-uib-tooltip=\"{{token.creation_date}}\">{{token.creation_date | isoToRelativeTime}}</span></td>\n" +
6355 " <td><span ng-if=\"token.expires\" data-uib-tooltip=\"{{token.expires}}\">{{token.expires | isoToRelativeTime}}</span>\n" +
6356 " <span ng-if=\"!token.expires\">Never</span></td>\n" +
6357 " <td>\n" +
6358 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
6359 " <a class=\"btn btn-danger\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span></a>\n" +
6360 " <ul class=\"dropdown-menu\">\n" +
6361 " <li><a>No</a></li>\n" +
6362 " <li><a ng-click=\"$ctrl.removeToken(token)\">Yes</a></li>\n" +
6363 " </ul>\n" +
6364 " </span>\n" +
6365 " </td>\n" +
6366 " </tr>\n" +
6367 " </tbody>\n" +
6368 " </table>\n" +
6369 " </div>\n" +
6609 "\n" +
6370 "\n" +
6610 " <uib-tab>\n" +
6371 "</div>\n"
6611 " <uib-tab-heading>\n" +
6372 );
6612 " Python packages\n" +
6373
6613 " </uib-tab-heading>\n" +
6374
6375 $templateCache.put('components/views/user-identities-view/user-identities-view.html',
6376 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.identities\"></ng-include>\n" +
6614 "\n" +
6377 "\n" +
6615 " <table class=\"table\">\n" +
6378 "<div ng-show=\"!$ctrl.loading.identities\">\n" +
6616 " <tr ng-repeat=\"package in system.packages\">\n" +
6617 " <td>{{package.name}}</td>\n" +
6618 " <td>{{package.version}}</td>\n" +
6619 " </tr>\n" +
6620 " </table>\n" +
6621 " </p>\n" +
6622 "\n" +
6379 "\n" +
6623 " </uib-tab>\n" +
6380 " <div class=\"panel panel-default\">\n" +
6381 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
6382 " <div class=\"panel-body\">\n" +
6624 "\n" +
6383 "\n" +
6625 " </uib-tabset>\n" +
6384 " <div class=\"col-sm-6\">\n" +
6626 " </div>\n" +
6385 " <p ng-show=\"$ctrl.identities.length === 0\">No external providers linked yet</p>\n" +
6386 " <ul class=\"list-group\">\n" +
6387 " <li ng-repeat=\"provider in $ctrl.identities\" class=\"animate-repeat list-group-item\">\n" +
6388 " <div class=\"pull-right\">\n" +
6389 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
6390 " <a class=\"btn btn-danger btn-xs\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span></a>\n" +
6391 " <ul class=\"dropdown-menu\">\n" +
6392 " <li><a>No</a></li>\n" +
6393 " <li><a ng-click=\"$ctrl.removeProvider(provider)\">Yes</a></li>\n" +
6394 " </ul>\n" +
6395 " </span>\n" +
6396 " </div>\n" +
6397 " <em>@{{ provider.provider }}</em>: <strong>{{ provider.id }}</strong>\n" +
6398 " </li>\n" +
6399 " </ul>\n" +
6400 " </div>\n" +
6401 " <div class=\"col-sm-6\">\n" +
6402 " <ul class=\"list-group\">\n" +
6403 " <li class=\"list-group-item\">\n" +
6404 " <a href=\"{{$ctrl.AeConfig.urls.social_auth.google}}\" target=\"_self\">\n" +
6405 " <span class=\"fa fa-google-plus-square fa-2x\"></span> Connect with Google</a>\n" +
6406 " </li>\n" +
6407 " <li class=\"list-group-item\">\n" +
6408 " <a href=\"{{$ctrl.AeConfig.urls.social_auth.twitter}}\" target=\"_self\">\n" +
6409 " <span class=\"fa fa-twitter fa-2x\"></span> Connect with Twitter</a>\n" +
6410 " </li>\n" +
6411 " <li class=\"list-group-item\">\n" +
6412 " <a href=\"{{$ctrl.AeConfig.urls.social_auth.bitbucket}}\" target=\"_self\">\n" +
6413 " <span class=\"fa fa-bitbucket fa-2x\"></span> Connect with Bitbucket</a>\n" +
6414 " </li>\n" +
6415 " <li class=\"list-group-item\">\n" +
6416 " <a href=\"{{$ctrl.AeConfig.urls.social_auth.github}}\" target=\"_self\">\n" +
6417 " <span class=\"fa fa-github fa-2x\"></span> Connect with Github including private repo access</a>\n" +
6418 " </li>\n" +
6419 " </ul>\n" +
6627 " </div>\n" +
6420 " </div>\n" +
6628 " </div>\n" +
6421 " </div>\n" +
6629 " </div>\n" +
6422 " </div>\n" +
@@ -6631,240 +6424,442 b' function kickstartAE(initialUserData) {'
6631 );
6424 );
6632
6425
6633
6426
6634 $templateCache.put('templates/admin/users/parent_view.html',
6427 $templateCache.put('components/views/user-password-view/user-password-view.html',
6635 "<div ui-view></div>"
6428 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.password\"></ng-include>\n" +
6636 );
6637
6638
6639 $templateCache.put('templates/admin/users/users_create.html',
6640 "<ng-include src=\"'templates/loader.html'\" ng-if=\"user.loading.user\"></ng-include>\n" +
6641 "\n" +
6429 "\n" +
6642 "<div ng-show=\"!user.loading.user\">\n" +
6430 "<div ng-show=\"!$ctrl.loading.password\">\n" +
6643 "\n" +
6431 "\n" +
6644 " <div class=\"panel panel-default\">\n" +
6432 " <div class=\"panel panel-default\">\n" +
6433 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
6645 " <div class=\"panel-body\">\n" +
6434 " <div class=\"panel-body\">\n" +
6646 "\n" +
6435 "\n" +
6647 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\" ng-if=\"user.user.id\">\n" +
6436 " <form class=\"form-horizontal\" name=\"$ctrl.passwordForm\" ng-submit=\"$ctrl.updatePassword()\">\n" +
6648 " <a class=\"btn btn-default\" data-uib-dropdown-toggle><span class=\"fa fa-user-secret\"></span> Re-login to user</a>\n" +
6437 " <div class=\"form-group\" id=\"row-old_password\">\n" +
6649 " <ul class=\"dropdown-menu\">\n" +
6438 " <data-form-errors errors=\"$ctrl.passwordForm.ae_validation.old_password\"></data-form-errors>\n" +
6650 " <li><a>No</a></li>\n" +
6439 " <label for=\"old_password\" id=\"label-old_password\" class=\"control-label col-sm-4 col-lg-3\">\n" +
6651 " <li><a ng-click=\"user.reloginUser(user)\">Yes</a></li>\n" +
6440 " Old Password\n" +
6652 " </ul>\n" +
6653 " </span>\n" +
6654 "\n" +
6655 " <form name=\"user.profileForm\" class=\"form-horizontal\" ng-submit=\"user.createUser()\">\n" +
6656 " <div class=\"form-group\" id=\"row-user_name\">\n" +
6657 " <data-form-errors errors=\"user.profileForm.ae_validation.user_name\"></data-form-errors>\n" +
6658 " <label for=\"user_name\" id=\"label-user_name\" class=\"control-label col-sm-4 col-lg-3\">\n" +
6659 " User name\n" +
6660 " <span class=\"required\">*</span>\n" +
6441 " <span class=\"required\">*</span>\n" +
6661 " </label>\n" +
6442 " </label>\n" +
6662 " <div class=\"col-sm-8 col-lg-9\">\n" +
6443 " <div class=\"col-sm-8 col-lg-9\">\n" +
6663 " <input class=\"form-control\" id=\"user_name\" name=\"user_name\" type=\"text\" ng-model=\"user.user.user_name\">\n" +
6444 " <input class=\"form-control\" id=\"old_password\" name=\"old_password\" type=\"password\" ng-model=\"$ctrl.form.old_password\">\n" +
6664 " </div>\n" +
6445 " </div>\n" +
6665 " </div>\n" +
6446 " </div>\n" +
6666 "\n" +
6447 " <div class=\"form-group\" id=\"row-new_password\">\n" +
6667 " <div class=\"form-group\" id=\"row-user_password\">\n" +
6448 " <data-form-errors errors=\"$ctrl.passwordForm.ae_validation.new_password\"></data-form-errors>\n" +
6668 " <data-form-errors errors=\"user.profileForm.ae_validation.user_password\"></data-form-errors>\n" +
6449 " <label for=\"new_password\" id=\"label-new_password\" class=\"control-label col-sm-4 col-lg-3\">\n" +
6669 " <label for=\"user_password\" id=\"label-user_password\" class=\"control-label col-sm-4 col-lg-3\">\n" +
6450 " New Password\n" +
6670 " Password\n" +
6671 " <span class=\"required\">*</span>\n" +
6451 " <span class=\"required\">*</span>\n" +
6672 " </label>\n" +
6452 " </label>\n" +
6673 " <div class=\"col-sm-8 col-lg-9\">\n" +
6453 " <div class=\"col-sm-8 col-lg-9\">\n" +
6674 " <input class=\"form-control\" id=\"user_password\" name=\"user_password\" type=\"password\" ng-model=\"user.user.user_password\">\n" +
6454 " <input class=\"form-control\" id=\"new_password\" name=\"new_password\" type=\"password\" ng-model=\"$ctrl.form.new_password\">\n" +
6675 "\n" +
6455 " </div>\n" +
6676 " <p class=\"m-t-1\"><a class=\"btn btn-info btn-sm\" ng-click=\"user.generatePassword()\"><span class=\"fa fa-lock\"></span> Generate password</a>\n" +
6456 " </div>\n" +
6677 " <span ng-show=\"user.gen_pass.length > 0\">(generated password: {{user.gen_pass}})</span>\n" +
6457 " <div class=\"form-group\" id=\"row-new_password_confirm\">\n" +
6678 " </p>\n" +
6458 " <data-form-errors errors=\"$ctrl.passwordForm.ae_validation.new_password_confirm\"></data-form-errors>\n" +
6679 "\n" +
6459 " <label for=\"new_password_confirm\" id=\"label-new_password_confirm\" class=\"control-label col-sm-4 col-lg-3\">\n" +
6460 " Confirm Password\n" +
6461 " <span class=\"required\">*</span>\n" +
6462 " </label>\n" +
6463 " <div class=\"col-sm-8 col-lg-9\">\n" +
6464 " <input class=\"form-control\" id=\"new_password_confirm\" name=\"new_password_confirm\" type=\"password\" ng-model=\"$ctrl.form.new_password_confirm\">\n" +
6465 " </div>\n" +
6466 " </div>\n" +
6467 " <div class=\"form-group\" id=\"row-submit\">\n" +
6468 " <label for=\"submit\" id=\"label-submit\" class=\"control-label col-sm-4 col-lg-3\"></label>\n" +
6469 " <div class=\"col-sm-8 col-lg-9\">\n" +
6470 " <input class=\"form-control SubmitField btn btn-primary\" id=\"submit\" name=\"submit\" type=\"submit\" value=\"Change Password\">\n" +
6680 " </div>\n" +
6471 " </div>\n" +
6681 " </div>\n" +
6472 " </div>\n" +
6473 " </form>\n" +
6682 "\n" +
6474 "\n" +
6475 " </div>\n" +
6476 " </div>\n" +
6477 "</div>\n"
6478 );
6479
6480
6481 $templateCache.put('components/views/user-profile-view/user-profile-view.html',
6482 "<ui-view></ui-view><ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.profile\"></ng-include>\n" +
6683 "\n" +
6483 "\n" +
6484 "<div ng-show=\"!$ctrl.loading.profile\">\n" +
6485 " <div class=\"panel panel-default\">\n" +
6486 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
6487 " <div class=\"panel-body\">\n" +
6488 " <form name=\"$ctrl.profileForm\" class=\"form-horizontal\" ng-submit=\"$ctrl.updateProfile()\">\n" +
6684 " <div class=\"form-group\" id=\"row-email\">\n" +
6489 " <div class=\"form-group\" id=\"row-email\">\n" +
6685 " <data-form-errors errors=\"user.profileForm.ae_validation.email\"></data-form-errors>\n" +
6490 " <data-form-errors errors=\"$ctrl.profileForm.ae_validation.email\"></data-form-errors>\n" +
6686 " <label for=\"email\" id=\"label-email\" class=\"control-label col-sm-4 col-lg-3\">\n" +
6491 " <label for=\"email\" id=\"label-email\" class=\"control-label col-sm-4 col-lg-3\">\n" +
6687 " Email Address\n" +
6492 " Email Address\n" +
6688 " <span class=\"required\">*</span>\n" +
6493 " <span class=\"required\">*</span>\n" +
6689 " </label>\n" +
6494 " </label>\n" +
6690 " <div class=\"col-sm-8 col-lg-9\">\n" +
6495 " <div class=\"col-sm-8 col-lg-9\">\n" +
6691 " <input class=\"form-control\" id=\"email\" name=\"email\" type=\"text\" ng-model=\"user.user.email\">\n" +
6496 " <input class=\"form-control\" id=\"email\" name=\"email\" type=\"text\" ng-model=\"$ctrl.user.email\">\n" +
6692 " </div>\n" +
6497 " </div>\n" +
6693 " </div>\n" +
6498 " </div>\n" +
6694 "\n" +
6499 "\n" +
6695 " <div class=\"form-group\" id=\"row-first_name\">\n" +
6500 " <div class=\"form-group\" id=\"row-first_name\">\n" +
6696 " <data-form-errors errors=\"user.profileForm.ae_validation.first_name\"></data-form-errors>\n" +
6501 " <data-form-errors errors=\"$ctrl.profileForm.ae_validation.first_name\"></data-form-errors>\n" +
6697 " <label for=\"first_name\" id=\"label-first_name\" class=\"control-label col-sm-4 col-lg-3\">\n" +
6502 " <label for=\"first_name\" id=\"label-first_name\" class=\"control-label col-sm-4 col-lg-3\">\n" +
6698 " First Name\n" +
6503 " First Name\n" +
6699 " </label>\n" +
6504 " </label>\n" +
6700 " <div class=\"col-sm-8 col-lg-9\">\n" +
6505 " <div class=\"col-sm-8 col-lg-9\">\n" +
6701 " <input class=\"form-control\" id=\"first_name\" name=\"first_name\" type=\"text\" ng-model=\"user.user.first_name\">\n" +
6506 " <input class=\"form-control\" id=\"first_name\" name=\"first_name\" type=\"text\" ng-model=\"$ctrl.user.first_name\">\n" +
6702 " </div>\n" +
6507 " </div>\n" +
6703 " </div>\n" +
6508 " </div>\n" +
6704 " <div class=\"form-group\" id=\"row-last_name\">\n" +
6509 " <div class=\"form-group\" id=\"row-last_name\">\n" +
6705 " <data-form-errors errors=\"user.profileForm.ae_validation.last_name\"></data-form-errors>\n" +
6510 " <data-form-errors errors=\"$ctrl.profileForm.ae_validation.last_name\"></data-form-errors>\n" +
6706 " <label for=\"last_name\" id=\"label-last_name\" class=\"control-label col-sm-4 col-lg-3\">\n" +
6511 " <label for=\"last_name\" id=\"label-last_name\" class=\"control-label col-sm-4 col-lg-3\">\n" +
6707 " Last Name\n" +
6512 " Last Name\n" +
6708 " </label>\n" +
6513 " </label>\n" +
6709 " <div class=\"col-sm-8 col-lg-9\">\n" +
6514 " <div class=\"col-sm-8 col-lg-9\">\n" +
6710 " <input class=\"form-control\" id=\"last_name\" name=\"last_name\" type=\"text\" ng-model=\"user.user.last_name\">\n" +
6515 " <input class=\"form-control\" id=\"last_name\" name=\"last_name\" type=\"text\" ng-model=\"$ctrl.user.last_name\">\n" +
6711 " </div>\n" +
6516 " </div>\n" +
6712 " </div>\n" +
6517 " </div>\n" +
6713 "\n" +
6518 " <div class=\"form-group\" id=\"row-company_name\">\n" +
6714 " <div class=\"form-group\" id=\"row-status\">\n" +
6519 " <data-form-errors errors=\"$ctrl.profileForm.ae_validation.company_name\"></data-form-errors>\n" +
6715 " <data-form-errors errors=\"user.profileForm.ae_validation.status\"></data-form-errors>\n" +
6520 " <label for=\"company_name\" id=\"label-company_name\" class=\"control-label col-sm-4 col-lg-3\">\n" +
6716 " <label for=\"status\" id=\"label-status\" class=\"control-label col-sm-4 col-lg-3\">\n" +
6521 " Company Name\n" +
6717 " Active\n" +
6718 " </label>\n" +
6522 " </label>\n" +
6719 " <div class=\"col-sm-8 col-lg-9\">\n" +
6523 " <div class=\"col-sm-8 col-lg-9\">\n" +
6720 " <input checked class=\"form-control\" id=\"status\" name=\"status\" type=\"checkbox\" ng-model=\"user.user.status\">\n" +
6524 " <input class=\"form-control\" id=\"company_name\" name=\"company_name\" type=\"text\" ng-model=\"$ctrl.user.company_name\">\n" +
6525 " </div>\n" +
6526 " </div>\n" +
6527 " <div class=\"form-group\" id=\"row-company_address\">\n" +
6528 " <data-form-errors errors=\"$ctrl.profileForm.ae_validation.company_address\"></data-form-errors>\n" +
6529 " <label for=\"company_address\" id=\"label-company_address\" class=\"control-label col-sm-4 col-lg-3\">\n" +
6530 " Company Address\n" +
6531 " </label>\n" +
6532 " <div class=\"col-sm-8 col-lg-9\">\n" +
6533 " <textarea class=\"form-control\" id=\"company_address\" name=\"company_address\" ng-model=\"$ctrl.user.company_address\"></textarea>\n" +
6534 " </div>\n" +
6535 " </div>\n" +
6536 " <div class=\"form-group\" id=\"row-zip_code\">\n" +
6537 " <data-form-errors errors=\"$ctrl.profileForm.ae_validation.zip_code\"></data-form-errors>\n" +
6538 " <label for=\"zip_code\" id=\"label-zip_code\" class=\"control-label col-sm-4 col-lg-3\">\n" +
6539 " ZIP code\n" +
6540 " </label>\n" +
6541 " <div class=\"col-sm-8 col-lg-9\">\n" +
6542 " <input class=\"form-control\" id=\"zip_code\" name=\"zip_code\" type=\"text\" ng-model=\"$ctrl.user.zip_code\">\n" +
6543 " </div>\n" +
6544 " </div>\n" +
6545 " <div class=\"form-group\" id=\"row-city\">\n" +
6546 " <data-form-errors errors=\"$ctrl.profileForm.ae_validation.city\"></data-form-errors>\n" +
6547 " <label for=\"city\" id=\"label-city\" class=\"control-label col-sm-4 col-lg-3\">\n" +
6548 " City\n" +
6549 " </label>\n" +
6550 " <div class=\"col-sm-8 col-lg-9\">\n" +
6551 " <input class=\"form-control\" id=\"city\" name=\"city\" type=\"text\" ng-model=\"$ctrl.user.city\">\n" +
6552 " </div>\n" +
6553 " </div>\n" +
6554 " <div class=\"form-group\" id=\"row-notifications\">\n" +
6555 " <data-form-errors errors=\"$ctrl.profileForm.ae_validation.notifications\"></data-form-errors>\n" +
6556 " <label for=\"notifications\" id=\"label-notifications\" class=\"control-label col-sm-4 col-lg-3\">\n" +
6557 " Account notifications\n" +
6558 " </label>\n" +
6559 " <div class=\"col-sm-8 col-lg-9\">\n" +
6560 " <input checked class=\"form-control\" id=\"notifications\" name=\"notifications\" type=\"checkbox\" ng-model=\"$ctrl.user.notifications\">\n" +
6721 " </div>\n" +
6561 " </div>\n" +
6722 " </div>\n" +
6562 " </div>\n" +
6723 "\n" +
6724 " <div class=\"form-group\" id=\"row-submit\">\n" +
6563 " <div class=\"form-group\" id=\"row-submit\">\n" +
6725 " <label for=\"submit\" id=\"label-submit\" class=\"control-label col-sm-4 col-lg-3\">\n" +
6564 " <label for=\"submit\" id=\"label-submit\" class=\"control-label col-sm-4 col-lg-3\">\n" +
6726 " </label>\n" +
6565 " </label>\n" +
6727 " <div class=\"col-sm-8 col-lg-9\">\n" +
6566 " <div class=\"col-sm-8 col-lg-9\">\n" +
6728 " <input class=\"form-control btn btn-primary\" id=\"submit\" name=\"submit\" type=\"submit\" value=\"{{$state.params.userId ? 'Update' : 'Add'}} User\">\n" +
6567 " <input class=\"form-control btn btn-primary\" id=\"submit\" name=\"submit\" type=\"submit\" value=\"Update Account\">\n" +
6729 " </div>\n" +
6568 " </div>\n" +
6730 " </div>\n" +
6569 " </div>\n" +
6731 " </form>\n" +
6570 " </form>\n" +
6732 " </div>\n" +
6571 " </div>\n" +
6733 " </div>\n" +
6572 " </div>\n" +
6573 "</div>\n"
6574 );
6575
6576
6577 $templateCache.put('directives/permissions/permissions.html',
6578 "<div class=\"panel panel-default\">\n" +
6579 " <div class=\"panel-heading\">\n" +
6580 " <h3 class=\"panel-title\">Permissions</h3>\n" +
6581 " </div>\n" +
6582 " <div class=\"panel-body\">\n" +
6583 " <p>Here you can <strong>set permissions</strong> for others to access your app data.</p>\n" +
6734 "\n" +
6584 "\n" +
6585 " <p>For example you can let other staff member view or alter error reports.</p>\n" +
6735 "\n" +
6586 "\n" +
6736 " <div class=\"panel panel-default\" ng-if=\"user.user.id\">\n" +
6587 " <div ng-if=\"permissions.possibleGroups.length > 0\">\n" +
6737 " <div class=\"panel-heading\">\n" +
6588 " <h3>Group permissions</h3>\n" +
6738 " <h3 class=\"panel-title\">Permission Summary</h3>\n" +
6739 " </div>\n" +
6740 " <div class=\"panel-body\">\n" +
6741 " <h3>Direct application permissions</h3>\n" +
6742 "\n" +
6589 "\n" +
6743 " <ul class=\"list-group\">\n" +
6590 " <ul class=\"list-group\">\n" +
6744 " <li ng-repeat=\"perm in user.resourcePermissions.user.application\" class=\"animate-repeat list-group-item\">\n" +
6591 " <li ng-repeat=\"perm in permissions.currentPermissions.group\" class=\"animate-repeat list-group-item\">\n" +
6745 " <strong>{{ perm.self.resource_name }}</strong>\n" +
6592 " <strong>{{ perm.self.group_name }}</strong>\n" +
6746 " <div class=\"pull-right\">\n" +
6593 " <div ng-repeat=\"perm_name in perm.permissions\" class=\"pull-right animate-repeat m-l-1\">\n" +
6747 "\n" +
6594 " <span ng-if=\"perm_name == '__all_permissions__'\">Resource owner</span>\n" +
6748 " <span class=\"btn btn-primary btn-xs m-r-1\" disabled ng-repeat=\"perm_name in perm.permissions\">{{ perm.self.owner ? 'Resource owner' : perm_name }}</span>\n" +
6595 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\" ng-if=\"perm_name != '__all_permissions__'\">\n" +
6749 "\n" +
6596 " <a class=\"btn btn-danger btn-xs\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span> {{ perm_name }}</a>\n" +
6750 " <a class=\"btn btn-default btn-xs\" data-uib-tooltip=\"Visit Application\" data-ui-sref=\"applications.update({resourceId:perm.self.resource_id})\">\n" +
6597 " <ul class=\"dropdown-menu\">\n" +
6751 " <span class=\"fa fa-cog\"></span>\n" +
6598 " <li><a>No</a></li>\n" +
6752 " </a>\n" +
6599 " <li><a ng-click=\"permissions.removeGroupPermission(perm_name, perm)\">Yes</a></li>\n" +
6600 " </ul>\n" +
6601 " </span>\n" +
6753 " </div>\n" +
6602 " </div>\n" +
6754 " </li>\n" +
6603 " </li>\n" +
6755 " </ul>\n" +
6604 " </ul>\n" +
6756 "\n" +
6605 "\n" +
6757 " <h3>Direct dashboard permissions</h3>\n" +
6606 " <form name=\"add_permission\" class=\"form-inline\" ng-submit=\"permissions.setGroupPermission()\">\n" +
6758 "\n" +
6607 " <div class=\"form-group\">\n" +
6759 " <ul class=\"list-group\">\n" +
6608 " <select class=\"form-control\" ng-model=\"permissions.form.selectedGroup\" ng-options=\"g.id as g.group_name for g in permissions.possibleGroups\"></select>\n" +
6760 " <li ng-repeat=\"perm in user.resourcePermissions.user.dashboard\" class=\"animate-repeat list-group-item\">\n" +
6609 " </div>\n" +
6761 " <strong>{{ perm.self.resource_name }}</strong>\n" +
6610 " <div class=\"form-group\">\n" +
6762 " <div class=\"pull-right\">\n" +
6611 " <span ng-repeat=\"permission in permissions.possiblePermissions\">\n" +
6612 " <input type=\"checkbox\" ng-model=\"permissions.form.selectedGroupPermissions[permission]\"> {{ permission }}\n" +
6613 " </span>\n" +
6614 " </div>\n" +
6615 " <div class=\"form-group\">\n" +
6616 " <button class=\"btn btn-info\"><span class=\"fa fa-user\"></span> Give permission</button>\n" +
6617 " </div>\n" +
6618 " </form>\n" +
6763 "\n" +
6619 "\n" +
6764 " <span class=\"btn btn-primary btn-xs m-r-1\" disabled ng-repeat=\"perm_name in perm.permissions\">{{ perm.self.owner ? 'Resource owner' : perm_name }}</span>\n" +
6620 " </div>\n" +
6765 "\n" +
6621 "\n" +
6766 " <a class=\"btn btn-default btn-xs\" data-uib-tooltip=\"Visit Dashboard\" data-ui-sref=\"dashboard.update({resourceId:perm.self.resource_id})\">\n" +
6622 " <h3>User permissions</h3>\n" +
6767 " <span class=\"fa fa-cog\"></span>\n" +
6623 " <div>\n" +
6768 " </a>\n" +
6624 " <ul class=\"list-group\">\n" +
6625 " <li ng-repeat=\"perm in permissions.currentPermissions.user\" class=\"animate-repeat list-group-item\">\n" +
6626 " <strong>{{ perm.self.user_name }}</strong>\n" +
6627 " <div ng-repeat=\"perm_name in perm.permissions\" class=\"pull-right animate-repeat m-l-1\">\n" +
6628 " <span ng-if=\"perm_name == '__all_permissions__'\">Resource owner</span>\n" +
6629 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\" ng-if=\"perm_name != '__all_permissions__'\">\n" +
6630 " <a class=\"btn btn-danger btn-xs\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span> {{ perm_name }}</a>\n" +
6631 " <ul class=\"dropdown-menu\">\n" +
6632 " <li><a>No</a></li>\n" +
6633 " <li><a ng-click=\"permissions.removeUserPermission(perm_name,perm)\">Yes</a></li>\n" +
6634 " </ul>\n" +
6635 " </span>\n" +
6769 " </div>\n" +
6636 " </div>\n" +
6770 " </li>\n" +
6637 " </li>\n" +
6771 " </ul>\n" +
6638 " </ul>\n" +
6772 "\n" +
6773 " </div>\n" +
6639 " </div>\n" +
6640 " <div>\n" +
6641 " <p>First enter username or full email of person you want to give access to (the person needs to be <strong>already registered in AppEnlight</strong>)</p>\n" +
6774 "\n" +
6642 "\n" +
6643 " <form name=\"add_permission\" class=\"form-inline\" ng-submit=\"permissions.setUserPermission()\">\n" +
6644 " <div class=\"form-group\">\n" +
6645 " <input type=\"text\" class=\"autocomplete form-control\" placeholder=\"Search for user/email\" ng-model=\"permissions.form.autocompleteUser\"\n" +
6646 " uib-typeahead=\"u.user for u in permissions.searchUsers($viewValue) | limitTo:8\" typeahead-loading=\"permissions.searchingUsers\" typeahead-wait-ms=\"250\"\n" +
6647 " typeahead-template-url=\"templates/directives/user_search_type_ahead.html\"\n" +
6648 " />\n" +
6649 " </div>\n" +
6650 " <div class=\"form-group\">\n" +
6651 " <span ng-repeat=\"permission in permissions.possiblePermissions\">\n" +
6652 " <input type=\"checkbox\" ng-model=\"permissions.form.selectedUserPermissions[permission]\"> {{ permission }}\n" +
6653 " </span>\n" +
6654 " </div>\n" +
6655 " <div class=\"form-group\">\n" +
6656 " <button class=\"btn btn-info\" ng-disabled=\"!permissions.form.autocompleteUser\"><span class=\"fa fa-user\"></span> Give permission</button>\n" +
6657 " </div>\n" +
6658 " </form>\n" +
6659 " </div>\n" +
6775 " </div>\n" +
6660 " </div>\n" +
6776 "\n" +
6777 "\n" +
6778 "</div>\n"
6661 "</div>\n"
6779 );
6662 );
6780
6663
6781
6664
6782 $templateCache.put('templates/admin/users/users_list.html',
6665 $templateCache.put('directives/plugin_config/plugin_config.html',
6783 "<ng-include src=\"'templates/loader.html'\" ng-if=\"users.loading.users\"></ng-include>\n" +
6666 "<div ng-repeat=\"tmpl in plugin_ctrlr.inclusions track by $index\">\n" +
6784 "\n" +
6667 " <div><strong>Plugin: {{tmpl.name}}</strong></div>\n" +
6785 "<div ng-show=\"!users.loading.users\">\n" +
6668 " <ng-include src=\"tmpl.template\"></ng-include>\n" +
6786 "\n" +
6669 " <hr/>\n" +
6787 " <div class=\"panel panel-default\">\n" +
6670 "</div>\n"
6788 "\n" +
6671 );
6789 " <div class=\"panel-heading\">\n" +
6672
6790 " {{users.activeUsers}} active out of {{users.users.length}} users\n" +
6673
6674 $templateCache.put('directives/postprocess_action/postprocess_action.html',
6675 "<div class=\"panel panel-default action\">\n" +
6676 " <div class=\"panel-body form-inline\">\n" +
6677 " <div class=\"pull-right\">\n" +
6678 " <span class=\"dropdown\" data-uib-dropdown>\n" +
6679 " <a class=\"btn btn-danger\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span></a>\n" +
6680 " <ul class=\"dropdown-menu\">\n" +
6681 " <li><a>No</a></li>\n" +
6682 " <li><a ng-click=\"ctrl.deleteAction(ctrl.action)\">Yes</a></li>\n" +
6683 " </ul>\n" +
6684 " </span>\n" +
6791 " </div>\n" +
6685 " </div>\n" +
6792 "\n" +
6686 "\n" +
6687 " <div class=\"form-group\">\n" +
6688 " <label>Action</label>\n" +
6793 "\n" +
6689 "\n" +
6794 " <table st-table=\"displayedCollection\" st-safe-src=\"users.users\" class=\"table table-striped\">\n" +
6690 " <div class=\"form-group\">\n" +
6795 " <thead>\n" +
6691 " <select class=\"form-control\" ng-model=\"ctrl.action.new_value\" ng-options=\"f[0] as f[1] for f in ctrl.possibleActions\" ng-change=\"ctrl.setDirty()\"></select>\n" +
6796 " <tr>\n" +
6692 " </div>\n" +
6797 " <th class=\"user_name\" st-sort=\"user_name\"><a>Username</a></th>\n" +
6798 " <th class=\"email\" st-sort=\"email\"><a>Email</a></th>\n" +
6799 " <th class=\"status\" st-sort=\"status\"><a>Status</a></th>\n" +
6800 " <th st-sort=\"first_name\"><a>First Name</a></th>\n" +
6801 " <th st-sort=\"last_name\"><a>Last Name</a></th>\n" +
6802 " <th st-sort=\"last_login_date\"><a>Last login</a></th>\n" +
6803 " <th class=\"options\"></th>\n" +
6804 " </tr>\n" +
6805 " <tr>\n" +
6806 " <th><input st-search=\"user_name\" placeholder=\"search for user name\" class=\"form-control\" type=\"search\" st-delay=\"1\"/></th>\n" +
6807 " <th><input st-search=\"email\" placeholder=\"search for email\" class=\"form-control\" type=\"search\" st-delay=\"1\"/></th>\n" +
6808 " <th></th>\n" +
6809 " <th><input st-search=\"first_name\" placeholder=\"search for first name\" class=\"form-control\" type=\"search\" st-delay=\"1\"/></th>\n" +
6810 " <th><input st-search=\"last_name\" placeholder=\"search for last name\" class=\"form-control\" type=\"search\" st-delay=\"1\"/></th>\n" +
6811 " <th><input st-search=\"last_login_date\" placeholder=\"search for last name\" class=\"form-control\" type=\"search\" st-delay=\"1\"/></th>\n" +
6812 " <th></th>\n" +
6813 " </tr>\n" +
6814 " </thead>\n" +
6815 " <tbody>\n" +
6816 "\n" +
6817 " <tr ng-repeat=\"user in displayedCollection track by user.id\">\n" +
6818 " <td><img src=\"{{user.gravatar_url}}\" class=\"avatar\"> {{user.user_name}}</td>\n" +
6819 " <td class=\"word-wrap small\">{{user.email}}</td>\n" +
6820 " <td class=\"text-center\"><span class=\"fa\" ng-class=\"{'fa-check-circle':user.status, 'fa-times':!user.status}\"></span></td>\n" +
6821 " <td class=\"word-wrap small\">{{user.first_name}}</td>\n" +
6822 " <td class=\"word-wrap small\">{{user.last_name}}</td>\n" +
6823 " <td><span data-uib-tooltip=\"{{user.last_login_date}}\" class=\"small\">{{user.last_login_date | isoToRelativeTime}}</span></td>\n" +
6824 " <td>\n" +
6825 " <a class=\"btn btn-default btn-sm\" data-ui-sref=\"admin.user.update({userId:user.id})\"><span class=\"fa fa-cog\"></span></a>\n" +
6826 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
6827 " <a class=\"btn btn-danger btn-sm\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span></a>\n" +
6828 " <ul class=\"dropdown-menu\">\n" +
6829 " <li><a>No</a></li>\n" +
6830 " <li><a ng-click=\"users.removeUser(user)\">Yes</a></li>\n" +
6831 " </ul>\n" +
6832 " </span>\n" +
6833 " </tr>\n" +
6834 " <tfoot>\n" +
6835 " <tr>\n" +
6836 " <td colspan=\"6\" class=\"text-center\">\n" +
6837 " <div st-pagination=\"\" st-items-by-page=\"100\" st-displayed-pages=\"7\"></div>\n" +
6838 " </td>\n" +
6839 " </tr>\n" +
6840 " </tfoot>\n" +
6841 " </tbody>\n" +
6842 " </table>\n" +
6843 "\n" +
6693 "\n" +
6694 " <a class=\"btn btn-success\" ng-if=\"ctrl.action.dirty\" ng-click=\"ctrl.saveAction()\"><span class=\"fa fa-save\"></span> &nbsp;Save changes</a>\n" +
6844 "\n" +
6695 "\n" +
6696 " </div>\n" +
6697 " <hr/>\n" +
6698 " <p>Meeting following criteria:</p>\n" +
6699 " <form-errors errors=\"ctrl.errors\"></form-errors>\n" +
6700 " {{ctrl.rule}}\n" +
6701 " <rule rule=\"ctrl.action.rule\" rule-definitions=\"ctrl.ruleDefinitions\" parent-rule=\"null\" parent-obj=\"ctrl.action\"></rule>\n" +
6845 " </div>\n" +
6702 " </div>\n" +
6846 "</div>\n"
6703 "</div>\n"
6847 );
6704 );
6848
6705
6849
6706
6850 $templateCache.put('templates/directives/search_type_ahead.html',
6707 $templateCache.put('directives/report_alert_action/report_alert_action.html',
6851 "<a>\n" +
6708 "<div class=\"panel panel-default action\">\n" +
6852 " <span class=\"tag\" ng-show=\"match.model.tag\">{{match.model.tag}}</span>\n" +
6709 " <div class=\"panel-body form-inline\">\n" +
6853 " <span class=\"tag\" ng-show=\"!match.model.tag\">{{match.label}}</span>\n" +
6710 " <div class=\"pull-right\">\n" +
6854 " <span ng-show=\"match.model.example\">-</span> <span class=\"example\">{{match.model.example}}</span>\n" +
6711 " <span class=\"dropdown\" data-uib-dropdown>\n" +
6855 " <div class=\"description\">{{match.model.description}}</div>\n" +
6712 " <a class=\"btn btn-danger\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span></a>\n" +
6713 " <ul class=\"dropdown-menu\">\n" +
6714 " <li><a>No</a></li>\n" +
6715 " <li><a ng-click=\"ctrl.deleteAction(ctrl.actions, ctrl.action)\">Yes</a></li>\n" +
6716 " </ul>\n" +
6717 " </span>\n" +
6718 " </div>\n" +
6856 "\n" +
6719 "\n" +
6857 "</a>\n"
6720 " <div class=\"form-group\">\n" +
6858 );
6721 " <label>Applies to</label>\n" +
6859
6722 " <select class=\"form-control\" ng-model=\"ctrl.action.resource_id\" ng-options=\"f.resource_id as f.resource_name for f in ctrl.applications\" ng-change=\"ctrl.setDirty()\">\n" +
6860
6723 " <option value=\"\">All Resources</option>\n" +
6861 $templateCache.put('templates/directives/user_search_type_ahead.html',
6724 " </select>\n" +
6862 "<a>\n" +
6725 " </div>\n" +
6863 " <span>{{match.label}}</span> -\n" +
6726 " <div class=\"form-group\">\n" +
6864 " <span class=\"color-secondary\">{{match.model.name}}</span>\n" +
6727 " <label>Notify</label>\n" +
6865 "</a>\n"
6728 " <select class=\"form-control\" ng-model=\"ctrl.action.action\" ng-change=\"ctrl.setDirty()\" ng-options=\"f[0] as f[1] for f in ctrl.possibleNotifications\"></select>\n" +
6866 );
6729 "\n" +
6867
6730 " <a class=\"btn btn-success\" ng-if=\"ctrl.action.dirty\" ng-click=\"ctrl.saveAction()\"><span class=\"fa fa-save\"></span> &nbsp;Save changes</a>\n" +
6731 "\n" +
6732 " </div>\n" +
6733 " <div>\n" +
6734 " <p><strong>Channels:</strong></p>\n" +
6735 " <ul class=\"list-group\">\n" +
6736 " <li class=\"list-group-item\" ng-repeat=\"channel in ctrl.action.channels\">\n" +
6737 " <strong>{{channel.channel_visible_value}}</strong>\n" +
6738 " <div class=\"pull-right\">\n" +
6739 " <span class=\"dropdown\" data-uib-dropdown>\n" +
6740 " <a class=\"btn btn-danger btn-xs\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span></a>\n" +
6741 " <ul class=\"dropdown-menu\">\n" +
6742 " <li><a>No</a></li>\n" +
6743 " <li><a ng-click=\"ctrl.unBindChannel(channel)\">Yes</a></li>\n" +
6744 " </ul>\n" +
6745 " </span>\n" +
6746 " </div>\n" +
6747 " </li>\n" +
6748 " </ul>\n" +
6749 " <div class=\"form-group\" ng-if=\"ctrl.possibleChannels.length\">\n" +
6750 " <select class=\"form-control\" ng-model=\"ctrl.channelToBind\" ng-options=\"c as c.channel_visible_value for c in ctrl.possibleChannels |filter: c.supports_report_alerting\"></select>\n" +
6751 " <a class=\"btn btn-info\" ng-click=\"ctrl.bindChannel(channel, ctrl.action)\"><span class=\"fa fa-plus-circle\"></span> Add Channel</a>\n" +
6752 " </div>\n" +
6753 " <div class=\"alert alert-danger\" ng-if=\"!ctrl.possibleChannels.length\">\n" +
6754 " <span class=\"fa fa-exclamation-triangle \"></span>You need to create an alert channel before you can assign it to your rule.\n" +
6755 " </div>\n" +
6756 "\n" +
6757 " </div>\n" +
6758 " <hr/>\n" +
6759 " <p>Meeting following criteria:</p>\n" +
6760 " <form-errors errors=\"ctrl.errors\"></form-errors>\n" +
6761 " <rule rule=\"ctrl.action.rule\" rule-definitions=\"ctrl.ruleDefinitions\" parent-rule=\"null\" parent-obj=\"ctrl.action\"></rule>\n" +
6762 " </div>\n" +
6763 "</div>\n"
6764 );
6765
6766
6767 $templateCache.put('directives/rule_read_only/rule_read_only.html',
6768 "<div class=\"rule-read-only\">\n" +
6769 "\n" +
6770 " <span class=\"form-group\">\n" +
6771 " {{rule_ctrlr.readOnlyPossibleFields[rule_ctrlr.rule.field]}}\n" +
6772 " </span>\n" +
6773 "\n" +
6774 " <span ng-if=\"rule_ctrlr.rule.field != '__AND__' && rule_ctrlr.rule.field !='__OR__' && rule_ctrlr.rule.field !='__NOT__'\">\n" +
6775 " is {{rule_ctrlr.ruleDefinitions.allOps[rule_ctrlr.rule.op]}} {{rule_ctrlr.rule.value}}\n" +
6776 " </span>\n" +
6777 "\n" +
6778 " <span ng-if=\"rule_ctrlr.rule.field == '__AND__' || rule_ctrlr.rule.field =='__OR__' || rule_ctrlr.rule.field =='__NOT__'\">\n" +
6779 " <p ng-if=\"parent\"><strong>Subrules</strong></p>\n" +
6780 " <div ng-repeat=\"subrule in rule_ctrlr.rule.rules\" class=\"m-l-2\">\n" +
6781 "\n" +
6782 " <div class=\"panel panel-default\">\n" +
6783 " <div class=\"panel-body form-inline\">\n" +
6784 " <recursive>\n" +
6785 " <rule-read-only rule=\"subrule\" rule-definitions=\"rule_ctrlr.ruleDefinitions\" parent-rule=\"null\" parent-obj=\"rule_ctrlr.parentObj\"></rule-read-only>\n" +
6786 " </recursive>\n" +
6787 " </div>\n" +
6788 " </div>\n" +
6789 " </div>\n" +
6790 "\n" +
6791 " </span>\n" +
6792 "</div>\n"
6793 );
6794
6795
6796 $templateCache.put('directives/rule/rule.html',
6797 "<div class=\"rule form-inline\">\n" +
6798 "\n" +
6799 " <div class=\"form-group\">\n" +
6800 " <select class=\"form-control\"\n" +
6801 " ng-model=\"rule_ctrlr.rule.field\"\n" +
6802 " ng-change=\"rule_ctrlr.fieldChange()\"\n" +
6803 " ng-options=\"key as label for (key, label) in rule_ctrlr.ruleDefinitions.possibleFields\"></select>\n" +
6804 " </div>\n" +
6805 "\n" +
6806 " <div ng-if=\"rule_ctrlr.rule.field != '__AND__' && rule_ctrlr.rule.field !='__OR__' && rule_ctrlr.rule.field !='__NOT__'\" class=\"form-group\">\n" +
6807 "\n" +
6808 " <select ng-model=\"rule_ctrlr.rule.op\" class=\"form-control\"\n" +
6809 " ng-change=\"rule_ctrlr.setDirty()\"\n" +
6810 " ng-options=\"op as rule_ctrlr.ruleDefinitions.allOps[op] for op in rule_ctrlr.ruleDefinitions.fieldOps[rule_ctrlr.rule.field]\">\n" +
6811 " </select>\n" +
6812 "\n" +
6813 " <input type=\"text\" placeholder=\"Value\" ng-model=\"rule_ctrlr.rule.value\" ng-change=\"rule_ctrlr.setDirty()\" class=\"form-control\">\n" +
6814 "\n" +
6815 " </div>\n" +
6816 "\n" +
6817 " <span ng-if=\"rule_ctrlr.rule.field == '__AND__' || rule_ctrlr.rule.field =='__OR__' || rule_ctrlr.rule.field =='__NOT__'\">\n" +
6818 " <p ng-if=\"parent\"><strong>Subrules</strong></p>\n" +
6819 " <div ng-repeat=\"subrule in rule_ctrlr.rule.rules\" class=\"m-l-2\">\n" +
6820 " <div class=\"panel panel-default\">\n" +
6821 " <div class=\"panel-body form-inline\">\n" +
6822 " <recursive>\n" +
6823 " <rule rule=\"subrule\" rule-definitions=\"rule_ctrlr.ruleDefinitions\" parent-rule=\"rule_ctrlr.rule\" parent-obj=\"rule_ctrlr.parentObj\"></rule>\n" +
6824 " </recursive>\n" +
6825 " </div>\n" +
6826 " </div>\n" +
6827 " </div>\n" +
6828 "\n" +
6829 " <span ng-if=\"(rule_ctrlr.config.disable_subrules == false) == false\" class=\"btn btn-info\" ng-click=\"rule_ctrlr.add()\"><span class=\"fa fa-plus-circle\"></span> Add rule</span>\n" +
6830 "\n" +
6831 " </span>\n" +
6832 " <div class=\"pull-right\" ng-if=\"rule_ctrlr.parentRule\">\n" +
6833 " <span class=\"dropdown\" data-uib-dropdown>\n" +
6834 " <a class=\"btn btn-danger\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span></a>\n" +
6835 " <ul class=\"dropdown-menu\">\n" +
6836 " <li><a>No</a></li>\n" +
6837 " <li><a ng-click=\"rule_ctrlr.deleteRule(rule_ctrlr.parentRule, rule_ctrlr.rule)\">Yes</a></li>\n" +
6838 " </ul>\n" +
6839 " </span>\n" +
6840 " </div>\n" +
6841 "</div>\n"
6842 );
6843
6844
6845 $templateCache.put('templates/directives/search_type_ahead.html',
6846 "<a>\n" +
6847 " <span class=\"tag\" ng-show=\"match.model.tag\">{{match.model.tag}}</span>\n" +
6848 " <span class=\"tag\" ng-show=\"!match.model.tag\">{{match.label}}</span>\n" +
6849 " <span ng-show=\"match.model.example\">-</span> <span class=\"example\">{{match.model.example}}</span>\n" +
6850 " <div class=\"description\">{{match.model.description}}</div>\n" +
6851 "\n" +
6852 "</a>\n"
6853 );
6854
6855
6856 $templateCache.put('templates/directives/user_search_type_ahead.html',
6857 "<a>\n" +
6858 " <span>{{match.label}}</span> -\n" +
6859 " <span class=\"color-secondary\">{{match.model.name}}</span>\n" +
6860 "</a>\n"
6861 );
6862
6868
6863
6869 $templateCache.put('templates/integrations/bitbucket.html',
6864 $templateCache.put('templates/integrations/bitbucket.html',
6870 " <div class=\"modal-header\">\n" +
6865 " <div class=\"modal-header\">\n" +
@@ -7323,23 +7318,26 b' function ChannelstreamController($rootScope, stateHolder, userSelfPropertyResour'
7323 // # services, and proprietary license terms, please see
7318 // # services, and proprietary license terms, please see
7324 // # https://rhodecode.com/licenses/
7319 // # https://rhodecode.com/licenses/
7325
7320
7326 angular.module('appenlight.components.integrationsListView', [])
7321 angular.module('appenlight.components.adminApplicationsListView', [])
7327 .component('integrationsListView', {
7322 .component('adminApplicationsListView', {
7328 templateUrl: 'components/views/applications-integrations-view/applications-integrations-view.html',
7323 templateUrl: 'components/views/admin-applications-list-view/admin-applications-list-view.html',
7329 controller: IntegrationsListViewController
7324 controller: AdminApplicationsListController
7330 });
7325 });
7331
7326
7332 IntegrationsListViewController.$inject = ['$state', 'applicationsResource'];
7327 AdminApplicationsListController.$inject = ['applicationsResource'];
7333
7328
7334 function IntegrationsListViewController($state, applicationsResource) {
7329 function AdminApplicationsListController(applicationsResource) {
7335
7330
7336 var vm = this;
7331 var vm = this;
7337 vm.loading = {application: true};
7332 vm.loading = {applications: true};
7338 vm.resource = applicationsResource.get({resourceId: $state.params.resourceId}, function (data) {
7333
7339 vm.loading.application = false;
7334 vm.applications = applicationsResource.query({
7340 $state.current.data.resource = vm.resource;
7335 root_list: true,
7336 resource_type: 'application'
7337 }, function (data) {
7338 vm.loading = {applications: false};
7341 });
7339 });
7342 }
7340 };
7343
7341
7344 ;// # Copyright (C) 2010-2016 RhodeCode GmbH
7342 ;// # Copyright (C) 2010-2016 RhodeCode GmbH
7345 // #
7343 // #
@@ -7360,23 +7358,48 b' function IntegrationsListViewController($state, applicationsResource) {'
7360 // # services, and proprietary license terms, please see
7358 // # services, and proprietary license terms, please see
7361 // # https://rhodecode.com/licenses/
7359 // # https://rhodecode.com/licenses/
7362
7360
7363 angular.module('appenlight.components.applicationsListView', [])
7361 angular.module('appenlight.components.adminConfigurationView', [])
7364 .component('applicationsListView', {
7362 .component('adminConfigurationView', {
7365 templateUrl: 'components/views/applications-list-view/applications-list-view.html',
7363 templateUrl: 'components/views/admin-configuration-view/admin-configuration-view.html',
7366 controller: ApplicationsListViewController
7364 controller: AdminConfigurationViewController
7367 });
7365 });
7368
7366
7369 ApplicationsListViewController.$inject = ['$state', 'applicationsResource'];
7367 AdminConfigurationViewController.$inject = ['configsResource', 'configsNoIdResource'];
7370
7368
7371 function ApplicationsListViewController($state, applicationsResource) {
7369 function AdminConfigurationViewController(configsResource, configsNoIdResource) {
7372
7373 var vm = this;
7370 var vm = this;
7374 vm.$state = $state;
7371 vm.loading = {config: true};
7375 vm.loading = {applications: true};
7372
7376 vm.applications = applicationsResource.query(null, function(){
7373 var filters = [
7377 vm.loading.applications = false;
7374 'template_footer_html:global',
7378 });
7375 'list_groups_to_non_admins:global',
7379 }
7376 'per_application_reports_rate_limit:global',
7377 'per_application_logs_rate_limit:global',
7378 'per_application_metrics_rate_limit:global',
7379 ];
7380
7381 vm.configs = {};
7382
7383 vm.configList = configsResource.query({filter: filters},
7384 function (data) {
7385 vm.loading = {config: false};
7386 _.each(data, function (item) {
7387 if (vm.configs[item.section] === undefined) {
7388 vm.configs[item.section] = {};
7389 }
7390 vm.configs[item.section][item.key] = item;
7391 });
7392 });
7393
7394 vm.save = function () {
7395 vm.loading.config = true;
7396 _.each(vm.configList, function (item) {
7397 item.$save();
7398 });
7399 vm.loading.config = false;
7400 };
7401
7402 };
7380
7403
7381 ;// # Copyright (C) 2010-2016 RhodeCode GmbH
7404 ;// # Copyright (C) 2010-2016 RhodeCode GmbH
7382 // #
7405 // #
@@ -7397,51 +7420,133 b' function ApplicationsListViewController($state, applicationsResource) {'
7397 // # services, and proprietary license terms, please see
7420 // # services, and proprietary license terms, please see
7398 // # https://rhodecode.com/licenses/
7421 // # https://rhodecode.com/licenses/
7399
7422
7400 angular.module('appenlight.components.applicationsPurgeLogsView', [])
7423 angular.module('appenlight.components.adminGroupsCreateView', [])
7401 .component('applicationsPurgeLogsView', {
7424 .component('adminGroupsCreateView', {
7402 templateUrl: 'components/views/applications-purge-logs-view/applications-purge-logs-view.html',
7425 templateUrl: 'components/views/admin-groups-create-view/admin-groups-create-view.html',
7403 controller: applicationsPurgeLogsViewController
7426 controller: AdminGroupsCreateViewController
7404 });
7427 });
7405
7428
7406 applicationsPurgeLogsViewController.$inject = ['$state' ,'applicationsResource', 'sectionViewResource', 'logsNoIdResource'];
7429 AdminGroupsCreateViewController.$inject = ['$state', 'groupsResource', 'groupsPropertyResource', 'sectionViewResource'];
7407
7430
7408 function applicationsPurgeLogsViewController($state, applicationsResource, sectionViewResource, logsNoIdResource) {
7431 function AdminGroupsCreateViewController($state, groupsResource, groupsPropertyResource, sectionViewResource) {
7409
7432
7410 var vm = this;
7433 var vm = this;
7411 vm.$state = $state;
7434 vm.$state = $state;
7412 vm.loading = {applications: true};
7435 vm.loading = {
7436 group: false,
7437 resource_permissions: false,
7438 users: false
7439 };
7413
7440
7414 vm.namespace = null;
7441 vm.form = {
7415 vm.selectedResource = null;
7442 autocompleteUser: '',
7416 vm.commonNamespaces = [];
7443 }
7417
7444
7418 vm.applications = applicationsResource.query({'type':'update_reports'}, function () {
7419 vm.loading.applications = false;
7420 vm.selectedResource = vm.applications[0].resource_id;
7421 vm.getCommonKeys();
7422 });
7423
7445
7424 /**
7446 if (typeof $state.params.groupId !== 'undefined') {
7425 * Fetches most commonly used tags in logs
7447 vm.loading.group = true;
7426 */
7448 var groupId = $state.params.groupId;
7427 vm.getCommonKeys = function () {
7449 vm.group = groupsResource.get({groupId: groupId}, function (data) {
7428 sectionViewResource.get({
7450 vm.loading.group = false;
7429 section: 'logs_section',
7430 view: 'common_tags',
7431 resource: vm.selectedResource
7432 }, function (data) {
7433 vm.commonNamespaces = data['namespaces']
7434 });
7451 });
7435 };
7436
7452
7437 vm.purgeLogs = function () {
7453 vm.resource_permissions = groupsPropertyResource.query(
7438 vm.loading.applications = true;
7454 {groupId: groupId, key: 'resource_permissions'}, function (data) {
7439 logsNoIdResource.delete({resource:vm.selectedResource,
7455 vm.loading.resource_permissions = false;
7440 namespace: vm.namespace}, function(){
7456 var tmpObj = {
7441 vm.loading.applications = false;
7457 'group': {
7442 });
7458 'application': {},
7443 }
7459 'dashboard': {}
7444 }
7460 }
7461 };
7462 _.each(data, function (item) {
7463
7464 var section = tmpObj[item.type][item.resource_type];
7465 if (typeof section[item.resource_id] == 'undefined') {
7466 section[item.resource_id] = {
7467 self: item,
7468 permissions: []
7469 }
7470 }
7471 section[item.resource_id].permissions.push(item.perm_name);
7472
7473 });
7474 vm.resourcePermissions = tmpObj;
7475 });
7476
7477 vm.users = groupsPropertyResource.query(
7478 {groupId: groupId, key: 'users'}, function (data) {
7479 vm.loading.users = false;
7480 }, function () {
7481 vm.loading.users = false;
7482 });
7483
7484 }
7485 else {
7486 var groupId = null;
7487 }
7488
7489 var formResponse = function (response) {
7490 if (response.status === 422) {
7491 setServerValidation(vm.groupForm, response.data);
7492 }
7493 vm.loading.group = false;
7494 };
7495
7496 vm.createGroup = function () {
7497 vm.loading.group = true;
7498 if (groupId) {
7499 groupsResource.update({groupId: vm.group.id}, vm.group, function (data) {
7500 setServerValidation(vm.groupForm);
7501 vm.loading.group = false;
7502 }, formResponse);
7503 }
7504 else {
7505 groupsResource.save(vm.group, function (data) {
7506 $state.go('admin.group.update', {groupId: data.id});
7507 }, formResponse);
7508 }
7509 };
7510
7511 vm.removeUser = function (user) {
7512 groupsPropertyResource.delete(
7513 {groupId: groupId, key: 'users', user_name: user.user_name},
7514 function (data) {
7515 vm.loading.users = false;
7516 vm.users = _.filter(vm.users, function (item) {
7517 return item != user;
7518 });
7519 }, function () {
7520 vm.loading.users = false;
7521 });
7522 };
7523
7524 vm.addUser = function () {
7525 groupsPropertyResource.save(
7526 {groupId: groupId, key: 'users'},
7527 {user_name: vm.form.autocompleteUser},
7528 function (data) {
7529 vm.loading.users = false;
7530 vm.users.push(data);
7531 vm.form.autocompleteUser = '';
7532 }, function () {
7533 vm.loading.users = false;
7534 });
7535 }
7536
7537 vm.searchUsers = function (searchPhrase) {
7538
7539 return sectionViewResource.query({
7540 section: 'users_section',
7541 view: 'search_users',
7542 'user_name': searchPhrase
7543 }).$promise.then(function (data) {
7544 return _.map(data, function (item) {
7545 return item.user;
7546 });
7547 });
7548 }
7549 };
7445
7550
7446 ;// # Copyright (C) 2010-2016 RhodeCode GmbH
7551 ;// # Copyright (C) 2010-2016 RhodeCode GmbH
7447 // #
7552 // #
@@ -7462,156 +7567,45 b' function applicationsPurgeLogsViewController($state, applicationsResource, secti'
7462 // # services, and proprietary license terms, please see
7567 // # services, and proprietary license terms, please see
7463 // # https://rhodecode.com/licenses/
7568 // # https://rhodecode.com/licenses/
7464
7569
7465 angular.module('appenlight.components.applicationsUpdateView', [])
7570 angular.module('appenlight.components.adminGroupsListView', [])
7466 .component('applicationsUpdateView', {
7571 .component('adminGroupsListView', {
7467 templateUrl: 'components/views/applications-update-view/applications-update-view.html',
7572 templateUrl: 'components/views/admin-groups-list-view/admin-groups-list-view.html',
7468 controller: applicationsUpdateViewController
7573 controller: AdminGroupsListViewController
7469 });
7574 });
7470
7575
7471 applicationsUpdateViewController.$inject = ['$state', 'applicationsNoIdResource', 'applicationsResource', 'applicationsPropertyResource', 'stateHolder'];
7576 AdminGroupsListViewController.$inject = ['$state', 'groupsResource'];
7472
7577
7473 function applicationsUpdateViewController($state, applicationsNoIdResource, applicationsResource, applicationsPropertyResource, stateHolder) {
7578 function AdminGroupsListViewController($state, groupsResource) {
7474 'use strict';
7475
7579
7476 var vm = this;
7580 var vm = this;
7477 vm.$state = $state;
7581 vm.$state = $state;
7478 vm.loading = {application: false};
7582 vm.loading = {groups: true};
7479
7480 vm.groupingOptions = [
7481 ['url_type', 'Error Type + location'],
7482 ['url_traceback', 'Traceback + location'],
7483 ['traceback_server', 'Traceback + Server'],
7484 ];
7485 var resourceId = $state.params.resourceId;
7486 var options = {};
7487 vm.momentJs = moment;
7488 vm.formTransferModel = {password:''};
7489
7490 // set initial data
7491
7492 if (resourceId === 'new') {
7493 vm.resource = {
7494 resource_id: null,
7495 slow_report_threshold: 10,
7496 error_report_threshold: 10,
7497 allow_permanent_storage: true,
7498 default_grouping: vm.groupingOptions[1][0]
7499 };
7500 }
7501 else {
7502 vm.loading.application = true;
7503 vm.resource = applicationsResource.get({
7504 'resourceId': resourceId
7505 }, function (data) {
7506 vm.loading.application = false;
7507 });
7508 }
7509
7510
7511 vm.updateBasicForm = function () {
7512 vm.loading.application = true;
7513 if (vm.resource.resource_id === null) {
7514 applicationsNoIdResource.save(null, vm.resource, function (data) {
7515 stateHolder.AeUser.addApplication(data);
7516 $state.go('applications.update', {resourceId: data.resource_id});
7517 setServerValidation(vm.BasicForm);
7518 }, function (response) {
7519 if (response.status == 422) {
7520 setServerValidation(vm.BasicForm, response.data);
7521 }
7522 vm.loading.application = false;
7523
7524 });
7525 }
7526 else {
7527 applicationsResource.update({resourceId: vm.resource.resource_id},
7528 vm.resource, function (data) {
7529 vm.resource = data;
7530 vm.loading.application = false;
7531 setServerValidation(vm.BasicForm);
7532 }, function (response) {
7533 if (response.status == 422) {
7534 setServerValidation(vm.BasicForm, response.data);
7535 }
7536 vm.loading.application = false;
7537 });
7538 }
7539 };
7540
7541 vm.addRule = function () {
7542
7543 applicationsPropertyResource.save({
7544 resourceId: vm.resource.resource_id,
7545 key: 'postprocessing_rules'
7546 }, null,
7547 function (data) {
7548 vm.resource.postprocessing_rules.push(data);
7549 }
7550 );
7551 };
7552
7583
7553 vm.regenerateAPIKeys = function(){
7584 vm.groups = groupsResource.query({}, function (data) {
7554 vm.loading.application = true;
7585 vm.loading = {groups: false};
7555 applicationsPropertyResource.save({
7586 vm.activeUsers = _.reduce(vm.groups, function(memo, val){
7556 resourceId: vm.resource.resource_id,
7587 if (val.status == 1){
7557 key: 'api_key'
7588 return memo + 1;
7558 }, {password: vm.regenerateAPIKeysPassword},
7559 function (data) {
7560 vm.resource = data;
7561 vm.loading.application = false;
7562 vm.regenerateAPIKeysPassword = '';
7563 setServerValidation(vm.regenerateAPIKeysForm);
7564 },
7565 function (response) {
7566 if (response.status == 422) {
7567 setServerValidation(vm.regenerateAPIKeysForm, response.data);
7568
7569 }
7570 vm.loading.application = false;
7571 }
7589 }
7572 )
7590 return memo;
7573 };
7591 }, 0);
7592
7593 });
7574
7594
7575 vm.deleteApplication = function(){
7576 vm.loading.application = true;
7577 applicationsPropertyResource.update({
7578 resourceId: vm.resource.resource_id,
7579 key: 'delete_resource'
7580 }, vm.formDeleteModel,
7581 function (data) {
7582 stateHolder.AeUser.removeApplicationById(vm.resource.resource_id);
7583 $state.go('applications.list');
7584 },
7585 function (response) {
7586 if (response.status == 422) {
7587 setServerValidation(vm.formDelete, response.data);
7588
7589 }
7590 vm.loading.application = false;
7591 }
7592 );
7593 };
7594
7595
7595 vm.transferApplication = function(){
7596 vm.removeGroup = function (group) {
7596 vm.loading.application = true;
7597 groupsResource.remove({groupId: group.id}, function (data, responseHeaders) {
7597 applicationsPropertyResource.update({
7598
7598 resourceId: vm.resource.resource_id,
7599 if (data) {
7599 key: 'owner'
7600 var index = vm.groups.indexOf(group);
7600 }, vm.formTransferModel,
7601 if (index !== -1) {
7601 function (data) {
7602 vm.groups.splice(index, 1);
7602 $state.go('applications.list');
7603 vm.activeGroups -= 1;
7603 },
7604 function (response) {
7605 if (response.status == 422) {
7606 setServerValidation(vm.formTransfer, response.data);
7607
7608 }
7604 }
7609 vm.loading.application = false;
7610 }
7605 }
7611 )
7606 });
7612 }
7607 }
7613
7608 };
7614 }
7615
7609
7616 ;// # Copyright (C) 2010-2016 RhodeCode GmbH
7610 ;// # Copyright (C) 2010-2016 RhodeCode GmbH
7617 // #
7611 // #
@@ -7632,32 +7626,112 b' function applicationsUpdateViewController($state, applicationsNoIdResource, appl'
7632 // # services, and proprietary license terms, please see
7626 // # services, and proprietary license terms, please see
7633 // # https://rhodecode.com/licenses/
7627 // # https://rhodecode.com/licenses/
7634
7628
7635 angular.module('appenlight.components.eventBrowserView', [])
7629 angular.module('appenlight.components.adminPartitionsView', [])
7636 .component('eventBrowserView', {
7630 .component('adminPartitionsView', {
7637 templateUrl: 'components/views/event-browser/event-browser.html',
7631 templateUrl: 'components/views/admin-partitions-view/admin-partitions-view.html',
7638 controller: EventBrowserController
7632 controller: AdminPartitionsViewController
7639 });
7633 });
7640
7634
7641 EventBrowserController.$inject = ['eventsNoIdResource', 'eventsResource'];
7635 AdminPartitionsViewController.$inject = ['sectionViewResource'];
7642
7636
7643 function EventBrowserController(eventsNoIdResource, eventsResource) {
7637 function AdminPartitionsViewController(sectionViewResource) {
7644 console.info('EventBrowserController');
7645 var vm = this;
7638 var vm = this;
7639 vm.permanentPartitions = [];
7640 vm.dailyPartitions = [];
7641 vm.loading = {partitions: true};
7642 vm.dailyChecked = false;
7643 vm.permChecked = false;
7644 vm.dailyConfirm = '';
7645 vm.permConfirm = '';
7646
7646
7647 vm.loading = {events: true};
7648
7647
7649 vm.events = eventsNoIdResource.query(
7648 vm.loadPartitions = function (data) {
7650 {key: 'events'},
7649 var permanentPartitions = vm.transformPartitionList(
7651 function (data) {
7650 data.permanent_partitions);
7652 vm.loading.events = false;
7651 var dailyPartitions = vm.transformPartitionList(
7653 });
7652 data.daily_partitions);
7653 vm.permanentPartitions = permanentPartitions;
7654 vm.dailyPartitions = dailyPartitions;
7655 vm.loading = {partitions: false};
7656 };
7654
7657
7658 vm.setCheckedList = function (scope) {
7659 var toTest = null;
7660 if (scope === 'dailyPartitions'){
7661 toTest = 'dailyChecked';
7662 }
7663 else{
7664 toTest = 'permChecked';
7665 }
7655
7666
7656 vm.closeEvent = function (event) {
7667 if (vm[toTest]) {
7668 var val = true;
7669 }
7670 else {
7671 var val = false;
7672 }
7657
7673
7658 eventsResource.update({eventId: event.id}, {status: 0}, function (data) {
7674 _.each(vm[scope], function (item) {
7659 event.status = 0;
7675 _.each(item[1].pg, function (index) {
7676 index.checked = val;
7677 });
7678 _.each(item[1].elasticsearch, function (index) {
7679 index.checked = val;
7680 });
7681 });
7682 }
7683
7684
7685 vm.transformPartitionList = function (inputList) {
7686 var outputList = [];
7687
7688 _.each(inputList, function (item) {
7689 var time = [item[0], {
7690 elasticsearch: [],
7691 pg: []
7692 }]
7693 _.each(item[1].pg, function (index) {
7694 time[1].pg.push({name: index, checked: false})
7695 });
7696 _.each(item[1].elasticsearch, function (index) {
7697 time[1].elasticsearch.push({
7698 name: index,
7699 checked: false
7700 })
7701 });
7702 outputList.push(time);
7703 });
7704 return outputList;
7705 };
7706
7707 sectionViewResource.get({section:'admin_section', view: 'partitions'},
7708 vm.loadPartitions);
7709
7710 vm.partitionsDelete = function (partitionType) {
7711 var es_indices = [];
7712 var pg_indices = [];
7713 _.each(vm[partitionType], function (item) {
7714 _.each(item[1].pg, function (index) {
7715 if (index.checked) {
7716 pg_indices.push(index.name)
7717 }
7718 });
7719 _.each(item[1].elasticsearch, function (index) {
7720 if (index.checked) {
7721 es_indices.push(index.name)
7722 }
7723 });
7660 });
7724 });
7725
7726
7727 vm.loading = {partitions: true};
7728 sectionViewResource.save({section:'admin_section',
7729 view: 'partitions_remove'}, {
7730 es_indices: es_indices,
7731 pg_indices: pg_indices,
7732 confirm: 'CONFIRM'
7733 }, vm.loadPartitions);
7734
7661 }
7735 }
7662
7736
7663 }
7737 }
@@ -7681,652 +7755,324 b' function EventBrowserController(eventsNoIdResource, eventsResource) {'
7681 // # services, and proprietary license terms, please see
7755 // # services, and proprietary license terms, please see
7682 // # https://rhodecode.com/licenses/
7756 // # https://rhodecode.com/licenses/
7683
7757
7684 angular.module('appenlight.components.indexDashboardView', [])
7758 angular.module('appenlight.components.adminSystemView', [])
7685 .component('indexDashboardView', {
7759 .component('adminSystemView', {
7686 templateUrl: 'components/views/index-dashboard/index-dashboard.html',
7760 templateUrl: 'components/views/admin-system-view/admin-system-view.html',
7687 controller: IndexDashboardController
7761 controller: AdminSystemViewController
7688 });
7762 });
7689
7763
7690 IndexDashboardController.$inject = ['$rootScope', '$scope', '$location','$cookies', '$interval', 'stateHolder', 'applicationsPropertyResource', 'AeConfig'];
7764 AdminSystemViewController.$inject = ['sectionViewResource'];
7691
7765
7692 function IndexDashboardController($rootScope, $scope, $location, $cookies, $interval, stateHolder, applicationsPropertyResource, AeConfig) {
7766 function AdminSystemViewController(sectionViewResource) {
7693 var vm = this;
7767 var vm = this;
7694 stateHolder.section = 'dashboard';
7768 vm.tables = [];
7695 vm.timeOptions = {};
7769 vm.loading = {system: true};
7696 var allowed = ['1h', '4h', '12h', '24h', '1w', '2w', '1M'];
7770 sectionViewResource.get({
7697 _.each(allowed, function (key) {
7771 section: 'admin_section',
7698 if (allowed.indexOf(key) !== -1) {
7772 view: 'system'
7699 vm.timeOptions[key] = AeConfig.timeOptions[key];
7773 }, null, function (data) {
7700 }
7774 vm.DBtables = data.db_tables;
7775 vm.ESIndices = data.es_indices;
7776 vm.queueStats = data.queue_stats;
7777 vm.systemLoad = data.system_load;
7778 vm.packages = data.packages;
7779 vm.processInfo = data.process_info;
7780 vm.disks = data.disks;
7781 vm.memory = data.memory;
7782 vm.selfInfo = data.self_info;
7783
7784 vm.loading.system = false;
7701 });
7785 });
7702 vm.stateHolder = stateHolder;
7786 };
7703 vm.urls = AeConfig.urls;
7704 vm.applications = stateHolder.AeUser.applications_map;
7705 vm.show_dashboard = false;
7706 vm.resource = null;
7707 vm.graphType = {selected: null};
7708 vm.timeSpan = vm.timeOptions['1h'];
7709 vm.trendingReports = [];
7710 vm.exceptions = 0;
7711 vm.satisfyingRequests = 0;
7712 vm.toleratedRequests = 0;
7713 vm.frustratingRequests = 0;
7714 vm.uptimeStats = 0;
7715 vm.apdexStats = [];
7716 vm.seriesRequestsData = [];
7717 vm.seriesMetricsData = [];
7718 vm.seriesSlowData = [];
7719 vm.slowCalls = [];
7720 vm.slowURIS = [];
7721
7787
7722 vm.reportChartConfig = {
7788 ;// # Copyright (C) 2010-2016 RhodeCode GmbH
7723 data: {
7789 // #
7724 json: [],
7790 // # This program is free software: you can redistribute it and/or modify
7725 xFormat: '%Y-%m-%dT%H:%M:%S'
7791 // # it under the terms of the GNU Affero General Public License, version 3
7726 },
7792 // # (only), as published by the Free Software Foundation.
7727 color: {
7793 // #
7728 pattern: ['#6baed6', '#e6550d', '#74c476', '#fdd0a2', '#8c564b']
7794 // # This program is distributed in the hope that it will be useful,
7729 },
7795 // # but WITHOUT ANY WARRANTY; without even the implied warranty of
7730 axis: {
7796 // # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7731 x: {
7797 // # GNU General Public License for more details.
7732 type: 'timeseries',
7798 // #
7733 tick: {
7799 // # You should have received a copy of the GNU Affero General Public License
7734 culling: {
7800 // # along with this program. If not, see <http://www.gnu.org/licenses/>.
7735 max: 6 // the number of tick texts will be adjusted to less than this value
7801 // #
7736 },
7802 // # This program is dual-licensed. If you wish to learn more about the
7737 format: '%Y-%m-%d %H:%M'
7803 // # AppEnlight Enterprise Edition, including its added features, Support
7738 }
7804 // # services, and proprietary license terms, please see
7739 },
7805 // # https://rhodecode.com/licenses/
7740 y: {
7806
7741 tick: {
7807 angular.module('appenlight.components.adminUsersCreateView', [])
7742 count: 5,
7808 .component('adminUsersCreateView', {
7743 format: d3.format('.2s')
7809 templateUrl: 'components/views/admin-users-create-view/admin-users-create-view.html',
7744 }
7810 controller: AdminUsersCreateViewController
7745 }
7811 });
7746 },
7812
7747 subchart: {
7813 AdminUsersCreateViewController.$inject = ['$state', 'usersResource', 'usersPropertyResource', 'sectionViewResource', 'AeConfig'];
7748 show: true,
7814
7749 size: {
7815 function AdminUsersCreateViewController($state, usersResource, usersPropertyResource, sectionViewResource, AeConfig) {
7750 height: 20
7816
7751 }
7817 var vm = this;
7752 },
7818 vm.$state = $state;
7753 size: {
7819 vm.loading = {user: false};
7754 height: 250
7820
7755 },
7821
7756 zoom: {
7822 if (typeof $state.params.userId !== 'undefined') {
7757 rescale: true
7823 vm.loading.user = true;
7758 },
7824 var userId = $state.params.userId;
7759 grid: {
7825 vm.user = usersResource.get({userId: userId}, function (data) {
7760 x: {
7826 vm.loading.user = false;
7761 show: true
7827 // cast to true for angular checkbox
7762 },
7828 if (vm.user.status === 1) {
7763 y: {
7829 vm.user.status = true;
7764 show: true
7765 }
7766 },
7767 tooltip: {
7768 format: {
7769 title: function (d) {
7770 return '' + d;
7771 },
7772 value: function (v) {
7773 return v
7774 }
7775 }
7830 }
7776 }
7831 });
7777 };
7778 vm.reportChartData = {};
7779
7832
7780 vm.reportSlowChartConfig = {
7833 vm.resource_permissions = usersPropertyResource.query(
7781 data: {
7834 {userId: userId, key: 'resource_permissions'}, function (data) {
7782 json: [],
7835 vm.loading.resource_permissions = false;
7783 xFormat: '%Y-%m-%dT%H:%M:%S'
7836 var tmpObj = {
7784 },
7837 'user': {
7785 color: {
7838 'application': {},
7786 pattern: ['#6baed6', '#e6550d', '#74c476', '#fdd0a2', '#8c564b']
7839 'dashboard': {}
7787 },
7788 axis: {
7789 x: {
7790 type: 'timeseries',
7791 tick: {
7792 culling: {
7793 max: 6 // the number of tick texts will be adjusted to less than this value
7794 },
7840 },
7795 format: '%Y-%m-%d %H:%M'
7841 'group': {
7796 }
7842 'application': {},
7797 },
7843 'dashboard': {}
7798 y: {
7844 }
7799 tick: {
7845 };
7800 count: 5,
7846 _.each(data, function (item) {
7801 format: d3.format('.2s')
7847
7802 }
7848 var section = tmpObj[item.type][item.resource_type];
7803 }
7849 if (typeof section[item.resource_id] == 'undefined'){
7804 },
7850 section[item.resource_id] = {
7805 subchart: {
7851 self:item,
7806 show: true,
7852 permissions: []
7807 size: {
7853 }
7808 height: 20
7854 }
7809 }
7855 section[item.resource_id].permissions.push(item.perm_name);
7810 },
7856
7811 size: {
7857 });
7812 height: 250
7858 vm.resourcePermissions = tmpObj;
7813 },
7859 });
7814 zoom: {
7860
7815 rescale: true
7861 }
7816 },
7862 else {
7817 grid: {
7863 var userId = null;
7818 x: {
7864 vm.user = {
7819 show: true
7865 status: true
7820 },
7821 y: {
7822 show: true
7823 }
7824 },
7825 tooltip: {
7826 format: {
7827 title: function (d) {
7828 return '' + d;
7829 },
7830 value: function (v) {
7831 return v
7832 }
7833 }
7834 }
7866 }
7835 };
7867 }
7836 vm.reportSlowChartData = {};
7837
7868
7838 vm.metricsChartConfig = {
7869 var formResponse = function (response) {
7839 data: {
7870 if (response.status == 422) {
7840 json: [],
7871 setServerValidation(vm.profileForm, response.data);
7841 xFormat: '%Y-%m-%dT%H:%M:%S',
7842 keys: {
7843 x: 'x',
7844 value: ["main", "sql", "nosql", "tmpl", "remote", "custom"]
7845 },
7846 names: {
7847 main: 'View/Application logic',
7848 sql: 'Relational database queries',
7849 nosql: 'NoSql datastore calls',
7850 tmpl: 'Template rendering',
7851 custom: 'Custom timed calls',
7852 remote: 'Requests to remote resources'
7853 },
7854 type: 'area',
7855 groups: [["main", "sql", "nosql", "remote", "custom", "tmpl"]],
7856 order: null
7857 },
7858 color: {
7859 pattern: ['#6baed6', '#c7e9c0', '#fd8d3c', '#d6616b', '#ffcc00', '#c6dbef']
7860 },
7861 axis: {
7862 x: {
7863 type: 'timeseries',
7864 tick: {
7865 culling: {
7866 max: 6 // the number of tick texts will be adjusted to less than this value
7867 },
7868 format: '%Y-%m-%d %H:%M'
7869 }
7870 },
7871 y: {
7872 tick: {
7873 count: 5,
7874 format: d3.format('.2f')
7875 }
7876 }
7877 },
7878 point: {
7879 show: false
7880 },
7881 subchart: {
7882 show: true,
7883 size: {
7884 height: 20
7885 }
7886 },
7887 size: {
7888 height: 350
7889 },
7890 zoom: {
7891 rescale: true
7892 },
7893 grid: {
7894 x: {
7895 show: true
7896 },
7897 y: {
7898 show: true
7899 }
7900 },
7901 tooltip: {
7902 format: {
7903 title: function (d) {
7904 return '' + d;
7905 },
7906 value: function (v) {
7907 return v
7908 }
7909 }
7910 }
7872 }
7911 };
7873 vm.loading.user = false;
7912 vm.metricsChartData = {};
7874 }
7913
7875
7914 vm.responseChartConfig = {
7876 vm.createUser = function () {
7915 data: {
7877 vm.loading.user = true;
7916 json: [],
7878
7917 xFormat: '%Y-%m-%dT%H:%M:%S'
7879 if (userId) {
7918 },
7880 usersResource.update({userId: vm.user.id}, vm.user, function (data) {
7919 color: {
7881 setServerValidation(vm.profileForm);
7920 pattern: ['#d6616b', '#6baed6', '#fd8d3c']
7882 vm.loading.user = false;
7921 },
7883 }, formResponse);
7922 axis: {
7923 x: {
7924 type: 'timeseries',
7925 tick: {
7926 culling: {
7927 max: 6 // the number of tick texts will be adjusted to less than this value
7928 },
7929 format: '%Y-%m-%d %H:%M'
7930 }
7931 },
7932 y: {
7933 tick: {
7934 count: 5,
7935 format: d3.format('.2f')
7936 }
7937 }
7938 },
7939 point: {
7940 show: false
7941 },
7942 subchart: {
7943 show: true,
7944 size: {
7945 height: 20
7946 }
7947 },
7948 size: {
7949 height: 350
7950 },
7951 zoom: {
7952 rescale: true
7953 },
7954 grid: {
7955 x: {
7956 show: true
7957 },
7958 y: {
7959 show: true
7960 }
7961 },
7962 tooltip: {
7963 format: {
7964 title: function (d) {
7965 return '' + d;
7966 },
7967 value: function (v) {
7968 return v
7969 }
7970 }
7971 }
7884 }
7972 };
7885 else {
7973 vm.responseChartData = {};
7886 usersResource.save(vm.user, function (data) {
7887 $state.go('admin.user.update', {userId: data.id});
7888 }, formResponse);
7889 }
7890 }
7974
7891
7975 vm.requestsChartConfig = {
7892 vm.generatePassword = function () {
7976 data: {
7893 var length = 8;
7977 json: [],
7894 var charset = "abcdefghijklnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
7978 xFormat: '%Y-%m-%dT%H:%M:%S'
7895 vm.gen_pass = "";
7979 },
7896 for (var i = 0, n = charset.length; i < length; ++i) {
7980 color: {
7897 vm.gen_pass += charset.charAt(Math.floor(Math.random() * n));
7981 pattern: ['#d6616b', '#6baed6', '#fd8d3c']
7982 },
7983 axis: {
7984 x: {
7985 type: 'timeseries',
7986 tick: {
7987 culling: {
7988 max: 6 // the number of tick texts will be adjusted to less than this value
7989 },
7990 format: '%Y-%m-%d %H:%M'
7991 }
7992 },
7993 y: {
7994 tick: {
7995 count: 5,
7996 format: d3.format('.2f')
7997 }
7998 }
7999 },
8000 point: {
8001 show: false
8002 },
8003 subchart: {
8004 show: true,
8005 size: {
8006 height: 20
8007 }
8008 },
8009 size: {
8010 height: 350
8011 },
8012 zoom: {
8013 rescale: true
8014 },
8015 grid: {
8016 x: {
8017 show: true
8018 },
8019 y: {
8020 show: true
8021 }
8022 },
8023 tooltip: {
8024 format: {
8025 title: function (d) {
8026 return '' + d;
8027 },
8028 value: function (v) {
8029 return v
8030 }
8031 }
8032 }
7898 }
8033 };
7899 vm.user.user_password = '' + vm.gen_pass;
8034 vm.requestsChartData = {};
7900
8035
7901 }
8036 vm.loading = {
8037 'apdex': true,
8038 'reports': true,
8039 'graphs': true,
8040 'slowCalls': true,
8041 'slowURIS': true,
8042 'requestsBreakdown': true,
8043 'series': true
8044 };
8045 vm.stream = {paused: false, filtered: false, messages: [], reports: []};
8046
7902
8047 $rootScope.$on('channelstream-message.front_dashboard.new_topic', function(event, message){
7903 vm.reloginUser = function () {
8048 var ws_report = message.message.report;
7904 sectionViewResource.get({
8049 if (ws_report.http_status != 500) {
7905 section: 'admin_section', view: 'relogin_user',
8050 return
7906 user_id: vm.user.id
8051 }
7907 }, function () {
8052 if (vm.stream.paused == true) {
7908 window.location = AeConfig.urls.baseUrl;
8053 return
8054 }
8055 if (vm.stream.filtered && ws_report.resource_id != vm.resource) {
8056 return
8057 }
8058 var should_insert = true;
8059 _.each(vm.stream.reports, function (report) {
8060 if (report.report_id == ws_report.report_id) {
8061 report.occurences = ws_report.occurences;
8062 should_insert = false;
8063 }
8064 });
7909 });
8065 if (should_insert) {
7910
8066 if (vm.stream.reports.length > 7) {
7911 }
8067 vm.stream.reports.pop();
7912 };
8068 }
7913
8069 vm.stream.reports.unshift(ws_report);
7914 ;// # Copyright (C) 2010-2016 RhodeCode GmbH
8070 }
7915 // #
7916 // # This program is free software: you can redistribute it and/or modify
7917 // # it under the terms of the GNU Affero General Public License, version 3
7918 // # (only), as published by the Free Software Foundation.
7919 // #
7920 // # This program is distributed in the hope that it will be useful,
7921 // # but WITHOUT ANY WARRANTY; without even the implied warranty of
7922 // # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7923 // # GNU General Public License for more details.
7924 // #
7925 // # You should have received a copy of the GNU Affero General Public License
7926 // # along with this program. If not, see <http://www.gnu.org/licenses/>.
7927 // #
7928 // # This program is dual-licensed. If you wish to learn more about the
7929 // # AppEnlight Enterprise Edition, including its added features, Support
7930 // # services, and proprietary license terms, please see
7931 // # https://rhodecode.com/licenses/
7932
7933 angular.module('appenlight.components.adminUsersListView', [])
7934 .component('adminUsersListView', {
7935 templateUrl: 'components/views/admin-users-list-view/admin-users-list-view.html',
7936 controller: AdminUserListViewController
8071 });
7937 });
8072
7938
8073 vm.determineStartState = function () {
7939 AdminUserListViewController.$inject = ['usersResource'];
8074 if (stateHolder.AeUser.applications.length) {
8075 vm.resource = Number($location.search().resource);
8076
7940
8077 if (!vm.resource){
7941 function AdminUserListViewController(usersResource) {
8078 var cookieResource = $cookies.getObject('resource');
7942
8079
7943 var vm = this;
7944 vm.loading = {users: true};
8080
7945
8081 if (cookieResource) {
7946 vm.users = usersResource.query({}, function (data) {
8082 vm.resource = cookieResource;
7947 vm.loading = {users: false};
8083 }
7948 vm.activeUsers = _.reduce(vm.users, function(memo, val){
8084 else{
7949 if (val.status == 1){
8085 vm.resource = stateHolder.AeUser.applications[0].resource_id;
7950 return memo + 1;
8086 }
8087 }
7951 }
8088 }
7952 return memo;
7953 }, 0);
7954
7955 });
8089
7956
8090 var timespan = $location.search().timespan;
8091
7957
8092 if(_.has(vm.timeOptions, timespan)){
7958 vm.removeUser = function (user) {
8093 vm.timeSpan = vm.timeOptions[timespan];
7959 usersResource.remove({userId: user.id}, function (data, responseHeaders) {
8094 }
7960
8095 else{
7961 if (data) {
8096 vm.timeSpan = vm.timeOptions['1h'];
7962 var index = vm.users.indexOf(user);
8097 }
7963 if (index !== -1) {
7964 vm.users.splice(index, 1);
7965 vm.activeUsers -= 1;
7966 }
7967 }
7968 });
7969 }
7970 };
8098
7971
8099 var graphType = $location.search().graphtype;
7972 ;// # Copyright (C) 2010-2016 RhodeCode GmbH
8100 if(!graphType){
7973 // #
8101 vm.graphType = {selected: 'metrics_graphs'};
7974 // # This program is free software: you can redistribute it and/or modify
8102 }
7975 // # it under the terms of the GNU Affero General Public License, version 3
8103 else{
7976 // # (only), as published by the Free Software Foundation.
8104 vm.graphType = {selected: graphType};
7977 // #
8105 }
7978 // # This program is distributed in the hope that it will be useful,
8106 vm.updateSearchParams();
7979 // # but WITHOUT ANY WARRANTY; without even the implied warranty of
8107 };
7980 // # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7981 // # GNU General Public License for more details.
7982 // #
7983 // # You should have received a copy of the GNU Affero General Public License
7984 // # along with this program. If not, see <http://www.gnu.org/licenses/>.
7985 // #
7986 // # This program is dual-licensed. If you wish to learn more about the
7987 // # AppEnlight Enterprise Edition, including its added features, Support
7988 // # services, and proprietary license terms, please see
7989 // # https://rhodecode.com/licenses/
8108
7990
8109 vm.updateSearchParams = function () {
7991 angular.module('appenlight.components.adminView', [])
8110 $location.search('resource', vm.resource);
7992 .component('adminView', {
8111 $location.search('timespan', vm.timeSpan.key);
7993 templateUrl: 'components/views/admin-view/admin-view.html',
8112 $location.search('graphtype', vm.graphType.selected);
7994 controller: AdminViewController
8113 stateHolder.resource = vm.resource;
7995 });
8114
7996
8115 if (vm.resource){
7997 AdminViewController.$inject = ['$state'];
8116 $cookies.putObject('resource', vm.resource,
8117 {expires:new Date(3000, 1, 1)});
8118 }
8119 vm.refreshData();
8120 };
8121
7998
8122 vm.refreshData = function () {
7999 function AdminViewController($state) {
8123 vm.fetchApdexStats();
8000 this.$state = $state;
8124 vm.fetchTrendingReports();
8001 console.info('AdminViewController');
8125 vm.fetchMetrics();
8002 }
8126 vm.fetchRequestsBreakdown();
8127 vm.fetchSlowCalls();
8128 };
8129
8003
8130 vm.changedTimeSpan = function(){
8004 ;// # Copyright (C) 2010-2016 RhodeCode GmbH
8131 vm.startDateFilter = timeSpanToStartDate(vm.timeSpan.key);
8005 // #
8132 vm.refreshData();
8006 // # This program is free software: you can redistribute it and/or modify
8133 };
8007 // # it under the terms of the GNU Affero General Public License, version 3
8008 // # (only), as published by the Free Software Foundation.
8009 // #
8010 // # This program is distributed in the hope that it will be useful,
8011 // # but WITHOUT ANY WARRANTY; without even the implied warranty of
8012 // # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
8013 // # GNU General Public License for more details.
8014 // #
8015 // # You should have received a copy of the GNU Affero General Public License
8016 // # along with this program. If not, see <http://www.gnu.org/licenses/>.
8017 // #
8018 // # This program is dual-licensed. If you wish to learn more about the
8019 // # AppEnlight Enterprise Edition, including its added features, Support
8020 // # services, and proprietary license terms, please see
8021 // # https://rhodecode.com/licenses/
8134
8022
8135 vm.intervalId = $interval(function () {
8023 angular.module('appenlight.components.integrationsListView', [])
8136 if (_.contains(['30m', "1h"], vm.timeSpan.key)) {
8024 .component('integrationsListView', {
8137 // don't do anything if window is unfocused
8025 templateUrl: 'components/views/applications-integrations-view/applications-integrations-view.html',
8138 if(document.hidden === true){
8026 controller: IntegrationsListViewController
8139 return ;
8027 });
8140 }
8141 vm.refreshData();
8142 }
8143 }, 60000);
8144
8028
8145 vm.fetchApdexStats = function () {
8029 IntegrationsListViewController.$inject = ['$state', 'applicationsResource'];
8146 vm.loading.apdex = true;
8147 vm.apdexStats = applicationsPropertyResource.query({
8148 'key': 'apdex_stats',
8149 'resourceId': vm.resource,
8150 "start_date": timeSpanToStartDate(vm.timeSpan.key)
8151 },
8152 function (data) {
8153 vm.loading.apdex = false;
8154
8030
8155 vm.exceptions = _.reduce(data, function (memo, row) {
8031 function IntegrationsListViewController($state, applicationsResource) {
8156 return memo + row.errors;
8032
8157 }, 0);
8033 var vm = this;
8158 vm.satisfyingRequests = _.reduce(data, function (memo, row) {
8034 vm.loading = {application: true};
8159 return memo + row.satisfying_requests;
8035 vm.resource = applicationsResource.get({resourceId: $state.params.resourceId}, function (data) {
8160 }, 0);
8036 vm.loading.application = false;
8161 vm.toleratedRequests = _.reduce(data, function (memo, row) {
8037 $state.current.data.resource = vm.resource;
8162 return memo + row.tolerated_requests;
8038 });
8163 }, 0);
8039 }
8164 vm.frustratingRequests = _.reduce(data, function (memo, row) {
8165 return memo + row.frustrating_requests;
8166 }, 0);
8167 if (data.length) {
8168 vm.uptimeStats = data[0].uptime;
8169 }
8170
8171 },
8172 function () {
8173 vm.loading.apdex = false;
8174 }
8175 );
8176 }
8177
8178 vm.fetchMetrics = function () {
8179 vm.loading.series = true;
8180 applicationsPropertyResource.query({
8181 'resourceId': vm.resource,
8182 'key': vm.graphType.selected,
8183 "start_date": timeSpanToStartDate(vm.timeSpan.key)
8184 }, function (data) {
8185 if (vm.graphType.selected == 'metrics_graphs') {
8186 vm.metricsChartData = {
8187 json: data,
8188 xFormat: '%Y-%m-%dT%H:%M:%S',
8189 keys: {
8190 x: 'x',
8191 value: ["main", "sql", "nosql", "tmpl", "remote", "custom"]
8192 },
8193 names: {
8194 main: 'View/Application logic',
8195 sql: 'Relational database queries',
8196 nosql: 'NoSql datastore calls',
8197 tmpl: 'Template rendering',
8198 custom: 'Custom timed calls',
8199 remote: 'Requests to remote resources'
8200 },
8201 type: 'area',
8202 groups: [["main", "sql", "nosql", "remote", "custom", "tmpl"]],
8203 order: null
8204 };
8205 }
8206 else if (vm.graphType.selected == 'report_graphs') {
8207 vm.reportChartData = {
8208 json: data,
8209 xFormat: '%Y-%m-%dT%H:%M:%S',
8210 keys: {
8211 x: 'x',
8212 value: ["not_found", "report"]
8213 },
8214 names: {
8215 report: 'Errors',
8216 not_found: '404\'s requests'
8217 },
8218 type: 'bar'
8219 };
8220 }
8221 else if (vm.graphType.selected == 'slow_report_graphs') {
8222 vm.reportSlowChartData = {
8223 json: data,
8224 xFormat: '%Y-%m-%dT%H:%M:%S',
8225 keys: {
8226 x: 'x',
8227 value: ["slow_report"]
8228 },
8229 names: {
8230 slow_report: 'Slow reports'
8231 },
8232 type: 'bar'
8233 };
8234 }
8235 else if (vm.graphType.selected == 'response_graphs') {
8236 vm.responseChartData = {
8237 json: data,
8238 xFormat: '%Y-%m-%dT%H:%M:%S',
8239 keys: {
8240 x: 'x',
8241 value: ["today", "days_ago_2", "days_ago_7"]
8242 },
8243 names: {
8244 today: 'Today',
8245 "days_ago_2": '2 days ago',
8246 "days_ago_7": '7 days ago'
8247 }
8248 };
8249 }
8250 else if (vm.graphType.selected == 'requests_graphs') {
8251 vm.requestsChartData = {
8252 json: data,
8253 xFormat: '%Y-%m-%dT%H:%M:%S',
8254 keys: {
8255 x: 'x',
8256 value: ["requests"]
8257 },
8258 names: {
8259 requests: 'Requests/s'
8260 }
8261 };
8262 }
8263 vm.loading.series = false;
8264 }, function(){
8265 vm.loading.series = false;
8266 });
8267 }
8268
8269 vm.fetchSlowCalls = function () {
8270 vm.loading.slowCalls = true;
8271 applicationsPropertyResource.query({
8272 'resourceId': vm.resource,
8273 "start_date": timeSpanToStartDate(vm.timeSpan.key),
8274 'key': 'slow_calls'
8275 }, function (data) {
8276 vm.slowCalls = data;
8277 vm.loading.slowCalls = false;
8278 }, function () {
8279 vm.loading.slowCalls = false;
8280 });
8281 }
8282
8283 vm.fetchRequestsBreakdown = function () {
8284 vm.loading.requestsBreakdown = true;
8285 applicationsPropertyResource.query({
8286 'resourceId': vm.resource,
8287 "start_date": timeSpanToStartDate(vm.timeSpan.key),
8288 'key': 'requests_breakdown'
8289 }, function (data) {
8290 vm.requestsBreakdown = data;
8291 vm.loading.requestsBreakdown = false;
8292 }, function () {
8293 vm.loading.requestsBreakdown = false;
8294 });
8295 }
8296
8040
8297 vm.fetchTrendingReports = function () {
8041 ;// # Copyright (C) 2010-2016 RhodeCode GmbH
8042 // #
8043 // # This program is free software: you can redistribute it and/or modify
8044 // # it under the terms of the GNU Affero General Public License, version 3
8045 // # (only), as published by the Free Software Foundation.
8046 // #
8047 // # This program is distributed in the hope that it will be useful,
8048 // # but WITHOUT ANY WARRANTY; without even the implied warranty of
8049 // # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
8050 // # GNU General Public License for more details.
8051 // #
8052 // # You should have received a copy of the GNU Affero General Public License
8053 // # along with this program. If not, see <http://www.gnu.org/licenses/>.
8054 // #
8055 // # This program is dual-licensed. If you wish to learn more about the
8056 // # AppEnlight Enterprise Edition, including its added features, Support
8057 // # services, and proprietary license terms, please see
8058 // # https://rhodecode.com/licenses/
8298
8059
8299 if (vm.graphType.selected == 'slow_report_graphs') {
8060 angular.module('appenlight.components.applicationsListView', [])
8300 var report_type = 'slow';
8061 .component('applicationsListView', {
8301 }
8062 templateUrl: 'components/views/applications-list-view/applications-list-view.html',
8302 else {
8063 controller: ApplicationsListViewController
8303 var report_type = 'error';
8064 });
8304 }
8305
8065
8306 vm.loading.reports = true;
8066 ApplicationsListViewController.$inject = ['$state', 'applicationsResource'];
8307 vm.trendingReports = applicationsPropertyResource.query({
8308 'key': 'trending_reports',
8309 'resourceId': vm.resource,
8310 "start_date": timeSpanToStartDate(vm.timeSpan.key),
8311 "report_type": report_type
8312 },
8313 function () {
8314 vm.loading.reports = false;
8315 },
8316 function () {
8317 vm.loading.reports = false;
8318 }
8319 );
8320 };
8321
8067
8322 $scope.$on('$destroy',function(){
8068 function ApplicationsListViewController($state, applicationsResource) {
8323 $interval.cancel(vm.intervalId);
8069
8070 var vm = this;
8071 vm.$state = $state;
8072 vm.loading = {applications: true};
8073 vm.applications = applicationsResource.query(null, function(){
8074 vm.loading.applications = false;
8324 });
8075 });
8325
8326 if (stateHolder.AeUser.applications.length){
8327 vm.show_dashboard = true;
8328 vm.determineStartState();
8329 }
8330 }
8076 }
8331
8077
8332 ;// # Copyright (C) 2010-2016 RhodeCode GmbH
8078 ;// # Copyright (C) 2010-2016 RhodeCode GmbH
@@ -8348,121 +8094,221 b' function IndexDashboardController($rootScope, $scope, $location, $cookies, $inte'
8348 // # services, and proprietary license terms, please see
8094 // # services, and proprietary license terms, please see
8349 // # https://rhodecode.com/licenses/
8095 // # https://rhodecode.com/licenses/
8350
8096
8097 angular.module('appenlight.components.applicationsPurgeLogsView', [])
8098 .component('applicationsPurgeLogsView', {
8099 templateUrl: 'components/views/applications-purge-logs-view/applications-purge-logs-view.html',
8100 controller: applicationsPurgeLogsViewController
8101 });
8351
8102
8352 ApplicationsIntegrationsEditViewController.$inject = ['$state', 'integrationResource'];
8103 applicationsPurgeLogsViewController.$inject = ['$state' ,'applicationsResource', 'sectionViewResource', 'logsNoIdResource'];
8353
8104
8354 function ApplicationsIntegrationsEditViewController($state, integrationResource) {
8105 function applicationsPurgeLogsViewController($state, applicationsResource, sectionViewResource, logsNoIdResource) {
8355
8106
8356 var vm = this;
8107 var vm = this;
8357 vm.$state = $state;
8108 vm.$state = $state;
8358 vm.loading = {integration: true};
8109 vm.loading = {applications: true};
8359 vm.config = integrationResource.get(
8110
8360 {
8111 vm.namespace = null;
8361 integration: $state.params.integration,
8112 vm.selectedResource = null;
8362 action: 'setup',
8113 vm.commonNamespaces = [];
8363 resourceId: $state.params.resourceId
8114
8115 vm.applications = applicationsResource.query({'type':'update_reports'}, function () {
8116 vm.loading.applications = false;
8117 vm.selectedResource = vm.applications[0].resource_id;
8118 vm.getCommonKeys();
8119 });
8120
8121 /**
8122 * Fetches most commonly used tags in logs
8123 */
8124 vm.getCommonKeys = function () {
8125 sectionViewResource.get({
8126 section: 'logs_section',
8127 view: 'common_tags',
8128 resource: vm.selectedResource
8364 }, function (data) {
8129 }, function (data) {
8365 vm.loading.integration = false;
8130 vm.commonNamespaces = data['namespaces']
8366 });
8131 });
8367
8368 vm.configureIntegration = function () {
8369 console.info('configureIntegration');
8370 vm.loading.integration = true;
8371 integrationResource.save(
8372 {
8373 integration: $state.params.integration,
8374 action: 'setup',
8375 resourceId: $state.params.resourceId
8376 }, vm.config, function (data) {
8377 vm.loading.integration = false;
8378 setServerValidation(vm.integrationForm);
8379 }, function (response) {
8380 if (response.status == 422) {
8381 setServerValidation(vm.integrationForm, response.data);
8382 }
8383 vm.loading.integration = false;
8384 });
8385 };
8132 };
8386
8133
8387 vm.removeIntegration = function () {
8134 vm.purgeLogs = function () {
8388 console.info('removeIntegration');
8135 vm.loading.applications = true;
8389 integrationResource.remove({
8136 logsNoIdResource.delete({resource:vm.selectedResource,
8390 integration: $state.params.integration,
8137 namespace: vm.namespace}, function(){
8391 resourceId: $state.params.resourceId,
8138 vm.loading.applications = false;
8392 action: 'delete'
8139 });
8393 },
8394 function () {
8395 $state.go('applications.integrations',
8396 {resourceId: $state.params.resourceId});
8397 }
8398 );
8399 }
8140 }
8141 }
8400
8142
8401 vm.testIntegration = function (to_test) {
8143 ;// # Copyright (C) 2010-2016 RhodeCode GmbH
8402 console.info('testIntegration', to_test);
8144 // #
8403 vm.loading.integration = true;
8145 // # This program is free software: you can redistribute it and/or modify
8404 integrationResource.save(
8146 // # it under the terms of the GNU Affero General Public License, version 3
8405 {
8147 // # (only), as published by the Free Software Foundation.
8406 integration: $state.params.integration,
8148 // #
8407 action: 'test_' + to_test,
8149 // # This program is distributed in the hope that it will be useful,
8408 resourceId: $state.params.resourceId
8150 // # but WITHOUT ANY WARRANTY; without even the implied warranty of
8409 }, vm.config, function (data) {
8151 // # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
8410 vm.loading.integration = false;
8152 // # GNU General Public License for more details.
8411 }, function (response) {
8153 // #
8412 vm.loading.integration = false;
8154 // # You should have received a copy of the GNU Affero General Public License
8413 });
8155 // # along with this program. If not, see <http://www.gnu.org/licenses/>.
8414 }
8156 // #
8157 // # This program is dual-licensed. If you wish to learn more about the
8158 // # AppEnlight Enterprise Edition, including its added features, Support
8159 // # services, and proprietary license terms, please see
8160 // # https://rhodecode.com/licenses/
8161
8162 angular.module('appenlight.components.applicationsUpdateView', [])
8163 .component('applicationsUpdateView', {
8164 templateUrl: 'components/views/applications-update-view/applications-update-view.html',
8165 controller: applicationsUpdateViewController
8166 });
8167
8168 applicationsUpdateViewController.$inject = ['$state', 'applicationsNoIdResource', 'applicationsResource', 'applicationsPropertyResource', 'stateHolder'];
8415
8169
8170 function applicationsUpdateViewController($state, applicationsNoIdResource, applicationsResource, applicationsPropertyResource, stateHolder) {
8171 'use strict';
8416
8172
8417 }
8173 var vm = this;
8174 vm.$state = $state;
8175 vm.loading = {application: false};
8418
8176
8419 ;angular.module('appenlight.components.bitbucketIntegrationConfigView', [])
8177 vm.groupingOptions = [
8420 .component('bitbucketIntegrationConfigView', {
8178 ['url_type', 'Error Type + location'],
8421 templateUrl: 'components/views/integrations/bitbucket-integration-config-view/bitbucket-integration-config-view.html',
8179 ['url_traceback', 'Traceback + location'],
8422 controller: ApplicationsIntegrationsEditViewController
8180 ['traceback_server', 'Traceback + Server'],
8423 });
8181 ];
8182 var resourceId = $state.params.resourceId;
8183 var options = {};
8184 vm.momentJs = moment;
8185 vm.formTransferModel = {password:''};
8424
8186
8425 ;angular.module('appenlight.components.campfireIntegrationConfigView', [])
8187 // set initial data
8426 .component('campfireIntegrationConfigView', {
8427 templateUrl: 'components/views/integrations/campfire-integration-config-view/campfire-integration-config-view.html',
8428 controller: ApplicationsIntegrationsEditViewController
8429 });
8430
8188
8431 ;angular.module('appenlight.components.flowdockIntegrationConfigView', [])
8189 if (resourceId === 'new') {
8432 .component('flowdockIntegrationConfigView', {
8190 vm.resource = {
8433 templateUrl: 'components/views/integrations/flowdock-integration-config-view/flowdock-integration-config-view.html',
8191 resource_id: null,
8434 controller: ApplicationsIntegrationsEditViewController
8192 slow_report_threshold: 10,
8435 });
8193 error_report_threshold: 10,
8194 allow_permanent_storage: true,
8195 default_grouping: vm.groupingOptions[1][0]
8196 };
8197 }
8198 else {
8199 vm.loading.application = true;
8200 vm.resource = applicationsResource.get({
8201 'resourceId': resourceId
8202 }, function (data) {
8203 vm.loading.application = false;
8204 });
8205 }
8436
8206
8437 ;angular.module('appenlight.components.githubIntegrationConfigView', [])
8438 .component('githubIntegrationConfigView', {
8439 templateUrl: 'components/views/integrations/github-integration-config-view/github-integration-config-view.html',
8440 controller: ApplicationsIntegrationsEditViewController
8441 });
8442
8207
8443 ;angular.module('appenlight.components.hipchatIntegrationConfigView', [])
8208 vm.updateBasicForm = function () {
8444 .component('hipchatIntegrationConfigView', {
8209 vm.loading.application = true;
8445 templateUrl: 'components/views/integrations/hipchat-integration-config-view/hipchat-integration-config-view.html',
8210 if (vm.resource.resource_id === null) {
8446 controller: ApplicationsIntegrationsEditViewController
8211 applicationsNoIdResource.save(null, vm.resource, function (data) {
8447 });
8212 stateHolder.AeUser.addApplication(data);
8213 $state.go('applications.update', {resourceId: data.resource_id});
8214 setServerValidation(vm.BasicForm);
8215 }, function (response) {
8216 if (response.status == 422) {
8217 setServerValidation(vm.BasicForm, response.data);
8218 }
8219 vm.loading.application = false;
8220
8221 });
8222 }
8223 else {
8224 applicationsResource.update({resourceId: vm.resource.resource_id},
8225 vm.resource, function (data) {
8226 vm.resource = data;
8227 vm.loading.application = false;
8228 setServerValidation(vm.BasicForm);
8229 }, function (response) {
8230 if (response.status == 422) {
8231 setServerValidation(vm.BasicForm, response.data);
8232 }
8233 vm.loading.application = false;
8234 });
8235 }
8236 };
8448
8237
8449 ;angular.module('appenlight.components.jiraIntegrationConfigView', [])
8238 vm.addRule = function () {
8450 .component('jiraIntegrationConfigView', {
8239
8451 templateUrl: 'components/views/integrations/jira-integration-config-view/jira-integration-config-view.html',
8240 applicationsPropertyResource.save({
8452 controller: ApplicationsIntegrationsEditViewController
8241 resourceId: vm.resource.resource_id,
8453 });
8242 key: 'postprocessing_rules'
8243 }, null,
8244 function (data) {
8245 vm.resource.postprocessing_rules.push(data);
8246 }
8247 );
8248 };
8454
8249
8455 ;angular.module('appenlight.components.slackIntegrationConfigView', [])
8250 vm.regenerateAPIKeys = function(){
8456 .component('slackIntegrationConfigView', {
8251 vm.loading.application = true;
8457 templateUrl: 'components/views/integrations/slack-integration-config-view/slack-integration-config-view.html',
8252 applicationsPropertyResource.save({
8458 controller: ApplicationsIntegrationsEditViewController
8253 resourceId: vm.resource.resource_id,
8459 });
8254 key: 'api_key'
8255 }, {password: vm.regenerateAPIKeysPassword},
8256 function (data) {
8257 vm.resource = data;
8258 vm.loading.application = false;
8259 vm.regenerateAPIKeysPassword = '';
8260 setServerValidation(vm.regenerateAPIKeysForm);
8261 },
8262 function (response) {
8263 if (response.status == 422) {
8264 setServerValidation(vm.regenerateAPIKeysForm, response.data);
8265
8266 }
8267 vm.loading.application = false;
8268 }
8269 )
8270 };
8460
8271
8461 ;angular.module('appenlight.components.webhooksIntegrationConfigView', [])
8272 vm.deleteApplication = function(){
8462 .component('webhooksIntegrationConfigView', {
8273 vm.loading.application = true;
8463 templateUrl: 'components/views/integrations/webhooks-integration-config-view/webhooks-integration-config-view.html',
8274 applicationsPropertyResource.update({
8464 controller: ApplicationsIntegrationsEditViewController
8275 resourceId: vm.resource.resource_id,
8465 });
8276 key: 'delete_resource'
8277 }, vm.formDeleteModel,
8278 function (data) {
8279 stateHolder.AeUser.removeApplicationById(vm.resource.resource_id);
8280 $state.go('applications.list');
8281 },
8282 function (response) {
8283 if (response.status == 422) {
8284 setServerValidation(vm.formDelete, response.data);
8285
8286 }
8287 vm.loading.application = false;
8288 }
8289 );
8290 };
8291
8292 vm.transferApplication = function(){
8293 vm.loading.application = true;
8294 applicationsPropertyResource.update({
8295 resourceId: vm.resource.resource_id,
8296 key: 'owner'
8297 }, vm.formTransferModel,
8298 function (data) {
8299 $state.go('applications.list');
8300 },
8301 function (response) {
8302 if (response.status == 422) {
8303 setServerValidation(vm.formTransfer, response.data);
8304
8305 }
8306 vm.loading.application = false;
8307 }
8308 )
8309 }
8310
8311 }
8466
8312
8467 ;// # Copyright (C) 2010-2016 RhodeCode GmbH
8313 ;// # Copyright (C) 2010-2016 RhodeCode GmbH
8468 // #
8314 // #
@@ -8483,29 +8329,109 b' function ApplicationsIntegrationsEditViewController($state, integrationResource)'
8483 // # services, and proprietary license terms, please see
8329 // # services, and proprietary license terms, please see
8484 // # https://rhodecode.com/licenses/
8330 // # https://rhodecode.com/licenses/
8485
8331
8486 angular.module('appenlight.components.logsBrowserView', [])
8332 angular.module('appenlight.components.eventBrowserView', [])
8487 .component('logsBrowserView', {
8333 .component('eventBrowserView', {
8488 templateUrl: 'components/views/logs-browser/logs-browser.html',
8334 templateUrl: 'components/views/event-browser/event-browser.html',
8489 controller: LogsBrowserController
8335 controller: EventBrowserController
8490 });
8336 });
8491
8337
8492 LogsBrowserController.$inject = ['$location', 'stateHolder', 'typeAheadTagHelper', 'logsNoIdResource', 'sectionViewResource'];
8338 EventBrowserController.$inject = ['eventsNoIdResource', 'eventsResource'];
8493
8339
8494 function LogsBrowserController($location, stateHolder, typeAheadTagHelper, logsNoIdResource, sectionViewResource) {
8340 function EventBrowserController(eventsNoIdResource, eventsResource) {
8341 console.info('EventBrowserController');
8495 var vm = this;
8342 var vm = this;
8496 vm.logEventsChartConfig = {
8343
8497 data: {
8344 vm.loading = {events: true};
8498 json: [],
8345
8499 xFormat: '%Y-%m-%dT%H:%M:%S'
8346 vm.events = eventsNoIdResource.query(
8500 },
8347 {key: 'events'},
8501 color: {
8348 function (data) {
8502 pattern: ['#6baed6', '#e6550d', '#74c476', '#fdd0a2', '#8c564b']
8349 vm.loading.events = false;
8503 },
8350 });
8504 axis: {
8351
8505 x: {
8352
8506 type: 'timeseries',
8353 vm.closeEvent = function (event) {
8507 tick: {
8354
8508 format: '%Y-%m-%d'
8355 eventsResource.update({eventId: event.id}, {status: 0}, function (data) {
8356 event.status = 0;
8357 });
8358 }
8359
8360 }
8361
8362 ;// # Copyright (C) 2010-2016 RhodeCode GmbH
8363 // #
8364 // # This program is free software: you can redistribute it and/or modify
8365 // # it under the terms of the GNU Affero General Public License, version 3
8366 // # (only), as published by the Free Software Foundation.
8367 // #
8368 // # This program is distributed in the hope that it will be useful,
8369 // # but WITHOUT ANY WARRANTY; without even the implied warranty of
8370 // # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
8371 // # GNU General Public License for more details.
8372 // #
8373 // # You should have received a copy of the GNU Affero General Public License
8374 // # along with this program. If not, see <http://www.gnu.org/licenses/>.
8375 // #
8376 // # This program is dual-licensed. If you wish to learn more about the
8377 // # AppEnlight Enterprise Edition, including its added features, Support
8378 // # services, and proprietary license terms, please see
8379 // # https://rhodecode.com/licenses/
8380
8381 angular.module('appenlight.components.indexDashboardView', [])
8382 .component('indexDashboardView', {
8383 templateUrl: 'components/views/index-dashboard/index-dashboard.html',
8384 controller: IndexDashboardController
8385 });
8386
8387 IndexDashboardController.$inject = ['$rootScope', '$scope', '$location','$cookies', '$interval', 'stateHolder', 'applicationsPropertyResource', 'AeConfig'];
8388
8389 function IndexDashboardController($rootScope, $scope, $location, $cookies, $interval, stateHolder, applicationsPropertyResource, AeConfig) {
8390 var vm = this;
8391 stateHolder.section = 'dashboard';
8392 vm.timeOptions = {};
8393 var allowed = ['1h', '4h', '12h', '24h', '1w', '2w', '1M'];
8394 _.each(allowed, function (key) {
8395 if (allowed.indexOf(key) !== -1) {
8396 vm.timeOptions[key] = AeConfig.timeOptions[key];
8397 }
8398 });
8399 vm.stateHolder = stateHolder;
8400 vm.urls = AeConfig.urls;
8401 vm.applications = stateHolder.AeUser.applications_map;
8402 vm.show_dashboard = false;
8403 vm.resource = null;
8404 vm.graphType = {selected: null};
8405 vm.timeSpan = vm.timeOptions['1h'];
8406 vm.trendingReports = [];
8407 vm.exceptions = 0;
8408 vm.satisfyingRequests = 0;
8409 vm.toleratedRequests = 0;
8410 vm.frustratingRequests = 0;
8411 vm.uptimeStats = 0;
8412 vm.apdexStats = [];
8413 vm.seriesRequestsData = [];
8414 vm.seriesMetricsData = [];
8415 vm.seriesSlowData = [];
8416 vm.slowCalls = [];
8417 vm.slowURIS = [];
8418
8419 vm.reportChartConfig = {
8420 data: {
8421 json: [],
8422 xFormat: '%Y-%m-%dT%H:%M:%S'
8423 },
8424 color: {
8425 pattern: ['#6baed6', '#e6550d', '#74c476', '#fdd0a2', '#8c564b']
8426 },
8427 axis: {
8428 x: {
8429 type: 'timeseries',
8430 tick: {
8431 culling: {
8432 max: 6 // the number of tick texts will be adjusted to less than this value
8433 },
8434 format: '%Y-%m-%d %H:%M'
8509 }
8435 }
8510 },
8436 },
8511 y: {
8437 y: {
@@ -8546,279 +8472,170 b' function LogsBrowserController($location, stateHolder, typeAheadTagHelper, logsN'
8546 }
8472 }
8547 }
8473 }
8548 };
8474 };
8549 vm.logEventsChartData = {};
8475 vm.reportChartData = {};
8550 stateHolder.section = 'logs';
8551 vm.today = function () {
8552 vm.pickerDate = new Date();
8553 };
8554 vm.today();
8555
8476
8556 vm.applications = stateHolder.AeUser.applications_map;
8477 vm.reportSlowChartConfig = {
8557 vm.logsPage = [];
8478 data: {
8558 vm.itemCount = 0;
8479 json: [],
8559 vm.itemsPerPage = 250;
8480 xFormat: '%Y-%m-%dT%H:%M:%S'
8560 vm.page = 1;
8561 vm.$location = $location;
8562 vm.isLoading = {
8563 logs: true,
8564 series: true
8565 };
8566 vm.filterTypeAheadOptions = [
8567 {
8568 type: 'message',
8569 text: 'message:',
8570 'description': 'Full-text search in your logs',
8571 tag: 'Message',
8572 example: 'message:text-im-looking-for'
8573 },
8574 {
8575 type: 'namespace',
8576 text: 'namespace:',
8577 'description': 'Query logs from specific namespace',
8578 tag: 'Namespace',
8579 example: "namespace:module.foo"
8580 },
8481 },
8581 {
8482 color: {
8582 type: 'resource',
8483 pattern: ['#6baed6', '#e6550d', '#74c476', '#fdd0a2', '#8c564b']
8583 text: 'resource:',
8584 'description': 'Restrict resultset to application',
8585 tag: 'Application',
8586 example: "resource:ID"
8587 },
8484 },
8588 {
8485 axis: {
8589 type: 'request_id',
8486 x: {
8590 text: 'request_id:',
8487 type: 'timeseries',
8591 'description': 'Show logs with specific request id',
8488 tick: {
8592 example: "request_id:883143dc572e4c38aceae92af0ea5ae0",
8489 culling: {
8593 tag: 'Request ID'
8490 max: 6 // the number of tick texts will be adjusted to less than this value
8491 },
8492 format: '%Y-%m-%d %H:%M'
8493 }
8494 },
8495 y: {
8496 tick: {
8497 count: 5,
8498 format: d3.format('.2s')
8499 }
8500 }
8594 },
8501 },
8595 {
8502 subchart: {
8596 type: 'level',
8503 show: true,
8597 text: 'level:',
8504 size: {
8598 'description': 'Show entries with specific log level',
8505 height: 20
8599 example: 'level:warning',
8506 }
8600 tag: 'Level'
8601 },
8507 },
8602 {
8508 size: {
8603 type: 'server_name',
8509 height: 250
8604 text: 'server_name:',
8605 'description': 'Show entries tagged with this key/value pair',
8606 example: 'server_name:hostname',
8607 tag: 'Tag'
8608 },
8510 },
8609 {
8511 zoom: {
8610 type: 'start_date',
8512 rescale: true
8611 text: 'start_date:',
8612 'description': 'Show results newer than this date (press TAB for dropdown)',
8613 example: 'start_date:2014-08-15T13:00',
8614 tag: 'Start Date'
8615 },
8513 },
8616 {
8514 grid: {
8617 type: 'end_date',
8515 x: {
8618 text: 'end_date:',
8516 show: true
8619 'description': 'Show results older than this date (press TAB for dropdown)',
8517 },
8620 example: 'start_date:2014-08-15T23:59',
8518 y: {
8621 tag: 'End Date'
8519 show: true
8520 }
8622 },
8521 },
8623 {type: 'level', value: 'debug', text: 'level:debug'},
8522 tooltip: {
8624 {type: 'level', value: 'info', text: 'level:info'},
8523 format: {
8625 {type: 'level', value: 'warning', text: 'level:warning'},
8524 title: function (d) {
8626 {type: 'level', value: 'critical', text: 'level:critical'}
8525 return '' + d;
8627 ];
8526 },
8628 vm.filterTypeAhead = null;
8527 value: function (v) {
8629 vm.showDatePicker = false;
8528 return v
8630 vm.manualOpen = false;
8529 }
8631 vm.aheadFilter = typeAheadTagHelper.aheadFilter;
8530 }
8632 vm.removeSearchTag = function (tag) {
8531 }
8633 $location.search(tag.type, null);
8634 vm.refresh();
8635 };
8636 vm.addSearchTag = function (tag) {
8637 $location.search(tag.type, tag.value);
8638 vm.refresh();
8639 };
8640
8641 vm.paginationChange = function(){
8642 $location.search('page', vm.page);
8643 vm.refresh();
8644 };
8532 };
8533 vm.reportSlowChartData = {};
8645
8534
8646
8535 vm.metricsChartConfig = {
8647 _.each(vm.applications, function (item) {
8536 data: {
8648 vm.filterTypeAheadOptions.push({
8537 json: [],
8649 type: 'resource',
8538 xFormat: '%Y-%m-%dT%H:%M:%S',
8650 text: 'resource:' + item.resource_id + ':' + item.resource_name,
8539 keys: {
8651 example: 'resource:' + item.resource_id,
8540 x: 'x',
8652 'tag': item.resource_name,
8541 value: ["main", "sql", "nosql", "tmpl", "remote", "custom"]
8653 'description': 'Restrict resultset to this application'
8542 },
8654 });
8543 names: {
8655 });
8544 main: 'View/Application logic',
8656
8545 sql: 'Relational database queries',
8657 vm.typeAheadTag = function (event) {
8546 nosql: 'NoSql datastore calls',
8658 var text = vm.filterTypeAhead;
8547 tmpl: 'Template rendering',
8659 if (_.isObject(vm.filterTypeAhead)) {
8548 custom: 'Custom timed calls',
8660 text = vm.filterTypeAhead.text;
8549 remote: 'Requests to remote resources'
8661 };
8550 },
8662 if (!vm.filterTypeAhead) {
8551 type: 'area',
8663 return
8552 groups: [["main", "sql", "nosql", "remote", "custom", "tmpl"]],
8664 }
8553 order: null
8665 var parsed = text.split(':');
8554 },
8666 var tag = {'type': null, 'value': null};
8555 color: {
8667 // app tags have : twice
8556 pattern: ['#6baed6', '#c7e9c0', '#fd8d3c', '#d6616b', '#ffcc00', '#c6dbef']
8668 if (parsed.length > 2 && parsed[0] == 'resource') {
8557 },
8669 tag.type = 'resource';
8558 axis: {
8670 tag.value = parsed[1];
8559 x: {
8671 }
8560 type: 'timeseries',
8672 // normal tag:value
8561 tick: {
8673 else if (parsed.length > 1) {
8562 culling: {
8674 tag.type = parsed[0];
8563 max: 6 // the number of tick texts will be adjusted to less than this value
8675 tag.value = parsed.slice(1).join(':');
8564 },
8676 }
8565 format: '%Y-%m-%d %H:%M'
8677 else {
8566 }
8678 tag.type = 'message';
8567 },
8679 tag.value = parsed.join(':');
8568 y: {
8680 }
8569 tick: {
8681
8570 count: 5,
8682 // set datepicker hour based on type of field
8571 format: d3.format('.2f')
8683 if ('start_date:' == text) {
8572 }
8684 vm.showDatePicker = true;
8573 }
8685 vm.filterTypeAhead = 'start_date:' + moment(vm.pickerDate).utc().format();
8574 },
8686 }
8575 point: {
8687 else if ('end_date:' == text) {
8576 show: false
8688 vm.showDatePicker = true;
8577 },
8689 vm.filterTypeAhead = 'end_date:' + moment(vm.pickerDate).utc().hour(23).minute(59).format();
8578 subchart: {
8690 }
8579 show: true,
8691
8580 size: {
8692 if (event.keyCode != 13 || !tag.type || !tag.value) {
8581 height: 20
8693 return
8582 }
8694 }
8583 },
8695 vm.showDatePicker = false;
8584 size: {
8696 // aka we selected one of main options
8585 height: 350
8697 vm.addSearchTag({type: tag.type, value: tag.value});
8586 },
8698 // clear typeahead
8587 zoom: {
8699 vm.filterTypeAhead = undefined;
8588 rescale: true
8700 };
8589 },
8701
8590 grid: {
8702
8591 x: {
8703 vm.pickerDateChanged = function(){
8592 show: true
8704 if (vm.filterTypeAhead.indexOf('start_date:') == '0') {
8593 },
8705 vm.filterTypeAhead = 'start_date:' + moment(vm.pickerDate).utc().format();
8594 y: {
8706 }
8595 show: true
8707 else if (vm.filterTypeAhead.indexOf('end_date:') == '0') {
8596 }
8708 vm.filterTypeAhead = 'end_date:' + moment(vm.pickerDate).utc().hour(23).minute(59).format();
8597 },
8709 }
8598 tooltip: {
8710 vm.showDatePicker = false;
8599 format: {
8711 };
8600 title: function (d) {
8712
8601 return '' + d;
8713 vm.fetchLogs = function (searchParams) {
8714 vm.isLoading.logs = true;
8715 logsNoIdResource.query(searchParams, function (data, getResponseHeaders) {
8716 vm.isLoading.logs = false;
8717 var headers = getResponseHeaders();
8718 vm.logsPage = data;
8719 vm.itemCount = headers['x-total-count'];
8720 vm.itemsPerPage = headers['x-items-per-page'];
8721 }, function () {
8722 vm.isLoading.logs = false;
8723 });
8724 };
8725
8726 vm.fetchSeriesData = function (searchParams) {
8727 searchParams['section'] = 'logs_section';
8728 searchParams['view'] = 'fetch_series';
8729 vm.isLoading.series = true;
8730 sectionViewResource.query(searchParams, function (data) {
8731
8732 vm.logEventsChartData = {
8733 json: data,
8734 xFormat: '%Y-%m-%dT%H:%M:%S',
8735 keys: {
8736 x: 'x',
8737 value: ["logs"]
8738 },
8739 names: {
8740 logs: 'Log events'
8741 },
8602 },
8742 type: 'bar'
8603 value: function (v) {
8743 };
8604 return v
8744 vm.isLoading.series = false;
8605 }
8745 }, function () {
8606 }
8746 vm.isLoading.series = false;
8607 }
8747 });
8748 };
8749
8750 vm.filterId = function (log) {
8751 $location.search('request_id', log.request_id);
8752 vm.refresh();
8753 };
8754
8755 vm.refresh = function(){
8756 vm.searchParams = parseSearchToTags($location.search());
8757 vm.page = Number(vm.searchParams.page) || 1;
8758 var params = parseTagsToSearch(vm.searchParams);
8759 vm.fetchLogs(params);
8760 vm.fetchSeriesData(params);
8761 };
8608 };
8762 console.info('page load');
8609 vm.metricsChartData = {};
8763 vm.refresh();
8764 }
8765
8766 ;// # Copyright (C) 2010-2016 RhodeCode GmbH
8767 // #
8768 // # This program is free software: you can redistribute it and/or modify
8769 // # it under the terms of the GNU Affero General Public License, version 3
8770 // # (only), as published by the Free Software Foundation.
8771 // #
8772 // # This program is distributed in the hope that it will be useful,
8773 // # but WITHOUT ANY WARRANTY; without even the implied warranty of
8774 // # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
8775 // # GNU General Public License for more details.
8776 // #
8777 // # You should have received a copy of the GNU Affero General Public License
8778 // # along with this program. If not, see <http://www.gnu.org/licenses/>.
8779 // #
8780 // # This program is dual-licensed. If you wish to learn more about the
8781 // # AppEnlight Enterprise Edition, including its added features, Support
8782 // # services, and proprietary license terms, please see
8783 // # https://rhodecode.com/licenses/
8784
8785 angular.module('appenlight.components.reportView', [])
8786 .component('reportView', {
8787 templateUrl: 'components/views/report-view/report-view.html',
8788 controller: ReportViewController
8789 });
8790
8791 ReportViewController.$inject = ['$window', '$location', '$state', '$uibModal',
8792 '$cookies', 'reportGroupPropertyResource', 'reportGroupResource',
8793 'logsNoIdResource', 'stateHolder'];
8794
8610
8795 function ReportViewController($window, $location, $state, $uibModal, $cookies, reportGroupPropertyResource, reportGroupResource, logsNoIdResource, stateHolder) {
8611 vm.responseChartConfig = {
8796 var vm = this;
8797 vm.window = $window;
8798 vm.stateHolder = stateHolder;
8799 vm.$state = $state;
8800 vm.reportHistoryConfig = {
8801 data: {
8612 data: {
8802 json: [],
8613 json: [],
8803 xFormat: '%Y-%m-%dT%H:%M:%S'
8614 xFormat: '%Y-%m-%dT%H:%M:%S'
8804 },
8615 },
8805 color: {
8616 color: {
8806 pattern: ['#6baed6', '#e6550d', '#74c476', '#fdd0a2', '#8c564b']
8617 pattern: ['#d6616b', '#6baed6', '#fd8d3c']
8807 },
8618 },
8808 axis: {
8619 axis: {
8809 x: {
8620 x: {
8810 type: 'timeseries',
8621 type: 'timeseries',
8811 tick: {
8622 tick: {
8812 format: '%Y-%m-%d'
8623 culling: {
8624 max: 6 // the number of tick texts will be adjusted to less than this value
8625 },
8626 format: '%Y-%m-%d %H:%M'
8813 }
8627 }
8814 },
8628 },
8815 y: {
8629 y: {
8816 tick: {
8630 tick: {
8817 count: 5,
8631 count: 5,
8818 format: d3.format('.2s')
8632 format: d3.format('.2f')
8819 }
8633 }
8820 }
8634 }
8821 },
8635 },
8636 point: {
8637 show: false
8638 },
8822 subchart: {
8639 subchart: {
8823 show: true,
8640 show: true,
8824 size: {
8641 size: {
@@ -8826,7 +8643,7 b' function ReportViewController($window, $location, $state, $uibModal, $cookies, r'
8826 }
8643 }
8827 },
8644 },
8828 size: {
8645 size: {
8829 height: 250
8646 height: 350
8830 },
8647 },
8831 zoom: {
8648 zoom: {
8832 rescale: true
8649 rescale: true
@@ -8850,599 +8667,499 b' function ReportViewController($window, $location, $state, $uibModal, $cookies, r'
8850 }
8667 }
8851 }
8668 }
8852 };
8669 };
8853 vm.mentionedPeople = [];
8670 vm.responseChartData = {};
8854 vm.reportHistoryData = {};
8855 vm.textTraceback = true;
8856 vm.rawTraceback = '';
8857 vm.traceback = '';
8858 vm.reportType = 'report';
8859 vm.report = null;
8860 vm.showLong = false;
8861 vm.reportLogs = null;
8862 vm.requestStats = null;
8863 vm.comment = null;
8864 vm.is_loading = {
8865 report: true,
8866 logs: true,
8867 history: true
8868 };
8869
8870 vm.searchMentionedPeople = function(term){
8871 //vm.mentionedPeople = [];
8872 var term = term.toLowerCase();
8873 reportGroupPropertyResource.get({
8874 groupId: vm.report.group_id,
8875 key: 'assigned_users'
8876 }, null,
8877 function (data) {
8878 var users = [];
8879 _.each(data.assigned, function(u){
8880 users.push({label: u.user_name});
8881 });
8882 _.each(data.unassigned, function(u){
8883 users.push({label: u.user_name});
8884 });
8885
8886 var result = _.filter(users, function(u){
8887 return u.label.toLowerCase().indexOf(term) !== -1;
8888 });
8889 vm.mentionedPeople = result;
8890 });
8891 };
8892
8671
8893 vm.searchTag = function (tag, value) {
8672 vm.requestsChartConfig = {
8894
8673 data: {
8895 if (vm.report.report_type === 3) {
8674 json: [],
8896 $location.url($state.href('report.list_slow'));
8675 xFormat: '%Y-%m-%dT%H:%M:%S'
8897 }
8676 },
8898 else {
8677 color: {
8899 $location.url($state.href('report.list'));
8678 pattern: ['#d6616b', '#6baed6', '#fd8d3c']
8679 },
8680 axis: {
8681 x: {
8682 type: 'timeseries',
8683 tick: {
8684 culling: {
8685 max: 6 // the number of tick texts will be adjusted to less than this value
8686 },
8687 format: '%Y-%m-%d %H:%M'
8688 }
8689 },
8690 y: {
8691 tick: {
8692 count: 5,
8693 format: d3.format('.2f')
8694 }
8695 }
8696 },
8697 point: {
8698 show: false
8699 },
8700 subchart: {
8701 show: true,
8702 size: {
8703 height: 20
8704 }
8705 },
8706 size: {
8707 height: 350
8708 },
8709 zoom: {
8710 rescale: true
8711 },
8712 grid: {
8713 x: {
8714 show: true
8715 },
8716 y: {
8717 show: true
8718 }
8719 },
8720 tooltip: {
8721 format: {
8722 title: function (d) {
8723 return '' + d;
8724 },
8725 value: function (v) {
8726 return v
8727 }
8728 }
8900 }
8729 }
8901 $location.search(tag, value);
8902 };
8730 };
8731 vm.requestsChartData = {};
8903
8732
8904 vm.tabs = {
8733 vm.loading = {
8905 slow_calls:false,
8734 'apdex': true,
8906 request_details:false,
8735 'reports': true,
8907 logs:false,
8736 'graphs': true,
8908 comments:false,
8737 'slowCalls': true,
8909 affected_users:false
8738 'slowURIS': true,
8739 'requestsBreakdown': true,
8740 'series': true
8910 };
8741 };
8911 if ($cookies.selectedReportTab) {
8742 vm.stream = {paused: false, filtered: false, messages: [], reports: []};
8912 vm.tabs[$cookies.selectedReportTab] = true;
8913 }
8914 else{
8915 $cookies.selectedReportTab = 'request_details';
8916 vm.tabs.request_details = true;
8917 }
8918
8743
8919 vm.fetchLogs = function () {
8744 $rootScope.$on('channelstream-message.front_dashboard.new_topic', function(event, message){
8920 if (!vm.report.request_id){
8745 var ws_report = message.message.report;
8746 if (ws_report.http_status != 500) {
8921 return
8747 return
8922 }
8748 }
8923 vm.is_loading.logs = true;
8749 if (vm.stream.paused == true) {
8924 logsNoIdResource.query({request_id: vm.report.request_id},
8750 return
8925 function (data) {
8751 }
8926 vm.is_loading.logs = false;
8752 if (vm.stream.filtered && ws_report.resource_id != vm.resource) {
8927 vm.reportLogs = data;
8753 return
8928 }, function () {
8754 }
8929 vm.is_loading.logs = false;
8755 var should_insert = true;
8756 _.each(vm.stream.reports, function (report) {
8757 if (report.report_id == ws_report.report_id) {
8758 report.occurences = ws_report.occurences;
8759 should_insert = false;
8760 }
8930 });
8761 });
8931 };
8762 if (should_insert) {
8932 vm.addComment = function () {
8763 if (vm.stream.reports.length > 7) {
8933 reportGroupPropertyResource.save({
8764 vm.stream.reports.pop();
8934 groupId: vm.report.group_id,
8765 }
8935 key: 'comments'
8766 vm.stream.reports.unshift(ws_report);
8936 }, {body: vm.comment},
8767 }
8937 function (data) {
8768 });
8938 vm.report.comments.push(data);
8939 });
8940 vm.comment = '';
8941 };
8942
8769
8943 vm.fetchReport = function () {
8770 vm.determineStartState = function () {
8944 vm.is_loading.report = true;
8771 if (stateHolder.AeUser.applications.length) {
8945 reportGroupResource.get($state.params, function (data) {
8772 vm.resource = Number($location.search().resource);
8946 vm.is_loading.report = false;
8773
8947 if (data.request) {
8774 if (!vm.resource){
8948 try {
8775 var cookieResource = $cookies.getObject('resource');
8949 var to_sort = _.pairs(data.request);
8776
8950 data.request = _.object(_.sortBy(to_sort, function (i) {
8777
8951 return i[0]
8778 if (cookieResource) {
8952 }));
8779 vm.resource = cookieResource;
8953 }
8780 }
8954 catch (err) {
8781 else{
8782 vm.resource = stateHolder.AeUser.applications[0].resource_id;
8955 }
8783 }
8956 }
8784 }
8957 vm.report = data;
8785 }
8958 if (vm.report.req_stats) {
8959 vm.requestStats = [];
8960 _.each(_.pairs(vm.report.req_stats['percentages']), function (p) {
8961 vm.requestStats.push({
8962 name: p[0],
8963 value: vm.report.req_stats[p[0]].toFixed(3),
8964 percent: p[1],
8965 calls: vm.report.req_stats[p[0] + '_calls']
8966 })
8967 });
8968 }
8969 vm.traceback = data.traceback;
8970 _.each(vm.traceback, function (frame) {
8971 if (frame.line) {
8972 vm.rawTraceback += 'File ' + frame.file + ' line ' + frame.line + ' in ' + frame.fn + ": \r\n";
8973 }
8974 vm.rawTraceback += ' ' + frame.cline + "\r\n";
8975 });
8976
8786
8977 if (stateHolder.AeUser.id){
8787 var timespan = $location.search().timespan;
8978 vm.fetchHistory();
8979 }
8980
8788
8981 vm.selectedTab($cookies.selectedReportTab);
8789 if(_.has(vm.timeOptions, timespan)){
8790 vm.timeSpan = vm.timeOptions[timespan];
8791 }
8792 else{
8793 vm.timeSpan = vm.timeOptions['1h'];
8794 }
8982
8795
8983 }, function (response) {
8796 var graphType = $location.search().graphtype;
8984
8797 if(!graphType){
8985 if (response.status == 403) {
8798 vm.graphType = {selected: 'metrics_graphs'};
8986 var uid = response.headers('x-appenlight-uid');
8799 }
8987 if (!uid) {
8800 else{
8988 window.location = '/register?came_from=' + encodeURIComponent(window.location);
8801 vm.graphType = {selected: graphType};
8989 }
8802 }
8990 }
8803 vm.updateSearchParams();
8991 vm.is_loading.report = false;
8992 });
8993 };
8804 };
8994
8805
8995 vm.selectedTab = function(tab_name){
8806 vm.updateSearchParams = function () {
8996 $cookies.selectedReportTab = tab_name;
8807 $location.search('resource', vm.resource);
8997 if (tab_name == 'logs' && vm.reportLogs === null) {
8808 $location.search('timespan', vm.timeSpan.key);
8998 vm.fetchLogs();
8809 $location.search('graphtype', vm.graphType.selected);
8810 stateHolder.resource = vm.resource;
8811
8812 if (vm.resource){
8813 $cookies.putObject('resource', vm.resource,
8814 {expires:new Date(3000, 1, 1)});
8999 }
8815 }
8816 vm.refreshData();
9000 };
8817 };
9001
8818
9002 vm.markFixed = function () {
8819 vm.refreshData = function () {
9003 reportGroupResource.update({
8820 vm.fetchApdexStats();
9004 groupId: vm.report.group_id
8821 vm.fetchTrendingReports();
9005 }, {fixed: !vm.report.group.fixed},
8822 vm.fetchMetrics();
9006 function (data) {
8823 vm.fetchRequestsBreakdown();
9007 vm.report.group.fixed = data.fixed;
8824 vm.fetchSlowCalls();
9008 });
9009 };
8825 };
9010
8826
9011 vm.markPublic = function () {
8827 vm.changedTimeSpan = function(){
9012 reportGroupResource.update({
8828 vm.startDateFilter = timeSpanToStartDate(vm.timeSpan.key);
9013 groupId: vm.report.group_id
8829 vm.refreshData();
9014 }, {public: !vm.report.group.public},
9015 function (data) {
9016 vm.report.group.public = data.public;
9017 });
9018 };
8830 };
9019
8831
9020 vm.delete = function () {
8832 vm.intervalId = $interval(function () {
9021 reportGroupResource.delete({'groupId': vm.report.group_id},
8833 if (_.contains(['30m', "1h"], vm.timeSpan.key)) {
9022 function (data) {
8834 // don't do anything if window is unfocused
9023 $state.go('report.list');
8835 if(document.hidden === true){
9024 })
8836 return ;
9025 };
8837 }
8838 vm.refreshData();
8839 }
8840 }, 60000);
9026
8841
9027 vm.assignUsersModal = function (index) {
8842 vm.fetchApdexStats = function () {
9028 vm.opts = {
8843 vm.loading.apdex = true;
9029 backdrop: 'static',
8844 vm.apdexStats = applicationsPropertyResource.query({
9030 templateUrl: 'AssignReportCtrl.html',
8845 'key': 'apdex_stats',
9031 controller: 'AssignReportCtrl as ctrl',
8846 'resourceId': vm.resource,
9032 resolve: {
8847 "start_date": timeSpanToStartDate(vm.timeSpan.key)
9033 report: function () {
8848 },
9034 return vm.report;
8849 function (data) {
9035 }
8850 vm.loading.apdex = false;
9036 }
9037 };
9038 var modalInstance = $uibModal.open(vm.opts);
9039 modalInstance.result.then(function (report) {
9040
8851
9041 }, function () {
8852 vm.exceptions = _.reduce(data, function (memo, row) {
9042 console.info('Modal dismissed at: ' + new Date());
8853 return memo + row.errors;
9043 });
8854 }, 0);
8855 vm.satisfyingRequests = _.reduce(data, function (memo, row) {
8856 return memo + row.satisfying_requests;
8857 }, 0);
8858 vm.toleratedRequests = _.reduce(data, function (memo, row) {
8859 return memo + row.tolerated_requests;
8860 }, 0);
8861 vm.frustratingRequests = _.reduce(data, function (memo, row) {
8862 return memo + row.frustrating_requests;
8863 }, 0);
8864 if (data.length) {
8865 vm.uptimeStats = data[0].uptime;
8866 }
9044
8867
9045 };
8868 },
8869 function () {
8870 vm.loading.apdex = false;
8871 }
8872 );
8873 }
9046
8874
9047 vm.fetchHistory = function () {
8875 vm.fetchMetrics = function () {
9048 reportGroupPropertyResource.query({
8876 vm.loading.series = true;
9049 groupId: vm.report.group_id,
8877 applicationsPropertyResource.query({
9050 key: 'history'
8878 'resourceId': vm.resource,
8879 'key': vm.graphType.selected,
8880 "start_date": timeSpanToStartDate(vm.timeSpan.key)
9051 }, function (data) {
8881 }, function (data) {
9052 vm.reportHistoryData = {
8882 if (vm.graphType.selected == 'metrics_graphs') {
9053 json: data,
8883 vm.metricsChartData = {
9054 keys: {
8884 json: data,
9055 x: 'x',
8885 xFormat: '%Y-%m-%dT%H:%M:%S',
9056 value: ["reports"]
8886 keys: {
9057 },
8887 x: 'x',
9058 names: {
8888 value: ["main", "sql", "nosql", "tmpl", "remote", "custom"]
9059 reports: 'Reports history'
8889 },
9060 },
8890 names: {
9061 type: 'bar'
8891 main: 'View/Application logic',
9062 };
8892 sql: 'Relational database queries',
9063 vm.is_loading.history = false;
8893 nosql: 'NoSql datastore calls',
9064 });
8894 tmpl: 'Template rendering',
9065 };
8895 custom: 'Custom timed calls',
9066
8896 remote: 'Requests to remote resources'
9067 vm.nextDetail = function () {
8897 },
9068 $state.go('report.view_detail', {
8898 type: 'area',
9069 groupId: vm.report.group_id,
8899 groups: [["main", "sql", "nosql", "remote", "custom", "tmpl"]],
9070 reportId: vm.report.group.next_report
8900 order: null
9071 });
8901 };
9072 };
9073 vm.previousDetail = function () {
9074 $state.go('report.view_detail', {
9075 groupId: vm.report.group_id,
9076 reportId: vm.report.group.previous_report
9077 });
9078 };
9079
9080 vm.runIntegration = function (integration_name) {
9081
9082 if (integration_name == 'bitbucket') {
9083 var controller = 'BitbucketIntegrationCtrl as ctrl';
9084 var template_url = 'templates/integrations/bitbucket.html';
9085 }
9086 else if (integration_name == 'github') {
9087 var controller = 'GithubIntegrationCtrl as ctrl';
9088 var template_url = 'templates/integrations/github.html';
9089 }
9090 else if (integration_name == 'jira') {
9091 var controller = 'JiraIntegrationCtrl as ctrl';
9092 var template_url = 'templates/integrations/jira.html';
9093 }
9094 else {
9095 return false;
9096 }
9097
9098 vm.opts = {
9099 backdrop: 'static',
9100 templateUrl: template_url,
9101 controller: controller,
9102 resolve: {
9103 integrationName: function () {
9104 return integration_name
9105 },
9106 report: function () {
9107 return vm.report;
9108 }
9109 }
8902 }
9110 };
8903 else if (vm.graphType.selected == 'report_graphs') {
9111 var modalInstance = $uibModal.open(vm.opts);
8904 vm.reportChartData = {
9112 modalInstance.result.then(function (report) {
8905 json: data,
9113
8906 xFormat: '%Y-%m-%dT%H:%M:%S',
9114 }, function () {
8907 keys: {
9115 console.info('Modal dismissed at: ' + new Date());
8908 x: 'x',
9116 });
8909 value: ["not_found", "report"]
9117
8910 },
9118 };
8911 names: {
9119
8912 report: 'Errors',
9120 // load report
8913 not_found: '404\'s requests'
9121 vm.fetchReport();
8914 },
9122
8915 type: 'bar'
9123
8916 };
9124 }
8917 }
9125
8918 else if (vm.graphType.selected == 'slow_report_graphs') {
9126 ;// # Copyright (C) 2010-2016 RhodeCode GmbH
8919 vm.reportSlowChartData = {
9127 // #
8920 json: data,
9128 // # This program is free software: you can redistribute it and/or modify
8921 xFormat: '%Y-%m-%dT%H:%M:%S',
9129 // # it under the terms of the GNU Affero General Public License, version 3
8922 keys: {
9130 // # (only), as published by the Free Software Foundation.
8923 x: 'x',
9131 // #
8924 value: ["slow_report"]
9132 // # This program is distributed in the hope that it will be useful,
8925 },
9133 // # but WITHOUT ANY WARRANTY; without even the implied warranty of
8926 names: {
9134 // # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
8927 slow_report: 'Slow reports'
9135 // # GNU General Public License for more details.
8928 },
9136 // #
8929 type: 'bar'
9137 // # You should have received a copy of the GNU Affero General Public License
8930 };
9138 // # along with this program. If not, see <http://www.gnu.org/licenses/>.
8931 }
9139 // #
8932 else if (vm.graphType.selected == 'response_graphs') {
9140 // # This program is dual-licensed. If you wish to learn more about the
8933 vm.responseChartData = {
9141 // # AppEnlight Enterprise Edition, including its added features, Support
8934 json: data,
9142 // # services, and proprietary license terms, please see
8935 xFormat: '%Y-%m-%dT%H:%M:%S',
9143 // # https://rhodecode.com/licenses/
8936 keys: {
9144
8937 x: 'x',
9145 angular.module('appenlight.components.reportsBrowserView', [])
8938 value: ["today", "days_ago_2", "days_ago_7"]
9146 .component('reportsBrowserView', {
8939 },
9147 templateUrl: 'components/views/reports-browser-view/reports-browser-view.html',
8940 names: {
9148 controller: reportsBrowserViewController
8941 today: 'Today',
9149 });
8942 "days_ago_2": '2 days ago',
9150
8943 "days_ago_7": '7 days ago'
9151 reportsBrowserViewController.$inject = ['$location', '$cookies',
8944 }
9152 'stateHolder', 'typeAheadTagHelper', 'reportsResource'];
8945 };
9153
8946 }
9154 function reportsBrowserViewController($location, $cookies, stateHolder,
8947 else if (vm.graphType.selected == 'requests_graphs') {
9155 typeAheadTagHelper, reportsResource) {
8948 vm.requestsChartData = {
9156 var vm = this;
8949 json: data,
9157 vm.applications = stateHolder.AeUser.applications_map;
8950 xFormat: '%Y-%m-%dT%H:%M:%S',
9158 stateHolder.section = 'reports';
8951 keys: {
9159 vm.today = function () {
8952 x: 'x',
9160 vm.pickerDate = new Date();
8953 value: ["requests"]
9161 };
8954 },
9162 vm.today();
8955 names: {
9163 vm.reportsPage = [];
8956 requests: 'Requests/s'
9164 vm.page = 1;
8957 }
9165 vm.itemCount = 0;
8958 };
9166 vm.itemsPerPage = 250;
8959 }
9167 typeAheadTagHelper.tags = [];
8960 vm.loading.series = false;
9168 vm.searchParams = {tags: [], page: 1, type: 'report'};
8961 }, function(){
9169 vm.is_loading = false;
8962 vm.loading.series = false;
9170 vm.filterTypeAheadOptions = [
8963 });
9171 {
9172 type: 'error',
9173 text: 'error:',
9174 'description': 'Full-text search in your reports',
9175 example: 'error:text-im-looking-for',
9176 tag: 'Error'
9177 },
9178 {
9179 type: 'view_name',
9180 text: 'view_name:',
9181 'description': 'Query reports occured in specific views',
9182 example: "view_name:module.foo",
9183 tag: 'View Name'
9184 },
9185 {
9186 type: 'resource',
9187 text: 'resource:',
9188 'description': 'Restrict resultset to application',
9189 example: "resource:ID",
9190 tag: 'Application'
9191 },
9192 {
9193 type: 'priority',
9194 text: 'priority:',
9195 'description': 'Show reports with specific priority',
9196 example: 'priority:8',
9197 tag: 'Priority'
9198 },
9199 {
9200 type: 'min_occurences',
9201 text: 'min_occurences:',
9202 'description': 'Show reports from groups with at least X occurences',
9203 example: 'min_occurences:25',
9204 tag: 'Occurences'
9205 },
9206 {
9207 type: 'url_path',
9208 text: 'url_path:',
9209 'description': 'Show reports from specific URL paths',
9210 example: 'url_path:/foo/bar/baz',
9211 tag: 'Url Path'
9212 },
9213 {
9214 type: 'url_domain',
9215 text: 'url_domain:',
9216 'description': 'Show reports from specific domain',
9217 example: 'url_domain:domain.com',
9218 tag: 'Domain'
9219 },
9220 {
9221 type: 'report_status',
9222 text: 'report_status:',
9223 'description': 'Show reports from groups with specific status',
9224 example: 'report_status:never_reviewed',
9225 tag: 'Status'
9226 },
9227 {
9228 type: 'request_id',
9229 text: 'request_id:',
9230 'description': 'Show reports with specific request id',
9231 example: "request_id:883143dc572e4c38aceae92af0ea5ae0",
9232 tag: 'Request ID'
9233 },
9234 {
9235 type: 'server_name',
9236 text: 'server_name:',
9237 'description': 'Show reports tagged with this key/value pair',
9238 example: 'server_name:hostname',
9239 tag: 'Tag'
9240 },
9241 {
9242 type: 'http_status',
9243 text: 'http_status:',
9244 'description': 'Show reports with specific HTTP status code',
9245 example: "http_status:",
9246 tag: 'HTTP Status'
9247 },
9248 {
9249 type: 'http_status',
9250 text: 'http_status:500',
9251 'description': 'Show reports with specific HTTP status code',
9252 example: "http_status:500",
9253 tag: 'HTTP Status'
9254 },
9255 {
9256 type: 'http_status',
9257 text: 'http_status:404',
9258 'description': 'Include 404 reports in your search',
9259 example: "http_status:404",
9260 tag: 'HTTP Status'
9261 },
9262 {
9263 type: 'start_date',
9264 text: 'start_date:',
9265 'description': 'Show reports newer than this date (press TAB for dropdown)',
9266 example: 'start_date:2014-08-15T13:00',
9267 tag: 'Start Date'
9268 },
9269 {
9270 type: 'end_date',
9271 text: 'end_date:',
9272 'description': 'Show reports older than this date (press TAB for dropdown)',
9273 example: 'start_date:2014-08-15T23:59',
9274 tag: 'End Date'
9275 }
9276 ];
9277
9278 vm.filterTypeAhead = undefined;
9279 vm.showDatePicker = false;
9280 vm.manualOpen = false;
9281 vm.aheadFilter = typeAheadTagHelper.aheadFilter;
9282 vm.removeSearchTag = function (tag) {
9283 $location.search(tag.type, null);
9284 vm.refresh();
9285 };
9286 vm.addSearchTag = function (tag) {
9287 $location.search(tag.type, tag.value);
9288 vm.refresh();
9289 };
9290 vm.notRelativeTime = false;
9291 if ($cookies.notRelativeTime) {
9292 vm.notRelativeTime = JSON.parse($cookies.notRelativeTime);
9293 }
8964 }
9294
8965
9295 vm.changeRelativeTime = function () {
8966 vm.fetchSlowCalls = function () {
9296 $cookies.notRelativeTime = JSON.stringify(vm.notRelativeTime);
8967 vm.loading.slowCalls = true;
9297 };
8968 applicationsPropertyResource.query({
9298
8969 'resourceId': vm.resource,
9299 _.each(_.range(1, 11), function (priority) {
8970 "start_date": timeSpanToStartDate(vm.timeSpan.key),
9300 vm.filterTypeAheadOptions.push({
8971 'key': 'slow_calls'
9301 type: 'priority',
8972 }, function (data) {
9302 text: 'priority:' + priority.toString(),
8973 vm.slowCalls = data;
9303 description: 'Show entries with specific priority',
8974 vm.loading.slowCalls = false;
9304 example: 'priority:' + priority,
8975 }, function () {
9305 tag: 'Priority'
8976 vm.loading.slowCalls = false;
9306 });
9307 });
9308 _.each(['never_reviewed', 'reviewed', 'fixed', 'public'], function (status) {
9309 vm.filterTypeAheadOptions.push({
9310 type: 'report_status',
9311 text: 'report_status:' + status,
9312 'description': 'Show only reports with this status',
9313 example: 'report_status:' + status,
9314 tag: 'Status ' + status.toUpperCase()
9315 });
8977 });
9316 });
8978 }
9317 _.each(stateHolder.AeUser.applications, function (item) {
8979
9318 vm.filterTypeAheadOptions.push({
8980 vm.fetchRequestsBreakdown = function () {
9319 type: 'resource',
8981 vm.loading.requestsBreakdown = true;
9320 text: 'resource:' + item.resource_id + ':' + item.resource_name,
8982 applicationsPropertyResource.query({
9321 example: 'resource:' + item.resource_id,
8983 'resourceId': vm.resource,
9322 'tag': item.resource_name,
8984 "start_date": timeSpanToStartDate(vm.timeSpan.key),
9323 'description': 'Restrict resultset to this application'
8985 'key': 'requests_breakdown'
8986 }, function (data) {
8987 vm.requestsBreakdown = data;
8988 vm.loading.requestsBreakdown = false;
8989 }, function () {
8990 vm.loading.requestsBreakdown = false;
9324 });
8991 });
9325 });
8992 }
9326
8993
9327 vm.paginationChange = function(){
8994 vm.fetchTrendingReports = function () {
9328 $location.search('page', vm.page);
9329 vm.refresh();
9330 };
9331
8995
9332 vm.typeAheadTag = function (event) {
8996 if (vm.graphType.selected == 'slow_report_graphs') {
9333 var text = vm.filterTypeAhead;
8997 var report_type = 'slow';
9334 if (_.isObject(vm.filterTypeAhead)) {
9335 text = vm.filterTypeAhead.text;
9336 }
8998 }
9337 if (!vm.filterTypeAhead) {
8999 else {
9338 return
9000 var report_type = 'error';
9339 }
9001 }
9340
9002
9341 var parsed = text.split(':');
9003 vm.loading.reports = true;
9342 var tag = {'type': null, 'value': null};
9004 vm.trendingReports = applicationsPropertyResource.query({
9343 // app tags have : twice
9005 'key': 'trending_reports',
9344 if (parsed.length > 2 && parsed[0] == 'resource') {
9006 'resourceId': vm.resource,
9345 tag.type = 'resource';
9007 "start_date": timeSpanToStartDate(vm.timeSpan.key),
9346 tag.value = parsed[1];
9008 "report_type": report_type
9347 }
9009 },
9348 // normal tag:value
9010 function () {
9349 else if (parsed.length > 1) {
9011 vm.loading.reports = false;
9350 tag.type = parsed[0];
9012 },
9351 var tagValue = parsed.slice(1);
9013 function () {
9352 if (tagValue) {
9014 vm.loading.reports = false;
9353 tag.value = tagValue.join(':');
9354 }
9015 }
9355 }
9016 );
9356 else {
9017 };
9357 tag.type = 'error';
9358 tag.value = parsed.join(':');
9359 }
9360
9018
9361 // set datepicker hour based on type of field
9019 $scope.$on('$destroy',function(){
9362 if ('start_date:' == text) {
9020 $interval.cancel(vm.intervalId);
9363 vm.showDatePicker = true;
9021 });
9364 vm.filterTypeAhead = 'start_date:' + moment(vm.pickerDate).utc().format();
9365 }
9366 else if ('end_date:' == text) {
9367 vm.showDatePicker = true;
9368 vm.filterTypeAhead = 'end_date:' + moment(vm.pickerDate).utc().hour(23).minute(59).format();
9369 }
9370
9022
9371 if (event.keyCode != 13 || !tag.type || !tag.value) {
9023 if (stateHolder.AeUser.applications.length){
9372 return
9024 vm.show_dashboard = true;
9373 }
9025 vm.determineStartState();
9374 vm.showDatePicker = false;
9026 }
9375 // aka we selected one of main options
9027 }
9376 vm.addSearchTag({type: tag.type, value: tag.value});
9377 // clear typeahead
9378 vm.filterTypeAhead = undefined;
9379 };
9380
9028
9381 vm.pickerDateChanged = function(){
9029 ;// # Copyright (C) 2010-2016 RhodeCode GmbH
9382 if (vm.filterTypeAhead.indexOf('start_date:') == '0') {
9030 // #
9383 vm.filterTypeAhead = 'start_date:' + moment(vm.pickerDate).utc().format();
9031 // # This program is free software: you can redistribute it and/or modify
9384 }
9032 // # it under the terms of the GNU Affero General Public License, version 3
9385 else if (vm.filterTypeAhead.indexOf('end_date:') == '0') {
9033 // # (only), as published by the Free Software Foundation.
9386 vm.filterTypeAhead = 'end_date:' + moment(vm.pickerDate).utc().hour(23).minute(59).format();
9034 // #
9387 }
9035 // # This program is distributed in the hope that it will be useful,
9388 vm.showDatePicker = false;
9036 // # but WITHOUT ANY WARRANTY; without even the implied warranty of
9037 // # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9038 // # GNU General Public License for more details.
9039 // #
9040 // # You should have received a copy of the GNU Affero General Public License
9041 // # along with this program. If not, see <http://www.gnu.org/licenses/>.
9042 // #
9043 // # This program is dual-licensed. If you wish to learn more about the
9044 // # AppEnlight Enterprise Edition, including its added features, Support
9045 // # services, and proprietary license terms, please see
9046 // # https://rhodecode.com/licenses/
9047
9048
9049 ApplicationsIntegrationsEditViewController.$inject = ['$state', 'integrationResource'];
9050
9051 function ApplicationsIntegrationsEditViewController($state, integrationResource) {
9052
9053 var vm = this;
9054 vm.$state = $state;
9055 vm.loading = {integration: true};
9056 vm.config = integrationResource.get(
9057 {
9058 integration: $state.params.integration,
9059 action: 'setup',
9060 resourceId: $state.params.resourceId
9061 }, function (data) {
9062 vm.loading.integration = false;
9063 });
9064
9065 vm.configureIntegration = function () {
9066 console.info('configureIntegration');
9067 vm.loading.integration = true;
9068 integrationResource.save(
9069 {
9070 integration: $state.params.integration,
9071 action: 'setup',
9072 resourceId: $state.params.resourceId
9073 }, vm.config, function (data) {
9074 vm.loading.integration = false;
9075 setServerValidation(vm.integrationForm);
9076 }, function (response) {
9077 if (response.status == 422) {
9078 setServerValidation(vm.integrationForm, response.data);
9079 }
9080 vm.loading.integration = false;
9081 });
9389 };
9082 };
9390
9083
9391 var reportPresentation = function (report) {
9084 vm.removeIntegration = function () {
9392 report.presentation = {};
9085 console.info('removeIntegration');
9393 if (report.group.public) {
9086 integrationResource.remove({
9394 report.presentation.className = 'public';
9087 integration: $state.params.integration,
9395 report.presentation.tooltip = 'Public';
9088 resourceId: $state.params.resourceId,
9396 }
9089 action: 'delete'
9397 else if (report.group.fixed) {
9090 },
9398 report.presentation.className = 'fixed';
9091 function () {
9399 report.presentation.tooltip = 'Fixed';
9092 $state.go('applications.integrations',
9400 }
9093 {resourceId: $state.params.resourceId});
9401 else if (report.group.read) {
9094 }
9402 report.presentation.className = 'reviewed';
9095 );
9403 report.presentation.tooltip = 'Reviewed';
9096 }
9404 }
9097
9405 else {
9098 vm.testIntegration = function (to_test) {
9406 report.presentation.className = 'new';
9099 console.info('testIntegration', to_test);
9407 report.presentation.tooltip = 'New';
9100 vm.loading.integration = true;
9408 }
9101 integrationResource.save(
9409 return report;
9102 {
9410 };
9103 integration: $state.params.integration,
9104 action: 'test_' + to_test,
9105 resourceId: $state.params.resourceId
9106 }, vm.config, function (data) {
9107 vm.loading.integration = false;
9108 }, function (response) {
9109 vm.loading.integration = false;
9110 });
9111 }
9112
9113
9114 }
9115
9116 ;angular.module('appenlight.components.bitbucketIntegrationConfigView', [])
9117 .component('bitbucketIntegrationConfigView', {
9118 templateUrl: 'components/views/integrations/bitbucket-integration-config-view/bitbucket-integration-config-view.html',
9119 controller: ApplicationsIntegrationsEditViewController
9120 });
9121
9122 ;angular.module('appenlight.components.campfireIntegrationConfigView', [])
9123 .component('campfireIntegrationConfigView', {
9124 templateUrl: 'components/views/integrations/campfire-integration-config-view/campfire-integration-config-view.html',
9125 controller: ApplicationsIntegrationsEditViewController
9126 });
9127
9128 ;angular.module('appenlight.components.flowdockIntegrationConfigView', [])
9129 .component('flowdockIntegrationConfigView', {
9130 templateUrl: 'components/views/integrations/flowdock-integration-config-view/flowdock-integration-config-view.html',
9131 controller: ApplicationsIntegrationsEditViewController
9132 });
9133
9134 ;angular.module('appenlight.components.githubIntegrationConfigView', [])
9135 .component('githubIntegrationConfigView', {
9136 templateUrl: 'components/views/integrations/github-integration-config-view/github-integration-config-view.html',
9137 controller: ApplicationsIntegrationsEditViewController
9138 });
9411
9139
9412 vm.fetchReports = function (searchParams) {
9140 ;angular.module('appenlight.components.hipchatIntegrationConfigView', [])
9413 vm.is_loading = true;
9141 .component('hipchatIntegrationConfigView', {
9414 reportsResource.query(searchParams, function (data, getResponseHeaders) {
9142 templateUrl: 'components/views/integrations/hipchat-integration-config-view/hipchat-integration-config-view.html',
9415 var headers = getResponseHeaders();
9143 controller: ApplicationsIntegrationsEditViewController
9416
9144 });
9417 vm.is_loading = false;
9418 vm.reportsPage = _.map(data, function (item) {
9419 return reportPresentation(item);
9420 });
9421 vm.itemCount = headers['x-total-count'];
9422 vm.itemsPerPage = headers['x-items-per-page'];
9423 }, function () {
9424 vm.is_loading = false;
9425 });
9426 };
9427
9145
9428 vm.filterId = function (log) {
9146 ;angular.module('appenlight.components.jiraIntegrationConfigView', [])
9429 vm.searchParams.tags.push({
9147 .component('jiraIntegrationConfigView', {
9430 type: "request_id",
9148 templateUrl: 'components/views/integrations/jira-integration-config-view/jira-integration-config-view.html',
9431 value: log.request_id
9149 controller: ApplicationsIntegrationsEditViewController
9432 });
9150 });
9433 vm.refresh();
9434 };
9435
9151
9436 vm.refresh = function(){
9152 ;angular.module('appenlight.components.slackIntegrationConfigView', [])
9437 vm.searchParams = parseSearchToTags($location.search());
9153 .component('slackIntegrationConfigView', {
9438 vm.page = Number(vm.searchParams.page) || 1;
9154 templateUrl: 'components/views/integrations/slack-integration-config-view/slack-integration-config-view.html',
9439 var params = parseTagsToSearch(vm.searchParams);
9155 controller: ApplicationsIntegrationsEditViewController
9440
9156 });
9441 vm.fetchReports(params);
9157
9442 };
9158 ;angular.module('appenlight.components.webhooksIntegrationConfigView', [])
9443 // initial load
9159 .component('webhooksIntegrationConfigView', {
9444 vm.refresh();
9160 templateUrl: 'components/views/integrations/webhooks-integration-config-view/webhooks-integration-config-view.html',
9445 }
9161 controller: ApplicationsIntegrationsEditViewController
9162 });
9446
9163
9447 ;// # Copyright (C) 2010-2016 RhodeCode GmbH
9164 ;// # Copyright (C) 2010-2016 RhodeCode GmbH
9448 // #
9165 // #
@@ -9463,41 +9180,100 b' function reportsBrowserViewController($location, $cookies, stateHolder,'
9463 // # services, and proprietary license terms, please see
9180 // # services, and proprietary license terms, please see
9464 // # https://rhodecode.com/licenses/
9181 // # https://rhodecode.com/licenses/
9465
9182
9466 'use strict';
9183 angular.module('appenlight.components.logsBrowserView', [])
9467
9184 .component('logsBrowserView', {
9468 /* Controllers */
9185 templateUrl: 'components/views/logs-browser/logs-browser.html',
9469
9186 controller: LogsBrowserController
9470 angular.module('appenlight.components.reportsSlowBrowserView', [])
9471 .component('reportsSlowBrowserView', {
9472 templateUrl: 'components/views/reports-slow-browser-view/reports-slow-browser-view.html',
9473 controller: ReportsSlowBrowserViewController
9474 });
9187 });
9475
9188
9476 ReportsSlowBrowserViewController.$inject = ['$location', '$cookies',
9189 LogsBrowserController.$inject = ['$location', 'stateHolder', 'typeAheadTagHelper', 'logsNoIdResource', 'sectionViewResource'];
9477 'stateHolder', 'typeAheadTagHelper', 'slowReportsResource']
9478
9190
9479 function ReportsSlowBrowserViewController($location, $cookies, stateHolder, typeAheadTagHelper, slowReportsResource) {
9191 function LogsBrowserController($location, stateHolder, typeAheadTagHelper, logsNoIdResource, sectionViewResource) {
9480 var vm = this;
9192 var vm = this;
9481 vm.applications = stateHolder.AeUser.applications_map;
9193 vm.logEventsChartConfig = {
9482 stateHolder.section = 'slow_reports';
9194 data: {
9195 json: [],
9196 xFormat: '%Y-%m-%dT%H:%M:%S'
9197 },
9198 color: {
9199 pattern: ['#6baed6', '#e6550d', '#74c476', '#fdd0a2', '#8c564b']
9200 },
9201 axis: {
9202 x: {
9203 type: 'timeseries',
9204 tick: {
9205 format: '%Y-%m-%d'
9206 }
9207 },
9208 y: {
9209 tick: {
9210 count: 5,
9211 format: d3.format('.2s')
9212 }
9213 }
9214 },
9215 subchart: {
9216 show: true,
9217 size: {
9218 height: 20
9219 }
9220 },
9221 size: {
9222 height: 250
9223 },
9224 zoom: {
9225 rescale: true
9226 },
9227 grid: {
9228 x: {
9229 show: true
9230 },
9231 y: {
9232 show: true
9233 }
9234 },
9235 tooltip: {
9236 format: {
9237 title: function (d) {
9238 return '' + d;
9239 },
9240 value: function (v) {
9241 return v
9242 }
9243 }
9244 }
9245 };
9246 vm.logEventsChartData = {};
9247 stateHolder.section = 'logs';
9483 vm.today = function () {
9248 vm.today = function () {
9484 vm.pickerDate = new Date();
9249 vm.pickerDate = new Date();
9485 };
9250 };
9486 vm.today();
9251 vm.today();
9487 vm.reportsPage = [];
9252
9488 vm.page = 1;
9253 vm.applications = stateHolder.AeUser.applications_map;
9254 vm.logsPage = [];
9489 vm.itemCount = 0;
9255 vm.itemCount = 0;
9490 vm.itemsPerPage = 250;
9256 vm.itemsPerPage = 250;
9491 typeAheadTagHelper.tags = [];
9257 vm.page = 1;
9492 vm.searchParams = {tags: [], page: 1, type: 'slow_report'};
9258 vm.$location = $location;
9493 vm.is_loading = false;
9259 vm.isLoading = {
9260 logs: true,
9261 series: true
9262 };
9494 vm.filterTypeAheadOptions = [
9263 vm.filterTypeAheadOptions = [
9495 {
9264 {
9496 type: 'view_name',
9265 type: 'message',
9497 text: 'view_name:',
9266 text: 'message:',
9498 'description': 'Query reports occured in specific views',
9267 'description': 'Full-text search in your logs',
9499 tag: 'View Name',
9268 tag: 'Message',
9500 example: "view_name:module.foo"
9269 example: 'message:text-im-looking-for'
9270 },
9271 {
9272 type: 'namespace',
9273 text: 'namespace:',
9274 'description': 'Query logs from specific namespace',
9275 tag: 'Namespace',
9276 example: "namespace:module.foo"
9501 },
9277 },
9502 {
9278 {
9503 type: 'resource',
9279 type: 'resource',
@@ -9507,79 +9283,48 b' function ReportsSlowBrowserViewController($location, $cookies, stateHolder, type'
9507 example: "resource:ID"
9283 example: "resource:ID"
9508 },
9284 },
9509 {
9285 {
9510 type: 'priority',
9511 text: 'priority:',
9512 'description': 'Show reports with specific priority',
9513 example: 'priority:8',
9514 tag: 'Priority'
9515 },
9516 {
9517 type: 'min_occurences',
9518 text: 'min_occurences:',
9519 'description': 'Show reports from groups with at least X occurences',
9520 example: 'min_occurences:25',
9521 tag: 'Min. occurences'
9522 },
9523 {
9524 type: 'min_duration',
9525 text: 'min_duration:',
9526 'description': 'Show reports from groups with average duration >= Xs',
9527 example: 'min_duration:4.5',
9528 tag: 'Min. duration'
9529 },
9530 {
9531 type: 'url_path',
9532 text: 'url_path:',
9533 'description': 'Show reports from specific URL paths',
9534 example: 'url_path:/foo/bar/baz',
9535 tag: 'Url Path'
9536 },
9537 {
9538 type: 'url_domain',
9539 text: 'url_domain:',
9540 'description': 'Show reports from specific domain',
9541 example: 'url_domain:domain.com',
9542 tag: 'Domain'
9543 },
9544 {
9545 type: 'request_id',
9286 type: 'request_id',
9546 text: 'request_id:',
9287 text: 'request_id:',
9547 'description': 'Show reports with specific request id',
9288 'description': 'Show logs with specific request id',
9548 example: "request_id:883143dc572e4c38aceae92af0ea5ae0",
9289 example: "request_id:883143dc572e4c38aceae92af0ea5ae0",
9549 tag: 'Request ID'
9290 tag: 'Request ID'
9550 },
9291 },
9551 {
9292 {
9552 type: 'report_status',
9293 type: 'level',
9553 text: 'report_status:',
9294 text: 'level:',
9554 'description': 'Show reports from groups with specific status',
9295 'description': 'Show entries with specific log level',
9555 example: 'report_status:never_reviewed',
9296 example: 'level:warning',
9556 tag: 'Status'
9297 tag: 'Level'
9557 },
9298 },
9558 {
9299 {
9559 type: 'server_name',
9300 type: 'server_name',
9560 text: 'server_name:',
9301 text: 'server_name:',
9561 'description': 'Show reports tagged with this key/value pair',
9302 'description': 'Show entries tagged with this key/value pair',
9562 example: 'server_name:hostname',
9303 example: 'server_name:hostname',
9563 tag: 'Tag'
9304 tag: 'Tag'
9564 },
9305 },
9565 {
9306 {
9566 type: 'start_date',
9307 type: 'start_date',
9567 text: 'start_date:',
9308 text: 'start_date:',
9568 'description': 'Show reports newer than this date (press TAB for dropdown)',
9309 'description': 'Show results newer than this date (press TAB for dropdown)',
9569 example: 'start_date:2014-08-15T13:00',
9310 example: 'start_date:2014-08-15T13:00',
9570 tag: 'Start Date'
9311 tag: 'Start Date'
9571 },
9312 },
9572 {
9313 {
9573 type: 'end_date',
9314 type: 'end_date',
9574 text: 'end_date:',
9315 text: 'end_date:',
9575 'description': 'Show reports older than this date (press TAB for dropdown)',
9316 'description': 'Show results older than this date (press TAB for dropdown)',
9576 example: 'start_date:2014-08-15T23:59',
9317 example: 'start_date:2014-08-15T23:59',
9577 tag: 'End Date'
9318 tag: 'End Date'
9578 }
9319 },
9320 {type: 'level', value: 'debug', text: 'level:debug'},
9321 {type: 'level', value: 'info', text: 'level:info'},
9322 {type: 'level', value: 'warning', text: 'level:warning'},
9323 {type: 'level', value: 'critical', text: 'level:critical'}
9579 ];
9324 ];
9580
9325 vm.filterTypeAhead = null;
9581 vm.filterTypeAhead = undefined;
9582 vm.showDatePicker = false;
9326 vm.showDatePicker = false;
9327 vm.manualOpen = false;
9583 vm.aheadFilter = typeAheadTagHelper.aheadFilter;
9328 vm.aheadFilter = typeAheadTagHelper.aheadFilter;
9584 vm.removeSearchTag = function (tag) {
9329 vm.removeSearchTag = function (tag) {
9585 $location.search(tag.type, null);
9330 $location.search(tag.type, null);
@@ -9589,36 +9334,14 b' function ReportsSlowBrowserViewController($location, $cookies, stateHolder, type'
9589 $location.search(tag.type, tag.value);
9334 $location.search(tag.type, tag.value);
9590 vm.refresh();
9335 vm.refresh();
9591 };
9336 };
9592 vm.manualOpen = false;
9593 vm.notRelativeTime = false;
9594 if ($cookies.notRelativeTime) {
9595 vm.notRelativeTime = JSON.parse($cookies.notRelativeTime);
9596 }
9597
9337
9598
9338 vm.paginationChange = function(){
9599 vm.changeRelativeTime = function () {
9339 $location.search('page', vm.page);
9600 $cookies.notRelativeTime = JSON.stringify(vm.notRelativeTime);
9340 vm.refresh();
9601 };
9341 };
9602
9342
9603 _.each(_.range(1, 11), function (priority) {
9343
9604 vm.filterTypeAheadOptions.push({
9344 _.each(vm.applications, function (item) {
9605 type: 'priority',
9606 text: 'priority:' + priority.toString(),
9607 description: 'Show entries with specific priority',
9608 example: 'priority:' + priority,
9609 tag: 'Priority'
9610 });
9611 });
9612 _.each(['never_reviewed', 'reviewed', 'fixed', 'public'], function (status) {
9613 vm.filterTypeAheadOptions.push({
9614 type: 'report_status',
9615 text: 'report_status:' + status,
9616 'description': 'Show only reports with this status',
9617 example: 'report_status:' + status,
9618 tag: 'Status ' + status.toUpperCase()
9619 });
9620 });
9621 _.each(stateHolder.AeUser.applications, function (item) {
9622 vm.filterTypeAheadOptions.push({
9345 vm.filterTypeAheadOptions.push({
9623 type: 'resource',
9346 type: 'resource',
9624 text: 'resource:' + item.resource_id + ':' + item.resource_name,
9347 text: 'resource:' + item.resource_id + ':' + item.resource_name,
@@ -9646,10 +9369,11 b' function ReportsSlowBrowserViewController($location, $cookies, stateHolder, type'
9646 // normal tag:value
9369 // normal tag:value
9647 else if (parsed.length > 1) {
9370 else if (parsed.length > 1) {
9648 tag.type = parsed[0];
9371 tag.type = parsed[0];
9649 var tagValue = parsed.slice(1);
9372 tag.value = parsed.slice(1).join(':');
9650 if (tagValue) {
9373 }
9651 tag.value = tagValue.join(':');
9374 else {
9652 }
9375 tag.type = 'message';
9376 tag.value = parsed.join(':');
9653 }
9377 }
9654
9378
9655 // set datepicker hour based on type of field
9379 // set datepicker hour based on type of field
@@ -9672,10 +9396,6 b' function ReportsSlowBrowserViewController($location, $cookies, stateHolder, type'
9672 vm.filterTypeAhead = undefined;
9396 vm.filterTypeAhead = undefined;
9673 };
9397 };
9674
9398
9675 vm.paginationChange = function(){
9676 $location.search('page', vm.page);
9677 vm.refresh();
9678 };
9679
9399
9680 vm.pickerDateChanged = function(){
9400 vm.pickerDateChanged = function(){
9681 if (vm.filterTypeAhead.indexOf('start_date:') == '0') {
9401 if (vm.filterTypeAhead.indexOf('start_date:') == '0') {
@@ -9687,58 +9407,56 b' function ReportsSlowBrowserViewController($location, $cookies, stateHolder, type'
9687 vm.showDatePicker = false;
9407 vm.showDatePicker = false;
9688 };
9408 };
9689
9409
9690 var reportPresentation = function (report) {
9410 vm.fetchLogs = function (searchParams) {
9691 report.presentation = {};
9411 vm.isLoading.logs = true;
9692 if (report.group.public) {
9412 logsNoIdResource.query(searchParams, function (data, getResponseHeaders) {
9693 report.presentation.className = 'public';
9413 vm.isLoading.logs = false;
9694 report.presentation.tooltip = 'Public';
9695 }
9696 else if (report.group.fixed) {
9697 report.presentation.className = 'fixed';
9698 report.presentation.tooltip = 'Fixed';
9699 }
9700 else if (report.group.read) {
9701 report.presentation.className = 'reviewed';
9702 report.presentation.tooltip = 'Reviewed';
9703 }
9704 else {
9705 report.presentation.className = 'new';
9706 report.presentation.tooltip = 'New';
9707 }
9708 return report;
9709 };
9710
9711 vm.fetchReports = function (searchParams) {
9712 vm.is_loading = true;
9713 slowReportsResource.query(searchParams, function (data, getResponseHeaders) {
9714 var headers = getResponseHeaders();
9414 var headers = getResponseHeaders();
9715
9415 vm.logsPage = data;
9716 vm.is_loading = false;
9717 vm.reportsPage = _.map(data, function (item) {
9718 return reportPresentation(item);
9719 });
9720 vm.itemCount = headers['x-total-count'];
9416 vm.itemCount = headers['x-total-count'];
9721 vm.itemsPerPage = headers['x-items-per-page'];
9417 vm.itemsPerPage = headers['x-items-per-page'];
9722 }, function () {
9418 }, function () {
9723 vm.is_loading = false;
9419 vm.isLoading.logs = false;
9724 });
9420 });
9725 };
9421 };
9726
9422
9727 vm.filterId = function (log) {
9423 vm.fetchSeriesData = function (searchParams) {
9728 vm.searchParams.tags.push({
9424 searchParams['section'] = 'logs_section';
9729 type: "request_id",
9425 searchParams['view'] = 'fetch_series';
9730 value: log.request_id
9426 vm.isLoading.series = true;
9427 sectionViewResource.query(searchParams, function (data) {
9428
9429 vm.logEventsChartData = {
9430 json: data,
9431 xFormat: '%Y-%m-%dT%H:%M:%S',
9432 keys: {
9433 x: 'x',
9434 value: ["logs"]
9435 },
9436 names: {
9437 logs: 'Log events'
9438 },
9439 type: 'bar'
9440 };
9441 vm.isLoading.series = false;
9442 }, function () {
9443 vm.isLoading.series = false;
9731 });
9444 });
9445 };
9446
9447 vm.filterId = function (log) {
9448 $location.search('request_id', log.request_id);
9732 vm.refresh();
9449 vm.refresh();
9733 };
9450 };
9451
9734 vm.refresh = function(){
9452 vm.refresh = function(){
9735 vm.searchParams = parseSearchToTags($location.search());
9453 vm.searchParams = parseSearchToTags($location.search());
9736 vm.page = Number(vm.searchParams.page) || 1;
9454 vm.page = Number(vm.searchParams.page) || 1;
9737 var params = parseTagsToSearch(vm.searchParams);
9455 var params = parseTagsToSearch(vm.searchParams);
9738 vm.fetchReports(params);
9456 vm.fetchLogs(params);
9457 vm.fetchSeriesData(params);
9739 };
9458 };
9740
9459 console.info('page load');
9741 //initial load
9742 vm.refresh();
9460 vm.refresh();
9743 }
9461 }
9744
9462
@@ -9761,275 +9479,345 b' function ReportsSlowBrowserViewController($location, $cookies, stateHolder, type'
9761 // # services, and proprietary license terms, please see
9479 // # services, and proprietary license terms, please see
9762 // # https://rhodecode.com/licenses/
9480 // # https://rhodecode.com/licenses/
9763
9481
9764 angular.module('appenlight.components.settingsView', [])
9482 angular.module('appenlight.components.reportView', [])
9765 .component('settingsView', {
9483 .component('reportView', {
9766 templateUrl: 'components/views/settings-view/settings-view.html',
9484 templateUrl: 'components/views/report-view/report-view.html',
9767 controller: SettingsViewController
9485 controller: ReportViewController
9768 });
9769
9770 SettingsViewController.$inject = ['$state'];
9771
9772 function SettingsViewController($state) {
9773 this.$state = $state;
9774 console.info('SettingsViewController');
9775 }
9776
9777 ;// # Copyright (C) 2010-2016 RhodeCode GmbH
9778 // #
9779 // # This program is free software: you can redistribute it and/or modify
9780 // # it under the terms of the GNU Affero General Public License, version 3
9781 // # (only), as published by the Free Software Foundation.
9782 // #
9783 // # This program is distributed in the hope that it will be useful,
9784 // # but WITHOUT ANY WARRANTY; without even the implied warranty of
9785 // # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9786 // # GNU General Public License for more details.
9787 // #
9788 // # You should have received a copy of the GNU Affero General Public License
9789 // # along with this program. If not, see <http://www.gnu.org/licenses/>.
9790 // #
9791 // # This program is dual-licensed. If you wish to learn more about the
9792 // # AppEnlight Enterprise Edition, including its added features, Support
9793 // # services, and proprietary license terms, please see
9794 // # https://rhodecode.com/licenses/
9795
9796 angular.module('appenlight.components.userAlertChannelsEmailNewView', [])
9797 .component('userAlertChannelsEmailNewView', {
9798 templateUrl: 'components/views/user-alert-channel-email-new-view/user-alert-channel-email-new-view.html',
9799 controller: AlertChannelsEmailController
9800 });
9486 });
9801
9487
9802 AlertChannelsEmailController.$inject = ['$state','userSelfPropertyResource'];
9488 ReportViewController.$inject = ['$window', '$location', '$state', '$uibModal',
9489 '$cookies', 'reportGroupPropertyResource', 'reportGroupResource',
9490 'logsNoIdResource', 'stateHolder'];
9803
9491
9804 function AlertChannelsEmailController($state, userSelfPropertyResource) {
9492 function ReportViewController($window, $location, $state, $uibModal, $cookies, reportGroupPropertyResource, reportGroupResource, logsNoIdResource, stateHolder) {
9805
9806 var vm = this;
9493 var vm = this;
9494 vm.window = $window;
9495 vm.stateHolder = stateHolder;
9807 vm.$state = $state;
9496 vm.$state = $state;
9808 vm.loading = {email: false};
9497 vm.reportHistoryConfig = {
9809 vm.form = {};
9498 data: {
9810
9499 json: [],
9811 vm.createChannel = function () {
9500 xFormat: '%Y-%m-%dT%H:%M:%S'
9812 vm.loading.email = true;
9501 },
9813
9502 color: {
9814 userSelfPropertyResource.save({key: 'alert_channels'}, vm.form, function () {
9503 pattern: ['#6baed6', '#e6550d', '#74c476', '#fdd0a2', '#8c564b']
9815 //vm.loading.email = false;
9504 },
9816 //setServerValidation(vm.channelForm);
9505 axis: {
9817 //vm.form = {};
9506 x: {
9818 $state.go('user.alert_channels.list');
9507 type: 'timeseries',
9819 }, function (response) {
9508 tick: {
9820 if (response.status == 422) {
9509 format: '%Y-%m-%d'
9821 setServerValidation(vm.channelForm, response.data);
9510 }
9511 },
9512 y: {
9513 tick: {
9514 count: 5,
9515 format: d3.format('.2s')
9516 }
9822 }
9517 }
9823 vm.loading.email = false;
9518 },
9824 });
9519 subchart: {
9825 }
9520 show: true,
9826 }
9521 size: {
9827
9522 height: 20
9828 ;// # Copyright (C) 2010-2016 RhodeCode GmbH
9523 }
9829 // #
9524 },
9830 // # This program is free software: you can redistribute it and/or modify
9525 size: {
9831 // # it under the terms of the GNU Affero General Public License, version 3
9526 height: 250
9832 // # (only), as published by the Free Software Foundation.
9527 },
9833 // #
9528 zoom: {
9834 // # This program is distributed in the hope that it will be useful,
9529 rescale: true
9835 // # but WITHOUT ANY WARRANTY; without even the implied warranty of
9530 },
9836 // # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9531 grid: {
9837 // # GNU General Public License for more details.
9532 x: {
9838 // #
9533 show: true
9839 // # You should have received a copy of the GNU Affero General Public License
9534 },
9840 // # along with this program. If not, see <http://www.gnu.org/licenses/>.
9535 y: {
9841 // #
9536 show: true
9842 // # This program is dual-licensed. If you wish to learn more about the
9537 }
9843 // # AppEnlight Enterprise Edition, including its added features, Support
9538 },
9844 // # services, and proprietary license terms, please see
9539 tooltip: {
9845 // # https://rhodecode.com/licenses/
9540 format: {
9541 title: function (d) {
9542 return '' + d;
9543 },
9544 value: function (v) {
9545 return v
9546 }
9547 }
9548 }
9549 };
9550 vm.mentionedPeople = [];
9551 vm.reportHistoryData = {};
9552 vm.textTraceback = true;
9553 vm.rawTraceback = '';
9554 vm.traceback = '';
9555 vm.reportType = 'report';
9556 vm.report = null;
9557 vm.showLong = false;
9558 vm.reportLogs = null;
9559 vm.requestStats = null;
9560 vm.comment = null;
9561 vm.is_loading = {
9562 report: true,
9563 logs: true,
9564 history: true
9565 };
9846
9566
9847 angular.module('appenlight.components.userAlertChannelsListView', [])
9567 vm.searchMentionedPeople = function(term){
9848 .component('userAlertChannelsListView', {
9568 //vm.mentionedPeople = [];
9849 templateUrl: 'components/views/user-alert-channels-list-view/user-alert-channels-list-view.html',
9569 var term = term.toLowerCase();
9850 controller: userAlertChannelsListViewController
9570 reportGroupPropertyResource.get({
9851 });
9571 groupId: vm.report.group_id,
9572 key: 'assigned_users'
9573 }, null,
9574 function (data) {
9575 var users = [];
9576 _.each(data.assigned, function(u){
9577 users.push({label: u.user_name});
9578 });
9579 _.each(data.unassigned, function(u){
9580 users.push({label: u.user_name});
9581 });
9852
9582
9853 userAlertChannelsListViewController.$inject = ['$state','userSelfPropertyResource', 'applicationsNoIdResource'];
9583 var result = _.filter(users, function(u){
9584 return u.label.toLowerCase().indexOf(term) !== -1;
9585 });
9586 vm.mentionedPeople = result;
9587 });
9588 };
9854
9589
9855 function userAlertChannelsListViewController($state, userSelfPropertyResource, applicationsNoIdResource) {
9590 vm.searchTag = function (tag, value) {
9856
9591
9857 var vm = this;
9592 if (vm.report.report_type === 3) {
9858 vm.$state = $state;
9593 $location.url($state.href('report.list_slow'));
9859 vm.loading = {channels: true, applications: true, actions:true};
9594 }
9595 else {
9596 $location.url($state.href('report.list'));
9597 }
9598 $location.search(tag, value);
9599 };
9860
9600
9861 vm.alertChannels = userSelfPropertyResource.query({key: 'alert_channels'},
9601 vm.tabs = {
9862 function (data) {
9602 slow_calls:false,
9863 vm.loading.channels = false;
9603 request_details:false,
9864 });
9604 logs:false,
9605 comments:false,
9606 affected_users:false
9607 };
9608 if ($cookies.selectedReportTab) {
9609 vm.tabs[$cookies.selectedReportTab] = true;
9610 }
9611 else{
9612 $cookies.selectedReportTab = 'request_details';
9613 vm.tabs.request_details = true;
9614 }
9865
9615
9866 vm.alertActions = userSelfPropertyResource.query({key: 'alert_actions'},
9616 vm.fetchLogs = function () {
9867 function (data) {
9617 if (!vm.report.request_id){
9868 vm.loading.actions = false;
9618 return
9619 }
9620 vm.is_loading.logs = true;
9621 logsNoIdResource.query({request_id: vm.report.request_id},
9622 function (data) {
9623 vm.is_loading.logs = false;
9624 vm.reportLogs = data;
9625 }, function () {
9626 vm.is_loading.logs = false;
9869 });
9627 });
9628 };
9629 vm.addComment = function () {
9630 reportGroupPropertyResource.save({
9631 groupId: vm.report.group_id,
9632 key: 'comments'
9633 }, {body: vm.comment},
9634 function (data) {
9635 vm.report.comments.push(data);
9636 });
9637 vm.comment = '';
9638 };
9870
9639
9871 vm.applications = applicationsNoIdResource.query({permission: 'view'},
9640 vm.fetchReport = function () {
9872 function (data) {
9641 vm.is_loading.report = true;
9873 vm.loading.applications = false;
9642 reportGroupResource.get($state.params, function (data) {
9643 vm.is_loading.report = false;
9644 if (data.request) {
9645 try {
9646 var to_sort = _.pairs(data.request);
9647 data.request = _.object(_.sortBy(to_sort, function (i) {
9648 return i[0]
9649 }));
9650 }
9651 catch (err) {
9652 }
9653 }
9654 vm.report = data;
9655 if (vm.report.req_stats) {
9656 vm.requestStats = [];
9657 _.each(_.pairs(vm.report.req_stats['percentages']), function (p) {
9658 vm.requestStats.push({
9659 name: p[0],
9660 value: vm.report.req_stats[p[0]].toFixed(3),
9661 percent: p[1],
9662 calls: vm.report.req_stats[p[0] + '_calls']
9663 })
9664 });
9665 }
9666 vm.traceback = data.traceback;
9667 _.each(vm.traceback, function (frame) {
9668 if (frame.line) {
9669 vm.rawTraceback += 'File ' + frame.file + ' line ' + frame.line + ' in ' + frame.fn + ": \r\n";
9670 }
9671 vm.rawTraceback += ' ' + frame.cline + "\r\n";
9672 });
9673
9674 if (stateHolder.AeUser.id){
9675 vm.fetchHistory();
9676 }
9677
9678 vm.selectedTab($cookies.selectedReportTab);
9679
9680 }, function (response) {
9681
9682 if (response.status == 403) {
9683 var uid = response.headers('x-appenlight-uid');
9684 if (!uid) {
9685 window.location = '/register?came_from=' + encodeURIComponent(window.location);
9686 }
9687 }
9688 vm.is_loading.report = false;
9874 });
9689 });
9690 };
9875
9691
9876 var allOps = {
9692 vm.selectedTab = function(tab_name){
9877 'eq': 'Equal',
9693 $cookies.selectedReportTab = tab_name;
9878 'ne': 'Not equal',
9694 if (tab_name == 'logs' && vm.reportLogs === null) {
9879 'ge': 'Greater or equal',
9695 vm.fetchLogs();
9880 'gt': 'Greater than',
9696 }
9881 'le': 'Lesser or equal',
9882 'lt': 'Lesser than',
9883 'startswith': 'Starts with',
9884 'endswith': 'Ends with',
9885 'contains': 'Contains'
9886 };
9697 };
9887
9698
9888 var fieldOps = {};
9699 vm.markFixed = function () {
9889 fieldOps['http_status'] = ['eq', 'ne', 'ge', 'le'];
9700 reportGroupResource.update({
9890 fieldOps['group:priority'] = ['eq', 'ne', 'ge', 'le'];
9701 groupId: vm.report.group_id
9891 fieldOps['duration'] = ['ge', 'le'];
9702 }, {fixed: !vm.report.group.fixed},
9892 fieldOps['url_domain'] = ['eq', 'ne', 'startswith', 'endswith',
9703 function (data) {
9893 'contains'];
9704 vm.report.group.fixed = data.fixed;
9894 fieldOps['url_path'] = ['eq', 'ne', 'startswith', 'endswith',
9705 });
9895 'contains'];
9706 };
9896 fieldOps['error'] = ['eq', 'ne', 'startswith', 'endswith',
9897 'contains'];
9898 fieldOps['tags:server_name'] = ['eq', 'ne', 'startswith', 'endswith',
9899 'contains'];
9900 fieldOps['group:occurences'] = ['eq', 'ne', 'ge', 'le'];
9901
9707
9902 var possibleFields = {
9708 vm.markPublic = function () {
9903 '__AND__': 'All met (composite rule)',
9709 reportGroupResource.update({
9904 '__OR__': 'One met (composite rule)',
9710 groupId: vm.report.group_id
9905 '__NOT__': 'Not met (composite rule)',
9711 }, {public: !vm.report.group.public},
9906 'http_status': 'HTTP Status',
9712 function (data) {
9907 'duration': 'Request duration',
9713 vm.report.group.public = data.public;
9908 'group:priority': 'Group -> Priority',
9714 });
9909 'url_domain': 'Domain',
9910 'url_path': 'URL Path',
9911 'error': 'Error',
9912 'tags:server_name': 'Tag -> Server name',
9913 'group:occurences': 'Group -> Occurences'
9914 };
9715 };
9915
9716
9916 vm.ruleDefinitions = {
9717 vm.delete = function () {
9917 fieldOps: fieldOps,
9718 reportGroupResource.delete({'groupId': vm.report.group_id},
9918 allOps: allOps,
9719 function (data) {
9919 possibleFields: possibleFields
9720 $state.go('report.list');
9721 })
9920 };
9722 };
9921
9723
9922 vm.addAction = function (channel) {
9724 vm.assignUsersModal = function (index) {
9923
9725 vm.opts = {
9924 userSelfPropertyResource.save({key: 'alert_channels_rules'}, {}, function (data) {
9726 backdrop: 'static',
9925 vm.alertActions.push(data);
9727 templateUrl: 'AssignReportCtrl.html',
9926 }, function (response) {
9728 controller: 'AssignReportCtrl as ctrl',
9927 if (response.status == 422) {
9729 resolve: {
9928
9730 report: function () {
9731 return vm.report;
9732 }
9929 }
9733 }
9734 };
9735 var modalInstance = $uibModal.open(vm.opts);
9736 modalInstance.result.then(function (report) {
9737
9738 }, function () {
9739 console.info('Modal dismissed at: ' + new Date());
9930 });
9740 });
9741
9931 };
9742 };
9932
9743
9933 vm.updateChannel = function (channel, subKey) {
9744 vm.fetchHistory = function () {
9934 var params = {
9745 reportGroupPropertyResource.query({
9935 key: 'alert_channels',
9746 groupId: vm.report.group_id,
9936 channel_name: channel['channel_name'],
9747 key: 'history'
9937 channel_value: channel['channel_value']
9748 }, function (data) {
9938 };
9749 vm.reportHistoryData = {
9939 var toUpdate = {};
9750 json: data,
9940 if (['daily_digest', 'send_alerts'].indexOf(subKey) !== -1) {
9751 keys: {
9941 toUpdate[subKey] = !channel[subKey];
9752 x: 'x',
9942 }
9753 value: ["reports"]
9943 userSelfPropertyResource.update(params, toUpdate, function (data) {
9754 },
9944 _.extend(channel, data);
9755 names: {
9756 reports: 'Reports history'
9757 },
9758 type: 'bar'
9759 };
9760 vm.is_loading.history = false;
9945 });
9761 });
9946 };
9762 };
9947
9763
9948 vm.removeChannel = function (channel) {
9764 vm.nextDetail = function () {
9949
9765 $state.go('report.view_detail', {
9950 userSelfPropertyResource.delete({
9766 groupId: vm.report.group_id,
9951 key: 'alert_channels',
9767 reportId: vm.report.group.next_report
9952 channel_name: channel.channel_name,
9953 channel_value: channel.channel_value
9954 }, function () {
9955 vm.alertChannels = _.filter(vm.alertChannels, function(item){
9956 return item != channel;
9957 });
9958 });
9768 });
9769 };
9770 vm.previousDetail = function () {
9771 $state.go('report.view_detail', {
9772 groupId: vm.report.group_id,
9773 reportId: vm.report.group.previous_report
9774 });
9775 };
9959
9776
9960 }
9777 vm.runIntegration = function (integration_name) {
9961
9778
9962 }
9779 if (integration_name == 'bitbucket') {
9963
9780 var controller = 'BitbucketIntegrationCtrl as ctrl';
9964 ;// # Copyright (C) 2010-2016 RhodeCode GmbH
9781 var template_url = 'templates/integrations/bitbucket.html';
9965 // #
9782 }
9966 // # This program is free software: you can redistribute it and/or modify
9783 else if (integration_name == 'github') {
9967 // # it under the terms of the GNU Affero General Public License, version 3
9784 var controller = 'GithubIntegrationCtrl as ctrl';
9968 // # (only), as published by the Free Software Foundation.
9785 var template_url = 'templates/integrations/github.html';
9969 // #
9786 }
9970 // # This program is distributed in the hope that it will be useful,
9787 else if (integration_name == 'jira') {
9971 // # but WITHOUT ANY WARRANTY; without even the implied warranty of
9788 var controller = 'JiraIntegrationCtrl as ctrl';
9972 // # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9789 var template_url = 'templates/integrations/jira.html';
9973 // # GNU General Public License for more details.
9790 }
9974 // #
9791 else {
9975 // # You should have received a copy of the GNU Affero General Public License
9792 return false;
9976 // # along with this program. If not, see <http://www.gnu.org/licenses/>.
9793 }
9977 // #
9978 // # This program is dual-licensed. If you wish to learn more about the
9979 // # AppEnlight Enterprise Edition, including its added features, Support
9980 // # services, and proprietary license terms, please see
9981 // # https://rhodecode.com/licenses/
9982
9983 angular.module('appenlight.components.userAuthTokensView', [])
9984 .component('userAuthTokensView', {
9985 templateUrl: 'components/views/user-auth-tokens-view/user-auth-tokens-view.html',
9986 controller: userAuthTokensViewController
9987 });
9988
9989 userAuthTokensViewController.$inject = ['$state', 'userSelfPropertyResource', 'AeConfig'];
9990
9991 function userAuthTokensViewController($state, userSelfPropertyResource, AeConfig) {
9992
9993 var vm = this;
9994 vm.$state = $state;
9995 vm.loading = {tokens: true};
9996
9794
9997 vm.expireOptions = AeConfig.timeOptions;
9795 vm.opts = {
9796 backdrop: 'static',
9797 templateUrl: template_url,
9798 controller: controller,
9799 resolve: {
9800 integrationName: function () {
9801 return integration_name
9802 },
9803 report: function () {
9804 return vm.report;
9805 }
9806 }
9807 };
9808 var modalInstance = $uibModal.open(vm.opts);
9809 modalInstance.result.then(function (report) {
9998
9810
9999 vm.tokens = userSelfPropertyResource.query({key: 'auth_tokens'},
9811 }, function () {
10000 function (data) {
9812 console.info('Modal dismissed at: ' + new Date());
10001 vm.loading.tokens = false;
10002 });
9813 });
10003
9814
10004 vm.addToken = function () {
10005 vm.loading.tokens = true;
10006 userSelfPropertyResource.save({key: 'auth_tokens'},
10007 vm.form,
10008 function (data) {
10009 vm.loading.tokens = false;
10010 setServerValidation(vm.TokenForm);
10011 vm.form = {};
10012 vm.tokens.push(data);
10013 }, function (response) {
10014 vm.loading.tokens = false;
10015 if (response.status == 422) {
10016 setServerValidation(vm.TokenForm, response.data);
10017 }
10018 })
10019 };
9815 };
10020
9816
10021 vm.removeToken = function (token) {
9817 // load report
10022 userSelfPropertyResource.delete({
9818 vm.fetchReport();
10023 key: 'auth_tokens',
9819
10024 token: token.token
9820
10025 },
10026 function () {
10027 var index = vm.tokens.indexOf(token);
10028 if (index !== -1) {
10029 vm.tokens.splice(index, 1);
10030 }
10031 })
10032 }
10033 }
9821 }
10034
9822
10035 ;// # Copyright (C) 2010-2016 RhodeCode GmbH
9823 ;// # Copyright (C) 2010-2016 RhodeCode GmbH
@@ -10051,151 +9839,306 b' function userAuthTokensViewController($state, userSelfPropertyResource, AeConfig'
10051 // # services, and proprietary license terms, please see
9839 // # services, and proprietary license terms, please see
10052 // # https://rhodecode.com/licenses/
9840 // # https://rhodecode.com/licenses/
10053
9841
10054 angular.module('appenlight.components.userIdentitiesView', [])
9842 angular.module('appenlight.components.reportsBrowserView', [])
10055 .component('userIdentitiesView', {
9843 .component('reportsBrowserView', {
10056 templateUrl: 'components/views/user-identities-view/user-identities-view.html',
9844 templateUrl: 'components/views/reports-browser-view/reports-browser-view.html',
10057 controller: UserIdentitiesController
9845 controller: reportsBrowserViewController
10058 });
9846 });
10059
9847
10060 UserIdentitiesController.$inject = ['$state', 'userSelfPropertyResource', 'AeConfig'];
9848 reportsBrowserViewController.$inject = ['$location', '$cookies',
9849 'stateHolder', 'typeAheadTagHelper', 'reportsResource'];
10061
9850
10062 function UserIdentitiesController($state, userSelfPropertyResource, AeConfig) {
9851 function reportsBrowserViewController($location, $cookies, stateHolder,
10063
9852 typeAheadTagHelper, reportsResource) {
10064 var vm = this;
9853 var vm = this;
10065 vm.$state = $state;
9854 vm.applications = stateHolder.AeUser.applications_map;
10066 vm.AeConfig = AeConfig;
9855 stateHolder.section = 'reports';
10067 vm.loading = {identities: true};
9856 vm.today = function () {
10068
9857 vm.pickerDate = new Date();
10069 vm.identities = userSelfPropertyResource.query(
9858 };
10070 {key: 'external_identities'},
9859 vm.today();
10071 function (data) {
9860 vm.reportsPage = [];
10072 vm.loading.identities = false;
9861 vm.page = 1;
10073
9862 vm.itemCount = 0;
10074 });
9863 vm.itemsPerPage = 250;
10075
9864 typeAheadTagHelper.tags = [];
10076 vm.removeProvider = function (provider) {
9865 vm.searchParams = {tags: [], page: 1, type: 'report'};
10077
9866 vm.is_loading = false;
10078 userSelfPropertyResource.delete(
9867 vm.filterTypeAheadOptions = [
10079 {
9868 {
10080 key: 'external_identities',
9869 type: 'error',
10081 provider: provider.provider,
9870 text: 'error:',
10082 id: provider.id
9871 'description': 'Full-text search in your reports',
10083 },
9872 example: 'error:text-im-looking-for',
10084 function (status) {
9873 tag: 'Error'
10085 if (status){
9874 },
10086 vm.identities = _.filter(vm.identities, function (item) {
9875 {
10087 return item != provider
9876 type: 'view_name',
10088 });
9877 text: 'view_name:',
10089 }
9878 'description': 'Query reports occured in specific views',
9879 example: "view_name:module.foo",
9880 tag: 'View Name'
9881 },
9882 {
9883 type: 'resource',
9884 text: 'resource:',
9885 'description': 'Restrict resultset to application',
9886 example: "resource:ID",
9887 tag: 'Application'
9888 },
9889 {
9890 type: 'priority',
9891 text: 'priority:',
9892 'description': 'Show reports with specific priority',
9893 example: 'priority:8',
9894 tag: 'Priority'
9895 },
9896 {
9897 type: 'min_occurences',
9898 text: 'min_occurences:',
9899 'description': 'Show reports from groups with at least X occurences',
9900 example: 'min_occurences:25',
9901 tag: 'Occurences'
9902 },
9903 {
9904 type: 'url_path',
9905 text: 'url_path:',
9906 'description': 'Show reports from specific URL paths',
9907 example: 'url_path:/foo/bar/baz',
9908 tag: 'Url Path'
9909 },
9910 {
9911 type: 'url_domain',
9912 text: 'url_domain:',
9913 'description': 'Show reports from specific domain',
9914 example: 'url_domain:domain.com',
9915 tag: 'Domain'
9916 },
9917 {
9918 type: 'report_status',
9919 text: 'report_status:',
9920 'description': 'Show reports from groups with specific status',
9921 example: 'report_status:never_reviewed',
9922 tag: 'Status'
9923 },
9924 {
9925 type: 'request_id',
9926 text: 'request_id:',
9927 'description': 'Show reports with specific request id',
9928 example: "request_id:883143dc572e4c38aceae92af0ea5ae0",
9929 tag: 'Request ID'
9930 },
9931 {
9932 type: 'server_name',
9933 text: 'server_name:',
9934 'description': 'Show reports tagged with this key/value pair',
9935 example: 'server_name:hostname',
9936 tag: 'Tag'
9937 },
9938 {
9939 type: 'http_status',
9940 text: 'http_status:',
9941 'description': 'Show reports with specific HTTP status code',
9942 example: "http_status:",
9943 tag: 'HTTP Status'
9944 },
9945 {
9946 type: 'http_status',
9947 text: 'http_status:500',
9948 'description': 'Show reports with specific HTTP status code',
9949 example: "http_status:500",
9950 tag: 'HTTP Status'
9951 },
9952 {
9953 type: 'http_status',
9954 text: 'http_status:404',
9955 'description': 'Include 404 reports in your search',
9956 example: "http_status:404",
9957 tag: 'HTTP Status'
9958 },
9959 {
9960 type: 'start_date',
9961 text: 'start_date:',
9962 'description': 'Show reports newer than this date (press TAB for dropdown)',
9963 example: 'start_date:2014-08-15T13:00',
9964 tag: 'Start Date'
9965 },
9966 {
9967 type: 'end_date',
9968 text: 'end_date:',
9969 'description': 'Show reports older than this date (press TAB for dropdown)',
9970 example: 'start_date:2014-08-15T23:59',
9971 tag: 'End Date'
9972 }
9973 ];
10090
9974
10091 });
9975 vm.filterTypeAhead = undefined;
9976 vm.showDatePicker = false;
9977 vm.manualOpen = false;
9978 vm.aheadFilter = typeAheadTagHelper.aheadFilter;
9979 vm.removeSearchTag = function (tag) {
9980 $location.search(tag.type, null);
9981 vm.refresh();
9982 };
9983 vm.addSearchTag = function (tag) {
9984 $location.search(tag.type, tag.value);
9985 vm.refresh();
9986 };
9987 vm.notRelativeTime = false;
9988 if ($cookies.notRelativeTime) {
9989 vm.notRelativeTime = JSON.parse($cookies.notRelativeTime);
10092 }
9990 }
10093 }
10094
9991
10095 ;// # Copyright (C) 2010-2016 RhodeCode GmbH
9992 vm.changeRelativeTime = function () {
10096 // #
9993 $cookies.notRelativeTime = JSON.stringify(vm.notRelativeTime);
10097 // # This program is free software: you can redistribute it and/or modify
9994 };
10098 // # it under the terms of the GNU Affero General Public License, version 3
10099 // # (only), as published by the Free Software Foundation.
10100 // #
10101 // # This program is distributed in the hope that it will be useful,
10102 // # but WITHOUT ANY WARRANTY; without even the implied warranty of
10103 // # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10104 // # GNU General Public License for more details.
10105 // #
10106 // # You should have received a copy of the GNU Affero General Public License
10107 // # along with this program. If not, see <http://www.gnu.org/licenses/>.
10108 // #
10109 // # This program is dual-licensed. If you wish to learn more about the
10110 // # AppEnlight Enterprise Edition, including its added features, Support
10111 // # services, and proprietary license terms, please see
10112 // # https://rhodecode.com/licenses/
10113
9995
10114 angular.module('appenlight.components.userPasswordView', [])
9996 _.each(_.range(1, 11), function (priority) {
10115 .component('userPasswordView', {
9997 vm.filterTypeAheadOptions.push({
10116 templateUrl: 'components/views/user-password-view/user-password-view.html',
9998 type: 'priority',
10117 controller: UserPasswordViewController
9999 text: 'priority:' + priority.toString(),
10000 description: 'Show entries with specific priority',
10001 example: 'priority:' + priority,
10002 tag: 'Priority'
10003 });
10004 });
10005 _.each(['never_reviewed', 'reviewed', 'fixed', 'public'], function (status) {
10006 vm.filterTypeAheadOptions.push({
10007 type: 'report_status',
10008 text: 'report_status:' + status,
10009 'description': 'Show only reports with this status',
10010 example: 'report_status:' + status,
10011 tag: 'Status ' + status.toUpperCase()
10012 });
10013 });
10014 _.each(stateHolder.AeUser.applications, function (item) {
10015 vm.filterTypeAheadOptions.push({
10016 type: 'resource',
10017 text: 'resource:' + item.resource_id + ':' + item.resource_name,
10018 example: 'resource:' + item.resource_id,
10019 'tag': item.resource_name,
10020 'description': 'Restrict resultset to this application'
10021 });
10118 });
10022 });
10119
10023
10120 UserPasswordViewController.$inject = ['$state', 'userSelfPropertyResource'];
10024 vm.paginationChange = function(){
10025 $location.search('page', vm.page);
10026 vm.refresh();
10027 };
10121
10028
10122 function UserPasswordViewController($state, userSelfPropertyResource) {
10029 vm.typeAheadTag = function (event) {
10123
10030 var text = vm.filterTypeAhead;
10124 var vm = this;
10031 if (_.isObject(vm.filterTypeAhead)) {
10125 vm.$state = $state;
10032 text = vm.filterTypeAhead.text;
10126 vm.loading = {password: false};
10033 }
10127 vm.form = {};
10034 if (!vm.filterTypeAhead) {
10035 return
10036 }
10128
10037
10129 vm.updatePassword = function () {
10038 var parsed = text.split(':');
10130 vm.loading.password = true;
10039 var tag = {'type': null, 'value': null};
10131
10040 // app tags have : twice
10132 userSelfPropertyResource.update({key: 'password'}, vm.form, function () {
10041 if (parsed.length > 2 && parsed[0] == 'resource') {
10133 vm.loading.password = false;
10042 tag.type = 'resource';
10134 vm.form = {};
10043 tag.value = parsed[1];
10135 setServerValidation(vm.passwordForm);
10044 }
10136 }, function (response) {
10045 // normal tag:value
10137 if (response.status == 422) {
10046 else if (parsed.length > 1) {
10138
10047 tag.type = parsed[0];
10139 setServerValidation(vm.passwordForm, response.data);
10048 var tagValue = parsed.slice(1);
10140
10049 if (tagValue) {
10050 tag.value = tagValue.join(':');
10141 }
10051 }
10142 vm.loading.password = false;
10052 }
10143 });
10053 else {
10144 }
10054 tag.type = 'error';
10145 }
10055 tag.value = parsed.join(':');
10056 }
10146
10057
10147 ;// # Copyright (C) 2010-2016 RhodeCode GmbH
10058 // set datepicker hour based on type of field
10148 // #
10059 if ('start_date:' == text) {
10149 // # This program is free software: you can redistribute it and/or modify
10060 vm.showDatePicker = true;
10150 // # it under the terms of the GNU Affero General Public License, version 3
10061 vm.filterTypeAhead = 'start_date:' + moment(vm.pickerDate).utc().format();
10151 // # (only), as published by the Free Software Foundation.
10062 }
10152 // #
10063 else if ('end_date:' == text) {
10153 // # This program is distributed in the hope that it will be useful,
10064 vm.showDatePicker = true;
10154 // # but WITHOUT ANY WARRANTY; without even the implied warranty of
10065 vm.filterTypeAhead = 'end_date:' + moment(vm.pickerDate).utc().hour(23).minute(59).format();
10155 // # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10066 }
10156 // # GNU General Public License for more details.
10157 // #
10158 // # You should have received a copy of the GNU Affero General Public License
10159 // # along with this program. If not, see <http://www.gnu.org/licenses/>.
10160 // #
10161 // # This program is dual-licensed. If you wish to learn more about the
10162 // # AppEnlight Enterprise Edition, including its added features, Support
10163 // # services, and proprietary license terms, please see
10164 // # https://rhodecode.com/licenses/
10165
10067
10166 angular.module('appenlight.components.userProfileView', [])
10068 if (event.keyCode != 13 || !tag.type || !tag.value) {
10167 .component('userProfileView', {
10069 return
10168 templateUrl: 'components/views/user-profile-view/user-profile-view.html',
10070 }
10169 controller: UserProfileViewController
10071 vm.showDatePicker = false;
10170 });
10072 // aka we selected one of main options
10073 vm.addSearchTag({type: tag.type, value: tag.value});
10074 // clear typeahead
10075 vm.filterTypeAhead = undefined;
10076 };
10171
10077
10172 UserProfileViewController.$inject = ['$state', 'userSelfResource'];
10078 vm.pickerDateChanged = function(){
10079 if (vm.filterTypeAhead.indexOf('start_date:') == '0') {
10080 vm.filterTypeAhead = 'start_date:' + moment(vm.pickerDate).utc().format();
10081 }
10082 else if (vm.filterTypeAhead.indexOf('end_date:') == '0') {
10083 vm.filterTypeAhead = 'end_date:' + moment(vm.pickerDate).utc().hour(23).minute(59).format();
10084 }
10085 vm.showDatePicker = false;
10086 };
10173
10087
10174 function UserProfileViewController($state, userSelfResource) {
10088 var reportPresentation = function (report) {
10175
10089 report.presentation = {};
10176 var vm = this;
10090 if (report.group.public) {
10177 vm.$state = $state;
10091 report.presentation.className = 'public';
10178 vm.loading = {profile: true};
10092 report.presentation.tooltip = 'Public';
10093 }
10094 else if (report.group.fixed) {
10095 report.presentation.className = 'fixed';
10096 report.presentation.tooltip = 'Fixed';
10097 }
10098 else if (report.group.read) {
10099 report.presentation.className = 'reviewed';
10100 report.presentation.tooltip = 'Reviewed';
10101 }
10102 else {
10103 report.presentation.className = 'new';
10104 report.presentation.tooltip = 'New';
10105 }
10106 return report;
10107 };
10179
10108
10180 vm.user = userSelfResource.get(null, function (data) {
10109 vm.fetchReports = function (searchParams) {
10181 vm.loading.profile = false;
10110 vm.is_loading = true;
10182
10111 reportsResource.query(searchParams, function (data, getResponseHeaders) {
10183 });
10112 var headers = getResponseHeaders();
10113
10114 vm.is_loading = false;
10115 vm.reportsPage = _.map(data, function (item) {
10116 return reportPresentation(item);
10117 });
10118 vm.itemCount = headers['x-total-count'];
10119 vm.itemsPerPage = headers['x-items-per-page'];
10120 }, function () {
10121 vm.is_loading = false;
10122 });
10123 };
10184
10124
10185 vm.updateProfile = function () {
10125 vm.filterId = function (log) {
10186 vm.loading.profile = true;
10126 vm.searchParams.tags.push({
10127 type: "request_id",
10128 value: log.request_id
10129 });
10130 vm.refresh();
10131 };
10187
10132
10133 vm.refresh = function(){
10134 vm.searchParams = parseSearchToTags($location.search());
10135 vm.page = Number(vm.searchParams.page) || 1;
10136 var params = parseTagsToSearch(vm.searchParams);
10188
10137
10189 vm.user.$update(null, function () {
10138 vm.fetchReports(params);
10190 vm.loading.profile = false;
10139 };
10191 setServerValidation(vm.profileForm);
10140 // initial load
10192 }, function (response) {
10141 vm.refresh();
10193 if (response.status == 422) {
10194 setServerValidation(vm.profileForm, response.data);
10195 }
10196 vm.loading.profile = false;
10197 });
10198 }
10199 }
10142 }
10200
10143
10201 ;// # Copyright (C) 2010-2016 RhodeCode GmbH
10144 ;// # Copyright (C) 2010-2016 RhodeCode GmbH
@@ -10217,58 +10160,284 b' function UserProfileViewController($state, userSelfResource) {'
10217 // # services, and proprietary license terms, please see
10160 // # services, and proprietary license terms, please see
10218 // # https://rhodecode.com/licenses/
10161 // # https://rhodecode.com/licenses/
10219
10162
10220 var aeconfig = angular.module('appenlight.config', []);
10163 'use strict';
10221 aeconfig.factory('AeConfig', function () {
10164
10222 var obj = {};
10165 /* Controllers */
10223 obj.flashMessages = decodeEncodedJSON(window.AE.flash_messages);
10166
10224 obj.timeOptions = decodeEncodedJSON(window.AE.timeOptions);
10167 angular.module('appenlight.components.reportsSlowBrowserView', [])
10225 obj.plugins = decodeEncodedJSON(window.AE.plugins);
10168 .component('reportsSlowBrowserView', {
10226 obj.topNav = decodeEncodedJSON(window.AE.topNav);
10169 templateUrl: 'components/views/reports-slow-browser-view/reports-slow-browser-view.html',
10227 obj.ws_url = window.AE.ws_url;
10170 controller: ReportsSlowBrowserViewController
10228 obj.urls = window.AE.urls;
10171 });
10229 // set keys on values because we wont be able to retrieve them everywhere
10172
10230 for (var key in obj.timeOptions) {
10173 ReportsSlowBrowserViewController.$inject = ['$location', '$cookies',
10231 obj.timeOptions[key]['key'] = key;
10174 'stateHolder', 'typeAheadTagHelper', 'slowReportsResource']
10175
10176 function ReportsSlowBrowserViewController($location, $cookies, stateHolder, typeAheadTagHelper, slowReportsResource) {
10177 var vm = this;
10178 vm.applications = stateHolder.AeUser.applications_map;
10179 stateHolder.section = 'slow_reports';
10180 vm.today = function () {
10181 vm.pickerDate = new Date();
10182 };
10183 vm.today();
10184 vm.reportsPage = [];
10185 vm.page = 1;
10186 vm.itemCount = 0;
10187 vm.itemsPerPage = 250;
10188 typeAheadTagHelper.tags = [];
10189 vm.searchParams = {tags: [], page: 1, type: 'slow_report'};
10190 vm.is_loading = false;
10191 vm.filterTypeAheadOptions = [
10192 {
10193 type: 'view_name',
10194 text: 'view_name:',
10195 'description': 'Query reports occured in specific views',
10196 tag: 'View Name',
10197 example: "view_name:module.foo"
10198 },
10199 {
10200 type: 'resource',
10201 text: 'resource:',
10202 'description': 'Restrict resultset to application',
10203 tag: 'Application',
10204 example: "resource:ID"
10205 },
10206 {
10207 type: 'priority',
10208 text: 'priority:',
10209 'description': 'Show reports with specific priority',
10210 example: 'priority:8',
10211 tag: 'Priority'
10212 },
10213 {
10214 type: 'min_occurences',
10215 text: 'min_occurences:',
10216 'description': 'Show reports from groups with at least X occurences',
10217 example: 'min_occurences:25',
10218 tag: 'Min. occurences'
10219 },
10220 {
10221 type: 'min_duration',
10222 text: 'min_duration:',
10223 'description': 'Show reports from groups with average duration >= Xs',
10224 example: 'min_duration:4.5',
10225 tag: 'Min. duration'
10226 },
10227 {
10228 type: 'url_path',
10229 text: 'url_path:',
10230 'description': 'Show reports from specific URL paths',
10231 example: 'url_path:/foo/bar/baz',
10232 tag: 'Url Path'
10233 },
10234 {
10235 type: 'url_domain',
10236 text: 'url_domain:',
10237 'description': 'Show reports from specific domain',
10238 example: 'url_domain:domain.com',
10239 tag: 'Domain'
10240 },
10241 {
10242 type: 'request_id',
10243 text: 'request_id:',
10244 'description': 'Show reports with specific request id',
10245 example: "request_id:883143dc572e4c38aceae92af0ea5ae0",
10246 tag: 'Request ID'
10247 },
10248 {
10249 type: 'report_status',
10250 text: 'report_status:',
10251 'description': 'Show reports from groups with specific status',
10252 example: 'report_status:never_reviewed',
10253 tag: 'Status'
10254 },
10255 {
10256 type: 'server_name',
10257 text: 'server_name:',
10258 'description': 'Show reports tagged with this key/value pair',
10259 example: 'server_name:hostname',
10260 tag: 'Tag'
10261 },
10262 {
10263 type: 'start_date',
10264 text: 'start_date:',
10265 'description': 'Show reports newer than this date (press TAB for dropdown)',
10266 example: 'start_date:2014-08-15T13:00',
10267 tag: 'Start Date'
10268 },
10269 {
10270 type: 'end_date',
10271 text: 'end_date:',
10272 'description': 'Show reports older than this date (press TAB for dropdown)',
10273 example: 'start_date:2014-08-15T23:59',
10274 tag: 'End Date'
10275 }
10276 ];
10277
10278 vm.filterTypeAhead = undefined;
10279 vm.showDatePicker = false;
10280 vm.aheadFilter = typeAheadTagHelper.aheadFilter;
10281 vm.removeSearchTag = function (tag) {
10282 $location.search(tag.type, null);
10283 vm.refresh();
10284 };
10285 vm.addSearchTag = function (tag) {
10286 $location.search(tag.type, tag.value);
10287 vm.refresh();
10288 };
10289 vm.manualOpen = false;
10290 vm.notRelativeTime = false;
10291 if ($cookies.notRelativeTime) {
10292 vm.notRelativeTime = JSON.parse($cookies.notRelativeTime);
10232 }
10293 }
10233 console.info('config', obj);
10234 return obj;
10235 });
10236
10294
10237 ;// # Copyright (C) 2010-2016 RhodeCode GmbH
10238 // #
10239 // # This program is free software: you can redistribute it and/or modify
10240 // # it under the terms of the GNU Affero General Public License, version 3
10241 // # (only), as published by the Free Software Foundation.
10242 // #
10243 // # This program is distributed in the hope that it will be useful,
10244 // # but WITHOUT ANY WARRANTY; without even the implied warranty of
10245 // # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10246 // # GNU General Public License for more details.
10247 // #
10248 // # You should have received a copy of the GNU Affero General Public License
10249 // # along with this program. If not, see <http://www.gnu.org/licenses/>.
10250 // #
10251 // # This program is dual-licensed. If you wish to learn more about the
10252 // # AppEnlight Enterprise Edition, including its added features, Support
10253 // # services, and proprietary license terms, please see
10254 // # https://rhodecode.com/licenses/
10255
10295
10256 angular.module('appenlight.controllers').controller('AdminApplicationsListController', AdminApplicationsListController);
10296 vm.changeRelativeTime = function () {
10297 $cookies.notRelativeTime = JSON.stringify(vm.notRelativeTime);
10298 };
10299
10300 _.each(_.range(1, 11), function (priority) {
10301 vm.filterTypeAheadOptions.push({
10302 type: 'priority',
10303 text: 'priority:' + priority.toString(),
10304 description: 'Show entries with specific priority',
10305 example: 'priority:' + priority,
10306 tag: 'Priority'
10307 });
10308 });
10309 _.each(['never_reviewed', 'reviewed', 'fixed', 'public'], function (status) {
10310 vm.filterTypeAheadOptions.push({
10311 type: 'report_status',
10312 text: 'report_status:' + status,
10313 'description': 'Show only reports with this status',
10314 example: 'report_status:' + status,
10315 tag: 'Status ' + status.toUpperCase()
10316 });
10317 });
10318 _.each(stateHolder.AeUser.applications, function (item) {
10319 vm.filterTypeAheadOptions.push({
10320 type: 'resource',
10321 text: 'resource:' + item.resource_id + ':' + item.resource_name,
10322 example: 'resource:' + item.resource_id,
10323 'tag': item.resource_name,
10324 'description': 'Restrict resultset to this application'
10325 });
10326 });
10327
10328 vm.typeAheadTag = function (event) {
10329 var text = vm.filterTypeAhead;
10330 if (_.isObject(vm.filterTypeAhead)) {
10331 text = vm.filterTypeAhead.text;
10332 };
10333 if (!vm.filterTypeAhead) {
10334 return
10335 }
10336 var parsed = text.split(':');
10337 var tag = {'type': null, 'value': null};
10338 // app tags have : twice
10339 if (parsed.length > 2 && parsed[0] == 'resource') {
10340 tag.type = 'resource';
10341 tag.value = parsed[1];
10342 }
10343 // normal tag:value
10344 else if (parsed.length > 1) {
10345 tag.type = parsed[0];
10346 var tagValue = parsed.slice(1);
10347 if (tagValue) {
10348 tag.value = tagValue.join(':');
10349 }
10350 }
10351
10352 // set datepicker hour based on type of field
10353 if ('start_date:' == text) {
10354 vm.showDatePicker = true;
10355 vm.filterTypeAhead = 'start_date:' + moment(vm.pickerDate).utc().format();
10356 }
10357 else if ('end_date:' == text) {
10358 vm.showDatePicker = true;
10359 vm.filterTypeAhead = 'end_date:' + moment(vm.pickerDate).utc().hour(23).minute(59).format();
10360 }
10361
10362 if (event.keyCode != 13 || !tag.type || !tag.value) {
10363 return
10364 }
10365 vm.showDatePicker = false;
10366 // aka we selected one of main options
10367 vm.addSearchTag({type: tag.type, value: tag.value});
10368 // clear typeahead
10369 vm.filterTypeAhead = undefined;
10370 };
10371
10372 vm.paginationChange = function(){
10373 $location.search('page', vm.page);
10374 vm.refresh();
10375 };
10257
10376
10258 AdminApplicationsListController.$inject = ['applicationsResource'];
10377 vm.pickerDateChanged = function(){
10378 if (vm.filterTypeAhead.indexOf('start_date:') == '0') {
10379 vm.filterTypeAhead = 'start_date:' + moment(vm.pickerDate).utc().format();
10380 }
10381 else if (vm.filterTypeAhead.indexOf('end_date:') == '0') {
10382 vm.filterTypeAhead = 'end_date:' + moment(vm.pickerDate).utc().hour(23).minute(59).format();
10383 }
10384 vm.showDatePicker = false;
10385 };
10259
10386
10260 function AdminApplicationsListController(applicationsResource) {
10387 var reportPresentation = function (report) {
10261
10388 report.presentation = {};
10262 var vm = this;
10389 if (report.group.public) {
10263 vm.loading = {applications: true};
10390 report.presentation.className = 'public';
10391 report.presentation.tooltip = 'Public';
10392 }
10393 else if (report.group.fixed) {
10394 report.presentation.className = 'fixed';
10395 report.presentation.tooltip = 'Fixed';
10396 }
10397 else if (report.group.read) {
10398 report.presentation.className = 'reviewed';
10399 report.presentation.tooltip = 'Reviewed';
10400 }
10401 else {
10402 report.presentation.className = 'new';
10403 report.presentation.tooltip = 'New';
10404 }
10405 return report;
10406 };
10264
10407
10265 vm.applications = applicationsResource.query({
10408 vm.fetchReports = function (searchParams) {
10266 root_list: true,
10409 vm.is_loading = true;
10267 resource_type: 'application'
10410 slowReportsResource.query(searchParams, function (data, getResponseHeaders) {
10268 }, function (data) {
10411 var headers = getResponseHeaders();
10269 vm.loading = {applications: false};
10412
10270 });
10413 vm.is_loading = false;
10271 };
10414 vm.reportsPage = _.map(data, function (item) {
10415 return reportPresentation(item);
10416 });
10417 vm.itemCount = headers['x-total-count'];
10418 vm.itemsPerPage = headers['x-items-per-page'];
10419 }, function () {
10420 vm.is_loading = false;
10421 });
10422 };
10423
10424 vm.filterId = function (log) {
10425 vm.searchParams.tags.push({
10426 type: "request_id",
10427 value: log.request_id
10428 });
10429 vm.refresh();
10430 };
10431 vm.refresh = function(){
10432 vm.searchParams = parseSearchToTags($location.search());
10433 vm.page = Number(vm.searchParams.page) || 1;
10434 var params = parseTagsToSearch(vm.searchParams);
10435 vm.fetchReports(params);
10436 };
10437
10438 //initial load
10439 vm.refresh();
10440 }
10272
10441
10273 ;// # Copyright (C) 2010-2016 RhodeCode GmbH
10442 ;// # Copyright (C) 2010-2016 RhodeCode GmbH
10274 // #
10443 // #
@@ -10289,44 +10458,18 b' function AdminApplicationsListController(applicationsResource) {'
10289 // # services, and proprietary license terms, please see
10458 // # services, and proprietary license terms, please see
10290 // # https://rhodecode.com/licenses/
10459 // # https://rhodecode.com/licenses/
10291
10460
10292 angular.module('appenlight.controllers').controller('ConfigsListController', ConfigsListController);
10461 angular.module('appenlight.components.settingsView', [])
10293
10462 .component('settingsView', {
10294 ConfigsListController.$inject = ['configsResource', 'configsNoIdResource'];
10463 templateUrl: 'components/views/settings-view/settings-view.html',
10295
10464 controller: SettingsViewController
10296 function ConfigsListController(configsResource, configsNoIdResource) {
10465 });
10297 var vm = this;
10298 vm.loading = {config: true};
10299
10300 var filters = [
10301 'template_footer_html:global',
10302 'list_groups_to_non_admins:global',
10303 'per_application_reports_rate_limit:global',
10304 'per_application_logs_rate_limit:global',
10305 'per_application_metrics_rate_limit:global',
10306 ];
10307
10308 vm.configs = {};
10309
10310 vm.configList = configsResource.query({filter: filters},
10311 function (data) {
10312 vm.loading = {config: false};
10313 _.each(data, function (item) {
10314 if (vm.configs[item.section] === undefined) {
10315 vm.configs[item.section] = {};
10316 }
10317 vm.configs[item.section][item.key] = item;
10318 });
10319 });
10320
10466
10321 vm.save = function () {
10467 SettingsViewController.$inject = ['$state'];
10322 vm.loading.config = true;
10323 _.each(vm.configList, function (item) {
10324 item.$save();
10325 });
10326 vm.loading.config = false;
10327 };
10328
10468
10329 };
10469 function SettingsViewController($state) {
10470 this.$state = $state;
10471 console.info('SettingsViewController');
10472 }
10330
10473
10331 ;// # Copyright (C) 2010-2016 RhodeCode GmbH
10474 ;// # Copyright (C) 2010-2016 RhodeCode GmbH
10332 // #
10475 // #
@@ -10347,128 +10490,37 b' function ConfigsListController(configsResource, configsNoIdResource) {'
10347 // # services, and proprietary license terms, please see
10490 // # services, and proprietary license terms, please see
10348 // # https://rhodecode.com/licenses/
10491 // # https://rhodecode.com/licenses/
10349
10492
10350 angular.module('appenlight.controllers').controller('AdminGroupsCreateController', AdminGroupsCreateController);
10493 angular.module('appenlight.components.userAlertChannelsEmailNewView', [])
10494 .component('userAlertChannelsEmailNewView', {
10495 templateUrl: 'components/views/user-alert-channel-email-new-view/user-alert-channel-email-new-view.html',
10496 controller: AlertChannelsEmailController
10497 });
10351
10498
10352 AdminGroupsCreateController.$inject = ['$state', 'groupsResource', 'groupsPropertyResource', 'sectionViewResource', 'AeConfig'];
10499 AlertChannelsEmailController.$inject = ['$state','userSelfPropertyResource'];
10353
10500
10354 function AdminGroupsCreateController($state, groupsResource, groupsPropertyResource, sectionViewResource, AeConfig) {
10501 function AlertChannelsEmailController($state, userSelfPropertyResource) {
10355
10502
10356 var vm = this;
10503 var vm = this;
10357 vm.loading = {
10504 vm.$state = $state;
10358 group: false,
10505 vm.loading = {email: false};
10359 resource_permissions: false,
10506 vm.form = {};
10360 users: false
10361 };
10362
10363 vm.form = {
10364 autocompleteUser: '',
10365 }
10366
10367
10368 if (typeof $state.params.groupId !== 'undefined') {
10369 vm.loading.group = true;
10370 var groupId = $state.params.groupId;
10371 vm.group = groupsResource.get({groupId: groupId}, function (data) {
10372 vm.loading.group = false;
10373 });
10374
10375 vm.resource_permissions = groupsPropertyResource.query(
10376 {groupId: groupId, key: 'resource_permissions'}, function (data) {
10377 vm.loading.resource_permissions = false;
10378 var tmpObj = {
10379 'group': {
10380 'application': {},
10381 'dashboard': {}
10382 }
10383 };
10384 _.each(data, function (item) {
10385
10386 var section = tmpObj[item.type][item.resource_type];
10387 if (typeof section[item.resource_id] == 'undefined') {
10388 section[item.resource_id] = {
10389 self: item,
10390 permissions: []
10391 }
10392 }
10393 section[item.resource_id].permissions.push(item.perm_name);
10394
10395 });
10396 vm.resourcePermissions = tmpObj;
10397 });
10398
10399 vm.users = groupsPropertyResource.query(
10400 {groupId: groupId, key: 'users'}, function (data) {
10401 vm.loading.users = false;
10402 }, function () {
10403 vm.loading.users = false;
10404 });
10405
10406 }
10407 else {
10408 var groupId = null;
10409 }
10410
10411 var formResponse = function (response) {
10412 if (response.status === 422) {
10413 setServerValidation(vm.groupForm, response.data);
10414 }
10415 vm.loading.group = false;
10416 };
10417
10418 vm.createGroup = function () {
10419 vm.loading.group = true;
10420 if (groupId) {
10421 groupsResource.update({groupId: vm.group.id}, vm.group, function (data) {
10422 setServerValidation(vm.groupForm);
10423 vm.loading.group = false;
10424 }, formResponse);
10425 }
10426 else {
10427 groupsResource.save(vm.group, function (data) {
10428 $state.go('admin.group.update', {groupId: data.id});
10429 }, formResponse);
10430 }
10431 };
10432
10433 vm.removeUser = function (user) {
10434 groupsPropertyResource.delete(
10435 {groupId: groupId, key: 'users', user_name: user.user_name},
10436 function (data) {
10437 vm.loading.users = false;
10438 vm.users = _.filter(vm.users, function (item) {
10439 return item != user;
10440 });
10441 }, function () {
10442 vm.loading.users = false;
10443 });
10444 };
10445
10446 vm.addUser = function () {
10447 groupsPropertyResource.save(
10448 {groupId: groupId, key: 'users'},
10449 {user_name: vm.form.autocompleteUser},
10450 function (data) {
10451 vm.loading.users = false;
10452 vm.users.push(data);
10453 vm.form.autocompleteUser = '';
10454 }, function () {
10455 vm.loading.users = false;
10456 });
10457 }
10458
10507
10459 vm.searchUsers = function (searchPhrase) {
10508 vm.createChannel = function () {
10509 vm.loading.email = true;
10460
10510
10461 return sectionViewResource.query({
10511 userSelfPropertyResource.save({key: 'alert_channels'}, vm.form, function () {
10462 section: 'users_section',
10512 //vm.loading.email = false;
10463 view: 'search_users',
10513 //setServerValidation(vm.channelForm);
10464 'user_name': searchPhrase
10514 //vm.form = {};
10465 }).$promise.then(function (data) {
10515 $state.go('user.alert_channels.list');
10466 return _.map(data, function (item) {
10516 }, function (response) {
10467 return item.user;
10517 if (response.status == 422) {
10468 });
10518 setServerValidation(vm.channelForm, response.data);
10469 });
10519 }
10520 vm.loading.email = false;
10521 });
10470 }
10522 }
10471 };
10523 }
10472
10524
10473 ;// # Copyright (C) 2010-2016 RhodeCode GmbH
10525 ;// # Copyright (C) 2010-2016 RhodeCode GmbH
10474 // #
10526 // #
@@ -10489,40 +10541,122 b' function AdminGroupsCreateController($state, groupsResource, groupsPropertyResou'
10489 // # services, and proprietary license terms, please see
10541 // # services, and proprietary license terms, please see
10490 // # https://rhodecode.com/licenses/
10542 // # https://rhodecode.com/licenses/
10491
10543
10492 angular.module('appenlight.controllers').controller('AdminGroupsController', AdminGroupsController);
10544 angular.module('appenlight.components.userAlertChannelsListView', [])
10545 .component('userAlertChannelsListView', {
10546 templateUrl: 'components/views/user-alert-channels-list-view/user-alert-channels-list-view.html',
10547 controller: userAlertChannelsListViewController
10548 });
10493
10549
10494 AdminGroupsController.$inject = ['groupsResource'];
10550 userAlertChannelsListViewController.$inject = ['$state','userSelfPropertyResource', 'applicationsNoIdResource'];
10495
10551
10496 function AdminGroupsController(groupsResource) {
10552 function userAlertChannelsListViewController($state, userSelfPropertyResource, applicationsNoIdResource) {
10497
10553
10498 var vm = this;
10554 var vm = this;
10499 vm.loading = {groups: true};
10555 vm.$state = $state;
10556 vm.loading = {channels: true, applications: true, actions:true};
10500
10557
10501 vm.groups = groupsResource.query({}, function (data) {
10558 vm.alertChannels = userSelfPropertyResource.query({key: 'alert_channels'},
10502 vm.loading = {groups: false};
10559 function (data) {
10503 vm.activeUsers = _.reduce(vm.groups, function(memo, val){
10560 vm.loading.channels = false;
10504 if (val.status == 1){
10561 });
10505 return memo + 1;
10562
10506 }
10563 vm.alertActions = userSelfPropertyResource.query({key: 'alert_actions'},
10507 return memo;
10564 function (data) {
10508 }, 0);
10565 vm.loading.actions = false;
10509
10566 });
10510 });
10511
10567
10568 vm.applications = applicationsNoIdResource.query({permission: 'view'},
10569 function (data) {
10570 vm.loading.applications = false;
10571 });
10512
10572
10513 vm.removeGroup = function (group) {
10573 var allOps = {
10514 groupsResource.remove({groupId: group.id}, function (data, responseHeaders) {
10574 'eq': 'Equal',
10515
10575 'ne': 'Not equal',
10516 if (data) {
10576 'ge': 'Greater or equal',
10517 var index = vm.groups.indexOf(group);
10577 'gt': 'Greater than',
10518 if (index !== -1) {
10578 'le': 'Lesser or equal',
10519 vm.groups.splice(index, 1);
10579 'lt': 'Lesser than',
10520 vm.activeGroups -= 1;
10580 'startswith': 'Starts with',
10521 }
10581 'endswith': 'Ends with',
10582 'contains': 'Contains'
10583 };
10584
10585 var fieldOps = {};
10586 fieldOps['http_status'] = ['eq', 'ne', 'ge', 'le'];
10587 fieldOps['group:priority'] = ['eq', 'ne', 'ge', 'le'];
10588 fieldOps['duration'] = ['ge', 'le'];
10589 fieldOps['url_domain'] = ['eq', 'ne', 'startswith', 'endswith',
10590 'contains'];
10591 fieldOps['url_path'] = ['eq', 'ne', 'startswith', 'endswith',
10592 'contains'];
10593 fieldOps['error'] = ['eq', 'ne', 'startswith', 'endswith',
10594 'contains'];
10595 fieldOps['tags:server_name'] = ['eq', 'ne', 'startswith', 'endswith',
10596 'contains'];
10597 fieldOps['group:occurences'] = ['eq', 'ne', 'ge', 'le'];
10598
10599 var possibleFields = {
10600 '__AND__': 'All met (composite rule)',
10601 '__OR__': 'One met (composite rule)',
10602 '__NOT__': 'Not met (composite rule)',
10603 'http_status': 'HTTP Status',
10604 'duration': 'Request duration',
10605 'group:priority': 'Group -> Priority',
10606 'url_domain': 'Domain',
10607 'url_path': 'URL Path',
10608 'error': 'Error',
10609 'tags:server_name': 'Tag -> Server name',
10610 'group:occurences': 'Group -> Occurences'
10611 };
10612
10613 vm.ruleDefinitions = {
10614 fieldOps: fieldOps,
10615 allOps: allOps,
10616 possibleFields: possibleFields
10617 };
10618
10619 vm.addAction = function (channel) {
10620
10621 userSelfPropertyResource.save({key: 'alert_channels_rules'}, {}, function (data) {
10622 vm.alertActions.push(data);
10623 }, function (response) {
10624 if (response.status == 422) {
10625
10522 }
10626 }
10523 });
10627 });
10628 };
10629
10630 vm.updateChannel = function (channel, subKey) {
10631 var params = {
10632 key: 'alert_channels',
10633 channel_name: channel['channel_name'],
10634 channel_value: channel['channel_value']
10635 };
10636 var toUpdate = {};
10637 if (['daily_digest', 'send_alerts'].indexOf(subKey) !== -1) {
10638 toUpdate[subKey] = !channel[subKey];
10639 }
10640 userSelfPropertyResource.update(params, toUpdate, function (data) {
10641 _.extend(channel, data);
10642 });
10643 };
10644
10645 vm.removeChannel = function (channel) {
10646
10647 userSelfPropertyResource.delete({
10648 key: 'alert_channels',
10649 channel_name: channel.channel_name,
10650 channel_value: channel.channel_value
10651 }, function () {
10652 vm.alertChannels = _.filter(vm.alertChannels, function(item){
10653 return item != channel;
10654 });
10655 });
10656
10524 }
10657 }
10525 };
10658
10659 }
10526
10660
10527 ;// # Copyright (C) 2010-2016 RhodeCode GmbH
10661 ;// # Copyright (C) 2010-2016 RhodeCode GmbH
10528 // #
10662 // #
@@ -10543,110 +10677,56 b' function AdminGroupsController(groupsResource) {'
10543 // # services, and proprietary license terms, please see
10677 // # services, and proprietary license terms, please see
10544 // # https://rhodecode.com/licenses/
10678 // # https://rhodecode.com/licenses/
10545
10679
10546 angular.module('appenlight.controllers').controller('AdminPartitionsController', AdminPartitionsController);
10680 angular.module('appenlight.components.userAuthTokensView', [])
10681 .component('userAuthTokensView', {
10682 templateUrl: 'components/views/user-auth-tokens-view/user-auth-tokens-view.html',
10683 controller: userAuthTokensViewController
10684 });
10547
10685
10548 AdminPartitionsController.$inject = ['sectionViewResource'];
10686 userAuthTokensViewController.$inject = ['$state', 'userSelfPropertyResource', 'AeConfig'];
10549
10687
10550 function AdminPartitionsController(sectionViewResource) {
10688 function userAuthTokensViewController($state, userSelfPropertyResource, AeConfig) {
10689
10551 var vm = this;
10690 var vm = this;
10552 vm.permanentPartitions = [];
10691 vm.$state = $state;
10553 vm.dailyPartitions = [];
10692 vm.loading = {tokens: true};
10554 vm.loading = {partitions: true};
10555 vm.dailyChecked = false;
10556 vm.permChecked = false;
10557 vm.dailyConfirm = '';
10558 vm.permConfirm = '';
10559
10560
10561 vm.loadPartitions = function (data) {
10562 var permanentPartitions = vm.transformPartitionList(
10563 data.permanent_partitions);
10564 var dailyPartitions = vm.transformPartitionList(
10565 data.daily_partitions);
10566 vm.permanentPartitions = permanentPartitions;
10567 vm.dailyPartitions = dailyPartitions;
10568 vm.loading = {partitions: false};
10569 };
10570
10571 vm.setCheckedList = function (scope) {
10572 var toTest = null;
10573 if (scope === 'dailyPartitions'){
10574 toTest = 'dailyChecked';
10575 }
10576 else{
10577 toTest = 'permChecked';
10578 }
10579
10580 if (vm[toTest]) {
10581 var val = true;
10582 }
10583 else {
10584 var val = false;
10585 }
10586
10587 _.each(vm[scope], function (item) {
10588 _.each(item[1].pg, function (index) {
10589 index.checked = val;
10590 });
10591 _.each(item[1].elasticsearch, function (index) {
10592 index.checked = val;
10593 });
10594 });
10595 }
10596
10597
10693
10598 vm.transformPartitionList = function (inputList) {
10694 vm.expireOptions = AeConfig.timeOptions;
10599 var outputList = [];
10600
10695
10601 _.each(inputList, function (item) {
10696 vm.tokens = userSelfPropertyResource.query({key: 'auth_tokens'},
10602 var time = [item[0], {
10697 function (data) {
10603 elasticsearch: [],
10698 vm.loading.tokens = false;
10604 pg: []
10605 }]
10606 _.each(item[1].pg, function (index) {
10607 time[1].pg.push({name: index, checked: false})
10608 });
10609 _.each(item[1].elasticsearch, function (index) {
10610 time[1].elasticsearch.push({
10611 name: index,
10612 checked: false
10613 })
10614 });
10615 outputList.push(time);
10616 });
10699 });
10617 return outputList;
10618 };
10619
10620 sectionViewResource.get({section:'admin_section', view: 'partitions'},
10621 vm.loadPartitions);
10622
10700
10623 vm.partitionsDelete = function (partitionType) {
10701 vm.addToken = function () {
10624 var es_indices = [];
10702 vm.loading.tokens = true;
10625 var pg_indices = [];
10703 userSelfPropertyResource.save({key: 'auth_tokens'},
10626 _.each(vm[partitionType], function (item) {
10704 vm.form,
10627 _.each(item[1].pg, function (index) {
10705 function (data) {
10628 if (index.checked) {
10706 vm.loading.tokens = false;
10629 pg_indices.push(index.name)
10707 setServerValidation(vm.TokenForm);
10630 }
10708 vm.form = {};
10631 });
10709 vm.tokens.push(data);
10632 _.each(item[1].elasticsearch, function (index) {
10710 }, function (response) {
10633 if (index.checked) {
10711 vm.loading.tokens = false;
10634 es_indices.push(index.name)
10712 if (response.status == 422) {
10713 setServerValidation(vm.TokenForm, response.data);
10635 }
10714 }
10636 });
10715 })
10637 });
10716 };
10638
10639
10640 vm.loading = {partitions: true};
10641 sectionViewResource.save({section:'admin_section',
10642 view: 'partitions_remove'}, {
10643 es_indices: es_indices,
10644 pg_indices: pg_indices,
10645 confirm: 'CONFIRM'
10646 }, vm.loadPartitions);
10647
10717
10718 vm.removeToken = function (token) {
10719 userSelfPropertyResource.delete({
10720 key: 'auth_tokens',
10721 token: token.token
10722 },
10723 function () {
10724 var index = vm.tokens.indexOf(token);
10725 if (index !== -1) {
10726 vm.tokens.splice(index, 1);
10727 }
10728 })
10648 }
10729 }
10649
10650 }
10730 }
10651
10731
10652 ;// # Copyright (C) 2010-2016 RhodeCode GmbH
10732 ;// # Copyright (C) 2010-2016 RhodeCode GmbH
@@ -10668,31 +10748,46 b' function AdminPartitionsController(sectionViewResource) {'
10668 // # services, and proprietary license terms, please see
10748 // # services, and proprietary license terms, please see
10669 // # https://rhodecode.com/licenses/
10749 // # https://rhodecode.com/licenses/
10670
10750
10671 angular.module('appenlight.controllers').controller('AdminSystemController', AdminSystemController);
10751 angular.module('appenlight.components.userIdentitiesView', [])
10752 .component('userIdentitiesView', {
10753 templateUrl: 'components/views/user-identities-view/user-identities-view.html',
10754 controller: UserIdentitiesController
10755 });
10672
10756
10673 AdminSystemController.$inject = ['sectionViewResource'];
10757 UserIdentitiesController.$inject = ['$state', 'userSelfPropertyResource', 'AeConfig'];
10674
10758
10675 function AdminSystemController(sectionViewResource) {
10759 function UserIdentitiesController($state, userSelfPropertyResource, AeConfig) {
10760
10676 var vm = this;
10761 var vm = this;
10677 vm.tables = [];
10762 vm.$state = $state;
10678 vm.loading = {system: true};
10763 vm.AeConfig = AeConfig;
10679 sectionViewResource.get({
10764 vm.loading = {identities: true};
10680 section: 'admin_section',
10681 view: 'system'
10682 }, null, function (data) {
10683 vm.DBtables = data.db_tables;
10684 vm.ESIndices = data.es_indices;
10685 vm.queueStats = data.queue_stats;
10686 vm.systemLoad = data.system_load;
10687 vm.packages = data.packages;
10688 vm.processInfo = data.process_info;
10689 vm.disks = data.disks;
10690 vm.memory = data.memory;
10691 vm.selfInfo = data.self_info;
10692
10765
10693 vm.loading.system = false;
10766 vm.identities = userSelfPropertyResource.query(
10694 });
10767 {key: 'external_identities'},
10695 };
10768 function (data) {
10769 vm.loading.identities = false;
10770
10771 });
10772
10773 vm.removeProvider = function (provider) {
10774
10775 userSelfPropertyResource.delete(
10776 {
10777 key: 'external_identities',
10778 provider: provider.provider,
10779 id: provider.id
10780 },
10781 function (status) {
10782 if (status){
10783 vm.identities = _.filter(vm.identities, function (item) {
10784 return item != provider
10785 });
10786 }
10787
10788 });
10789 }
10790 }
10696
10791
10697 ;// # Copyright (C) 2010-2016 RhodeCode GmbH
10792 ;// # Copyright (C) 2010-2016 RhodeCode GmbH
10698 // #
10793 // #
@@ -10713,107 +10808,38 b' function AdminSystemController(sectionViewResource) {'
10713 // # services, and proprietary license terms, please see
10808 // # services, and proprietary license terms, please see
10714 // # https://rhodecode.com/licenses/
10809 // # https://rhodecode.com/licenses/
10715
10810
10716 angular.module('appenlight.controllers').controller('AdminUsersCreateController', AdminUsersCreateController);
10811 angular.module('appenlight.components.userPasswordView', [])
10812 .component('userPasswordView', {
10813 templateUrl: 'components/views/user-password-view/user-password-view.html',
10814 controller: UserPasswordViewController
10815 });
10717
10816
10718 AdminUsersCreateController.$inject = ['$state', 'usersResource', 'usersPropertyResource', 'sectionViewResource', 'AeConfig'];
10817 UserPasswordViewController.$inject = ['$state', 'userSelfPropertyResource'];
10719
10818
10720 function AdminUsersCreateController($state, usersResource, usersPropertyResource, sectionViewResource, AeConfig) {
10819 function UserPasswordViewController($state, userSelfPropertyResource) {
10721
10820
10722 var vm = this;
10821 var vm = this;
10723 vm.loading = {user: false};
10822 vm.$state = $state;
10724
10823 vm.loading = {password: false};
10725
10824 vm.form = {};
10726 if (typeof $state.params.userId !== 'undefined') {
10727 vm.loading.user = true;
10728 var userId = $state.params.userId;
10729 vm.user = usersResource.get({userId: userId}, function (data) {
10730 vm.loading.user = false;
10731 // cast to true for angular checkbox
10732 if (vm.user.status === 1) {
10733 vm.user.status = true;
10734 }
10735 });
10736
10737 vm.resource_permissions = usersPropertyResource.query(
10738 {userId: userId, key: 'resource_permissions'}, function (data) {
10739 vm.loading.resource_permissions = false;
10740 var tmpObj = {
10741 'user': {
10742 'application': {},
10743 'dashboard': {}
10744 },
10745 'group': {
10746 'application': {},
10747 'dashboard': {}
10748 }
10749 };
10750 _.each(data, function (item) {
10751
10752 var section = tmpObj[item.type][item.resource_type];
10753 if (typeof section[item.resource_id] == 'undefined'){
10754 section[item.resource_id] = {
10755 self:item,
10756 permissions: []
10757 }
10758 }
10759 section[item.resource_id].permissions.push(item.perm_name);
10760
10761 });
10762 vm.resourcePermissions = tmpObj;
10763 });
10764
10765 }
10766 else {
10767 var userId = null;
10768 vm.user = {
10769 status: true
10770 }
10771 }
10772
10773 var formResponse = function (response) {
10774 if (response.status == 422) {
10775 setServerValidation(vm.profileForm, response.data);
10776 }
10777 vm.loading.user = false;
10778 }
10779
10780 vm.createUser = function () {
10781 vm.loading.user = true;
10782
10783 if (userId) {
10784 usersResource.update({userId: vm.user.id}, vm.user, function (data) {
10785 setServerValidation(vm.profileForm);
10786 vm.loading.user = false;
10787 }, formResponse);
10788 }
10789 else {
10790 usersResource.save(vm.user, function (data) {
10791 $state.go('admin.user.update', {userId: data.id});
10792 }, formResponse);
10793 }
10794 }
10795
10825
10796 vm.generatePassword = function () {
10826 vm.updatePassword = function () {
10797 var length = 8;
10827 vm.loading.password = true;
10798 var charset = "abcdefghijklnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
10799 vm.gen_pass = "";
10800 for (var i = 0, n = charset.length; i < length; ++i) {
10801 vm.gen_pass += charset.charAt(Math.floor(Math.random() * n));
10802 }
10803 vm.user.user_password = '' + vm.gen_pass;
10804
10828
10805 }
10829 userSelfPropertyResource.update({key: 'password'}, vm.form, function () {
10806
10830 vm.loading.password = false;
10807 vm.reloginUser = function () {
10831 vm.form = {};
10808 sectionViewResource.get({
10832 setServerValidation(vm.passwordForm);
10809 section: 'admin_section', view: 'relogin_user',
10833 }, function (response) {
10810 user_id: vm.user.id
10834 if (response.status == 422) {
10811 }, function () {
10835
10812 window.location = AeConfig.urls.baseUrl;
10836 setServerValidation(vm.passwordForm, response.data);
10837
10838 }
10839 vm.loading.password = false;
10813 });
10840 });
10814
10815 }
10841 }
10816 };
10842 }
10817
10843
10818 ;// # Copyright (C) 2010-2016 RhodeCode GmbH
10844 ;// # Copyright (C) 2010-2016 RhodeCode GmbH
10819 // #
10845 // #
@@ -10834,40 +10860,76 b' function AdminUsersCreateController($state, usersResource, usersPropertyResource'
10834 // # services, and proprietary license terms, please see
10860 // # services, and proprietary license terms, please see
10835 // # https://rhodecode.com/licenses/
10861 // # https://rhodecode.com/licenses/
10836
10862
10837 angular.module('appenlight.controllers').controller('AdminUsersController', AdminUsersController);
10863 angular.module('appenlight.components.userProfileView', [])
10864 .component('userProfileView', {
10865 templateUrl: 'components/views/user-profile-view/user-profile-view.html',
10866 controller: UserProfileViewController
10867 });
10838
10868
10839 AdminUsersController.$inject = ['usersResource'];
10869 UserProfileViewController.$inject = ['$state', 'userSelfResource'];
10840
10870
10841 function AdminUsersController(usersResource) {
10871 function UserProfileViewController($state, userSelfResource) {
10842
10872
10843 var vm = this;
10873 var vm = this;
10844 vm.loading = {users: true};
10874 vm.$state = $state;
10875 vm.loading = {profile: true};
10845
10876
10846 vm.users = usersResource.query({}, function (data) {
10877 vm.user = userSelfResource.get(null, function (data) {
10847 vm.loading = {users: false};
10878 vm.loading.profile = false;
10848 vm.activeUsers = _.reduce(vm.users, function(memo, val){
10849 if (val.status == 1){
10850 return memo + 1;
10851 }
10852 return memo;
10853 }, 0);
10854
10879
10855 });
10880 });
10856
10881
10882 vm.updateProfile = function () {
10883 vm.loading.profile = true;
10857
10884
10858 vm.removeUser = function (user) {
10885
10859 usersResource.remove({userId: user.id}, function (data, responseHeaders) {
10886 vm.user.$update(null, function () {
10860
10887 vm.loading.profile = false;
10861 if (data) {
10888 setServerValidation(vm.profileForm);
10862 var index = vm.users.indexOf(user);
10889 }, function (response) {
10863 if (index !== -1) {
10890 if (response.status == 422) {
10864 vm.users.splice(index, 1);
10891 setServerValidation(vm.profileForm, response.data);
10865 vm.activeUsers -= 1;
10866 }
10867 }
10892 }
10893 vm.loading.profile = false;
10868 });
10894 });
10869 }
10895 }
10870 };
10896 }
10897
10898 ;// # Copyright (C) 2010-2016 RhodeCode GmbH
10899 // #
10900 // # This program is free software: you can redistribute it and/or modify
10901 // # it under the terms of the GNU Affero General Public License, version 3
10902 // # (only), as published by the Free Software Foundation.
10903 // #
10904 // # This program is distributed in the hope that it will be useful,
10905 // # but WITHOUT ANY WARRANTY; without even the implied warranty of
10906 // # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10907 // # GNU General Public License for more details.
10908 // #
10909 // # You should have received a copy of the GNU Affero General Public License
10910 // # along with this program. If not, see <http://www.gnu.org/licenses/>.
10911 // #
10912 // # This program is dual-licensed. If you wish to learn more about the
10913 // # AppEnlight Enterprise Edition, including its added features, Support
10914 // # services, and proprietary license terms, please see
10915 // # https://rhodecode.com/licenses/
10916
10917 var aeconfig = angular.module('appenlight.config', []);
10918 aeconfig.factory('AeConfig', function () {
10919 var obj = {};
10920 obj.flashMessages = decodeEncodedJSON(window.AE.flash_messages);
10921 obj.timeOptions = decodeEncodedJSON(window.AE.timeOptions);
10922 obj.plugins = decodeEncodedJSON(window.AE.plugins);
10923 obj.topNav = decodeEncodedJSON(window.AE.topNav);
10924 obj.ws_url = window.AE.ws_url;
10925 obj.urls = window.AE.urls;
10926 // set keys on values because we wont be able to retrieve them everywhere
10927 for (var key in obj.timeOptions) {
10928 obj.timeOptions[key]['key'] = key;
10929 }
10930 console.info('config', obj);
10931 return obj;
10932 });
10871
10933
10872 ;// # Copyright (C) 2010-2016 RhodeCode GmbH
10934 ;// # Copyright (C) 2010-2016 RhodeCode GmbH
10873 // #
10935 // #
@@ -12438,84 +12500,74 b" angular.module('appenlight').config(['$stateProvider', '$urlRouterProvider', fun"
12438 });
12500 });
12439 $stateProvider.state('admin', {
12501 $stateProvider.state('admin', {
12440 url: '/ui/admin',
12502 url: '/ui/admin',
12441 templateUrl: 'templates/admin/parent_view.html'
12503 component: 'adminView'
12442 });
12504 });
12443 $stateProvider.state('admin.user', {
12505 $stateProvider.state('admin.user', {
12444 abstract: true,
12506 abstract: true,
12445 url: '/user',
12507 url: '/user',
12446 templateUrl: 'templates/admin/users/parent_view.html'
12508 template: '<ui-view></ui-view>'
12447 });
12509 });
12448 $stateProvider.state('admin.user.list', {
12510 $stateProvider.state('admin.user.list', {
12449 url: '/list',
12511 url: '/list',
12450 templateUrl: 'templates/admin/users/users_list.html',
12512 component: 'adminUsersListView'
12451 controller: 'AdminUsersController as users'
12452 });
12513 });
12453 $stateProvider.state('admin.user.create', {
12514 $stateProvider.state('admin.user.create', {
12454 url: '/create',
12515 url: '/create',
12455 templateUrl: 'templates/admin/users/users_create.html',
12516 component: 'adminUsersCreateView'
12456 controller: 'AdminUsersCreateController as user'
12457 });
12517 });
12458 $stateProvider.state('admin.user.update', {
12518 $stateProvider.state('admin.user.update', {
12459 url: '/{userId}/update',
12519 url: '/{userId}/update',
12460 templateUrl: 'templates/admin/users/users_create.html',
12520 component: 'adminUsersCreateView'
12461 controller: 'AdminUsersCreateController as user'
12462 });
12521 });
12463
12522
12464
12523
12465 $stateProvider.state('admin.group', {
12524 $stateProvider.state('admin.group', {
12466 abstract: true,
12525 abstract: true,
12467 url: '/group',
12526 url: '/group',
12468 templateUrl: 'templates/admin/groups/parent_view.html'
12527 template: '<ui-view></ui-view>'
12469 });
12528 });
12470 $stateProvider.state('admin.group.list', {
12529 $stateProvider.state('admin.group.list', {
12471 url: '/list',
12530 url: '/list',
12472 templateUrl: 'templates/admin/groups/groups_list.html',
12531 component: 'adminGroupsListView'
12473 controller: 'AdminGroupsController as groups'
12474 });
12532 });
12475 $stateProvider.state('admin.group.create', {
12533 $stateProvider.state('admin.group.create', {
12476 url: '/create',
12534 url: '/create',
12477 templateUrl: 'templates/admin/groups/groups_create.html',
12535 component: 'adminGroupsCreateView'
12478 controller: 'AdminGroupsCreateController as group'
12479 });
12536 });
12480 $stateProvider.state('admin.group.update', {
12537 $stateProvider.state('admin.group.update', {
12481 url: '/{groupId}/update',
12538 url: '/{groupId}/update',
12482 templateUrl: 'templates/admin/groups/groups_create.html',
12539 component: 'adminGroupsCreateView'
12483 controller: 'AdminGroupsCreateController as group'
12484 });
12540 });
12485
12541
12486 $stateProvider.state('admin.application', {
12542 $stateProvider.state('admin.application', {
12487 abstract: true,
12543 abstract: true,
12488 url: '/application',
12544 url: '/application',
12489 templateUrl: 'templates/admin/users/parent_view.html'
12545 template: '<ui-view></ui-view>'
12490 });
12546 });
12491
12547
12492 $stateProvider.state('admin.application.list', {
12548 $stateProvider.state('admin.application.list', {
12493 url: '/list',
12549 url: '/list',
12494 templateUrl: 'templates/admin/applications/applications_list.html',
12550 component: 'adminApplicationsListView'
12495 controller: 'AdminApplicationsListController as applications'
12496 });
12551 });
12497
12552
12498 $stateProvider.state('admin.partitions', {
12553 $stateProvider.state('admin.partitions', {
12499 url: '/partitions',
12554 url: '/partitions',
12500 templateUrl: 'templates/admin/partitions.html',
12555 component: 'adminPartitionsView'
12501 controller: 'AdminPartitionsController as partitions'
12502 });
12556 });
12503 $stateProvider.state('admin.system', {
12557 $stateProvider.state('admin.system', {
12504 url: '/system',
12558 url: '/system',
12505 templateUrl: 'templates/admin/system.html',
12559 component: 'adminSystemView'
12506 controller: 'AdminSystemController as system'
12507 });
12560 });
12508
12561
12509 $stateProvider.state('admin.configs', {
12562 $stateProvider.state('admin.configs', {
12510 abstract: true,
12563 abstract: true,
12511 url: '/configs',
12564 url: '/configs',
12512 templateUrl: 'templates/admin/configs/parent_view.html'
12565 template: '<ui-view></ui-view>'
12513 });
12566 });
12514
12567
12515 $stateProvider.state('admin.configs.list', {
12568 $stateProvider.state('admin.configs.list', {
12516 url: '/list',
12569 url: '/list',
12517 templateUrl: 'templates/admin/configs/edit.html',
12570 component: 'adminConfigurationView'
12518 controller: 'ConfigsListController as configs'
12519 });
12571 });
12520
12572
12521 $stateProvider.state('user', {
12573 $stateProvider.state('user', {
@@ -67,6 +67,15 b" angular.module('appenlight.components', ["
67 'appenlight.components.jiraIntegrationConfigView',
67 'appenlight.components.jiraIntegrationConfigView',
68 'appenlight.components.slackIntegrationConfigView',
68 'appenlight.components.slackIntegrationConfigView',
69 'appenlight.components.webhooksIntegrationConfigView',
69 'appenlight.components.webhooksIntegrationConfigView',
70 'appenlight.components.adminView',
71 'appenlight.components.adminApplicationsListView',
72 'appenlight.components.adminUsersListView',
73 'appenlight.components.adminUsersCreateView',
74 'appenlight.components.adminGroupsListView',
75 'appenlight.components.adminGroupsCreateView',
76 'appenlight.components.adminConfigurationView',
77 'appenlight.components.adminSystemView',
78 'appenlight.components.adminPartitionsView',
70 'appenlight.components.settingsView'
79 'appenlight.components.settingsView'
71 ]);
80 ]);
72 angular.module('appenlight.directives', [
81 angular.module('appenlight.directives', [
@@ -1,13 +1,13 b''
1 <ng-include src="'templates/loader.html'" ng-if="applications.loading.applications"></ng-include>
1 <ng-include src="'templates/loader.html'" ng-if="$ctrl.loading.applications"></ng-include>
2
2
3 <div class="panel panel-default" ng-if="!applications.loading.applications">
3 <div class="panel panel-default" ng-if="!$ctrl.loading.applications">
4 <div class="panel-heading">
4 <div class="panel-heading">
5
5
6 Currently active applications: {{applications.applications.length}}
6 Currently active applications: {{$ctrl.applications.length}}
7
7
8 </div>
8 </div>
9
9
10 <table st-table="displayedCollection" st-safe-src="applications.applications" class="table table-striped">
10 <table st-table="displayedCollection" st-safe-src="$ctrl.applications" class="table table-striped">
11 <thead>
11 <thead>
12 <tr>
12 <tr>
13 <th st-sort="resource_name"><a>Application name</a></th>
13 <th st-sort="resource_name"><a>Application name</a></th>
@@ -17,7 +17,11 b''
17 // # services, and proprietary license terms, please see
17 // # services, and proprietary license terms, please see
18 // # https://rhodecode.com/licenses/
18 // # https://rhodecode.com/licenses/
19
19
20 angular.module('appenlight.controllers').controller('AdminApplicationsListController', AdminApplicationsListController);
20 angular.module('appenlight.components.adminApplicationsListView', [])
21 .component('adminApplicationsListView', {
22 templateUrl: 'components/views/admin-applications-list-view/admin-applications-list-view.html',
23 controller: AdminApplicationsListController
24 });
21
25
22 AdminApplicationsListController.$inject = ['applicationsResource'];
26 AdminApplicationsListController.$inject = ['applicationsResource'];
23
27
@@ -1,6 +1,6 b''
1 <ng-include src="'templates/loader.html'" ng-if="configs.loading.config"></ng-include>
1 <ng-include src="'templates/loader.html'" ng-if="$ctrl.loading.config"></ng-include>
2
2
3 <div class="panel panel-default" ng-show="!configs.loading.config">
3 <div class="panel panel-default" ng-show="!$ctrl.loading.config">
4 <div class="panel-heading">
4 <div class="panel-heading">
5 <h3 class="panel-title">Basic Configuration</h3>
5 <h3 class="panel-title">Basic Configuration</h3>
6 </div>
6 </div>
@@ -12,7 +12,7 b''
12 Footer HTML
12 Footer HTML
13 </label>
13 </label>
14 <div class="col-sm-8 col-lg-9">
14 <div class="col-sm-8 col-lg-9">
15 <textarea class="form-control" type="text" ng-model="configs.configs.global.template_footer_html.value" style="min-height: 150px"></textarea>
15 <textarea class="form-control" type="text" ng-model="$ctrl.configs.global.template_footer_html.value" style="min-height: 150px"></textarea>
16 </div>
16 </div>
17 </div>
17 </div>
18 </form>
18 </form>
@@ -25,7 +25,7 b''
25 Show user groups to non-admin users
25 Show user groups to non-admin users
26 </label>
26 </label>
27 <div class="col-sm-8 col-lg-9">
27 <div class="col-sm-8 col-lg-9">
28 <button type="button" class="btn btn-default" ng-model="configs.configs.global.list_groups_to_non_admins.value" uib-btn-checkbox>
28 <button type="button" class="btn btn-default" ng-model="$ctrl.configs.global.list_groups_to_non_admins.value" uib-btn-checkbox>
29 Enable
29 Enable
30 </button>
30 </button>
31 </div>
31 </div>
@@ -40,7 +40,7 b''
40 Ignore reports per minute/per application
40 Ignore reports per minute/per application
41 </label>
41 </label>
42 <div class="col-sm-8 col-lg-9">
42 <div class="col-sm-8 col-lg-9">
43 <input class="form-control" type="number" ng-model="configs.configs.global.per_application_reports_rate_limit.value" />
43 <input class="form-control" type="number" ng-model="$ctrl.configs.global.per_application_reports_rate_limit.value" />
44 </div>
44 </div>
45 </div>
45 </div>
46
46
@@ -49,7 +49,7 b''
49 Ignore logs per minute/per application
49 Ignore logs per minute/per application
50 </label>
50 </label>
51 <div class="col-sm-8 col-lg-9">
51 <div class="col-sm-8 col-lg-9">
52 <input class="form-control" type="number" ng-model="configs.configs.global.per_application_logs_rate_limit.value" />
52 <input class="form-control" type="number" ng-model="$ctrl.configs.global.per_application_logs_rate_limit.value" />
53 </div>
53 </div>
54 </div>
54 </div>
55
55
@@ -58,7 +58,7 b''
58 Ignore metrics per minute/per application
58 Ignore metrics per minute/per application
59 </label>
59 </label>
60 <div class="col-sm-8 col-lg-9">
60 <div class="col-sm-8 col-lg-9">
61 <input class="form-control" type="number" ng-model="configs.configs.global.per_application_metrics_rate_limit.value" />
61 <input class="form-control" type="number" ng-model="$ctrl.configs.global.per_application_metrics_rate_limit.value" />
62 </div>
62 </div>
63 </div>
63 </div>
64
64
@@ -66,7 +66,7 b''
66
66
67 <hr/>
67 <hr/>
68
68
69 <a class="btn btn-primary" ng-click="configs.save()">Save configuration</a>
69 <a class="btn btn-primary" ng-click="$ctrl.save()">Save configuration</a>
70 </div>
70 </div>
71
71
72 </div>
72 </div>
@@ -17,11 +17,15 b''
17 // # services, and proprietary license terms, please see
17 // # services, and proprietary license terms, please see
18 // # https://rhodecode.com/licenses/
18 // # https://rhodecode.com/licenses/
19
19
20 angular.module('appenlight.controllers').controller('ConfigsListController', ConfigsListController);
20 angular.module('appenlight.components.adminConfigurationView', [])
21 .component('adminConfigurationView', {
22 templateUrl: 'components/views/admin-configuration-view/admin-configuration-view.html',
23 controller: AdminConfigurationViewController
24 });
21
25
22 ConfigsListController.$inject = ['configsResource', 'configsNoIdResource'];
26 AdminConfigurationViewController.$inject = ['configsResource', 'configsNoIdResource'];
23
27
24 function ConfigsListController(configsResource, configsNoIdResource) {
28 function AdminConfigurationViewController(configsResource, configsNoIdResource) {
25 var vm = this;
29 var vm = this;
26 vm.loading = {config: true};
30 vm.loading = {config: true};
27
31
@@ -1,29 +1,29 b''
1 <ng-include src="'templates/loader.html'" ng-if="group.loading.group"></ng-include>
1 <ng-include src="'templates/loader.html'" ng-if="$ctrl.loading.group"></ng-include>
2
2
3 <div ng-show="!group.loading.group">
3 <div ng-show="!$ctrl.loading.group">
4
4
5 <div class="panel panel-default">
5 <div class="panel panel-default">
6 <div class="panel-body">
6 <div class="panel-body">
7 <form name="group.groupForm" class="form-horizontal" ng-submit="group.createGroup()">
7 <form name="$ctrl.groupForm" class="form-horizontal" ng-submit="$ctrl.createGroup()">
8 <div class="form-group" id="row-group_name">
8 <div class="form-group" id="row-group_name">
9 <data-form-errors errors="group.groupForm.ae_validation.group_name"></data-form-errors>
9 <data-form-errors errors="$ctrl.groupForm.ae_validation.group_name"></data-form-errors>
10 <label for="group_name" id="label-group_name" class="control-label col-sm-4 col-lg-3">
10 <label for="group_name" id="label-group_name" class="control-label col-sm-4 col-lg-3">
11 Group name
11 Group name
12 <span class="required">*</span>
12 <span class="required">*</span>
13 </label>
13 </label>
14 <div class="col-sm-8 col-lg-9">
14 <div class="col-sm-8 col-lg-9">
15 <input class="form-control" id="group_name" name="group_name" type="text" ng-model="group.group.group_name">
15 <input class="form-control" id="group_name" name="group_name" type="text" ng-model="$ctrl.group.group_name">
16 </div>
16 </div>
17 </div>
17 </div>
18
18
19 <div class="form-group" id="row-description">
19 <div class="form-group" id="row-description">
20 <data-form-errors errors="group.groupForm.ae_validation.description"></data-form-errors>
20 <data-form-errors errors="$ctrl.groupForm.ae_validation.description"></data-form-errors>
21 <label for="description" id="label-description" class="control-label col-sm-4 col-lg-3">
21 <label for="description" id="label-description" class="control-label col-sm-4 col-lg-3">
22 Description
22 Description
23 <span class="required">*</span>
23 <span class="required">*</span>
24 </label>
24 </label>
25 <div class="col-sm-8 col-lg-9">
25 <div class="col-sm-8 col-lg-9">
26 <input class="form-control" id="description" name="description" type="text" ng-model="group.group.description">
26 <input class="form-control" id="description" name="description" type="text" ng-model="$ctrl.group.description">
27 </div>
27 </div>
28 </div>
28 </div>
29
29
@@ -32,7 +32,7 b''
32 <label for="submit" id="label-submit" class="control-label col-sm-4 col-lg-3">
32 <label for="submit" id="label-submit" class="control-label col-sm-4 col-lg-3">
33 </label>
33 </label>
34 <div class="col-sm-8 col-lg-9">
34 <div class="col-sm-8 col-lg-9">
35 <input class="form-control btn btn-primary" id="submit" name="submit" type="submit" value="{{$state.params.groupId ? 'Update' : 'Add'}} Group">
35 <input class="form-control btn btn-primary" id="submit" name="submit" type="submit" value="{{$ctrl.$state.params.groupId ? 'Update' : 'Add'}} Group">
36 </div>
36 </div>
37 </div>
37 </div>
38 </form>
38 </form>
@@ -40,7 +40,7 b''
40 </div>
40 </div>
41
41
42
42
43 <div class="panel panel-default" ng-if="group.group.id">
43 <div class="panel panel-default" ng-if="$ctrl.group.id">
44 <div class="panel-heading">
44 <div class="panel-heading">
45 <h3 class="panel-title">Permissions summary</h3>
45 <h3 class="panel-title">Permissions summary</h3>
46 </div>
46 </div>
@@ -48,7 +48,7 b''
48 <h3>Direct application permissions</h3>
48 <h3>Direct application permissions</h3>
49
49
50 <ul class="list-group">
50 <ul class="list-group">
51 <li ng-repeat="perm in group.resourcePermissions.group.application" class="animate-repeat list-group-item">
51 <li ng-repeat="perm in $ctrl.resourcePermissions.group.application" class="animate-repeat list-group-item">
52 <strong>{{ perm.self.resource_name }}</strong>
52 <strong>{{ perm.self.resource_name }}</strong>
53
53
54 <div class="pull-right">
54 <div class="pull-right">
@@ -65,7 +65,7 b''
65 <h3>Direct dashboard permissions</h3>
65 <h3>Direct dashboard permissions</h3>
66
66
67 <ul class="list-group">
67 <ul class="list-group">
68 <li ng-repeat="perm in group.resourcePermissions.group.dashboard" class="animate-repeat list-group-item">
68 <li ng-repeat="perm in $ctrl.resourcePermissions.group.dashboard" class="animate-repeat list-group-item">
69 <strong>{{ perm.self.resource_name }}</strong>
69 <strong>{{ perm.self.resource_name }}</strong>
70
70
71 <div class="pull-right">
71 <div class="pull-right">
@@ -83,24 +83,24 b''
83 </div>
83 </div>
84
84
85
85
86 <div class="panel panel-default" ng-if="group.group.id">
86 <div class="panel panel-default" ng-if="$ctrl.group.id">
87 <div class="panel-heading">
87 <div class="panel-heading">
88 <h3 class="panel-title">User list</h3>
88 <h3 class="panel-title">User list</h3>
89 </div>
89 </div>
90 <div class="panel-body">
90 <div class="panel-body">
91
91
92 <form name="add_permission" class="form-inline" ng-submit="group.addUser()">
92 <form name="add_permission" class="form-inline" ng-submit="$ctrl.addUser()">
93 <div class="form-group">
93 <div class="form-group">
94 <input placeholder="Username or email" type="text" class="autocomplete form-control" ng-model="group.form.autocompleteUser" uib-typeahead="u for u in group.searchUsers($viewValue) | limitTo:8" typeahead-loading="searchingUsers" typeahead-wait-ms="250"/>
94 <input placeholder="Username or email" type="text" class="autocomplete form-control" ng-model="$ctrl.form.autocompleteUser" uib-typeahead="u for u in $ctrl.searchUsers($viewValue) | limitTo:8" typeahead-loading="searchingUsers" typeahead-wait-ms="250"/>
95 </div>
95 </div>
96 <div class="form-group">
96 <div class="form-group">
97 <button class="btn btn-info" ng-disabled="!group.form.autocompleteUser"><span class="fa fa-user"></span> Add user</button>
97 <button class="btn btn-info" ng-disabled="!$ctrl.form.autocompleteUser"><span class="fa fa-user"></span> Add user</button>
98 </div>
98 </div>
99 </form>
99 </form>
100
100
101 </div>
101 </div>
102
102
103 <table st-table="displayedCollection" st-safe-src="group.users" class="table table-striped">
103 <table st-table="displayedCollection" st-safe-src="$ctrl.users" class="table table-striped">
104 <thead>
104 <thead>
105 <tr>
105 <tr>
106 <th st-sort="user_name"><a>Username</a></th>
106 <th st-sort="user_name"><a>Username</a></th>
@@ -136,7 +136,7 b''
136 <a class="btn btn-danger btn-sm" data-uib-dropdown-toggle><span class="fa fa-trash-o"></span></a>
136 <a class="btn btn-danger btn-sm" data-uib-dropdown-toggle><span class="fa fa-trash-o"></span></a>
137 <ul class="dropdown-menu">
137 <ul class="dropdown-menu">
138 <li><a>No</a></li>
138 <li><a>No</a></li>
139 <li><a ng-click="group.removeUser(user)">Yes</a></li>
139 <li><a ng-click="$ctrl.removeUser(user)">Yes</a></li>
140 </ul>
140 </ul>
141 </span>
141 </span>
142 </tr>
142 </tr>
@@ -17,13 +17,18 b''
17 // # services, and proprietary license terms, please see
17 // # services, and proprietary license terms, please see
18 // # https://rhodecode.com/licenses/
18 // # https://rhodecode.com/licenses/
19
19
20 angular.module('appenlight.controllers').controller('AdminGroupsCreateController', AdminGroupsCreateController);
20 angular.module('appenlight.components.adminGroupsCreateView', [])
21 .component('adminGroupsCreateView', {
22 templateUrl: 'components/views/admin-groups-create-view/admin-groups-create-view.html',
23 controller: AdminGroupsCreateViewController
24 });
21
25
22 AdminGroupsCreateController.$inject = ['$state', 'groupsResource', 'groupsPropertyResource', 'sectionViewResource', 'AeConfig'];
26 AdminGroupsCreateViewController.$inject = ['$state', 'groupsResource', 'groupsPropertyResource', 'sectionViewResource'];
23
27
24 function AdminGroupsCreateController($state, groupsResource, groupsPropertyResource, sectionViewResource, AeConfig) {
28 function AdminGroupsCreateViewController($state, groupsResource, groupsPropertyResource, sectionViewResource) {
25 console.debug('AdminGroupsCreateController');
29 console.debug('AdminGroupsCreateController');
26 var vm = this;
30 var vm = this;
31 vm.$state = $state;
27 vm.loading = {
32 vm.loading = {
28 group: false,
33 group: false,
29 resource_permissions: false,
34 resource_permissions: false,
@@ -1,8 +1,8 b''
1 <ng-include src="'templates/loader.html'" ng-if="groups.loading.groups"></ng-include>
1 <ng-include src="'templates/loader.html'" ng-if="$ctrl.loading.groups"></ng-include>
2
2
3 <div class="panel panel-default" ng-show="!groups.loading.groups">
3 <div class="panel panel-default" ng-show="!$ctrl.loading.groups">
4
4
5 <table st-table="displayedCollection" st-safe-src="groups.groups" class="table table-striped">
5 <table st-table="displayedCollection" st-safe-src="$ctrl.groups" class="table table-striped">
6 <thead>
6 <thead>
7 <tr>
7 <tr>
8 <th st-sort="group_name"><a>Group name</a></th>
8 <th st-sort="group_name"><a>Group name</a></th>
@@ -29,7 +29,7 b''
29 <a class="btn btn-danger btn-sm" data-uib-dropdown-toggle><span class="fa fa-trash-o"></span></a>
29 <a class="btn btn-danger btn-sm" data-uib-dropdown-toggle><span class="fa fa-trash-o"></span></a>
30 <ul class="dropdown-menu">
30 <ul class="dropdown-menu">
31 <li><a>No</a></li>
31 <li><a>No</a></li>
32 <li><a ng-click="groups.removeGroup(group)">Yes</a></li>
32 <li><a ng-click="$ctrl.removeGroup(group)">Yes</a></li>
33 </ul>
33 </ul>
34 </span>
34 </span>
35 </tr>
35 </tr>
@@ -17,13 +17,18 b''
17 // # services, and proprietary license terms, please see
17 // # services, and proprietary license terms, please see
18 // # https://rhodecode.com/licenses/
18 // # https://rhodecode.com/licenses/
19
19
20 angular.module('appenlight.controllers').controller('AdminGroupsController', AdminGroupsController);
20 angular.module('appenlight.components.adminGroupsListView', [])
21 .component('adminGroupsListView', {
22 templateUrl: 'components/views/admin-groups-list-view/admin-groups-list-view.html',
23 controller: AdminGroupsListViewController
24 });
21
25
22 AdminGroupsController.$inject = ['groupsResource'];
26 AdminGroupsListViewController.$inject = ['$state', 'groupsResource'];
23
27
24 function AdminGroupsController(groupsResource) {
28 function AdminGroupsListViewController($state, groupsResource) {
25 console.debug('AdminGroupsController');
29 console.debug('AdminGroupsListViewController');
26 var vm = this;
30 var vm = this;
31 vm.$state = $state;
27 vm.loading = {groups: true};
32 vm.loading = {groups: true};
28
33
29 vm.groups = groupsResource.query({}, function (data) {
34 vm.groups = groupsResource.query({}, function (data) {
@@ -1,23 +1,23 b''
1 <ng-include src="'templates/loader.html'" ng-if="partitions.loading.partitions"></ng-include>
1 <ng-include src="'templates/loader.html'" ng-if="$ctrl.loading.partitions"></ng-include>
2
2
3 <div ng-show="!partitions.loading.partitions">
3 <div ng-show="!$ctrl.loading.partitions">
4
4
5 <div class="panel panel-default">
5 <div class="panel panel-default">
6 <div class="panel-heading">
6 <div class="panel-heading">
7 DELETE Daily Partitions
7 DELETE Daily Partitions
8 </div>
8 </div>
9
9
10 <form name="partitions.dailyPartitionsForm"
10 <form name="$ctrl.dailyPartitionsForm"
11 novalidate ng-submit="partitions.partitionsDelete('dailyPartitions')"
11 novalidate ng-submit="$ctrl.partitionsDelete('dailyPartitions')"
12 class="form-inline"
12 class="form-inline"
13 ng-class="{'has-error':partitions.dailyPartitionsForm.$invalid}">
13 ng-class="{'has-error':$ctrl.dailyPartitionsForm.$invalid}">
14
14
15 <div class="panel-body">
15 <div class="panel-body">
16
16
17 <input type="text" name="confirm"
17 <input type="text" name="confirm"
18 placeholder="Enter CONFIRM to proceed" class="form-control input-autosize" confirm-validate required ng-model="partitions.dailyConfirm">
18 placeholder="Enter CONFIRM to proceed" class="form-control input-autosize" confirm-validate required ng-model="$ctrl.dailyConfirm">
19 <input type="submit" class="btn btn-danger" ng-disabled="partitions.dailyPartitionsForm.$invalid">
19 <input type="submit" class="btn btn-danger" ng-disabled="$ctrl.dailyPartitionsForm.$invalid">
20 <input type="checkbox" ng-model="partitions.dailyChecked" ng-change="partitions.setCheckedList('dailyPartitions')"> Check All
20 <input type="checkbox" ng-model="$ctrl.dailyChecked" ng-change="$ctrl.setCheckedList('dailyPartitions')"> Check All
21
21
22 </div>
22 </div>
23
23
@@ -26,7 +26,7 b''
26 <th class="c1 date">Date</th>
26 <th class="c1 date">Date</th>
27 <th class="c2 indices">Indices</th>
27 <th class="c2 indices">Indices</th>
28 </tr>
28 </tr>
29 <tr class="r{{$index}}" ng-repeat="row in partitions.dailyPartitions">
29 <tr class="r{{$index}}" ng-repeat="row in $ctrl.dailyPartitions">
30 <td class="c1">{{row[0]}}</td>
30 <td class="c1">{{row[0]}}</td>
31 <td class="c2">
31 <td class="c2">
32 <ul class="list-group">
32 <ul class="list-group">
@@ -49,19 +49,19 b''
49 DELETE Permanent Partitions
49 DELETE Permanent Partitions
50 </div>
50 </div>
51
51
52 <form name="partitions.permanentPartitionsForm" novalidate
52 <form name="$ctrl.permanentPartitionsForm" novalidate
53 ng-submit="partitions.partitionsDelete('permanentPartitions')"
53 ng-submit="$ctrl.partitionsDelete('permanentPartitions')"
54 class="form-inline"
54 class="form-inline"
55 ng-class="{'has-error':partitions.permanentPartitionsForm.$invalid}">
55 ng-class="{'has-error':$ctrl.permanentPartitionsForm.$invalid}">
56
56
57
57
58 <div class="panel-body">
58 <div class="panel-body">
59
59
60 <div class="form-group">
60 <div class="form-group">
61 <input type="text" name="confirm"
61 <input type="text" name="confirm"
62 placeholder="Enter CONFIRM to proceed" class="form-control" confirm-validate required ng-model="partitions.permConfirm">
62 placeholder="Enter CONFIRM to proceed" class="form-control" confirm-validate required ng-model="$ctrl.permConfirm">
63 <input type="submit" class="btn btn-danger" ng-disabled="partitions.permanentPartitionsForm.$invalid">
63 <input type="submit" class="btn btn-danger" ng-disabled="$ctrl.permanentPartitionsForm.$invalid">
64 <input type="checkbox" ng-model="partitions.permChecked" ng-change="partitions.setCheckedList('permanentPartitions')"> Check All
64 <input type="checkbox" ng-model="$ctrl.permChecked" ng-change="$ctrl.setCheckedList('permanentPartitions')"> Check All
65 </div>
65 </div>
66
66
67 </div>
67 </div>
@@ -71,7 +71,7 b''
71 <th class="c1 date">Date</th>
71 <th class="c1 date">Date</th>
72 <th class="c2 indices">Indices</th>
72 <th class="c2 indices">Indices</th>
73 </tr>
73 </tr>
74 <tr class="r{{$index}}" ng-repeat="row in partitions.permanentPartitions">
74 <tr class="r{{$index}}" ng-repeat="row in $ctrl.permanentPartitions">
75 <td class="c1">{{row[0]}}</td>
75 <td class="c1">{{row[0]}}</td>
76 <td class="c2">
76 <td class="c2">
77 <ul class="list-group">
77 <ul class="list-group">
@@ -17,11 +17,15 b''
17 // # services, and proprietary license terms, please see
17 // # services, and proprietary license terms, please see
18 // # https://rhodecode.com/licenses/
18 // # https://rhodecode.com/licenses/
19
19
20 angular.module('appenlight.controllers').controller('AdminPartitionsController', AdminPartitionsController);
20 angular.module('appenlight.components.adminPartitionsView', [])
21 .component('adminPartitionsView', {
22 templateUrl: 'components/views/admin-partitions-view/admin-partitions-view.html',
23 controller: AdminPartitionsViewController
24 });
21
25
22 AdminPartitionsController.$inject = ['sectionViewResource'];
26 AdminPartitionsViewController.$inject = ['sectionViewResource'];
23
27
24 function AdminPartitionsController(sectionViewResource) {
28 function AdminPartitionsViewController(sectionViewResource) {
25 var vm = this;
29 var vm = this;
26 vm.permanentPartitions = [];
30 vm.permanentPartitions = [];
27 vm.dailyPartitions = [];
31 vm.dailyPartitions = [];
@@ -1,6 +1,6 b''
1 <ng-include src="'templates/loader.html'" ng-if="system.loading.system"></ng-include>
1 <ng-include src="'templates/loader.html'" ng-if="$ctrl.loading.system"></ng-include>
2
2
3 <div ng-if="system.loading.system == false">
3 <div ng-if="$ctrl.loading.system == false">
4 <div class="row">
4 <div class="row">
5 <div class="col-sm-12">
5 <div class="col-sm-12">
6 <div class="panel panel-default">
6 <div class="panel panel-default">
@@ -12,27 +12,27 b''
12 <div class="panel-body">
12 <div class="panel-body">
13
13
14 <p><strong>System Load:</strong>
14 <p><strong>System Load:</strong>
15 1min: {{system.systemLoad[0]}}, 5min: {{system.systemLoad[1]}}, 15min: {{system.systemLoad[2]}}
15 1min: {{$ctrl.systemLoad[0]}}, 5min: {{$ctrl.systemLoad[1]}}, 15min: {{$ctrl.systemLoad[2]}}
16 </p>
16 </p>
17 <p><strong>Awaiting tasks:</strong>
17 <p><strong>Awaiting tasks:</strong>
18 <ul>
18 <ul>
19 <li>reports: {{system.queueStats.waiting_reports}}</li>
19 <li>reports: {{$ctrl.queueStats.waiting_reports}}</li>
20 <li>logs: {{system.queueStats.waiting_logs}}</li>
20 <li>logs: {{$ctrl.queueStats.waiting_logs}}</li>
21 <li>metrics: {{system.queueStats.waiting_metrics}}</li>
21 <li>metrics: {{$ctrl.queueStats.waiting_metrics}}</li>
22 <li>other: {{system.queueStats.waiting_other}}</li>
22 <li>other: {{$ctrl.queueStats.waiting_other}}</li>
23 </ul>
23 </ul>
24 </p>
24 </p>
25 <p><strong>Queue stats from last minute:</strong>
25 <p><strong>Queue stats from last minute:</strong>
26 <ul>
26 <ul>
27 <li>Processed reports: {{system.queueStats.processed_reports}}</li>
27 <li>Processed reports: {{$ctrl.queueStats.processed_reports}}</li>
28 <li>Processed logs: {{system.queueStats.processed_logs}}</li>
28 <li>Processed logs: {{$ctrl.queueStats.processed_logs}}</li>
29 <li>Processed metrics: {{system.queueStats.processed_metrics}}</li>
29 <li>Processed metrics: {{$ctrl.queueStats.processed_metrics}}</li>
30 </ul>
30 </ul>
31 </p>
31 </p>
32
32
33 <p><strong>Disks:</strong>
33 <p><strong>Disks:</strong>
34 <ul>
34 <ul>
35 <li ng-repeat="disk in system.disks">
35 <li ng-repeat="disk in $ctrl.disks">
36 <strong>{{disk.device}}</strong> {{disk.free}}/{{disk.total}}, {{disk.percentage}}% used
36 <strong>{{disk.device}}</strong> {{disk.free}}/{{disk.total}}, {{disk.percentage}}% used
37 </li>
37 </li>
38 </ul>
38 </ul>
@@ -40,10 +40,10 b''
40
40
41 <p><strong>Process stats:</strong>
41 <p><strong>Process stats:</strong>
42 <ul>
42 <ul>
43 <li>FD soft limits: {{system.selfInfo.fds.soft}}</li>
43 <li>FD soft limits: {{$ctrl.selfInfo.fds.soft}}</li>
44 <li>FD hard limits: {{system.selfInfo.fds.hard}}</li>
44 <li>FD hard limits: {{$ctrl.selfInfo.fds.hard}}</li>
45 <li>Memlock soft limits: {{system.selfInfo.memlock.soft}}</li>
45 <li>Memlock soft limits: {{$ctrl.selfInfo.memlock.soft}}</li>
46 <li>Memlock hard limits: {{system.selfInfo.memlock.hard}}</li>
46 <li>Memlock hard limits: {{$ctrl.selfInfo.memlock.hard}}</li>
47 </ul>
47 </ul>
48 </p>
48 </p>
49
49
@@ -71,7 +71,7 b''
71 </tr>
71 </tr>
72 </thead>
72 </thead>
73 <tbody>
73 <tbody>
74 <tr class="r{{$index}}" ng-repeat="row in system.DBtables">
74 <tr class="r{{$index}}" ng-repeat="row in $ctrl.DBtables">
75 <td class="c1">{{row.table_name}}</td>
75 <td class="c1">{{row.table_name}}</td>
76 <td class="c2">{{row.size_human}}</td>
76 <td class="c2">{{row.size_human}}</td>
77 </tr>
77 </tr>
@@ -93,7 +93,7 b''
93 </tr>
93 </tr>
94 </thead>
94 </thead>
95 <tbody>
95 <tbody>
96 <tr class="r{{$index}}" ng-repeat="row in system.ESIndices">
96 <tr class="r{{$index}}" ng-repeat="row in $ctrl.ESIndices">
97 <td class="c1">{{row.name}}</td>
97 <td class="c1">{{row.name}}</td>
98 <td class="c2">{{row.size_human}}</td>
98 <td class="c2">{{row.size_human}}</td>
99 </tr>
99 </tr>
@@ -118,7 +118,7 b''
118 </tr>
118 </tr>
119 </thead>
119 </thead>
120 <tbody>
120 <tbody>
121 <tr class="r{{$index}}" ng-repeat-start="row in system.processInfo">
121 <tr class="r{{$index}}" ng-repeat-start="row in $ctrl.processInfo">
122 <td class="c1">{{row.owner}}</td>
122 <td class="c1">{{row.owner}}</td>
123 <td class="c2">{{row.pid}}</td>
123 <td class="c2">{{row.pid}}</td>
124 <td class="c3">{{row.cpu}}</td>
124 <td class="c3">{{row.cpu}}</td>
@@ -139,7 +139,7 b''
139 </uib-tab-heading>
139 </uib-tab-heading>
140
140
141 <table class="table">
141 <table class="table">
142 <tr ng-repeat="package in system.packages">
142 <tr ng-repeat="package in $ctrl.packages">
143 <td>{{package.name}}</td>
143 <td>{{package.name}}</td>
144 <td>{{package.version}}</td>
144 <td>{{package.version}}</td>
145 </tr>
145 </tr>
@@ -17,11 +17,15 b''
17 // # services, and proprietary license terms, please see
17 // # services, and proprietary license terms, please see
18 // # https://rhodecode.com/licenses/
18 // # https://rhodecode.com/licenses/
19
19
20 angular.module('appenlight.controllers').controller('AdminSystemController', AdminSystemController);
20 angular.module('appenlight.components.adminSystemView', [])
21 .component('adminSystemView', {
22 templateUrl: 'components/views/admin-system-view/admin-system-view.html',
23 controller: AdminSystemViewController
24 });
21
25
22 AdminSystemController.$inject = ['sectionViewResource'];
26 AdminSystemViewController.$inject = ['sectionViewResource'];
23
27
24 function AdminSystemController(sectionViewResource) {
28 function AdminSystemViewController(sectionViewResource) {
25 var vm = this;
29 var vm = this;
26 vm.tables = [];
30 vm.tables = [];
27 vm.loading = {system: true};
31 vm.loading = {system: true};
@@ -1,41 +1,41 b''
1 <ng-include src="'templates/loader.html'" ng-if="user.loading.user"></ng-include>
1 <ng-include src="'templates/loader.html'" ng-if="$ctrl.loading.user"></ng-include>
2
2
3 <div ng-show="!user.loading.user">
3 <div ng-show="!$ctrl.loading.user">
4
4
5 <div class="panel panel-default">
5 <div class="panel panel-default">
6 <div class="panel-body">
6 <div class="panel-body">
7
7
8 <span class="dropdown" data-uib-dropdown on-toggle="toggled(open)" ng-if="user.user.id">
8 <span class="dropdown" data-uib-dropdown on-toggle="toggled(open)" ng-if="$ctrl.user.id">
9 <a class="btn btn-default" data-uib-dropdown-toggle><span class="fa fa-user-secret"></span> Re-login to user</a>
9 <a class="btn btn-default" data-uib-dropdown-toggle><span class="fa fa-user-secret"></span> Re-login to user</a>
10 <ul class="dropdown-menu">
10 <ul class="dropdown-menu">
11 <li><a>No</a></li>
11 <li><a>No</a></li>
12 <li><a ng-click="user.reloginUser(user)">Yes</a></li>
12 <li><a ng-click="$ctrl.reloginUser(user)">Yes</a></li>
13 </ul>
13 </ul>
14 </span>
14 </span>
15
15
16 <form name="user.profileForm" class="form-horizontal" ng-submit="user.createUser()">
16 <form name="$ctrl.profileForm" class="form-horizontal" ng-submit="$ctrl.createUser()">
17 <div class="form-group" id="row-user_name">
17 <div class="form-group" id="row-user_name">
18 <data-form-errors errors="user.profileForm.ae_validation.user_name"></data-form-errors>
18 <data-form-errors errors="$ctrl.profileForm.ae_validation.user_name"></data-form-errors>
19 <label for="user_name" id="label-user_name" class="control-label col-sm-4 col-lg-3">
19 <label for="user_name" id="label-user_name" class="control-label col-sm-4 col-lg-3">
20 User name
20 User name
21 <span class="required">*</span>
21 <span class="required">*</span>
22 </label>
22 </label>
23 <div class="col-sm-8 col-lg-9">
23 <div class="col-sm-8 col-lg-9">
24 <input class="form-control" id="user_name" name="user_name" type="text" ng-model="user.user.user_name">
24 <input class="form-control" id="user_name" name="user_name" type="text" ng-model="$ctrl.user.user_name">
25 </div>
25 </div>
26 </div>
26 </div>
27
27
28 <div class="form-group" id="row-user_password">
28 <div class="form-group" id="row-user_password">
29 <data-form-errors errors="user.profileForm.ae_validation.user_password"></data-form-errors>
29 <data-form-errors errors="$ctrl.profileForm.ae_validation.user_password"></data-form-errors>
30 <label for="user_password" id="label-user_password" class="control-label col-sm-4 col-lg-3">
30 <label for="user_password" id="label-user_password" class="control-label col-sm-4 col-lg-3">
31 Password
31 Password
32 <span class="required">*</span>
32 <span class="required">*</span>
33 </label>
33 </label>
34 <div class="col-sm-8 col-lg-9">
34 <div class="col-sm-8 col-lg-9">
35 <input class="form-control" id="user_password" name="user_password" type="password" ng-model="user.user.user_password">
35 <input class="form-control" id="user_password" name="user_password" type="password" ng-model="$ctrl.user.user_password">
36
36
37 <p class="m-t-1"><a class="btn btn-info btn-sm" ng-click="user.generatePassword()"><span class="fa fa-lock"></span> Generate password</a>
37 <p class="m-t-1"><a class="btn btn-info btn-sm" ng-click="$ctrl.generatePassword()"><span class="fa fa-lock"></span> Generate password</a>
38 <span ng-show="user.gen_pass.length > 0">(generated password: {{user.gen_pass}})</span>
38 <span ng-show="$ctrl.gen_pass.length > 0">(generated password: {{$ctrl.gen_pass}})</span>
39 </p>
39 </p>
40
40
41 </div>
41 </div>
@@ -43,42 +43,42 b''
43
43
44
44
45 <div class="form-group" id="row-email">
45 <div class="form-group" id="row-email">
46 <data-form-errors errors="user.profileForm.ae_validation.email"></data-form-errors>
46 <data-form-errors errors="$ctrl.profileForm.ae_validation.email"></data-form-errors>
47 <label for="email" id="label-email" class="control-label col-sm-4 col-lg-3">
47 <label for="email" id="label-email" class="control-label col-sm-4 col-lg-3">
48 Email Address
48 Email Address
49 <span class="required">*</span>
49 <span class="required">*</span>
50 </label>
50 </label>
51 <div class="col-sm-8 col-lg-9">
51 <div class="col-sm-8 col-lg-9">
52 <input class="form-control" id="email" name="email" type="text" ng-model="user.user.email">
52 <input class="form-control" id="email" name="email" type="text" ng-model="$ctrl.user.email">
53 </div>
53 </div>
54 </div>
54 </div>
55
55
56 <div class="form-group" id="row-first_name">
56 <div class="form-group" id="row-first_name">
57 <data-form-errors errors="user.profileForm.ae_validation.first_name"></data-form-errors>
57 <data-form-errors errors="$ctrl.profileForm.ae_validation.first_name"></data-form-errors>
58 <label for="first_name" id="label-first_name" class="control-label col-sm-4 col-lg-3">
58 <label for="first_name" id="label-first_name" class="control-label col-sm-4 col-lg-3">
59 First Name
59 First Name
60 </label>
60 </label>
61 <div class="col-sm-8 col-lg-9">
61 <div class="col-sm-8 col-lg-9">
62 <input class="form-control" id="first_name" name="first_name" type="text" ng-model="user.user.first_name">
62 <input class="form-control" id="first_name" name="first_name" type="text" ng-model="$ctrl.user.first_name">
63 </div>
63 </div>
64 </div>
64 </div>
65 <div class="form-group" id="row-last_name">
65 <div class="form-group" id="row-last_name">
66 <data-form-errors errors="user.profileForm.ae_validation.last_name"></data-form-errors>
66 <data-form-errors errors="$ctrl.profileForm.ae_validation.last_name"></data-form-errors>
67 <label for="last_name" id="label-last_name" class="control-label col-sm-4 col-lg-3">
67 <label for="last_name" id="label-last_name" class="control-label col-sm-4 col-lg-3">
68 Last Name
68 Last Name
69 </label>
69 </label>
70 <div class="col-sm-8 col-lg-9">
70 <div class="col-sm-8 col-lg-9">
71 <input class="form-control" id="last_name" name="last_name" type="text" ng-model="user.user.last_name">
71 <input class="form-control" id="last_name" name="last_name" type="text" ng-model="$ctrl.user.last_name">
72 </div>
72 </div>
73 </div>
73 </div>
74
74
75 <div class="form-group" id="row-status">
75 <div class="form-group" id="row-status">
76 <data-form-errors errors="user.profileForm.ae_validation.status"></data-form-errors>
76 <data-form-errors errors="$ctrl.profileForm.ae_validation.status"></data-form-errors>
77 <label for="status" id="label-status" class="control-label col-sm-4 col-lg-3">
77 <label for="status" id="label-status" class="control-label col-sm-4 col-lg-3">
78 Active
78 Active
79 </label>
79 </label>
80 <div class="col-sm-8 col-lg-9">
80 <div class="col-sm-8 col-lg-9">
81 <input checked class="form-control" id="status" name="status" type="checkbox" ng-model="user.user.status">
81 <input checked class="form-control" id="status" name="status" type="checkbox" ng-model="$ctrl.user.status">
82 </div>
82 </div>
83 </div>
83 </div>
84
84
@@ -86,7 +86,7 b''
86 <label for="submit" id="label-submit" class="control-label col-sm-4 col-lg-3">
86 <label for="submit" id="label-submit" class="control-label col-sm-4 col-lg-3">
87 </label>
87 </label>
88 <div class="col-sm-8 col-lg-9">
88 <div class="col-sm-8 col-lg-9">
89 <input class="form-control btn btn-primary" id="submit" name="submit" type="submit" value="{{$state.params.userId ? 'Update' : 'Add'}} User">
89 <input class="form-control btn btn-primary" id="submit" name="submit" type="submit" value="{{$ctrl.$state.params.userId ? 'Update' : 'Add'}} User">
90 </div>
90 </div>
91 </div>
91 </div>
92 </form>
92 </form>
@@ -94,7 +94,7 b''
94 </div>
94 </div>
95
95
96
96
97 <div class="panel panel-default" ng-if="user.user.id">
97 <div class="panel panel-default" ng-if="$ctrl.user.id">
98 <div class="panel-heading">
98 <div class="panel-heading">
99 <h3 class="panel-title">Permission Summary</h3>
99 <h3 class="panel-title">Permission Summary</h3>
100 </div>
100 </div>
@@ -102,7 +102,7 b''
102 <h3>Direct application permissions</h3>
102 <h3>Direct application permissions</h3>
103
103
104 <ul class="list-group">
104 <ul class="list-group">
105 <li ng-repeat="perm in user.resourcePermissions.user.application" class="animate-repeat list-group-item">
105 <li ng-repeat="perm in $ctrl.resourcePermissions.user.application" class="animate-repeat list-group-item">
106 <strong>{{ perm.self.resource_name }}</strong>
106 <strong>{{ perm.self.resource_name }}</strong>
107 <div class="pull-right">
107 <div class="pull-right">
108
108
@@ -118,7 +118,7 b''
118 <h3>Direct dashboard permissions</h3>
118 <h3>Direct dashboard permissions</h3>
119
119
120 <ul class="list-group">
120 <ul class="list-group">
121 <li ng-repeat="perm in user.resourcePermissions.user.dashboard" class="animate-repeat list-group-item">
121 <li ng-repeat="perm in $ctrl.resourcePermissions.user.dashboard" class="animate-repeat list-group-item">
122 <strong>{{ perm.self.resource_name }}</strong>
122 <strong>{{ perm.self.resource_name }}</strong>
123 <div class="pull-right">
123 <div class="pull-right">
124
124
@@ -17,13 +17,18 b''
17 // # services, and proprietary license terms, please see
17 // # services, and proprietary license terms, please see
18 // # https://rhodecode.com/licenses/
18 // # https://rhodecode.com/licenses/
19
19
20 angular.module('appenlight.controllers').controller('AdminUsersCreateController', AdminUsersCreateController);
20 angular.module('appenlight.components.adminUsersCreateView', [])
21 .component('adminUsersCreateView', {
22 templateUrl: 'components/views/admin-users-create-view/admin-users-create-view.html',
23 controller: AdminUsersCreateViewController
24 });
21
25
22 AdminUsersCreateController.$inject = ['$state', 'usersResource', 'usersPropertyResource', 'sectionViewResource', 'AeConfig'];
26 AdminUsersCreateViewController.$inject = ['$state', 'usersResource', 'usersPropertyResource', 'sectionViewResource', 'AeConfig'];
23
27
24 function AdminUsersCreateController($state, usersResource, usersPropertyResource, sectionViewResource, AeConfig) {
28 function AdminUsersCreateViewController($state, usersResource, usersPropertyResource, sectionViewResource, AeConfig) {
25 console.debug('AdminUsersCreateController');
29 console.debug('AdminUsersCreateViewController');
26 var vm = this;
30 var vm = this;
31 vm.$state = $state;
27 vm.loading = {user: false};
32 vm.loading = {user: false};
28
33
29
34
@@ -1,15 +1,15 b''
1 <ng-include src="'templates/loader.html'" ng-if="users.loading.users"></ng-include>
1 <ng-include src="'templates/loader.html'" ng-if="$ctrl.loading.users"></ng-include>
2
2
3 <div ng-show="!users.loading.users">
3 <div ng-show="!$ctrl.loading.users">
4
4
5 <div class="panel panel-default">
5 <div class="panel panel-default">
6
6
7 <div class="panel-heading">
7 <div class="panel-heading">
8 {{users.activeUsers}} active out of {{users.users.length}} users
8 {{$ctrl.activeUsers}} active out of {{$ctrl.users.length}} users
9 </div>
9 </div>
10
10
11
11
12 <table st-table="displayedCollection" st-safe-src="users.users" class="table table-striped">
12 <table st-table="displayedCollection" st-safe-src="$ctrl.users" class="table table-striped">
13 <thead>
13 <thead>
14 <tr>
14 <tr>
15 <th class="user_name" st-sort="user_name"><a>Username</a></th>
15 <th class="user_name" st-sort="user_name"><a>Username</a></th>
@@ -45,7 +45,7 b''
45 <a class="btn btn-danger btn-sm" data-uib-dropdown-toggle><span class="fa fa-trash-o"></span></a>
45 <a class="btn btn-danger btn-sm" data-uib-dropdown-toggle><span class="fa fa-trash-o"></span></a>
46 <ul class="dropdown-menu">
46 <ul class="dropdown-menu">
47 <li><a>No</a></li>
47 <li><a>No</a></li>
48 <li><a ng-click="users.removeUser(user)">Yes</a></li>
48 <li><a ng-click="$ctrl.removeUser(user)">Yes</a></li>
49 </ul>
49 </ul>
50 </span>
50 </span>
51 </tr>
51 </tr>
@@ -17,11 +17,15 b''
17 // # services, and proprietary license terms, please see
17 // # services, and proprietary license terms, please see
18 // # https://rhodecode.com/licenses/
18 // # https://rhodecode.com/licenses/
19
19
20 angular.module('appenlight.controllers').controller('AdminUsersController', AdminUsersController);
20 angular.module('appenlight.components.adminUsersListView', [])
21 .component('adminUsersListView', {
22 templateUrl: 'components/views/admin-users-list-view/admin-users-list-view.html',
23 controller: AdminUserListViewController
24 });
21
25
22 AdminUsersController.$inject = ['usersResource'];
26 AdminUserListViewController.$inject = ['usersResource'];
23
27
24 function AdminUsersController(usersResource) {
28 function AdminUserListViewController(usersResource) {
25 console.debug('AdminUsersController');
29 console.debug('AdminUsersController');
26 var vm = this;
30 var vm = this;
27 vm.loading = {users: true};
31 vm.loading = {users: true};
@@ -1,29 +1,30 b''
1 <div class="col-sm-3" id="menu">
1 <div class="row">
2 <div class="panel panel-default">
2 <div class="col-sm-3" id="menu">
3 <div class="panel-heading">Users and groups</div>
3 <div class="panel panel-default">
4 <ul class="list-group">
4 <div class="panel-heading">Users and groups</div>
5 <li class="list-group-item" ui-sref-active="active"><a data-ui-sref="admin.user.list"> Users</a></li>
5 <ul class="list-group">
6 <li class="list-group-item" ui-sref-active="active"><a data-ui-sref="admin.user.create"> Create user</a></li>
6 <li class="list-group-item" ui-sref-active="active"><a data-ui-sref="admin.user.list"> Users</a></li>
7 <li class="list-group-item" ui-sref-active="active"><a data-ui-sref="admin.group.list"> Groups</a></li>
7 <li class="list-group-item" ui-sref-active="active"><a data-ui-sref="admin.user.create"> Create user</a></li>
8 <li class="list-group-item" ui-sref-active="active"><a data-ui-sref="admin.group.create"> Create group</a></li>
8 <li class="list-group-item" ui-sref-active="active"><a data-ui-sref="admin.group.list"> Groups</a></li>
9 </ul>
9 <li class="list-group-item" ui-sref-active="active"><a data-ui-sref="admin.group.create"> Create group</a></li>
10 </div>
10 </ul>
11 <div class="panel panel-default">
11 </div>
12 <div class="panel-heading">Resources</div>
12 <div class="panel panel-default">
13 <ul class="list-group">
13 <div class="panel-heading">Resources</div>
14 <li class="list-group-item" ui-sref-active="active"><a data-ui-sref="admin.application.list"> List applications</a></li>
14 <ul class="list-group">
15 </ul>
15 <li class="list-group-item" ui-sref-active="active"><a data-ui-sref="admin.application.list"> List applications</a></li>
16 </div>
16 </ul>
17 </div>
17
18
18 <div class="panel panel-default">
19 <div class="panel panel-default">
19 <div class="panel-heading">System</div>
20 <div class="panel-heading">System</div>
20 <ul class="list-group">
21 <ul class="list-group">
21 <li class="list-group-item" ui-sref-active="active"><a data-ui-sref="admin.configs.list"> Config variables</a></li>
22 <li class="list-group-item" ui-sref-active="active"><a data-ui-sref="admin.configs.list"> Config variables</a></li>
22 <li class="list-group-item" ui-sref-active="active"><a data-ui-sref="admin.system"> System</a></li>
23 <li class="list-group-item" ui-sref-active="active"><a data-ui-sref="admin.system"> System</a></li>
23 <li class="list-group-item" ui-sref-active="active"><a data-ui-sref="admin.partitions"> Partition Management</a></li>
24 <li class="list-group-item" ui-sref-active="active"><a data-ui-sref="admin.partitions"> Partition Management</a></li>
24 </ul>
25 </ul>
26 </div>
25 </div>
27 </div>
26 </div>
27
28
28
29 <div class="col-sm-9" ui-view></div>
29 <div class="col-sm-9" ui-view></div>
30 </div>
@@ -61,84 +61,74 b" angular.module('appenlight').config(['$stateProvider', '$urlRouterProvider', fun"
61 });
61 });
62 $stateProvider.state('admin', {
62 $stateProvider.state('admin', {
63 url: '/ui/admin',
63 url: '/ui/admin',
64 templateUrl: 'templates/admin/parent_view.html'
64 component: 'adminView'
65 });
65 });
66 $stateProvider.state('admin.user', {
66 $stateProvider.state('admin.user', {
67 abstract: true,
67 abstract: true,
68 url: '/user',
68 url: '/user',
69 templateUrl: 'templates/admin/users/parent_view.html'
69 template: '<ui-view></ui-view>'
70 });
70 });
71 $stateProvider.state('admin.user.list', {
71 $stateProvider.state('admin.user.list', {
72 url: '/list',
72 url: '/list',
73 templateUrl: 'templates/admin/users/users_list.html',
73 component: 'adminUsersListView'
74 controller: 'AdminUsersController as users'
75 });
74 });
76 $stateProvider.state('admin.user.create', {
75 $stateProvider.state('admin.user.create', {
77 url: '/create',
76 url: '/create',
78 templateUrl: 'templates/admin/users/users_create.html',
77 component: 'adminUsersCreateView'
79 controller: 'AdminUsersCreateController as user'
80 });
78 });
81 $stateProvider.state('admin.user.update', {
79 $stateProvider.state('admin.user.update', {
82 url: '/{userId}/update',
80 url: '/{userId}/update',
83 templateUrl: 'templates/admin/users/users_create.html',
81 component: 'adminUsersCreateView'
84 controller: 'AdminUsersCreateController as user'
85 });
82 });
86
83
87
84
88 $stateProvider.state('admin.group', {
85 $stateProvider.state('admin.group', {
89 abstract: true,
86 abstract: true,
90 url: '/group',
87 url: '/group',
91 templateUrl: 'templates/admin/groups/parent_view.html'
88 template: '<ui-view></ui-view>'
92 });
89 });
93 $stateProvider.state('admin.group.list', {
90 $stateProvider.state('admin.group.list', {
94 url: '/list',
91 url: '/list',
95 templateUrl: 'templates/admin/groups/groups_list.html',
92 component: 'adminGroupsListView'
96 controller: 'AdminGroupsController as groups'
97 });
93 });
98 $stateProvider.state('admin.group.create', {
94 $stateProvider.state('admin.group.create', {
99 url: '/create',
95 url: '/create',
100 templateUrl: 'templates/admin/groups/groups_create.html',
96 component: 'adminGroupsCreateView'
101 controller: 'AdminGroupsCreateController as group'
102 });
97 });
103 $stateProvider.state('admin.group.update', {
98 $stateProvider.state('admin.group.update', {
104 url: '/{groupId}/update',
99 url: '/{groupId}/update',
105 templateUrl: 'templates/admin/groups/groups_create.html',
100 component: 'adminGroupsCreateView'
106 controller: 'AdminGroupsCreateController as group'
107 });
101 });
108
102
109 $stateProvider.state('admin.application', {
103 $stateProvider.state('admin.application', {
110 abstract: true,
104 abstract: true,
111 url: '/application',
105 url: '/application',
112 templateUrl: 'templates/admin/users/parent_view.html'
106 template: '<ui-view></ui-view>'
113 });
107 });
114
108
115 $stateProvider.state('admin.application.list', {
109 $stateProvider.state('admin.application.list', {
116 url: '/list',
110 url: '/list',
117 templateUrl: 'templates/admin/applications/applications_list.html',
111 component: 'adminApplicationsListView'
118 controller: 'AdminApplicationsListController as applications'
119 });
112 });
120
113
121 $stateProvider.state('admin.partitions', {
114 $stateProvider.state('admin.partitions', {
122 url: '/partitions',
115 url: '/partitions',
123 templateUrl: 'templates/admin/partitions.html',
116 component: 'adminPartitionsView'
124 controller: 'AdminPartitionsController as partitions'
125 });
117 });
126 $stateProvider.state('admin.system', {
118 $stateProvider.state('admin.system', {
127 url: '/system',
119 url: '/system',
128 templateUrl: 'templates/admin/system.html',
120 component: 'adminSystemView'
129 controller: 'AdminSystemController as system'
130 });
121 });
131
122
132 $stateProvider.state('admin.configs', {
123 $stateProvider.state('admin.configs', {
133 abstract: true,
124 abstract: true,
134 url: '/configs',
125 url: '/configs',
135 templateUrl: 'templates/admin/configs/parent_view.html'
126 template: '<ui-view></ui-view>'
136 });
127 });
137
128
138 $stateProvider.state('admin.configs.list', {
129 $stateProvider.state('admin.configs.list', {
139 url: '/list',
130 url: '/list',
140 templateUrl: 'templates/admin/configs/edit.html',
131 component: 'adminConfigurationView'
141 controller: 'ConfigsListController as configs'
142 });
132 });
143
133
144 $stateProvider.state('user', {
134 $stateProvider.state('user', {
@@ -1,1 +0,0 b''
1 <div ui-view></div> No newline at end of file
@@ -1,1 +0,0 b''
1 <div ui-view></div> No newline at end of file
General Comments 0
You need to be logged in to leave comments. Login now