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
f0d98939
Commit
f0d98939
authored
Sep 25, 2020
by
Mike Jang
Committed by
Kushal Pandya
Sep 25, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Migrate self monitor form button
parent
c3a1afa6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
9 deletions
+14
-9
app/assets/javascripts/self_monitor/components/self_monitor_form.vue
...javascripts/self_monitor/components/self_monitor_form.vue
+4
-3
spec/frontend/self_monitor/components/__snapshots__/self_monitor_form_spec.js.snap
...r/components/__snapshots__/self_monitor_form_spec.js.snap
+8
-4
spec/frontend/self_monitor/components/self_monitor_form_spec.js
...rontend/self_monitor/components/self_monitor_form_spec.js
+2
-2
No files found.
app/assets/javascripts/self_monitor/components/self_monitor_form.vue
View file @
f0d98939
<
script
>
<
script
>
/* eslint-disable vue/no-v-html */
/* eslint-disable vue/no-v-html */
import
Vue
from
'
vue
'
;
import
Vue
from
'
vue
'
;
import
{
GlFormGroup
,
Gl
Deprecated
Button
,
GlModal
,
GlToast
,
GlToggle
}
from
'
@gitlab/ui
'
;
import
{
GlFormGroup
,
GlButton
,
GlModal
,
GlToast
,
GlToggle
}
from
'
@gitlab/ui
'
;
import
{
mapState
,
mapActions
}
from
'
vuex
'
;
import
{
mapState
,
mapActions
}
from
'
vuex
'
;
import
{
__
,
s__
,
sprintf
}
from
'
~/locale
'
;
import
{
__
,
s__
,
sprintf
}
from
'
~/locale
'
;
import
{
visitUrl
,
getBaseURL
}
from
'
~/lib/utils/url_utility
'
;
import
{
visitUrl
,
getBaseURL
}
from
'
~/lib/utils/url_utility
'
;
...
@@ -11,7 +11,7 @@ Vue.use(GlToast);
...
@@ -11,7 +11,7 @@ Vue.use(GlToast);
export
default
{
export
default
{
components
:
{
components
:
{
GlFormGroup
,
GlFormGroup
,
Gl
Deprecated
Button
,
GlButton
,
GlModal
,
GlModal
,
GlToggle
,
GlToggle
,
},
},
...
@@ -123,7 +123,7 @@ export default {
...
@@ -123,7 +123,7 @@ export default {
<h4
class=
"js-section-header"
>
<h4
class=
"js-section-header"
>
{{
s__
(
'
SelfMonitoring|Self monitoring
'
)
}}
{{
s__
(
'
SelfMonitoring|Self monitoring
'
)
}}
</h4>
</h4>
<gl-
deprecated-button
class=
"js-settings-toggle"
>
{{
__
(
'
Expand
'
)
}}
</gl-deprecated
-button>
<gl-
button
class=
"js-settings-toggle"
>
{{
__
(
'
Expand
'
)
}}
</gl
-button>
<p
class=
"js-section-sub-header"
>
<p
class=
"js-section-sub-header"
>
{{
s__
(
'
SelfMonitoring|Enable or disable instance self monitoring
'
)
}}
{{
s__
(
'
SelfMonitoring|Enable or disable instance self monitoring
'
)
}}
</p>
</p>
...
@@ -146,6 +146,7 @@ export default {
...
@@ -146,6 +146,7 @@ export default {
:ok-title=
"__('Delete project')"
:ok-title=
"__('Delete project')"
:cancel-title=
"__('Cancel')"
:cancel-title=
"__('Cancel')"
ok-variant=
"danger"
ok-variant=
"danger"
category=
"primary"
@
ok=
"deleteProject"
@
ok=
"deleteProject"
@
cancel=
"hideSelfMonitorModal"
@
cancel=
"hideSelfMonitorModal"
>
>
...
...
spec/frontend/self_monitor/components/__snapshots__/self_monitor_form_spec.js.snap
View file @
f0d98939
...
@@ -15,13 +15,16 @@ exports[`self monitor component When the self monitor project has not been creat
...
@@ -15,13 +15,16 @@ exports[`self monitor component When the self monitor project has not been creat
</h4>
</h4>
<gl-deprecated-button-stub
<gl-button-stub
buttontextclasses=""
category="primary"
class="js-settings-toggle"
class="js-settings-toggle"
size="md"
icon=""
variant="secondary"
size="medium"
variant="default"
>
>
Expand
Expand
</gl-
deprecated-
button-stub>
</gl-button-stub>
<p
<p
class="js-section-sub-header"
class="js-section-sub-header"
...
@@ -56,6 +59,7 @@ exports[`self monitor component When the self monitor project has not been creat
...
@@ -56,6 +59,7 @@ exports[`self monitor component When the self monitor project has not been creat
<gl-modal-stub
<gl-modal-stub
cancel-title="Cancel"
cancel-title="Cancel"
category="primary"
modalclass=""
modalclass=""
modalid="delete-self-monitor-modal"
modalid="delete-self-monitor-modal"
ok-title="Delete project"
ok-title="Delete project"
...
...
spec/frontend/self_monitor/components/self_monitor_form_spec.js
View file @
f0d98939
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
{
Gl
Deprecated
Button
}
from
'
@gitlab/ui
'
;
import
{
GlButton
}
from
'
@gitlab/ui
'
;
import
{
TEST_HOST
}
from
'
helpers/test_constants
'
;
import
{
TEST_HOST
}
from
'
helpers/test_constants
'
;
import
SelfMonitor
from
'
~/self_monitor/components/self_monitor_form.vue
'
;
import
SelfMonitor
from
'
~/self_monitor/components/self_monitor_form.vue
'
;
import
{
createStore
}
from
'
~/self_monitor/store
'
;
import
{
createStore
}
from
'
~/self_monitor/store
'
;
...
@@ -42,7 +42,7 @@ describe('self monitor component', () => {
...
@@ -42,7 +42,7 @@ describe('self monitor component', () => {
it
(
'
renders as an expand button by default
'
,
()
=>
{
it
(
'
renders as an expand button by default
'
,
()
=>
{
wrapper
=
shallowMount
(
SelfMonitor
,
{
store
});
wrapper
=
shallowMount
(
SelfMonitor
,
{
store
});
const
button
=
wrapper
.
find
(
Gl
Deprecated
Button
);
const
button
=
wrapper
.
find
(
GlButton
);
expect
(
button
.
text
()).
toBe
(
'
Expand
'
);
expect
(
button
.
text
()).
toBe
(
'
Expand
'
);
});
});
...
...
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