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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
d4021122
Commit
d4021122
authored
Apr 20, 2017
by
Filipa Lacerda
Committed by
Phil Hughes
Apr 20, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor into .vue files
parent
9c59667f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
58 additions
and
20 deletions
+58
-20
app/assets/javascripts/environments/components/environment_item.js
...s/javascripts/environments/components/environment_item.js
+2
-2
app/assets/javascripts/environments/components/environment_monitoring.vue
...cripts/environments/components/environment_monitoring.vue
+33
-0
app/assets/javascripts/environments/components/environment_rollback.vue
...ascripts/environments/components/environment_rollback.vue
+21
-16
spec/javascripts/environments/environment_monitoring_spec.js
spec/javascripts/environments/environment_monitoring_spec.js
+1
-1
spec/javascripts/environments/environment_rollback_spec.js
spec/javascripts/environments/environment_rollback_spec.js
+1
-1
No files found.
app/assets/javascripts/environments/components/environment_item.js
View file @
d4021122
...
...
@@ -3,9 +3,9 @@ import '../../lib/utils/text_utility';
import
ActionsComponent
from
'
./environment_actions
'
;
import
ExternalUrlComponent
from
'
./environment_external_url.vue
'
;
import
StopComponent
from
'
./environment_stop.vue
'
;
import
RollbackComponent
from
'
./environment_rollback
'
;
import
RollbackComponent
from
'
./environment_rollback
.vue
'
;
import
TerminalButtonComponent
from
'
./environment_terminal_button.vue
'
;
import
MonitoringButtonComponent
from
'
./environment_monitoring
'
;
import
MonitoringButtonComponent
from
'
./environment_monitoring
.vue
'
;
import
CommitComponent
from
'
../../vue_shared/components/commit
'
;
import
eventHub
from
'
../event_hub
'
;
...
...
app/assets/javascripts/environments/components/environment_monitoring.
js
→
app/assets/javascripts/environments/components/environment_monitoring.
vue
View file @
d4021122
<
script
>
/**
* Renders the Monitoring (Metrics) link in environments table.
*/
...
...
@@ -5,7 +6,6 @@ export default {
props
:
{
monitoringUrl
:
{
type
:
String
,
default
:
''
,
required
:
true
,
},
},
...
...
@@ -15,16 +15,19 @@ export default {
return
'
Monitoring
'
;
},
},
template
:
`
<a
class="btn monitoring-url has-tooltip"
data-container="body"
:href="monitoringUrl"
rel="noopener noreferrer nofollow"
:title="title"
:aria-label="title">
<i class="fa fa-area-chart" aria-hidden="true"></i>
</a>
`
,
};
</
script
>
<
template
>
<a
class=
"btn monitoring-url has-tooltip"
data-container=
"body"
target=
"_blank"
rel=
"noopener noreferrer nofollow"
:href=
"monitoringUrl"
:title=
"title"
:aria-label=
"title"
>
<i
class=
"fa fa-area-chart"
aria-hidden=
"true"
/>
</a>
</
template
>
app/assets/javascripts/environments/components/environment_rollback.
js
→
app/assets/javascripts/environments/components/environment_rollback.
vue
View file @
d4021122
<
script
>
/* global Flash */
/* eslint-disable no-new */
/**
...
...
@@ -49,21 +50,25 @@ export default {
});
},
},
};
</
script
>
<
template
>
<button
type=
"button"
class=
"btn"
@
click=
"onClick"
:disabled=
"isLoading"
>
template
:
`
<button type="button"
class="btn"
@click="onClick"
:disabled="isLoading">
<span v-if="isLastDeployment">
Re-deploy
</span>
<span v-else>
Rollback
</span>
<span
v-if=
"isLastDeployment"
>
Re-deploy
</span>
<span
v-else
>
Rollback
</span>
<i v-if="isLoading" class="fa fa-spinner fa-spin" aria-hidden="true"></i>
</button>
`
,
};
<i
v-if=
"isLoading"
class=
"fa fa-spinner fa-spin"
aria-hidden=
"true"
/>
</button>
</
template
>
spec/javascripts/environments/environment_monitoring_spec.js
View file @
d4021122
import
Vue
from
'
vue
'
;
import
monitoringComp
from
'
~/environments/components/environment_monitoring
'
;
import
monitoringComp
from
'
~/environments/components/environment_monitoring
.vue
'
;
describe
(
'
Monitoring Component
'
,
()
=>
{
let
MonitoringComponent
;
...
...
spec/javascripts/environments/environment_rollback_spec.js
View file @
d4021122
import
Vue
from
'
vue
'
;
import
rollbackComp
from
'
~/environments/components/environment_rollback
'
;
import
rollbackComp
from
'
~/environments/components/environment_rollback
.vue
'
;
describe
(
'
Rollback Component
'
,
()
=>
{
const
retryURL
=
'
https://gitlab.com/retry
'
;
...
...
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