mirror of
https://github.com/weaveworks/scope.git
synced 2026-07-28 01:31:17 +00:00
Remove github.com/2opremio/go-1/codec
* Bump github.com/ugorji/go/codec, to get fixes which make github.com/2opremio/go-1/codec unnecessary * Remove github.com/2opremio/go-1/codec * Remove type embeddings to avoid the problem explained at https://github.com/ugorji/go/issues/141#issuecomment-185450157
This commit is contained in:
@@ -9,12 +9,12 @@ export default class NodeDetailsControlButton extends React.Component {
|
||||
}
|
||||
|
||||
render() {
|
||||
let className = `node-control-button fa ${this.props.control.icon}`;
|
||||
let className = `node-control-button fa ${this.props.control.control.icon}`;
|
||||
if (this.props.pending) {
|
||||
className += ' node-control-button-pending';
|
||||
}
|
||||
return (
|
||||
<span className={className} title={this.props.control.human} onClick={this.handleClick} />
|
||||
<span className={className} title={this.props.control.control.human} onClick={this.handleClick} />
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ export default class NodeDetailsControls extends React.Component {
|
||||
{this.props.controls && this.props.controls.map(control => {
|
||||
return (
|
||||
<NodeDetailsControlButton nodeId={this.props.nodeId} control={control}
|
||||
pending={this.props.pending} key={control.id} />
|
||||
pending={this.props.pending} key={control.control.id} />
|
||||
);
|
||||
})}
|
||||
</span>
|
||||
|
||||
@@ -10,8 +10,8 @@ class NodeDetailsHealthItem extends React.Component {
|
||||
<div className="node-details-health-item">
|
||||
<div className="node-details-health-item-value">{formatMetric(this.props.value, this.props)}</div>
|
||||
<div className="node-details-health-item-sparkline">
|
||||
<Sparkline data={this.props.samples} max={this.props.max}
|
||||
first={this.props.first} last={this.props.last} />
|
||||
<Sparkline data={this.props.wire_metrics.samples} max={this.props.wire_metrics.max}
|
||||
first={this.props.wire_metrics.first} last={this.props.wire_metrics.last} />
|
||||
</div>
|
||||
<div className="node-details-health-item-label">{this.props.label}</div>
|
||||
</div>
|
||||
|
||||
@@ -18,7 +18,7 @@ const WINDOW_LENGTH = 60;
|
||||
* `[t1, t2, t3, ...]` will be fed to the wrapped component.
|
||||
* The window slides between the dates provided by the first date of the buffer
|
||||
* and `this.props.last` so that the following invariant is true:
|
||||
* `this.state.movingFirst <= this.props.first < this.state.movingLast <= this.props.last`.
|
||||
* `this.state.movingFirst <= this.props.wire_metrics.first < this.state.movingLast <= this.props.wire_metrics.last`.
|
||||
*
|
||||
* Samples have to be of type `[{date: String, value: Number}, ...]`.
|
||||
* This component also keeps a historic max of all samples it sees over time.
|
||||
@@ -60,7 +60,7 @@ export default ComposedComponent => class extends React.Component {
|
||||
updateBuffer(props) {
|
||||
// merge new samples into buffer
|
||||
let buffer = this.state.buffer;
|
||||
const nextSamples = makeOrderedMap(props.samples.map(d => [d.date, d.value]));
|
||||
const nextSamples = makeOrderedMap(props.wire_metrics.samples.map(d => [d.date, d.value]));
|
||||
// need to sort again after merge, some new data may have different times for old values
|
||||
buffer = buffer.merge(nextSamples).sortBy(sortDate);
|
||||
const state = {};
|
||||
|
||||
@@ -169,7 +169,7 @@ export function getApiDetails() {
|
||||
export function doControlRequest(nodeId, control) {
|
||||
clearTimeout(controlErrorTimer);
|
||||
const url = `api/control/${encodeURIComponent(control.probeId)}/`
|
||||
+ `${encodeURIComponent(control.nodeId)}/${control.id}`;
|
||||
+ `${encodeURIComponent(control.nodeId)}/${control.control.id}`;
|
||||
reqwest({
|
||||
method: 'POST',
|
||||
url: url,
|
||||
|
||||
Reference in New Issue
Block a user