Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
U
ulakbus-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ulakbus
ulakbus-ui
Commits
74ecbe90
Commit
74ecbe90
authored
Nov 05, 2015
by
Evren Kutar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debug page for query debugs resolves #27
parent
b25164ab
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
155 additions
and
0 deletions
+155
-0
Gruntfile.js
Gruntfile.js
+1
-0
app.js
app/app.js
+1
-0
debug.html
app/components/debug/debug.html
+29
-0
debug_controller.js
app/components/debug/debug_controller.js
+111
-0
index.html
app/index.html
+1
-0
main.html
app/main.html
+1
-0
main.js
app/main.js
+1
-0
interceptors.js
app/zetalib/interceptors.js
+10
-0
No files found.
Gruntfile.js
View file @
74ecbe90
...
...
@@ -102,6 +102,7 @@ module.exports = function (grunt) {
"app/components/auth/auth_service.js"
,
"app/components/dashboard/dashboard_controller.js"
,
"app/components/crud/crud_controller.js"
,
"app/components/debug/debug_controller.js"
,
"app/components/error_pages/error_controller.js"
,
"app/components/wf/wf_controller.js"
,
"app/components/version/version.js"
,
...
...
app/app.js
View file @
74ecbe90
...
...
@@ -20,6 +20,7 @@ var app = angular.module(
'ulakbus.auth'
,
'ulakbus.error_pages'
,
'ulakbus.crud'
,
'ulakbus.debug'
,
'ulakbus.wf'
,
'ulakbus.version'
,
//'schemaForm',
...
...
app/components/debug/debug.html
0 → 100644
View file @
74ecbe90
<div
class=
"panel-group"
id=
"accordion"
role=
"tablist"
aria-multiselectable=
"true"
>
<div
class=
"panel panel-default"
ng-repeat=
"query in debug_queries"
>
<div
class=
"panel-heading"
role=
"tab"
id=
"headingOne"
data-toggle=
"collapse"
data-parent=
"#accordion"
data-target=
"#collapse{{$index}}"
aria-expanded=
"true"
aria-controls=
"collapseOne"
>
<h4
class=
"panel-title"
>
{{query.url}}
</h4>
</div>
<div
id=
"collapse{{$index}}"
class=
"panel-collapse collapse in"
role=
"tabpanel"
aria-labelledby=
"headingOne"
>
<div
class=
"panel-body"
>
<div
class=
"table-responsive"
>
<ol>
<li
ng-repeat=
"query in query.queries"
>
<table
class=
"table"
>
<tbody>
<tr
ng-repeat=
"(key, value) in query"
>
<td>
{{key}}
</td>
<td>
{{value}}
</td>
</tr>
</tbody>
</table>
</li>
</ol>
</div>
</div>
</div>
</div>
</div>
\ No newline at end of file
app/components/debug/debug_controller.js
0 → 100644
View file @
74ecbe90
/**
* Copyright (C) 2015 ZetaOps Inc.
*
* This file is licensed under the GNU General Public License v3
* (GPLv3). See LICENSE.txt for details.
*/
'use strict'
;
app
.
config
([
'$routeProvider'
,
function
(
$routeProvider
)
{
$routeProvider
.
when
(
'/debug/list'
,
{
templateUrl
:
'components/debug/debug.html'
,
controller
:
'DebugCtrl'
});
}]);
angular
.
module
(
'ulakbus.debug'
,
[
'ngRoute'
])
.
controller
(
'DebugCtrl'
,
function
(
$scope
,
$rootScope
,
$location
)
{
// todo: define breadcrumb
//$scope.$on("debug_queries", function (event, data) {
// $scope.debug_queries.push(data);
//});
$scope
.
debug_queries
=
$rootScope
.
debug_queries
;
//$scope.debug_queries = [{
// "url": "http://ulakbus-remote-dev.zetaops.io:18188/notify",
// "queries": [
// {
// "TIMESTAMP": 1446666305.753408,
// "TIME": 0.0362,
// "BUCKET": "models_personel",
// "QUERY_PARAMS": {
// "sort": "timestamp desc",
// "rows": 1000
// },
// "QUERY": "tckn:123* AND -deleted:True"
// },
// {
// "TIMESTAMP": 1446666492.017113,
// "BUCKET": "models_kurum_disi_gorevlendirme_bilgileri",
// "SERIALIZATION": 0.00078,
// "SAVE_IS_NEW": true,
// "KEY": "ZZjOPrcdfW1w8EASYRastvEWKaA",
// "TIME": 0.01684
// },
// {
// "TIMESTAMP": 1446666305.789678,
// "BUCKET": "models_personel",
// "KEY": "TILjcZZpBzbVXdFMCWkYjNMnDSi",
// "TIME": 0.00425
// },
// {
// "TIMESTAMP": 1446666305.798089,
// "BUCKET": "models_personel",
// "KEY": "2yBUSlyr2WQp4l6xL79ehPCDR35",
// "TIME": 0.00335
// },
// {
// "TIMESTAMP": 1446666305.810038,
// "BUCKET": "models_personel",
// "KEY": "WTbiwac9tjtEQ2TZxmJh7eSb3CF",
// "TIME": 0.00548
// },
// {
// "TIMESTAMP": 1446666305.819372,
// "BUCKET": "models_personel",
// "KEY": "FmV5il0bAIwCBE1Zuk63WXfC9Vd",
// "TIME": 0.00305
// },
// {
// "TIMESTAMP": 1446666305.82646,
// "BUCKET": "models_personel",
// "KEY": "6SZXvENlJKuDtD8e9b1mHxDqc4Y",
// "TIME": 0.00305
// },
// {
// "TIMESTAMP": 1446666305.832966,
// "BUCKET": "models_personel",
// "KEY": "YPjWATvtR54JdY5BxVWYUh5AbeB",
// "TIME": 0.04506
// },
// {
// "TIMESTAMP": 1446666305.882205,
// "BUCKET": "models_personel",
// "KEY": "UGYo52etHUacK5uP1v91oGX8JDU",
// "TIME": 0.01335
// },
// {
// "TIMESTAMP": 1446666305.899335,
// "BUCKET": "models_personel",
// "KEY": "doZJrm6phbFwyuWZk9LYf05u4z",
// "TIME": 0.00291
// },
// {
// "TIMESTAMP": 1446666305.906138,
// "BUCKET": "models_personel",
// "KEY": "CZDKGx57MKufxrZNgNb2j9EQ9Mz",
// "TIME": 0.0098
// },
// {
// "TIMESTAMP": 1446666305.919088,
// "BUCKET": "models_personel",
// "KEY": "BW6nTAnpBQAIuj8LL98wOV1DJMC",
// "TIME": 0.00257
// }
// ]}]
});
\ No newline at end of file
app/index.html
View file @
74ecbe90
...
...
@@ -101,6 +101,7 @@
<script
src=
"components/auth/auth_service.js"
></script>
<script
src=
"components/dashboard/dashboard_controller.js"
></script>
<script
src=
"components/crud/crud_controller.js"
></script>
<script
src=
"components/debug/debug_controller.js"
></script>
<script
src=
"components/wf/wf_controller.js"
></script>
<script
src=
"components/uitemplates/uitemplates.js"
></script>
<script
src=
"components/error_pages/error_controller.js"
></script>
...
...
app/main.html
View file @
74ecbe90
...
...
@@ -109,6 +109,7 @@
<script
src=
"components/auth/auth_service.js"
></script>
<script
src=
"components/dashboard/dashboard_controller.js"
></script>
<script
src=
"components/crud/crud_controller.js"
></script>
<script
src=
"components/debug/debug_controller.js"
></script>
<script
src=
"components/wf/wf_controller.js"
></script>
<script
src=
"components/uitemplates/uitemplates.js"
></script>
<script
src=
"components/error_pages/error_controller.js"
></script>
...
...
app/main.js
View file @
74ecbe90
...
...
@@ -20,6 +20,7 @@ var app = angular.module(
'ulakbus.auth'
,
'ulakbus.error_pages'
,
'ulakbus.crud'
,
'ulakbus.debug'
,
'ulakbus.wf'
,
'ulakbus.version'
,
//'schemaForm',
...
...
app/zetalib/interceptors.js
View file @
74ecbe90
...
...
@@ -23,6 +23,16 @@ app.config(['$httpProvider', function ($httpProvider) {
'response'
:
function
(
response
)
{
//Will only be called for HTTP up to 300
if
(
response
.
data
.
_debug_queries
)
{
if
(
response
.
data
.
_debug_queries
.
length
>
0
)
{
$rootScope
.
debug_queries
=
$rootScope
.
debug_queries
||
[];
$rootScope
.
debug_queries
.
push
({
"url"
:
response
.
config
.
url
,
"queries"
:
response
.
data
.
_debug_queries
});
}
}
if
(
response
.
data
.
is_login
===
false
)
{
$rootScope
.
loggedInUser
=
response
.
data
.
is_login
;
$location
.
path
(
"/login"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment