summaryrefslogtreecommitdiffstats
path: root/modules-available/minilinux
diff options
context:
space:
mode:
authorSimon Rettberg2023-06-12 13:52:44 +0200
committerSimon Rettberg2023-06-12 13:52:44 +0200
commit38d3ecc6a52acbe1f2a3f243a6fe1cf3f98fcbb7 (patch)
tree7156f11091081703c7266cfcb0a5c5b1bfde83ba /modules-available/minilinux
parent[vmstore] Continuously drop caches while benchmarking (diff)
downloadslx-admin-38d3ecc6a52acbe1f2a3f243a6fe1cf3f98fcbb7.tar.gz
slx-admin-38d3ecc6a52acbe1f2a3f243a6fe1cf3f98fcbb7.tar.xz
slx-admin-38d3ecc6a52acbe1f2a3f243a6fe1cf3f98fcbb7.zip
[minilinux] Minor design tweaks to list
- Hackish way to hide sort-order inlined in title - Border for change-log - Shorten cooldown for list update to 3 minutes (was 10)
Diffstat (limited to 'modules-available/minilinux')
-rw-r--r--modules-available/minilinux/inc/minilinux.inc.php6
-rw-r--r--modules-available/minilinux/page.inc.php5
-rw-r--r--modules-available/minilinux/templates/filelist.html7
-rw-r--r--modules-available/minilinux/templates/versionlist.html4
4 files changed, 16 insertions, 6 deletions
diff --git a/modules-available/minilinux/inc/minilinux.inc.php b/modules-available/minilinux/inc/minilinux.inc.php
index 96763874..4960284f 100644
--- a/modules-available/minilinux/inc/minilinux.inc.php
+++ b/modules-available/minilinux/inc/minilinux.inc.php
@@ -16,16 +16,16 @@ class MiniLinux
*/
/**
- * Query all known sources for meta data
+ * Query all known sources for metadata
* @return int number of sources query was just initialized for
*/
public static function updateList()
{
$stamp = time();
$last = Property::get(self::PROPERTY_KEY_FETCHTIME);
- if ($last !== false && $last + 10 > $stamp)
+ if ($last !== false && $last + 3 > $stamp)
return 0; // In progress...
- Property::set(self::PROPERTY_KEY_FETCHTIME, $stamp, 1);
+ Property::set(self::PROPERTY_KEY_FETCHTIME, $stamp, 10);
Database::exec('LOCK TABLES callback WRITE,
minilinux_source WRITE, minilinux_branch WRITE, minilinux_version WRITE');
Database::exec('UPDATE minilinux_source SET taskid = UUID()');
diff --git a/modules-available/minilinux/page.inc.php b/modules-available/minilinux/page.inc.php
index 035a45d5..2099b8c5 100644
--- a/modules-available/minilinux/page.inc.php
+++ b/modules-available/minilinux/page.inc.php
@@ -40,6 +40,11 @@ class Page_MiniLinux extends Page
$sourceList = [];
// Group by branch for detailed listing, add usage info
foreach ($branches as &$branch) {
+ // Little hack: We abuse the title for ordering, so if the second char is a space, assume the first one
+ // is just for sort order and remove it.
+ if ($branch['title'][1] === ' ') {
+ $branch['title'] = substr($branch['title'], 2);
+ }
$bid = 'div-' . str_replace('/', '-', $branch['branchid']);
if (!isset($sourceList[$branch['sourceid']])) {
$sourceList[$branch['sourceid']] = ['sourceid' => $branch['sourceid'], 'list' => []];
diff --git a/modules-available/minilinux/templates/filelist.html b/modules-available/minilinux/templates/filelist.html
index e4923a8f..241d1264 100644
--- a/modules-available/minilinux/templates/filelist.html
+++ b/modules-available/minilinux/templates/filelist.html
@@ -49,7 +49,10 @@
<pre class="collapse" id="error-{{dltask}}"></pre>
{{/dltask}}
{{#changelog}}
-<h4>{{lang_changelog}}</h4>
-{{{changelog}}}
+ <div class="slx-space"></div>
+<div style="border:1px solid #bbb;padding:4px;border-radius: 3px">
+ <h4>{{lang_changelog}}</h4>
+ {{{changelog}}}
+</div>
{{/changelog}}
<div class="slx-space"></div> \ No newline at end of file
diff --git a/modules-available/minilinux/templates/versionlist.html b/modules-available/minilinux/templates/versionlist.html
index 763ab784..e66960b2 100644
--- a/modules-available/minilinux/templates/versionlist.html
+++ b/modules-available/minilinux/templates/versionlist.html
@@ -17,10 +17,12 @@
</a>
</td>
<td class="text-nowrap">
- {{dateline_s}}
{{#desclen}}
+ <div style="float:right;margin-right:-6px">
<span class="glyphicon glyphicon-list-alt"></span>
+ </div>
{{/desclen}}
+ {{dateline_s}}
</td>
<td>{{title}}</td>
<td class="text-nowrap">