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
0a9ded0f
Commit
0a9ded0f
authored
Mar 13, 2020
by
Dhiraj Bodicherla
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Using lodash in environments dashboard components
parent
6a3bff49
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
ee/app/assets/javascripts/environments_dashboard/components/dashboard/dashboard.vue
...environments_dashboard/components/dashboard/dashboard.vue
+2
-2
ee/app/assets/javascripts/environments_dashboard/components/dashboard/environment.vue
...vironments_dashboard/components/dashboard/environment.vue
+7
-7
No files found.
ee/app/assets/javascripts/environments_dashboard/components/dashboard/dashboard.vue
View file @
0a9ded0f
<
script
>
<
script
>
import
_
from
'
underscore
'
;
import
{
isEmpty
}
from
'
lodash
'
;
import
{
mapState
,
mapActions
}
from
'
vuex
'
;
import
{
mapState
,
mapActions
}
from
'
vuex
'
;
import
{
import
{
GlModal
,
GlModal
,
...
@@ -82,7 +82,7 @@ export default {
...
@@ -82,7 +82,7 @@ export default {
return
this
.
searchCount
>
0
;
return
this
.
searchCount
>
0
;
},
},
okDisabled
()
{
okDisabled
()
{
return
_
.
isEmpty
(
this
.
selectedProjects
);
return
isEmpty
(
this
.
selectedProjects
);
},
},
},
},
created
()
{
created
()
{
...
...
ee/app/assets/javascripts/environments_dashboard/components/dashboard/environment.vue
View file @
0a9ded0f
<
script
>
<
script
>
import
_
from
'
underscore
'
;
import
{
escape
as
esc
,
isEmpty
}
from
'
lodash
'
;
import
{
GlTooltipDirective
,
GlLink
,
GlBadge
}
from
'
@gitlab/ui
'
;
import
{
GlTooltipDirective
,
GlLink
,
GlBadge
}
from
'
@gitlab/ui
'
;
import
Alerts
from
'
ee/vue_shared/dashboards/components/alerts.vue
'
;
import
Alerts
from
'
ee/vue_shared/dashboards/components/alerts.vue
'
;
import
TimeAgo
from
'
ee/vue_shared/dashboards/components/time_ago.vue
'
;
import
TimeAgo
from
'
ee/vue_shared/dashboards/components/time_ago.vue
'
;
...
@@ -61,21 +61,21 @@ export default {
...
@@ -61,21 +61,21 @@ export default {
};
};
},
},
user
()
{
user
()
{
return
this
.
lastDeployment
&&
!
_
.
isEmpty
(
this
.
lastDeployment
.
user
)
return
this
.
lastDeployment
&&
!
isEmpty
(
this
.
lastDeployment
.
user
)
?
this
.
lastDeployment
.
user
?
this
.
lastDeployment
.
user
:
null
;
:
null
;
},
},
lastPipeline
()
{
lastPipeline
()
{
return
!
_
.
isEmpty
(
this
.
environment
.
last_pipeline
)
?
this
.
environment
.
last_pipeline
:
null
;
return
!
isEmpty
(
this
.
environment
.
last_pipeline
)
?
this
.
environment
.
last_pipeline
:
null
;
},
},
lastDeployment
()
{
lastDeployment
()
{
return
!
_
.
isEmpty
(
this
.
environment
.
last_deployment
)
?
this
.
environment
.
last_deployment
:
null
;
return
!
isEmpty
(
this
.
environment
.
last_deployment
)
?
this
.
environment
.
last_deployment
:
null
;
},
},
deployable
()
{
deployable
()
{
return
this
.
lastDeployment
?
this
.
lastDeployment
.
deployable
:
null
;
return
this
.
lastDeployment
?
this
.
lastDeployment
.
deployable
:
null
;
},
},
commit
()
{
commit
()
{
return
!
_
.
isEmpty
(
this
.
lastDeployment
.
commit
)
?
this
.
lastDeployment
.
commit
:
{};
return
!
isEmpty
(
this
.
lastDeployment
.
commit
)
?
this
.
lastDeployment
.
commit
:
{};
},
},
jobTooltip
()
{
jobTooltip
()
{
return
this
.
deployable
return
this
.
deployable
...
@@ -83,7 +83,7 @@ export default {
...
@@ -83,7 +83,7 @@ export default {
:
s__
(
'
EnvironmentDashboard|Created through the Deployment API
'
);
:
s__
(
'
EnvironmentDashboard|Created through the Deployment API
'
);
},
},
commitRef
()
{
commitRef
()
{
return
this
.
lastDeployment
&&
!
_
.
isEmpty
(
this
.
lastDeployment
.
commit
)
return
this
.
lastDeployment
&&
!
isEmpty
(
this
.
lastDeployment
.
commit
)
?
{
?
{
...
this
.
lastDeployment
.
commit
,
...
this
.
lastDeployment
.
commit
,
...
this
.
lastDeployment
.
ref
,
...
this
.
lastDeployment
.
ref
,
...
@@ -95,7 +95,7 @@ export default {
...
@@ -95,7 +95,7 @@ export default {
return
(
return
(
this
.
commit
.
author
||
{
this
.
commit
.
author
||
{
avatar_url
:
this
.
commit
.
author_gravatar_url
,
avatar_url
:
this
.
commit
.
author_gravatar_url
,
path
:
`mailto:
${
_
.
escape
(
this
.
commit
.
author_email
)}
`
,
path
:
`mailto:
${
esc
(
this
.
commit
.
author_email
)}
`
,
username
:
this
.
commit
.
author_name
,
username
:
this
.
commit
.
author_name
,
}
}
);
);
...
...
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