Skip to content
This repository
branch: master
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 109 lines (89 sloc) 3.228 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109
<table id="navigation" class="table table-bordered table-striped">
<tr>
<td onclick="document.location.href='./'"><a href="./">Schema</a></td>
<td onclick="document.location.href='?nav=cluster'"><a href="?nav=cluster">Cluster</a></td>
</tr>
</table>

<?php echo $success_message; ?>
<?php echo $error_message; ?>

<?php
if (isset($_GET['nav']) && $_GET['nav'] == 'cluster'):
?>

<div id="cluster_info" class="well">

<div id="cluster_selection">
<font class="cluster_name">Cluster Name:</font>
<select name="cluster" id="cluster" onchange="applyClusterChange();">
<?php foreach ($cluster_details as $index => $one_cluster): ?>
<?php $current_cluster_name = $cluster_helper->getClusterNameForIndex($index); ?>
<?php if (!is_null($current_cluster_name)): ?><option value="<?php echo $index?>" <?php if ($cluster_helper->getClusterIndex() == $index): echo 'selected="selected"'; endif; ?>><?php echo $current_cluster_name?></option><?php endif; ?>
<?php endforeach; ?>
</select>
</div>

Cluster Partitioner: <?php echo $partitioner; ?><br />
Cluster Snitch: <?php echo $snitch; ?><br />
Thrift API Version: <?php echo $thrift_api_version; ?><br /><br />
Schema Versions: <br />
<table width="100%" class="cluster_status table table-bordered table-striped">
<?php
foreach ($schema_version as $version => $servers):
foreach ($servers as $server):
echo '<tr>';
if ($version == 'UNREACHABLE'):
echo '<td><span class="badge badge-important">&#215;</span></td><td>'.$server.'</td><td>'.$version.'</td>';
else:
echo '<td><span class="badge badge-success">&#10003;</span></td><td>'.$server.'</td><td>'.$version.'</td>';
endif;
echo '</tr>';
endforeach;
endforeach;
?>
</table>
</div>

<?php
else:
?>

<ul id="keyspaces" class="well"><li>
<h3>Keyspaces and Column Families</h3>

<a href="keyspace_action.php?action=create" class="btn btn-large btn-primary" style="color: #fff; text-decoration: none;">Create New Keyspace</a>

<br /><br />

<table width="100%" class="table table-bordered table-striped kcfs">
<?php
$nb_ks = count($keyspaces_name);
for ($i = 0; $i < $nb_ks; $i++):
$beg = $end = '';
if (!($i&1) and $i == $nb_ks-1):
$beg .= '</tr><tr><td colspan="2"><ul>';

$end .= '</ul></td></tr>';
elseif (!($i&1)):
if ($i) $beg .= '</tr>';
$beg .= '<tr><td><ul>';

$end .= '</ul></td>';
else:
$beg .= '<td><ul>';

$end .= '</ul></td>';
endif;

echo $beg;

$keyspace_name = $keyspaces_name[$i];

echo '<li><a href="describe_keyspace.php?keyspace_name='.$keyspace_name.'">'.$keyspace_name.'</a>';
$nb_cf = count($keyspaces_details[$i]['columnfamilies_name']);
if ($nb_cf):
echo '<ul>';
for ($j = 0; $j < $nb_cf; $j++):
$columnfamily_name = $keyspaces_details[$i]['columnfamilies_name'][$j];
echo '<li><a href="describe_columnfamily.php?keyspace_name='.$keyspace_name.'&amp;columnfamily_name='.$columnfamily_name.'">'.$columnfamily_name.'</a></li>';
endfor;
echo '</ul>';
endif;
echo '</li>';

echo $end;
endfor;
?>
</table>
</li></ul>

<?php
endif;
?>

<h3>JMX</h3>

<ul>
<li><a href="jmx.php">See Stats</a></li>
</ul>
Something went wrong with that request. Please try again.