-
-
+
+
+
+
+
+
+ {this.state.title}
+
+
+
+
+
+
+
+
+
+
+
+
{speedStr}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
{speedStr}
-
-
-
-
-
-
-
-
+
+
+
+
+ {_("Recording")}
+
+
+
+
+
+ | {_("ID")} |
+ {r.id} |
+
+
+ | {_("Hostname")} |
+ {r.hostname} |
+
+
+ | {_("Boot ID")} |
+ {r.boot_id} |
+
+
+ | {_("Session ID")} |
+ {r.session_id} |
+
+
+ | {_("PID")} |
+ {r.pid} |
+
+
+ | {_("Start")} |
+ {formatDateTime(r.start)} |
+
+
+ | {_("End")} |
+ {formatDateTime(r.end)} |
+
+
+ | {_("Duration")} |
+ {formatDuration(r.end - r.start)} |
+
+
+ | {_("User")} |
+ {r.user} |
+
+
+
-
-
+
);
}
diff --git a/src/recordings.css b/src/recordings.css
index 641159c..6fb8b54 100644
--- a/src/recordings.css
+++ b/src/recordings.css
@@ -401,3 +401,24 @@ table.listing-ct > thead th:last-child, tr.listing-ct-item td:last-child {
.panel-footer {
padding: 5px 15px;
}
+
+.search-result {
+ margin-left: 5px;
+ float: left;
+}
+
+.search-results {
+ float: left;
+ min-height: 25px;
+}
+
+.search-component {
+ float: left;
+ width: 33%;
+}
+
+.search-wrap {
+ min-height: 25px;
+ display:block;
+ clear:both;
+}
diff --git a/src/recordings.jsx b/src/recordings.jsx
index ef4156c..9c656f9 100644
--- a/src/recordings.jsx
+++ b/src/recordings.jsx
@@ -404,6 +404,9 @@ class Recording extends React.Component {
goBackToList() {
if (cockpit.location.path[0]) {
+ if ("search_rec" in cockpit.location.options) {
+ delete cockpit.location.options.search_rec;
+ }
cockpit.location.go([], cockpit.location.options);
} else {
cockpit.location.go('/');
@@ -420,7 +423,9 @@ class Recording extends React.Component {
ref="player"
matchList={this.props.recording.matchList}
logsTs={this.props.logsTs}
- onTsChange={this.props.onTsChange} />);
+ search={this.props.search}
+ onTsChange={this.props.onTsChange}
+ recording={r} />);
return (
@@ -432,58 +437,7 @@ class Recording extends React.Component {
-
- {player}
-
-
-
- {_("Recording")}
-
-
-
-
-
- | {_("ID")} |
- {r.id} |
-
-
- | {_("Hostname")} |
- {r.hostname} |
-
-
- | {_("Boot ID")} |
- {r.boot_id} |
-
-
- | {_("Session ID")} |
- {r.session_id} |
-
-
- | {_("PID")} |
- {r.pid} |
-
-
- | {_("Start")} |
- {formatDateTime(r.start)} |
-
-
- | {_("End")} |
- {formatDateTime(r.end)} |
-
-
- | {_("Duration")} |
- {formatDuration(r.end - r.start)} |
-
-
- | {_("User")} |
- {r.user} |
-
-
-
-
-
-
-
+ {player}
);
}
@@ -645,6 +599,7 @@ class View extends React.Component {
date_until: cockpit.location.options.date_until || "",
username: cockpit.location.options.username || "",
hostname: cockpit.location.options.hostname || "",
+ search: cockpit.location.options.search || "",
/* filter values end */
error_tlog_uid: false,
diff_hosts: false,
@@ -671,6 +626,7 @@ class View extends React.Component {
date_until: cockpit.location.options.date_until || "",
username: cockpit.location.options.username || "",
hostname: cockpit.location.options.hostname || "",
+ search: cockpit.location.options.search || "",
});
}
@@ -763,7 +719,7 @@ class View extends React.Component {
* Assumes journalctl is not running.
*/
journalctlStart() {
- let matches = ["_UID=" + this.uid, "+", "_EXE=/usr/bin/tlog-rec-session", "+", "_EXE=/usr/bin/tlog-rec", "+", "SYSLOG_IDENTIFIER=\"-tlog-rec-session\""];
+ let matches = ["_UID=" + this.uid, "+", "_EXE=/usr/bin/tlog-rec-session", "+", "_EXE=/usr/bin/tlog-rec", "+", "SYSLOG_IDENTIFIER=-tlog-rec-session"];
if (this.state.username && this.state.username !== "") {
matches.push("TLOG_USER=" + this.state.username);
}
@@ -781,7 +737,12 @@ class View extends React.Component {
options['until'] = this.state.date_until;
}
+ if (this.state.search && this.state.search !== "" && this.state.recordingID === null) {
+ options["grep"] = this.state.search;
+ }
+
if (this.state.recordingID !== null) {
+ delete options["grep"];
matches.push("TLOG_REC=" + this.state.recordingID);
}
@@ -894,7 +855,8 @@ class View extends React.Component {
if (this.state.date_since !== prevState.date_since ||
this.state.date_until !== prevState.date_until ||
this.state.username !== prevState.username ||
- this.state.hostname !== prevState.hostname
+ this.state.hostname !== prevState.hostname ||
+ this.state.search !== prevState.search
) {
this.clearRecordings();
this.journalctlRestart();
@@ -929,7 +891,16 @@ class View extends React.Component {
-
+
+ |
+
+
+
+
+ |
+
+
|
@@ -972,7 +943,7 @@ class View extends React.Component {
} else {
return (
-
+
diff --git a/src/terminal.jsx b/src/terminal.jsx
index b352ead..804a71d 100644
--- a/src/terminal.jsx
+++ b/src/terminal.jsx
@@ -19,7 +19,6 @@
import Player from "./player";
-
"use strict";
var React = require("react");
|