mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-12-04 21:59:58 -05:00
Many fixes split out from the feature/unified-query branch. Installing diagnostic tools in the built images. Displaying video comment statistics. Echoing error when install.sh fails.
This commit is contained in:
parent
78806b6060
commit
ba2dd6dd11
12 changed files with 121 additions and 14 deletions
|
|
@ -229,7 +229,7 @@ export function RequiredAsterisk() {
|
|||
return <span style={{color: '#db2828'}}> *</span>
|
||||
}
|
||||
|
||||
export let defaultVideoOrder = '-published_datetime';
|
||||
export let defaultFileOrder = '-published_datetime';
|
||||
export let defaultSearchOrder = 'rank';
|
||||
|
||||
export const frequencyOptions = [{key: null, text: '', value: null}, {
|
||||
|
|
@ -580,7 +580,7 @@ export function textEllipsis(str, maxLength = 100, {side = "end", ellipsis = "..
|
|||
}
|
||||
|
||||
export function TabLinks({links}) {
|
||||
const [searchParams, setSearchParams] = useSearchParams();
|
||||
const [searchParams] = useSearchParams();
|
||||
|
||||
const getTo = (to) => {
|
||||
return `${to}?${searchParams.toString()}`;
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import {
|
|||
CardLink,
|
||||
CardPoster,
|
||||
defaultSearchOrder,
|
||||
defaultVideoOrder,
|
||||
defaultFileOrder,
|
||||
Duration,
|
||||
encodeMediaPath,
|
||||
ErrorMessage,
|
||||
|
|
@ -65,7 +65,7 @@ function VideosPage() {
|
|||
const {searchParams} = React.useContext(QueryContext);
|
||||
const [selectedVideos, setSelectedVideos] = useState([]);
|
||||
|
||||
let searchOrder = defaultVideoOrder;
|
||||
let searchOrder = defaultFileOrder;
|
||||
if (searchParams.get('order')) {
|
||||
// Use whatever order the user specified.
|
||||
searchOrder = searchParams.get('order');
|
||||
|
|
@ -238,6 +238,9 @@ function VideosStatistics() {
|
|||
{key: 'month', label: 'Downloads Past Month'},
|
||||
{key: 'year', label: 'Downloads Past Year'},
|
||||
{key: 'sum_duration', label: 'Total Duration'},
|
||||
{key: 'have_comments', label: 'Have Comments'},
|
||||
{key: 'no_comments', label: 'Missing Comments'},
|
||||
{key: 'failed_comments', label: 'Failed Comments'},
|
||||
];
|
||||
const historicalNames = [
|
||||
{key: 'average_count', label: 'Average Monthly Downloads'},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue