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:
authorMike Greiling <mike@pixelcog.com>2018-03-28 21:30:58 +0300
committerMike Greiling <mike@pixelcog.com>2018-06-01 21:04:41 +0300
commit70330f2382a305ce253019390eaa92b8ade06f69 (patch)
treeadbff21277c5343edfa52a433003c3b9237d65b2
parentc640e579249f914b7755378ba74cf1834c396d71 (diff)
add slot for monitoring graph widgets within prometheus graphs
-rw-r--r--app/assets/javascripts/monitoring/components/graph.vue11
-rw-r--r--app/assets/stylesheets/pages/environments.scss13
2 files changed, 20 insertions, 4 deletions
diff --git a/app/assets/javascripts/monitoring/components/graph.vue b/app/assets/javascripts/monitoring/components/graph.vue
index de6755e0414..503ee1ce3d1 100644
--- a/app/assets/javascripts/monitoring/components/graph.vue
+++ b/app/assets/javascripts/monitoring/components/graph.vue
@@ -232,9 +232,14 @@ export default {
@mouseover="showFlagContent = true"
@mouseleave="showFlagContent = false"
>
- <h5 class="text-center graph-title">
- {{ graphData.title }}
- </h5>
+ <div class="prometheus-graph-header">
+ <h5 class="prometheus-graph-title">
+ {{ graphData.title }}
+ </h5>
+ <div class="prometheus-graph-widgets">
+ <slot></slot>
+ </div>
+ </div>
<div
class="prometheus-svg-container"
:style="paddingBottomRootSvg"
diff --git a/app/assets/stylesheets/pages/environments.scss b/app/assets/stylesheets/pages/environments.scss
index cd0d67613c3..f2836d14999 100644
--- a/app/assets/stylesheets/pages/environments.scss
+++ b/app/assets/stylesheets/pages/environments.scss
@@ -23,7 +23,6 @@
}
.btn-group {
-
> a {
color: $gl-text-color-secondary;
}
@@ -245,6 +244,7 @@
.prometheus-graph {
flex: 1 0 auto;
min-width: 450px;
+ max-width: 100%;
padding: $gl-padding / 2;
h5 {
@@ -256,6 +256,17 @@
}
}
+.prometheus-graph-header {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ margin-bottom: 8px;
+
+ h5 {
+ margin: 0;
+ }
+}
+
.prometheus-graph-cursor {
position: absolute;
background: $theme-gray-600;