redis-browser 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 76d831101d50f6182d172c2684f1e0e885c91aa2
4
- data.tar.gz: 2b1b48244b3a7268f356f10855f06c24ab5e6855
3
+ metadata.gz: ff7e71ad7ca6d00fdd7bf652d7a0905cf04b3c3e
4
+ data.tar.gz: 9ba1d711f8db4b1500c834e6d6ec13f4a6cf15a9
5
5
  SHA512:
6
- metadata.gz: 1c10db24515f5c8a4e7811f7df508f6a99a0bae9116cd6190a5943055ddbe52c8d71b99a57ddc7b7c25a1c616c1fe15c4ef56d6fdf976dad103d433d858d9e3a
7
- data.tar.gz: 4634eb41b043a1f7d7202916b2c79ffd865a3b9908cbe6819d9014fbe234aad42cca424d11e72b22a6f12141d87b5fe271eb4c027909bfb38c202b6013f7077e
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
- opts:
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.opts"
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
- table.table.table-striped.table-bordered.value-list
110
- tr
111
- th Key
112
- th Value
113
- tr ng-repeat="(k,e) in key.value"
114
- td {{ k }}
115
- td ng-switch="e.type"
116
- pre ng-switch-when="json" {{ e.value | json }}
117
- pre ng-switch-when="string" {{ e.value }}
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
@@ -1,3 +1,3 @@
1
1
  module RedisBrowser
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redis-browser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tymon Tobolski