Commit faf1e351 authored by Mike Greiling's avatar Mike Greiling

Merge branch '27835-refactor-layout-charts-panel' into 'master'

Remove layout classes from charts and add them to their wrappers

See merge request gitlab-org/gitlab!16497
parents 3d00b56e c9c81696
...@@ -100,7 +100,7 @@ export default { ...@@ -100,7 +100,7 @@ export default {
}; };
</script> </script>
<template> <template>
<div class="prometheus-graph col-12 col-lg-6"> <div class="prometheus-graph">
<div class="prometheus-graph-header"> <div class="prometheus-graph-header">
<h5 ref="graphTitle" class="prometheus-graph-title">{{ graphData.title }}</h5> <h5 ref="graphTitle" class="prometheus-graph-title">{{ graphData.title }}</h5>
<div ref="graphWidgets" class="prometheus-graph-widgets"><slot></slot></div> <div ref="graphWidgets" class="prometheus-graph-widgets"><slot></slot></div>
......
...@@ -27,7 +27,7 @@ export default { ...@@ -27,7 +27,7 @@ export default {
}; };
</script> </script>
<template> <template>
<div class="prometheus-graph col-12 col-lg-6 d-flex flex-column justify-content-center"> <div class="prometheus-graph d-flex flex-column justify-content-center">
<div class="prometheus-graph-header"> <div class="prometheus-graph-header">
<h5 ref="graphTitle" class="prometheus-graph-title">{{ graphTitle }}</h5> <h5 ref="graphTitle" class="prometheus-graph-title">{{ graphTitle }}</h5>
</div> </div>
......
...@@ -29,7 +29,7 @@ export default { ...@@ -29,7 +29,7 @@ export default {
}; };
</script> </script>
<template> <template>
<div class="prometheus-graph col-12 col-lg-6"> <div class="prometheus-graph">
<div class="prometheus-graph-header"> <div class="prometheus-graph-header">
<h5 ref="graphTitle" class="prometheus-graph-title">{{ graphTitle }}</h5> <h5 ref="graphTitle" class="prometheus-graph-title">{{ graphTitle }}</h5>
</div> </div>
......
...@@ -43,11 +43,6 @@ export default { ...@@ -43,11 +43,6 @@ export default {
required: false, required: false,
default: '', default: '',
}, },
showBorder: {
type: Boolean,
required: false,
default: false,
},
singleEmbed: { singleEmbed: {
type: Boolean, type: Boolean,
required: false, required: false,
...@@ -272,11 +267,7 @@ export default { ...@@ -272,11 +267,7 @@ export default {
</script> </script>
<template> <template>
<div <div class="prometheus-graph">
class="prometheus-graph col-12"
:class="[showBorder ? 'p-2' : 'p-0', { 'col-lg-6': !singleEmbed }]"
>
<div :class="{ 'prometheus-graph-embed w-100 p-3': showBorder }">
<div class="prometheus-graph-header"> <div class="prometheus-graph-header">
<h5 class="prometheus-graph-title js-graph-title">{{ graphData.title }}</h5> <h5 class="prometheus-graph-title js-graph-title">{{ graphData.title }}</h5>
<gl-button <gl-button
...@@ -338,5 +329,4 @@ export default { ...@@ -338,5 +329,4 @@ export default {
</template> </template>
</component> </component>
</div> </div>
</div>
</template> </template>
...@@ -456,6 +456,7 @@ export default { ...@@ -456,6 +456,7 @@ export default {
<panel-type <panel-type
v-for="(graphData, graphIndex) in groupData.metrics" v-for="(graphData, graphIndex) in groupData.metrics"
:key="`panel-type-${graphIndex}`" :key="`panel-type-${graphIndex}`"
class="col-12 col-lg-6 pb-3"
:clipboard-text="generateLink(groupData.group, graphData.title, graphData.y_label)" :clipboard-text="generateLink(groupData.group, graphData.title, graphData.y_label)"
:graph-data="graphData" :graph-data="graphData"
:dashboard-width="elWidth" :dashboard-width="elWidth"
...@@ -468,6 +469,7 @@ export default { ...@@ -468,6 +469,7 @@ export default {
<monitor-time-series-chart <monitor-time-series-chart
v-for="(graphData, graphIndex) in chartsWithData(groupData.metrics)" v-for="(graphData, graphIndex) in chartsWithData(groupData.metrics)"
:key="graphIndex" :key="graphIndex"
class="col-12 col-lg-6 pb-3"
:graph-data="graphData" :graph-data="graphData"
:deployment-data="deploymentData" :deployment-data="deploymentData"
:thresholds="getGraphAlertValues(graphData.queries)" :thresholds="getGraphAlertValues(graphData.queries)"
......
...@@ -95,6 +95,7 @@ export default { ...@@ -95,6 +95,7 @@ export default {
<monitor-time-series-chart <monitor-time-series-chart
v-for="graphData in charts" v-for="graphData in charts"
:key="graphData.title" :key="graphData.title"
class="w-100"
:graph-data="graphData" :graph-data="graphData"
:container-width="elWidth" :container-width="elWidth"
group-id="monitor-area-chart" group-id="monitor-area-chart"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment