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
222d2d21
Commit
222d2d21
authored
Aug 06, 2020
by
Taurie Davis
Committed by
jboyson
Aug 10, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Migrate external link and stop environment button templates
Uses GlButton
parent
2f7101ac
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
20 deletions
+15
-20
app/assets/javascripts/environments/components/environment_external_url.vue
...ipts/environments/components/environment_external_url.vue
+6
-8
app/assets/javascripts/environments/components/environment_stop.vue
.../javascripts/environments/components/environment_stop.vue
+7
-10
spec/frontend/environments/environment_stop_spec.js
spec/frontend/environments/environment_stop_spec.js
+2
-2
No files found.
app/assets/javascripts/environments/components/environment_external_url.vue
View file @
222d2d21
<
script
>
import
{
GlTooltipDirective
}
from
'
@gitlab/ui
'
;
import
Icon
from
'
~/vue_shared/components/icon.vue
'
;
import
{
GlTooltipDirective
,
GlButton
}
from
'
@gitlab/ui
'
;
import
{
s__
}
from
'
~/locale
'
;
/**
...
...
@@ -8,7 +7,7 @@ import { s__ } from '~/locale';
*/
export
default
{
components
:
{
Ic
on
,
GlButt
on
,
},
directives
:
{
GlTooltip
:
GlTooltipDirective
,
...
...
@@ -27,15 +26,14 @@ export default {
};
</
script
>
<
template
>
<
a
<
gl-button
v-gl-tooltip
:title=
"title"
:aria-label=
"title"
:href=
"externalUrl"
class=
"
btn
external-url"
class=
"external-url"
target=
"_blank"
icon=
"external-link"
rel=
"noopener noreferrer nofollow"
>
<icon
name=
"external-link"
/>
</a>
/>
</
template
>
app/assets/javascripts/environments/components/environment_stop.vue
View file @
222d2d21
...
...
@@ -5,16 +5,13 @@
*/
import
$
from
'
jquery
'
;
import
{
GlTooltipDirective
}
from
'
@gitlab/ui
'
;
import
Icon
from
'
~/vue_shared/components/icon.vue
'
;
import
{
GlTooltipDirective
,
GlButton
}
from
'
@gitlab/ui
'
;
import
{
s__
}
from
'
~/locale
'
;
import
eventHub
from
'
../event_hub
'
;
import
LoadingButton
from
'
../../vue_shared/components/loading_button.vue
'
;
export
default
{
components
:
{
Icon
,
LoadingButton
,
GlButton
,
},
directives
:
{
GlTooltip
:
GlTooltipDirective
,
...
...
@@ -55,16 +52,16 @@ export default {
};
</
script
>
<
template
>
<
loading
-button
<
gl
-button
v-gl-tooltip
:loading=
"isLoading"
:title=
"title"
:aria-label=
"title"
container-class=
"btn btn-danger d-none d-sm-none d-md-block"
icon=
"stop"
category=
"primary"
variant=
"danger"
data-toggle=
"modal"
data-target=
"#stop-environment-modal"
@
click=
"onClick"
>
<icon
name=
"stop"
/>
</loading-button>
/>
</
template
>
spec/frontend/environments/environment_stop_spec.js
View file @
222d2d21
import
$
from
'
jquery
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
StopComponent
from
'
~/environments/components/environment_stop.vue
'
;
import
LoadingButton
from
'
~/vue_shared/components/loading_button.vue
'
;
import
{
GlButton
}
from
'
@gitlab/ui
'
;
import
eventHub
from
'
~/environments/event_hub
'
;
$
.
fn
.
tooltip
=
()
=>
{};
...
...
@@ -17,7 +17,7 @@ describe('Stop Component', () => {
});
};
const
findButton
=
()
=>
wrapper
.
find
(
Loading
Button
);
const
findButton
=
()
=>
wrapper
.
find
(
Gl
Button
);
beforeEach
(()
=>
{
jest
.
spyOn
(
window
,
'
confirm
'
);
...
...
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