Rift.IO OSM R1 Initial Submission
[osm/UI.git] / skyquake / plugins / logging / src / syslogViewer.jsx
1 /*
2  * 
3  *   Copyright 2016 RIFT.IO Inc
4  *
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
8  *
9  *       http://www.apache.org/licenses/LICENSE-2.0
10  *
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.
16  *
17  */
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';
23
24
25 export default class SyslogViewer extends React.Component {
26         constructor(props) {
27                 super(props);
28                 /*
29                 console.log("SyslogViewer.constructor called");
30                 LoggingStore.listen(this.storeListener);
31                 this.state = LoggingStore.getState();
32                 console.log("SyslogViewer state=", this.state);
33                 */
34         }
35         storeListener = (state) => {
36                 console.log("SyslogViewer.storeListener called. state=", state);
37                 //this.setState(state);
38         }
39         componentDidMount() {
40                 console.log("SyslogViewer.componentDidMount called");
41                 //LoggingStore.getLogConfig();
42         }
43         render() {
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";
49                 return (
50                         <div>
51                                 <h1>Syslog Viewer placeholder</h1>
52                                 <div className="logViewerLink">
53                                         <a href={sysLogViewerURL} target="_blank">System Log Viewer</a>
54                                 </div>
55                         </div>
56                 )
57         }
58 }