Clean up the styling to be a bit more readable

I'M SO GOOD AT CSS FITE ME
This commit is contained in:
R. Tyler Croy 2017-09-04 12:43:42 -07:00
parent 779ebdaf9a
commit c4b5fe7c32
No known key found for this signature in database
GPG Key ID: 1426C7DC3F51E16F
5 changed files with 76 additions and 43 deletions

18
assets/css/canary.css Normal file
View File

@ -0,0 +1,18 @@
.project {
border-bottom: 1px solid #868e96;
}
.event {
background-color: #f8f9fa;
overflow: overlay;
margin-bottom: 0.5rem;
margin-top: 0.5rem;
}
.issue-metadata {
border-bottom: 1px solid #f8f9fa;
border-top: 1px solid #f8f9fa;
padding-bottom: 1rem;
margin-bottom: 1rem;
}

View File

@ -6,7 +6,8 @@ ENV['RACK_ENV'] ||= 'development'
require 'canary' require 'canary'
require 'raven' require 'raven'
use Rack::Static, :urls => ['/css', '/img', '/js'], :root => 'public' # Skip over Sinatra entirely for static assets
use Rack::Static, :urls => ['/css', '/img', '/js'], :root => 'assets'
use Raven::Rack use Raven::Rack
run CodeValet::Canary::App run CodeValet::Canary::App

View File

@ -13,6 +13,8 @@
:href => 'https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css', :href => 'https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css',
:integrity => 'sha384-rwoIResjU2yc3z8GV/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ', :integrity => 'sha384-rwoIResjU2yc3z8GV/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ',
:crossorigin => 'anonymous'}/ :crossorigin => 'anonymous'}/
%link{:rel => 'stylesheet',
:href => "#{@url_root}css/canary.css"}/
%script{:src => 'https://code.jquery.com/jquery-3.2.1.slim.min.js', %script{:src => 'https://code.jquery.com/jquery-3.2.1.slim.min.js',
:integrity => 'sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN', :integrity => 'sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN',
:crossorigin => 'anonymous'} :crossorigin => 'anonymous'}

View File

@ -45,30 +45,31 @@
- else - else
- projects.each do |project| - projects.each do |project|
%h4= project.name .row.p-3.project
%p %h4= project.name
- events = sentry.issues_for(project.slug) - events = sentry.issues_for(project.slug)
- unless events.size > 0 .col-lg-12
No recent events (yay). - unless events.size > 0
- else No recent events (yay).
- events.each do |event| - else
- badge = 'danger' - events.each do |event|
- if event.level != 'error' - badge = 'danger'
- badge = event.level - if event.level != 'error'
.row - badge = event.level
.col-lg-10 .row.p-2.event
%strong .col-lg-10
= event.title
.mb-2.text-muted
%span.badge{:class => "badge-#{badge}"} %span.badge{:class => "badge-#{badge}"}
= event.count = event.count
= event.culprit %strong
= event.title
%p .mb-2.text-muted
%a{:href => "issue/#{event.id}"} = event.culprit
View
· %p
%a{:href => event.permalink, :target => '_blank'} %a{:href => "issue/#{event.id}"}
View in Sentry View
%hr/ ·
%a{:href => event.permalink, :target => '_blank'}
View in Sentry
%hr/

View File

@ -4,34 +4,46 @@
- unless events - unless events
Something went wrong when rendering this page :( Something went wrong when rendering this page :(
- else - else
%h2 %h3
= issue.title = issue.title
%h3.text-muted %h4.text-muted
= issue.culprit = issue.culprit
.row
.col-md-12
%small
There are
%strong
= events.size
events associated with this issue.
- events.each do |event| - event = events.first
.row
.col-md-12.issue-metadata
.container
.row.p-1
%strong
Tags
%div.tags
- event.tags.each do |tag|
%span.badge.badge-info
#{tag['key']}:#{tag['value']}
.row.p-1
%small
There are
%strong
= events.size
similar events associated with this issue.
- event.entries.each do |entry|
.row .row
.col-md-12 .col-md-12
- event.tags.each do |tag| / #{entry.inspect}
%span.badge.badge-info - if entry['type'] == 'message'
#{tag['key']}:#{tag['value']} %h5
- event.entries.each do |entry| Message
/ #{entry.inspect} .container.p-1
- if entry['type'] == 'message' %blockquote.blockquote
%p
- if entry['data']['formatted'] - if entry['data']['formatted']
= entry['data']['formatted'] = entry['data']['formatted']
- else - else
= entry['data']['message'] = entry['data']['message']
- if entry['type'] == 'exception' - if entry['type'] == 'exception'
%h5
Stack trace
.container.p-1
- entry['data']['values'].each do |val| - entry['data']['values'].each do |val|
%ul.list-unstyled %ul.list-unstyled
- val['stacktrace']['frames'].reverse_each do |frame| - val['stacktrace']['frames'].reverse_each do |frame|
@ -46,4 +58,3 @@
%code %code
= frame['absPath'] = frame['absPath']
- break