diff -r cd5970c6318f -r eb3670af8100 MemeSuite.properties.in --- a/MemeSuite.properties.in Mon May 25 18:19:58 2015 +1000 +++ b/MemeSuite.properties.in Mon Jun 15 19:01:40 2015 +1000 @@ -12,3 +12,12 @@ lib.dir = @lib.dir@ db.dir = @db.dir@ sendmail = @sendmail@ +# Limits on website submissions per unique user. +# If a value is specified then it must match the pattern COUNT/TIME +# where both COUNT and TIME are integers. +# COUNT is the maximum number of uncompleted job submissions. +# TIME is the maximum tracking time in seconds for a job submission. +# If either COUNT or TIME is zero then there is no limit. +# For example, 4 unfinished jobs per hour is written as: +# quota = 4/3600 +quota = diff -r cd5970c6318f -r eb3670af8100 doc/css/style.css --- a/doc/css/style.css Mon May 25 18:19:58 2015 +1000 +++ b/doc/css/style.css Mon Jun 15 19:01:40 2015 +1000 @@ -688,6 +688,15 @@ margin-bottom: 5px; text-align:center; } +p.submit_limit_warn { + margin: 1px; + padding: 5px; + border: 3px double black; + background-color: #FFC; +} +p.submit_limit_warn:not(.active) { + display: none; +} div.submit_buttons { text-align: center; } diff -r cd5970c6318f -r eb3670af8100 doc/js/menu.js --- a/doc/js/menu.js Mon May 25 18:19:58 2015 +1000 +++ b/doc/js/menu.js Mon Jun 15 19:01:40 2015 +1000 @@ -22,6 +22,7 @@ MemeMenu.is_server = false; MemeMenu.path_prefix = ""; MemeMenu.online_prefix = ""; +MemeMenu.last_modified_timestamps = {}; // calculate the path to this script MemeMenu.base = ( @@ -724,6 +725,8 @@ if (xmlhttp.readyState === 4) { if (xmlhttp.status === 200 && /\S/.test(xmlhttp.responseText)) { last_modified = new Date(xmlhttp.getResponseHeader("Last-Modified")); + // store the last modified date so we can use it in our cookie + MemeMenu.last_modified_timestamps[cookie_name] = last_modified; cookie_re = RegExp("^(?:.*;)?\\s*"+cookie_name+"\\s*=([^;]*)(?:;.*)?$"); if ((match = cookie_re.exec(document.cookie)) !== null) { seen_and_dismissed = new Date(parseInt(match[1], 10)); @@ -772,18 +775,25 @@ MemeMenu.remove_notification = function(e) { "use strict"; - var elem, important, cookie_name, now, expiry; + var elem, important, cookie_name, now, timestamp, expiry; elem = this; elem.removeEventListener("click", MemeMenu.remove_notification, false); while (elem && !/\bnotice_area\b/.test(elem.className)) elem = elem.parentNode; if (elem && elem.parentNode) elem.parentNode.removeChild(elem); important = /\bimportant\b/.test(elem.className); cookie_name = elem.getAttribute("data-cookie-name"); + // Determine what we think the time is. now = new Date(); - // date when unimportant messages are shown again. + // Determine when the server thinks the file was last changed + // or approximate it if unknown. + timestamp = MemeMenu.last_modified_timestamps[cookie_name]; + if (timestamp == null) timestamp = now; + // Calculate a date when unimportant messages are shown again. + // This is calculated relative to the time we think it is, as it + // is our browser which will be throwing away the cookies. expiry = new Date(now.getTime() + (30 * 24 * 60 * 60 * 1000)); // 1 month // note that cookies for important messages always expire with the session - document.cookie = cookie_name + "=" + now.getTime() + + document.cookie = cookie_name + "=" + timestamp.getTime() + (important ? "" : "; expires=" + expiry.toGMTString()) + "; path=/"; } diff -r cd5970c6318f -r eb3670af8100 doc/update-sequence-db.html --- a/doc/update-sequence-db.html Mon May 25 18:19:58 2015 +1000 +++ b/doc/update-sequence-db.html Mon Jun 15 19:01:40 2015 +1000 @@ -8,6 +8,16 @@ +
As well as downloading the sequence files from many sources, the updater + tracks the files using a SQLite database. The schema of the database is + given below.
+Column | Type | Constraint | Description | +
---|---|---|---|
id | INTEGER | PRIMARY KEY | A auto-generated unique identifier for the category. Other tables reference this field. | +
name | TEXT | UNIQUE NOT NULL | The unique name of the category as shown to users. | +
Column | Type | Constraint | Description | +
---|---|---|---|
id | INTEGER | PRIMARY KEY | A auto-generated unique identifier for the listing. Other tables reference this field. | +
categoryId | INTEGER | NOT NULL REFERENCES tblCategory (id) | The identifier of the category that contains this listing. | +
name | TEXT | NOT NULL | The name of the listing shown to users. | +
description | TEXT | NOT NULL | The description of the listing shown to users. | +
The combination of the fields categoryId
and name
is unique.
Column | Type | Constraint | Description | +
---|---|---|---|
id | INTEGER | PRIMARY KEY | A auto-generated unique identifier for the sequence file. | +
retriever | INTEGER | NOT NULL | +An identifier for the code module that downloaded this sequence. + It allows the individual code modules to ensure they don't change + the records of files downloaded by other modules. | +
listingId | INTEGER | NOT NULL REFERENCES tblListing (id) | The identifier of the listing that contains this sequence file. | +
alphabet | INTEGER | NOT NULL CHECK (alphabet IN (1, 2, 4)) | +Represents the alphabet as powers of 2 so they can be combined into a bitset.
+
|
+
edition | INTEGER | NOT NULL | A machine readable version. This field is used for sorting. Larger numbers are considered newer. | +
version | TEXT | NOT NULL | A human readable version which is displayed to the user. | +
description | TEXT | NOT NULL | The description of the sequence file, often containing information about the source. | +
fileSeq | TEXT | UNIQUE NOT NULL | The relative path to the sequence file. | +
fileBg | TEXT | UNIQUE NOT NULL | The relative path to the background file. | +
sequenceCount | INTEGER | NOT NULL | The number of sequences. | +
totalLen | INTEGER | NOT NULL | The total end-to-end combined length of the sequences. | +
minLen | INTEGER | NOT NULL | The length of the shortest sequence. | +
maxLen | INTEGER | NOT NULL | The length of the longest sequence. | +
avgLen | REAL | NOT NULL | The average length of the sequences. | +
stdDLen | REAL | NOT NULL | Currently unused! Intended to store the standard deviation of the average length. | +
obsolete | INTEGER | DEFAULT 0 | Used to flag sequences as obsolete. Sequences flagged as obsolete are hidden from the interface. | +
The combination of the fields listingId
, alphabet
and edition
is unique.