mirror of
https://github.com/weaveworks/scope.git
synced 2026-03-03 02:00:43 +00:00
Added classNames to all the anchor DOM elements.
This commit is contained in:
@@ -39,7 +39,7 @@ class Topologies extends React.Component {
|
||||
const isActive = subTopology === this.props.currentTopology;
|
||||
const searchMatchCount = this.props.searchMatchCountByTopology.get(topologyId) || 0;
|
||||
const title = basicTopologyInfo(subTopology, searchMatchCount);
|
||||
const className = classnames('topologies-sub-item', {
|
||||
const className = classnames(`topologies-sub-item topologies-item-${topologyId}`, {
|
||||
// Don't show matches in the resource view as searching is not supported there yet.
|
||||
'topologies-sub-item-matched': !this.props.isResourceViewMode && searchMatchCount,
|
||||
'topologies-sub-item-active': isActive,
|
||||
@@ -60,14 +60,14 @@ class Topologies extends React.Component {
|
||||
}
|
||||
|
||||
renderTopology(topology) {
|
||||
const topologyId = topology.get('id');
|
||||
const isActive = topology === this.props.currentTopology;
|
||||
const searchMatchCount = this.props.searchMatchCountByTopology.get(topology.get('id')) || 0;
|
||||
const className = classnames('topologies-item-main', {
|
||||
const className = classnames(`topologies-item-main topologies-item-${topologyId}`, {
|
||||
// Don't show matches in the resource view as searching is not supported there yet.
|
||||
'topologies-item-main-matched': !this.props.isResourceViewMode && searchMatchCount,
|
||||
'topologies-item-main-active': isActive,
|
||||
});
|
||||
const topologyId = topology.get('id');
|
||||
const title = basicTopologyInfo(topology, searchMatchCount);
|
||||
|
||||
return (
|
||||
|
||||
@@ -25,8 +25,9 @@ class ViewModeSelector extends React.Component {
|
||||
}
|
||||
|
||||
renderItem(icons, label, viewMode, setViewModeAction, isEnabled = true) {
|
||||
if (label === 'Table') console.log('render table view action');
|
||||
const isSelected = (this.props.topologyViewMode === viewMode);
|
||||
const className = classNames('view-mode-selector-action', {
|
||||
const className = classNames(`view-mode-selector-action view-${label}-action`, {
|
||||
'view-mode-selector-action-selected': isSelected,
|
||||
});
|
||||
const onClick = () => {
|
||||
|
||||
@@ -371,10 +371,10 @@ a {
|
||||
|
||||
.nodes-chart-overlay {
|
||||
pointer-events: none;
|
||||
opacity: 0;
|
||||
opacity: $node-elements-in-background-opacity;
|
||||
|
||||
&.active {
|
||||
opacity: $node-elements-in-background-opacity;
|
||||
&:not(.active) {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user