diff options
author | Rémy Coutable <remy@rymai.me> | 2017-06-09 10:31:38 +0200 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-06-09 17:21:39 +0200 |
commit | be0a949a004a34015977bdbcfe24e3173cd3aba9 (patch) | |
tree | 78ce2ae5ce94aaa06fc53f52b4f5d1ab17cb1c95 /app/views/peek | |
parent | ef4ccb7e2676bf0fc3bf17c795b4ab0e0edc0821 (diff) | |
download | gitlab-ce-be0a949a004a34015977bdbcfe24e3173cd3aba9.tar.gz |
DRYed peek-pg/mysql2 views and update peek-rblineprof monkey-patch file29010-perf-bar
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'app/views/peek')
-rw-r--r-- | app/views/peek/views/_mysql2.html.haml | 16 | ||||
-rw-r--r-- | app/views/peek/views/_pg.html.haml | 16 | ||||
-rw-r--r-- | app/views/peek/views/_sql.html.haml | 13 |
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" } }... |