diff --git a/README.mkd b/README.mkd index 8d2f0ee..7577b88 100644 --- a/README.mkd +++ b/README.mkd @@ -4,14 +4,14 @@ Cassandra Cluster Admin is a GUI tool to help people administrate their Apache C If you're like me and used MySQL for a while (and still using it!), you get used to phpMyAdmin and its simple and easy to use user interface. I thought it would be nice to have a similar tool for Cassandra and I couldn't find any, so I build my own! -With Cassandra Cluster Admin, you can create/edit/drop keyspace and column family, truncate a column family, create secondary indexes, display a row, browse data (get range slice), insert a row and much more! +With Cassandra Cluster Admin, you can create/edit/drop keyspaces and column families, truncate a column family, create secondary indexes, display a row, browse data (get range slice), insert a row and much more! Bug report and/or pull request are always welcome! Screenshots ------------------------------------------------ -[![Cassandra Cluster Admin Homepage](http://img708.imageshack.us/img708/7939/screenshot1kk.th.png)](http://img708.imageshack.us/img708/7939/screenshot1kk.png) [![Cassandra Cluster Admin Column family Definition and Actions](http://img24.imageshack.us/img24/7249/screenshot2po.th.png)](http://img24.imageshack.us/img24/7249/screenshot2po.png) [![Cassandra Cluster Admin List of Column Families in a Keyspace](http://img855.imageshack.us/img855/3512/screenshot3tc.th.png)](http://img855.imageshack.us/img855/3512/screenshot3tc.png) [![Cassandra Cluster Admin Edit a Column Family](http://img52.imageshack.us/img52/6885/screenshot4kr.th.png)](http://img52.imageshack.us/img52/6885/screenshot4kr.png) +[![Viewing Keyspaces and Column Families](http://www.flashy.cc/cassandra-cluster-admin/1_small.png)](http://www.flashy.cc/cassandra-cluster-admin/1.png) [![Viewing Cluster](http://www.flashy.cc/cassandra-cluster-admin/2_small.png)](http://www.flashy.cc/cassandra-cluster-admin/2.png) [![Cassandra Cluster Admin Column family Definition and Actions](http://www.flashy.cc/cassandra-cluster-admin/4_small.png)](http://www.flashy.cc/cassandra-cluster-admin/4.png) [![Cassandra Cluster Admin List of Column Families in a Keyspace](http://www.flashy.cc/cassandra-cluster-admin/5_small.png)](http://www.flashy.cc/cassandra-cluster-admin/5.png) Supported actions ------------------------------------------------ @@ -57,11 +57,11 @@ Add the following line to your php.ini file: Disclaimer ------------------------------------------------ -This software is still in beta so always be careful when using it on a production cluster. I won't take any responsability if for some reason this tool drop all your keyspaces and wipe all your data, althought I really doubt it will happen =) +This software is still in beta so always be careful when using it on a production cluster. I won't take any responsability if for some reason this tool drops all your keyspaces and wipes all your data, although I really doubt it will happen =) Credits ------------------------------------------------ * The Apache Cassandra project - http://cassandra.apache.org/ * Tyler Hobbs (thobbs) - phpcassa - https://github.com/thobbs/phpcassa -* Twitter Bootstrap - https://github.com/twitter/bootstrap/ \ No newline at end of file +* Twitter Bootstrap - https://github.com/twitter/bootstrap/ diff --git a/columnfamily_action.php b/columnfamily_action.php index 672862b..1d628cf 100644 --- a/columnfamily_action.php +++ b/columnfamily_action.php @@ -550,7 +550,7 @@ $column_name = $_POST['column_name_'.$no_scf.'_'.$no_column]; $column_value = $_POST['column_value_'.$no_scf.'_'.$no_column]; - if (!empty($_POST['column_name_'.$no_scf.'_'.$no_column]) && !empty($_POST['column_value_'.$no_scf.'_'.$no_column])) { + if ($_POST['column_name_'.$no_scf.'_'.$no_column] != '' && $_POST['column_value_'.$no_scf.'_'.$no_column] != '') { // CF if ($column_key_name == '') { $data[$column_name] = $column_value; @@ -1034,4 +1034,4 @@ } echo getHTML('footer.php'); -?> \ No newline at end of file +?> diff --git a/css/style.css b/css/style.css index 76153cb..a293b6e 100644 --- a/css/style.css +++ b/css/style.css @@ -267,3 +267,12 @@ table.kcfs a { table.kcfs a:hover { text-decoration: underline; } + +#describe_columnfamily_navigation td { + width: 33%; + cursor: pointer; +} + +#keyspace_navigation td { + cursor: pointer; +} diff --git a/describe_keyspace.php b/describe_keyspace.php index b5a7808..9fa121c 100644 --- a/describe_keyspace.php +++ b/describe_keyspace.php @@ -74,10 +74,10 @@ for ($i = 0; $i < $nb_cfs; $i++) { $one_cf = $describe_keyspace->cf_defs[$i]; - $vw_vars['cf_def'] = $one_cf; + $vw_vars['cf_def'] = $one_cf; $vw_vars['columnfamily_name'] = $one_cf->name; - $vw_vars['show_edit_link'] = true; - $vw_vars['list_column_families'] .= getHTML('columnfamily_details.php',$vw_vars); + $vw_vars['show_edit_link'] = true; + $vw_vars['list_column_families'] .= getHTML('columnfamily_short_details.php',$vw_vars); } } @@ -96,4 +96,4 @@ } echo getHTML('footer.php'); -?> \ No newline at end of file +?> diff --git a/views/cluster_info.php b/views/cluster_info.php index 99bfea6..ad1807a 100644 --- a/views/cluster_info.php +++ b/views/cluster_info.php @@ -1,6 +1,6 @@ - + @@ -9,7 +9,7 @@
@@ -106,4 +106,3 @@ - diff --git a/views/columnfamily_short_details.php b/views/columnfamily_short_details.php new file mode 100644 index 0000000..a24c780 --- /dev/null +++ b/views/columnfamily_short_details.php @@ -0,0 +1 @@ + diff --git a/views/describe_columnfamily.php b/views/describe_columnfamily.php index 66df210..8cbb48a 100644 --- a/views/describe_columnfamily.php +++ b/views/describe_columnfamily.php @@ -10,11 +10,36 @@ -Browse Data + + + - Create Secondary Index + + +
Details
+ +
+ + + + Edit Column Family + + Truncate Column Family + + Drop Column Family + +

Column Family Details

+ + + + +Browse Data Get Key @@ -27,16 +52,9 @@ - Edit Column Family - - Truncate Column Family - - Drop Column Family + Create Secondary Index -

Column Family Details

- - 0): ?>

Secondary Indexes

@@ -47,4 +65,9 @@ 'columnfamily_name' => $columnfamily_name)); endforeach; ?> - \ No newline at end of file + + +
diff --git a/views/describe_keyspace.php b/views/describe_keyspace.php index c829409..64c238e 100644 --- a/views/describe_keyspace.php +++ b/views/describe_keyspace.php @@ -7,16 +7,30 @@ + + + - Create New Column Family - Edit Keyspace - Drop Keyspace + + +
Details
+ +
+ + + + Edit Keyspace + Drop Keyspace + +

Keyspace Details

@@ -43,9 +57,6 @@
-

List of Column Families in Keyspace

- -

Ring

+ + + + + Create New Column Family + + +

Column Families in Keyspace

+ + +
+ + + +