From 460b044720a3ba639019c07c56daa521095d2a11 Mon Sep 17 00:00:00 2001 From: Kyrylo Gliebov Date: Tue, 2 Oct 2018 18:34:56 +0200 Subject: [PATCH] Simplify Hostname --- src/recordings.jsx | 40 ++++++---------------------------------- 1 file changed, 6 insertions(+), 34 deletions(-) diff --git a/src/recordings.jsx b/src/recordings.jsx index 653bc1a..b995614 100644 --- a/src/recordings.jsx +++ b/src/recordings.jsx @@ -379,9 +379,6 @@ class Recording extends React.Component { constructor(props) { super(props); this.goBackToList = this.goBackToList.bind(this); - this.getHostname = this.getHostname.bind(this); - this.Hostname = this.Hostname.bind(this); - this.hostname = null; } goBackToList() { @@ -392,35 +389,6 @@ class Recording extends React.Component { } } - getHostname() { - cockpit.spawn(["hostname"], { err: "ignore" }) - .done(function(output) { - this.hostname = $.trim(output); - }) - .fail(function(ex) { - console.log(ex); - }); - } - - Hostname(props) { - let style = { - display: "none" - }; - if (this.hostname != null && this.hostname != props.hostname) { - style = {}; - } - return ( - - {_("Hostname")} - {props.hostname} - - ); - } - - componentWillMount() { - this.getHostname(); - } - render() { let r = this.props.recording; if (r == null) { @@ -456,7 +424,10 @@ class Recording extends React.Component { {_("ID")} {r.id} - + + {_("Hostname")} + {r.hostname} + {_("Boot ID")} {r.boot_id} @@ -520,7 +491,7 @@ class RecordingList extends React.Component { drawSortDir() { $('#sort_arrow').remove(); let type = this.state.sorting_asc ? "asc" : "desc"; - let arrow = ''; + let arrow = '