Show More
@@ -0,0 +1,2 b'' | |||
|
1 | {% extends "/layout_base.jinja2" %} | |
|
2 | {% block non_angular_content %}{% endblock %} |
@@ -0,0 +1,36 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.appenlightApp', []) | |
|
21 | .component('appenlightApp', { | |
|
22 | templateUrl: 'templates/components/appenlight-app.html', | |
|
23 | controller: AppEnlightAppController | |
|
24 | }); | |
|
25 | ||
|
26 | AppEnlightAppController.$inject = ['$scope','$state', 'stateHolder', 'AeConfig']; | |
|
27 | ||
|
28 | function AppEnlightAppController($scope, $state, stateHolder, AeConfig){ | |
|
29 | console.log('app start'); | |
|
30 | // to keep bw compatibility | |
|
31 | $scope.$state = $state; | |
|
32 | $scope.stateHolder = stateHolder; | |
|
33 | $scope.flash = stateHolder.flashMessages.list; | |
|
34 | $scope.closeAlert = stateHolder.flashMessages.closeAlert; | |
|
35 | $scope.AeConfig = AeConfig; | |
|
36 | } |
@@ -0,0 +1,32 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.appenlightHeader', []) | |
|
21 | .component('appenlightFooter', { | |
|
22 | templateUrl: 'templates/components/appenlight-footer.html', | |
|
23 | controller: AppEnlightFooterController | |
|
24 | }); | |
|
25 | ||
|
26 | ChannelstreamController.$inject = ['stateHolder', 'AeConfig']; | |
|
27 | ||
|
28 | function AppEnlightFooterController(stateHolder, AeConfig){ | |
|
29 | var vm = this; | |
|
30 | vm.AeConfig = AeConfig; | |
|
31 | vm.stateHolder = stateHolder; | |
|
32 | } |
@@ -0,0 +1,5 b'' | |||
|
1 | <channelstream config="AeConfig"></channelstream> | |
|
2 | <appenlight-header></appenlight-header> | |
|
3 | <div id="outer-content"> | |
|
4 | <div ui-view class="container"></div> | |
|
5 | </div> |
@@ -0,0 +1,101 b'' | |||
|
1 | <!-- Fixed navbar --> | |
|
2 | <div id="top-navbar" class="navbar navbar-default navbar-fixed-top" role="navigation"> | |
|
3 | <div class="pattern"> | |
|
4 | <div class="container"> | |
|
5 | <div class="navbar-header pull-left"> | |
|
6 | <a data-ui-sref="front_dashboard" class="navbar-brand"> | |
|
7 | <div id="logo-normal" class="hidden-sm hidden-xs"></div> | |
|
8 | <div id="logo-icon" class="visible-sm visible-xs"></div> | |
|
9 | </a> | |
|
10 | </div> | |
|
11 | ||
|
12 | <div class="container-fluid"> | |
|
13 | <div> | |
|
14 | <ul class="nav navbar-nav navbar-right" ng-if="$ctrl.stateHolder.AeUser.id !== null"> | |
|
15 | <li id="user-notifications" class="dropdown ng-cloak" data-uib-dropdown> | |
|
16 | ||
|
17 | <a class="dropdown-toggle" data-uib-dropdown-toggle> | |
|
18 | <span class="badge">{{$ctrl.assignedReports.length}}</span> | |
|
19 | <span class="fa fa-envelope-o"></span> | |
|
20 | </a> | |
|
21 | <ul class="dropdown-menu"> | |
|
22 | <li role="presentation" class="dropdown-header">Assigned reports</li> | |
|
23 | <li data-ng-repeat="report in $ctrl.assignedReports" role="presentation"> | |
|
24 | <a href="{{report.front_url}}" role="menuitem" tabindex="-1"> | |
|
25 | <small>{{ report.error || 'Slow Report: ' + report.view_name |truncate:65}}</small> | |
|
26 | </a> | |
|
27 | ||
|
28 | </li> | |
|
29 | <li data-ng-if="$ctrl.assignedReports.length == 0"><a><small>No reports</small></a></li> | |
|
30 | </ul> | |
|
31 | </li> | |
|
32 | <li id="alert-notifications" class="dropdown ng-cloak" data-uib-dropdown auto-close="outsideClick"> | |
|
33 | <a class="dropdown-toggle" data-uib-dropdown-toggle> | |
|
34 | <span class="badge {{ activeEvents ? 'danger' : '' }}">{{$ctrl.activeEvents}}</span> | |
|
35 | <span class="fa fa-bell-o"></span></a> | |
|
36 | <ul class="dropdown-menu"> | |
|
37 | <li role="presentation" class="dropdown-header"> | |
|
38 | <a data-ui-sref="events" class="btn btn-xs btn-default">Show me more</a></li> | |
|
39 | <li role="presentation" class="dropdown-header">Latest events</li> | |
|
40 | <li data-ng-repeat="event in $ctrl.latestEvents" role="presentation"> | |
|
41 | <a data-ng-click="$ctrl.clickedEvent(event)"><small class="resource-name">For {{ event.resource_name }}</small><br/> | |
|
42 | <small>{{ event.text |truncate:65}}</small><br/> | |
|
43 | <small class="date" data-uib-tooltip="{{event.start_date}}">created: <iso-to-relative-time time="{{event.start_date}}"/></small> | |
|
44 | <small class="date" data-ng-show="event.end_date" data-uib-tooltip="{{event.end_date}}">closed: <iso-to-relative-time time="{{event.end_date}}"/></small> | |
|
45 | </a> | |
|
46 | </li> | |
|
47 | <li data-ng-if="$ctrl.latestEvents.length == 0"><a><small>No events</small></a></li> | |
|
48 | </ul> | |
|
49 | </li> | |
|
50 | ||
|
51 | <li id="dashboards" class="dropdown" data-uib-dropdown> | |
|
52 | <a class="dropdown-toggle" data-uib-dropdown-toggle tooltip-placement="bottom" data-uib-tooltip="Dashboards"> | |
|
53 | <span class="fa fa-bar-chart-o "></span></a> | |
|
54 | <ul class="dropdown-menu"> | |
|
55 | <li role="presentation"><a data-ui-sref="front_dashboard">Main dashboard</a></li> | |
|
56 | <li role="presentation" ng-repeat="item in $ctrl.AeConfig.topNav.menu_dashboards_items"> | |
|
57 | <a data-ui-sref="{{ item.sref }}">{{ item.label }}</a> | |
|
58 | </li> | |
|
59 | </ul> | |
|
60 | </li> | |
|
61 | ||
|
62 | <li class="dropdown" data-uib-dropdown> | |
|
63 | <a class="dropdown-toggle" data-uib-dropdown-toggle tooltip-placement="bottom" data-uib-tooltip="Reports"> | |
|
64 | <span class="fa fa-exclamation-triangle"></span></a> | |
|
65 | <ul class="dropdown-menu"> | |
|
66 | <li role="presentation"> | |
|
67 | <a data-ui-sref="report.list({resource:$ctrl.stateHolder.resource})">Error Reports</a> | |
|
68 | </li> | |
|
69 | <li role="presentation"> | |
|
70 | <a data-ui-sref="report.list_slow({resource:$ctrl.stateHolder.resource})">Slowness Reports</a> | |
|
71 | </li> | |
|
72 | ||
|
73 | </ul> | |
|
74 | </li> | |
|
75 | ||
|
76 | <li> | |
|
77 | <a data-ui-sref="logs({resource:$ctrl.stateHolder.resource})" data-uib-tooltip="Logs" tooltip-placement="bottom"><span class="fa fa-list-alt "></span></a></li> | |
|
78 | <li> | |
|
79 | <a data-ui-sref="user" data-uib-tooltip="Settings" tooltip-placement="bottom"><span class="fa fa-cog "></span></a> | |
|
80 | </li> | |
|
81 | <li class="dropdown" data-uib-dropdown data-ng-if="$ctrl.AeConfig.topNav.menu_admin_items.length"> | |
|
82 | <a class="dropdown-toggle" data-uib-dropdown-toggle tooltip-placement="bottom" data-uib-tooltip="Admin Settings"> | |
|
83 | <span class="fa fa-wrench"></span></a> | |
|
84 | <ul class="dropdown-menu"> | |
|
85 | <li role="presentation" ng-repeat="item in $ctrl.AeConfig.topNav.menu_admin_items"> | |
|
86 | <a data-ui-sref="{{ item.sref }}">{{ item.label }}</a> | |
|
87 | </li> | |
|
88 | </ul> | |
|
89 | </li> | |
|
90 | <li><a href="{{ $ctrl.AeConfig.urls.otherRoutes.signOut }}" target="_self" | |
|
91 | data-uib-tooltip="Sign out" tooltip-placement="bottom"> | |
|
92 | <span class="fa fa-power-off "></span></a></li> | |
|
93 | </ul> | |
|
94 | <ul class="nav navbar-nav pull-right" ng-if="$ctrl.stateHolder.AeUser.id === null"> | |
|
95 | <li><a href="{{ $ctrl.AeConfig.urls.otherRoutes.register }}" target="_self" class="btn btn-orange">Sign In</a></li> | |
|
96 | </ul> | |
|
97 | </div><!-- /.navbar-collapse --> | |
|
98 | </div><!-- /.container-fluid --> | |
|
99 | </div> | |
|
100 | </div> | |
|
101 | </div> |
@@ -2675,7 +2675,9 b" angular.module('appenlight.controllers', [" | |||
|
2675 | 2675 | 'appenlight.base' |
|
2676 | 2676 | ]); |
|
2677 | 2677 | angular.module('appenlight.components', [ |
|
2678 | 'appenlight.components.channelstream' | |
|
2678 | 'appenlight.components.channelstream', | |
|
2679 | 'appenlight.components.appenlightApp', | |
|
2680 | 'appenlight.components.appenlightHeader' | |
|
2679 | 2681 | ]); |
|
2680 | 2682 | angular.module('appenlight.directives', [ |
|
2681 | 2683 | 'appenlight.directives.appVersion', |
@@ -4848,6 +4850,120 b' function kickstartAE(initialUserData) {' | |||
|
4848 | 4850 | ); |
|
4849 | 4851 | |
|
4850 | 4852 | |
|
4853 | $templateCache.put('templates/components/appenlight-app.html', | |
|
4854 | "<channelstream config=\"AeConfig\"></channelstream>\n" + | |
|
4855 | "<appenlight-header></appenlight-header>\n" + | |
|
4856 | "<div id=\"outer-content\">\n" + | |
|
4857 | " <div ui-view class=\"container\"></div>\n" + | |
|
4858 | "</div>\n" | |
|
4859 | ); | |
|
4860 | ||
|
4861 | ||
|
4862 | $templateCache.put('templates/components/appenlight-header.html', | |
|
4863 | "<!-- Fixed navbar -->\n" + | |
|
4864 | "<div id=\"top-navbar\" class=\"navbar navbar-default navbar-fixed-top\" role=\"navigation\">\n" + | |
|
4865 | " <div class=\"pattern\">\n" + | |
|
4866 | " <div class=\"container\">\n" + | |
|
4867 | " <div class=\"navbar-header pull-left\">\n" + | |
|
4868 | " <a data-ui-sref=\"front_dashboard\" class=\"navbar-brand\">\n" + | |
|
4869 | " <div id=\"logo-normal\" class=\"hidden-sm hidden-xs\"></div>\n" + | |
|
4870 | " <div id=\"logo-icon\" class=\"visible-sm visible-xs\"></div>\n" + | |
|
4871 | " </a>\n" + | |
|
4872 | " </div>\n" + | |
|
4873 | "\n" + | |
|
4874 | " <div class=\"container-fluid\">\n" + | |
|
4875 | " <div>\n" + | |
|
4876 | " <ul class=\"nav navbar-nav navbar-right\" ng-if=\"$ctrl.stateHolder.AeUser.id !== null\">\n" + | |
|
4877 | " <li id=\"user-notifications\" class=\"dropdown ng-cloak\" data-uib-dropdown>\n" + | |
|
4878 | "\n" + | |
|
4879 | " <a class=\"dropdown-toggle\" data-uib-dropdown-toggle>\n" + | |
|
4880 | " <span class=\"badge\">{{$ctrl.assignedReports.length}}</span>\n" + | |
|
4881 | " <span class=\"fa fa-envelope-o\"></span>\n" + | |
|
4882 | " </a>\n" + | |
|
4883 | " <ul class=\"dropdown-menu\">\n" + | |
|
4884 | " <li role=\"presentation\" class=\"dropdown-header\">Assigned reports</li>\n" + | |
|
4885 | " <li data-ng-repeat=\"report in $ctrl.assignedReports\" role=\"presentation\">\n" + | |
|
4886 | " <a href=\"{{report.front_url}}\" role=\"menuitem\" tabindex=\"-1\">\n" + | |
|
4887 | " <small>{{ report.error || 'Slow Report: ' + report.view_name |truncate:65}}</small>\n" + | |
|
4888 | " </a>\n" + | |
|
4889 | "\n" + | |
|
4890 | " </li>\n" + | |
|
4891 | " <li data-ng-if=\"$ctrl.assignedReports.length == 0\"><a><small>No reports</small></a></li>\n" + | |
|
4892 | " </ul>\n" + | |
|
4893 | " </li>\n" + | |
|
4894 | " <li id=\"alert-notifications\" class=\"dropdown ng-cloak\" data-uib-dropdown auto-close=\"outsideClick\">\n" + | |
|
4895 | " <a class=\"dropdown-toggle\" data-uib-dropdown-toggle>\n" + | |
|
4896 | " <span class=\"badge {{ activeEvents ? 'danger' : '' }}\">{{$ctrl.activeEvents}}</span>\n" + | |
|
4897 | " <span class=\"fa fa-bell-o\"></span></a>\n" + | |
|
4898 | " <ul class=\"dropdown-menu\">\n" + | |
|
4899 | " <li role=\"presentation\" class=\"dropdown-header\">\n" + | |
|
4900 | " <a data-ui-sref=\"events\" class=\"btn btn-xs btn-default\">Show me more</a></li>\n" + | |
|
4901 | " <li role=\"presentation\" class=\"dropdown-header\">Latest events</li>\n" + | |
|
4902 | " <li data-ng-repeat=\"event in $ctrl.latestEvents\" role=\"presentation\">\n" + | |
|
4903 | " <a data-ng-click=\"$ctrl.clickedEvent(event)\"><small class=\"resource-name\">For {{ event.resource_name }}</small><br/>\n" + | |
|
4904 | " <small>{{ event.text |truncate:65}}</small><br/>\n" + | |
|
4905 | " <small class=\"date\" data-uib-tooltip=\"{{event.start_date}}\">created: <iso-to-relative-time time=\"{{event.start_date}}\"/></small>\n" + | |
|
4906 | " <small class=\"date\" data-ng-show=\"event.end_date\" data-uib-tooltip=\"{{event.end_date}}\">closed: <iso-to-relative-time time=\"{{event.end_date}}\"/></small>\n" + | |
|
4907 | " </a>\n" + | |
|
4908 | " </li>\n" + | |
|
4909 | " <li data-ng-if=\"$ctrl.latestEvents.length == 0\"><a><small>No events</small></a></li>\n" + | |
|
4910 | " </ul>\n" + | |
|
4911 | " </li>\n" + | |
|
4912 | "\n" + | |
|
4913 | " <li id=\"dashboards\" class=\"dropdown\" data-uib-dropdown>\n" + | |
|
4914 | " <a class=\"dropdown-toggle\" data-uib-dropdown-toggle tooltip-placement=\"bottom\" data-uib-tooltip=\"Dashboards\">\n" + | |
|
4915 | " <span class=\"fa fa-bar-chart-o \"></span></a>\n" + | |
|
4916 | " <ul class=\"dropdown-menu\">\n" + | |
|
4917 | " <li role=\"presentation\"><a data-ui-sref=\"front_dashboard\">Main dashboard</a></li>\n" + | |
|
4918 | " <li role=\"presentation\" ng-repeat=\"item in $ctrl.AeConfig.topNav.menu_dashboards_items\">\n" + | |
|
4919 | " <a data-ui-sref=\"{{ item.sref }}\">{{ item.label }}</a>\n" + | |
|
4920 | " </li>\n" + | |
|
4921 | " </ul>\n" + | |
|
4922 | " </li>\n" + | |
|
4923 | "\n" + | |
|
4924 | " <li class=\"dropdown\" data-uib-dropdown>\n" + | |
|
4925 | " <a class=\"dropdown-toggle\" data-uib-dropdown-toggle tooltip-placement=\"bottom\" data-uib-tooltip=\"Reports\">\n" + | |
|
4926 | " <span class=\"fa fa-exclamation-triangle\"></span></a>\n" + | |
|
4927 | " <ul class=\"dropdown-menu\">\n" + | |
|
4928 | " <li role=\"presentation\">\n" + | |
|
4929 | " <a data-ui-sref=\"report.list({resource:$ctrl.stateHolder.resource})\">Error Reports</a>\n" + | |
|
4930 | " </li>\n" + | |
|
4931 | " <li role=\"presentation\">\n" + | |
|
4932 | " <a data-ui-sref=\"report.list_slow({resource:$ctrl.stateHolder.resource})\">Slowness Reports</a>\n" + | |
|
4933 | " </li>\n" + | |
|
4934 | "\n" + | |
|
4935 | " </ul>\n" + | |
|
4936 | " </li>\n" + | |
|
4937 | "\n" + | |
|
4938 | " <li>\n" + | |
|
4939 | " <a data-ui-sref=\"logs({resource:$ctrl.stateHolder.resource})\" data-uib-tooltip=\"Logs\" tooltip-placement=\"bottom\"><span class=\"fa fa-list-alt \"></span></a></li>\n" + | |
|
4940 | " <li>\n" + | |
|
4941 | " <a data-ui-sref=\"user\" data-uib-tooltip=\"Settings\" tooltip-placement=\"bottom\"><span class=\"fa fa-cog \"></span></a>\n" + | |
|
4942 | " </li>\n" + | |
|
4943 | " <li class=\"dropdown\" data-uib-dropdown data-ng-if=\"$ctrl.AeConfig.topNav.menu_admin_items.length\">\n" + | |
|
4944 | " <a class=\"dropdown-toggle\" data-uib-dropdown-toggle tooltip-placement=\"bottom\" data-uib-tooltip=\"Admin Settings\">\n" + | |
|
4945 | " <span class=\"fa fa-wrench\"></span></a>\n" + | |
|
4946 | " <ul class=\"dropdown-menu\">\n" + | |
|
4947 | " <li role=\"presentation\" ng-repeat=\"item in $ctrl.AeConfig.topNav.menu_admin_items\">\n" + | |
|
4948 | " <a data-ui-sref=\"{{ item.sref }}\">{{ item.label }}</a>\n" + | |
|
4949 | " </li>\n" + | |
|
4950 | " </ul>\n" + | |
|
4951 | " </li>\n" + | |
|
4952 | " <li><a href=\"{{ $ctrl.AeConfig.urls.otherRoutes.signOut }}\" target=\"_self\"\n" + | |
|
4953 | " data-uib-tooltip=\"Sign out\" tooltip-placement=\"bottom\">\n" + | |
|
4954 | " <span class=\"fa fa-power-off \"></span></a></li>\n" + | |
|
4955 | " </ul>\n" + | |
|
4956 | " <ul class=\"nav navbar-nav pull-right\" ng-if=\"$ctrl.stateHolder.AeUser.id === null\">\n" + | |
|
4957 | " <li><a href=\"{{ $ctrl.AeConfig.urls.otherRoutes.register }}\" target=\"_self\" class=\"btn btn-orange\">Sign In</a></li>\n" + | |
|
4958 | " </ul>\n" + | |
|
4959 | " </div><!-- /.navbar-collapse -->\n" + | |
|
4960 | " </div><!-- /.container-fluid -->\n" + | |
|
4961 | " </div>\n" + | |
|
4962 | " </div>\n" + | |
|
4963 | "</div>\n" | |
|
4964 | ); | |
|
4965 | ||
|
4966 | ||
|
4851 | 4967 | $templateCache.put('templates/dashboard.html', |
|
4852 | 4968 | "<style type=\"text/css\">\n" + |
|
4853 | 4969 | " #metrics_chart .c3-line {\n" + |
@@ -4864,21 +4980,20 b' function kickstartAE(initialUserData) {' | |||
|
4864 | 4980 | "\n" + |
|
4865 | 4981 | "<div class=\"row\">\n" + |
|
4866 | 4982 | " <div class=\"col-sm-12 dashboard\" id=\"content\">\n" + |
|
4867 | "\n" + | |
|
4868 | " <div ng-if=\"!stateHolder.AeUser.applications.length\">\n" + | |
|
4983 | " <div ng-if=\"!index.stateHolder.AeUser.applications.length\">\n" + | |
|
4869 | 4984 | "\n" + |
|
4870 | 4985 | " <div ng-include=\"'templates/quickstart.html'\"></div>\n" + |
|
4871 | 4986 | "\n" + |
|
4872 | 4987 | " </div>\n" + |
|
4873 | 4988 | "\n" + |
|
4874 | " <div ng-if=\"stateHolder.AeUser.applications.length\">\n" + | |
|
4989 | " <div ng-if=\"index.stateHolder.AeUser.applications.length\">\n" + | |
|
4875 | 4990 | "\n" + |
|
4876 | 4991 | " <div class=\"row\">\n" + |
|
4877 | 4992 | " <div class=\"col-sm-6\">\n" + |
|
4878 | 4993 | " <div class=\"panel panel-default\">\n" + |
|
4879 | 4994 | " <div class=\"panel-body\">\n" + |
|
4880 | 4995 | " <form class=\"graph-type form-inline\">\n" + |
|
4881 | " <select ng-model=\"index.resource\" ng-options=\"r.resource_id as r.resource_name for r in stateHolder.AeUser.applications\" ng-change=\"index.updateSearchParams()\"\n" + | |
|
4996 | " <select ng-model=\"index.resource\" ng-options=\"r.resource_id as r.resource_name for r in index.stateHolder.AeUser.applications\" ng-change=\"index.updateSearchParams()\"\n" + | |
|
4882 | 4997 | " class=\"SelectField form-control input-sm slim-input\"></select>\n" + |
|
4883 | 4998 | "\n" + |
|
4884 | 4999 | " <select class=\"SelectField form-control input-sm slim-input\" ng-model=\"index.timeSpan\"\n" + |
@@ -6150,7 +6265,7 b' function kickstartAE(initialUserData) {' | |||
|
6150 | 6265 | "\n" + |
|
6151 | 6266 | "<div ng-if=\"report.report !== null && !report.is_loading.report\">\n" + |
|
6152 | 6267 | "\n" + |
|
6153 | " <div ng-if=\"stateHolder.AeUser.id\" class=\"row\">\n" + | |
|
6268 | " <div ng-if=\"report.stateHolder.AeUser.id\" class=\"row\">\n" + | |
|
6154 | 6269 | " <div class=\"col-lg-12\">\n" + |
|
6155 | 6270 | " <a onclick=\"window.history.back()\" class=\"btn btn-default\" ng-if=\"report.window.history.length > 2\"><span class=\"fa fa-arrow-circle-o-left\"></span>\n" + |
|
6156 | 6271 | " Go back</a>\n" + |
@@ -6210,7 +6325,7 b' function kickstartAE(initialUserData) {' | |||
|
6210 | 6325 | " <td class=\"table-label\">Public URL</td>\n" + |
|
6211 | 6326 | " <td class=\"data\">\n" + |
|
6212 | 6327 | " <form>\n" + |
|
6213 | " <textarea class=\"TextAreaField form-control\" id=\"public-url\" onclick=\"this.select()\">{{$state.href($state.current.name, $state.params, {absolute: true})}}</textarea>\n" + | |
|
6328 | " <textarea class=\"TextAreaField form-control\" id=\"public-url\" onclick=\"this.select()\">{{report.$state.href(report.$state.current.name, report.$state.params, {absolute: true})}}</textarea>\n" + | |
|
6214 | 6329 | " </form>\n" + |
|
6215 | 6330 | " </td>\n" + |
|
6216 | 6331 | " </tr>\n" + |
@@ -7022,6 +7137,135 b' function kickstartAE(initialUserData) {' | |||
|
7022 | 7137 | // # services, and proprietary license terms, please see |
|
7023 | 7138 | // # https://rhodecode.com/licenses/ |
|
7024 | 7139 | |
|
7140 | angular.module('appenlight.components.appenlightApp', []) | |
|
7141 | .component('appenlightApp', { | |
|
7142 | templateUrl: 'templates/components/appenlight-app.html', | |
|
7143 | controller: AppEnlightAppController | |
|
7144 | }); | |
|
7145 | ||
|
7146 | AppEnlightAppController.$inject = ['$scope','$state', 'stateHolder', 'AeConfig']; | |
|
7147 | ||
|
7148 | function AppEnlightAppController($scope, $state, stateHolder, AeConfig){ | |
|
7149 | ||
|
7150 | // to keep bw compatibility | |
|
7151 | $scope.$state = $state; | |
|
7152 | $scope.stateHolder = stateHolder; | |
|
7153 | $scope.flash = stateHolder.flashMessages.list; | |
|
7154 | $scope.closeAlert = stateHolder.flashMessages.closeAlert; | |
|
7155 | $scope.AeConfig = AeConfig; | |
|
7156 | } | |
|
7157 | ||
|
7158 | ;// # Copyright (C) 2010-2016 RhodeCode GmbH | |
|
7159 | // # | |
|
7160 | // # This program is free software: you can redistribute it and/or modify | |
|
7161 | // # it under the terms of the GNU Affero General Public License, version 3 | |
|
7162 | // # (only), as published by the Free Software Foundation. | |
|
7163 | // # | |
|
7164 | // # This program is distributed in the hope that it will be useful, | |
|
7165 | // # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
|
7166 | // # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
|
7167 | // # GNU General Public License for more details. | |
|
7168 | // # | |
|
7169 | // # You should have received a copy of the GNU Affero General Public License | |
|
7170 | // # along with this program. If not, see <http://www.gnu.org/licenses/>. | |
|
7171 | // # | |
|
7172 | // # This program is dual-licensed. If you wish to learn more about the | |
|
7173 | // # AppEnlight Enterprise Edition, including its added features, Support | |
|
7174 | // # services, and proprietary license terms, please see | |
|
7175 | // # https://rhodecode.com/licenses/ | |
|
7176 | ||
|
7177 | angular.module('appenlight.components.appenlightHeader', []) | |
|
7178 | .component('appenlightFooter', { | |
|
7179 | templateUrl: 'templates/components/appenlight-footer.html', | |
|
7180 | controller: AppEnlightFooterController | |
|
7181 | }); | |
|
7182 | ||
|
7183 | ChannelstreamController.$inject = ['stateHolder', 'AeConfig']; | |
|
7184 | ||
|
7185 | function AppEnlightFooterController(stateHolder, AeConfig){ | |
|
7186 | var vm = this; | |
|
7187 | vm.AeConfig = AeConfig; | |
|
7188 | vm.stateHolder = stateHolder; | |
|
7189 | } | |
|
7190 | ||
|
7191 | ;// # Copyright (C) 2010-2016 RhodeCode GmbH | |
|
7192 | // # | |
|
7193 | // # This program is free software: you can redistribute it and/or modify | |
|
7194 | // # it under the terms of the GNU Affero General Public License, version 3 | |
|
7195 | // # (only), as published by the Free Software Foundation. | |
|
7196 | // # | |
|
7197 | // # This program is distributed in the hope that it will be useful, | |
|
7198 | // # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
|
7199 | // # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
|
7200 | // # GNU General Public License for more details. | |
|
7201 | // # | |
|
7202 | // # You should have received a copy of the GNU Affero General Public License | |
|
7203 | // # along with this program. If not, see <http://www.gnu.org/licenses/>. | |
|
7204 | // # | |
|
7205 | // # This program is dual-licensed. If you wish to learn more about the | |
|
7206 | // # AppEnlight Enterprise Edition, including its added features, Support | |
|
7207 | // # services, and proprietary license terms, please see | |
|
7208 | // # https://rhodecode.com/licenses/ | |
|
7209 | ||
|
7210 | angular.module('appenlight.components.appenlightHeader', []) | |
|
7211 | .component('appenlightHeader', { | |
|
7212 | templateUrl: 'templates/components/appenlight-header.html', | |
|
7213 | controller: AppEnlightHeaderController | |
|
7214 | }); | |
|
7215 | ||
|
7216 | ChannelstreamController.$inject = ['$state', 'stateHolder', 'AeConfig']; | |
|
7217 | ||
|
7218 | function AppEnlightHeaderController($state, stateHolder, AeConfig){ | |
|
7219 | var vm = this; | |
|
7220 | vm.AeConfig = AeConfig; | |
|
7221 | vm.stateHolder = stateHolder; | |
|
7222 | vm.assignedReports = stateHolder.AeUser.assigned_reports; | |
|
7223 | vm.latestEvents = stateHolder.AeUser.latest_events; | |
|
7224 | vm.activeEvents = 0; | |
|
7225 | _.each(vm.latestEvents, function (event) { | |
|
7226 | if (event.status === 1 && event.end_date === null) { | |
|
7227 | vm.activeEvents += 1; | |
|
7228 | } | |
|
7229 | }); | |
|
7230 | ||
|
7231 | vm.clickedEvent = function(event){ | |
|
7232 | // exception reports | |
|
7233 | if (_.contains([1,2], event.event_type)){ | |
|
7234 | $state.go('report.list', {resource:event.resource_id, start_date:event.start_date}); | |
|
7235 | } | |
|
7236 | // slowness reports | |
|
7237 | else if (_.contains([3,4], event.event_type)){ | |
|
7238 | $state.go('report.list_slow', {resource:event.resource_id, start_date:event.start_date}); | |
|
7239 | } | |
|
7240 | // uptime reports | |
|
7241 | else if (_.contains([7,8], event.event_type)){ | |
|
7242 | $state.go('uptime', {resource:event.resource_id, start_date:event.start_date}); | |
|
7243 | } | |
|
7244 | else{ | |
|
7245 | ||
|
7246 | } | |
|
7247 | } | |
|
7248 | } | |
|
7249 | ||
|
7250 | ;// # Copyright (C) 2010-2016 RhodeCode GmbH | |
|
7251 | // # | |
|
7252 | // # This program is free software: you can redistribute it and/or modify | |
|
7253 | // # it under the terms of the GNU Affero General Public License, version 3 | |
|
7254 | // # (only), as published by the Free Software Foundation. | |
|
7255 | // # | |
|
7256 | // # This program is distributed in the hope that it will be useful, | |
|
7257 | // # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
|
7258 | // # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
|
7259 | // # GNU General Public License for more details. | |
|
7260 | // # | |
|
7261 | // # You should have received a copy of the GNU Affero General Public License | |
|
7262 | // # along with this program. If not, see <http://www.gnu.org/licenses/>. | |
|
7263 | // # | |
|
7264 | // # This program is dual-licensed. If you wish to learn more about the | |
|
7265 | // # AppEnlight Enterprise Edition, including its added features, Support | |
|
7266 | // # services, and proprietary license terms, please see | |
|
7267 | // # https://rhodecode.com/licenses/ | |
|
7268 | ||
|
7025 | 7269 | angular.module('appenlight.components.channelstream', []) |
|
7026 | 7270 | .component('channelstream', { |
|
7027 | 7271 | controller: ChannelstreamController, |
@@ -7047,11 +7291,11 b' function ChannelstreamController($rootScope, stateHolder, userSelfPropertyResour' | |||
|
7047 | 7291 | _.each(data, function (message) { |
|
7048 | 7292 | |
|
7049 | 7293 | if(typeof message.message.topic !== 'undefined'){ |
|
7050 |
$rootScope.$ |
|
|
7294 | $rootScope.$emit( | |
|
7051 | 7295 | 'channelstream-message.'+message.message.topic, message); |
|
7052 | 7296 | } |
|
7053 | 7297 | else{ |
|
7054 |
$rootScope.$ |
|
|
7298 | $rootScope.$emit('channelstream-message', message); | |
|
7055 | 7299 | } |
|
7056 | 7300 | }); |
|
7057 | 7301 | }); |
@@ -7091,9 +7335,9 b" aeconfig.factory('AeConfig', function () {" | |||
|
7091 | 7335 | obj.flashMessages = decodeEncodedJSON(window.AE.flash_messages); |
|
7092 | 7336 | obj.timeOptions = decodeEncodedJSON(window.AE.timeOptions); |
|
7093 | 7337 | obj.plugins = decodeEncodedJSON(window.AE.plugins); |
|
7338 | obj.topNav = decodeEncodedJSON(window.AE.topNav); | |
|
7094 | 7339 | obj.ws_url = window.AE.ws_url; |
|
7095 | 7340 | obj.urls = window.AE.urls; |
|
7096 | ||
|
7097 | 7341 | // set keys on values because we wont be able to retrieve them everywhere |
|
7098 | 7342 | for (var key in obj.timeOptions) { |
|
7099 | 7343 | obj.timeOptions[key]['key'] = key; |
@@ -8191,9 +8435,9 b' function EventsController(eventsNoIdResource, eventsResource) {' | |||
|
8191 | 8435 | angular.module('appenlight.controllers') |
|
8192 | 8436 | .controller('IndexDashboardController', IndexDashboardController); |
|
8193 | 8437 | |
|
8194 |
IndexDashboardController.$inject = ['$scope', '$location','$cookies', '$interval', 'stateHolder', |
|
|
8438 | IndexDashboardController.$inject = ['$rootScope', '$scope', '$location','$cookies', '$interval', 'stateHolder', 'applicationsPropertyResource', 'AeConfig']; | |
|
8195 | 8439 | |
|
8196 |
function IndexDashboardController($scope, $location, $cookies, $interval, stateHolder, |
|
|
8440 | function IndexDashboardController($rootScope, $scope, $location, $cookies, $interval, stateHolder, applicationsPropertyResource, AeConfig) { | |
|
8197 | 8441 | var vm = this; |
|
8198 | 8442 | stateHolder.section = 'dashboard'; |
|
8199 | 8443 | vm.timeOptions = {}; |
@@ -8203,6 +8447,7 b' function IndexDashboardController($scope, $location, $cookies, $interval, stateH' | |||
|
8203 | 8447 | vm.timeOptions[key] = AeConfig.timeOptions[key]; |
|
8204 | 8448 | } |
|
8205 | 8449 | }); |
|
8450 | vm.stateHolder = stateHolder; | |
|
8206 | 8451 | vm.urls = AeConfig.urls; |
|
8207 | 8452 | vm.applications = stateHolder.AeUser.applications_map; |
|
8208 | 8453 | vm.show_dashboard = false; |
@@ -8547,7 +8792,7 b' function IndexDashboardController($scope, $location, $cookies, $interval, stateH' | |||
|
8547 | 8792 | }; |
|
8548 | 8793 | vm.stream = {paused: false, filtered: false, messages: [], reports: []}; |
|
8549 | 8794 | |
|
8550 |
$ |
|
|
8795 | $rootScope.$on('channelstream-message.front_dashboard.new_topic', function(event, message){ | |
|
8551 | 8796 | var ws_report = message.message.report; |
|
8552 | 8797 | if (ws_report.http_status != 500) { |
|
8553 | 8798 | return |
@@ -8817,9 +9062,8 b' function IndexDashboardController($scope, $location, $cookies, $interval, stateH' | |||
|
8817 | 9062 | function () { |
|
8818 | 9063 | vm.loading.reports = false; |
|
8819 | 9064 | } |
|
8820 | ) | |
|
8821 |
|
|
|
8822 | } | |
|
9065 | ); | |
|
9066 | }; | |
|
8823 | 9067 | |
|
8824 | 9068 | if (stateHolder.AeUser.applications.length){ |
|
8825 | 9069 | vm.show_dashboard = true; |
@@ -8835,64 +9079,6 b' function IndexDashboardController($scope, $location, $cookies, $interval, stateH' | |||
|
8835 | 9079 | } |
|
8836 | 9080 | }); |
|
8837 | 9081 | |
|
8838 | ||
|
8839 | } | |
|
8840 | ||
|
8841 | ;// # Copyright (C) 2010-2016 RhodeCode GmbH | |
|
8842 | // # | |
|
8843 | // # This program is free software: you can redistribute it and/or modify | |
|
8844 | // # it under the terms of the GNU Affero General Public License, version 3 | |
|
8845 | // # (only), as published by the Free Software Foundation. | |
|
8846 | // # | |
|
8847 | // # This program is distributed in the hope that it will be useful, | |
|
8848 | // # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
|
8849 | // # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
|
8850 | // # GNU General Public License for more details. | |
|
8851 | // # | |
|
8852 | // # You should have received a copy of the GNU Affero General Public License | |
|
8853 | // # along with this program. If not, see <http://www.gnu.org/licenses/>. | |
|
8854 | // # | |
|
8855 | // # This program is dual-licensed. If you wish to learn more about the | |
|
8856 | // # AppEnlight Enterprise Edition, including its added features, Support | |
|
8857 | // # services, and proprietary license terms, please see | |
|
8858 | // # https://rhodecode.com/licenses/ | |
|
8859 | ||
|
8860 | angular.module('appenlight.controllers') | |
|
8861 | .controller('HeaderCtrl', HeaderCtrl); | |
|
8862 | ||
|
8863 | HeaderCtrl.$inject = ['$state', 'stateHolder']; | |
|
8864 | ||
|
8865 | function HeaderCtrl($state, stateHolder) { | |
|
8866 | var vm = this; | |
|
8867 | vm.stateHolder = stateHolder; | |
|
8868 | vm.assignedReports = stateHolder.AeUser.assigned_reports; | |
|
8869 | vm.latestEvents = stateHolder.AeUser.latest_events; | |
|
8870 | vm.activeEvents = 0; | |
|
8871 | _.each(vm.latestEvents, function (event) { | |
|
8872 | if (event.status === 1 && event.end_date === null) { | |
|
8873 | vm.activeEvents += 1; | |
|
8874 | } | |
|
8875 | }); | |
|
8876 | ||
|
8877 | vm.clickedEvent = function(event){ | |
|
8878 | ||
|
8879 | // (from Event model) | |
|
8880 | // exception reports | |
|
8881 | if (_.contains([1,2], event.event_type)){ | |
|
8882 | $state.go('report.list', {resource:event.resource_id, start_date:event.start_date}); | |
|
8883 | } | |
|
8884 | // slowness reports | |
|
8885 | else if (_.contains([3,4], event.event_type)){ | |
|
8886 | $state.go('report.list_slow', {resource:event.resource_id, start_date:event.start_date}); | |
|
8887 | } | |
|
8888 | // uptime reports | |
|
8889 | else if (_.contains([7,8], event.event_type)){ | |
|
8890 | $state.go('uptime', {resource:event.resource_id, start_date:event.start_date}); | |
|
8891 | } | |
|
8892 | else{ | |
|
8893 | ||
|
8894 | } | |
|
8895 | } | |
|
8896 | 9082 | } |
|
8897 | 9083 | |
|
8898 | 9084 | ;// # Copyright (C) 2010-2016 RhodeCode GmbH |
@@ -10304,6 +10490,8 b" ReportsViewController.$inject = ['$window', '$location', '$state', '$uibModal'," | |||
|
10304 | 10490 | function ReportsViewController($window, $location, $state, $uibModal, $cookies, reportGroupPropertyResource, reportGroupResource, logsNoIdResource, stateHolder) { |
|
10305 | 10491 | var vm = this; |
|
10306 | 10492 | vm.window = $window; |
|
10493 | vm.stateHolder = stateHolder; | |
|
10494 | vm.$state = $state; | |
|
10307 | 10495 | vm.reportHistoryConfig = { |
|
10308 | 10496 | data: { |
|
10309 | 10497 | json: [], |
@@ -12879,7 +13067,8 b" angular.module('appenlight.services.stateHolder', []).factory('stateHolder'," | |||
|
12879 | 13067 | resource: null, |
|
12880 | 13068 | plugins: Plugins, |
|
12881 | 13069 | flashMessages: flashMessages, |
|
12882 | AeUser: AeUser | |
|
13070 | AeUser: AeUser, | |
|
13071 | AeConfig: AeConfig | |
|
12883 | 13072 | }; |
|
12884 | 13073 | return stateHolder; |
|
12885 | 13074 | }]); |
@@ -65,7 +65,8 b' def gen_urls(request):' | |||
|
65 | 65 | 'otherRoutes': { |
|
66 | 66 | 'register': request.route_url('register') , |
|
67 | 67 | 'lostPassword': request.route_url('lost_password') , |
|
68 | 'lostPasswordGenerate': request.route_url('lost_password_generate') | |
|
68 | 'lostPasswordGenerate': request.route_url('lost_password_generate'), | |
|
69 | 'signOut': request.route_url('ziggurat.routes.sign_out') | |
|
69 | 70 | }, |
|
70 | 71 | 'social_auth': { |
|
71 | 72 | 'google':request.route_url('social_auth', provider='google'), |
@@ -4,8 +4,6 b'' | |||
|
4 | 4 | <div class="col-sm-10 col-sm-offset-1" id="content"> |
|
5 | 5 | |
|
6 | 6 | <span class="fa fa-ambulance" style="float: left; font-size: 666%; margin: 20px 20px"></span> |
|
7 | ||
|
8 | ||
|
9 | 7 | <p class="heading-text"><strong>500:</strong> OMG!!! Internal Server Error </p> |
|
10 | 8 | </div> |
|
11 | 9 | {% endblock %} |
@@ -1,9 +1,6 b'' | |||
|
1 | 1 | <div class="footer"> |
|
2 | 2 | <div class="container"> |
|
3 | ||
|
4 | 3 | {{ template_footer_html |safe }} |
|
5 | ||
|
6 | 4 | </div> |
|
7 | ||
|
8 | 5 | <div id="app_instance">{{ appenlight_app_instance }}</div> |
|
9 | 6 | </div> |
@@ -1,6 +1,6 b'' | |||
|
1 | 1 | <!-- Fixed navbar --> |
|
2 |
<div id="top-navbar" class="navbar navbar-default navbar-fixed-top" |
|
|
3 | {% raw %}<channelstream config="AeConfig"></channelstream>{% endraw %} | |
|
2 | <div id="top-navbar" class="navbar navbar-default navbar-fixed-top" | |
|
3 | role="navigation"> | |
|
4 | 4 | <div class="pattern"> |
|
5 | 5 | <div class="container"> |
|
6 | 6 | <div class="navbar-header pull-left"> |
@@ -9,106 +9,13 b'' | |||
|
9 | 9 | <div id="logo-icon" class="visible-sm visible-xs"></div> |
|
10 | 10 | </a> |
|
11 | 11 | </div> |
|
12 | ||
|
13 | 12 | <div class="container-fluid"> |
|
14 | <div> | |
|
15 | {% if request.user -%} | |
|
16 | <ul class="nav navbar-nav navbar-right"> | |
|
17 | <li id="user-notifications" class="dropdown ng-cloak" data-uib-dropdown> | |
|
18 | ||
|
19 | <a class="dropdown-toggle" data-uib-dropdown-toggle> | |
|
20 | <span class="badge">{% raw %}{{header.assignedReports.length}}{% endraw %}</span> | |
|
21 | <span class="fa fa-envelope-o"></span> | |
|
22 | </a> | |
|
23 | <ul class="dropdown-menu"> | |
|
24 | <li role="presentation" class="dropdown-header">Assigned reports</li> | |
|
25 | {% raw %} | |
|
26 | <li data-ng-repeat="report in header.assignedReports" role="presentation"> | |
|
27 | <a href="{{report.front_url}}" role="menuitem" tabindex="-1"> | |
|
28 | <small>{{ report.error || 'Slow Report: ' + report.view_name |truncate:65}}</small> | |
|
29 | </a> | |
|
30 | ||
|
31 | </li> | |
|
32 | <li data-ng-if="header.assignedReports.length == 0"><a><small>No reports</small></a></li> | |
|
33 | {% endraw %} | |
|
34 | </ul> | |
|
35 | </li> | |
|
36 | <li id="alert-notifications" class="dropdown ng-cloak" data-uib-dropdown auto-close="outsideClick"> | |
|
37 | {% raw %} | |
|
38 | <a class="dropdown-toggle" data-uib-dropdown-toggle> | |
|
39 | <span class="badge {{ activeEvents ? 'danger' : '' }}">{{header.activeEvents}}</span> | |
|
40 | <span class="fa fa-bell-o"></span></a> | |
|
41 | <ul class="dropdown-menu"> | |
|
42 | <li role="presentation" class="dropdown-header"> | |
|
43 | <a data-ui-sref="events" class="btn btn-xs btn-default">Show me more</a></li> | |
|
44 | <li role="presentation" class="dropdown-header">Latest events</li> | |
|
45 | <li data-ng-repeat="event in header.latestEvents" role="presentation"> | |
|
46 | <a data-ng-click="header.clickedEvent(event)"><small class="resource-name">For {{ event.resource_name }}</small><br/> | |
|
47 | <small>{{ event.text |truncate:65}}</small><br/> | |
|
48 | <small class="date" data-uib-tooltip="{{event.start_date}}">created: <iso-to-relative-time time="{{event.start_date}}"/></small> | |
|
49 | <small class="date" data-ng-show="event.end_date" data-uib-tooltip="{{event.end_date}}">closed: <iso-to-relative-time time="{{event.end_date}}"/></small> | |
|
50 | </a> | |
|
51 | </li> | |
|
52 | <li data-ng-if="header.latestEvents.length == 0"><a><small>No events</small></a></li> | |
|
53 | {% endraw %} | |
|
54 | </ul> | |
|
55 | </li> | |
|
56 | ||
|
57 | <li id="dashboards" class="dropdown" data-uib-dropdown> | |
|
58 | <a class="dropdown-toggle" data-uib-dropdown-toggle tooltip-placement="bottom" data-uib-tooltip="Dashboards"> | |
|
59 | <span class="fa fa-bar-chart-o "></span></a> | |
|
60 | <ul class="dropdown-menu"> | |
|
61 | <li role="presentation"><a data-ui-sref="front_dashboard">Main dashboard</a> | |
|
62 | {% for item in top_nav['menu_dashboards_items'] %} | |
|
63 | <li role="presentation"> | |
|
64 | <a data-ui-sref="{{ item.sref }}">{{ item.label }}</a> | |
|
65 | </li> | |
|
66 | {% endfor %} | |
|
67 | </ul> | |
|
68 | </li> | |
|
69 | ||
|
70 | <li class="dropdown" data-uib-dropdown> | |
|
71 | <a class="dropdown-toggle" data-uib-dropdown-toggle tooltip-placement="bottom" data-uib-tooltip="Reports"> | |
|
72 | <span class="fa fa-exclamation-triangle"></span></a> | |
|
73 | <ul class="dropdown-menu"> | |
|
74 | <li role="presentation"> | |
|
75 | <a data-ui-sref="report.list({resource:stateHolder.resource})">Error Reports</a> | |
|
76 | </li> | |
|
77 | <li role="presentation"> | |
|
78 | <a data-ui-sref="report.list_slow({resource:stateHolder.resource})">Slowness Reports</a> | |
|
79 | </li> | |
|
80 | ||
|
81 | </ul> | |
|
82 | </li> | |
|
83 | ||
|
84 | <li> | |
|
85 | <a data-ui-sref="logs({resource:stateHolder.resource})" data-uib-tooltip="Logs" tooltip-placement="bottom"><span class="fa fa-list-alt "></span></a></li> | |
|
86 | <li> | |
|
87 | <a data-ui-sref="user" data-uib-tooltip="Settings" tooltip-placement="bottom"><span class="fa fa-cog "></span></a> | |
|
88 | </li> | |
|
89 | {% if top_nav['menu_admin_items'] %} | |
|
90 | <li class="dropdown" data-uib-dropdown> | |
|
91 | <a class="dropdown-toggle" data-uib-dropdown-toggle tooltip-placement="bottom" data-uib-tooltip="Admin Settings"> | |
|
92 | <span class="fa fa-wrench"></span></a> | |
|
93 | <ul class="dropdown-menu"> | |
|
94 | {% for item in top_nav['menu_admin_items'] %} | |
|
95 | <li role="presentation"> | |
|
96 | <a data-ui-sref="{{ item.sref }}">{{ item.label }}</a> | |
|
97 | </li> | |
|
98 | {% endfor %} | |
|
99 | </ul> | |
|
100 | </li> | |
|
101 | {% endif %} | |
|
102 | <li><a href="{{ request.route_url('ziggurat.routes.sign_out') }}" target="_self" | |
|
103 | data-uib-tooltip="Sign out" tooltip-placement="bottom"> | |
|
104 | <span class="fa fa-power-off "></span></a></li> | |
|
105 | </ul> | |
|
106 | {% else -%} | |
|
107 | 13 | <ul class="nav navbar-nav pull-right"> |
|
108 | <li><a href="{{ request.route_url('register', _query={'sign_in':'1'}) }}" target="_self" class="btn btn-orange">{{ _('Sign In') }}</a></li> | |
|
14 | <li> | |
|
15 | <a href="{{ request.route_url('register', _query={'sign_in':'1'}) }}" | |
|
16 | target="_self" | |
|
17 | class="btn btn-orange">{{ _('Sign In') }}</a></li> | |
|
109 | 18 | </ul> |
|
110 | {% endif %} | |
|
111 | </div><!-- /.navbar-collapse --> | |
|
112 | 19 | </div><!-- /.container-fluid --> |
|
113 | 20 | </div> |
|
114 | 21 | </div> |
@@ -10,15 +10,8 b'' | |||
|
10 | 10 | {% endraw %} |
|
11 | 11 | </div> |
|
12 | 12 | </div> |
|
13 | ||
|
14 | <div {% block ng_view %}{% endblock %}> | |
|
15 | 13 |
|
|
16 | <!-- container --> | |
|
17 | <!-- content --> | |
|
18 | 14 |
|
|
19 | <!-- content --> | |
|
20 | <!-- container --> | |
|
21 | </div> | |
|
22 | 15 | </div> |
|
23 | 16 | </div> |
|
24 | 17 |
@@ -1,6 +1,6 b'' | |||
|
1 | 1 | {% import 'widgets.jinja2' as widgets %} |
|
2 | 2 | <!DOCTYPE html> |
|
3 | <html {% block ng_controller %}{% endblock %}> | |
|
3 | <html> | |
|
4 | 4 | <head> |
|
5 | 5 | <title>{% block title %}Application performance, exception and error monitoring for Python, |
|
6 | 6 | Django, Flask and Javascript - AppEnlight{% endblock %}</title> |
@@ -19,9 +19,7 b'' | |||
|
19 | 19 | {% block styles %} |
|
20 | 20 | <link href="{{ request.static_url('appenlight:webassets/appenlight/css/front.css', _query={'rev':css_hash}) }}" rel="stylesheet" type="text/css"/> |
|
21 | 21 | <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
|
22 | ||
|
23 | 22 | {% endblock %} |
|
24 | {% block additional_styles %}{% endblock %} | |
|
25 | 23 | <script type="text/javascript"> |
|
26 | 24 | var AE = {}; |
|
27 | 25 | AE.urls = {{ url_list|tojson|safe }}; |
@@ -29,6 +27,7 b'' | |||
|
29 | 27 | AE.flash_messages = {{ flash_msgs|toJSONUnsafe }}; |
|
30 | 28 | AE.timeOptions = {{ h.time_options|toJSONUnsafe }}; |
|
31 | 29 | AE.plugins = {{ js_plugins|toJSONUnsafe }}; |
|
30 | AE.topNav = {{ top_nav|toJSONUnsafe }}; | |
|
32 | 31 | </script> |
|
33 | 32 | {% if request.registry.settings.get('appenlight.public_api_key') %} |
|
34 | 33 | <script type="application/javascript"> |
@@ -99,18 +98,25 b'' | |||
|
99 | 98 | </script> |
|
100 | 99 | </head> |
|
101 | 100 | <body class="{% block section_name %}{% endblock %} {% raw %}top-state-{{$state.current.name.split('.')[0].replace('.', '-').replace('.', '-')}} state-{{$state.current.name.replace('.', '-').replace('.', '-')}}{% endraw %} {% if request.user %}user-logged {% else %}user-unlogged{% endif %}" id="html_body"> |
|
102 | <div class="extra-deco1"></div> | |
|
103 | <div class="extra-deco2"></div> | |
|
104 | ||
|
105 | ||
|
106 | 101 | <div id="holder"> |
|
102 | {% block app_block %} | |
|
103 | <appenlight-app> | |
|
104 | <div class="text-center"> | |
|
105 | <span class="fa fa-cog fa-spin fa-5x loader"></span> | |
|
106 | </div> | |
|
107 | </appenlight-app> | |
|
108 | {% endblock %} | |
|
109 | ||
|
110 | {% block non_angular_content %} | |
|
111 | {% if not request.user %} | |
|
107 | 112 | {% include "/header.jinja2" with context %} |
|
108 | 113 | <div id="outer-content"> |
|
109 |
{% block outer_content %} |
|
|
114 | {% block outer_content %}{% endblock %} | |
|
110 | 115 | </div> |
|
116 | {% endif %} | |
|
117 | {% endblock %} | |
|
111 | 118 | |
|
112 | 119 | {% include "/footer.jinja2" %} |
|
113 | 120 | </div> |
|
114 | ||
|
115 | 121 | </body> |
|
116 | 122 | </html> |
@@ -1,4 +1,5 b'' | |||
|
1 | 1 | {% extends "/layout.jinja2" %} |
|
2 | {% block app_block %}{% endblock %} | |
|
2 | 3 | {% block content %} |
|
3 | 4 | |
|
4 | 5 | <div class="col-sm-offset-1 col-sm-10"> |
@@ -1,4 +1,5 b'' | |||
|
1 | 1 | {% extends "/layout.jinja2" %} |
|
2 | {% block app_block %}{% endblock %} | |
|
2 | 3 | {% block content %} |
|
3 | 4 | <div class="col-sm-offset-1 col-sm-10"> |
|
4 | 5 |
@@ -1,9 +1,7 b'' | |||
|
1 | 1 | {% extends "/layout.jinja2" %} |
|
2 | {% block ng_controller %} data-ng-controller="RegisterController as | |
|
3 | register" {% endblock %} | |
|
4 | 2 | {% block content_class %}two-col equal{% endblock %} |
|
5 | 3 | {% block section_name %}register-section{% endblock %} |
|
6 | ||
|
4 | {% block app_block %}{% endblock %} | |
|
7 | 5 | {% block page_title %}{% endblock %} |
|
8 | 6 | |
|
9 | 7 | {% block content %} |
@@ -222,13 +222,13 b' def register(request):' | |||
|
222 | 222 | |
|
223 | 223 | |
|
224 | 224 | @view_config(route_name='/', |
|
225 |
renderer='appenlight:templates/ |
|
|
225 | renderer='appenlight:templates/app.jinja2', | |
|
226 | 226 | permission=NO_PERMISSION_REQUIRED) |
|
227 | 227 | @view_config(route_name='angular_app_ui', |
|
228 |
renderer='appenlight:templates/ |
|
|
228 | renderer='appenlight:templates/app.jinja2', | |
|
229 | 229 | permission=NO_PERMISSION_REQUIRED) |
|
230 | 230 | @view_config(route_name='angular_app_ui_ix', |
|
231 |
renderer='appenlight:templates/ |
|
|
231 | renderer='appenlight:templates/app.jinja2', | |
|
232 | 232 | permission=NO_PERMISSION_REQUIRED) |
|
233 | 233 | def app_main_index(request): |
|
234 | 234 | """ |
@@ -40,7 +40,9 b" angular.module('appenlight.controllers', [" | |||
|
40 | 40 | 'appenlight.base' |
|
41 | 41 | ]); |
|
42 | 42 | angular.module('appenlight.components', [ |
|
43 | 'appenlight.components.channelstream' | |
|
43 | 'appenlight.components.channelstream', | |
|
44 | 'appenlight.components.appenlightApp', | |
|
45 | 'appenlight.components.appenlightHeader' | |
|
44 | 46 | ]); |
|
45 | 47 | angular.module('appenlight.directives', [ |
|
46 | 48 | 'appenlight.directives.appVersion', |
@@ -17,13 +17,17 b'' | |||
|
17 | 17 | // # services, and proprietary license terms, please see |
|
18 | 18 | // # https://rhodecode.com/licenses/ |
|
19 | 19 | |
|
20 |
angular.module('appenlight.co |
|
|
21 | .controller('HeaderCtrl', HeaderCtrl); | |
|
20 | angular.module('appenlight.components.appenlightHeader', []) | |
|
21 | .component('appenlightHeader', { | |
|
22 | templateUrl: 'templates/components/appenlight-header.html', | |
|
23 | controller: AppEnlightHeaderController | |
|
24 | }); | |
|
22 | 25 | |
|
23 |
|
|
|
26 | ChannelstreamController.$inject = ['$state', 'stateHolder', 'AeConfig']; | |
|
24 | 27 | |
|
25 |
function HeaderCtrl($state, stateHolder) |
|
|
28 | function AppEnlightHeaderController($state, stateHolder, AeConfig){ | |
|
26 | 29 | var vm = this; |
|
30 | vm.AeConfig = AeConfig; | |
|
27 | 31 | vm.stateHolder = stateHolder; |
|
28 | 32 | vm.assignedReports = stateHolder.AeUser.assigned_reports; |
|
29 | 33 | vm.latestEvents = stateHolder.AeUser.latest_events; |
@@ -35,8 +39,6 b' function HeaderCtrl($state, stateHolder) {' | |||
|
35 | 39 | }); |
|
36 | 40 | |
|
37 | 41 | vm.clickedEvent = function(event){ |
|
38 | console.log(event); | |
|
39 | // (from Event model) | |
|
40 | 42 | // exception reports |
|
41 | 43 | if (_.contains([1,2], event.event_type)){ |
|
42 | 44 | $state.go('report.list', {resource:event.resource_id, start_date:event.start_date}); |
@@ -42,11 +42,11 b' function ChannelstreamController($rootScope, stateHolder, userSelfPropertyResour' | |||
|
42 | 42 | _.each(data, function (message) { |
|
43 | 43 | console.log('channelstream-message', message); |
|
44 | 44 | if(typeof message.message.topic !== 'undefined'){ |
|
45 |
$rootScope.$ |
|
|
45 | $rootScope.$emit( | |
|
46 | 46 | 'channelstream-message.'+message.message.topic, message); |
|
47 | 47 | } |
|
48 | 48 | else{ |
|
49 |
$rootScope.$ |
|
|
49 | $rootScope.$emit('channelstream-message', message); | |
|
50 | 50 | } |
|
51 | 51 | }); |
|
52 | 52 | }); |
@@ -23,9 +23,9 b" aeconfig.factory('AeConfig', function () {" | |||
|
23 | 23 | obj.flashMessages = decodeEncodedJSON(window.AE.flash_messages); |
|
24 | 24 | obj.timeOptions = decodeEncodedJSON(window.AE.timeOptions); |
|
25 | 25 | obj.plugins = decodeEncodedJSON(window.AE.plugins); |
|
26 | obj.topNav = decodeEncodedJSON(window.AE.topNav); | |
|
26 | 27 | obj.ws_url = window.AE.ws_url; |
|
27 | 28 | obj.urls = window.AE.urls; |
|
28 | ||
|
29 | 29 | // set keys on values because we wont be able to retrieve them everywhere |
|
30 | 30 | for (var key in obj.timeOptions) { |
|
31 | 31 | obj.timeOptions[key]['key'] = key; |
@@ -20,9 +20,9 b'' | |||
|
20 | 20 | angular.module('appenlight.controllers') |
|
21 | 21 | .controller('IndexDashboardController', IndexDashboardController); |
|
22 | 22 | |
|
23 |
IndexDashboardController.$inject = ['$scope', '$location','$cookies', '$interval', 'stateHolder', |
|
|
23 | IndexDashboardController.$inject = ['$rootScope', '$scope', '$location','$cookies', '$interval', 'stateHolder', 'applicationsPropertyResource', 'AeConfig']; | |
|
24 | 24 | |
|
25 |
function IndexDashboardController($scope, $location, $cookies, $interval, stateHolder, |
|
|
25 | function IndexDashboardController($rootScope, $scope, $location, $cookies, $interval, stateHolder, applicationsPropertyResource, AeConfig) { | |
|
26 | 26 | var vm = this; |
|
27 | 27 | stateHolder.section = 'dashboard'; |
|
28 | 28 | vm.timeOptions = {}; |
@@ -32,6 +32,7 b' function IndexDashboardController($scope, $location, $cookies, $interval, stateH' | |||
|
32 | 32 | vm.timeOptions[key] = AeConfig.timeOptions[key]; |
|
33 | 33 | } |
|
34 | 34 | }); |
|
35 | vm.stateHolder = stateHolder; | |
|
35 | 36 | vm.urls = AeConfig.urls; |
|
36 | 37 | vm.applications = stateHolder.AeUser.applications_map; |
|
37 | 38 | vm.show_dashboard = false; |
@@ -376,7 +377,7 b' function IndexDashboardController($scope, $location, $cookies, $interval, stateH' | |||
|
376 | 377 | }; |
|
377 | 378 | vm.stream = {paused: false, filtered: false, messages: [], reports: []}; |
|
378 | 379 | |
|
379 |
$ |
|
|
380 | $rootScope.$on('channelstream-message.front_dashboard.new_topic', function(event, message){ | |
|
380 | 381 | var ws_report = message.message.report; |
|
381 | 382 | if (ws_report.http_status != 500) { |
|
382 | 383 | return |
@@ -646,9 +647,8 b' function IndexDashboardController($scope, $location, $cookies, $interval, stateH' | |||
|
646 | 647 | function () { |
|
647 | 648 | vm.loading.reports = false; |
|
648 | 649 | } |
|
649 | ) | |
|
650 |
|
|
|
651 | } | |
|
650 | ); | |
|
651 | }; | |
|
652 | 652 | |
|
653 | 653 | if (stateHolder.AeUser.applications.length){ |
|
654 | 654 | vm.show_dashboard = true; |
@@ -664,5 +664,4 b' function IndexDashboardController($scope, $location, $cookies, $interval, stateH' | |||
|
664 | 664 | } |
|
665 | 665 | }); |
|
666 | 666 | |
|
667 | ||
|
668 | 667 | } |
@@ -25,6 +25,8 b" ReportsViewController.$inject = ['$window', '$location', '$state', '$uibModal'," | |||
|
25 | 25 | function ReportsViewController($window, $location, $state, $uibModal, $cookies, reportGroupPropertyResource, reportGroupResource, logsNoIdResource, stateHolder) { |
|
26 | 26 | var vm = this; |
|
27 | 27 | vm.window = $window; |
|
28 | vm.stateHolder = stateHolder; | |
|
29 | vm.$state = $state; | |
|
28 | 30 | vm.reportHistoryConfig = { |
|
29 | 31 | data: { |
|
30 | 32 | json: [], |
@@ -154,7 +154,8 b" angular.module('appenlight.services.stateHolder', []).factory('stateHolder'," | |||
|
154 | 154 | resource: null, |
|
155 | 155 | plugins: Plugins, |
|
156 | 156 | flashMessages: flashMessages, |
|
157 | AeUser: AeUser | |
|
157 | AeUser: AeUser, | |
|
158 | AeConfig: AeConfig | |
|
158 | 159 | }; |
|
159 | 160 | return stateHolder; |
|
160 | 161 | }]); |
@@ -13,21 +13,20 b'' | |||
|
13 | 13 | |
|
14 | 14 | <div class="row"> |
|
15 | 15 | <div class="col-sm-12 dashboard" id="content"> |
|
16 | ||
|
17 | <div ng-if="!stateHolder.AeUser.applications.length"> | |
|
16 | <div ng-if="!index.stateHolder.AeUser.applications.length"> | |
|
18 | 17 | |
|
19 | 18 | <div ng-include="'templates/quickstart.html'"></div> |
|
20 | 19 | |
|
21 | 20 | </div> |
|
22 | 21 | |
|
23 | <div ng-if="stateHolder.AeUser.applications.length"> | |
|
22 | <div ng-if="index.stateHolder.AeUser.applications.length"> | |
|
24 | 23 | |
|
25 | 24 | <div class="row"> |
|
26 | 25 | <div class="col-sm-6"> |
|
27 | 26 | <div class="panel panel-default"> |
|
28 | 27 | <div class="panel-body"> |
|
29 | 28 | <form class="graph-type form-inline"> |
|
30 | <select ng-model="index.resource" ng-options="r.resource_id as r.resource_name for r in stateHolder.AeUser.applications" ng-change="index.updateSearchParams()" | |
|
29 | <select ng-model="index.resource" ng-options="r.resource_id as r.resource_name for r in index.stateHolder.AeUser.applications" ng-change="index.updateSearchParams()" | |
|
31 | 30 | class="SelectField form-control input-sm slim-input"></select> |
|
32 | 31 | |
|
33 | 32 | <select class="SelectField form-control input-sm slim-input" ng-model="index.timeSpan" |
@@ -94,7 +94,7 b'' | |||
|
94 | 94 | |
|
95 | 95 | <div ng-if="report.report !== null && !report.is_loading.report"> |
|
96 | 96 | |
|
97 | <div ng-if="stateHolder.AeUser.id" class="row"> | |
|
97 | <div ng-if="report.stateHolder.AeUser.id" class="row"> | |
|
98 | 98 | <div class="col-lg-12"> |
|
99 | 99 | <a onclick="window.history.back()" class="btn btn-default" ng-if="report.window.history.length > 2"><span class="fa fa-arrow-circle-o-left"></span> |
|
100 | 100 | Go back</a> |
@@ -154,7 +154,7 b'' | |||
|
154 | 154 | <td class="table-label">Public URL</td> |
|
155 | 155 | <td class="data"> |
|
156 | 156 | <form> |
|
157 | <textarea class="TextAreaField form-control" id="public-url" onclick="this.select()">{{$state.href($state.current.name, $state.params, {absolute: true})}}</textarea> | |
|
157 | <textarea class="TextAreaField form-control" id="public-url" onclick="this.select()">{{report.$state.href(report.$state.current.name, report.$state.params, {absolute: true})}}</textarea> | |
|
158 | 158 | </form> |
|
159 | 159 | </td> |
|
160 | 160 | </tr> |
|
1 | NO CONTENT: file was removed |
General Comments 0
You need to be logged in to leave comments.
Login now