Commit 9deccec0 authored by David O'Regan's avatar David O'Regan

Merge branch '325182_05_gitlab_ui_cleanup' into 'master'

Geo Node Status 2.0 - GitLab UI Cleanup

See merge request gitlab-org/gitlab!60421
parents e8aec7f5 d217b6f6
<script> <script>
import { GlLink, GlButton, GlLoadingIcon, GlModal } from '@gitlab/ui'; import { GlLink, GlButton, GlLoadingIcon, GlModal, GlSprintf } from '@gitlab/ui';
import { mapActions, mapState } from 'vuex'; import { mapActions, mapState } from 'vuex';
import { s__, __ } from '~/locale'; import { s__, __ } from '~/locale';
import { GEO_INFO_URL, REMOVE_NODE_MODAL_ID } from '../constants'; import { GEO_INFO_URL, REMOVE_NODE_MODAL_ID } from '../constants';
...@@ -11,9 +11,8 @@ export default { ...@@ -11,9 +11,8 @@ export default {
i18n: { i18n: {
geoSites: s__('Geo|Geo sites'), geoSites: s__('Geo|Geo sites'),
helpText: s__( helpText: s__(
'Geo|With GitLab Geo, you can install a special read-only and replicated instance anywhere.', 'Geo|With GitLab Geo, you can install a special read-only and replicated instance anywhere. %{linkStart}Learn more%{linkEnd}',
), ),
learnMore: __('Learn more'),
addSite: s__('Geo|Add site'), addSite: s__('Geo|Add site'),
modalTitle: s__('Geo|Remove secondary node'), modalTitle: s__('Geo|Remove secondary node'),
modalBody: s__( modalBody: s__(
...@@ -27,6 +26,7 @@ export default { ...@@ -27,6 +26,7 @@ export default {
GeoNodes, GeoNodes,
GeoNodesEmptyState, GeoNodesEmptyState,
GlModal, GlModal,
GlSprintf,
}, },
props: { props: {
newNodeUrl: { newNodeUrl: {
...@@ -71,10 +71,13 @@ export default { ...@@ -71,10 +71,13 @@ export default {
class="gl-display-flex gl-flex-direction-column gl-md-flex-direction-row gl-md-align-items-center gl-pb-5 gl-border-b-1 gl-border-b-solid gl-border-b-gray-100" class="gl-display-flex gl-flex-direction-column gl-md-flex-direction-row gl-md-align-items-center gl-pb-5 gl-border-b-1 gl-border-b-solid gl-border-b-gray-100"
> >
<div class="gl-mr-5"> <div class="gl-mr-5">
<span>{{ $options.i18n.helpText }}</span> <gl-sprintf :message="$options.i18n.helpText">
<gl-link class="gl-ml-2" :href="$options.GEO_INFO_URL" target="_blank">{{ <template #link="{ content }">
$options.i18n.learnMore <gl-link :href="$options.GEO_INFO_URL" target="_blank">
}}</gl-link> {{ content }}
</gl-link>
</template>
</gl-sprintf>
</div> </div>
<gl-button <gl-button
v-if="!noNodes" v-if="!noNodes"
......
...@@ -81,7 +81,6 @@ export default { ...@@ -81,7 +81,6 @@ export default {
</gl-button> </gl-button>
<gl-icon <gl-icon
ref="replicationDetails" ref="replicationDetails"
tabindex="0"
name="question" name="question"
class="gl-text-blue-500 gl-cursor-pointer gl-ml-2" class="gl-text-blue-500 gl-cursor-pointer gl-ml-2"
/> />
...@@ -90,7 +89,7 @@ export default { ...@@ -90,7 +89,7 @@ export default {
placement="top" placement="top"
triggers="hover focus" triggers="hover focus"
> >
<p> <p class="gl-font-base">
{{ $options.i18n.popoverText }} {{ $options.i18n.popoverText }}
</p> </p>
<gl-link :href="$options.GEO_REPLICATION_TYPES_URL" target="_blank">{{ <gl-link :href="$options.GEO_REPLICATION_TYPES_URL" target="_blank">{{
......
...@@ -63,14 +63,9 @@ export default { ...@@ -63,14 +63,9 @@ export default {
<span class="gl-text-gray-500" data-testid="last-updated-main-text">{{ <span class="gl-text-gray-500" data-testid="last-updated-main-text">{{
syncTimeAgo.mainText syncTimeAgo.mainText
}}</span> }}</span>
<gl-icon <gl-icon ref="lastUpdated" name="question" class="gl-text-blue-500 gl-cursor-pointer gl-ml-2" />
ref="lastUpdated"
tabindex="0"
name="question"
class="gl-text-blue-500 gl-cursor-pointer gl-ml-2"
/>
<gl-popover :target="() => $refs.lastUpdated.$el" placement="top"> <gl-popover :target="() => $refs.lastUpdated.$el" placement="top">
<p>{{ syncTimeAgo.popoverText }}</p> <p class="gl-font-base">{{ syncTimeAgo.popoverText }}</p>
<gl-link :href="syncHelp.link" target="_blank">{{ syncHelp.text }}</gl-link> <gl-link :href="syncHelp.link" target="_blank">{{ syncHelp.text }}</gl-link>
</gl-popover> </gl-popover>
</div> </div>
......
import { GlLink, GlButton, GlLoadingIcon, GlModal } from '@gitlab/ui'; import { GlLink, GlButton, GlLoadingIcon, GlModal, GlSprintf } from '@gitlab/ui';
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import Vue from 'vue'; import Vue from 'vue';
import Vuex from 'vuex'; import Vuex from 'vuex';
...@@ -38,6 +38,7 @@ describe('GeoNodesBetaApp', () => { ...@@ -38,6 +38,7 @@ describe('GeoNodesBetaApp', () => {
...defaultProps, ...defaultProps,
...props, ...props,
}, },
stubs: { GlSprintf },
}); });
}; };
......
import { GlCard, GlIcon, GlPopover, GlLink } from '@gitlab/ui'; import { GlCard, GlIcon, GlPopover, GlLink } from '@gitlab/ui';
import { mount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import Vue from 'vue'; import Vue from 'vue';
import Vuex from 'vuex'; import Vuex from 'vuex';
import GeoNodeProgressBar from 'ee/geo_nodes_beta/components/details/geo_node_progress_bar.vue'; import GeoNodeProgressBar from 'ee/geo_nodes_beta/components/details/geo_node_progress_bar.vue';
...@@ -25,12 +25,13 @@ describe('GeoNodeVerificationInfo', () => { ...@@ -25,12 +25,13 @@ describe('GeoNodeVerificationInfo', () => {
}); });
wrapper = extendedWrapper( wrapper = extendedWrapper(
mount(GeoNodeVerificationInfo, { shallowMount(GeoNodeVerificationInfo, {
store, store,
propsData: { propsData: {
...defaultProps, ...defaultProps,
...props, ...props,
}, },
stubs: { GlCard },
}), }),
); );
}; };
......
...@@ -14778,7 +14778,7 @@ msgstr "" ...@@ -14778,7 +14778,7 @@ msgstr ""
msgid "Geo|Waiting for scheduler" msgid "Geo|Waiting for scheduler"
msgstr "" msgstr ""
msgid "Geo|With GitLab Geo, you can install a special read-only and replicated instance anywhere." msgid "Geo|With GitLab Geo, you can install a special read-only and replicated instance anywhere. %{linkStart}Learn more%{linkEnd}"
msgstr "" msgstr ""
msgid "Geo|You are on a secondary, %{b_open}read-only%{b_close} Geo node." msgid "Geo|You are on a secondary, %{b_open}read-only%{b_close} Geo node."
......
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