-
Notifications
You must be signed in to change notification settings - Fork 276
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
convert viewlogs to vue #4104
convert viewlogs to vue #4104
Conversation
<pre><div class="notepad"><app-link id="viewlog-text-view" href="errorlogs/viewlog/?text_view=1"><img src="images/notepad.png"/></app-link></div>${log_lines}</pre> | ||
<div :class="{fanartOpacity: fanartOpacity}" class="col-md-12"> | ||
<div class="notepad"><span @click="viewLogAsText"><img src="images/notepad.png"/></span></div> | ||
<pre v-html="logs">${log_lines}</pre> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Took me way too long to figure out this issue was coming from. Vue was trying to parse {{PROPER|REPACK|REAL|RERIP}}
in the logs.
Please remove the Mako expression.
const data = await $.get('errorlogs/viewlog/?' + params); | ||
history.pushState('data', '', 'errorlogs/viewlog/?' + params); | ||
|
||
this.logs = $(data).find('pre').html(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes df69d36 unusable.
Codecov Report
@@ Coverage Diff @@
## develop #4104 +/- ##
==========================================
+ Coverage 29.31% 29.7% +0.38%
==========================================
Files 277 277
Lines 35485 37074 +1589
==========================================
+ Hits 10403 11011 +608
- Misses 25082 26063 +981
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO
|
||
this.disabled = true; | ||
|
||
const data = await $.get('errorlogs/viewlog/?' + params); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to change this to get the data from /api/v2/log
.
this.disabled = true; | ||
|
||
const data = await $.get('errorlogs/viewlog/?' + params); | ||
history.pushState('data', '', 'errorlogs/viewlog/?' + params); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't know what about the browser history. I assume we can still do this even if we're pulling data from the API.
@@ -77,10 +77,14 @@ const startVue = () => { | |||
min_level: minLevel, | |||
log_filter: filter, | |||
log_period: period, | |||
log_search: search | |||
log_search: search, | |||
limit: 100 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sharkykh we need a way to pass a time as a limit instead of just a count of items.
Superseded by #6738 |
This more or less converts the whole page over. There are a few places that're using Python vars that I'd like to replace in the review.