|
@@ -17,7 +17,7 @@ class Interface extends React.Component {
|
|
this.setState({realtime: true})
|
|
this.setState({realtime: true})
|
|
this.polling = setInterval(() => {
|
|
this.polling = setInterval(() => {
|
|
this.setState({fetching: true, resetting: false});
|
|
this.setState({fetching: true, resetting: false});
|
|
- axios.get('?', {time: Date.now()})
|
|
|
|
|
|
+ axios.get(window.location.pathname, {time: Date.now()})
|
|
.then((response) => {
|
|
.then((response) => {
|
|
this.setState({opstate: response.data});
|
|
this.setState({opstate: response.data});
|
|
});
|
|
});
|
|
@@ -43,7 +43,7 @@ class Interface extends React.Component {
|
|
resetHandler = () => {
|
|
resetHandler = () => {
|
|
if (this.state.realtime) {
|
|
if (this.state.realtime) {
|
|
this.setState({resetting: true});
|
|
this.setState({resetting: true});
|
|
- axios.get('?', {params: {reset: 1}})
|
|
|
|
|
|
+ axios.get(window.location.pathname, {params: {reset: 1}})
|
|
.then((response) => {
|
|
.then((response) => {
|
|
console.log('success: ', response.data);
|
|
console.log('success: ', response.data);
|
|
});
|
|
});
|
|
@@ -329,6 +329,16 @@ function GeneralInfo(props) {
|
|
|
|
|
|
|
|
|
|
function Directives(props) {
|
|
function Directives(props) {
|
|
|
|
+ let directiveList = (directive) => {
|
|
|
|
+ return (
|
|
|
|
+ <ul className="directive-list">{
|
|
|
|
+ directive.v.map((item, key) => {
|
|
|
|
+ return <li key={key}>{item}</li>
|
|
|
|
+ })
|
|
|
|
+ }</ul>
|
|
|
|
+ );
|
|
|
|
+ };
|
|
|
|
+
|
|
let directiveNodes = props.directives.map(function(directive) {
|
|
let directiveNodes = props.directives.map(function(directive) {
|
|
let map = { 'opcache.':'', '_':' ' };
|
|
let map = { 'opcache.':'', '_':' ' };
|
|
let dShow = directive.k.replace(/opcache\.|_/gi, function(matched){
|
|
let dShow = directive.k.replace(/opcache\.|_/gi, function(matched){
|
|
@@ -341,9 +351,7 @@ function Directives(props) {
|
|
vShow = React.createElement('i', {}, 'no value');
|
|
vShow = React.createElement('i', {}, 'no value');
|
|
} else {
|
|
} else {
|
|
if (Array.isArray(directive.v)) {
|
|
if (Array.isArray(directive.v)) {
|
|
- vShow = directive.v.map((item, key) => {
|
|
|
|
- return <span key={key}>{item}<br/></span>
|
|
|
|
- });
|
|
|
|
|
|
+ vShow = directiveList(directive);
|
|
} else {
|
|
} else {
|
|
vShow = directive.v;
|
|
vShow = directive.v;
|
|
}
|
|
}
|
|
@@ -677,7 +685,7 @@ class CachedFiles extends React.Component {
|
|
handleInvalidate = e => {
|
|
handleInvalidate = e => {
|
|
e.preventDefault();
|
|
e.preventDefault();
|
|
if (this.props.realtime) {
|
|
if (this.props.realtime) {
|
|
- axios.get('?', {params: { invalidate_searched: this.state.searchTerm }})
|
|
|
|
|
|
+ axios.get(window.location.pathname, {params: { invalidate_searched: this.state.searchTerm }})
|
|
.then((response) => {
|
|
.then((response) => {
|
|
console.log('success: ' , response.data);
|
|
console.log('success: ' , response.data);
|
|
});
|
|
});
|
|
@@ -799,7 +807,7 @@ class CachedFile extends React.Component {
|
|
handleInvalidate = e => {
|
|
handleInvalidate = e => {
|
|
e.preventDefault();
|
|
e.preventDefault();
|
|
if (this.props.realtime) {
|
|
if (this.props.realtime) {
|
|
- axios.get('?', {params: { invalidate: e.currentTarget.getAttribute('data-file') }})
|
|
|
|
|
|
+ axios.get(window.location.pathname, {params: { invalidate: e.currentTarget.getAttribute('data-file') }})
|
|
.then((response) => {
|
|
.then((response) => {
|
|
console.log('success: ' , response.data);
|
|
console.log('success: ' , response.data);
|
|
});
|
|
});
|