+/**
+ * @brief Admin Inspect Worker Queue Page
+ *
+ * Generates a page for the admin to have a look into the current queue of
+ * worker jobs. Shown are the parameters for the job and its priority.
+ *
+ * The returned string holds the content of the page.
+ *
+ * @param App $a
+ * @return string
+ */
+function admin_page_workerqueue(App $a)
+{
+ // get jobs from the workerqueue table
+ $statement = dba::select('workerqueue', ['id', 'parameter', 'created', 'priority'], ['done' => 0], ['order'=> ['priority']]);
+ $r = dba::inArray($statement);
+
+ $t = get_markup_template('admin/workerqueue.tpl');
+ return replace_macros($t, [
+ '$title' => L10n::t('Administration'),
+ '$page' => L10n::t('Inspect Worker Queue'),
+ '$count' => count($r),
+ '$id_header' => L10n::t('ID'),
+ '$param_header' => L10n::t('Job Parameters'),
+ '$created_header' => L10n::t('Created'),
+ '$prio_header' => L10n::t('Priority'),
+ '$info' => L10n::t('This page lists the currently queued worker jobs. These jobs are handled by the worker cronjob you\'ve set up during install.'),
+ '$entries' => $r,
+ ]);
+}
+