I am trying to see if the Tool Tip mentioned here contains Database Server
or Database Load Balancer and remove the corresponding rows. But I get this
error :

Invalid row index 13. Should be in the range [0-12].

Please let me know a work around.....I am in the middle some important
activity

CSV File :

ServerName, Parent, ToolTip
Load Balancer, , Main Load Balancer
web-srv01, Load Balancer, Web Server
web-srv02, Load Balancer, Web Server
web-srv03, Load Balancer, Web Server
ias-srv01, web-srv01, App Server
ias-srv02, web-srv02, App Server
ias-srv03, web-srv03, App Server
oif-srv01, web-srv01, OIF Server
oif-srv02, web-srv02, OIF Server
oif-srv03, web-srv03, OIF Server
DB Load Balancer, ,Database Load Balancer
db-srv01, DB Load Balancer, Database Server
db-srv02, DB Load Balancer, Database Server
db-srv03, DB Load Balancer, Database Server


Actual Code :

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
 <HEAD>
  <TITLE> ProMonitor Web Client </TITLE>
<script>

function data_pull() {
var threshold = new google.visualization.Query('
http://serdev69.apac.nokia.com:8080/ProWebClient/csv?col=SSS&url=orgchart1.csv'
);
threshold.send(Org_Threshold);
}

</script>
<script type='text/javascript' src='http://www.google.com/jsapi'></script>
<script type='text/javascript'>
 google.load('visualization', '1',
{'packages':['annotatedtimeline,barchart,gauge,columnchart,orgchart']});
 google.setOnLoadCallback(data_pull);

 // Check for error and return datatable from query response
 function getDataTable(response) {
 if (response.isError()) {
   alert('Error in query: ' + response.getMessage() + ' ' +
response.getDetailedMessage());
   return(null);
  }
  return(response.getDataTable());
 }

</script>
 <!-- CSS -->
<link rel="stylesheet" href="blueprint/screen.css" type="text/css"
media="screen, projection" />
<link rel="stylesheet" href="blueprint/print.css" type="text/css"
media="print" />
<link rel="stylesheet" href="blueprint/ie.css" type="text/css"
media="screen, projection" />

 </HEAD>

 <BODY>

<div class="container">

<table border=0 cellspacing=0 cellpadding=0;>
<tr>
<div id="Org_ALARM">

<script type="text/javascript">
var statusTable= new google.visualization.DataTable();
function Org_Threshold(response) {
MemoryAlarmTable = getDataTable(response);
// MemoryAlarmView = new google.visualization.DataView(MemoryAlarmTable);
MemoryAlarmChart = new
google.visualization.OrgChart(document.getElementById('MemoryAlarmGraph'));
NoofRows = MemoryAlarmTable.getNumberOfRows();

for(i = 0; i < NoofRows; i++)
    {
            if(MemoryAlarmTable.getFormattedValue(i, 2) == 'Database Server'
|| MemoryAlarmTable.getFormattedValue(i, 2) == 'Database Load Balancer')
        {
            MemoryAlarmTable.removeRow(i);

        }

        if(MemoryAlarmTable.getFormattedValue(i, 2) == 'Web Server')
                        {
                                MemoryAlarmTable.setRowProperty(i, 'style',
'background-color:#008000');
                        }
            else if(MemoryAlarmTable.getFormattedValue(i, 2) == 'App
Server')
                    {
                            MemoryAlarmTable.setRowProperty(i, 'style',
'background-color:#FF0000');
                    }

    }

MemoryAlarmChart.draw(MemoryAlarmTable, {allowHtml:true, size: 'large'});
}

</script>
<div id="MemoryAlarmGraph" style='width: 100px;height:auto;'></div>
</div>
</tr>
</table>

</div>
</BODY>
</HTML>

--

You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-visualization-api?hl=en.


Reply via email to