diff options
author | Jose Ivan Vargas <jvargas@gitlab.com> | 2017-09-27 11:37:23 -0500 |
---|---|---|
committer | Jose Ivan Vargas <jvargas@gitlab.com> | 2017-09-27 11:37:23 -0500 |
commit | c14617709498eebef1755ee67c51f6e428ebbbce (patch) | |
tree | 102a553230c97648f393694dac0b548abfe7fc4f /app/assets/javascripts/monitoring | |
parent | 3b2d68d37d39047e25fbe0ae51cafa39f22805f8 (diff) | |
download | gitlab-ce-c14617709498eebef1755ee67c51f6e428ebbbce.tar.gz |
Fixed deployment flag having content hidden when being too far right
Diffstat (limited to 'app/assets/javascripts/monitoring')
-rw-r--r-- | app/assets/javascripts/monitoring/components/graph.vue | 1 | ||||
-rw-r--r-- | app/assets/javascripts/monitoring/components/graph/deployment.vue | 14 |
2 files changed, 14 insertions, 1 deletions
diff --git a/app/assets/javascripts/monitoring/components/graph.vue b/app/assets/javascripts/monitoring/components/graph.vue index 6b3e341f936..f292b56c5c1 100644 --- a/app/assets/javascripts/monitoring/components/graph.vue +++ b/app/assets/javascripts/monitoring/components/graph.vue @@ -247,6 +247,7 @@ <graph-deployment :show-deploy-info="showDeployInfo" :deployment-data="reducedDeploymentData" + :graph-width="graphWidth" :graph-height="graphHeight" :graph-height-offset="graphHeightOffset" /> diff --git a/app/assets/javascripts/monitoring/components/graph/deployment.vue b/app/assets/javascripts/monitoring/components/graph/deployment.vue index 3623d2ed946..e3b8be0c7fb 100644 --- a/app/assets/javascripts/monitoring/components/graph/deployment.vue +++ b/app/assets/javascripts/monitoring/components/graph/deployment.vue @@ -19,6 +19,10 @@ type: Number, required: true, }, + graphWidth: { + type: Number, + required: true, + }, }, computed: { @@ -47,6 +51,14 @@ transformDeploymentGroup(deployment) { return `translate(${Math.floor(deployment.xPos) + 1}, 20)`; }, + + positionFlag(deployment) { + let xPosition = 3; + if (deployment.xPos > (this.graphWidth - 200)) { + xPosition = -97; + } + return xPosition; + }, }, }; </script> @@ -77,7 +89,7 @@ <svg v-if="deployment.showDeploymentFlag" class="js-deploy-info-box" - x="3" + :x="positionFlag(deployment)" y="0" width="92" height="60"> |