SOLR-8918: Corrects usage of a global variable in admin page's stream.js which was overriding the same variable in cloud.js

This commit is contained in:
Dennis Gove 2016-04-19 13:49:26 -04:00
parent 939472985f
commit e6e495c795
3 changed files with 14 additions and 25 deletions

View File

@ -184,20 +184,20 @@ limitations under the License.
top: 2px;
}
#content #stream #result #explanation #graph-content
#content #stream #result #explanation #explanation-content
{
min-height: 50px;
width: 100%
}
#content #stream #result #explanation #graph-content .node circle
#content #stream #result #explanation #explanation-content .node circle
{
color: #c48f00;
stroke: #c48f00;
fill: #c48f00;
}
#content #stream #result #explanation #graph-content .link
#content #stream #result #explanation #explanation-content .link
{
fill: none;
stroke: #e0e0e0;
@ -205,28 +205,28 @@ limitations under the License.
}
#content #stream #result #explanation #legend .datastore circle,
#content #stream #result #explanation #graph-content .node.datastore circle
#content #stream #result #explanation #explanation-content .node.datastore circle
{
stroke: #3800c4;
fill: #3800c4;
}
#content #stream #result #explanation #legend .stream-source circle,
#content #stream #result #explanation #graph-content .node.stream-source circle
#content #stream #result #explanation #explanation-content .node.stream-source circle
{
stroke: #21a9ec;
fill: #21a9ec;
}
#content #stream #result #explanation #legend .stream-decorator circle,
#content #stream #result #explanation #graph-content .node.stream-decorator circle
#content #stream #result #explanation #explanation-content .node.stream-decorator circle
{
stroke: #cb21ec;
fill: #cb21ec;
}
#content #stream #result #explanation #legend .graph-source circle,
#content #stream #result #explanation #graph-content .node.graph-source circle
#content #stream #result #explanation #explanation-content .node.graph-source circle
{
stroke: #21eca9;
fill: #21eca9;

View File

@ -29,8 +29,6 @@ solrAdminApp.controller('StreamController',
$scope.doStream = function() {
// alert("doing stream")
var params = {};
params.core = $routeParams.core;
params.handler = $scope.qt;
@ -51,7 +49,7 @@ solrAdminApp.controller('StreamController',
if (undefined != jsonData["explanation"]) {
$scope.showExplanation = true;
graphSubController($scope, jsonData["explanation"])
streamGraphSubController($scope, jsonData["explanation"])
delete jsonData["explanation"]
} else {
$scope.showExplanation = false;
@ -76,18 +74,10 @@ solrAdminApp.controller('StreamController',
}
);
var graphSubController = function($scope, explanation) {
var streamGraphSubController = function($scope, explanation) {
$scope.showGraph = true;
$scope.pos = 0;
$scope.rows = 8;
$scope.helperData = {
protocol: [],
host: [],
hostname: [],
port: [],
pathname: []
};
$scope.resetGraph = function() {
$scope.pos = 0;
@ -134,7 +124,7 @@ var graphSubController = function($scope, explanation) {
$scope.showPaging = false;
$scope.isRadial = false;
$scope.graphData = recurse(data, 1);
$scope.explanationData = recurse(data, 1);
$scope.depth = maxDepth + 1;
$scope.leafCount = leafCount;
@ -143,17 +133,16 @@ var graphSubController = function($scope, explanation) {
$scope.initGraph(explanation);
};
solrAdminApp.directive('foograph', function(Constants) {
solrAdminApp.directive('explanationGraph', function(Constants) {
return {
restrict: 'EA',
scope: {
data: "=",
leafCount: "=",
depth: "=",
helperData: "=",
isRadial: "="
depth: "="
},
link: function(scope, element, attrs) {
var helper_path_class = function(p) {
var classes = ['link'];

View File

@ -38,7 +38,7 @@ limitations under the License.
<div ng-show="showExplanation" id="explanation" class="clearfix">
<div id="frame">
<div foograph id="graph-content" data="graphData" depth="depth" leaf-count="leafCount" helper-data="helperData" is-radial="false" class="content clearfix" ng-show="showGraph">
<div explanation-graph id="explanation-content" data="explanationData" depth="depth" leaf-count="leafCount" class="content clearfix" ng-show="showGraph">
<div id="legend">
<svg width="100%" height="15">
<g transform="translate(5,10)" class="stream-decorator"><circle r="4.5"></circle></g>