diff --git a/src/components/agents/ChecksTab.vue b/src/components/agents/ChecksTab.vue
index eeb96f5..7831459 100644
--- a/src/components/agents/ChecksTab.vue
+++ b/src/components/agents/ChecksTab.vue
@@ -370,7 +370,13 @@
style="cursor: pointer; text-decoration: underline"
class="text-primary"
@click="showPingInfo(props.row)"
- >Last Output{{
+ grep(props.row.check_result.more_info, [
+ "transmitted",
+ "received",
+ "packet loss",
+ ])
+ }}
Last Output{{ processOutput(props.row.check_result) }}
{{ props.row.check_result.more_info }} line.includes(str))) {
+ matched.push(line);
+ }
+ }
+
+ return matched.length > 0 ? matched.join("\n") : "Last Output";
+ } catch (e) {
+ console.error(e);
+ return "Last Output";
+ }
+ }
+
+ function processOutput(result) {
+ try {
+ if (result.stdout && result.stdout.trim() !== "") {
+ return result.stdout.substring(0, 60);
+ } else if (result.stderr && result.stderr.trim() !== "") {
+ return result.stderr.substring(0, 60);
+ } else {
+ return "Last Output";
+ }
+ } catch (e) {
+ console.error(e);
+ return "Last Output";
+ }
+ }
+
function getAlertSeverity(check) {
if (check.check_result.alert_severity) {
return check.check_result.alert_severity;
@@ -707,6 +749,8 @@ export default {
getAlertSeverity,
runChecks,
resetAllChecks,
+ grep,
+ processOutput,
// dialogs
showScriptOutput,