improvement done while working with the software.
This commit is contained in:
1 parent
96ed18787a
commit
741ec3f40c
4 files changed
+19
-11
No files matched your search
@@ -97,13 +97,13 @@ root.controllers.controller('documentCtrl', ['$scope', '$routeParams', '$http',
|
|||||||
$scope.previousDocumentUrl = () ->
|
$scope.previousDocumentUrl = () ->
|
||||||
url = "#/#{ $routeParams.server }/#{ $routeParams.database }/#{ $routeParams.collection }/idx/#{$scope.idx - 1}"
|
url = "#/#{ $routeParams.server }/#{ $routeParams.database }/#{ $routeParams.collection }/idx/#{$scope.idx - 1}"
|
||||||
if $routeParams.query
|
if $routeParams.query
|
||||||
url = "/query/#{$routeParams.query}"
|
url = "#{url}/query/#{$routeParams.query}"
|
||||||
return url
|
return url
|
||||||
|
|
||||||
$scope.nextDocumentUrl = () ->
|
$scope.nextDocumentUrl = () ->
|
||||||
url = "#/#{ $routeParams.server }/#{ $routeParams.database }/#{ $routeParams.collection }/idx/#{$scope.idx + 1}"
|
url = "#/#{ $routeParams.server }/#{ $routeParams.database }/#{ $routeParams.collection }/idx/#{$scope.idx + 1}"
|
||||||
if $routeParams.query
|
if $routeParams.query
|
||||||
url = "/query/#{$routeParams.query}"
|
url = "#{url}/query/#{$routeParams.query}"
|
||||||
return url
|
return url
|
||||||
|
|
||||||
$scope.hasPreviousDocument = () ->
|
$scope.hasPreviousDocument = () ->
|
||||||
|
|||||||
@@ -11,3 +11,7 @@ root.filters.filter 'replaceAllCommasBySpaces', () ->
|
|||||||
root.filters.filter 'niceJSON', () ->
|
root.filters.filter 'niceJSON', () ->
|
||||||
return (obj) ->
|
return (obj) ->
|
||||||
return JSON.stringify(obj, null, 4);
|
return JSON.stringify(obj, null, 4);
|
||||||
|
|
||||||
|
root.filters.filter 'replaceReturnByBreak', () ->
|
||||||
|
return (text) ->
|
||||||
|
return text.replace(new RegExp("\n","g"), "<br>")
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<span>
|
<span>
|
||||||
<span ng-show="isString">
|
<span ng-show="isString">
|
||||||
{{ value}}
|
<pre> {{value}} </pre>
|
||||||
</span>
|
</span>
|
||||||
<span ng-show="isNumber">
|
<span ng-show="isNumber">
|
||||||
{{value | number | replaceAllCommasBySpaces}}
|
{{value | number | replaceAllCommasBySpaces}}
|
||||||
|
|||||||
@@ -1,20 +1,24 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="large-9 columns">
|
<div class="large-9 columns">
|
||||||
<input type="text" ng-model="newQuery">
|
<input type="text" ng-model="newQuery" style="font-family: monospace;font-size: 1.3em;">
|
||||||
</div>
|
</div>
|
||||||
<div class="large-3 columns right">
|
<div class="large-3 columns right">
|
||||||
<ul class="button-group">
|
<ul class="button-group">
|
||||||
<li><a class="button tiny" ng-href="{{ getQueryPath() }}">Query</a></li>
|
<li>
|
||||||
<li><a class="button tiny">Clear</a></li>
|
<a class="button tiny" ng-href="{{ getQueryPath() }}" ng-class="{disabled: getQueryPath()=='' }">
|
||||||
|
Query <i class="fa fa-thumbs-o-down" style="color:red;" ng-show="getQueryPath()=='' && newQuery != ''"></i>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li><a class="button tiny" ng-click="newQuery=''" ng-class="{disabled: newQuery=='' }">Clear</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="large-12 columns" style="text-align: center;">
|
<div class="large-12 columns" style="text-align: center;">
|
||||||
<a class="fa fa-angle-left" ng-href="{{ previousDocumentUrl() }}" ng-show="{{ hasPreviousDocument() }}"></a>
|
<a class="fa fa-chevron-left" ng-href="{{ previousDocumentUrl() }}" ng-show="{{ hasPreviousDocument() }}"></a>
|
||||||
<kbd>{{idx}} / {{ meta.count | number | replaceAllCommasBySpaces }}</kbd>
|
<kbd>{{idx}} / {{ meta.count || 0 | number | replaceAllCommasBySpaces }}</kbd>
|
||||||
<a class="fa fa-angle-right" ng-href="{{ nextDocumentUrl() }}"></a>
|
<a class="fa fa-chevron-right" ng-href="{{ nextDocumentUrl() }}"></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -23,8 +27,8 @@
|
|||||||
<table style="width: 100%;">
|
<table style="width: 100%;">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th style="min-width:50px;">Keys</th>
|
<th style="min-width:100px;">Keys</th>
|
||||||
<th >Values</th>
|
<th style="text-align: center;">Values</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
|||||||
Reference in new issue
Block a user