Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
29e4ec70
Commit
29e4ec70
authored
Apr 08, 2022
by
Tom Quirk
Committed by
David O'Regan
Apr 09, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use GlAvatar in environments dashboard
Changelog: changed
parent
b453775c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
20 deletions
+26
-20
ee/app/assets/javascripts/environments_dashboard/components/dashboard/environment.vue
...vironments_dashboard/components/dashboard/environment.vue
+11
-10
ee/spec/frontend/environments_dashboard/components/__snapshots__/environment_spec.js.snap
...shboard/components/__snapshots__/environment_spec.js.snap
+13
-10
ee/spec/frontend/environments_dashboard/components/environment_spec.js
...end/environments_dashboard/components/environment_spec.js
+2
-0
No files found.
ee/app/assets/javascripts/environments_dashboard/components/dashboard/environment.vue
View file @
29e4ec70
<
script
>
import
{
GlTooltipDirective
,
GlLink
,
GlBadge
,
GlIcon
}
from
'
@gitlab/ui
'
;
import
{
GlTooltipDirective
,
GlLink
,
GlBadge
,
GlIcon
,
GlAvatarLink
,
GlAvatar
}
from
'
@gitlab/ui
'
;
import
{
escape
,
isEmpty
}
from
'
lodash
'
;
import
Alerts
from
'
ee/vue_shared/dashboards/components/alerts.vue
'
;
import
ProjectPipeline
from
'
ee/vue_shared/dashboards/components/project_pipeline.vue
'
;
...
...
@@ -7,14 +7,12 @@ import TimeAgo from 'ee/vue_shared/dashboards/components/time_ago.vue';
import
{
STATUS_FAILED
}
from
'
ee/vue_shared/dashboards/constants
'
;
import
{
s__
,
__
,
sprintf
}
from
'
~/locale
'
;
import
Commit
from
'
~/vue_shared/components/commit.vue
'
;
import
UserAvatarLink
from
'
~/vue_shared/components/user_avatar/user_avatar_link.vue
'
;
import
timeagoMixin
from
'
~/vue_shared/mixins/timeago
'
;
import
EnvironmentHeader
from
'
./environment_header.vue
'
;
export
default
{
components
:
{
EnvironmentHeader
,
UserAvatarLink
,
GlLink
,
GlBadge
,
Commit
,
...
...
@@ -22,6 +20,8 @@ export default {
ProjectPipeline
,
TimeAgo
,
GlIcon
,
GlAvatarLink
,
GlAvatar
,
},
directives
:
{
'
gl-tooltip
'
:
GlTooltipDirective
,
...
...
@@ -127,13 +127,14 @@ export default {
<div
:class=
"cardClasses"
class=
"dashboard-card-body card-body"
>
<div
v-if=
"lastDeployment"
class=
"row"
>
<div
class=
"col-1 align-self-center px-3"
>
<user-avatar-link
v-if=
"user"
:link-href=
"user.path"
:img-src=
"user.avatar_url"
:tooltip-text=
"user.name"
:img-size=
"32"
/>
<gl-avatar-link
v-if=
"user"
:href=
"user.path"
>
<gl-avatar
:src=
"user.avatar_url"
:entity-name=
"user.username"
:title=
"user.name"
:size=
"32"
/>
</gl-avatar-link>
</div>
<div
class=
"col-10 col-sm-7 pr-0 pl-5 align-self-center align-middle ci-table"
>
...
...
ee/spec/frontend/environments_dashboard/components/__snapshots__/environment_spec.js.snap
View file @
29e4ec70
...
...
@@ -18,16 +18,19 @@ exports[`Environment matchs the snapshot 1`] = `
<div
class="col-1 align-self-center px-3"
>
<user-avatar-link-stub
imgalt=""
imgcssclasses=""
imgsize="32"
imgsrc="https://secure.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon"
linkhref="/root"
tooltipplacement="top"
tooltiptext="Administrator"
username=""
/>
<gl-avatar-link-stub
href="/root"
>
<gl-avatar-stub
alt="avatar"
entityid="0"
entityname="root"
shape="circle"
size="32"
src="https://secure.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon"
title="Administrator"
/>
</gl-avatar-link-stub>
</div>
<div
...
...
ee/spec/frontend/environments_dashboard/components/environment_spec.js
View file @
29e4ec70
...
...
@@ -32,6 +32,7 @@ describe('Environment', () => {
expect
(
wrapper
.
findComponent
(
EnvironmentHeader
).
props
(
'
environment
'
)).
toBe
(
environment
);
});
});
describe
(
'
alerts
'
,
()
=>
{
let
alert
;
...
...
@@ -45,6 +46,7 @@ describe('Environment', () => {
expect
(
alert
.
props
(
'
lastAlert
'
)).
toBe
(
environment
.
last_alert
);
});
});
describe
(
'
commit
'
,
()
=>
{
let
commit
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment