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:
Roland 2024-04-14 13:06:03 -06:00
parent 78806b6060
commit ba2dd6dd11
No known key found for this signature in database
GPG key ID: 9D6DBD3ACF11AB93
12 changed files with 121 additions and 14 deletions

View file

@ -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()}`;

View file

@ -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'},