mirror of
https://github.com/weaveworks/scope.git
synced 2026-03-03 02:00:43 +00:00
Nice and red and blinky ui label for broken plugins
This commit is contained in:
@@ -1,10 +1,20 @@
|
||||
import React from 'react';
|
||||
import classNames from 'classnames';
|
||||
|
||||
export default class Plugins extends React.Component {
|
||||
renderPlugin(plugin) {
|
||||
renderPlugin({id, label, description, status}) {
|
||||
const error = status !== 'ok';
|
||||
const className = classNames({ error });
|
||||
const title = error ?
|
||||
`Status: ${status}. (Plugin description: ${description})` :
|
||||
description;
|
||||
|
||||
// Inner span to hold styling so we don't effect the "before:content"
|
||||
return (
|
||||
<span className="plugins-plugin" key={plugin.id} title={plugin.description}>
|
||||
{plugin.label || plugin.id}
|
||||
<span className="plugins-plugin" key={id}>
|
||||
<span className={className} title={title}>
|
||||
{label || id}
|
||||
</span>
|
||||
</span>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ let highlightedEdgeIds = makeSet();
|
||||
let highlightedNodeIds = makeSet();
|
||||
let hostname = '...';
|
||||
let version = '...';
|
||||
let plugins = null;
|
||||
let plugins = [];
|
||||
let mouseOverEdgeId = null;
|
||||
let mouseOverNodeId = null;
|
||||
let nodeDetails = makeOrderedMap(); // nodeId -> details
|
||||
|
||||
@@ -1007,6 +1007,11 @@ h2 {
|
||||
content: ', ';
|
||||
}
|
||||
|
||||
.error {
|
||||
animation: blinking 2.0s 30 @base-ease; // blink for 1 minute;
|
||||
color: darkred;
|
||||
}
|
||||
|
||||
&-empty {
|
||||
opacity: @text-secondary-color;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user