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
879724fc
Commit
879724fc
authored
Jul 09, 2020
by
Taurie Davis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Migrate log controller buttons to GlButton
parent
9d64b959
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
26 deletions
+25
-26
app/assets/javascripts/logs/components/environment_logs.vue
app/assets/javascripts/logs/components/environment_logs.vue
+1
-1
app/assets/javascripts/logs/components/log_control_buttons.vue
...ssets/javascripts/logs/components/log_control_buttons.vue
+20
-17
app/assets/stylesheets/pages/environment_logs.scss
app/assets/stylesheets/pages/environment_logs.scss
+0
-4
spec/frontend/logs/components/log_control_buttons_spec.js
spec/frontend/logs/components/log_control_buttons_spec.js
+4
-4
No files found.
app/assets/javascripts/logs/components/environment_logs.vue
View file @
879724fc
...
@@ -202,7 +202,7 @@ export default {
...
@@ -202,7 +202,7 @@ export default {
<log-control-buttons
<log-control-buttons
ref=
"scrollButtons"
ref=
"scrollButtons"
class=
"flex-grow-0 pr-2 mb-2 controllers"
class=
"flex-grow-0 pr-2 mb-2 controllers
gl-display-inline-flex
"
:scroll-down-button-disabled=
"scrollDownButtonDisabled"
:scroll-down-button-disabled=
"scrollDownButtonDisabled"
@
refresh=
"refreshPodLogs()"
@
refresh=
"refreshPodLogs()"
@
scrollDown=
"scrollDown"
@
scrollDown=
"scrollDown"
...
...
app/assets/javascripts/logs/components/log_control_buttons.vue
View file @
879724fc
<
script
>
<
script
>
import
{
GlDeprecatedButton
,
GlTooltipDirective
}
from
'
@gitlab/ui
'
;
import
{
GlButton
,
GlTooltipDirective
}
from
'
@gitlab/ui
'
;
import
Icon
from
'
~/vue_shared/components/icon.vue
'
;
export
default
{
export
default
{
components
:
{
components
:
{
Icon
,
GlButton
,
GlDeprecatedButton
,
},
},
directives
:
{
directives
:
{
GlTooltip
:
GlTooltipDirective
,
GlTooltip
:
GlTooltipDirective
,
...
@@ -51,14 +49,16 @@ export default {
...
@@ -51,14 +49,16 @@ export default {
:title=
"__('Scroll to top')"
:title=
"__('Scroll to top')"
aria-labelledby=
"scroll-to-top"
aria-labelledby=
"scroll-to-top"
>
>
<gl-
deprecated-
button
<gl-button
id=
"scroll-to-top"
id=
"scroll-to-top"
class=
"
btn-blank js-scroll-to-top
"
class=
"
js-scroll-to-top gl-mr-2 btn-blank
"
:aria-label=
"__('Scroll to top')"
:aria-label=
"__('Scroll to top')"
:disabled=
"scrollUpButtonDisabled"
:disabled=
"scrollUpButtonDisabled"
icon=
"scroll_up"
category=
"primary"
variant=
"default"
@
click=
"handleScrollUp()"
@
click=
"handleScrollUp()"
><icon
name=
"scroll_up"
/>
/></gl-deprecated-button>
</div>
</div>
<div
<div
v-if=
"scrollDownAvailable"
v-if=
"scrollDownAvailable"
...
@@ -68,25 +68,28 @@ export default {
...
@@ -68,25 +68,28 @@ export default {
:title=
"__('Scroll to bottom')"
:title=
"__('Scroll to bottom')"
aria-labelledby=
"scroll-to-bottom"
aria-labelledby=
"scroll-to-bottom"
>
>
<gl-
deprecated-
button
<gl-button
id=
"scroll-to-bottom"
id=
"scroll-to-bottom"
class=
"
btn-blank js-scroll-to-bottom
"
class=
"
js-scroll-to-bottom gl-mr-2 btn-blank
"
:aria-label=
"__('Scroll to bottom')"
:aria-label=
"__('Scroll to bottom')"
:v-if=
"scrollDownAvailable"
:v-if=
"scrollDownAvailable"
:disabled=
"scrollDownButtonDisabled"
:disabled=
"scrollDownButtonDisabled"
icon=
"scroll_down"
category=
"primary"
variant=
"default"
@
click=
"handleScrollDown()"
@
click=
"handleScrollDown()"
><icon
name=
"scroll_down"
/>
/></gl-deprecated-button>
</div>
</div>
<gl-
deprecated-
button
<gl-button
id=
"refresh-log"
id=
"refresh-log"
v-gl-tooltip
v-gl-tooltip
class=
"
ml-1 px-2
js-refresh-log"
class=
"js-refresh-log"
:title=
"__('Refresh')"
:title=
"__('Refresh')"
:aria-label=
"__('Refresh')"
:aria-label=
"__('Refresh')"
icon=
"retry"
category=
"primary"
variant=
"default"
@
click=
"handleRefreshClick"
@
click=
"handleRefreshClick"
>
/>
<icon
name=
"retry"
/>
</gl-deprecated-button>
</div>
</div>
</
template
>
</
template
>
app/assets/stylesheets/pages/environment_logs.scss
View file @
879724fc
...
@@ -31,10 +31,6 @@
...
@@ -31,10 +31,6 @@
width
:
160px
;
width
:
160px
;
}
}
}
}
.controllers
{
@include
build-controllers
(
16px
,
flex-end
,
false
,
2
,
inline
);
}
}
}
.log-lines
,
.log-lines
,
...
...
spec/frontend/logs/components/log_control_buttons_spec.js
View file @
879724fc
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
LogControlButtons
from
'
~/logs/components/log_control_buttons.vue
'
;
import
LogControlButtons
from
'
~/logs/components/log_control_buttons.vue
'
;
describe
(
'
LogControlButtons
'
,
()
=>
{
describe
(
'
LogControlButtons
'
,
()
=>
{
...
@@ -31,9 +31,9 @@ describe('LogControlButtons', () => {
...
@@ -31,9 +31,9 @@ describe('LogControlButtons', () => {
expect
(
wrapper
.
isVueInstance
()).
toBe
(
true
);
expect
(
wrapper
.
isVueInstance
()).
toBe
(
true
);
expect
(
wrapper
.
isEmpty
()).
toBe
(
false
);
expect
(
wrapper
.
isEmpty
()).
toBe
(
false
);
expect
(
findScrollToTop
().
is
(
Gl
Deprecated
Button
)).
toBe
(
true
);
expect
(
findScrollToTop
().
is
(
GlButton
)).
toBe
(
true
);
expect
(
findScrollToBottom
().
is
(
Gl
Deprecated
Button
)).
toBe
(
true
);
expect
(
findScrollToBottom
().
is
(
GlButton
)).
toBe
(
true
);
expect
(
findRefreshBtn
().
is
(
Gl
Deprecated
Button
)).
toBe
(
true
);
expect
(
findRefreshBtn
().
is
(
GlButton
)).
toBe
(
true
);
});
});
it
(
'
emits a `refresh` event on click on `refresh` button
'
,
()
=>
{
it
(
'
emits a `refresh` event on click on `refresh` button
'
,
()
=>
{
...
...
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