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
>
<
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
{
escape
,
isEmpty
}
from
'
lodash
'
;
import
Alerts
from
'
ee/vue_shared/dashboards/components/alerts.vue
'
;
import
Alerts
from
'
ee/vue_shared/dashboards/components/alerts.vue
'
;
import
ProjectPipeline
from
'
ee/vue_shared/dashboards/components/project_pipeline.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';
...
@@ -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
{
STATUS_FAILED
}
from
'
ee/vue_shared/dashboards/constants
'
;
import
{
s__
,
__
,
sprintf
}
from
'
~/locale
'
;
import
{
s__
,
__
,
sprintf
}
from
'
~/locale
'
;
import
Commit
from
'
~/vue_shared/components/commit.vue
'
;
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
timeagoMixin
from
'
~/vue_shared/mixins/timeago
'
;
import
EnvironmentHeader
from
'
./environment_header.vue
'
;
import
EnvironmentHeader
from
'
./environment_header.vue
'
;
export
default
{
export
default
{
components
:
{
components
:
{
EnvironmentHeader
,
EnvironmentHeader
,
UserAvatarLink
,
GlLink
,
GlLink
,
GlBadge
,
GlBadge
,
Commit
,
Commit
,
...
@@ -22,6 +20,8 @@ export default {
...
@@ -22,6 +20,8 @@ export default {
ProjectPipeline
,
ProjectPipeline
,
TimeAgo
,
TimeAgo
,
GlIcon
,
GlIcon
,
GlAvatarLink
,
GlAvatar
,
},
},
directives
:
{
directives
:
{
'
gl-tooltip
'
:
GlTooltipDirective
,
'
gl-tooltip
'
:
GlTooltipDirective
,
...
@@ -127,13 +127,14 @@ export default {
...
@@ -127,13 +127,14 @@ export default {
<div
:class=
"cardClasses"
class=
"dashboard-card-body card-body"
>
<div
:class=
"cardClasses"
class=
"dashboard-card-body card-body"
>
<div
v-if=
"lastDeployment"
class=
"row"
>
<div
v-if=
"lastDeployment"
class=
"row"
>
<div
class=
"col-1 align-self-center px-3"
>
<div
class=
"col-1 align-self-center px-3"
>
<user-avatar-link
<gl-avatar-link
v-if=
"user"
:href=
"user.path"
>
v-if=
"user"
<gl-avatar
:link-href=
"user.path"
:src=
"user.avatar_url"
:img-src=
"user.avatar_url"
:entity-name=
"user.username"
:tooltip-text=
"user.name"
:title=
"user.name"
:img-size=
"32"
:size=
"32"
/>
/>
</gl-avatar-link>
</div>
</div>
<div
class=
"col-10 col-sm-7 pr-0 pl-5 align-self-center align-middle ci-table"
>
<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`] = `
...
@@ -18,16 +18,19 @@ exports[`Environment matchs the snapshot 1`] = `
<div
<div
class="col-1 align-self-center px-3"
class="col-1 align-self-center px-3"
>
>
<user-avatar-link-stub
<gl-avatar-link-stub
imgalt=""
href="/root"
imgcssclasses=""
>
imgsize="32"
<gl-avatar-stub
imgsrc="https://secure.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon"
alt="avatar"
linkhref="/root"
entityid="0"
tooltipplacement="top"
entityname="root"
tooltiptext="Administrator"
shape="circle"
username=""
size="32"
/>
src="https://secure.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon"
title="Administrator"
/>
</gl-avatar-link-stub>
</div>
</div>
<div
<div
...
...
ee/spec/frontend/environments_dashboard/components/environment_spec.js
View file @
29e4ec70
...
@@ -32,6 +32,7 @@ describe('Environment', () => {
...
@@ -32,6 +32,7 @@ describe('Environment', () => {
expect
(
wrapper
.
findComponent
(
EnvironmentHeader
).
props
(
'
environment
'
)).
toBe
(
environment
);
expect
(
wrapper
.
findComponent
(
EnvironmentHeader
).
props
(
'
environment
'
)).
toBe
(
environment
);
});
});
});
});
describe
(
'
alerts
'
,
()
=>
{
describe
(
'
alerts
'
,
()
=>
{
let
alert
;
let
alert
;
...
@@ -45,6 +46,7 @@ describe('Environment', () => {
...
@@ -45,6 +46,7 @@ describe('Environment', () => {
expect
(
alert
.
props
(
'
lastAlert
'
)).
toBe
(
environment
.
last_alert
);
expect
(
alert
.
props
(
'
lastAlert
'
)).
toBe
(
environment
.
last_alert
);
});
});
});
});
describe
(
'
commit
'
,
()
=>
{
describe
(
'
commit
'
,
()
=>
{
let
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