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
e3929359
Commit
e3929359
authored
Mar 12, 2019
by
Filipa Lacerda
Committed by
Phil Hughes
Mar 12, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removes EE differences from environmnet_item
Creares a mixin & moves the EE template differences into CE
parent
1b53409f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
9 deletions
+39
-9
app/assets/javascripts/environments/components/environment_item.vue
.../javascripts/environments/components/environment_item.vue
+4
-9
app/assets/javascripts/environments/mixins/environment_item_mixin.js
...javascripts/environments/mixins/environment_item_mixin.js
+13
-0
changelogs/unreleased/10029-env-item.yml
changelogs/unreleased/10029-env-item.yml
+5
-0
ee/app/assets/javascripts/environments/mixins/environment_item_mixin.js
...javascripts/environments/mixins/environment_item_mixin.js
+17
-0
No files found.
app/assets/javascripts/environments/components/environment_item.vue
View file @
e3929359
...
@@ -4,6 +4,7 @@ import _ from 'underscore';
...
@@ -4,6 +4,7 @@ import _ from 'underscore';
import
{
GlTooltipDirective
}
from
'
@gitlab/ui
'
;
import
{
GlTooltipDirective
}
from
'
@gitlab/ui
'
;
import
UserAvatarLink
from
'
~/vue_shared/components/user_avatar/user_avatar_link.vue
'
;
import
UserAvatarLink
from
'
~/vue_shared/components/user_avatar/user_avatar_link.vue
'
;
import
Icon
from
'
~/vue_shared/components/icon.vue
'
;
import
Icon
from
'
~/vue_shared/components/icon.vue
'
;
import
environmentItemMixin
from
'
ee_else_ce/environments/mixins/environment_item_mixin
'
;
import
ActionsComponent
from
'
./environment_actions.vue
'
;
import
ActionsComponent
from
'
./environment_actions.vue
'
;
import
ExternalUrlComponent
from
'
./environment_external_url.vue
'
;
import
ExternalUrlComponent
from
'
./environment_external_url.vue
'
;
import
StopComponent
from
'
./environment_stop.vue
'
;
import
StopComponent
from
'
./environment_stop.vue
'
;
...
@@ -34,10 +35,10 @@ export default {
...
@@ -34,10 +35,10 @@ export default {
TerminalButtonComponent
,
TerminalButtonComponent
,
MonitoringButtonComponent
,
MonitoringButtonComponent
,
},
},
directives
:
{
directives
:
{
GlTooltip
:
GlTooltipDirective
,
GlTooltip
:
GlTooltipDirective
,
},
},
mixins
:
[
environmentItemMixin
],
props
:
{
props
:
{
model
:
{
model
:
{
...
@@ -440,19 +441,12 @@ export default {
...
@@ -440,19 +441,12 @@ export default {
folderIconName
()
{
folderIconName
()
{
return
this
.
model
.
isOpen
?
'
chevron-down
'
:
'
chevron-right
'
;
return
this
.
model
.
isOpen
?
'
chevron-down
'
:
'
chevron-right
'
;
},
},
deployIconName
()
{
return
this
.
model
.
isDeployBoardVisible
?
'
chevron-down
'
:
'
chevron-right
'
;
},
},
},
methods
:
{
methods
:
{
onClickFolder
()
{
onClickFolder
()
{
eventHub
.
$emit
(
'
toggleFolder
'
,
this
.
model
);
eventHub
.
$emit
(
'
toggleFolder
'
,
this
.
model
);
},
},
toggleDeployBoard
()
{
eventHub
.
$emit
(
'
toggleDeployBoard
'
,
this
.
model
);
},
},
},
};
};
</
script
>
</
script
>
...
@@ -475,7 +469,7 @@ export default {
...
@@ -475,7 +469,7 @@ export default {
{{
s__
(
'
Environments|Environment
'
)
}}
{{
s__
(
'
Environments|Environment
'
)
}}
</div>
</div>
<span
v-if=
"
model.has
DeployBoard"
class=
"deploy-board-icon"
@
click=
"toggleDeployBoard"
>
<span
v-if=
"
shouldRender
DeployBoard"
class=
"deploy-board-icon"
@
click=
"toggleDeployBoard"
>
<icon
:name=
"deployIconName"
/>
<icon
:name=
"deployIconName"
/>
</span>
</span>
...
@@ -485,6 +479,7 @@ export default {
...
@@ -485,6 +479,7 @@ export default {
{{
s__
(
'
Environments|protected
'
)
}}
{{
s__
(
'
Environments|protected
'
)
}}
</span>
</span>
</span>
</span>
<span
v-else
class=
"folder-name"
role=
"button"
@
click=
"onClickFolder"
>
<span
v-else
class=
"folder-name"
role=
"button"
@
click=
"onClickFolder"
>
<icon
:name=
"folderIconName"
class=
"folder-icon"
/>
<icon
:name=
"folderIconName"
class=
"folder-icon"
/>
...
...
app/assets/javascripts/environments/mixins/environment_item_mixin.js
0 → 100644
View file @
e3929359
export
default
{
computed
:
{
deployIconName
()
{
return
''
;
},
shouldRenderDeployBoard
()
{
return
false
;
},
},
methods
:
{
toggleDeployBoard
()
{},
},
};
changelogs/unreleased/10029-env-item.yml
0 → 100644
View file @
e3929359
---
title
:
Removes EE differences for environment_item.vue
merge_request
:
author
:
type
:
other
ee/app/assets/javascripts/environments/mixins/environment_item_mixin.js
0 → 100644
View file @
e3929359
import
eventHub
from
'
~/environments/event_hub
'
;
export
default
{
computed
:
{
deployIconName
()
{
return
this
.
model
.
isDeployBoardVisible
?
'
chevron-down
'
:
'
chevron-right
'
;
},
shouldRenderDeployBoard
()
{
return
this
.
model
.
hasDeployBoard
;
},
},
methods
:
{
toggleDeployBoard
()
{
eventHub
.
$emit
(
'
toggleDeployBoard
'
,
this
.
model
);
},
},
};
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