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

convert viewlogs to vue #4104

Closed
wants to merge 6 commits into from
Closed

convert viewlogs to vue #4104

wants to merge 6 commits into from

Conversation

OmgImAlexis
Copy link
Collaborator

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.

<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>
Copy link
Contributor

@sharkykh sharkykh Apr 25, 2018

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();
Copy link
Collaborator Author

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-io
Copy link

codecov-io commented Apr 25, 2018

Codecov Report

Merging #4104 into develop will increase coverage by 0.38%.
The diff coverage is 83.33%.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
medusa/server/api/v2/log.py 89.58% <83.33%> (-2.31%) ⬇️
medusa/providers/torrent/json/torrentday.py 33.7% <0%> (-2.19%) ⬇️
medusa/helpers/utils.py 61.9% <0%> (-0.6%) ⬇️
medusa/providers/torrent/html/animebytes.py 23.75% <0%> (-0.15%) ⬇️
medusa/providers/torrent/html/iptorrents.py 38.26% <0%> (+0.28%) ⬆️
medusa/search/core.py 6.95% <0%> (+0.52%) ⬆️
medusa/providers/torrent/html/nebulance.py 31.33% <0%> (+0.94%) ⬆️
medusa/providers/torrent/torznab/torznab.py 18.44% <0%> (+1.47%) ⬆️
medusa/providers/torrent/html/scenetime.py 37.81% <0%> (+1.56%) ⬆️
medusa/providers/torrent/json/xthor.py 32.23% <0%> (+1.64%) ⬆️
... and 21 more

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 6148669...ca803fc. Read the comment docs.

Copy link
Contributor

@sharkykh sharkykh left a 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);
Copy link
Contributor

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);
Copy link
Contributor

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
Copy link
Collaborator Author

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.

@OmgImAlexis OmgImAlexis added this to the backlog milestone Jun 24, 2018
@sharkykh sharkykh removed this from the backlog milestone May 28, 2019
@sharkykh
Copy link
Contributor

Superseded by #6738

@sharkykh sharkykh closed this May 28, 2019
@sharkykh sharkykh deleted the vueify-viewlogs branch May 28, 2019 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants