3 * Copyright 2016 RIFT.IO Inc
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
18 import React from 'react';
19 import './logging.scss';
20 import AppHeader from 'widgets/header/header.jsx';
21 import LoggingActions from './loggingActions.js';
22 import LoggingStore from './loggingStore.js';
25 export default class SyslogViewer extends React.Component {
29 console.log("SyslogViewer.constructor called");
30 LoggingStore.listen(this.storeListener);
31 this.state = LoggingStore.getState();
32 console.log("SyslogViewer state=", this.state);
35 storeListener = (state) => {
36 console.log("SyslogViewer.storeListener called. state=", state);
37 //this.setState(state);
40 console.log("SyslogViewer.componentDidMount called");
41 //LoggingStore.getLogConfig();
44 console.log("SyslogViewer.render called. state=", this.state);
45 //console.log("logConfig JSON=", JSON.stringify(this.state.logConfig));
46 //const {sysLogViewerURL, ...props} = this.props;
47 //let sysLogViewerURL = this.state.logConfig['syslog-viewer'];
48 let sysLogViewerURL = "http://example.com";
51 <h1>Syslog Viewer placeholder</h1>
52 <div className="logViewerLink">
53 <a href={sysLogViewerURL} target="_blank">System Log Viewer</a>