lib/redis-browser/templates/index.slim in redis-browser-0.1.1 vs lib/redis-browser/templates/index.slim in redis-browser-0.1.2
- old
+ new
@@ -23,11 +23,11 @@
li ng-repeat="key in key.children" ng-include="'nav-tree-item.html'"
body ng-controller="BrowserCtrl"
- div modal="config.show" close="config.close()" options="config.opts"
+ div modal="config.show" close="config.close()" options="config.modalOpts"
.form-horizontal
.modal-header
button.close type="button" ng-click="config.close()" ×
h4 Configure Redis Connection
.modal-body
@@ -104,18 +104,27 @@
pre ng-switch-when="string" {{ e.value }}
td {{ e.score }}
div ng-switch-when="hash"
- table.table.table-striped.table-bordered.value-list
- tr
- th Key
- th Value
- tr ng-repeat="(k,e) in key.value"
- td {{ k }}
- td ng-switch="e.type"
- pre ng-switch-when="json" {{ e.value | json }}
- pre ng-switch-when="string" {{ e.value }}
+
+ div ng-show="config.hashView == 'json'"
+ div
+ button.btn.btn-primary.pull-right ng-click="config.setHashView('table')" Switch to Table view
+ pre {{ key.json | json }}
+
+ div ng-show="config.hashView == 'table'"
+ table.table.table-striped.table-bordered.value-list
+ tr
+ th Key
+ th
+ ' Value
+ button.btn.btn-primary.pull-right ng-click="config.setHashView('json')" Switch to JSON view
+ tr ng-repeat="(k,e) in key.value"
+ td {{ k }}
+ td ng-switch="e.type"
+ pre ng-switch-when="json" {{ e.value | json }}
+ pre ng-switch-when="string" {{ e.value }}
div ng-switch-when="list"
.alert
' Showing
strong