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

Start to vueify /history #9201

Merged
merged 53 commits into from
Mar 21, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
6490cad
Start to vueify /history
p0psicles Feb 11, 2021
51491cf
Merge remote-tracking branch 'origin/develop' into feature/vueify-his…
p0psicles Feb 13, 2021
eddbaf2
Update history api.
p0psicles Feb 13, 2021
ac7bbbb
Fix history-compact.vue and history-detailed.vue components.
p0psicles Feb 13, 2021
c621e82
Moved checkHistory to history module.
p0psicles Feb 13, 2021
ba0360a
Fix filtering the history table.
p0psicles Feb 13, 2021
71ea7ef
Remove history-new.vue
p0psicles Feb 14, 2021
3507ebe
Fix loading history records
p0psicles Feb 14, 2021
94a4ae5
Error handling when localStorage is full
p0psicles Feb 14, 2021
7deb076
build bundles
p0psicles Feb 14, 2021
b01e928
Add pagination to compact
p0psicles Feb 14, 2021
0a1660d
Merge remote-tracking branch 'origin/develop' into feature/vueify-his…
p0psicles Feb 15, 2021
ae21170
build runtime
p0psicles Feb 15, 2021
75483db
Merge remote-tracking branch 'origin/develop' into feature/vueify-his…
p0psicles Feb 16, 2021
18dee6d
Add vue-good-table on-last-page event.
p0psicles Feb 18, 2021
3921209
Move to next page after we got new history
p0psicles Feb 19, 2021
e6546c5
Switch over to use vgt remote mode.
p0psicles Feb 21, 2021
4ab27e5
Implement history sorting. (only a select number of fields)
p0psicles Feb 23, 2021
7393fca
snakecase.
p0psicles Feb 24, 2021
eba3fd9
Merge remote-tracking branch 'origin/develop' into feature/vueify-his…
p0psicles Mar 1, 2021
3e186ec
Add basic filter.
p0psicles Mar 1, 2021
04c2a36
Check for filter value if empty
p0psicles Mar 1, 2021
834ecc2
Added filters for other columns.
p0psicles Mar 14, 2021
e0900c4
Update comments
p0psicles Mar 14, 2021
384676f
prevent keyerror
p0psicles Mar 14, 2021
78226ee
Update history api, with filters
p0psicles Mar 14, 2021
726a7af
Remove invalidSizeMessage
p0psicles Mar 14, 2021
a375ea7
Update styling for dark/light
p0psicles Mar 14, 2021
6cfbeb4
This can be episodes. Is not used icw vue-good-table anyway.
p0psicles Mar 15, 2021
6b69470
Add rowStyleClass (snatched,downloaded, ...) colors.
p0psicles Mar 15, 2021
b0013cc
Typo
p0psicles Mar 15, 2021
3a8264e
Fixed compact mode component.
p0psicles Mar 15, 2021
863c96b
Fixed bug in show-header component.
p0psicles Mar 15, 2021
d795c4d
Part of the history compact mode fixes.
p0psicles Mar 15, 2021
f006f57
Remove INITIALIZE_HISTORY_STORE.
p0psicles Mar 15, 2021
6c625b3
Fixed styling.
p0psicles Mar 15, 2021
d90cd99
Bump vue-good-table version (commit)
p0psicles Mar 15, 2021
a15a1ba
Fix KeyError
p0psicles Mar 15, 2021
583d960
Align inputs
p0psicles Mar 15, 2021
7be1968
Fix save per-page pagination value in cookie
p0psicles Mar 16, 2021
2f210da
lint and lint-css
p0psicles Mar 16, 2021
a4b3ac7
Provide subtitle provider
p0psicles Mar 18, 2021
5d79c2e
Fixed sorting
p0psicles Mar 18, 2021
e0d3232
history-compact: Fix saving sort in cookie
p0psicles Mar 21, 2021
44a4a00
lint
p0psicles Mar 21, 2021
4f735b0
Add break-word to tooltips
p0psicles Mar 21, 2021
67c8b92
Rename to `Missing Show`
p0psicles Mar 21, 2021
4ece168
Merge remote-tracking branch 'remotes/origin/develop' into feature/vu…
p0psicles Mar 21, 2021
da19e98
Fix test
p0psicles Mar 21, 2021
1fd7d67
Fix flake
p0psicles Mar 21, 2021
df3219e
yarn dev
p0psicles Mar 21, 2021
c5580d9
Remove unused imports
p0psicles Mar 21, 2021
5e02ea0
Merge branch 'feature/vueify-history' of https://github.com/pymedusa/…
p0psicles Mar 21, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
snakecase.
Start with adding columnFilter.
  • Loading branch information
p0psicles committed Feb 24, 2021
commit 7393fca1fb019893e3195b284e655a2215ad1af0
10 changes: 5 additions & 5 deletions medusa/server/api/v2/history.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ def get(self, series_slug, path_param):
compact_layout = bool(self.get_argument('compact', default=False))
return_last = bool(self.get_argument('last', default=False))
total_rows = self.get_argument('total', default=None)
sortField = self.get_argument('sortfield', default=None)
sortOrder = self.get_argument('sortorder', default='asc')
sort_field = self.get_argument('sortfield', default=None)
sort_order = self.get_argument('sortorder', default='asc')
headers = {}

if return_last:
Expand Down Expand Up @@ -80,9 +80,9 @@ def get(self, series_slug, path_param):
'quality': 'quality'
}

if sortField is not None:
if sortable_fields.get(sortField.lower()):
sql_base += f' ORDER BY {sortable_fields[sortField.lower()]} {sortOrder}'
if sort_field is not None:
if sortable_fields.get(sort_field.lower()):
sql_base += f' ORDER BY {sortable_fields[sort_field.lower()]} {sort_order}'

if total_rows:
sql_base += ' LIMIT ?'
Expand Down
12 changes: 11 additions & 1 deletion themes-default/slim/src/components/history-detailed.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
@on-page-change="onPageChange"
@on-per-page-change="onPerPageChange"
@on-sort-change="onSortChange"
@on-column-filter="onColumnFilter"

:columns="columns"
:rows="remoteHistory.rows"
Expand Down Expand Up @@ -127,6 +128,9 @@ export default {
}, {
label: 'Action',
field: 'statusName',
filterOptions: {
enabled: true,
},
hidden: getCookie('Action')
}, {
label: 'Quality',
Expand All @@ -136,6 +140,9 @@ export default {
}, {
label: 'Provider',
field: 'provider.id',
filterOptions: {
enabled: true,
},
hidden: getCookie('Provider')
}, {
label: 'Size',
Expand All @@ -148,6 +155,9 @@ export default {
label: 'Client Status',
field: 'clientStatus',
type: 'number',
filterOptions: {
enabled: true,
},
hidden: getCookie('Client Status')
}];

Expand Down Expand Up @@ -236,7 +246,7 @@ export default {
onColumnFilter(params) {
console.log('on column filter change');
console.log(params);
this.updateParams(params);
this.remoteHistory.filter = params;
this.loadItems();
},
// load items is what brings back the rows from server
Expand Down
3 changes: 2 additions & 1 deletion themes-default/slim/src/store/modules/history.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ const state = {
sort: {
field: 'date',
type: 'desc'
}
},
filter: null
},
remoteCompact: {
rows: [],
Expand Down
6 changes: 3 additions & 3 deletions themes/dark/assets/js/medusa-runtime.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions themes/light/assets/js/medusa-runtime.js

Large diffs are not rendered by default.