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';
24 export default class Logging extends React.Component {
27 console.log("Logging.constructor called");
30 this.state = LoggingStore.getState();
31 console.log("Logging.constructor: state=", this.state);
32 LoggingStore.listen(this.storeListener);
33 // LoggingStore.get();
36 storeListener = (state) => {
37 console.log("Logging.storeListener called");
43 // https://facebook.github.io/react/docs/component-specs.html
45 componentWillMount() {
46 console.log("Logging.componentWillMount called");
49 console.log("Logging.componentDidMount called");
50 //LoggingStore.getSysLogViewerURL();
51 LoggingStore.getLoggingConfig();
52 //LoggingStore.getLoggingOperational();
55 // Invoked when a component is receiving new props. This method is not called for the intial render.
56 // use this as an opportunity to react to a prop transition before render() is called
57 componentWillReceiveProps(nextProps) {
58 console.log("Logging.componentWillReceiveProps called");
59 // this.setState({ key: nextProps.value});
62 // shouldComonentUpdate(nextProps, nextState) {}
63 // Invoked immediately before rendering when new props or state are being received
64 // componentWillUpdate(nextProps, nextState) {}
67 // Invoked immediately after the component's updates are flushed to the DOM.
68 // This method is not called for the initial render.
69 // Use this as an opportunity to operate on the DOM when the component has been updated.
70 componentDidUpdate(prevPros, prevState) {
73 componentWillUnmount() {
74 console.log("Logging.componentWillUnmount called");
75 //LoggingStore.unlisten(this.storeListener);
78 console.log("Logging.render called");
79 console.log("Logging.state=", JSON.stringify(this.state));
80 var html=(<div><h1>Hello Logging page</h1></div>);
81 if (this.state != null) {
84 <p>Placeholder for logging page</p>
90 <div className="logging-container">