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
c4badc1d
Commit
c4badc1d
authored
Nov 05, 2020
by
Sunjung Park
Committed by
Kushal Pandya
Nov 05, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update stop environment modal to gl-modal
parent
b333db1a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
18 deletions
+39
-18
app/assets/javascripts/environments/components/environment_stop.vue
.../javascripts/environments/components/environment_stop.vue
+3
-3
app/assets/javascripts/environments/components/stop_environment_modal.vue
...cripts/environments/components/stop_environment_modal.vue
+33
-15
locale/gitlab.pot
locale/gitlab.pot
+3
-0
No files found.
app/assets/javascripts/environments/components/environment_stop.vue
View file @
c4badc1d
...
...
@@ -4,7 +4,7 @@
* Used in environments table.
*/
import
{
GlTooltipDirective
,
GlButton
}
from
'
@gitlab/ui
'
;
import
{
GlTooltipDirective
,
GlButton
,
GlModalDirective
}
from
'
@gitlab/ui
'
;
import
{
s__
}
from
'
~/locale
'
;
import
eventHub
from
'
../event_hub
'
;
...
...
@@ -14,6 +14,7 @@ export default {
},
directives
:
{
GlTooltip
:
GlTooltipDirective
,
GlModalDirective
,
},
props
:
{
environment
:
{
...
...
@@ -54,14 +55,13 @@ export default {
<
template
>
<gl-button
v-gl-tooltip=
"
{ id: $options.stopEnvironmentTooltipId }"
v-gl-modal-directive="'stop-environment-modal'"
:loading="isLoading"
:title="title"
:aria-label="title"
icon="stop"
category="primary"
variant="danger"
data-toggle="modal"
data-target="#stop-environment-modal"
@click="onClick"
/>
</
template
>
app/assets/javascripts/environments/components/stop_environment_modal.vue
View file @
c4badc1d
<
script
>
/* eslint-disable @gitlab/vue-require-i18n-strings */
import
{
GlSprintf
,
GlTooltipDirective
}
from
'
@gitlab/ui
'
;
import
DeprecatedModal2
from
'
~/vue_shared/components/deprecated_modal_2.vue
'
;
import
{
GlSprintf
,
GlTooltipDirective
,
GlModal
}
from
'
@gitlab/ui
'
;
import
eventHub
from
'
../event_hub
'
;
import
{
__
,
s__
}
from
'
~/locale
'
;
export
default
{
id
:
'
stop-environment-modal
'
,
name
:
'
StopEnvironmentModal
'
,
components
:
{
GlModal
:
DeprecatedModal2
,
GlModal
,
GlSprintf
,
},
...
...
@@ -24,6 +23,20 @@ export default {
},
},
computed
:
{
primaryProps
()
{
return
{
text
:
s__
(
'
Environments|Stop environment
'
),
attributes
:
[{
variant
:
'
danger
'
}],
};
},
cancelProps
()
{
return
{
text
:
__
(
'
Cancel
'
),
};
},
},
methods
:
{
onSubmit
()
{
eventHub
.
$emit
(
'
stopEnvironment
'
,
this
.
environment
);
...
...
@@ -34,18 +47,23 @@ export default {
<
template
>
<gl-modal
:id=
"$options.id"
:
footer-primary-button-text=
"s__('Environments|Stop environment')
"
footer-primary-button-variant=
"danger
"
@
submit
=
"onSubmit"
:
modal-
id=
"$options.id"
:
action-primary=
"primaryProps
"
:action-cancel=
"cancelProps
"
@
primary
=
"onSubmit"
>
<template
#header
>
<h4
class=
"modal-title d-flex mw-100"
>
Stopping
<span
v-gl-tooltip
:title=
"environment.name"
class=
"text-truncate ml-1 mr-1 flex-fill"
>
{{
environment
.
name
}}
?
</span>
</h4>
<template
#modal-title
>
<gl-sprintf
:message=
"s__('Environments|Stopping %
{environmentName}')">
<template
#environmentName
>
<span
v-gl-tooltip
:title=
"environment.name"
class=
"gl-text-truncate gl-ml-2 gl-mr-2 gl-flex-fill"
>
{{
environment
.
name
}}
?
</span>
</
template
>
</gl-sprintf>
</template>
<p>
{{ s__('Environments|Are you sure you want to stop this environment?') }}
</p>
...
...
locale/gitlab.pot
View file @
c4badc1d
...
...
@@ -10427,6 +10427,9 @@ msgstr ""
msgid "Environments|Stopping"
msgstr ""
msgid "Environments|Stopping %{environmentName}"
msgstr ""
msgid "Environments|There was an error fetching the logs. Please try again."
msgstr ""
...
...
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