Merge pull request #396 from ProfYaffle/master

WebUI tidy-up: Option groupings, updated help text, and user option to determine page size for upcoming/completed/failed recordings.
This commit is contained in:
perexg 2014-05-26 11:25:11 +02:00
commit 7e8b36ba1e
9 changed files with 247 additions and 111 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

View file

@ -20,21 +20,26 @@
<dd>Select the container format used to store recordings.
<dt>Cache scheme
<dd>Select the cache scheme used to store recordings.
<dd>Select the cache scheme used to store recordings. Leave as "system" unless you have a special case for one of the others.
<br><br>
<dd>Whenever you read or write data to the filesystems, the information is kept (cached) in memory for a while. This means that regularly-access files are available quickly without going back to the disc; it also means that there's a disconnect when writing between the write request (from the application) and the actual write itself (to the disc/storage) as changes are buffered to be written in one go.</dd>
<dl>
<dt>System
<dd>Standard system caching.
<dt>Do not keep
<dd>Do not keep the stored data in system's cache.
<dt>Sync
<dd>Sync the stored data with medium (disk).
<dt>Sync + Do not keep
<dd>Combination of two above variants.
<dt>Unknown</dt>
<dd>A placeholder status, meaning that the configuration isn't properly set.</dd>
<dt>System</dt>
<dd>Change nothing and rely on standard (default) system caching to behave as it normally would.</dd>
<dt>Do not keep</dt>
<dd>Tell the system that you're not expecting to re-use the data soon, so don't keep it in cache. The data will still be buffered for writing. <i>Useful e.g. in a RAM-limited system like a Pi (given that you're unlikely to be watching while recording, so data can be discarded now and read back from disc later).</i></dd>
<dt>Sync</dt>
<dd>Tell the system to write the data immediately. This doesn't affect whether or not it's cached. <i>Useful e.g. if you've a particular problem with data loss due to delayed write (such as if you get frequent transient power problems).</i></dd>
<dt>Sync + Do not keep</dt>
<dd>A combination of last two variants above - data is written immediately and then discarded from cache.</dd>
</dl>

View file

@ -1,34 +1,85 @@
<div class="hts-doc-text">
<img src="docresources/configgeneraltab.png">
<p>
This tabs allow configuration of several general parameters that affect the
core TVH functionality.
</p>
<dl>
<br><br>
<hr>
<b>Language Settings</b>
<hr>
<dt>Default Language(s)
<dd>
Select the list of languages (in order of priority) to be used for supplying
EPG information to clients that don't provide their own configuration.
EPG information to clients that don't provide their own configuration.</dd>
<p>
The EPG information is NOT translated, this only applies to EPG providers
that give information (titles, descriptions, etc..) in multiple languages.
<dd>The EPG information is NOT translated, this only applies to EPG providers
that give information (titles, descriptions, etc..) in multiple languages.</dd>
<br><br>
<hr>
<b>DVB Scan Files</b>
<hr>
<dt>DVB scan files path:
<dd>
Select the path to use for DVB scan configuration files. Typically
dvb-apps stores these in /usr/share/dvb/. Leave blank to use TVH's internal
file set.
</dl>
file set.</dd>
<p>
Icon caching - this will cache any channel icons or other images (such as
EPG metadata). These will then be served from the local webserver, this
can be useful for multi-client systems and generally to reduce hits on
upstream providers.
</p>
<br><br>
<hr>
<b>Time Update</b>
<hr>
<dl>
<dd>Tvheadend has a built-in capability to update the system time.
However, you should bear in mind that DVB time is not highly accurate and is
prone to both jitter and variation between different transponders.</dd>
<br>
<dd>Where possible, it's probably still better to use an internet based NTP source
to synchronise the system clock (i.e. through the underlying operating system).</dd>
<dl>
<dt>Update time</dt>
<dd>Enable system time updates. This will only work if the user
running TVH has rights to update the system clock (normally only root).</dd>
<dt>Enable NTP driver</dt>
<dd>This will create an NTP driver (using shmem interface) that you can feed
into ntpd. This can be run without root priviledges, but generally the
performance is not that great.</dd>
<dt>Update tolerance (milliseconds)</dt>
<dd>Only update the system clock (doesn't affect NTP driver) if the delta
between the system clock and DVB time is greater than this. This can help
stop horrible oscillations on the system clock.</dd>
</dl>
<br><br>
<hr>
<b>Transcoding</b>
<hr>
<dd>If enabled at build time (src/plumbing/transcoding.c), this allows you to switch transcoding support on and off.</dd>
<br><br>
<hr>
<b>Image Caching</b>
<hr>
<dd>This will cache any channel icons or other images (such as
EPG metadata) to be served from the local webserver. This
can be useful for multi-client systems and, generally, to reduce hits on
upstream providers.</dd>
<dl>
<dt>Enabled
<dd>
@ -48,31 +99,7 @@
<dt>Ignore invalid SSL certificates
<dd>Ignore invalid/unverifiable (expired, self-certified, etc.) certificates
</dl>
<p>
Time Update - TVH now has a built-in capability to update the systme time.
However you should bare in mind that DVB time is not highly accurate and is
prone to both jitter and variation between different transponders.
<br/>
Where possible its probably still better to use an internet based NTP source
to synchronise the system clock.
</p>
<dl>
<dt>Update time
<dd>Enable system time updates, this will only work if the user
running TVH has rights to update the system clock (normally only root).
<dt>Enable NTP driver
<dd>This will create an NTP driver (using shmem interface) that you can feed
into ntpd. This can be run without root priviledges, but generally the
performance is not that great.
<dt>Update tolerance (milliseconds)
<dd>Only update the system clock (doesn't affect NTP driver) if the delta
between the system clock and DVB time is greater than this. This can help
stop horrible oscillations on the system clock.
</dl>
</dl>
</div>

View file

@ -1,5 +1,7 @@
<div class="hts-doc-text">
<img src="docresources/configtimeshifttab.png">
<p>
This tab is used to configure timeshift properties.

View file

@ -34,8 +34,9 @@ tvheadend.comet.on('config', function(m) {
tvheadend.miscconf = function() {
/*
* Basic Config
*/
* Basic Config
*/
var confreader = new Ext.data.JsonReader({
root: 'config'
},
@ -46,12 +47,12 @@ tvheadend.miscconf = function() {
]);
/* ****************************************************************
* Form Fields
* ***************************************************************/
* Form Fields
* ***************************************************************/
/*
* DVB path
*/
* DVB path
*/
var dvbscanPath = new Ext.form.TextField({
fieldLabel: 'DVB scan files path',
@ -60,9 +61,18 @@ tvheadend.miscconf = function() {
width: 400
});
var dvbscanWrap = new Ext.form.FieldSet({
title: 'DVB Scan Files',
width: 700,
autoHeight: true,
collapsible: true,
animCollapse: true,
items : [ dvbscanPath ]
});
/*
* Language
*/
* Language
*/
var language = new Ext.ux.ItemSelector({
name: 'language',
@ -79,9 +89,19 @@ tvheadend.miscconf = function() {
fromLegend: 'Available'
});
var languageWrap = new Ext.form.FieldSet({
title: 'Language Settings',
width: 700,
autoHeight: true,
collapsible: true,
animCollapse: true,
items : [ language ]
});
/*
* Time/Date
*/
* Time/Date
*/
var tvhtimeUpdateEnabled = new Ext.form.Checkbox({
name: 'tvhtime_update_enabled',
fieldLabel: 'Update time'
@ -102,12 +122,14 @@ tvheadend.miscconf = function() {
width: 700,
autoHeight: true,
collapsible: true,
animCollapse: true,
items: [tvhtimeUpdateEnabled, tvhtimeNtpEnabled, tvhtimeTolerance]
});
/*
* Image cache
*/
* Image cache
*/
if (tvheadend.capabilities.indexOf('imagecache') !== -1) {
var imagecache_reader = new Ext.data.JsonReader({
root: 'entries'
@ -141,6 +163,7 @@ tvheadend.miscconf = function() {
width: 700,
autoHeight: true,
collapsible: true,
animCollapse: true,
items: [imagecacheEnabled, imagecacheOkPeriod, imagecacheFailPeriod,
imagecacheIgnoreSSLCert]
});
@ -161,8 +184,9 @@ tvheadend.miscconf = function() {
}
/*
* Transcoding
*/
* Transcoding
*/
var transcodingEnabled = new Ext.form.Checkbox({
name: 'transcoding_enabled',
fieldLabel: 'Enabled'
@ -173,15 +197,17 @@ tvheadend.miscconf = function() {
width: 700,
autoHeight: true,
collapsible: true,
animCollapse: true,
items: [transcodingEnabled]
});
if (tvheadend.capabilities.indexOf('transcoding') === -1)
transcodingPanel.hide();
/* ****************************************************************
* Form
* ***************************************************************/
* Form
* ***************************************************************/
var saveButton = new Ext.Button({
text: "Save configuration",
@ -206,18 +232,19 @@ tvheadend.miscconf = function() {
layout: 'form',
defaultType: 'textfield',
autoHeight: true,
items: [language, dvbscanPath,
tvhtimePanel,
transcodingPanel]
items: [languageWrap, dvbscanWrap, tvhtimePanel, transcodingPanel]
});
var _items = [confpanel];
if (imagecache_form)
_items.push(imagecache_form);
var panel = new Ext.Panel({
title: 'General',
iconCls: 'wrench',
border: false,
autoScroll: true,
bodyStyle: 'padding:15px',
layout: 'form',
items: _items,
@ -225,8 +252,8 @@ tvheadend.miscconf = function() {
});
/* ****************************************************************
* Load/Save
* ***************************************************************/
* Load/Save
* ***************************************************************/
confpanel.on('render', function() {
confpanel.getForm().load({

View file

@ -14,7 +14,6 @@ tvheadend.dvrprio = new Ext.data.SimpleStore({
['unimportant', 'Unimportant']]
});
//For the container configuration
tvheadend.containers = new Ext.data.JsonStore({
autoLoad: true,
@ -39,7 +38,6 @@ tvheadend.caches = new Ext.data.JsonStore({
}
});
/**
* Configuration names
*/
@ -359,7 +357,6 @@ tvheadend.dvrschedule = function(title, iconCls, dvrStore) {
text: 'Create',
handler: createRecording
}]
});
win = new Ext.Window({
@ -386,6 +383,42 @@ tvheadend.dvrschedule = function(title, iconCls, dvrStore) {
}
;
/* Create combobox to allow user to select page size for upcoming/completed/failed recordings */
var itemPageCombo = new Ext.form.ComboBox({
name : 'itemsperpage',
width: 50,
mode : 'local',
store: new Ext.data.ArrayStore({
fields: ['perpage'],
data : [['10'],['20'],['30'],['40'],['50'],['60'],['70'],['80'],['90'],['100']]
}),
value : '20',
listWidth : 40,
triggerAction : 'all',
displayField : 'perpage',
valueField : 'perpage',
editable : true,
forceSelection : true,
listeners : {
scope: this,
'select' : function(combo, record) {
bbar.pageSize = parseInt(record.get('perpage'), 10);
bbar.doLoad(bbar.cursor);
}
}
});
/* Bottom toolbar to include default previous/goto-page/next and refresh buttons, also number-of-items combobox */
var bbar = new Ext.PagingToolbar({
store : dvrStore,
displayInfo : true,
items : ['-','Recordings per page: ',itemPageCombo],
displayMsg : 'Programs {0} - {1} of {2}',
emptyMsg : "No programs to display"
});
var panel = new Ext.grid.GridPanel({
loadMask: true,
stripeRows: true,
@ -409,14 +442,7 @@ tvheadend.dvrschedule = function(title, iconCls, dvrStore) {
new tvheadend.help('Digital Video Recorder', 'dvrlog.html');
}
}],
bbar: new Ext.PagingToolbar({
store: dvrStore,
pageSize: 20,
displayInfo: true,
displayMsg: 'Programs {0} - {1} of {2}',
emptyMsg: "No programs to display"
})
bbar: bbar
});
panel.on('rowclick', rowclicked);
@ -436,7 +462,6 @@ tvheadend.dvrschedule = function(title, iconCls, dvrStore) {
tvheadend.autoreceditor = function() {
var fm = Ext.form;
var cm = new Ext.grid.ColumnModel({
defaultSortable: true,
columns:
@ -938,7 +963,6 @@ tvheadend.dvrsettings = function() {
name: 'whitespaceInTitle'
});
/* Sub-Panel - DVR behaviour */
var DVRBehaviour = new Ext.form.FieldSet({
@ -946,6 +970,7 @@ tvheadend.dvrsettings = function() {
width: 700,
autoHeight: true,
collapsible: true,
animCollapse: true,
items: [recordingContainer, cacheScheme, logRetention, timeBefore, timeAfter, postProcessing]
});
@ -956,6 +981,7 @@ tvheadend.dvrsettings = function() {
width: 700,
autoHeight: true,
collapsible: true,
animCollapse: true,
items: [recordingPath, recordingPermissions, PATrewrite, PMTrewrite, tagMetadata, skipCommercials]
});
@ -966,18 +992,37 @@ tvheadend.dvrsettings = function() {
width: 700,
autoHeight: true,
collapsible: true,
animCollapse: true,
items: [directoryPermissions, dirsPerDay, dirsPerChannel, dirsPerTitle]
});
/* Sub-Panel - File operations */
/* Sub-Panel - File operations - Break into two 4-item panels */
var FileHandlingPanelA = new Ext.form.FieldSet({
width: 350,
border: false,
autoHeight: true,
items : [incChannelInTitle, incDateInTitle, incTimeInTitle, incEpisodeInTitle]
});
var FileHandlingPanelB = new Ext.form.FieldSet({
width: 350,
border: false,
autoHeight: true,
items : [incSubtitleInTitle, episodeFirst, stripUnsafeChars, stripWhitespace]
});
var FileHandlingPanel = new Ext.form.FieldSet({
title: 'Filename Options',
width: 700,
autoHeight: true,
collapsible: true,
items: [incChannelInTitle, incDateInTitle, incTimeInTitle, incEpisodeInTitle,
incSubtitleInTitle, episodeFirst, stripUnsafeChars, stripWhitespace]
animCollapse : true,
items : [{
layout: 'column',
border: false,
items : [FileHandlingPanelA, FileHandlingPanelB]
}]
});
/* Main (form) panel */
@ -990,6 +1035,7 @@ tvheadend.dvrsettings = function() {
anchor: '100% 50%',
labelAlign: 'right',
labelWidth: 250,
autoScroll: true,
waitMsgTarget: true,
reader: confreader,
defaultType: 'textfield',

View file

@ -47,9 +47,9 @@ tvheadend.timeshift = function() {
});
var timeshiftUnlPeriod = new Ext.form.Checkbox({
fieldLabel: '&nbsp;&nbsp;&nbsp;(unlimited)',
fieldLabel: 'Unlimited time',
name: 'timeshift_unlimited_period',
Width: 300
width: 300
});
var timeshiftMaxSize = new Ext.form.NumberField({
@ -60,19 +60,20 @@ tvheadend.timeshift = function() {
});
var timeshiftUnlSize = new Ext.form.Checkbox({
fieldLabel: '&nbsp;&nbsp;&nbsp;(unlimited)',
fieldLabel: 'Unlimited size',
name: 'timeshift_unlimited_size',
Width: 300
width: 300
});
/* ****************************************************************
* Events
* ***************************************************************/
timeshiftUnlPeriod.on('check', function(e, c) {
timeshiftUnlPeriod.on('check', function(e, c){
timeshiftMaxPeriod.setDisabled(c);
});
timeshiftUnlSize.on('check', function(e, c) {
timeshiftUnlSize.on('check', function(e, c){
timeshiftMaxSize.setDisabled(c);
});
@ -94,25 +95,53 @@ tvheadend.timeshift = function() {
}
});
var confpanel = new Ext.FormPanel({
title: 'Timeshift',
iconCls: 'clock',
border: false,
bodyStyle: 'padding:15px',
labelAlign: 'left',
labelWidth: 150,
waitMsgTarget: true,
reader: confreader,
layout: 'form',
defaultType: 'textfield',
var timeshiftPanelA = new Ext.form.FieldSet({
width: 500,
autoHeight: true,
items: [
timeshiftEnabled, timeshiftOndemand,
border: false,
items : [timeshiftMaxPeriod, timeshiftMaxSize]
});
var timeshiftPanelB = new Ext.form.FieldSet({
width: 200,
autoHeight: true,
border: false,
items : [timeshiftUnlPeriod,timeshiftUnlSize]
});
var timeshiftPanel = new Ext.form.FieldSet({
title: 'Timeshift Options',
width: 700,
autoHeight: true,
collapsible: true,
animCollapse: true,
items : [
timeshiftEnabled,
timeshiftOndemand,
timeshiftPath,
timeshiftMaxPeriod, timeshiftUnlPeriod,
timeshiftMaxSize, timeshiftUnlSize
],
tbar: [saveButton, '->', helpButton]
{
layout: 'column',
border: false,
items: [timeshiftPanelA, timeshiftPanelB]
}
]
});
var confpanel = new Ext.form.FormPanel({
title : 'Timeshift',
iconCls : 'clock',
border : false,
bodyStyle : 'padding:15px',
labelAlign : 'left',
labelWidth : 150,
waitMsgTarget : true,
reader : confreader,
layout : 'form',
defaultType : 'textfield',
autoHeight : true,
animCollapse : true,
items : [timeshiftPanel],
tbar : [saveButton, '->', helpButton]
});
/* ****************************************************************