Merge branch 'atomaka/feature/dashboard' into 'master'
Get Started On Dashboard Add a few things for a basic dashboard See merge request !20
This commit is contained in:
commit
9505e08b28
5 changed files with 48 additions and 2 deletions
|
@ -37,6 +37,8 @@ class Card < ActiveRecord::Base
|
||||||
|
|
||||||
default_scope { order(:gameid) }
|
default_scope { order(:gameid) }
|
||||||
|
|
||||||
|
scope :new_this_week, -> { where('created_at > ?', 1.week.ago) }
|
||||||
|
|
||||||
def dokkan?
|
def dokkan?
|
||||||
dokkan_id != nil
|
dokkan_id != nil
|
||||||
end
|
end
|
||||||
|
@ -49,6 +51,10 @@ class Card < ActiveRecord::Base
|
||||||
"card_#{gameid}_thumb.png"
|
"card_#{gameid}_thumb.png"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def self.verified
|
||||||
|
Card.where(verified: true)
|
||||||
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def set_stat_types
|
def set_stat_types
|
||||||
|
|
|
@ -7,4 +7,8 @@ class Link < ActiveRecord::Base
|
||||||
uniqueness: true
|
uniqueness: true
|
||||||
|
|
||||||
default_scope { order(:name) }
|
default_scope { order(:name) }
|
||||||
|
|
||||||
|
def self.issues
|
||||||
|
Link.where(description: nil)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -13,4 +13,8 @@ class PassiveSkill < ActiveRecord::Base
|
||||||
def display_name
|
def display_name
|
||||||
name.present? ? name : 'UNNAMED'
|
name.present? ? name : 'UNNAMED'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def self.issues
|
||||||
|
PassiveSkill.where("name = '' OR description = ''")
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -10,4 +10,8 @@ class SuperAttack < ActiveRecord::Base
|
||||||
def full
|
def full
|
||||||
"#{name} - #{description}"
|
"#{name} - #{description}"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def self.issues
|
||||||
|
SuperAttack.where("name = '' OR description = ''")
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -5,8 +5,8 @@
|
||||||
.col-xs-3
|
.col-xs-3
|
||||||
= glyph 'credit-card', classes: 'large-icon'
|
= glyph 'credit-card', classes: 'large-icon'
|
||||||
.col-xs-9.text-right
|
.col-xs-9.text-right
|
||||||
.huge XX
|
.huge= Card.new_this_week.count
|
||||||
div New Cards!
|
div New Cards This Week!
|
||||||
a href="#"
|
a href="#"
|
||||||
.panel-footer
|
.panel-footer
|
||||||
.pull-left View Details
|
.pull-left View Details
|
||||||
|
@ -26,3 +26,31 @@
|
||||||
.pull-left View Details
|
.pull-left View Details
|
||||||
.pull-right= glyph 'circle-arrow-right'
|
.pull-right= glyph 'circle-arrow-right'
|
||||||
.clearfix
|
.clearfix
|
||||||
|
.col-md-6
|
||||||
|
.panel.panel-default
|
||||||
|
.panel-heading Card Stats
|
||||||
|
.panel-body
|
||||||
|
.list-group
|
||||||
|
a.list-group-item
|
||||||
|
= 'Total'
|
||||||
|
span.pull-right.text-muted= Card.count
|
||||||
|
a.list-group-item
|
||||||
|
= 'Verified'
|
||||||
|
span.pull-right.text-muted= Card.verified.count
|
||||||
|
.col-md-6
|
||||||
|
.panel.panel-default
|
||||||
|
.panel-heading Potential Issues
|
||||||
|
.panel-body
|
||||||
|
.list-group
|
||||||
|
a.list-group-item
|
||||||
|
= 'Cards Without Links'
|
||||||
|
span.pull-right.text-muted= Card.where('links_count < 1').count
|
||||||
|
a.list-group-item
|
||||||
|
= 'Passive Skills missing information'
|
||||||
|
span.pull-right.text-muted= PassiveSkill.issues.count
|
||||||
|
a.list-group-item
|
||||||
|
= 'Super Attacks missing information'
|
||||||
|
span.pull-right.text-muted= SuperAttack.issues.count
|
||||||
|
a.list-group-item
|
||||||
|
= 'Links missing information'
|
||||||
|
span.pull-right.text-muted= Link.issues.count
|
||||||
|
|
Loading…
Reference in a new issue