Read about our upcoming Code of Conduct on this issue

Commit a81c4f8d authored by GitLab Bot's avatar GitLab Bot
Browse files

Add latest changes from gitlab-org/gitlab@master

parent 0145f11e86e3
......@@ -394,6 +394,7 @@ export default {
>
<dashboards-dropdown
id="monitor-dashboards-dropdown"
data-qa-selector="dashboards_filter_dropdown"
class="mb-0 d-flex"
toggle-class="dropdown-menu-toggle"
:default-branch="defaultBranch"
......@@ -458,6 +459,7 @@ export default {
label-size="sm"
label-for="monitor-time-window-dropdown"
class="col-sm-auto col-md-auto col-lg-auto"
data-qa-selector="show_last_dropdown"
>
<date-time-picker
ref="dateTimePicker"
......@@ -533,6 +535,7 @@ export default {
v-if="selectedDashboard.can_edit"
class="mt-1 js-edit-link"
:href="selectedDashboard.project_blob_path"
data-qa-selector="edit_dashboard_button"
>{{ __('Edit dashboard') }}</gl-button
>
......
......@@ -92,8 +92,7 @@ export default {
<p class="text-muted">
{{
s__(`Metrics|You can save a copy of this dashboard to your repository
so it can be customized. Select a file name and branch to
save it.`)
so it can be customized. Select a file name and branch to save it.`)
}}
</p>
<gl-form-group
......@@ -104,7 +103,13 @@ export default {
label-size="sm"
label-for="fileName"
>
<gl-form-input id="fileName" ref="fileName" v-model="form.fileName" :required="true" />
<gl-form-input
id="fileName"
ref="fileName"
v-model="form.fileName"
data-qa-selector="duplicate_dashboard_filename_field"
:required="true"
/>
</gl-form-group>
<gl-form-group :label="__('Branch')" label-size="sm" label-for="branch">
<gl-form-radio-group
......
import IntegrationSettingsForm from '~/integrations/integration_settings_form';
import PrometheusMetrics from '~/prometheus_metrics/prometheus_metrics';
import PrometheusAlerts from '~/prometheus_alerts';
import initAlertsSettings from '~/alerts_service_settings';
document.addEventListener('DOMContentLoaded', () => {
......@@ -12,5 +13,6 @@ document.addEventListener('DOMContentLoaded', () => {
prometheusMetrics.loadActiveMetrics();
}
PrometheusAlerts();
initAlertsSettings(document.querySelector('.js-alerts-service-settings'));
});
<script>
import { GlButton, GlFormGroup, GlFormInput, GlModal, GlModalDirective } from '@gitlab/ui';
import ClipboardButton from '~/vue_shared/components/clipboard_button.vue';
import axios from '~/lib/utils/axios_utils';
import { __, sprintf } from '~/locale';
import createFlash from '~/flash';
export default {
copyToClipboard: __('Copy'),
components: {
GlButton,
GlFormGroup,
GlFormInput,
GlModal,
ClipboardButton,
},
directives: {
'gl-modal': GlModalDirective,
},
props: {
initialAuthorizationKey: {
type: String,
required: false,
default: '',
},
changeKeyUrl: {
type: String,
required: true,
},
notifyUrl: {
type: String,
required: true,
},
learnMoreUrl: {
type: String,
required: true,
},
},
data() {
return {
authorizationKey: this.initialAuthorizationKey,
sectionDescription: sprintf(
__(
'To receive alerts from manually configured Prometheus services, add the following URL and Authorization key to your Prometheus webhook config file. Learn more about %{linkStart}configuring Prometheus%{linkEnd} to send alerts to GitLab.',
),
{
linkStart: `<a href="${this.learnMoreUrl}" target="_blank" rel="noopener noreferrer">`,
linkEnd: '</a>',
},
false,
),
};
},
methods: {
resetKey() {
axios
.post(this.changeKeyUrl)
.then(res => {
this.authorizationKey = res.data.token;
})
.catch(() => {
createFlash(__('Failed to reset key. Please try again.'));
});
},
},
};
</script>
<template>
<div class="row py-4 border-top js-prometheus-alerts">
<div class="col-lg-3">
<h4 class="mt-0">
{{ __('Alerts') }}
</h4>
<p>
{{ __('Receive alerts from manually configured Prometheus servers.') }}
</p>
</div>
<div class="col-lg-9">
<p v-html="sectionDescription"></p>
<gl-form-group :label="__('URL')" label-for="notify-url" label-class="label-bold">
<div class="input-group">
<gl-form-input id="notify-url" :readonly="true" :value="notifyUrl" />
<span class="input-group-append">
<clipboard-button :text="notifyUrl" :title="$options.copyToClipboard" />
</span>
</div>
</gl-form-group>
<gl-form-group
:label="__('Authorization key')"
label-for="authorization-key"
label-class="label-bold"
>
<div class="input-group">
<gl-form-input id="authorization-key" :readonly="true" :value="authorizationKey" />
<span class="input-group-append">
<clipboard-button :text="authorizationKey" :title="$options.copyToClipboard" />
</span>
</div>
</gl-form-group>
<template v-if="authorizationKey.length > 0">
<gl-modal
modal-id="authKeyModal"
:title="__('Reset authorization key?')"
:ok-title="__('Reset authorization key')"
ok-variant="danger"
@ok="resetKey"
>
{{
__(
'Resetting the authorization key will invalidate the previous key. Existing alert configurations will need to be updated with the new key.',
)
}}
</gl-modal>
<gl-button v-gl-modal.authKeyModal class="js-reset-auth-key">{{
__('Reset key')
}}</gl-button>
</template>
<gl-button v-else class="js-reset-auth-key" @click="resetKey">{{
__('Generate key')
}}</gl-button>
</div>
</div>
</template>
import Vue from 'vue';
import ResetKey from './components/reset_key.vue';
export default () => {
const el = document.querySelector('#js-settings-prometheus-alerts');
if (!el) {
return;
}
const { authorizationKey, changeKeyUrl, notifyUrl, learnMoreUrl } = el.dataset;
// eslint-disable-next-line no-new
new Vue({
el,
render(createElement) {
return createElement(ResetKey, {
props: {
initialAuthorizationKey: authorizationKey,
changeKeyUrl,
notifyUrl,
learnMoreUrl,
},
});
},
});
};
......@@ -1583,13 +1583,6 @@ def sync_attribute?(attribute)
end
def read_only_attribute?(attribute)
if Feature.enabled?(:ldap_readonly_attributes, default_enabled: true)
enabled = Gitlab::Auth::Ldap::Config.enabled?
read_only = attribute.to_sym.in?(UserSyncedAttributesMetadata::SYNCABLE_ATTRIBUTES)
return true if enabled && read_only
end
user_synced_attributes_metadata&.read_only?(attribute)
end
......
......@@ -60,11 +60,7 @@ def notify_success(user_exists)
end
def discard_read_only_attributes
if Feature.enabled?(:ldap_readonly_attributes, default_enabled: true)
params.reject! { |key, _| @user.read_only_attribute?(key.to_sym) }
else
discard_synced_attributes
end
discard_synced_attributes
end
def discard_synced_attributes
......
......@@ -162,4 +162,6 @@
= render_if_exists "groups/ee/settings_nav"
= render_if_exists "groups/ee/administration_nav"
= render 'shared/sidebar_toggle_button'
- return unless can?(current_user, :read_prometheus_alerts, @project)
- return unless @service.manual_configuration?
- notify_url = notify_project_prometheus_alerts_url(@project, format: :json)
- authorization_key = @project.alerting_setting.try(:token)
- learn_more_url = help_page_path('user/project/integrations/prometheus', anchor: 'external-prometheus-instances')
#js-settings-prometheus-alerts{ data: { notify_url: notify_url, authorization_key: authorization_key, change_key_url: reset_alerting_token_project_settings_operations_path(@project), learn_more_url: learn_more_url } }
......@@ -6,4 +6,4 @@
.row.append-bottom-default.prometheus-metrics-monitoring.js-prometheus-metrics-monitoring
= render 'projects/services/prometheus/metrics', project: @project
= render_if_exists 'projects/services/prometheus/external_alerts', project: @project
= render 'projects/services/prometheus/external_alerts', project: @project
---
title: Revert LDAP readonly attributes feature
merge_request: 28541
author:
type: removed
---
title: Move Alerting feature to Core
merge_request: 28196
author:
type: changed
# frozen_string_literal: true
class RemoveHealthStatusFromEpics < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
def up
with_lock_retries do
remove_column :epics, :health_status
end
end
def down
with_lock_retries do
add_column :epics, :health_status, :integer, limit: 2
end
end
end
......@@ -2271,7 +2271,6 @@ CREATE TABLE public.epics (
state_id smallint DEFAULT 1 NOT NULL,
start_date_sourcing_epic_id integer,
due_date_sourcing_epic_id integer,
health_status smallint,
external_key character varying(255)
);
......@@ -12819,6 +12818,7 @@ COPY "schema_migrations" (version) FROM STDIN;
20200226100614
20200226100624
20200226100634
20200226124757
20200226162156
20200226162239
20200226162634
......
......@@ -38,6 +38,24 @@ SCIM mapping:
![Azure AD SCIM](img/AzureAD-scim_attribute_mapping.png)
## Okta
Basic SAML app configuration:
![Okta basic SAML](img/Okta-SAMLsetup.png)
User claims and attributes:
![Okta Attributes](img/Okta-attributes.png)
Advanced SAML app settings (defaults):
![Okta Advanced Settings](img/Okta-advancedsettings.png)
IdP Links and Certificate:
![Okta Links and Certificate](img/Okta-linkscert.png)
## OneLogin
Application details:
......
......@@ -173,7 +173,7 @@ To see the status of your GitLab.com subscription, log into GitLab.com and go to
1. Go to **User Avatar > Settings**.
1. Click **Billing**.
- For groups:
1. From the group page (*not* from a project within the group), go to **Settings > Billing**.
1. From the group page (*not* from a project within the group), go to **Administration > Billing**.
The following table describes details of your subscription for groups:
......@@ -427,7 +427,7 @@ CI pipeline minutes are the execution time for your [pipelines](../ci/pipelines/
Quotas apply to:
- Groups, where the minutes are shared across all members of the group, its subgroups, and nested projects. To view the group's usage, navigate to the group, then **{settings}** **Settings > Usage Quotas**.
- Groups, where the minutes are shared across all members of the group, its subgroups, and nested projects. To view the group's usage, navigate to the group, then **{settings}** **Administration > Usage Quotas**.
- Your personal account, where the minutes are available for your personal projects. To view and buy personal minutes, click your avatar, then **{settings}** **Settings > Pipeline quota**.
Only pipeline minutes for GitLab shared runners are restricted. If you have a specific runner set up for your projects, there is no limit to your build time on GitLab.com.
......@@ -448,10 +448,10 @@ main quota. Additional minutes:
To purchase additional minutes for your group on GitLab.com:
1. From your group, go to **{settings}** **Settings > Usage Quotas**.
1. From your group, go to **{settings}** **Administration > Usage Quotas**.
1. Locate the subscription card that's linked to your group on GitLab.com, click **Buy more CI minutes**, and complete the details about the transaction.
1. Once we have processed your payment, the extra CI minutes will be synced to your group.
1. To confirm the available CI minutes, go to your group, then **{settings}** **Settings > Usage Quotas**.
1. To confirm the available CI minutes, go to your group, then **{settings}** **Administration > Usage Quotas**.
The **Additional minutes** displayed now includes the purchased additional CI minutes, plus any minutes rolled over from last month.
To purchase additional minutes for your personal namespace:
......
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