summaryrefslogtreecommitdiff
path: root/app/views/ci
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-09-23 16:16:45 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-09-23 16:24:46 +0200
commiteae27d1ecbfec7ea928b27e0ffc96abeb4a49f7a (patch)
tree01bef6563a1313b7bdf13d214bdabd44781d2891 /app/views/ci
parent4bc1e040d4b7d73bd7afb3dbb95c87983eef2b04 (diff)
downloadgitlab-ce-eae27d1ecbfec7ea928b27e0ffc96abeb4a49f7a.tar.gz
Move CI charts to project graphs area
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/views/ci')
-rw-r--r--app/views/ci/charts/_build_times.haml21
-rw-r--r--app/views/ci/charts/_builds.haml41
-rw-r--r--app/views/ci/charts/_overall.haml21
-rw-r--r--app/views/ci/charts/show.html.haml4
4 files changed, 0 insertions, 87 deletions
diff --git a/app/views/ci/charts/_build_times.haml b/app/views/ci/charts/_build_times.haml
deleted file mode 100644
index c3c2f572414..00000000000
--- a/app/views/ci/charts/_build_times.haml
+++ /dev/null
@@ -1,21 +0,0 @@
-%fieldset
- %legend
- Commit duration in minutes for last 30 commits
-
- %canvas#build_timesChart.padded{width: 800, height: 300}
-
-:javascript
- var data = {
- labels : #{@charts[:build_times].labels.to_json},
- datasets : [
- {
- fillColor : "#4A3",
- strokeColor : "rgba(151,187,205,1)",
- pointColor : "rgba(151,187,205,1)",
- pointStrokeColor : "#fff",
- data : #{@charts[:build_times].build_times.to_json}
- }
- ]
- }
- var ctx = $("#build_timesChart").get(0).getContext("2d");
- new Chart(ctx).Line(data,{"scaleOverlay": true});
diff --git a/app/views/ci/charts/_builds.haml b/app/views/ci/charts/_builds.haml
deleted file mode 100644
index 1b0039fb834..00000000000
--- a/app/views/ci/charts/_builds.haml
+++ /dev/null
@@ -1,41 +0,0 @@
-%fieldset
- %legend
- Builds chart for last week
- (#{date_from_to(Date.today - 7.days, Date.today)})
-
- %canvas#weekChart.padded{width: 800, height: 200}
-
-%fieldset
- %legend
- Builds chart for last month
- (#{date_from_to(Date.today - 30.days, Date.today)})
-
- %canvas#monthChart.padded{width: 800, height: 300}
-
-%fieldset
- %legend Builds chart for last year
- %canvas#yearChart.padded{width: 800, height: 400}
-
-- [:week, :month, :year].each do |scope|
- :javascript
- var data = {
- labels : #{@charts[scope].labels.to_json},
- datasets : [
- {
- fillColor : "rgba(220,220,220,0.5)",
- strokeColor : "rgba(220,220,220,1)",
- pointColor : "rgba(220,220,220,1)",
- pointStrokeColor : "#EEE",
- data : #{@charts[scope].total.to_json}
- },
- {
- fillColor : "#4A3",
- strokeColor : "rgba(151,187,205,1)",
- pointColor : "rgba(151,187,205,1)",
- pointStrokeColor : "#fff",
- data : #{@charts[scope].success.to_json}
- }
- ]
- }
- var ctx = $("##{scope}Chart").get(0).getContext("2d");
- new Chart(ctx).Line(data,{"scaleOverlay": true});
diff --git a/app/views/ci/charts/_overall.haml b/app/views/ci/charts/_overall.haml
deleted file mode 100644
index f522f35a629..00000000000
--- a/app/views/ci/charts/_overall.haml
+++ /dev/null
@@ -1,21 +0,0 @@
-%fieldset
- %legend Overall
- %p
- Total:
- %strong= pluralize @project.builds.count(:all), 'build'
- %p
- Successful:
- %strong= pluralize @project.builds.success.count(:all), 'build'
- %p
- Failed:
- %strong= pluralize @project.builds.failed.count(:all), 'build'
-
- %p
- Success ratio:
- %strong
- #{success_ratio(@project.builds.success, @project.builds.failed)}%
-
- %p
- Commits covered:
- %strong
- = @project.commits.count(:all)
diff --git a/app/views/ci/charts/show.html.haml b/app/views/ci/charts/show.html.haml
deleted file mode 100644
index 0497f037721..00000000000
--- a/app/views/ci/charts/show.html.haml
+++ /dev/null
@@ -1,4 +0,0 @@
-#charts.ci-charts
- = render 'builds'
- = render 'build_times'
-= render 'overall'