-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkeyspaces.cgi
59 lines (34 loc) · 1.5 KB
/
keyspaces.cgi
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
#! /usr/bin/perl
require 'cassandra-lib.pl';
&ReadParse();
&error_setup($text{'keyspace_err'});
&ui_print_header(undef, $module_info{'desc'},"");
my @strategies=( "SimpleStrategy", "NetworkTopologyStrategy" );
$in{'strategy'} ||= $strategies[0];
&indexof($in{'strategy'}, @strategies) >= 0 || &error($text{'strategy_err'});
print &ui_form_start('save_keyspace.cgi');
print &ui_table_start($text{'keyspace_new_title'}, "width=100%", 1);
print &ui_table_row($text{'keyspace_new_strategy'},
&ui_select_strategy_list($in{'strategy'},"keyspaces.cgi","",@strategies));
print &ui_table_row($text{'keyspace_new_name'},
&ui_textbox("keyspace","",30));
if($in{'strategy'} eq "NetworkTopologyStrategy"){
print &ui_table_row($text{'keyspace_new_datacenters'},
&ui_textbox("datacenters","",30));
print &ui_table_row($text{'keyspace_new_replication'},
&ui_textbox("replication_factor","",30));
}else{
print &ui_table_row($text{'keyspace_new_replication_simple'},
&ui_textbox("replication_factor","",30));
}
print &ui_table_row($text{'keyspace_new_durablewrites'},
&ui_select("durablewrites", "True", [ "True","False" ]));
print &ui_hidden("strategy", $in{'strategy'});
print &ui_table_row(&ui_reset($text{'button_reset'}),&ui_submit($text{'keyspace_new_createbutton'}));
print &ui_table_end();
print &ui_form_end();
print &ui_hr();
print &ui_table_start($text{'keyspace_list'}, "width=90%", 3);
&list_keyspaces();
print &ui_table_end();
&ui_print_footer("", $text{'index_return'});