summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2018-02-16 10:26:05 +0000
committerPhil Hughes <me@iamphill.com>2018-02-16 10:26:05 +0000
commitd74c63e61b2e4e610f6880acb7cafcc4f5f42060 (patch)
treeab24f192577d2948c2d2cc0584900dbebb3a5cc5 /app
parentc312d2b9ffeaed9c30a9776d2ef5a7c126d5a5db (diff)
downloadgitlab-ce-d74c63e61b2e4e610f6880acb7cafcc4f5f42060.tar.gz
deleted pipelines_charts file
it is no longer used now that all the pipeline chart stuff is in 1 file
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/pipelines/pipelines_charts.js38
1 files changed, 0 insertions, 38 deletions
diff --git a/app/assets/javascripts/pipelines/pipelines_charts.js b/app/assets/javascripts/pipelines/pipelines_charts.js
deleted file mode 100644
index 821aa7e229f..00000000000
--- a/app/assets/javascripts/pipelines/pipelines_charts.js
+++ /dev/null
@@ -1,38 +0,0 @@
-import Chart from 'vendor/Chart';
-
-document.addEventListener('DOMContentLoaded', () => {
- const chartData = JSON.parse(document.getElementById('pipelinesChartsData').innerHTML);
- const buildChart = (chartScope) => {
- const data = {
- labels: chartScope.labels,
- datasets: [{
- fillColor: '#707070',
- strokeColor: '#707070',
- pointColor: '#707070',
- pointStrokeColor: '#EEE',
- data: chartScope.totalValues,
- },
- {
- fillColor: '#1aaa55',
- strokeColor: '#1aaa55',
- pointColor: '#1aaa55',
- pointStrokeColor: '#fff',
- data: chartScope.successValues,
- },
- ],
- };
- const ctx = $(`#${chartScope.scope}Chart`).get(0).getContext('2d');
- const options = {
- scaleOverlay: true,
- responsive: true,
- maintainAspectRatio: false,
- };
- if (window.innerWidth < 768) {
- // Scale fonts if window width lower than 768px (iPad portrait)
- options.scaleFontSize = 8;
- }
- new Chart(ctx).Line(data, options);
- };
-
- chartData.forEach(scope => buildChart(scope));
-});