Skip to content

Commit

Permalink
Add latest changes from gitlab-org/gitlab@master
Browse files Browse the repository at this point in the history
  • Loading branch information
GitLab Bot committed Aug 7, 2020
1 parent 61d62a2 commit 5edd0d1
Show file tree
Hide file tree
Showing 65 changed files with 978 additions and 25,644 deletions.
1 change: 0 additions & 1 deletion .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,6 @@ Performance/Count:
Exclude:
- 'app/helpers/groups_helper.rb'
- 'app/services/merge_requests/add_context_service.rb'
- 'ee/lib/gitlab/geo/fdw.rb'
- 'ee/lib/gitlab/graphql/aggregations/epics/epic_node.rb'
- 'ee/spec/controllers/projects/feature_flags_controller_spec.rb'
- 'ee/spec/requests/api/feature_flags_spec.rb'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,11 @@ export default {
/>
</span>
</div>
<gl-button v-gl-modal.authKeyModal class="mt-2" :disabled="isDisabled">{{
$options.RESET_KEY
}}</gl-button>
<span class="gl-display-flex gl-justify-content-end">
<gl-button v-gl-modal.authKeyModal class="gl-mt-2" :disabled="isDisabled">{{
$options.RESET_KEY
}}</gl-button>
</span>
<gl-modal
modal-id="authKeyModal"
:title="$options.RESET_KEY"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -512,9 +512,14 @@ export default {
/>
</template>
</gl-form-input-group>
<gl-button v-gl-modal.authKeyModal :disabled="!selectedService.active" class="gl-mt-3">{{
$options.i18n.resetKey
}}</gl-button>
<div class="gl-display-flex gl-justify-content-end">
<gl-button
v-gl-modal.authKeyModal
:disabled="!selectedService.active"
class="gl-mt-3"
>{{ $options.i18n.resetKey }}</gl-button
>
</div>
<gl-modal
modal-id="authKeyModal"
:title="$options.i18n.resetKey"
Expand All @@ -541,11 +546,16 @@ export default {
max-rows="10"
/>
</gl-form-group>
<gl-button :disabled="!canTestAlert" @click="validateTestAlert">{{
$options.i18n.testAlertInfo
}}</gl-button>
<div class="gl-display-flex gl-justify-content-end">
<gl-button :disabled="!canTestAlert" @click="validateTestAlert">{{
$options.i18n.testAlertInfo
}}</gl-button>
</div>
</template>
<div class="footer-block row-content-block gl-display-flex gl-justify-content-space-between">
<gl-button category="primary" :disabled="!canSaveConfig" @click="onReset">
{{ __('Cancel') }}
</gl-button>
<gl-button
variant="success"
category="primary"
Expand All @@ -554,9 +564,6 @@ export default {
>
{{ __('Save changes') }}
</gl-button>
<gl-button variant="default" category="primary" :disabled="!canSaveConfig" @click="onReset">
{{ __('Cancel') }}
</gl-button>
</div>
</gl-form>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script>
import { GlDeprecatedButton } from '@gitlab/ui';
import { GlButton } from '@gitlab/ui';
import { __, s__ } from '~/locale';
import csrf from '~/lib/utils/csrf';
import CustomMetricsFormFields from './custom_metrics_form_fields.vue';
Expand All @@ -10,7 +10,7 @@ export default {
components: {
CustomMetricsFormFields,
DeleteCustomMetricModal,
GlDeprecatedButton,
GlButton,
},
props: {
customMetricsPath: {
Expand Down Expand Up @@ -76,15 +76,10 @@ export default {
@formValidation="formValidation"
/>
<div class="form-actions">
<gl-deprecated-button variant="success" :disabled="!formIsValid" @click="submit">
<gl-button variant="success" category="primary" :disabled="!formIsValid" @click="submit">
{{ saveButtonText }}
</gl-deprecated-button>
<gl-deprecated-button
variant="secondary"
class="float-right"
:href="editProjectServicePath"
>{{ __('Cancel') }}</gl-deprecated-button
>
</gl-button>
<gl-button class="float-right" :href="editProjectServicePath">{{ __('Cancel') }}</gl-button>
<delete-custom-metric-modal
v-if="metricPersisted"
:delete-metric-url="customMetricsPath"
Expand Down
22 changes: 12 additions & 10 deletions app/assets/javascripts/error_tracking_settings/components/app.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<script>
import { mapActions, mapGetters, mapState } from 'vuex';
import { GlDeprecatedButton } from '@gitlab/ui';
import { GlDeprecatedButton as GlButton } from '@gitlab/ui';
import ProjectDropdown from './project_dropdown.vue';
import ErrorTrackingForm from './error_tracking_form.vue';
export default {
components: { ProjectDropdown, ErrorTrackingForm, GlDeprecatedButton },
components: { ProjectDropdown, ErrorTrackingForm, GlButton },
props: {
initialApiHost: {
type: String,
Expand Down Expand Up @@ -92,13 +92,15 @@ export default {
@select-project="updateSelectedProject"
/>
</div>
<gl-deprecated-button
:disabled="settingsLoading"
class="js-error-tracking-button"
variant="success"
@click="handleSubmit"
>
{{ __('Save changes') }}
</gl-deprecated-button>
<div class="gl-display-flex gl-justify-content-end">
<gl-button
:disabled="settingsLoading"
class="js-error-tracking-button"
variant="success"
@click="handleSubmit"
>
{{ __('Save changes') }}
</gl-button>
</div>
</div>
</template>
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,11 @@ export default {
</a>
</p>
</gl-form-group>
<gl-button variant="success" category="primary" @click="updateGrafanaIntegration">
{{ __('Save Changes') }}
</gl-button>
<div class="gl-display-flex gl-justify-content-end">
<gl-button variant="success" category="primary" @click="updateGrafanaIntegration">
{{ __('Save Changes') }}
</gl-button>
</div>
</form>
</div>
</section>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,17 +123,18 @@ export default {
<span>{{ $options.i18n.sendEmail.label }}</span>
</gl-form-checkbox>
</gl-form-group>

<gl-button
ref="submitBtn"
data-qa-selector="save_changes_button"
:disabled="loading"
variant="success"
type="submit"
class="js-no-auto-disable"
>
{{ $options.i18n.saveBtnLabel }}
</gl-button>
<div class="gl-display-flex gl-justify-content-end">
<gl-button
ref="submitBtn"
data-qa-selector="save_changes_button"
:disabled="loading"
variant="success"
type="submit"
class="js-no-auto-disable"
>
{{ $options.i18n.saveBtnLabel }}
</gl-button>
</div>
</form>
</div>
</template>
Original file line number Diff line number Diff line change
Expand Up @@ -149,15 +149,17 @@ export default {
</template>
</gl-sprintf>
</div>
<gl-button
v-gl-modal.resetWebhookModal
class="gl-mt-3"
:disabled="loading"
:loading="resettingWebhook"
data-testid="webhook-reset-btn"
>
{{ $options.i18n.webhookUrl.resetWebhookUrl }}
</gl-button>
<div class="gl-display-flex gl-justify-content-end">
<gl-button
v-gl-modal.resetWebhookModal
class="gl-mt-3"
:disabled="loading"
:loading="resettingWebhook"
data-testid="webhook-reset-btn"
>
{{ $options.i18n.webhookUrl.resetWebhookUrl }}
</gl-button>
</div>
<gl-modal
modal-id="resetWebhookModal"
:title="$options.i18n.webhookUrl.resetWebhookUrl"
Expand All @@ -168,16 +170,17 @@ export default {
{{ $options.i18n.webhookUrl.restKeyInfo }}
</gl-modal>
</gl-form-group>

<gl-button
ref="submitBtn"
:disabled="isSaveDisabled"
variant="success"
type="submit"
class="js-no-auto-disable"
>
{{ $options.i18n.saveBtnLabel }}
</gl-button>
<div class="gl-display-flex gl-justify-content-end">
<gl-button
ref="submitBtn"
:disabled="isSaveDisabled"
variant="success"
type="submit"
class="js-no-auto-disable"
>
{{ $options.i18n.saveBtnLabel }}
</gl-button>
</div>
</form>
</div>
</template>
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export default {
</script>
<template>
<div>
<div class="gl-display-flex gl-mx-n3">
<div class="gl-xs-flex-direction-column gl-display-flex gl-mx-n3">
<gl-card class="gl-flex-grow-1 gl-flex-basis-0 gl-mx-3">
<template #header>
<h2 class="gl-font-size-h2 gl-my-3">{{ s__('Metrics|1. Define and preview panel') }}</h2>
Expand All @@ -76,6 +76,7 @@ export default {
variant="success"
category="secondary"
:data-clipboard-text="yml"
class="gl-xs-w-full gl-xs-mb-3"
@click="$toast.show(s__('Metrics|Panel YAML copied'))"
>
{{ s__('Metrics|Copy YAML') }}
Expand All @@ -84,7 +85,7 @@ export default {
type="submit"
variant="success"
:disabled="panelPreviewIsLoading"
class="js-no-auto-disable"
class="js-no-auto-disable gl-xs-w-full"
>
{{ s__('Metrics|Preview panel') }}
</gl-button>
Expand Down Expand Up @@ -127,13 +128,19 @@ export default {
<gl-button
ref="viewDocumentationBtn"
category="secondary"
class="gl-xs-w-full gl-xs-mb-3"
variant="info"
target="_blank"
:href="addDashboardDocumentationPath"
>
{{ s__('Metrics|View documentation') }}
</gl-button>
<gl-button ref="openRepositoryBtn" variant="success" :href="projectPath">
<gl-button
ref="openRepositoryBtn"
variant="success"
:href="projectPath"
class="gl-xs-w-full"
>
{{ s__('Metrics|Open repository') }}
</gl-button>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<script>
import { mapState, mapActions } from 'vuex';
import { GlDeprecatedButton, GlLink } from '@gitlab/ui';
import { GlDeprecatedButton as GlButton, GlLink } from '@gitlab/ui';
import ExternalDashboard from './form_group/external_dashboard.vue';
import DashboardTimezone from './form_group/dashboard_timezone.vue';
export default {
components: {
GlDeprecatedButton,
GlButton,
GlLink,
ExternalDashboard,
DashboardTimezone,
Expand Down Expand Up @@ -34,7 +34,7 @@ export default {
<h3 class="js-section-header h4">
{{ s__('MetricsSettings|Metrics dashboard') }}
</h3>
<gl-deprecated-button class="js-settings-toggle">{{ __('Expand') }}</gl-deprecated-button>
<gl-button class="js-settings-toggle">{{ __('Expand') }}</gl-button>
<p class="js-section-sub-header">
{{ s__('MetricsSettings|Manage Metrics Dashboard settings.') }}
<gl-link :href="helpPage">{{ __('Learn more') }}</gl-link>
Expand All @@ -44,9 +44,11 @@ export default {
<form>
<dashboard-timezone />
<external-dashboard />
<gl-deprecated-button variant="success" @click="saveChanges">
{{ __('Save Changes') }}
</gl-deprecated-button>
<div class="gl-display-flex gl-justify-content-end">
<gl-button variant="success" @click="saveChanges">
{{ __('Save Changes') }}
</gl-button>
</div>
</form>
</div>
</section>
Expand Down
2 changes: 2 additions & 0 deletions app/controllers/concerns/wiki_actions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ def show
@ref = params[:version_id]
@path = page.path

Gitlab::UsageDataCounters::WikiPageCounter.count(:view)

render 'shared/wikis/show'
elsif file_blob
send_blob(wiki.repository, file_blob)
Expand Down
14 changes: 5 additions & 9 deletions app/controllers/projects/pipelines/tests_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,23 +35,19 @@ def validate_feature_flag!

# rubocop: disable CodeReuse/ActiveRecord
def builds
pipeline.latest_builds.where(id: build_params)
@builds ||= pipeline.latest_builds.for_ids(build_ids).presence || render_404
end

def build_params
def build_ids
return [] unless params[:build_ids]

params[:build_ids].split(",")
end

def test_suite
if builds.present?
builds.map do |build|
build.collect_test_reports!(Gitlab::Ci::Reports::TestReports.new)
end.sum
else
render_404
end
builds.map do |build|
build.collect_test_reports!(Gitlab::Ci::Reports::TestReports.new)
end.sum
end
# rubocop: enable CodeReuse/ActiveRecord
end
Expand Down
2 changes: 1 addition & 1 deletion app/models/ci/pipeline_artifact.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

# This class is being used to persist generated report consumable by gitlab frontend in a pipeline context.
# This class is being used to persist additional artifacts after a pipeline completes, which is a great place to cache a computed result in object storage

module Ci
class PipelineArtifact < ApplicationRecord
Expand Down
Loading

0 comments on commit 5edd0d1

Please sign in to comment.