stoplight-admin 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/sinatra/views/index.haml +79 -0
- data/lib/sinatra/views/layout.haml +48 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6c18217e5881952639cabcc7db8558713d2ac874
|
4
|
+
data.tar.gz: 6be1925c4db29d61519817aa67594bcd53abbe95
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4c910d36fd485295ee674e4d692fee4f8dd0671f960cd1ce3236b12ba076d75004a855329ce5597d990cf7c725332c2ad5101fc20e7298eebe5e7b7665a0835c
|
7
|
+
data.tar.gz: aa9eba6edf8a3601e8f8d33a646ba86c260042f683e30afa45995a7ed1169f1e69e6e8b7c361536cf034da1bd765b037f2da0feb7d0bb38b5dbdbd368f83825c
|
data/README.md
CHANGED
@@ -0,0 +1,79 @@
|
|
1
|
+
.jumbotron.hidden-xs.hidden-sm
|
2
|
+
%h1 🚦 All of the Lights
|
3
|
+
%p Cop lights, flashlights, spotlights, strobe lights…
|
4
|
+
|
5
|
+
.main
|
6
|
+
- if lights.empty?
|
7
|
+
.alert.alert-warning{role: 'alert'}
|
8
|
+
%strong No lights found.
|
9
|
+
Ensure that your Stoplight data store is properly configured and that your Stoplight blocks have been run.
|
10
|
+
- else
|
11
|
+
.well
|
12
|
+
%form{method: 'post', action: url('/green_all')}
|
13
|
+
%button.btn-lg.btn.btn-success{type: 'submit', disabled: count_red + count_yellow > 0 ? nil : 'disabled'} Greenify All
|
14
|
+
|
15
|
+
.progress
|
16
|
+
.progress-bar.progress-bar-danger{style: "width: #{percent_red}%"}
|
17
|
+
.span= count_red
|
18
|
+
.progress-bar.progress-bar-warning{style: "width: #{percent_yellow}%"}
|
19
|
+
.span= count_yellow
|
20
|
+
.progress-bar.progress-bar-success{style: "width: #{percent_green}%"}
|
21
|
+
.span= count_green
|
22
|
+
|
23
|
+
.lights
|
24
|
+
%table.table.table-hover
|
25
|
+
%thead.hidden-xs
|
26
|
+
%tr
|
27
|
+
%th Status
|
28
|
+
%th
|
29
|
+
%abbr{title: 'Locked lights will not change color automatically.'} Locked?
|
30
|
+
%th Name
|
31
|
+
%th
|
32
|
+
%abbr{title: 'Exceptions which caused the light to turn red.'} Failures
|
33
|
+
%tbody
|
34
|
+
- lights.each do |l|
|
35
|
+
%tr
|
36
|
+
%td.indicator
|
37
|
+
- if l[:color] == GREEN
|
38
|
+
%form{method: 'post', action: url('/red')}
|
39
|
+
%input{type: 'hidden', name: 'names', value: URI.escape(l[:name])}
|
40
|
+
%button{type: 'submit', class: 'btn btn-success'}
|
41
|
+
G
|
42
|
+
%span.hidden-xs> REEN
|
43
|
+
- elsif l[:color] == YELLOW
|
44
|
+
%form{method: 'post', action: url('/green')}
|
45
|
+
%input{type: 'hidden', name: 'names', value: URI.escape(l[:name])}
|
46
|
+
%button{type: 'submit', class: 'btn btn-warning'}
|
47
|
+
Y
|
48
|
+
%span.hidden-xs> ELLOW
|
49
|
+
- else
|
50
|
+
%form{method: 'post', action: url('/green')}
|
51
|
+
%input{type: 'hidden', name: 'names', value: URI.escape(l[:name])}
|
52
|
+
%button{type: 'submit', class: 'btn btn-danger'}
|
53
|
+
R
|
54
|
+
%span.hidden-xs> ED
|
55
|
+
%td.locked
|
56
|
+
- if l[:locked]
|
57
|
+
%form{method: 'post', action: url('/unlock')}
|
58
|
+
%input{type: 'hidden', name: 'names', value: URI.escape(l[:name])}
|
59
|
+
%button{type: 'submit', class: 'btn btn-link'}
|
60
|
+
%span{class: 'glyphicon glyphicon-lock'}
|
61
|
+
- else
|
62
|
+
%form{method: 'post', action: url('/lock')}
|
63
|
+
%input{type: 'hidden', name: 'names', value: URI.escape(l[:name])}
|
64
|
+
%button{type: 'submit', class: 'btn btn-link'}
|
65
|
+
%span{class: 'glyphicon glyphicon-minus'}
|
66
|
+
%td.name
|
67
|
+
= l[:name]
|
68
|
+
%td.failures
|
69
|
+
- if l[:failures]
|
70
|
+
%ul
|
71
|
+
- l[:failures].each do |failure|
|
72
|
+
%li
|
73
|
+
%span.error
|
74
|
+
&= failure.error_class
|
75
|
+
\:
|
76
|
+
&= failure.error_message
|
77
|
+
@
|
78
|
+
%span.timestamp
|
79
|
+
&= failure.time
|
@@ -0,0 +1,48 @@
|
|
1
|
+
!!! 5
|
2
|
+
%html{lang: 'en'}
|
3
|
+
%head
|
4
|
+
%meta{charset: 'utf-8'}
|
5
|
+
%meta{name: 'viewport', content: 'width=device-width, initial-scale=1'}
|
6
|
+
|
7
|
+
%title Stoplight Admin
|
8
|
+
|
9
|
+
%link{rel: 'stylesheet', href: '//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css'}
|
10
|
+
%link{rel: 'stylesheet', href: '//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap-theme.min.css'}
|
11
|
+
%link{rel: 'shortcut icon', href: '//i.imgur.com/qvfoNuh.png'}
|
12
|
+
|
13
|
+
:css
|
14
|
+
td.indicator {
|
15
|
+
font-size: 200%;
|
16
|
+
}
|
17
|
+
|
18
|
+
td.name {
|
19
|
+
font-weight: bold;
|
20
|
+
}
|
21
|
+
|
22
|
+
td.locked button {
|
23
|
+
font-size: 200%;
|
24
|
+
}
|
25
|
+
|
26
|
+
td.failures span.error {
|
27
|
+
font-weight: bold;
|
28
|
+
}
|
29
|
+
|
30
|
+
td.failures ul {
|
31
|
+
padding: 0;
|
32
|
+
list-style-type: none;
|
33
|
+
}
|
34
|
+
|
35
|
+
.btn-group form {
|
36
|
+
display: inline-block;
|
37
|
+
}
|
38
|
+
|
39
|
+
%body
|
40
|
+
.navbar.navbar-inverse.navbar-static-top{role: 'navigation'}
|
41
|
+
.container
|
42
|
+
.navbar-header
|
43
|
+
%a{class: 'navbar-brand', href: url('/')} Stoplight Admin
|
44
|
+
|
45
|
+
.container{role: 'main'}
|
46
|
+
= yield
|
47
|
+
|
48
|
+
%script{src: '//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js'}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stoplight-admin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cameron Desautels
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2016-01-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: haml
|
@@ -120,6 +120,8 @@ files:
|
|
120
120
|
- LICENSE.md
|
121
121
|
- README.md
|
122
122
|
- lib/sinatra/stoplight_admin.rb
|
123
|
+
- lib/sinatra/views/index.haml
|
124
|
+
- lib/sinatra/views/layout.haml
|
123
125
|
homepage: https://github.com/orgsync/stoplight-admin
|
124
126
|
licenses:
|
125
127
|
- MIT
|