forked from steelThread/redmon
/
app.haml
178 lines (169 loc) · 5.9 KB
/
app.haml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
!!!
%html
%head
%title Redmon
%script(type="text/javascript" src="vendor/jquery-1.7.1.min.js")
%script(type="text/javascript" src="vendor/jquery-effects-core.min.js")
%script(type="text/javascript" src="vendor/jquery.editinplace.js")
%script(type="text/javascript" src="vendor/jquery.flot.js")
%script(type="text/javascript" src="vendor/bootstrap-modal.js")
%script(type="text/javascript" src="vendor/terminal.js")
%script(type="text/javascript" src="redmon.js")
%link(type="text/css" rel="stylesheet" href="vendor/bootstrap.min.css")
%link(type="text/css" rel="stylesheet" href="redmon.css")
%body
.topbar
.fill
.container
%a.brand Redmon
%ul.nav
%li.active{:id => 'dashboard'}
%a Dashboard
%li{:id => 'keys'}
%a Keys
%li{:id => 'cli'}
%a CLI
%li{:id => 'config'}
%a Configuration
.pull-right
%a.brand #{redis_url}
.btns
%button.btn.primary{:id => 'flush-btn'} Flush DB
%button.btn.primary{:id => 'reset-btn'} Reset Statistics
.container.viewport
.dashboard
.content
.page-header
%h1 Dashboard
.row
.span15
.row
.span15
.widget
.headbar
%h2 Memory Usage
#memory-container.chart{:style => ""}
.row
.span15
.widget
.headbar
%h2 Keyspace
#keyspace-container.chart{:style => ""}
.row
.span15
.widget
.headbar
%h2 Slow Log
%div{:style => "height:225px;overflow-y:scroll;"}
%table.condensed-table{:id => "slow-tbl"}
%tbody
.span6
.widget
.headbar
%h2 Info
%table.condensed-table{:id => "info-tbl"}
%tbody
%tr
%td{:style => "width: 65%"} Version
%td{:id => "redis_version"}
%tr
%td Role
%td{:id => "role"}
%tr
%td Uptime Days
%td{:id => "uptime_in_days"}
%tr
%td Memory Used
%td{:id => "used_memory_human"}
%tr
%td Memory Peak
%td{:id => "used_memory_peak_human"}
%tr
%td Memory Fragmentation Ratio
%td{:id => "mem_fragmentation_ratio"}
%tr
%td DB Size (Keys)
%td{:id => "dbsize", :type => 'number'}
%tr
%td Keyspace Hits
%td{:id => "keyspace_hits", :type => 'number'}
%tr
%td Keyspace Misses
%td{:id => "keyspace_misses", :type => 'number'}
%tr
%td Pub/Sub Channels
%td{:id => "pubsub_channels", :type => 'number'}
%tr
%td Pub/Sub Patterns
%td{:id => "pubsub_patterns", :type => 'number'}
%tr
%td Total Connections Received
%td{:id => "total_connections_received", :type => 'number'}
%tr
%td Total Commands Processed
%td{:id => "total_commands_processed", :type => 'number'}
%tr
%td Blocked Clients
%td{:id => "blocked_clients", :type => 'number'}
%tr
%td Connected Slaves
%td{:id => "connected_slaves", :type => 'number'}
%tr
%td Last Save
%td{:id => "last_save_time", :type => 'date'}
%tr
%td Changes Since Last Save
%td{:id => "changes_since_last_save", :type => 'number'}
%tr
%td AOF Enabled
%td{:id => "aof_enabled"}
%tr
%td VM Enabled
%td{:id => "vm_enabled"}
.keys.hidden
.content
.page-header
%h1 Keys - Coming soon!
.row
.span6
.input-prepend
%span.add-on pattern
%input.span5
.span15
.cli.hidden
.content
.page-header
%h1 Command Line Interface
.row
.span21{:style => "height:620px"}
#terminal
.config.hidden
.content
.page-header
%h1 Configuration
.widget
.headbar
%h2 Parameters
%table.condensed-table{:id => "config-table"}
%tbody
- config.each do |k,v|
%tr
%td{:style => "width: 20%"}= k
%td
.editable{:id => "#{k}"}= v
#flush-confirm.modal.hide
.modal-header
%a.close x
%h3 Flush DB
.modal-body
%p This action will, without a doubt, delete all the keys of the redis server.
.modal-footer
%button.btn.secondary{:id => 'flush-cancel-btn'} Well On Second Though
%button.btn.danger{:id => 'flush-confirm-btn'} Just Do It Already!
:javascript
$(document).ready(function() {
Redmon.init({
pollInterval : #{poll_interval},
cliPrompt : "#{prompt}"
});
});