Chart.html.haml refactor
This commit is contained in:
parent
8cfa5ccf53
commit
834f455b43
|
@ -1,4 +0,0 @@
|
|||
import Chart from 'vendor/Chart';
|
||||
|
||||
// export to global scope
|
||||
window.Chart = Chart;
|
|
@ -1,4 +1,4 @@
|
|||
import Chart from 'vendor/Chart';
|
||||
import Chart from 'chart.js';
|
||||
import _ from 'underscore';
|
||||
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
|
@ -1,4 +1,4 @@
|
|||
import Chart from 'vendor/Chart';
|
||||
import Chart from 'chart.js';
|
||||
|
||||
const options = {
|
||||
scaleOverlay: true,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
- if inject_u2f_api?
|
||||
- content_for :page_specific_javascripts do
|
||||
= page_specific_javascript_bundle_tag('u2f')
|
||||
= webpack_bundle_tag('u2f')
|
||||
|
||||
%div
|
||||
= render 'devise/shared/tab_single', tab_title: 'Two-Factor Authentication'
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
- content_for :page_specific_javascripts do
|
||||
= page_specific_javascript_bundle_tag('profile')
|
||||
= webpack_bundle_tag('profile')
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
|
||||
- content_for :page_specific_javascripts do
|
||||
- if inject_u2f_api?
|
||||
= page_specific_javascript_bundle_tag('u2f')
|
||||
= page_specific_javascript_bundle_tag('two_factor_auth')
|
||||
= webpack_bundle_tag('u2f')
|
||||
= webpack_bundle_tag('two_factor_auth')
|
||||
|
||||
.js-two-factor-auth{ 'data-two-factor-skippable' => "#{two_factor_skippable?}", 'data-two_factor_skip_url' => skip_profile_two_factor_auth_path }
|
||||
.row.prepend-top-default
|
||||
|
|
|
@ -29,4 +29,4 @@
|
|||
= commit_in_fork_help
|
||||
|
||||
- content_for :page_specific_javascripts do
|
||||
= page_specific_javascript_bundle_tag('blob')
|
||||
= webpack_bundle_tag('blob')
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
- page_title "Edit", @blob.path, @ref
|
||||
- content_for :page_specific_javascripts do
|
||||
= page_specific_javascript_tag('lib/ace.js')
|
||||
= page_specific_javascript_bundle_tag('blob')
|
||||
= webpack_bundle_tag('blob')
|
||||
|
||||
%div{ class: container_class }
|
||||
- if @conflict
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
- page_title "New File", @path.presence, @ref
|
||||
- content_for :page_specific_javascripts do
|
||||
= page_specific_javascript_tag('lib/ace.js')
|
||||
= page_specific_javascript_bundle_tag('blob')
|
||||
= webpack_bundle_tag('blob')
|
||||
.editor-title-row
|
||||
%h3.page-title.blob-new-page-title
|
||||
New file
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
- content_for :page_specific_javascripts do
|
||||
= page_specific_javascript_bundle_tag('balsamiq_viewer')
|
||||
= webpack_bundle_tag('balsamiq_viewer')
|
||||
|
||||
.file-content.balsamiq-viewer#js-balsamiq-viewer{ data: { endpoint: blob_raw_path } }
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
- content_for :page_specific_javascripts do
|
||||
= page_specific_javascript_bundle_tag('common_vue')
|
||||
= page_specific_javascript_bundle_tag('notebook_viewer')
|
||||
= webpack_bundle_tag('common_vue')
|
||||
= webpack_bundle_tag('notebook_viewer')
|
||||
|
||||
.file-content#js-notebook-viewer{ data: { endpoint: blob_raw_path } }
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
- content_for :page_specific_javascripts do
|
||||
= page_specific_javascript_bundle_tag('common_vue')
|
||||
= page_specific_javascript_bundle_tag('pdf_viewer')
|
||||
= webpack_bundle_tag('common_vue')
|
||||
= webpack_bundle_tag('pdf_viewer')
|
||||
|
||||
.file-content#js-pdf-viewer{ data: { endpoint: blob_raw_path } }
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
- content_for :page_specific_javascripts do
|
||||
= page_specific_javascript_bundle_tag('common_vue')
|
||||
= page_specific_javascript_bundle_tag('sketch_viewer')
|
||||
= webpack_bundle_tag('common_vue')
|
||||
= webpack_bundle_tag('sketch_viewer')
|
||||
|
||||
.file-content#js-sketch-viewer{ data: { endpoint: blob_raw_path } }
|
||||
.js-loading-icon.text-center.prepend-top-default.append-bottom-default.js-loading-icon{ 'aria-label' => 'Loading Sketch preview' }
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
- content_for :page_specific_javascripts do
|
||||
= page_specific_javascript_bundle_tag('stl_viewer')
|
||||
= webpack_bundle_tag('stl_viewer')
|
||||
|
||||
.file-content.is-stl-loading
|
||||
.text-center#js-stl-viewer{ data: { endpoint: blob_raw_path } }
|
||||
|
|
|
@ -8,5 +8,5 @@
|
|||
} }
|
||||
|
||||
- content_for :page_specific_javascripts do
|
||||
= page_specific_javascript_bundle_tag('common_vue')
|
||||
= page_specific_javascript_bundle_tag('commit_pipelines')
|
||||
= webpack_bundle_tag('common_vue')
|
||||
= webpack_bundle_tag('commit_pipelines')
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
- page_title "#{@commit.title} (#{@commit.short_id})", "Commits"
|
||||
- page_description @commit.description
|
||||
- content_for :page_specific_javascripts do
|
||||
= page_specific_javascript_bundle_tag('common_vue')
|
||||
= page_specific_javascript_bundle_tag('diff_notes')
|
||||
= webpack_bundle_tag('common_vue')
|
||||
= webpack_bundle_tag('diff_notes')
|
||||
|
||||
.container-fluid{ class: [limited_container_width, container_class] }
|
||||
= render "commit_box"
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
- @no_container = true
|
||||
- page_title "Cycle Analytics"
|
||||
- content_for :page_specific_javascripts do
|
||||
= page_specific_javascript_bundle_tag('common_vue')
|
||||
= page_specific_javascript_bundle_tag('cycle_analytics')
|
||||
= webpack_bundle_tag('common_vue')
|
||||
= webpack_bundle_tag('cycle_analytics')
|
||||
|
||||
#cycle-analytics{ class: container_class, "v-cloak" => "true", data: { request_path: project_cycle_analytics_path(@project) } }
|
||||
- if @cycle_analytics_no_data
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
- page_title "Environments"
|
||||
|
||||
- content_for :page_specific_javascripts do
|
||||
= page_specific_javascript_bundle_tag('common_vue')
|
||||
= page_specific_javascript_bundle_tag("environments_folder")
|
||||
= webpack_bundle_tag('common_vue')
|
||||
= webpack_bundle_tag("environments_folder")
|
||||
|
||||
#environments-folder-list-view{ data: { endpoint: folder_project_environments_path(@project, @folder, format: :json),
|
||||
"folder-name" => @folder,
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
- add_to_breadcrumbs("Pipelines", project_pipelines_path(@project))
|
||||
|
||||
- content_for :page_specific_javascripts do
|
||||
= page_specific_javascript_bundle_tag("common_vue")
|
||||
= page_specific_javascript_bundle_tag("environments")
|
||||
= webpack_bundle_tag("common_vue")
|
||||
= webpack_bundle_tag("environments")
|
||||
|
||||
#environments-list-view{ data: { environments_data: environments_list_data,
|
||||
"can-create-deployment" => can?(current_user, :create_deployment, @project).to_s,
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
- content_for :page_specific_javascripts do
|
||||
= stylesheet_link_tag "xterm/xterm"
|
||||
= page_specific_javascript_bundle_tag("terminal")
|
||||
= webpack_bundle_tag("terminal")
|
||||
|
||||
%div{ class: container_class }
|
||||
.top-area
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
- page_title "Charts"
|
||||
- content_for :page_specific_javascripts do
|
||||
= webpack_bundle_tag('common_d3')
|
||||
= webpack_bundle_tag('graphs')
|
||||
= webpack_bundle_tag('graphs_charts')
|
||||
|
||||
.repo-charts{ class: container_class }
|
||||
%h4.sub-header
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
- page_title _('Contributors')
|
||||
- content_for :page_specific_javascripts do
|
||||
= webpack_bundle_tag('common_d3')
|
||||
= webpack_bundle_tag('graphs')
|
||||
= webpack_bundle_tag('graphs_show')
|
||||
|
||||
.js-graphs-show{ class: container_class, 'data-project-graph-path': project_graph_path(@project, current_ref, format: :json) }
|
||||
|
|
|
@ -87,5 +87,5 @@
|
|||
|
||||
= render 'shared/issuable/sidebar', issuable: @issue
|
||||
|
||||
= page_specific_javascript_bundle_tag('common_vue')
|
||||
= page_specific_javascript_bundle_tag('issue_show')
|
||||
= webpack_bundle_tag('common_vue')
|
||||
= webpack_bundle_tag('issue_show')
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
- page_title "Merge Conflicts", "#{@merge_request.title} (#{@merge_request.to_reference}", "Merge Requests"
|
||||
- content_for :page_specific_javascripts do
|
||||
= page_specific_javascript_bundle_tag('common_vue')
|
||||
= page_specific_javascript_bundle_tag('merge_conflicts')
|
||||
= webpack_bundle_tag('common_vue')
|
||||
= webpack_bundle_tag('merge_conflicts')
|
||||
= page_specific_javascript_tag('lib/ace.js')
|
||||
= render "projects/merge_requests/mr_title"
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
- page_title "Merge Conflicts", "#{@merge_request.title} (#{@merge_request.to_reference}", "Merge Requests"
|
||||
- content_for :page_specific_javascripts do
|
||||
= page_specific_javascript_bundle_tag('common_vue')
|
||||
= page_specific_javascript_bundle_tag('merge_conflicts')
|
||||
= webpack_bundle_tag('common_vue')
|
||||
= webpack_bundle_tag('merge_conflicts')
|
||||
= page_specific_javascript_tag('lib/ace.js')
|
||||
= render "projects/merge_requests/mr_title"
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
- breadcrumb_title "Graph"
|
||||
- page_title "Graph", @ref
|
||||
- content_for :page_specific_javascripts do
|
||||
= page_specific_javascript_bundle_tag('network')
|
||||
= webpack_bundle_tag('network')
|
||||
= render "head"
|
||||
%div{ class: container_class }
|
||||
.project-network
|
||||
|
|
|
@ -13,5 +13,5 @@
|
|||
"ci-lint-path" => ci_lint_path,
|
||||
"reset-cache-path" => reset_cache_project_settings_ci_cd_path(@project) } }
|
||||
|
||||
= page_specific_javascript_bundle_tag('common_vue')
|
||||
= page_specific_javascript_bundle_tag('pipelines')
|
||||
= webpack_bundle_tag('common_vue')
|
||||
= webpack_bundle_tag('pipelines')
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
- content_for :page_specific_javascripts do
|
||||
= page_specific_javascript_bundle_tag('protected_branches')
|
||||
= webpack_bundle_tag('protected_branches')
|
||||
|
||||
- content_for :create_protected_branch do
|
||||
= render 'projects/protected_branches/create_protected_branch'
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
- content_for :page_specific_javascripts do
|
||||
= page_specific_javascript_bundle_tag('protected_tags')
|
||||
= webpack_bundle_tag('protected_tags')
|
||||
|
||||
- content_for :create_protected_tag do
|
||||
= render 'projects/protected_tags/create_protected_tag'
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
.col-lg-12
|
||||
#js-vue-registry-images{ data: { endpoint: project_container_registry_index_path(@project, format: :json) } }
|
||||
|
||||
= page_specific_javascript_bundle_tag('common_vue')
|
||||
= page_specific_javascript_bundle_tag('registry_list')
|
||||
= webpack_bundle_tag('common_vue')
|
||||
= webpack_bundle_tag('registry_list')
|
||||
|
||||
.row.prepend-top-10
|
||||
.col-lg-12
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
- @content_class = "limit-container-width" unless fluid_layout
|
||||
|
||||
- content_for :page_specific_javascripts do
|
||||
= page_specific_javascript_bundle_tag('common_vue')
|
||||
= page_specific_javascript_bundle_tag('deploy_keys')
|
||||
= webpack_bundle_tag('common_vue')
|
||||
= webpack_bundle_tag('deploy_keys')
|
||||
|
||||
-# Protected branches & tags use a lot of nested partials.
|
||||
-# The shared parts of the views can be found in the `shared` directory.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
- todo = issuable_todo(issuable)
|
||||
- content_for :page_specific_javascripts do
|
||||
= page_specific_javascript_bundle_tag('common_vue')
|
||||
= page_specific_javascript_bundle_tag('sidebar')
|
||||
= webpack_bundle_tag('common_vue')
|
||||
= webpack_bundle_tag('sidebar')
|
||||
|
||||
%aside.right-sidebar.js-right-sidebar.js-issuable-sidebar{ data: { signed: { in: current_user.present? } }, class: sidebar_gutter_collapsed_class, 'aria-live' => 'polite' }
|
||||
.issuable-sidebar{ data: { endpoint: "#{issuable_json_path(issuable)}" } }
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
- content_for :page_specific_javascripts do
|
||||
= page_specific_javascript_tag('lib/ace.js')
|
||||
= page_specific_javascript_bundle_tag('snippet')
|
||||
= webpack_bundle_tag('snippet')
|
||||
|
||||
.snippet-form-holder
|
||||
= form_for @snippet, url: url, html: { class: "form-horizontal snippet-form js-requires-input js-quick-submit common-note-form" } do |f|
|
||||
|
|
|
@ -62,8 +62,6 @@ var config = {
|
|||
environments: './environments/environments_bundle.js',
|
||||
environments_folder: './environments/folder/environments_folder_bundle.js',
|
||||
filtered_search: './filtered_search/filtered_search_bundle.js',
|
||||
graphs: './graphs/graphs_bundle.js',
|
||||
graphs_charts: './graphs/graphs_charts.js',
|
||||
graphs_show: './graphs/graphs_show.js',
|
||||
help: './help/help.js',
|
||||
how_to_merge: './how_to_merge.js',
|
||||
|
@ -283,7 +281,6 @@ var config = {
|
|||
new webpack.optimize.CommonsChunkPlugin({
|
||||
name: 'common_d3',
|
||||
chunks: [
|
||||
'graphs',
|
||||
'graphs_show',
|
||||
'monitoring',
|
||||
'users',
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
"blackst0ne-mermaid": "^7.1.0-fixed",
|
||||
"bootstrap-sass": "^3.3.6",
|
||||
"brace-expansion": "^1.1.8",
|
||||
"chart.js": "1.0.2",
|
||||
"classlist-polyfill": "^1.2.0",
|
||||
"clipboard": "^1.7.1",
|
||||
"compression-webpack-plugin": "^1.0.0",
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1443,6 +1443,10 @@ chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.0:
|
|||
escape-string-regexp "^1.0.5"
|
||||
supports-color "^4.0.0"
|
||||
|
||||
chart.js@1.0.2:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/chart.js/-/chart.js-1.0.2.tgz#ad57d2229cfd8ccf5955147e8121b4911e69dfe7"
|
||||
|
||||
chokidar@^1.4.1, chokidar@^1.4.3, chokidar@^1.6.0, chokidar@^1.7.0:
|
||||
version "1.7.0"
|
||||
resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-1.7.0.tgz#798e689778151c8076b4b360e5edd28cda2bb468"
|
||||
|
|
Loading…
Reference in New Issue