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 @@
...
@@ -4,7 +4,7 @@
* Used in environments table.
* Used in environments table.
*/
*/
import
{
GlTooltipDirective
,
GlButton
}
from
'
@gitlab/ui
'
;
import
{
GlTooltipDirective
,
GlButton
,
GlModalDirective
}
from
'
@gitlab/ui
'
;
import
{
s__
}
from
'
~/locale
'
;
import
{
s__
}
from
'
~/locale
'
;
import
eventHub
from
'
../event_hub
'
;
import
eventHub
from
'
../event_hub
'
;
...
@@ -14,6 +14,7 @@ export default {
...
@@ -14,6 +14,7 @@ export default {
},
},
directives
:
{
directives
:
{
GlTooltip
:
GlTooltipDirective
,
GlTooltip
:
GlTooltipDirective
,
GlModalDirective
,
},
},
props
:
{
props
:
{
environment
:
{
environment
:
{
...
@@ -54,14 +55,13 @@ export default {
...
@@ -54,14 +55,13 @@ export default {
<
template
>
<
template
>
<gl-button
<gl-button
v-gl-tooltip=
"
{ id: $options.stopEnvironmentTooltipId }"
v-gl-tooltip=
"
{ id: $options.stopEnvironmentTooltipId }"
v-gl-modal-directive="'stop-environment-modal'"
:loading="isLoading"
:loading="isLoading"
:title="title"
:title="title"
:aria-label="title"
:aria-label="title"
icon="stop"
icon="stop"
category="primary"
category="primary"
variant="danger"
variant="danger"
data-toggle="modal"
data-target="#stop-environment-modal"
@click="onClick"
@click="onClick"
/>
/>
</
template
>
</
template
>
app/assets/javascripts/environments/components/stop_environment_modal.vue
View file @
c4badc1d
<
script
>
<
script
>
/* eslint-disable @gitlab/vue-require-i18n-strings */
import
{
GlSprintf
,
GlTooltipDirective
,
GlModal
}
from
'
@gitlab/ui
'
;
import
{
GlSprintf
,
GlTooltipDirective
}
from
'
@gitlab/ui
'
;
import
DeprecatedModal2
from
'
~/vue_shared/components/deprecated_modal_2.vue
'
;
import
eventHub
from
'
../event_hub
'
;
import
eventHub
from
'
../event_hub
'
;
import
{
__
,
s__
}
from
'
~/locale
'
;
export
default
{
export
default
{
id
:
'
stop-environment-modal
'
,
id
:
'
stop-environment-modal
'
,
name
:
'
StopEnvironmentModal
'
,
name
:
'
StopEnvironmentModal
'
,
components
:
{
components
:
{
GlModal
:
DeprecatedModal2
,
GlModal
,
GlSprintf
,
GlSprintf
,
},
},
...
@@ -24,6 +23,20 @@ export default {
...
@@ -24,6 +23,20 @@ export default {
},
},
},
},
computed
:
{
primaryProps
()
{
return
{
text
:
s__
(
'
Environments|Stop environment
'
),
attributes
:
[{
variant
:
'
danger
'
}],
};
},
cancelProps
()
{
return
{
text
:
__
(
'
Cancel
'
),
};
},
},
methods
:
{
methods
:
{
onSubmit
()
{
onSubmit
()
{
eventHub
.
$emit
(
'
stopEnvironment
'
,
this
.
environment
);
eventHub
.
$emit
(
'
stopEnvironment
'
,
this
.
environment
);
...
@@ -34,18 +47,23 @@ export default {
...
@@ -34,18 +47,23 @@ export default {
<
template
>
<
template
>
<gl-modal
<gl-modal
:id=
"$options.id"
:
modal-
id=
"$options.id"
:
footer-primary-button-text=
"s__('Environments|Stop environment')
"
:
action-primary=
"primaryProps
"
footer-primary-button-variant=
"danger
"
:action-cancel=
"cancelProps
"
@
submit
=
"onSubmit"
@
primary
=
"onSubmit"
>
>
<template
#header
>
<template
#modal-title
>
<h4
class=
"modal-title d-flex mw-100"
>
<gl-sprintf
:message=
"s__('Environments|Stopping %
{environmentName}')">
Stopping
<template
#environmentName
>
<span
v-gl-tooltip
:title=
"environment.name"
class=
"text-truncate ml-1 mr-1 flex-fill"
>
<span
{{
environment
.
name
}}
?
v-gl-tooltip
</span>
:title=
"environment.name"
</h4>
class=
"gl-text-truncate gl-ml-2 gl-mr-2 gl-flex-fill"
>
{{
environment
.
name
}}
?
</span>
</
template
>
</gl-sprintf>
</template>
</template>
<p>
{{ s__('Environments|Are you sure you want to stop this environment?') }}
</p>
<p>
{{ s__('Environments|Are you sure you want to stop this environment?') }}
</p>
...
...
locale/gitlab.pot
View file @
c4badc1d
...
@@ -10427,6 +10427,9 @@ msgstr ""
...
@@ -10427,6 +10427,9 @@ msgstr ""
msgid "Environments|Stopping"
msgid "Environments|Stopping"
msgstr ""
msgstr ""
msgid "Environments|Stopping %{environmentName}"
msgstr ""
msgid "Environments|There was an error fetching the logs. Please try again."
msgid "Environments|There was an error fetching the logs. Please try again."
msgstr ""
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