@@ -1546,25 +1546,27 @@ function Cluster() {
15461546 recoveryListing . append ( '<li role="separator" class="divider"></li>' ) ;
15471547
15481548 // Suggest successor
1549- instance . children . forEach ( function ( replica ) {
1550- if ( ! replica . LogBinEnabled ) {
1551- return
1552- }
1553- if ( replica . SQLDelay > 0 ) {
1554- return
1555- }
1556- if ( ! replica . LogReplicationUpdatesEnabled ) {
1557- return
1558- }
1559- if ( replica . lastCheckInvalidProblem ( ) ) {
1560- return
1561- }
1562- if ( replica . notRecentlyCheckedProblem ( ) ) {
1563- return
1564- }
1565- recoveryListing . append (
1566- '<li><a href="#" data-btn="recover-suggested-successor" data-command="recover-suggested-successor" data-successor-host="' + replica . Key . Hostname + '" data-successor-port="' + replica . Key . Port + '">Recover, try to promote <code>' + replica . title + '</code></a></li>' ) ;
1567- } ) ;
1549+ if ( instance . children ) {
1550+ instance . children . forEach ( function ( replica ) {
1551+ if ( ! replica . LogBinEnabled ) {
1552+ return
1553+ }
1554+ if ( replica . SQLDelay > 0 ) {
1555+ return
1556+ }
1557+ if ( ! replica . LogReplicationUpdatesEnabled ) {
1558+ return
1559+ }
1560+ if ( replica . lastCheckInvalidProblem ( ) ) {
1561+ return
1562+ }
1563+ if ( replica . notRecentlyCheckedProblem ( ) ) {
1564+ return
1565+ }
1566+ recoveryListing . append (
1567+ '<li><a href="#" data-btn="recover-suggested-successor" data-command="recover-suggested-successor" data-successor-host="' + replica . Key . Hostname + '" data-successor-port="' + replica . Key . Port + '">Recover, try to promote <code>' + replica . title + '</code></a></li>' ) ;
1568+ } ) ;
1569+ }
15681570 }
15691571 if ( ! instance . isMaster ) {
15701572 recoveryListing . append ( '<li><a href="#" data-btn="auto" data-command="recover-auto">Auto (implies running external hooks/processes)</a></li>' ) ;
@@ -1633,16 +1635,6 @@ function Cluster() {
16331635 }
16341636 }
16351637
1636- function showInstanceTags ( instance ) {
1637- if ( instance . hasOwnProperty ( 'tagStrings' ) && instance . tagStrings . length ) {
1638- var tagsText = "" ;
1639- instance . tagStrings . forEach ( function ( tag ) {
1640- tagsText = tagsText . concat ( tag , ' ' ) ;
1641- } ) ;
1642- getInstanceDiv ( instance . id ) . find ( "h3 div.pull-right" ) . prepend ( '<span class="glyphicon glyphicon-tags" title="' + tagsText + '"></span> ' ) ;
1643- }
1644- }
1645-
16461638 function indicateClusterPoolInstances ( clusterPoolInstances ) {
16471639 var instancesMap = _instancesMap ;
16481640 for ( var pool in clusterPoolInstances . Details ) {
@@ -1682,15 +1674,6 @@ function Cluster() {
16821674
16831675 reviewReplicationAnalysis ( replicationAnalysis ) ;
16841676
1685- // Tags are displayed only for not aggregated instances
1686- for ( var instanceId in _instancesMap ) {
1687- let instance = _instancesMap [ instanceId ] ;
1688- getData ( "/api/tags/" + instance . Key . Hostname + "/" + instance . Key . Port , function ( tagStrings ) {
1689- instance . tagStrings = tagStrings ;
1690- showInstanceTags ( instance )
1691- } ) ;
1692- }
1693-
16941677 instances . forEach ( function ( instance ) {
16951678 if ( instance . isMaster ) {
16961679 getData ( "/api/recently-active-instance-recovery/" + instance . Key . Hostname + "/" + instance . Key . Port , function ( recoveries ) {
0 commit comments