Skip to content

Commit

Permalink
Merge branch 'master' of github.com:sebgiroux/Cassandra-Cluster-Admin
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastien Giroux committed Nov 8, 2012
2 parents 9890064 + e51b124 commit 7d5ae46
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 2 deletions.
5 changes: 4 additions & 1 deletion css/style.css
Expand Up @@ -227,4 +227,7 @@ a, a:visited {


#columnfamily_details { #columnfamily_details {
max-width: 400px; max-width: 400px;
} }

.composite_value {font-size:14px;}
.composite_value b {color:blue;}
6 changes: 6 additions & 0 deletions helper/ColumnFamilyHelper.php
Expand Up @@ -116,6 +116,12 @@ public static function displaySCFRow($row_key,$keyspace_name,$columnfamily_name,
return $output; return $output;
} }


/*
Used by usort() method. Assists in sorts column families by name
@param $a cassandra\CFDef Object
@param $b cassandra\CFDef Object
*/
public static function sortCfDefsCallable($a, $b) { public static function sortCfDefsCallable($a, $b) {
return strcmp($a->name, $b->name); return strcmp($a->name, $b->name);
} }
Expand Down
15 changes: 14 additions & 1 deletion views/columnfamily_row.php
Expand Up @@ -17,7 +17,20 @@
<?php foreach ($row as $column => $value): ?> <?php foreach ($row as $column => $value): ?>
<tr> <tr>
<td><?php echo htmlentities($column,ENT_COMPAT,'UTF-8'); ?></td> <td><?php echo htmlentities($column,ENT_COMPAT,'UTF-8'); ?></td>
<td><pre><?php echo htmlentities($value,ENT_COMPAT,'UTF-8'); ?></pre></td> <td><pre><?php
if (is_array($value)) { // not sure of a better way to determine if composite or not

foreach ($value as &$valItem) {
$valItem = htmlentities($valItem,ENT_COMPAT,'UTF-8');
}

echo '<div class="composite_value" title="CompositeType"><b>CompositeType [</b> <i>'.
implode('</i> <b>,</b> <i>', $value).
'</i> <b>]</b></div>';
} else {
echo htmlentities($value,ENT_COMPAT,'UTF-8');
}
?></pre></td>
</tr> </tr>
<?php endforeach; ?> <?php endforeach; ?>
</table> </table>

0 comments on commit 7d5ae46

Please sign in to comment.