Show at least basic error if task or app not found in logviewer

This commit is contained in:
Johannes Zellner
2023-05-15 17:20:43 +02:00
parent 576fb392bb
commit b5641cc445
6 changed files with 32 additions and 7 deletions
+7 -3
View File
@@ -17,6 +17,7 @@ app.controller('LogsController', ['$scope', '$translate', 'Client', function ($s
$scope.lines = 100;
$scope.selectedAppInfo = null;
$scope.selectedTaskInfo = null;
$scope.error = false;
function ab2str(buf) {
return String.fromCharCode.apply(null, new Uint16Array(buf));
@@ -180,13 +181,16 @@ app.controller('LogsController', ['$scope', '$translate', 'Client', function ($s
if (error) return Client.initError(error, init);
select({ id: search.id, taskId: search.taskId, appId: search.appId, crashId: search.crashId }, function (error) {
if (error) return Client.initError(error, init);
$scope.initialized = true;
if (error) {
$scope.error = true;
return Client.initError(error, init);
}
// now mark the Client to be ready
Client.setReady();
$scope.initialized = true;
showLogs();
});
});