Skip to content
This repository was archived by the owner on Feb 15, 2025. It is now read-only.

Commit c110a81

Browse files
author
Marcelo Costa
committed
replace dashing with smashing
1 parent d8ea232 commit c110a81

28 files changed

+3853
-10
lines changed

Dockerfile

+31-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,33 @@
1-
FROM frvi/dashing
1+
FROM ruby:2.3.1
22

3-
ADD widgets /widgets
4-
ADD dashboards /dashboards
5-
ADD jobs /jobs
3+
RUN printf "deb http://archive.debian.org/debian/ jessie main\ndeb-src http://archive.debian.org/debian/ jessie main\ndeb http://security.debian.org jessie/updates main\ndeb-src http://security.debian.org jessie/updates main" > /etc/apt/sources.list
4+
RUN apt-get update && apt-get install -y --no-install-recommends apt-utils
5+
RUN apt-get update && \
6+
apt-get -y install nodejs && \
7+
apt-get -y clean
8+
RUN gem update --system
9+
RUN gem install bundler smashing
10+
RUN mkdir /smashing && \
11+
smashing new smashing && \
12+
cd /smashing && \
13+
bundle && \
14+
ln -s /smashing/dashboards /dashboards && \
15+
ln -s /smashing/jobs /jobs && \
16+
ln -s /smashing/assets /assets && \
17+
ln -s /smashing/lib /lib-smashing && \
18+
ln -s /smashing/public /public && \
19+
ln -s /smashing/widgets /widgets && \
20+
mkdir /smashing/config && \
21+
mv /smashing/config.ru /smashing/config/config.ru && \
22+
ln -s /smashing/config/config.ru /smashing/config.ru && \
23+
ln -s /smashing/config /config
624

7-
CMD ["/run.sh"]
25+
COPY . /smashing
26+
27+
VOLUME ["/dashboards", "/jobs", "/lib-smashing", "/config", "/public", "/widgets", "/assets"]
28+
29+
ENV PORT 3030
30+
EXPOSE $PORT
31+
WORKDIR /smashing
32+
33+
CMD ["/smashing/run.sh"]

Gemfile

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
source 'https://rubygems.org'
2+
3+
gem 'smashing'
4+
5+
## Remove this if you don't need a twitter widget.
6+
gem 'twitter', '>= 5.9.0'

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
# qa-metrics
2+
23
Dashboards and tools to improve observability

assets/fonts/FontAwesome.otf

107 KB
Binary file not shown.

assets/fonts/fontawesome-webfont.eot

69.1 KB
Binary file not shown.

assets/fonts/fontawesome-webfont.svg

+655
Loading

assets/fonts/fontawesome-webfont.ttf

139 KB
Binary file not shown.

assets/fonts/fontawesome-webfont.woff

81.6 KB
Binary file not shown.
65.1 KB
Binary file not shown.

assets/images/logo.png

66.5 KB
Loading

assets/javascripts/application.coffee

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# dashing.js is located in the dashing framework
2+
# It includes jquery & batman for you.
3+
#= require dashing.js
4+
5+
#= require_directory .
6+
#= require_tree ../../widgets
7+
8+
console.log("Yeah! The dashboard has started!")
9+
10+
Dashing.on 'ready', ->
11+
Dashing.widget_margins ||= [5, 5]
12+
Dashing.widget_base_dimensions ||= [300, 360]
13+
Dashing.numColumns ||= 4
14+
15+
contentWidth = (Dashing.widget_base_dimensions[0] + Dashing.widget_margins[0] * 2) * Dashing.numColumns
16+
17+
Batman.setImmediate ->
18+
$('.gridster').width(contentWidth)
19+
$('.gridster ul:first').gridster
20+
widget_margins: Dashing.widget_margins
21+
widget_base_dimensions: Dashing.widget_base_dimensions
22+
avoid_overlapped_widgets: !Dashing.customGridsterLayout
23+
draggable:
24+
stop: Dashing.showGridsterInstructions
25+
start: -> Dashing.currentWidgetPositions = Dashing.getWidgetPositions()

assets/javascripts/d3-3.2.8.js

+5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#= require_directory ./gridster
2+
3+
# This file enables gridster integration (http://gridster.net/)
4+
# Delete it if you'd rather handle the layout yourself.
5+
# You'll miss out on a lot if you do, but we won't hold it against you.
6+
7+
Dashing.gridsterLayout = (positions) ->
8+
Dashing.customGridsterLayout = true
9+
positions = positions.replace(/^"|"$/g, '')
10+
positions = $.parseJSON(positions)
11+
widgets = $("[data-row^=]")
12+
for widget, index in widgets
13+
$(widget).attr('data-row', positions[index].row)
14+
$(widget).attr('data-col', positions[index].col)
15+
16+
Dashing.getWidgetPositions = ->
17+
$(".gridster ul:first").gridster().data('gridster').serialize()
18+
19+
Dashing.showGridsterInstructions = ->
20+
newWidgetPositions = Dashing.getWidgetPositions()
21+
22+
unless JSON.stringify(newWidgetPositions) == JSON.stringify(Dashing.currentWidgetPositions)
23+
Dashing.currentWidgetPositions = newWidgetPositions
24+
$('#save-gridster').slideDown()
25+
$('#gridster-code').text("
26+
<script type='text/javascript'>\n
27+
$(function() {\n
28+
\ \ Dashing.gridsterLayout('#{JSON.stringify(Dashing.currentWidgetPositions)}')\n
29+
});\n
30+
</script>
31+
")
32+
33+
$ ->
34+
$('#save-gridster').leanModal()
35+
36+
$('#save-gridster').click ->
37+
$('#save-gridster').slideUp()

assets/javascripts/gridster/jquery.gridster.min.js

+2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/javascripts/gridster/jquery.leanModal.min.js

+5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)