...@@ -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,71 +267,66 @@ export default { ...@@ -272,71 +267,66 @@ export default {
</script> </script>
<template> <template>
<div <div class="prometheus-graph">
class="prometheus-graph col-12" <div class="prometheus-graph-header">
:class="[showBorder ? 'p-2' : 'p-0', { 'col-lg-6': !singleEmbed }]" <h5 class="prometheus-graph-title js-graph-title">{{ graphData.title }}</h5>
> <gl-button
<div :class="{ 'prometheus-graph-embed w-100 p-3': showBorder }"> v-if="exportMetricsToCsvEnabled"
<div class="prometheus-graph-header"> :href="downloadLink"
<h5 class="prometheus-graph-title js-graph-title">{{ graphData.title }}</h5> :title="__('Download CSV')"
<gl-button :aria-label="__('Download CSV')"
v-if="exportMetricsToCsvEnabled" style="margin-left: 200px;"
:href="downloadLink" download="chart_metrics.csv"
:title="__('Download CSV')" >
:aria-label="__('Download CSV')" {{ __('Download CSV') }}
style="margin-left: 200px;" </gl-button>
download="chart_metrics.csv" <div class="prometheus-graph-widgets js-graph-widgets">
> <slot></slot>
{{ __('Download CSV') }}
</gl-button>
<div class="prometheus-graph-widgets js-graph-widgets">
<slot></slot>
</div>
</div> </div>
</div>
<component <component
:is="glChartComponent" :is="glChartComponent"
ref="chart" ref="chart"
v-bind="$attrs" v-bind="$attrs"
:data="chartData" :data="chartData"
:option="chartOptions" :option="chartOptions"
:format-tooltip-text="formatTooltipText" :format-tooltip-text="formatTooltipText"
:thresholds="thresholds" :thresholds="thresholds"
:width="width" :width="width"
:height="height" :height="height"
@updated="onChartUpdated" @updated="onChartUpdated"
> >
<template v-if="tooltip.isDeployment"> <template v-if="tooltip.isDeployment">
<template slot="tooltipTitle"> <template slot="tooltipTitle">
{{ __('Deployed') }} {{ __('Deployed') }}
</template> </template>
<div slot="tooltipContent" class="d-flex align-items-center"> <div slot="tooltipContent" class="d-flex align-items-center">
<icon name="commit" class="mr-2" /> <icon name="commit" class="mr-2" />
<gl-link :href="tooltip.commitUrl">{{ tooltip.sha }}</gl-link> <gl-link :href="tooltip.commitUrl">{{ tooltip.sha }}</gl-link>
</div>
</template>
<template v-else>
<template slot="tooltipTitle">
<div class="text-nowrap">
{{ tooltip.title }}
</div> </div>
</template> </template>
<template v-else> <template slot="tooltipContent">
<template slot="tooltipTitle"> <div
<div class="text-nowrap"> v-for="(content, key) in tooltip.content"
{{ tooltip.title }} :key="key"
class="d-flex justify-content-between"
>
<gl-chart-series-label :color="isMultiSeries ? content.color : ''">
{{ content.name }}
</gl-chart-series-label>
<div class="prepend-left-32">
{{ content.value }}
</div> </div>
</template> </div>
<template slot="tooltipContent">
<div
v-for="(content, key) in tooltip.content"
:key="key"
class="d-flex justify-content-between"
>
<gl-chart-series-label :color="isMultiSeries ? content.color : ''">
{{ content.name }}
</gl-chart-series-label>
<div class="prepend-left-32">
{{ content.value }}
</div>
</div>
</template>
</template> </template>
</component> </template>
</div> </component>
</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"
... ...
......
File moved
import Vue from 'vue';
import _ from 'underscore';
import axios from '../../lib/utils/axios_utils'; import axios from '../../lib/utils/axios_utils';
import { parseBoolean } from '~/lib/utils/common_utils'; import { parseBoolean } from '~/lib/utils/common_utils';
let vueResourceInterceptor;
export default class PerformanceBarService { export default class PerformanceBarService {
static fetchRequestDetails(peekUrl, requestId) { static fetchRequestDetails(peekUrl, requestId) {
return axios.get(peekUrl, { params: { request_id: requestId } }); return axios.get(peekUrl, { params: { request_id: requestId } });
...@@ -24,16 +20,11 @@ export default class PerformanceBarService { ...@@ -24,16 +20,11 @@ export default class PerformanceBarService {
return response; return response;
}; };
vueResourceInterceptor = (request, next) => next(interceptor);
Vue.http.interceptors.push(vueResourceInterceptor);
return axios.interceptors.response.use(interceptor); return axios.interceptors.response.use(interceptor);
} }
static removeInterceptor(interceptor) { static removeInterceptor(interceptor) {
axios.interceptors.response.eject(interceptor); axios.interceptors.response.eject(interceptor);
Vue.http.interceptors = _.without(Vue.http.interceptors, vueResourceInterceptor);
} }
static callbackParams(response, peekUrl) { static callbackParams(response, peekUrl) {
... ...
......
...@@ -29,10 +29,6 @@ ...@@ -29,10 +29,6 @@
.author-link { .author-link {
display: inline-block; display: inline-block;
} }
.issuable-comments {
height: 18px;
}
} }
.icon-merge-request-unmerged { .icon-merge-request-unmerged {
... ...
......
...@@ -461,10 +461,6 @@ ...@@ -461,10 +461,6 @@
.author-link { .author-link {
display: inline-block; display: inline-block;
} }
.issuable-comments {
height: 18px;
}
} }
.merge-request-title { .merge-request-title {
... ...
......
...@@ -6,15 +6,16 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController ...@@ -6,15 +6,16 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController
before_action :set_application_setting before_action :set_application_setting
before_action :whitelist_query_limiting, only: [:usage_data] before_action :whitelist_query_limiting, only: [:usage_data]
VALID_SETTING_PANELS = %w(show integrations repository templates VALID_SETTING_PANELS = %w(general integrations repository templates
ci_cd reporting metrics_and_profiling ci_cd reporting metrics_and_profiling
network geo preferences).freeze network geo preferences).freeze
def show VALID_SETTING_PANELS.each do |action|
define_method(action) { perform_update if submitted? }
end end
(VALID_SETTING_PANELS - %w(show)).each do |action| def show
define_method(action) { perform_update if submitted? } render :general
end end
def update def update
...@@ -144,7 +145,7 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController ...@@ -144,7 +145,7 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController
end end
def render_update_error def render_update_error
action = VALID_SETTING_PANELS.include?(action_name) ? action_name : :show action = VALID_SETTING_PANELS.include?(action_name) ? action_name : :general
render action render action
end end
... ...
......
= form_for @application_setting, url: admin_application_settings_path(anchor: 'js-account-settings'), html: { class: 'fieldset-form' } do |f| = form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-account-settings'), html: { class: 'fieldset-form' } do |f|
= form_errors(@application_setting) = form_errors(@application_setting)
%fieldset %fieldset
... ...
......
= form_for @application_setting, url: admin_application_settings_path(anchor: 'js-merge-request-settings'), html: { class: 'fieldset-form' } do |f| = form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-merge-request-settings'), html: { class: 'fieldset-form' } do |f|
= form_errors(@application_setting) = form_errors(@application_setting)
%fieldset %fieldset
... ...
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
= _('External Classification Policy Authorization') = _('External Classification Policy Authorization')
.settings-content .settings-content
= form_for @application_setting, url: admin_application_settings_path(anchor: 'js-external-auth-settings'), html: { class: 'fieldset-form' } do |f| = form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-external-auth-settings'), html: { class: 'fieldset-form' } do |f|
= form_errors(@application_setting) = form_errors(@application_setting)
%fieldset %fieldset
... ...
......
= form_for @application_setting, url: admin_application_settings_path(anchor: 'js-signin-settings'), html: { class: 'fieldset-form' } do |f| = form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-signin-settings'), html: { class: 'fieldset-form' } do |f|
= form_errors(@application_setting) = form_errors(@application_setting)
%fieldset %fieldset
... ...
......
= form_for @application_setting, url: admin_application_settings_path(anchor: 'js-signup-settings'), html: { class: 'fieldset-form' } do |f| = form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-signup-settings'), html: { class: 'fieldset-form' } do |f|
= form_errors(@application_setting) = form_errors(@application_setting)
%fieldset %fieldset
... ...
......
= form_for @application_setting, url: admin_application_settings_path(anchor: 'js-terminal-settings'), html: { class: 'fieldset-form' } do |f| = form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-terminal-settings'), html: { class: 'fieldset-form' } do |f|
= form_errors(@application_setting) = form_errors(@application_setting)
%fieldset %fieldset
... ...
......
= form_for @application_setting, url: admin_application_settings_path(anchor: 'js-terms-settings'), html: { class: 'fieldset-form' } do |f| = form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-terms-settings'), html: { class: 'fieldset-form' } do |f|
= form_errors(@application_setting) = form_errors(@application_setting)
%fieldset %fieldset
... ...
......
= form_for @application_setting, url: admin_application_settings_path(anchor: 'js-visibility-settings'), html: { class: 'fieldset-form' } do |f| = form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-visibility-settings'), html: { class: 'fieldset-form' } do |f|
= form_errors(@application_setting) = form_errors(@application_setting)
%fieldset %fieldset
... ...
......
- breadcrumb_title _("Settings") - breadcrumb_title _("General")
- page_title _("Settings") - page_title _("General")
- @content_class = "limit-container-width" unless fluid_layout - @content_class = "limit-container-width" unless fluid_layout
%section.settings.as-visibility-access.no-animate#js-visibility-settings{ class: ('expanded' if expanded_by_default?) } %section.settings.as-visibility-access.no-animate#js-visibility-settings{ class: ('expanded' if expanded_by_default?) }
...@@ -90,7 +90,7 @@ ...@@ -90,7 +90,7 @@
%p %p
= _('Manage Web IDE features') = _('Manage Web IDE features')
.settings-content .settings-content
= form_for @application_setting, url: admin_application_settings_path(anchor: "#js-web-ide-settings"), html: { class: 'fieldset-form' } do |f| = form_for @application_setting, url: general_admin_application_settings_path(anchor: "#js-web-ide-settings"), html: { class: 'fieldset-form' } do |f|
= form_errors(@application_setting) = form_errors(@application_setting)
%fieldset %fieldset
... ...
......