Extended package status page (#76)

* implement log storage at backend
* handle process id during removal. During one process we can write logs from different packages in different times (e.g. check and update later) and we would like to store all logs belong to the same process
* set package context in main functions
* implement logs support in interface
* filter out logs posting http logs
* add timestamp to log records
* hide getting logs under reporter permission

List of breaking changes:

* `ahriman.core.lazy_logging.LazyLogging` has been renamed to `ahriman.core.log.LazyLogging`
* `ahriman.core.configuration.Configuration.from_path` does not have `quiet` attribute now
* `ahriman.core.configuration.Configuration` class does not have `load_logging` method now
* `ahriman.core.status.client.Client.load` requires `report` argument now
This commit is contained in:
2022-11-22 02:58:22 +03:00
committed by GitHub
parent 2eb93a6090
commit 14cb548c3b
90 changed files with 1650 additions and 360 deletions

View File

@ -8,6 +8,7 @@
() => {
removeButton.prop("disabled", !table.bootstrapTable("getSelections").length);
});
table.on("click-row.bs.table", (_, row) => { showLogs(row.id); });
const architectureBadge = $("#badge-architecture");
const repositoryBadge = $("#badge-repository");
@ -26,9 +27,11 @@
li.innerText = pkg;
return li;
});
showSuccess(details);
showSuccess("Success", `Package action at ${uri} has been run on:`, details);
},
error: (jqXHR, _, errorThrown) => {
showFailure("Action failed", `Package action request at ${uri} on ${packages} has failed:`, errorThrown);
},
error: (jqXHR, _, errorThrown) => { showFailure(errorThrown); },
});
}
@ -38,7 +41,11 @@
function removePackages() { doPackageAction("/api/v1/service/remove", getSelection()); }
function updatePackages() { doPackageAction("/api/v1/service/add", getSelection()); }
function updatePackages() {
const currentSelection = getSelection();
const url = currentSelection.length === 0 ? "/api/v1/service/update" : "/api/v1/service/add";
doPackageAction(url, getSelection());
}
function hideControls(hidden) {
addButton.attr("hidden", hidden);
@ -95,7 +102,7 @@
table.bootstrapTable("hideLoading");
} else {
// other errors
showFailure(errorThrown);
showFailure("Load failure", "Could not load list of packages:", errorThrown);
}
hideControls(true);
},