8000 Add option to retrieve n amount of last lines from log. by turbokongen · Pull Request #604 · home-assistant/frontend · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add option to retrieve n amount of last lines from log. #604

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

Merged
merged 6 commits into from
Nov 17, 2017

Conversation

turbokongen
Copy link
Contributor

Let the user choose to retrieve only n amount of last loglines. (Max=1000, min=0(equals the whole log) and step is 10)
image

turbokongen added a commit to home-assistant/home-assistant.io that referenced this pull request Nov 12, 2017
fabaff pushed a commit to home-assistant/home-assistant.io that referenced this pull request Nov 12, 2017
* Update control-panel.markdown

Info for  home-assistant/frontend#604

* Update control-panel.markdown

* Update control-panel.markdown
} else {
this.hass.callApi('GET', 'zwave/ozwlog')
.then((info) => {
var lines = info.split('\n');
Copy link
Member

Choose a reason for hiding this comment

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

We should not limit log lines in the frontend but instead add support to the backend

<paper-button raised on-tap='refreshLog'>Refresh</paper-button>
</div>
<div class='help-text'>
<template is='dom-repeat' items='[[ozwLogs]]' as='state'>
Copy link
Member
@balloob balloob Nov 15, 2017

Choose a reason for hiding this comment

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

If you're going to create a <pre> tag per line, why even break it up per line at all on the backend ? Just return a text and just set that to a single <pre> tag.

@balloob
Copy link
Member
balloob commented Nov 16, 2017

You're still using a <pre> tag per line. I think that it's better to just have the API return the text of the log.

@balloob
Copy link
Member
balloob commented Nov 16, 2017

I've moved your lines parameter from url param to query param. That makes more sense.

Please test it.

@balloob balloob merged commit b15edbd into home-assistant:master Nov 17, 2017
@github-actions github-actions bot locked and limited conversation to collaborators Jul 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0