Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2017-06-09 11:31:38 +0300
committerRémy Coutable <remy@rymai.me>2017-06-09 18:21:39 +0300
commitbe0a949a004a34015977bdbcfe24e3173cd3aba9 (patch)
tree78ce2ae5ce94aaa06fc53f52b4f5d1ab17cb1c95 /app/views/peek
parentef4ccb7e2676bf0fc3bf17c795b4ab0e0edc0821 (diff)
DRYed peek-pg/mysql2 views and update peek-rblineprof monkey-patch file
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'app/views/peek')
-rw-r--r--app/views/peek/views/_mysql2.html.haml16
-rw-r--r--app/views/peek/views/_pg.html.haml16
-rw-r--r--app/views/peek/views/_sql.html.haml13
3 files changed, 19 insertions, 26 deletions
diff --git a/app/views/peek/views/_mysql2.html.haml b/app/views/peek/views/_mysql2.html.haml
index 5a58c719c73..ac811a10ef5 100644
--- a/app/views/peek/views/_mysql2.html.haml
+++ b/app/views/peek/views/_mysql2.html.haml
@@ -1,14 +1,4 @@
-%strong
- %a#peek-show-queries{ href: '#' }
- %span{ data: { defer_to: "#{view.defer_key}-duration" } }...
- \/
- %span{ data: { defer_to: "#{view.defer_key}-calls" } }...
-#modal-peek-pg-queries.modal{ tabindex: -1 }
- .modal-dialog
- #modal-peek-pg-queries-content.modal-content
- .modal-header
- %a.close{ href: "#", "data-dismiss" => "modal" } ×
- %h4
- SQL queries
- .modal-body{ data: { defer_to: "#{view.defer_key}-queries" } }...
+- local_assigns.fetch(:view)
+
+= render 'peek/views/sql', view: view
mysql
diff --git a/app/views/peek/views/_pg.html.haml b/app/views/peek/views/_pg.html.haml
index e38c07a6097..ee94c2f3274 100644
--- a/app/views/peek/views/_pg.html.haml
+++ b/app/views/peek/views/_pg.html.haml
@@ -1,14 +1,4 @@
-%strong
- %a#peek-show-queries{ href: '#' }
- %span{ data: { defer_to: "#{view.defer_key}-duration" } }...
- \/
- %span{ data: { defer_to: "#{view.defer_key}-calls" } }...
-#modal-peek-pg-queries.modal{ tabindex: -1 }
- .modal-dialog
- #modal-peek-pg-queries-content.modal-content
- .modal-header
- %a.close{ href: "#", "data-dismiss" => "modal" } ×
- %h4
- SQL queries
- .modal-body{ data: { defer_to: "#{view.defer_key}-queries" } }...
+- local_assigns.fetch(:view)
+
+= render 'peek/views/sql', view: view
pg
diff --git a/app/views/peek/views/_sql.html.haml b/app/views/peek/views/_sql.html.haml
new file mode 100644
index 00000000000..16fc010f66f
--- /dev/null
+++ b/app/views/peek/views/_sql.html.haml
@@ -0,0 +1,13 @@
+%strong
+ %a#peek-show-queries{ href: '#' }
+ %span{ data: { defer_to: "#{view.defer_key}-duration" } }...
+ \/
+ %span{ data: { defer_to: "#{view.defer_key}-calls" } }...
+#modal-peek-pg-queries.modal{ tabindex: -1 }
+ .modal-dialog
+ #modal-peek-pg-queries-content.modal-content
+ .modal-header
+ %a.close{ href: "#", "data-dismiss" => "modal" } ×
+ %h4
+ SQL queries
+ .modal-body{ data: { defer_to: "#{view.defer_key}-queries" } }...