Merge pull request #931 from mssalvatore/150/resize-network-map

150/resize network map
This commit is contained in:
Mike Salvatore 2021-01-27 10:02:41 -05:00 committed by GitHub
commit 41d5a98498
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 51 additions and 43 deletions

View File

@ -12,12 +12,14 @@ class GraphWrapper extends React.Component {
let newOptions = null;
if(this.props.options !== undefined){
newOptions = this.props.options;
newOptions.height = this.props.containerHeight.toString() + 'px';
newOptions.width = this.props.containerWidth.toString() + 'px';
}
return (<Graph graph={this.props.graph} options={newOptions} events={this.props.events}/>)
return (
<div class={'net-graph-wrapper'}>
<Graph graph={this.props.graph} options={newOptions} events={this.props.events}/>
</div>
)
}
}
let ReactiveGraph = Dimensions()(GraphWrapper);
let ReactiveGraph = GraphWrapper;
export {ReactiveGraph};

View File

@ -304,45 +304,6 @@ body {
background: #d30d09;
}
.telemetry-console {
z-index: 2;
position: absolute;
bottom: 0;
left: 0;
right: 0;
height: 130px;
background: rgba(0, 0, 0, 0.7);
border-radius: 5px;
border: 3px solid #aaa;
padding: 0.5em;
color: white;
font-family: Consolas, "Courier New", monospace;
overflow: auto;
}
.telemetry-console .date {
color: #ccc;
}
.telemetry-console .source {
font-weight: bold;
}
.telemetry-lines {
z-index: 3;
position: absolute;
bottom: 103px;
right: 20px;
background: #000000cc;
border-radius: 5px;
padding: 1px;
color: white;
}
.map-legend {
font-size: 18px;
}
/*
* Full Logs Page
*/

View File

@ -1,3 +1,48 @@
.map-legend {
font-size: 18px;
}
.map-window {
position: relative;
}
.telemetry-console {
z-index: 2;
position: absolute;
bottom: 0;
left: 0;
right: 0;
height: 130px;
background: rgba(0, 0, 0, 0.7);
border-radius: 5px;
border: 3px solid #aaa;
padding: 0.5em;
color: white;
font-family: Consolas, "Courier New", monospace;
overflow: auto;
}
.telemetry-console .date {
color: #ccc;
}
.telemetry-console .source {
font-weight: bold;
}
.telemetry-lines {
z-index: 3;
position: absolute;
bottom: 103px;
right: 20px;
background: #000000cc;
border-radius: 5px;
padding: 1px;
color: white;
}
.net-graph-wrapper {
height: calc(100% - 130px);
width: 100%;
padding-bottom: 10px;
}