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
Show 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
>
/* eslint-disable vue/no-v-html */
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
{
__
,
s__
,
sprintf
}
from
'
~/locale
'
;
import
{
visitUrl
,
getBaseURL
}
from
'
~/lib/utils/url_utility
'
;
...
...
@@ -11,7 +11,7 @@ Vue.use(GlToast);
export
default
{
components
:
{
GlFormGroup
,
Gl
Deprecated
Button
,
GlButton
,
GlModal
,
GlToggle
,
},
...
...
@@ -123,7 +123,7 @@ export default {
<h4
class=
"js-section-header"
>
{{
s__
(
'
SelfMonitoring|Self monitoring
'
)
}}
</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"
>
{{
s__
(
'
SelfMonitoring|Enable or disable instance self monitoring
'
)
}}
</p>
...
...
@@ -146,6 +146,7 @@ export default {
:ok-title=
"__('Delete project')"
:cancel-title=
"__('Cancel')"
ok-variant=
"danger"
category=
"primary"
@
ok=
"deleteProject"
@
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
</h4>
<gl-deprecated-button-stub
<gl-button-stub
buttontextclasses=""
category="primary"
class="js-settings-toggle"
size="md"
variant="secondary"
icon=""
size="medium"
variant="default"
>
Expand
</gl-
deprecated-
button-stub>
</gl-button-stub>
<p
class="js-section-sub-header"
...
...
@@ -56,6 +59,7 @@ exports[`self monitor component When the self monitor project has not been creat
<gl-modal-stub
cancel-title="Cancel"
category="primary"
modalclass=""
modalid="delete-self-monitor-modal"
ok-title="Delete project"
...
...
spec/frontend/self_monitor/components/self_monitor_form_spec.js
View file @
f0d98939
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
SelfMonitor
from
'
~/self_monitor/components/self_monitor_form.vue
'
;
import
{
createStore
}
from
'
~/self_monitor/store
'
;
...
...
@@ -42,7 +42,7 @@ describe('self monitor component', () => {
it
(
'
renders as an expand button by default
'
,
()
=>
{
wrapper
=
shallowMount
(
SelfMonitor
,
{
store
});
const
button
=
wrapper
.
find
(
Gl
Deprecated
Button
);
const
button
=
wrapper
.
find
(
GlButton
);
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