Bring up to date with cockpit starter kit
This encompasses a number of changes to the build process.
This commit is contained in:
parent
a0fffde59d
commit
235f110ec7
32 changed files with 533 additions and 1172 deletions
|
|
@ -19,7 +19,6 @@
|
|||
|
||||
import cockpit from 'cockpit';
|
||||
import React from 'react';
|
||||
import './app.scss';
|
||||
import View from "./recordings.jsx";
|
||||
|
||||
const _ = cockpit.gettext;
|
||||
|
|
@ -29,10 +28,9 @@ export class Application extends React.Component {
|
|||
super();
|
||||
this.state = { hostname: _("Unknown") };
|
||||
|
||||
cockpit.file('/etc/hostname').read()
|
||||
.done((content) => {
|
||||
this.setState({ hostname: content.trim() });
|
||||
});
|
||||
cockpit.file('/etc/hostname').watch(content => {
|
||||
this.setState({ hostname: content.trim() });
|
||||
});
|
||||
}
|
||||
|
||||
render() {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<!--
|
||||
This file is part of Cockpit.
|
||||
|
||||
Copyright (C) 2017 Red Hat, Inc.
|
||||
|
||||
Cockpit is free software; you can redistribute it and/or modify it
|
||||
|
|
@ -15,25 +13,22 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with Cockpit; If not, see <http://www.gnu.org/licenses/>.
|
||||
along with this package; If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
<html>
|
||||
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title translate>Session Recording</title>
|
||||
<title translate>Cockpit Session Recording</title>
|
||||
<meta charset="utf-8">
|
||||
<meta name="description" content="">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
|
||||
<link rel="stylesheet" href="index.css">
|
||||
|
||||
<script type="text/javascript" src="../base1/cockpit.js"></script>
|
||||
<script type="text/javascript" src="po.js"></script>
|
||||
|
||||
<script type="text/javascript" src="index.js"></script>
|
||||
<script type="text/javascript" src="po.js"></script>
|
||||
</head>
|
||||
|
||||
<body class="pf-m-redhat-form">
|
||||
<div class="ct-page-fill" id="app"></div>
|
||||
<body class="pf-m-redhat-font">
|
||||
<div id="app"></div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
|
|||
13
src/index.js
13
src/index.js
|
|
@ -17,12 +17,11 @@
|
|||
* along with Cockpit; If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import "./lib/patternfly/patternfly-4-cockpit.scss";
|
||||
|
||||
import "core-js/stable";
|
||||
import "cockpit-dark-theme";
|
||||
import "patternfly/patternfly-4-cockpit.scss";
|
||||
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import { createRoot } from 'react-dom/client';
|
||||
import { Application } from './app.jsx';
|
||||
/*
|
||||
* PF4 overrides need to come after the JSX components imports because
|
||||
|
|
@ -31,8 +30,10 @@ import { Application } from './app.jsx';
|
|||
* out of the dist/index.js and since it will maintain the order of the imported CSS,
|
||||
* the overrides will be correctly in the end of our stylesheet.
|
||||
*/
|
||||
import "./lib/patternfly/patternfly-4-overrides.scss";
|
||||
import "patternfly/patternfly-4-overrides.scss";
|
||||
import './app.scss';
|
||||
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
ReactDOM.render(React.createElement(Application, {}), document.getElementById('app'));
|
||||
const root = createRoot(document.getElementById('app'));
|
||||
root.render(<Application />);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
"name": "session-recording",
|
||||
|
||||
"requires": {
|
||||
"cockpit": "122"
|
||||
"cockpit": "137"
|
||||
},
|
||||
|
||||
"menu": {
|
||||
|
|
|
|||
|
|
@ -67,16 +67,16 @@
|
|||
|
||||
.search-wrap {
|
||||
min-height: 25px;
|
||||
display:block;
|
||||
clear:both;
|
||||
display: block;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.session_time {
|
||||
margin-right:5px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.pf-c-progress__indicator:after {
|
||||
content: "";
|
||||
.pf-c-progress__indicator::after {
|
||||
content: "";
|
||||
position: relative;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
|
|
|
|||
|
|
@ -623,7 +623,7 @@ const PacketBuffer = class {
|
|||
|
||||
function SearchEntry(props) {
|
||||
return (
|
||||
<span className="search-result"><a onClick={(e) => props.fastForwardToTS(props.pos, e)}>{formatDuration(props.pos)}</a></span>
|
||||
<span className="search-result"><a href="#search-result" onClick={(e) => props.fastForwardToTS(props.pos, e)}>{formatDuration(props.pos)}</a></span>
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue