Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add auto-refresh time interval setting #2581

Merged
merged 4 commits into from
Nov 17, 2017
Merged

Add auto-refresh time interval setting #2581

merged 4 commits into from
Nov 17, 2017

Conversation

maciaszczykm
Copy link
Member

No description provided.

@maciaszczykm maciaszczykm self-assigned this Nov 15, 2017
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Nov 15, 2017
@codecov
Copy link

codecov bot commented Nov 15, 2017

Codecov Report

Merging #2581 into master will increase coverage by 0.03%.
The diff coverage is 43.75%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2581      +/-   ##
==========================================
+ Coverage   53.59%   53.62%   +0.03%     
==========================================
  Files         560      562       +2     
  Lines       11882    11949      +67     
==========================================
+ Hits         6368     6408      +40     
- Misses       5296     5319      +23     
- Partials      218      222       +4
Impacted Files Coverage Δ
src/app/frontend/settings/controller.js 37.5% <ø> (ø) ⬆️
src/app/frontend/logs/component.js 74.64% <33.33%> (-3.62%) ⬇️
src/app/frontend/common/settings/service.js 72.72% <75%> (+0.5%) ⬆️
...rontend/common/resource/editresource_controller.js 60.86% <0%> (-4.14%) ⬇️
...p/backend/integration/metric/common/aggregation.go 87.69% <0%> (-1.54%) ⬇️
src/app/frontend/common/resource/verber_service.js 100% <0%> (ø) ⬆️
src/app/backend/sync/poll/watcher.go 61.11% <0%> (ø)
src/app/backend/sync/poll/secret.go 65.85% <0%> (ø)
src/app/backend/sync/secret.go 69.49% <0%> (+0.07%) ⬆️
src/app/backend/client/manager.go 65.73% <0%> (+0.19%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0c919e2...27a31a1. Read the comment docs.

this.interval_(() => {
if (this.logsService.getFollowing()) {
this.loadNewest();
this.log_.info('Automatically refreshed logs');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd remove that to avoid unnecessary spam in a console.

@@ -123,12 +131,15 @@ export class LogsController {
* @private
*/
registerIntervalFunction_() {
Copy link
Member

@floreks floreks Nov 16, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After starting it, interval function will be running in the background forever. I'd start/stop whole interval function on button click. It returns a promise and interval.cancel(promise) can be used to stop it.

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Nov 17, 2017
@@ -176,6 +183,7 @@ export class LogsController {
* @export
*/
toggleLogFollow() {
this.toggleIntervalFunction_();
this.logsService.setFollowing();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By swapping this line with toggling interval we can get rid of below if statement. Logs will be reloaded immediately after first interval start.

@floreks floreks merged commit 985f269 into kubernetes:master Nov 17, 2017
@maciaszczykm maciaszczykm deleted the interval-setting branch November 17, 2017 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants