redis-browser 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/redis-browser/templates/coffee/app.coffee +13 -1
- data/lib/redis-browser/templates/index.slim +19 -10
- data/lib/redis-browser/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ff7e71ad7ca6d00fdd7bf652d7a0905cf04b3c3e
|
4
|
+
data.tar.gz: 9ba1d711f8db4b1500c834e6d6ec13f4a6cf15a9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7a1773a0652654b6759e2dcdb52e6fdf3763a5c8a929ddc8b00594d5bcd3554b44551713d329bbc4586e3c6d9cd14cf92dc1ef22fcf5b957d5a52c6e8705d6c8
|
7
|
+
data.tar.gz: b0913ff743bcb6b8ee038f4708e9cdcf9b1b6a89c6376ceebcf3aad1eb1a6416394b2cdee612eb137411a9e5ef759f0452c62e60acd7636ff9e4413950bc4c79
|
@@ -45,7 +45,9 @@ angular.module('browser').factory 'API', ['$http', ($http) ->
|
|
45
45
|
$scope.config =
|
46
46
|
connection: db.get("connection") || "127.0.0.1:6379"
|
47
47
|
database: parseInt(db.get("database")) || 0
|
48
|
+
hashView: db.get("hashView") || "table"
|
48
49
|
databases: [0..15]
|
50
|
+
|
49
51
|
open: ->
|
50
52
|
$scope.config.show = true
|
51
53
|
close: ->
|
@@ -59,7 +61,12 @@ angular.module('browser').factory 'API', ['$http', ($http) ->
|
|
59
61
|
$scope.show($scope.key)
|
60
62
|
|
61
63
|
$scope.config.close()
|
62
|
-
|
64
|
+
|
65
|
+
setHashView: (view) ->
|
66
|
+
$scope.config.hashView = view
|
67
|
+
db.add("hashView", view)
|
68
|
+
|
69
|
+
modalOpts:
|
63
70
|
backdropFade: true
|
64
71
|
dialogFade: true
|
65
72
|
|
@@ -83,6 +90,11 @@ angular.module('browser').factory 'API', ['$http', ($http) ->
|
|
83
90
|
max: 10
|
84
91
|
|
85
92
|
updateList()
|
93
|
+
|
94
|
+
when "hash"
|
95
|
+
e.json = {}
|
96
|
+
for k,v of e.value
|
97
|
+
e.json[k] = v.value
|
86
98
|
)
|
87
99
|
|
88
100
|
|
@@ -25,7 +25,7 @@ html ng-app="browser"
|
|
25
25
|
|
26
26
|
|
27
27
|
body ng-controller="BrowserCtrl"
|
28
|
-
div modal="config.show" close="config.close()" options="config.
|
28
|
+
div modal="config.show" close="config.close()" options="config.modalOpts"
|
29
29
|
.form-horizontal
|
30
30
|
.modal-header
|
31
31
|
button.close type="button" ng-click="config.close()" ×
|
@@ -106,15 +106,24 @@ html ng-app="browser"
|
|
106
106
|
|
107
107
|
|
108
108
|
div ng-switch-when="hash"
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
109
|
+
|
110
|
+
div ng-show="config.hashView == 'json'"
|
111
|
+
div
|
112
|
+
button.btn.btn-primary.pull-right ng-click="config.setHashView('table')" Switch to Table view
|
113
|
+
pre {{ key.json | json }}
|
114
|
+
|
115
|
+
div ng-show="config.hashView == 'table'"
|
116
|
+
table.table.table-striped.table-bordered.value-list
|
117
|
+
tr
|
118
|
+
th Key
|
119
|
+
th
|
120
|
+
' Value
|
121
|
+
button.btn.btn-primary.pull-right ng-click="config.setHashView('json')" Switch to JSON view
|
122
|
+
tr ng-repeat="(k,e) in key.value"
|
123
|
+
td {{ k }}
|
124
|
+
td ng-switch="e.type"
|
125
|
+
pre ng-switch-when="json" {{ e.value | json }}
|
126
|
+
pre ng-switch-when="string" {{ e.value }}
|
118
127
|
|
119
128
|
div ng-switch-when="list"
|
120
129
|
.alert
|