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
1e8d75c4
Commit
1e8d75c4
authored
Aug 05, 2020
by
Libor Vanc
Committed by
Mike Greiling
Aug 05, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replaced deprecated button syntax
parent
07de2c2d
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
16 deletions
+19
-16
app/assets/javascripts/grafana_integration/components/grafana_integration.vue
...ts/grafana_integration/components/grafana_integration.vue
+5
-5
spec/frontend/grafana_integration/components/__snapshots__/grafana_integration_spec.js.snap
...components/__snapshots__/grafana_integration_spec.js.snap
+11
-7
spec/frontend/grafana_integration/components/grafana_integration_spec.js
...rafana_integration/components/grafana_integration_spec.js
+3
-4
No files found.
app/assets/javascripts/grafana_integration/components/grafana_integration.vue
View file @
1e8d75c4
<
script
>
<
script
>
import
{
Gl
Deprecated
Button
,
GlFormGroup
,
GlFormInput
,
GlFormCheckbox
}
from
'
@gitlab/ui
'
;
import
{
GlButton
,
GlFormGroup
,
GlFormInput
,
GlFormCheckbox
}
from
'
@gitlab/ui
'
;
import
{
mapState
,
mapActions
}
from
'
vuex
'
;
import
{
mapState
,
mapActions
}
from
'
vuex
'
;
import
Icon
from
'
~/vue_shared/components/icon.vue
'
;
import
Icon
from
'
~/vue_shared/components/icon.vue
'
;
export
default
{
export
default
{
components
:
{
components
:
{
Gl
Deprecated
Button
,
GlButton
,
GlFormCheckbox
,
GlFormCheckbox
,
GlFormGroup
,
GlFormGroup
,
GlFormInput
,
GlFormInput
,
...
@@ -58,7 +58,7 @@ export default {
...
@@ -58,7 +58,7 @@ export default {
<h3
class=
"js-section-header h4"
>
<h3
class=
"js-section-header h4"
>
{{
s__
(
'
GrafanaIntegration|Grafana authentication
'
)
}}
{{
s__
(
'
GrafanaIntegration|Grafana authentication
'
)
}}
</h3>
</h3>
<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__
(
'
GrafanaIntegration|Embed Grafana charts in GitLab issues.
'
)
}}
{{
s__
(
'
GrafanaIntegration|Embed Grafana charts in GitLab issues.
'
)
}}
</p>
</p>
...
@@ -93,9 +93,9 @@ export default {
...
@@ -93,9 +93,9 @@ export default {
</a>
</a>
</p>
</p>
</gl-form-group>
</gl-form-group>
<gl-
deprecated-button
variant=
"success
"
@
click=
"updateGrafanaIntegration"
>
<gl-
button
variant=
"success"
category=
"primary
"
@
click=
"updateGrafanaIntegration"
>
{{
__
(
'
Save Changes
'
)
}}
{{
__
(
'
Save Changes
'
)
}}
</gl-
deprecated-
button>
</gl-button>
</form>
</form>
</div>
</div>
</section>
</section>
...
...
spec/frontend/grafana_integration/components/__snapshots__/grafana_integration_spec.js.snap
View file @
1e8d75c4
...
@@ -16,13 +16,15 @@ exports[`grafana integration component default state to match the default snapsh
...
@@ -16,13 +16,15 @@ exports[`grafana integration component default state to match the default snapsh
</h3>
</h3>
<gl-deprecated-button-stub
<gl-button-stub
category="tertiary"
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"
...
@@ -90,14 +92,16 @@ exports[`grafana integration component default state to match the default snapsh
...
@@ -90,14 +92,16 @@ exports[`grafana integration component default state to match the default snapsh
</p>
</p>
</gl-form-group-stub>
</gl-form-group-stub>
<gl-deprecated-button-stub
<gl-button-stub
size="md"
category="primary"
icon=""
size="medium"
variant="success"
variant="success"
>
>
Save Changes
Save Changes
</gl-
deprecated-
button-stub>
</gl-button-stub>
</form>
</form>
</div>
</div>
</section>
</section>
...
...
spec/frontend/grafana_integration/components/grafana_integration_spec.js
View file @
1e8d75c4
import
{
mount
,
shallowMount
}
from
'
@vue/test-utils
'
;
import
{
mount
,
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
GrafanaIntegration
from
'
~/grafana_integration/components/grafana_integration.vue
'
;
import
GrafanaIntegration
from
'
~/grafana_integration/components/grafana_integration.vue
'
;
import
{
createStore
}
from
'
~/grafana_integration/store
'
;
import
{
createStore
}
from
'
~/grafana_integration/store
'
;
...
@@ -51,7 +51,7 @@ describe('grafana integration component', () => {
...
@@ -51,7 +51,7 @@ describe('grafana integration component', () => {
it
(
'
renders as an expand button by default
'
,
()
=>
{
it
(
'
renders as an expand button by default
'
,
()
=>
{
wrapper
=
shallowMount
(
GrafanaIntegration
,
{
store
});
wrapper
=
shallowMount
(
GrafanaIntegration
,
{
store
});
const
button
=
wrapper
.
find
(
Gl
Deprecated
Button
);
const
button
=
wrapper
.
find
(
GlButton
);
expect
(
button
.
text
()).
toBe
(
'
Expand
'
);
expect
(
button
.
text
()).
toBe
(
'
Expand
'
);
});
});
...
@@ -77,8 +77,7 @@ describe('grafana integration component', () => {
...
@@ -77,8 +77,7 @@ describe('grafana integration component', () => {
});
});
describe
(
'
submit button
'
,
()
=>
{
describe
(
'
submit button
'
,
()
=>
{
const
findSubmitButton
=
()
=>
const
findSubmitButton
=
()
=>
wrapper
.
find
(
'
.settings-content form
'
).
find
(
GlButton
);
wrapper
.
find
(
'
.settings-content form
'
).
find
(
GlDeprecatedButton
);
const
endpointRequest
=
[
const
endpointRequest
=
[
operationsSettingsEndpoint
,
operationsSettingsEndpoint
,
...
...
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