Commit 2fae4773 authored by Anna Vovchenko's avatar Anna Vovchenko Committed by Simon Knox

Improved agent activity page

- Added tooltip to the empty state
- Removed 'strong' element
parent 71811fd3
<script> <script>
import { GlLoadingIcon, GlEmptyState, GlLink, GlIcon, GlAlert } from '@gitlab/ui'; import {
GlLoadingIcon,
GlEmptyState,
GlLink,
GlIcon,
GlAlert,
GlTooltipDirective,
} from '@gitlab/ui';
import { helpPagePath } from '~/helpers/help_page_helper'; import { helpPagePath } from '~/helpers/help_page_helper';
import { n__, s__, __ } from '~/locale'; import { n__, s__, __ } from '~/locale';
import { formatDate, getDayDifference, isToday } from '~/lib/utils/datetime_utility'; import { formatDate, getDayDifference, isToday } from '~/lib/utils/datetime_utility';
...@@ -16,10 +23,14 @@ export default { ...@@ -16,10 +23,14 @@ export default {
GlIcon, GlIcon,
ActivityHistoryItem, ActivityHistoryItem,
}, },
directives: {
GlTooltip: GlTooltipDirective,
},
i18n: { i18n: {
emptyText: s__( emptyText: s__(
'ClusterAgents|See Agent activity updates such as tokens created or revoked and clusters connected or not connected.', 'ClusterAgents|See Agent activity updates such as tokens created or revoked and clusters connected or not connected.',
), ),
emptyTooltip: s__('ClusterAgents|What is GitLab Agent activity?'),
error: s__( error: s__(
'ClusterAgents|An error occurred while retrieving GitLab Agent activity. Reload the page to try again.', 'ClusterAgents|An error occurred while retrieving GitLab Agent activity. Reload the page to try again.',
), ),
...@@ -150,12 +161,15 @@ export default { ...@@ -150,12 +161,15 @@ export default {
:svg-path="activityEmptyStateImage" :svg-path="activityEmptyStateImage"
:svg-height="150" :svg-height="150"
> >
<template #description> <template #description
<div> >{{ $options.i18n.emptyText }}
<span>{{ $options.i18n.emptyText }}</span> <gl-link
v-gl-tooltip
<gl-link :href="$options.emptyHelpLink"><gl-icon name="question" :size="14" /></gl-link> :href="$options.emptyHelpLink"
</div> :title="$options.i18n.emptyTooltip"
:aria-label="$options.i18n.emptyTooltip"
><gl-icon name="question" :size="14"
/></gl-link>
</template> </template>
</gl-empty-state> </gl-empty-state>
</div> </div>
......
...@@ -64,12 +64,12 @@ export default { ...@@ -64,12 +64,12 @@ export default {
<p class="gl-mt-2 gl-mb-0 gl-pb-2" :class="bodyClass"> <p class="gl-mt-2 gl-mb-0 gl-pb-2" :class="bodyClass">
<gl-sprintf :message="eventDetails.body"> <gl-sprintf :message="eventDetails.body">
<template #userName> <template #userName>
<strong>{{ eventDetails.user.name }}</strong> <span class="gl-font-weight-bold">{{ eventDetails.user.name }}</span>
<gl-link :href="eventDetails.user.webUrl">@{{ eventDetails.user.username }}</gl-link> <gl-link :href="eventDetails.user.webUrl">@{{ eventDetails.user.username }}</gl-link>
</template> </template>
<template #strong="{ content }"> <template #strong="{ content }">
<strong> {{ content }} </strong> <span class="gl-font-weight-bold"> {{ content }} </span>
</template> </template>
</gl-sprintf> </gl-sprintf>
<time-ago-tooltip :time="eventDetails.recordedAt" /> <time-ago-tooltip :time="eventDetails.recordedAt" />
......
...@@ -7676,6 +7676,9 @@ msgstr "" ...@@ -7676,6 +7676,9 @@ msgstr ""
msgid "ClusterAgents|View all %{number} clusters" msgid "ClusterAgents|View all %{number} clusters"
msgstr "" msgstr ""
msgid "ClusterAgents|What is GitLab Agent activity?"
msgstr ""
msgid "ClusterAgents|You cannot see this token again after you close this window." msgid "ClusterAgents|You cannot see this token again after you close this window."
msgstr "" msgstr ""
......
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