Commit b43c1794 authored by Serena Fang's avatar Serena Fang Committed by Kushal Pandya

Move buttons in Settings > Operations to right

Follow pajamas guidelines, move buttons to right
Git rebasing with master
parent 3f6b3993
...@@ -180,9 +180,11 @@ export default { ...@@ -180,9 +180,11 @@ export default {
/> />
</span> </span>
</div> </div>
<gl-button v-gl-modal.authKeyModal class="mt-2" :disabled="isDisabled">{{ <span class="gl-display-flex gl-justify-content-end">
$options.RESET_KEY <gl-button v-gl-modal.authKeyModal class="gl-mt-2" :disabled="isDisabled">{{
}}</gl-button> $options.RESET_KEY
}}</gl-button>
</span>
<gl-modal <gl-modal
modal-id="authKeyModal" modal-id="authKeyModal"
:title="$options.RESET_KEY" :title="$options.RESET_KEY"
......
...@@ -512,9 +512,14 @@ export default { ...@@ -512,9 +512,14 @@ export default {
/> />
</template> </template>
</gl-form-input-group> </gl-form-input-group>
<gl-button v-gl-modal.authKeyModal :disabled="!selectedService.active" class="gl-mt-3">{{ <div class="gl-display-flex gl-justify-content-end">
$options.i18n.resetKey <gl-button
}}</gl-button> v-gl-modal.authKeyModal
:disabled="!selectedService.active"
class="gl-mt-3"
>{{ $options.i18n.resetKey }}</gl-button
>
</div>
<gl-modal <gl-modal
modal-id="authKeyModal" modal-id="authKeyModal"
:title="$options.i18n.resetKey" :title="$options.i18n.resetKey"
...@@ -541,11 +546,16 @@ export default { ...@@ -541,11 +546,16 @@ export default {
max-rows="10" max-rows="10"
/> />
</gl-form-group> </gl-form-group>
<gl-button :disabled="!canTestAlert" @click="validateTestAlert">{{ <div class="gl-display-flex gl-justify-content-end">
$options.i18n.testAlertInfo <gl-button :disabled="!canTestAlert" @click="validateTestAlert">{{
}}</gl-button> $options.i18n.testAlertInfo
}}</gl-button>
</div>
</template> </template>
<div class="footer-block row-content-block gl-display-flex gl-justify-content-space-between"> <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 <gl-button
variant="success" variant="success"
category="primary" category="primary"
...@@ -554,9 +564,6 @@ export default { ...@@ -554,9 +564,6 @@ export default {
> >
{{ __('Save changes') }} {{ __('Save changes') }}
</gl-button> </gl-button>
<gl-button variant="default" category="primary" :disabled="!canSaveConfig" @click="onReset">
{{ __('Cancel') }}
</gl-button>
</div> </div>
</gl-form> </gl-form>
</div> </div>
......
<script> <script>
import { mapActions, mapGetters, mapState } from 'vuex'; 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 ProjectDropdown from './project_dropdown.vue';
import ErrorTrackingForm from './error_tracking_form.vue'; import ErrorTrackingForm from './error_tracking_form.vue';
export default { export default {
components: { ProjectDropdown, ErrorTrackingForm, GlDeprecatedButton }, components: { ProjectDropdown, ErrorTrackingForm, GlButton },
props: { props: {
initialApiHost: { initialApiHost: {
type: String, type: String,
...@@ -92,13 +92,15 @@ export default { ...@@ -92,13 +92,15 @@ export default {
@select-project="updateSelectedProject" @select-project="updateSelectedProject"
/> />
</div> </div>
<gl-deprecated-button <div class="gl-display-flex gl-justify-content-end">
:disabled="settingsLoading" <gl-button
class="js-error-tracking-button" :disabled="settingsLoading"
variant="success" class="js-error-tracking-button"
@click="handleSubmit" variant="success"
> @click="handleSubmit"
{{ __('Save changes') }} >
</gl-deprecated-button> {{ __('Save changes') }}
</gl-button>
</div>
</div> </div>
</template> </template>
...@@ -93,9 +93,11 @@ export default { ...@@ -93,9 +93,11 @@ export default {
</a> </a>
</p> </p>
</gl-form-group> </gl-form-group>
<gl-button variant="success" category="primary" @click="updateGrafanaIntegration"> <div class="gl-display-flex gl-justify-content-end">
{{ __('Save Changes') }} <gl-button variant="success" category="primary" @click="updateGrafanaIntegration">
</gl-button> {{ __('Save Changes') }}
</gl-button>
</div>
</form> </form>
</div> </div>
</section> </section>
......
...@@ -123,17 +123,18 @@ export default { ...@@ -123,17 +123,18 @@ export default {
<span>{{ $options.i18n.sendEmail.label }}</span> <span>{{ $options.i18n.sendEmail.label }}</span>
</gl-form-checkbox> </gl-form-checkbox>
</gl-form-group> </gl-form-group>
<div class="gl-display-flex gl-justify-content-end">
<gl-button <gl-button
ref="submitBtn" ref="submitBtn"
data-qa-selector="save_changes_button" data-qa-selector="save_changes_button"
:disabled="loading" :disabled="loading"
variant="success" variant="success"
type="submit" type="submit"
class="js-no-auto-disable" class="js-no-auto-disable"
> >
{{ $options.i18n.saveBtnLabel }} {{ $options.i18n.saveBtnLabel }}
</gl-button> </gl-button>
</div>
</form> </form>
</div> </div>
</template> </template>
...@@ -149,15 +149,17 @@ export default { ...@@ -149,15 +149,17 @@ export default {
</template> </template>
</gl-sprintf> </gl-sprintf>
</div> </div>
<gl-button <div class="gl-display-flex gl-justify-content-end">
v-gl-modal.resetWebhookModal <gl-button
class="gl-mt-3" v-gl-modal.resetWebhookModal
:disabled="loading" class="gl-mt-3"
:loading="resettingWebhook" :disabled="loading"
data-testid="webhook-reset-btn" :loading="resettingWebhook"
> data-testid="webhook-reset-btn"
{{ $options.i18n.webhookUrl.resetWebhookUrl }} >
</gl-button> {{ $options.i18n.webhookUrl.resetWebhookUrl }}
</gl-button>
</div>
<gl-modal <gl-modal
modal-id="resetWebhookModal" modal-id="resetWebhookModal"
:title="$options.i18n.webhookUrl.resetWebhookUrl" :title="$options.i18n.webhookUrl.resetWebhookUrl"
...@@ -168,16 +170,17 @@ export default { ...@@ -168,16 +170,17 @@ export default {
{{ $options.i18n.webhookUrl.restKeyInfo }} {{ $options.i18n.webhookUrl.restKeyInfo }}
</gl-modal> </gl-modal>
</gl-form-group> </gl-form-group>
<div class="gl-display-flex gl-justify-content-end">
<gl-button <gl-button
ref="submitBtn" ref="submitBtn"
:disabled="isSaveDisabled" :disabled="isSaveDisabled"
variant="success" variant="success"
type="submit" type="submit"
class="js-no-auto-disable" class="js-no-auto-disable"
> >
{{ $options.i18n.saveBtnLabel }} {{ $options.i18n.saveBtnLabel }}
</gl-button> </gl-button>
</div>
</form> </form>
</div> </div>
</template> </template>
<script> <script>
import { mapState, mapActions } from 'vuex'; 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 ExternalDashboard from './form_group/external_dashboard.vue';
import DashboardTimezone from './form_group/dashboard_timezone.vue'; import DashboardTimezone from './form_group/dashboard_timezone.vue';
export default { export default {
components: { components: {
GlDeprecatedButton, GlButton,
GlLink, GlLink,
ExternalDashboard, ExternalDashboard,
DashboardTimezone, DashboardTimezone,
...@@ -34,7 +34,7 @@ export default { ...@@ -34,7 +34,7 @@ export default {
<h3 class="js-section-header h4"> <h3 class="js-section-header h4">
{{ s__('MetricsSettings|Metrics dashboard') }} {{ s__('MetricsSettings|Metrics dashboard') }}
</h3> </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"> <p class="js-section-sub-header">
{{ s__('MetricsSettings|Manage Metrics Dashboard settings.') }} {{ s__('MetricsSettings|Manage Metrics Dashboard settings.') }}
<gl-link :href="helpPage">{{ __('Learn more') }}</gl-link> <gl-link :href="helpPage">{{ __('Learn more') }}</gl-link>
...@@ -44,9 +44,11 @@ export default { ...@@ -44,9 +44,11 @@ export default {
<form> <form>
<dashboard-timezone /> <dashboard-timezone />
<external-dashboard /> <external-dashboard />
<gl-deprecated-button variant="success" @click="saveChanges"> <div class="gl-display-flex gl-justify-content-end">
{{ __('Save Changes') }} <gl-button variant="success" @click="saveChanges">
</gl-deprecated-button> {{ __('Save Changes') }}
</gl-button>
</div>
</form> </form>
</div> </div>
</section> </section>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
import { mapActions, mapState } from 'vuex'; import { mapActions, mapState } from 'vuex';
import { mapComputed } from '~/vuex_shared/bindings'; import { mapComputed } from '~/vuex_shared/bindings';
import { import {
GlDeprecatedButton, GlDeprecatedButton as GlButton,
GlSprintf, GlSprintf,
GlLink, GlLink,
GlIcon, GlIcon,
...@@ -14,7 +14,7 @@ import { __, s__ } from '~/locale'; ...@@ -14,7 +14,7 @@ import { __, s__ } from '~/locale';
export default { export default {
components: { components: {
GlDeprecatedButton, GlButton,
GlSprintf, GlSprintf,
GlLink, GlLink,
GlFormGroup, GlFormGroup,
...@@ -78,9 +78,9 @@ export default { ...@@ -78,9 +78,9 @@ export default {
<h3 ref="sectionHeader" class="h4"> <h3 ref="sectionHeader" class="h4">
{{ $options.i18n.headerText }} {{ $options.i18n.headerText }}
</h3> </h3>
<gl-deprecated-button ref="toggleBtn" class="js-settings-toggle">{{ <gl-button ref="toggleBtn" class="js-settings-toggle">{{
$options.i18n.expandBtnLabel $options.i18n.expandBtnLabel
}}</gl-deprecated-button> }}</gl-button>
<p ref="sectionSubHeader"> <p ref="sectionSubHeader">
{{ $options.i18n.subHeaderText }} {{ $options.i18n.subHeaderText }}
</p> </p>
...@@ -180,16 +180,17 @@ export default { ...@@ -180,16 +180,17 @@ export default {
> >
<gl-form-input id="status-page-aws-secret-access-key " v-model="awsSecretKey" /> <gl-form-input id="status-page-aws-secret-access-key " v-model="awsSecretKey" />
</gl-form-group> </gl-form-group>
<div class="gl-display-flex gl-justify-content-end">
<gl-deprecated-button <gl-button
ref="submitBtn" ref="submitBtn"
:disabled="loading" :disabled="loading"
variant="success" variant="success"
type="submit" type="submit"
class="js-no-auto-disable" class="js-no-auto-disable"
> >
{{ $options.i18n.saveBtnLabel }} {{ $options.i18n.saveBtnLabel }}
</gl-deprecated-button> </gl-button>
</div>
</form> </form>
</div> </div>
</section> </section>
......
...@@ -32,5 +32,5 @@ ...@@ -32,5 +32,5 @@
- link_start_tag = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: jaeger_help_url } - link_start_tag = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: jaeger_help_url }
- link_end_tag = "#{sprite_icon('external-link', size: 16, css_class: 'ml-1 vertical-align-middle')}</a>".html_safe - link_end_tag = "#{sprite_icon('external-link', size: 16, css_class: 'ml-1 vertical-align-middle')}</a>".html_safe
= _("For more information, please review %{link_start_tag}Jaeger's configuration doc%{link_end_tag}").html_safe % { link_start_tag: link_start_tag, link_end_tag: link_end_tag } = _("For more information, please review %{link_start_tag}Jaeger's configuration doc%{link_end_tag}").html_safe % { link_start_tag: link_start_tag, link_end_tag: link_end_tag }
.gl-display-flex.gl-justify-content-end
= f.submit _('Save changes'), class: 'btn btn-success' = f.submit _('Save changes'), class: 'btn btn-success'
...@@ -16,13 +16,13 @@ exports[`Status Page settings form default state should match the default snapsh ...@@ -16,13 +16,13 @@ exports[`Status Page settings form default state should match the default snapsh
</h3> </h3>
<gl-deprecated-button-stub <gl-button-stub
class="js-settings-toggle" class="js-settings-toggle"
size="md" size="md"
variant="secondary" variant="secondary"
> >
Expand Expand
</gl-deprecated-button-stub> </gl-button-stub>
<p> <p>
...@@ -142,16 +142,20 @@ exports[`Status Page settings form default state should match the default snapsh ...@@ -142,16 +142,20 @@ exports[`Status Page settings form default state should match the default snapsh
/> />
</gl-form-group-stub> </gl-form-group-stub>
<gl-deprecated-button-stub <div
class="js-no-auto-disable" class="gl-display-flex gl-justify-content-end"
size="md"
type="submit"
variant="success"
> >
<gl-button-stub
class="js-no-auto-disable"
size="md"
type="submit"
variant="success"
>
Save changes
Save changes </gl-button-stub>
</div>
</gl-deprecated-button-stub>
</form> </form>
</div> </div>
</section> </section>
......
...@@ -26,7 +26,9 @@ exports[`AlertsSettingsForm with default values renders the initial template 1`] ...@@ -26,7 +26,9 @@ exports[`AlertsSettingsForm with default values renders the initial template 1`]
</gl-form-group-stub> </gl-form-group-stub>
<gl-form-group-stub label=\\"Authorization key\\" label-for=\\"authorization-key\\" label-class=\\"label-bold\\"> <gl-form-group-stub label=\\"Authorization key\\" label-for=\\"authorization-key\\" label-class=\\"label-bold\\">
<gl-form-input-group-stub value=\\"abcedfg123\\" predefinedoptions=\\"[object Object]\\" id=\\"authorization-key\\" readonly=\\"\\" class=\\"gl-mb-2\\"></gl-form-input-group-stub> <gl-form-input-group-stub value=\\"abcedfg123\\" predefinedoptions=\\"[object Object]\\" id=\\"authorization-key\\" readonly=\\"\\" class=\\"gl-mb-2\\"></gl-form-input-group-stub>
<gl-button-stub category=\\"tertiary\\" variant=\\"default\\" size=\\"medium\\" icon=\\"\\" disabled=\\"true\\" class=\\"gl-mt-3\\" role=\\"button\\" tabindex=\\"0\\">Reset key</gl-button-stub> <div class=\\"gl-display-flex gl-justify-content-end\\">
<gl-button-stub category=\\"tertiary\\" variant=\\"default\\" size=\\"medium\\" icon=\\"\\" disabled=\\"true\\" class=\\"gl-mt-3\\" role=\\"button\\" tabindex=\\"0\\">Reset key</gl-button-stub>
</div>
<gl-modal-stub modalid=\\"authKeyModal\\" titletag=\\"h4\\" modalclass=\\"\\" size=\\"md\\" title=\\"Reset key\\" ok-title=\\"Reset key\\" ok-variant=\\"danger\\"> <gl-modal-stub modalid=\\"authKeyModal\\" titletag=\\"h4\\" modalclass=\\"\\" size=\\"md\\" title=\\"Reset key\\" ok-title=\\"Reset key\\" ok-variant=\\"danger\\">
Resetting the authorization key for this project will require updating the authorization key in every alert source it is enabled in. Resetting the authorization key for this project will require updating the authorization key in every alert source it is enabled in.
</gl-modal-stub> </gl-modal-stub>
...@@ -34,14 +36,16 @@ exports[`AlertsSettingsForm with default values renders the initial template 1`] ...@@ -34,14 +36,16 @@ exports[`AlertsSettingsForm with default values renders the initial template 1`]
<gl-form-group-stub label=\\"Alert test payload\\" label-for=\\"alert-json\\" label-class=\\"label-bold\\"> <gl-form-group-stub label=\\"Alert test payload\\" label-for=\\"alert-json\\" label-class=\\"label-bold\\">
<gl-form-textarea-stub noresize=\\"true\\" id=\\"alert-json\\" disabled=\\"true\\" state=\\"true\\" placeholder=\\"Enter test alert JSON....\\" rows=\\"6\\" max-rows=\\"10\\"></gl-form-textarea-stub> <gl-form-textarea-stub noresize=\\"true\\" id=\\"alert-json\\" disabled=\\"true\\" state=\\"true\\" placeholder=\\"Enter test alert JSON....\\" rows=\\"6\\" max-rows=\\"10\\"></gl-form-textarea-stub>
</gl-form-group-stub> </gl-form-group-stub>
<gl-button-stub category=\\"tertiary\\" variant=\\"default\\" size=\\"medium\\" icon=\\"\\" disabled=\\"true\\">Test alert payload</gl-button-stub> <div class=\\"gl-display-flex gl-justify-content-end\\">
<gl-button-stub category=\\"tertiary\\" variant=\\"default\\" size=\\"medium\\" icon=\\"\\" disabled=\\"true\\">Test alert payload</gl-button-stub>
</div>
<div class=\\"footer-block row-content-block gl-display-flex gl-justify-content-space-between\\"> <div class=\\"footer-block row-content-block gl-display-flex gl-justify-content-space-between\\">
<gl-button-stub category=\\"primary\\" variant=\\"success\\" size=\\"medium\\" icon=\\"\\" disabled=\\"true\\">
Save changes
</gl-button-stub>
<gl-button-stub category=\\"primary\\" variant=\\"default\\" size=\\"medium\\" icon=\\"\\" disabled=\\"true\\"> <gl-button-stub category=\\"primary\\" variant=\\"default\\" size=\\"medium\\" icon=\\"\\" disabled=\\"true\\">
Cancel Cancel
</gl-button-stub> </gl-button-stub>
<gl-button-stub category=\\"primary\\" variant=\\"success\\" size=\\"medium\\" icon=\\"\\" disabled=\\"true\\">
Save changes
</gl-button-stub>
</div> </div>
</gl-form-stub> </gl-form-stub>
</div>" </div>"
......
...@@ -92,16 +92,20 @@ exports[`grafana integration component default state to match the default snapsh ...@@ -92,16 +92,20 @@ exports[`grafana integration component default state to match the default snapsh
</p> </p>
</gl-form-group-stub> </gl-form-group-stub>
<gl-button-stub <div
category="primary" class="gl-display-flex gl-justify-content-end"
icon=""
size="medium"
variant="success"
> >
<gl-button-stub
category="primary"
icon=""
size="medium"
variant="success"
>
Save Changes
Save Changes </gl-button-stub>
</div>
</gl-button-stub>
</form> </form>
</div> </div>
</section> </section>
......
...@@ -81,19 +81,23 @@ exports[`Alert integration settings form default state should match the default ...@@ -81,19 +81,23 @@ exports[`Alert integration settings form default state should match the default
</gl-form-checkbox-stub> </gl-form-checkbox-stub>
</gl-form-group-stub> </gl-form-group-stub>
<gl-button-stub <div
category="tertiary" class="gl-display-flex gl-justify-content-end"
class="js-no-auto-disable"
data-qa-selector="save_changes_button"
icon=""
size="medium"
type="submit"
variant="success"
> >
<gl-button-stub
category="tertiary"
class="js-no-auto-disable"
data-qa-selector="save_changes_button"
icon=""
size="medium"
type="submit"
variant="success"
>
Save changes
Save changes </gl-button-stub>
</div>
</gl-button-stub>
</form> </form>
</div> </div>
`; `;
...@@ -42,20 +42,24 @@ exports[`Alert integration settings form should match the default snapshot 1`] = ...@@ -42,20 +42,24 @@ exports[`Alert integration settings form should match the default snapshot 1`] =
/> />
</div> </div>
<gl-button-stub <div
category="tertiary" class="gl-display-flex gl-justify-content-end"
class="gl-mt-3"
data-testid="webhook-reset-btn"
icon=""
role="button"
size="medium"
tabindex="0"
variant="default"
> >
<gl-button-stub
category="tertiary"
class="gl-mt-3"
data-testid="webhook-reset-btn"
icon=""
role="button"
size="medium"
tabindex="0"
variant="default"
>
Reset webhook URL
Reset webhook URL </gl-button-stub>
</div>
</gl-button-stub>
<gl-modal-stub <gl-modal-stub
modalclass="" modalclass=""
...@@ -72,18 +76,22 @@ exports[`Alert integration settings form should match the default snapshot 1`] = ...@@ -72,18 +76,22 @@ exports[`Alert integration settings form should match the default snapshot 1`] =
</gl-modal-stub> </gl-modal-stub>
</gl-form-group-stub> </gl-form-group-stub>
<gl-button-stub <div
category="tertiary" class="gl-display-flex gl-justify-content-end"
class="js-no-auto-disable"
icon=""
size="medium"
type="submit"
variant="success"
> >
<gl-button-stub
category="tertiary"
class="js-no-auto-disable"
icon=""
size="medium"
type="submit"
variant="success"
>
Save changes
Save changes </gl-button-stub>
</div>
</gl-button-stub>
</form> </form>
</div> </div>
`; `;
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