appscale-tools 1.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (114) hide show
  1. data/LICENSE +37 -0
  2. data/README +17 -0
  3. data/bin/appscale-add-keypair +15 -0
  4. data/bin/appscale-describe-instances +16 -0
  5. data/bin/appscale-remove-app +13 -0
  6. data/bin/appscale-reset-pwd +13 -0
  7. data/bin/appscale-run-instances +15 -0
  8. data/bin/appscale-terminate-instances +14 -0
  9. data/bin/appscale-upload-app +13 -0
  10. data/doc/AdvancedNode.html +163 -0
  11. data/doc/AppControllerClient.html +831 -0
  12. data/doc/AppEngineConfigException.html +165 -0
  13. data/doc/AppScaleException.html +165 -0
  14. data/doc/AppScaleTools.html +768 -0
  15. data/doc/BadCommandLineArgException.html +166 -0
  16. data/doc/BadConfigurationException.html +166 -0
  17. data/doc/CommonFunctions.html +2559 -0
  18. data/doc/EncryptionHelper.html +332 -0
  19. data/doc/GodInterface.html +443 -0
  20. data/doc/InfrastructureException.html +166 -0
  21. data/doc/Node.html +470 -0
  22. data/doc/NodeLayout.html +1297 -0
  23. data/doc/Object.html +539 -0
  24. data/doc/ParseArgs.html +268 -0
  25. data/doc/RemoteLogging.html +268 -0
  26. data/doc/SimpleNode.html +163 -0
  27. data/doc/UsageText.html +1204 -0
  28. data/doc/UserAppClient.html +993 -0
  29. data/doc/VMTools.html +1365 -0
  30. data/doc/bin/appscale-add-keypair.html +56 -0
  31. data/doc/bin/appscale-describe-instances.html +56 -0
  32. data/doc/bin/appscale-remove-app.html +56 -0
  33. data/doc/bin/appscale-reset-pwd.html +56 -0
  34. data/doc/bin/appscale-run-instances.html +56 -0
  35. data/doc/bin/appscale-terminate-instances.html +56 -0
  36. data/doc/bin/appscale-upload-app.html +56 -0
  37. data/doc/created.rid +21 -0
  38. data/doc/images/add.png +0 -0
  39. data/doc/images/brick.png +0 -0
  40. data/doc/images/brick_link.png +0 -0
  41. data/doc/images/bug.png +0 -0
  42. data/doc/images/bullet_black.png +0 -0
  43. data/doc/images/bullet_toggle_minus.png +0 -0
  44. data/doc/images/bullet_toggle_plus.png +0 -0
  45. data/doc/images/date.png +0 -0
  46. data/doc/images/delete.png +0 -0
  47. data/doc/images/find.png +0 -0
  48. data/doc/images/loadingAnimation.gif +0 -0
  49. data/doc/images/macFFBgHack.png +0 -0
  50. data/doc/images/package.png +0 -0
  51. data/doc/images/page_green.png +0 -0
  52. data/doc/images/page_white_text.png +0 -0
  53. data/doc/images/page_white_width.png +0 -0
  54. data/doc/images/plugin.png +0 -0
  55. data/doc/images/ruby.png +0 -0
  56. data/doc/images/tag_blue.png +0 -0
  57. data/doc/images/tag_green.png +0 -0
  58. data/doc/images/transparent.png +0 -0
  59. data/doc/images/wrench.png +0 -0
  60. data/doc/images/wrench_orange.png +0 -0
  61. data/doc/images/zoom.png +0 -0
  62. data/doc/index.html +116 -0
  63. data/doc/js/darkfish.js +153 -0
  64. data/doc/js/jquery.js +18 -0
  65. data/doc/js/navigation.js +142 -0
  66. data/doc/js/quicksearch.js +114 -0
  67. data/doc/js/search.js +94 -0
  68. data/doc/js/search_index.js +1 -0
  69. data/doc/js/searcher.js +228 -0
  70. data/doc/js/thickbox-compressed.js +10 -0
  71. data/doc/lib/app_controller_client_rb.html +60 -0
  72. data/doc/lib/appscale_tools_rb.html +88 -0
  73. data/doc/lib/common_functions_rb.html +78 -0
  74. data/doc/lib/custom_exceptions_rb.html +54 -0
  75. data/doc/lib/encryption_helper_rb.html +60 -0
  76. data/doc/lib/godinterface_rb.html +52 -0
  77. data/doc/lib/node_layout_rb.html +55 -0
  78. data/doc/lib/parse_args_rb.html +58 -0
  79. data/doc/lib/remote_log_rb.html +58 -0
  80. data/doc/lib/sshcopyid.html +174 -0
  81. data/doc/lib/usage_text_rb.html +58 -0
  82. data/doc/lib/user_app_client_rb.html +62 -0
  83. data/doc/lib/vm_tools_rb.html +62 -0
  84. data/doc/table_of_contents.html +496 -0
  85. data/lib/app_controller_client.rb +181 -0
  86. data/lib/appscale_tools.rb +403 -0
  87. data/lib/common_functions.rb +1467 -0
  88. data/lib/custom_exceptions.rb +25 -0
  89. data/lib/encryption_helper.rb +86 -0
  90. data/lib/godinterface.rb +152 -0
  91. data/lib/node_layout.rb +665 -0
  92. data/lib/parse_args.rb +415 -0
  93. data/lib/remote_log.rb +46 -0
  94. data/lib/sshcopyid +65 -0
  95. data/lib/usage_text.rb +144 -0
  96. data/lib/user_app_client.rb +245 -0
  97. data/lib/vm_tools.rb +549 -0
  98. data/test/tc_app_controller_client.rb +10 -0
  99. data/test/tc_appscale_add_keypair.rb +44 -0
  100. data/test/tc_appscale_describe_instances.rb +69 -0
  101. data/test/tc_appscale_remove_app.rb +128 -0
  102. data/test/tc_appscale_reset_pwd.rb +156 -0
  103. data/test/tc_appscale_run_instances.rb +48 -0
  104. data/test/tc_appscale_terminate_instances.rb +104 -0
  105. data/test/tc_appscale_upload_app.rb +166 -0
  106. data/test/tc_common_functions.rb +56 -0
  107. data/test/tc_encryption_helper.rb +10 -0
  108. data/test/tc_god_interface.rb +10 -0
  109. data/test/tc_node_layout.rb +93 -0
  110. data/test/tc_parse_args.rb +160 -0
  111. data/test/tc_user_app_client.rb +10 -0
  112. data/test/tc_vm_tools.rb +10 -0
  113. data/test/ts_all.rb +20 -0
  114. metadata +211 -0
@@ -0,0 +1,114 @@
1
+ /**
2
+ *
3
+ * JQuery QuickSearch - Hook up a form field to hide non-matching elements.
4
+ * $Id: quicksearch.js 53 2009-01-07 02:52:03Z deveiant $
5
+ *
6
+ * Author: Michael Granger <mgranger@laika.com>
7
+ *
8
+ */
9
+ jQuery.fn.quicksearch = function( target, searchElems, options ) {
10
+ // console.debug( "Quicksearch fn" );
11
+
12
+ var settings = {
13
+ delay: 250,
14
+ clearButton: false,
15
+ highlightMatches: false,
16
+ focusOnLoad: false,
17
+ noSearchResultsIndicator: null
18
+ };
19
+ if ( options ) $.extend( settings, options );
20
+
21
+ return jQuery(this).each( function() {
22
+ // console.debug( "Creating a new quicksearch on %o for %o", this, searchElems );
23
+ new jQuery.quicksearch( this, searchElems, settings );
24
+ });
25
+ };
26
+
27
+
28
+ jQuery.quicksearch = function( searchBox, searchElems, settings ) {
29
+ var timeout;
30
+ var boxdiv = $(searchBox).parents('div').eq(0);
31
+
32
+ function init() {
33
+ setupKeyEventHandlers();
34
+ focusOnLoad();
35
+ };
36
+
37
+ function setupKeyEventHandlers() {
38
+ // console.debug( "Hooking up the 'keypress' event to %o", searchBox );
39
+ $(searchBox).
40
+ unbind( 'keyup' ).
41
+ keyup( function(e) { return onSearchKey( e.keyCode ); });
42
+ $(searchBox).
43
+ unbind( 'keypress' ).
44
+ keypress( function(e) {
45
+ switch( e.which ) {
46
+ // Execute the search on Enter, Tab, or Newline
47
+ case 9:
48
+ case 13:
49
+ case 10:
50
+ clearTimeout( timeout );
51
+ e.preventDefault();
52
+ doQuickSearch();
53
+ break;
54
+
55
+ // Allow backspace
56
+ case 8:
57
+ return true;
58
+ break;
59
+
60
+ // Only allow valid search characters
61
+ default:
62
+ return validQSChar( e.charCode );
63
+ }
64
+ });
65
+ };
66
+
67
+ function focusOnLoad() {
68
+ if ( !settings.focusOnLoad ) return false;
69
+ $(searchBox).focus();
70
+ };
71
+
72
+ function onSearchKey ( code ) {
73
+ clearTimeout( timeout );
74
+ // console.debug( "...scheduling search." );
75
+ timeout = setTimeout( doQuickSearch, settings.delay );
76
+ };
77
+
78
+ function validQSChar( code ) {
79
+ var c = String.fromCharCode( code );
80
+ return (
81
+ (c == ':') ||
82
+ (c >= 'a' && c <= 'z') ||
83
+ (c >= 'A' && c <= 'Z')
84
+ );
85
+ };
86
+
87
+ function doQuickSearch() {
88
+ var searchText = searchBox.value;
89
+ var pat = new RegExp( searchText, "im" );
90
+ var shownCount = 0;
91
+
92
+ if ( settings.noSearchResultsIndicator ) {
93
+ $('#' + settings.noSearchResultsIndicator).hide();
94
+ }
95
+
96
+ // All elements start out hidden
97
+ $(searchElems).each( function(index) {
98
+ var str = $(this).text();
99
+
100
+ if ( pat.test(str) ) {
101
+ shownCount += 1;
102
+ $(this).fadeIn();
103
+ } else {
104
+ $(this).hide();
105
+ }
106
+ });
107
+
108
+ if ( shownCount == 0 && settings.noSearchResultsIndicator ) {
109
+ $('#' + settings.noSearchResultsIndicator).slideDown();
110
+ }
111
+ };
112
+
113
+ init();
114
+ };
data/doc/js/search.js ADDED
@@ -0,0 +1,94 @@
1
+ Search = function(data, input, result) {
2
+ this.data = data;
3
+ this.$input = $(input);
4
+ this.$result = $(result);
5
+
6
+ this.$current = null;
7
+ this.$view = this.$result.parent();
8
+ this.searcher = new Searcher(data.index);
9
+ this.init();
10
+ }
11
+
12
+ Search.prototype = $.extend({}, Navigation, new function() {
13
+ var suid = 1;
14
+
15
+ this.init = function() {
16
+ var _this = this;
17
+ var observer = function() {
18
+ _this.search(_this.$input[0].value);
19
+ };
20
+ this.$input.keyup(observer);
21
+ this.$input.click(observer); // mac's clear field
22
+
23
+ this.searcher.ready(function(results, isLast) {
24
+ _this.addResults(results, isLast);
25
+ })
26
+
27
+ this.initNavigation();
28
+ this.setNavigationActive(false);
29
+ }
30
+
31
+ this.search = function(value, selectFirstMatch) {
32
+ value = jQuery.trim(value).toLowerCase();
33
+ if (value) {
34
+ this.setNavigationActive(true);
35
+ } else {
36
+ this.setNavigationActive(false);
37
+ }
38
+
39
+ if (value == '') {
40
+ this.lastQuery = value;
41
+ this.$result.empty();
42
+ this.setNavigationActive(false);
43
+ } else if (value != this.lastQuery) {
44
+ this.lastQuery = value;
45
+ this.firstRun = true;
46
+ this.searcher.find(value);
47
+ }
48
+ }
49
+
50
+ this.addResults = function(results, isLast) {
51
+ var target = this.$result.get(0);
52
+ if (this.firstRun && (results.length > 0 || isLast)) {
53
+ this.$current = null;
54
+ this.$result.empty();
55
+ }
56
+
57
+ for (var i=0, l = results.length; i < l; i++) {
58
+ target.appendChild(this.renderItem.call(this, results[i]));
59
+ };
60
+
61
+ if (this.firstRun && results.length > 0) {
62
+ this.firstRun = false;
63
+ this.$current = $(target.firstChild);
64
+ this.$current.addClass('current');
65
+ }
66
+ if (jQuery.browser.msie) this.$element[0].className += '';
67
+ }
68
+
69
+ this.move = function(isDown) {
70
+ if (!this.$current) return;
71
+ var $next = this.$current[isDown ? 'next' : 'prev']();
72
+ if ($next.length) {
73
+ this.$current.removeClass('current');
74
+ $next.addClass('current');
75
+ this.scrollIntoView($next[0], this.$view[0]);
76
+ this.$current = $next;
77
+ }
78
+ return true;
79
+ }
80
+
81
+ this.hlt = function(html) {
82
+ return this.escapeHTML(html).
83
+ replace(/\u0001/g, '<em>').
84
+ replace(/\u0002/g, '</em>');
85
+ }
86
+
87
+ this.escapeHTML = function(html) {
88
+ return html.replace(/[&<>]/g, function(c) {
89
+ return '&#' + c.charCodeAt(0) + ';';
90
+ });
91
+ }
92
+
93
+ });
94
+
@@ -0,0 +1 @@
1
+ var search_data = {"index":{"searchIndex":["advancednode","appcontrollerclient","appengineconfigexception","appscaleexception","appscaletools","badcommandlineargexception","badconfigurationexception","commonfunctions","encryptionhelper","godinterface","infrastructureexception","node","nodelayout","object","parseargs","remotelogging","simplenode","usagetext","userappclient","vmtools","add_db_role()","add_instance()","add_keypair()","add_rabbitmq_role()","add_role()","app_is_running?()","appengine()","appname()","auto()","backup_neptune_info()","change_password()","clear_app()","commit_new_app()","commit_new_app_name()","commit_new_user()","commit_tar()","confirm()","convert_fqdn_to_ip()","create_user()","db_master()","delete_app()","delete_instance()","describe_instances()","does_app_exist?()","does_user_exist?()","done_uploading()","email()","encrypt_password()","ensure_keyname_not_in_use()","ensure_min_vms_available()","ensure_tools_are_installed()","errors()","errors()","expand_roles()","file()","find_real_ssh_key()","force()","generate_cloud_layout()","generate_pem_files()","generate_secret_key()","generate_ssh_key()","get_all_apps()","get_all_public_ips()","get_all_public_ips()","get_app_admin()","get_app_data()","get_app_info()","get_app_info_from_options()","get_app_name_from_tar()","get_app_name_via_xml()","get_app_name_via_yaml()","get_cloud_creds()","get_credentials()","get_creds_from_env()","get_db_master_ip()","get_email()","get_from_yaml()","get_head_node_ip()","get_hybrid_creds()","get_hybrid_env_vars()","get_hybrid_machine()","get_infrastructure()","get_initial_layout()","get_ips()","get_ips_from_yaml()","get_line_from_stdin_no_echo()","get_load_balancer_id()","get_load_balancer_ip()","get_login_ip()","get_password()","get_public_ips()","get_random_alphanumeric()","get_remote_appscale_home()","get_role_from_nodes()","get_role_info()","get_secret_key()","get_status()","get_table()","get_tar()","get_usage()","get_userappserver_ip()","get_username_from_options()","get_vals_from_args()","get_vmm_keys()","group()","h()","head_node()","help()","iaas()","infrastructure()","instance_type()","ips()","is_advanced_format?()","is_done_initializing?()","is_done_loading?()","is_live?()","is_port_open?()","is_simple_format?()","keyname()","kill()","local_ip()","login_node()","lookup_cloud_env()","machine()","make_appscale_directory()","make_call()","make_call()","max()","max_images()","min()","min_images()","move_app()","n()","new()","new()","new()","new()","nodes()","open_ports_in_cloud()","other_nodes()","parse_ip()","post()","r()","read_factor()","read_file()","read_nodes_json()","remote_post()","remove()","remove_app()","replication_factor()","require_commands()","reset_password()","restore_from_tar()","restore_neptune_info()","rsync_files()","run_instances()","run_remote_command()","scp()","scp_app_to_ip()","scp_file()","set_capabilities()","set_cloud_admin_capabilities()","set_cloud_admin_status()","set_hybrid_creds()","set_parameters()","shell()","shutdown()","sleep_until_port_is_closed()","sleep_until_port_is_open()","spawn_head_node()","spawn_head_node_via_cloud()","spawn_head_node_via_vmm()","spawn_vms()","start()","start_god()","start_head_node()","status()","stop()","stop_app()","table()","terminate_all_vms()","terminate_infrastructure_machines()","terminate_instances()","test()","to_hash()","update()","update_appcontroller()","update_locations_file()","upload_app()","usage()","user_has_cmd?()","v()","valid?()","valid?()","valid_advanced_format?()","valid_database_replication?()","valid_simple_format?()","validate_app_name()","verbose()","verify_credentials_are_set_correctly()","verify_credentials_exist()","verify_ids()","version()","w()","wait_for_app_to_start()","wait_for_nodes_to_load()","wait_until_redirect()","warn_on_large_app_size()","write_and_copy_node_file()","write_factor()","write_file()","write_node_file()","write_nodes_json()","sshcopyid"],"longSearchIndex":["advancednode","appcontrollerclient","appengineconfigexception","appscaleexception","appscaletools","badcommandlineargexception","badconfigurationexception","commonfunctions","encryptionhelper","godinterface","infrastructureexception","node","nodelayout","object","parseargs","remotelogging","simplenode","usagetext","userappclient","vmtools","node#add_db_role()","userappclient#add_instance()","appscaletools::add_keypair()","node#add_rabbitmq_role()","node#add_role()","appcontrollerclient#app_is_running?()","usagetext::appengine()","usagetext::appname()","usagetext::auto()","usagetext::backup_neptune_info()","userappclient#change_password()","commonfunctions::clear_app()","userappclient#commit_new_app()","userappclient#commit_new_app_name()","userappclient#commit_new_user()","userappclient#commit_tar()","usagetext::confirm()","commonfunctions::convert_fqdn_to_ip()","commonfunctions::create_user()","nodelayout#db_master()","userappclient#delete_app()","userappclient#delete_instance()","appscaletools::describe_instances()","userappclient#does_app_exist?()","userappclient#does_user_exist?()","appcontrollerclient#done_uploading()","usagetext::email()","commonfunctions::encrypt_password()","vmtools::ensure_keyname_not_in_use()","vmtools::ensure_min_vms_available()","vmtools::ensure_tools_are_installed()","node#errors()","nodelayout#errors()","node#expand_roles()","usagetext::file()","commonfunctions::find_real_ssh_key()","usagetext::force()","nodelayout#generate_cloud_layout()","encryptionhelper::generate_pem_files()","encryptionhelper::generate_secret_key()","encryptionhelper::generate_ssh_key()","userappclient#get_all_apps()","appcontrollerclient#get_all_public_ips()","commonfunctions::get_all_public_ips()","userappclient#get_app_admin()","userappclient#get_app_data()","commonfunctions::get_app_info()","commonfunctions::get_app_info_from_options()","commonfunctions::get_app_name_from_tar()","commonfunctions::get_app_name_via_xml()","commonfunctions::get_app_name_via_yaml()","vmtools::get_cloud_creds()","commonfunctions::get_credentials()","vmtools::get_creds_from_env()","commonfunctions::get_db_master_ip()","commonfunctions::get_email()","commonfunctions::get_from_yaml()","commonfunctions::get_head_node_ip()","vmtools::get_hybrid_creds()","vmtools::get_hybrid_env_vars()","vmtools::get_hybrid_machine()","commonfunctions::get_infrastructure()","vmtools::get_initial_layout()","vmtools::get_ips()","commonfunctions::get_ips_from_yaml()","commonfunctions::get_line_from_stdin_no_echo()","commonfunctions::get_load_balancer_id()","commonfunctions::get_load_balancer_ip()","commonfunctions::get_login_ip()","commonfunctions::get_password()","vmtools::get_public_ips()","commonfunctions::get_random_alphanumeric()","commonfunctions::get_remote_appscale_home()","commonfunctions::get_role_from_nodes()","appcontrollerclient#get_role_info()","commonfunctions::get_secret_key()","appcontrollerclient#get_status()","commonfunctions::get_table()","userappclient#get_tar()","usagetext::get_usage()","appcontrollerclient#get_userappserver_ip()","commonfunctions::get_username_from_options()","parseargs::get_vals_from_args()","vmtools::get_vmm_keys()","usagetext::group()","usagetext::h()","nodelayout#head_node()","usagetext::help()","usagetext::iaas()","usagetext::infrastructure()","usagetext::instance_type()","usagetext::ips()","nodelayout#is_advanced_format?()","appcontrollerclient#is_done_initializing?()","appcontrollerclient#is_done_loading?()","appcontrollerclient#is_live?()","commonfunctions::is_port_open?()","nodelayout#is_simple_format?()","usagetext::keyname()","appcontrollerclient#kill()","vmtools::local_ip()","nodelayout#login_node()","vmtools::lookup_cloud_env()","usagetext::machine()","commonfunctions::make_appscale_directory()","appcontrollerclient#make_call()","userappclient#make_call()","usagetext::max()","nodelayout#max_images()","usagetext::min()","nodelayout#min_images()","commonfunctions::move_app()","usagetext::n()","appcontrollerclient::new()","node::new()","nodelayout::new()","userappclient::new()","nodelayout#nodes()","vmtools::open_ports_in_cloud()","nodelayout#other_nodes()","nodelayout#parse_ip()","remotelogging::post()","usagetext::r()","nodelayout#read_factor()","commonfunctions::read_file()","commonfunctions::read_nodes_json()","remotelogging::remote_post()","godinterface::remove()","appscaletools::remove_app()","nodelayout#replication_factor()","commonfunctions::require_commands()","appscaletools::reset_password()","usagetext::restore_from_tar()","usagetext::restore_neptune_info()","commonfunctions::rsync_files()","appscaletools::run_instances()","commonfunctions::run_remote_command()","usagetext::scp()","commonfunctions::scp_app_to_ip()","commonfunctions::scp_file()","userappclient#set_capabilities()","userappclient#set_cloud_admin_capabilities()","userappclient#set_cloud_admin_status()","vmtools::set_hybrid_creds()","appcontrollerclient#set_parameters()","commonfunctions::shell()","godinterface::shutdown()","commonfunctions::sleep_until_port_is_closed()","commonfunctions::sleep_until_port_is_open()","vmtools::spawn_head_node()","vmtools::spawn_head_node_via_cloud()","vmtools::spawn_head_node_via_vmm()","vmtools::spawn_vms()","godinterface::start()","godinterface::start_god()","commonfunctions::start_head_node()","appcontrollerclient#status()","godinterface::stop()","appcontrollerclient#stop_app()","usagetext::table()","vmtools::terminate_all_vms()","vmtools::terminate_infrastructure_machines()","appscaletools::terminate_instances()","usagetext::test()","nodelayout#to_hash()","appcontrollerclient#update()","commonfunctions::update_appcontroller()","commonfunctions::update_locations_file()","appscaletools::upload_app()","usagetext::usage()","commonfunctions::user_has_cmd?()","usagetext::v()","node#valid?()","nodelayout#valid?()","nodelayout#valid_advanced_format?()","nodelayout#valid_database_replication?()","nodelayout#valid_simple_format?()","commonfunctions::validate_app_name()","usagetext::verbose()","vmtools::verify_credentials_are_set_correctly()","vmtools::verify_credentials_exist()","vmtools::verify_ids()","usagetext::version()","usagetext::w()","commonfunctions::wait_for_app_to_start()","commonfunctions::wait_for_nodes_to_load()","commonfunctions::wait_until_redirect()","commonfunctions::warn_on_large_app_size()","commonfunctions::write_and_copy_node_file()","nodelayout#write_factor()","commonfunctions::write_file()","commonfunctions::write_node_file()","commonfunctions::write_nodes_json()",""],"info":[["AdvancedNode","","AdvancedNode.html","",""],["AppControllerClient","","AppControllerClient.html","",""],["AppEngineConfigException","","AppEngineConfigException.html","","<p>a class representing exceptions related to app engine apps to be uploaded\n"],["AppScaleException","","AppScaleException.html","","<p>a generic class to represent exceptions thrown within AppScale\n"],["AppScaleTools","","AppScaleTools.html","",""],["BadCommandLineArgException","","BadCommandLineArgException.html","","<p>a class representing exceptions related to bad command line arguments (see\nlib/parse_args)\n"],["BadConfigurationException","","BadConfigurationException.html","","<p>a class representing exceptions related to incorrectly configured AppScale\ndeployments\n"],["CommonFunctions","","CommonFunctions.html","",""],["EncryptionHelper","","EncryptionHelper.html","",""],["GodInterface","","GodInterface.html","",""],["InfrastructureException","","InfrastructureException.html","","<p>a class representing exceptions related to cloud infrastructures (e.g., if\neuca or ec2 throw errors) …\n"],["Node","","Node.html","",""],["NodeLayout","","NodeLayout.html","",""],["Object","","Object.html","",""],["ParseArgs","","ParseArgs.html","",""],["RemoteLogging","","RemoteLogging.html","","<p>RemoteLogging provides callers with a mechanism by which they can save\ninformation about when the AppScale …\n"],["SimpleNode","","SimpleNode.html","",""],["UsageText","","UsageText.html","",""],["UserAppClient","","UserAppClient.html","",""],["VMTools","","VMTools.html","",""],["add_db_role","Node","Node.html#method-i-add_db_role","(db_type, is_master)",""],["add_instance","UserAppClient","UserAppClient.html#method-i-add_instance","(appname, host, port, retry_on_except=true)",""],["add_keypair","AppScaleTools","AppScaleTools.html#method-c-add_keypair","(options)",""],["add_rabbitmq_role","Node","Node.html#method-i-add_rabbitmq_role","(is_master)",""],["add_role","Node","Node.html#method-i-add_role","(role)",""],["app_is_running?","AppControllerClient","AppControllerClient.html#method-i-app_is_running-3F","(appname)",""],["appengine","UsageText","UsageText.html#method-c-appengine","()",""],["appname","UsageText","UsageText.html#method-c-appname","()",""],["auto","UsageText","UsageText.html#method-c-auto","()",""],["backup_neptune_info","UsageText","UsageText.html#method-c-backup_neptune_info","()",""],["change_password","UserAppClient","UserAppClient.html#method-i-change_password","(user, new_password, retry_on_except=true)",""],["clear_app","CommonFunctions","CommonFunctions.html#method-c-clear_app","(app_path, force=false)",""],["commit_new_app","UserAppClient","UserAppClient.html#method-i-commit_new_app","(user, app_name, language, file_location)",""],["commit_new_app_name","UserAppClient","UserAppClient.html#method-i-commit_new_app_name","(user, app_name, language, retry_on_except=true)",""],["commit_new_user","UserAppClient","UserAppClient.html#method-i-commit_new_user","(user, encrypted_password, user_type=\"xmpp_user\", retry_on_except=true)",""],["commit_tar","UserAppClient","UserAppClient.html#method-i-commit_tar","(app_name, file_location, retry_on_except=true)",""],["confirm","UsageText","UsageText.html#method-c-confirm","()",""],["convert_fqdn_to_ip","CommonFunctions","CommonFunctions.html#method-c-convert_fqdn_to_ip","(host)",""],["create_user","CommonFunctions","CommonFunctions.html#method-c-create_user","(user, test, head_node_ip, secret_key, uac, pass=nil)",""],["db_master","NodeLayout","NodeLayout.html#method-i-db_master","()",""],["delete_app","UserAppClient","UserAppClient.html#method-i-delete_app","(app, retry_on_except=true)",""],["delete_instance","UserAppClient","UserAppClient.html#method-i-delete_instance","(appname, host, port, retry_on_except=true)",""],["describe_instances","AppScaleTools","AppScaleTools.html#method-c-describe_instances","(options)",""],["does_app_exist?","UserAppClient","UserAppClient.html#method-i-does_app_exist-3F","(app, retry_on_except=true)",""],["does_user_exist?","UserAppClient","UserAppClient.html#method-i-does_user_exist-3F","(user, retry_on_except=true)",""],["done_uploading","AppControllerClient","AppControllerClient.html#method-i-done_uploading","(appname, location)",""],["email","UsageText","UsageText.html#method-c-email","()",""],["encrypt_password","CommonFunctions","CommonFunctions.html#method-c-encrypt_password","(user, pass)",""],["ensure_keyname_not_in_use","VMTools","VMTools.html#method-c-ensure_keyname_not_in_use","(keyname, infrastructure)",""],["ensure_min_vms_available","VMTools","VMTools.html#method-c-ensure_min_vms_available","(min_vms_needed, instance_type, infrastructure)",""],["ensure_tools_are_installed","VMTools","VMTools.html#method-c-ensure_tools_are_installed","(infrastructure)",""],["errors","Node","Node.html#method-i-errors","()",""],["errors","NodeLayout","NodeLayout.html#method-i-errors","()",""],["expand_roles","Node","Node.html#method-i-expand_roles","()",""],["file","UsageText","UsageText.html#method-c-file","()",""],["find_real_ssh_key","CommonFunctions","CommonFunctions.html#method-c-find_real_ssh_key","(ssh_keys, host)",""],["force","UsageText","UsageText.html#method-c-force","()",""],["generate_cloud_layout","NodeLayout","NodeLayout.html#method-i-generate_cloud_layout","()","<p>Generates an yaml file for non-hybrid cloud layouts which don’t have them\n"],["generate_pem_files","EncryptionHelper","EncryptionHelper.html#method-c-generate_pem_files","(keyname)",""],["generate_secret_key","EncryptionHelper","EncryptionHelper.html#method-c-generate_secret_key","(keyname=\"appscale\")",""],["generate_ssh_key","EncryptionHelper","EncryptionHelper.html#method-c-generate_ssh_key","(verbose, outputLocation, name, infrastructure, force)",""],["get_all_apps","UserAppClient","UserAppClient.html#method-i-get_all_apps","(retry_on_except=true)",""],["get_all_public_ips","AppControllerClient","AppControllerClient.html#method-i-get_all_public_ips","()",""],["get_all_public_ips","CommonFunctions","CommonFunctions.html#method-c-get_all_public_ips","(keyname, required=true)",""],["get_app_admin","UserAppClient","UserAppClient.html#method-i-get_app_admin","(appname, retry_on_except=true)",""],["get_app_data","UserAppClient","UserAppClient.html#method-i-get_app_data","(appname, retry_on_except=true)",""],["get_app_info","CommonFunctions","CommonFunctions.html#method-c-get_app_info","(fullpath, app_file)",""],["get_app_info_from_options","CommonFunctions","CommonFunctions.html#method-c-get_app_info_from_options","(options)",""],["get_app_name_from_tar","CommonFunctions","CommonFunctions.html#method-c-get_app_name_from_tar","(fullpath)",""],["get_app_name_via_xml","CommonFunctions","CommonFunctions.html#method-c-get_app_name_via_xml","(temp_dir, xml_loc)",""],["get_app_name_via_yaml","CommonFunctions","CommonFunctions.html#method-c-get_app_name_via_yaml","(temp_dir, app_yaml_loc)",""],["get_cloud_creds","VMTools","VMTools.html#method-c-get_cloud_creds","(node_layout, val_hash)",""],["get_credentials","CommonFunctions","CommonFunctions.html#method-c-get_credentials","(testing)",""],["get_creds_from_env","VMTools","VMTools.html#method-c-get_creds_from_env","()",""],["get_db_master_ip","CommonFunctions","CommonFunctions.html#method-c-get_db_master_ip","(keyname, required=true)",""],["get_email","CommonFunctions","CommonFunctions.html#method-c-get_email","()",""],["get_from_yaml","CommonFunctions","CommonFunctions.html#method-c-get_from_yaml","(keyname, tag, required=true)",""],["get_head_node_ip","CommonFunctions","CommonFunctions.html#method-c-get_head_node_ip","(keyname, required=true)",""],["get_hybrid_creds","VMTools","VMTools.html#method-c-get_hybrid_creds","(node_layout, set_head_node_creds=false)",""],["get_hybrid_env_vars","VMTools","VMTools.html#method-c-get_hybrid_env_vars","(cloud_type, cloud_num, set_vars=false)",""],["get_hybrid_machine","VMTools","VMTools.html#method-c-get_hybrid_machine","(infra, cloud_num)",""],["get_infrastructure","CommonFunctions","CommonFunctions.html#method-c-get_infrastructure","(keyname, required=true)",""],["get_initial_layout","VMTools","VMTools.html#method-c-get_initial_layout","(head_node, separate, num_of_nodes, total_nodes)",""],["get_ips","VMTools","VMTools.html#method-c-get_ips","(ips, verbose)",""],["get_ips_from_yaml","CommonFunctions","CommonFunctions.html#method-c-get_ips_from_yaml","(ips)",""],["get_line_from_stdin_no_echo","CommonFunctions","CommonFunctions.html#method-c-get_line_from_stdin_no_echo","()",""],["get_load_balancer_id","CommonFunctions","CommonFunctions.html#method-c-get_load_balancer_id","(keyname, required=true)",""],["get_load_balancer_ip","CommonFunctions","CommonFunctions.html#method-c-get_load_balancer_ip","(keyname, required=true)",""],["get_login_ip","CommonFunctions","CommonFunctions.html#method-c-get_login_ip","(head_node_ip, secret_key)",""],["get_password","CommonFunctions","CommonFunctions.html#method-c-get_password","()",""],["get_public_ips","VMTools","VMTools.html#method-c-get_public_ips","(ips, verbose)",""],["get_random_alphanumeric","CommonFunctions","CommonFunctions.html#method-c-get_random_alphanumeric","(length=10)",""],["get_remote_appscale_home","CommonFunctions","CommonFunctions.html#method-c-get_remote_appscale_home","(ip, key)",""],["get_role_from_nodes","CommonFunctions","CommonFunctions.html#method-c-get_role_from_nodes","(keyname, role)",""],["get_role_info","AppControllerClient","AppControllerClient.html#method-i-get_role_info","()","<p>Asks the AppController to see what roles each node is running in AppScale.\nThe result is an Array, where …\n"],["get_secret_key","CommonFunctions","CommonFunctions.html#method-c-get_secret_key","(keyname, required=true)",""],["get_status","AppControllerClient","AppControllerClient.html#method-i-get_status","()",""],["get_table","CommonFunctions","CommonFunctions.html#method-c-get_table","(keyname, required=true)",""],["get_tar","UserAppClient","UserAppClient.html#method-i-get_tar","(appname, retry_on_except=true)",""],["get_usage","UsageText","UsageText.html#method-c-get_usage","(file_name, flags)",""],["get_userappserver_ip","AppControllerClient","AppControllerClient.html#method-i-get_userappserver_ip","(verbose_level=\"low\")",""],["get_username_from_options","CommonFunctions","CommonFunctions.html#method-c-get_username_from_options","(options)",""],["get_vals_from_args","ParseArgs","ParseArgs.html#method-c-get_vals_from_args","(arg_list, all_flags, usage)",""],["get_vmm_keys","VMTools","VMTools.html#method-c-get_vmm_keys","(val_hash)",""],["group","UsageText","UsageText.html#method-c-group","()",""],["h","UsageText","UsageText.html#method-c-h","()",""],["head_node","NodeLayout","NodeLayout.html#method-i-head_node","()","<p>head node -&gt; shadow\n"],["help","UsageText","UsageText.html#method-c-help","()",""],["iaas","UsageText","UsageText.html#method-c-iaas","()",""],["infrastructure","UsageText","UsageText.html#method-c-infrastructure","()",""],["instance_type","UsageText","UsageText.html#method-c-instance_type","()",""],["ips","UsageText","UsageText.html#method-c-ips","()",""],["is_advanced_format?","NodeLayout","NodeLayout.html#method-i-is_advanced_format-3F","()",""],["is_done_initializing?","AppControllerClient","AppControllerClient.html#method-i-is_done_initializing-3F","()",""],["is_done_loading?","AppControllerClient","AppControllerClient.html#method-i-is_done_loading-3F","()",""],["is_live?","AppControllerClient","AppControllerClient.html#method-i-is_live-3F","()",""],["is_port_open?","CommonFunctions","CommonFunctions.html#method-c-is_port_open-3F","(ip, port, use_ssl=false)",""],["is_simple_format?","NodeLayout","NodeLayout.html#method-i-is_simple_format-3F","()",""],["keyname","UsageText","UsageText.html#method-c-keyname","()",""],["kill","AppControllerClient","AppControllerClient.html#method-i-kill","()",""],["local_ip","VMTools","VMTools.html#method-c-local_ip","()","<p>Code for local_ip taken from \ncoderrr.wordpress.com/2008/05/28/get-your-local-ip-address/\n"],["login_node","NodeLayout","NodeLayout.html#method-i-login_node","()",""],["lookup_cloud_env","VMTools","VMTools.html#method-c-lookup_cloud_env","(cloud)",""],["machine","UsageText","UsageText.html#method-c-machine","()",""],["make_appscale_directory","CommonFunctions","CommonFunctions.html#method-c-make_appscale_directory","()",""],["make_call","AppControllerClient","AppControllerClient.html#method-i-make_call","(time, retry_on_except, want_output=true)",""],["make_call","UserAppClient","UserAppClient.html#method-i-make_call","(timeout, retry_on_except)",""],["max","UsageText","UsageText.html#method-c-max","()",""],["max_images","NodeLayout","NodeLayout.html#method-i-max_images","()",""],["min","UsageText","UsageText.html#method-c-min","()",""],["min_images","NodeLayout","NodeLayout.html#method-i-min_images","()",""],["move_app","CommonFunctions","CommonFunctions.html#method-c-move_app","(temp_dir, filename, app_file, fullpath)",""],["n","UsageText","UsageText.html#method-c-n","()",""],["new","AppControllerClient","AppControllerClient.html#method-c-new","(ip, secret)",""],["new","Node","Node.html#method-c-new","(id, cloud, roles=[])",""],["new","NodeLayout","NodeLayout.html#method-c-new","(input_yaml, options, skip_replication=false)","<p>Required options are: database_type\n"],["new","UserAppClient","UserAppClient.html#method-c-new","(ip, secret)",""],["nodes","NodeLayout","NodeLayout.html#method-i-nodes","()",""],["open_ports_in_cloud","VMTools","VMTools.html#method-c-open_ports_in_cloud","(infrastructure, group, verbose)",""],["other_nodes","NodeLayout","NodeLayout.html#method-i-other_nodes","()",""],["parse_ip","NodeLayout","NodeLayout.html#method-i-parse_ip","(ip)",""],["post","RemoteLogging","RemoteLogging.html#method-c-post","(params)","<p>Posts a Hash of parameters to the Google App Engine application that keeps\nstatistics about when AppScale …\n"],["r","UsageText","UsageText.html#method-c-r","()",""],["read_factor","NodeLayout","NodeLayout.html#method-i-read_factor","()","<p>TODO: can we just replace the if w/ unless and change ! to = ? or does that\nnot exactly work due to the …\n"],["read_file","CommonFunctions","CommonFunctions.html#method-c-read_file","(location, chomp=true)","<p>A convenience function that returns a file’s contents as a string.\n"],["read_nodes_json","CommonFunctions","CommonFunctions.html#method-c-read_nodes_json","(keyname)","<p>Reads the JSON file that stores information about which roles run on which\nnodes.\n"],["remote_post","RemoteLogging","RemoteLogging.html#method-c-remote_post","(num_nodes, database, infrastructure, state, success)","<p>Provides a convenient interface to self.post that callers can use to save\nprofiling information about …\n"],["remove","GodInterface","GodInterface.html#method-c-remove","(watch, remote_ip=nil, remote_key=nil)",""],["remove_app","AppScaleTools","AppScaleTools.html#method-c-remove_app","(options)",""],["replication_factor","NodeLayout","NodeLayout.html#method-i-replication_factor","()",""],["require_commands","CommonFunctions","CommonFunctions.html#method-c-require_commands","(commands)",""],["reset_password","AppScaleTools","AppScaleTools.html#method-c-reset_password","(options)",""],["restore_from_tar","UsageText","UsageText.html#method-c-restore_from_tar","()",""],["restore_neptune_info","UsageText","UsageText.html#method-c-restore_neptune_info","()",""],["rsync_files","CommonFunctions","CommonFunctions.html#method-c-rsync_files","(dest_ip, ssh_key, local)","<p>Uses rsync to copy over a copy of the AppScale main codebase (e.g., not the\nAppScale Tools) from this …\n"],["run_instances","AppScaleTools","AppScaleTools.html#method-c-run_instances","(options)",""],["run_remote_command","CommonFunctions","CommonFunctions.html#method-c-run_remote_command","(ip, command, public_key_loc, want_output)",""],["scp","UsageText","UsageText.html#method-c-scp","()",""],["scp_app_to_ip","CommonFunctions","CommonFunctions.html#method-c-scp_app_to_ip","(app_name, user, language, keyname, head_node_ip, file_location, uac)",""],["scp_file","CommonFunctions","CommonFunctions.html#method-c-scp_file","(local_file_loc, remote_file_loc, target_ip, public_key_loc)",""],["set_capabilities","UserAppClient","UserAppClient.html#method-i-set_capabilities","(username, capabilities)",""],["set_cloud_admin_capabilities","UserAppClient","UserAppClient.html#method-i-set_cloud_admin_capabilities","(username)",""],["set_cloud_admin_status","UserAppClient","UserAppClient.html#method-i-set_cloud_admin_status","(username, new_status)",""],["set_hybrid_creds","VMTools","VMTools.html#method-c-set_hybrid_creds","(node_layout)",""],["set_parameters","AppControllerClient","AppControllerClient.html#method-i-set_parameters","(locations, creds, apps_to_start)",""],["shell","CommonFunctions","CommonFunctions.html#method-c-shell","(command)","<p>cgb: added in shell function for backticks so that we can unit test it\nFlexmock doesn’t like backticks …\n"],["shutdown","GodInterface","GodInterface.html#method-c-shutdown","(remote_ip=nil, remote_key=nil)",""],["sleep_until_port_is_closed","CommonFunctions","CommonFunctions.html#method-c-sleep_until_port_is_closed","(ip, port, use_ssl=false)",""],["sleep_until_port_is_open","CommonFunctions","CommonFunctions.html#method-c-sleep_until_port_is_open","(ip, port, use_ssl=false)",""],["spawn_head_node","VMTools","VMTools.html#method-c-spawn_head_node","(head_node, infrastructure, keyname, ssh_key_location, ssh_keys, force, machine, instance_type, group, verbose)",""],["spawn_head_node_via_cloud","VMTools","VMTools.html#method-c-spawn_head_node_via_cloud","(infrastructure, keyname, ssh_key_location, ssh_keys, force, head_node_jobs, machine, instance_type, group, verbose)",""],["spawn_head_node_via_vmm","VMTools","VMTools.html#method-c-spawn_head_node_via_vmm","(node, keyname, head_node_jobs)",""],["spawn_vms","VMTools","VMTools.html#method-c-spawn_vms","(num_of_vms_to_spawn, job, image_id, instance_type, keyname, infrastructure, group, verbose)",""],["start","GodInterface","GodInterface.html#method-c-start","(watch, start_cmd, stop_cmd, ports, env_vars=nil, remote_ip=nil, remote_key=nil)",""],["start_god","GodInterface","GodInterface.html#method-c-start_god","(remote_ip, remote_key)",""],["start_head_node","CommonFunctions","CommonFunctions.html#method-c-start_head_node","(options, node_layout, apps_to_start)",""],["status","AppControllerClient","AppControllerClient.html#method-i-status","()",""],["stop","GodInterface","GodInterface.html#method-c-stop","(watch, remote_ip=nil, remote_key=nil)",""],["stop_app","AppControllerClient","AppControllerClient.html#method-i-stop_app","(app_name)",""],["table","UsageText","UsageText.html#method-c-table","()",""],["terminate_all_vms","VMTools","VMTools.html#method-c-terminate_all_vms","(keyname, infrastructure)",""],["terminate_infrastructure_machines","VMTools","VMTools.html#method-c-terminate_infrastructure_machines","(infrastructure, keyname)",""],["terminate_instances","AppScaleTools","AppScaleTools.html#method-c-terminate_instances","(options)",""],["test","UsageText","UsageText.html#method-c-test","()",""],["to_hash","NodeLayout","NodeLayout.html#method-i-to_hash","()",""],["update","AppControllerClient","AppControllerClient.html#method-i-update","(app_names)",""],["update_appcontroller","CommonFunctions","CommonFunctions.html#method-c-update_appcontroller","(head_node_ip, secret, app_name, remote_file_path)",""],["update_locations_file","CommonFunctions","CommonFunctions.html#method-c-update_locations_file","(keyname, ips=nil)","<p>This function tries to contact a node in the AppScale deployment to get the\nmost up-to-date information …\n"],["upload_app","AppScaleTools","AppScaleTools.html#method-c-upload_app","(options)",""],["usage","UsageText","UsageText.html#method-c-usage","()",""],["user_has_cmd?","CommonFunctions","CommonFunctions.html#method-c-user_has_cmd-3F","(command)",""],["v","UsageText","UsageText.html#method-c-v","()",""],["valid?","Node","Node.html#method-i-valid-3F","()",""],["valid?","NodeLayout","NodeLayout.html#method-i-valid-3F","()",""],["valid_advanced_format?","NodeLayout","NodeLayout.html#method-i-valid_advanced_format-3F","()",""],["valid_database_replication?","NodeLayout","NodeLayout.html#method-i-valid_database_replication-3F","(nodes)",""],["valid_simple_format?","NodeLayout","NodeLayout.html#method-i-valid_simple_format-3F","()",""],["validate_app_name","CommonFunctions","CommonFunctions.html#method-c-validate_app_name","(app_name, database)",""],["verbose","UsageText","UsageText.html#method-c-verbose","()",""],["verify_credentials_are_set_correctly","VMTools","VMTools.html#method-c-verify_credentials_are_set_correctly","(infrastructure)",""],["verify_credentials_exist","VMTools","VMTools.html#method-c-verify_credentials_exist","()","<p>Validates that the private key and certificate for use with EC2 or\nEucalyptus both refer to files that …\n"],["verify_ids","VMTools","VMTools.html#method-c-verify_ids","(disk, infrastructure)",""],["version","UsageText","UsageText.html#method-c-version","()",""],["w","UsageText","UsageText.html#method-c-w","()",""],["wait_for_app_to_start","CommonFunctions","CommonFunctions.html#method-c-wait_for_app_to_start","(head_node_ip, secret, app_name)",""],["wait_for_nodes_to_load","CommonFunctions","CommonFunctions.html#method-c-wait_for_nodes_to_load","(head_node_ip, secret)",""],["wait_until_redirect","CommonFunctions","CommonFunctions.html#method-c-wait_until_redirect","(host, url_suffix)",""],["warn_on_large_app_size","CommonFunctions","CommonFunctions.html#method-c-warn_on_large_app_size","(fullpath)",""],["write_and_copy_node_file","CommonFunctions","CommonFunctions.html#method-c-write_and_copy_node_file","(options, node_layout, head_node_result)",""],["write_factor","NodeLayout","NodeLayout.html#method-i-write_factor","()",""],["write_file","CommonFunctions","CommonFunctions.html#method-c-write_file","(location, contents)","<p>A convenience function that can be used to write a string to a file.\n"],["write_node_file","CommonFunctions","CommonFunctions.html#method-c-write_node_file","(head_node_ip, instance_id, table, secret, db_master, ips, infrastructure, locations_yaml)",""],["write_nodes_json","CommonFunctions","CommonFunctions.html#method-c-write_nodes_json","(new_role_info, keyname)","<p>Writes the given JSON to the ~/.appscale directory so that we can read it\nlater and determine what nodes …\n"],["sshcopyid","","lib/sshcopyid.html","","<p>#!/usr/bin/env expect\n<p>############################# # # Author : Kowshik Prakasam # # An expect\nscript …\n"]]}}
@@ -0,0 +1,228 @@
1
+ Searcher = function(data) {
2
+ this.data = data;
3
+ this.handlers = [];
4
+ }
5
+
6
+ Searcher.prototype = new function() {
7
+ // search is performed in chunks of 1000 for non-blocking user input
8
+ var CHUNK_SIZE = 1000;
9
+ // do not try to find more than 100 results
10
+ var MAX_RESULTS = 100;
11
+ var huid = 1;
12
+ var suid = 1;
13
+ var runs = 0;
14
+
15
+ this.find = function(query) {
16
+ var queries = splitQuery(query);
17
+ var regexps = buildRegexps(queries);
18
+ var highlighters = buildHilighters(queries);
19
+ var state = { from: 0, pass: 0, limit: MAX_RESULTS, n: suid++};
20
+ var _this = this;
21
+
22
+ this.currentSuid = state.n;
23
+
24
+ if (!query) return;
25
+
26
+ var run = function() {
27
+ // stop current search thread if new search started
28
+ if (state.n != _this.currentSuid) return;
29
+
30
+ var results =
31
+ performSearch(_this.data, regexps, queries, highlighters, state);
32
+ var hasMore = (state.limit > 0 && state.pass < 4);
33
+
34
+ triggerResults.call(_this, results, !hasMore);
35
+ if (hasMore) {
36
+ setTimeout(run, 2);
37
+ }
38
+ runs++;
39
+ };
40
+ runs = 0;
41
+
42
+ // start search thread
43
+ run();
44
+ }
45
+
46
+ /* ----- Events ------ */
47
+ this.ready = function(fn) {
48
+ fn.huid = huid;
49
+ this.handlers.push(fn);
50
+ }
51
+
52
+ /* ----- Utilities ------ */
53
+ function splitQuery(query) {
54
+ return jQuery.grep(query.split(/(\s+|::?|\(\)?)/), function(string) {
55
+ return string.match(/\S/)
56
+ });
57
+ }
58
+
59
+ function buildRegexps(queries) {
60
+ return jQuery.map(queries, function(query) {
61
+ return new RegExp(query.replace(/(.)/g, '([$1])([^$1]*?)'), 'i')
62
+ });
63
+ }
64
+
65
+ function buildHilighters(queries) {
66
+ return jQuery.map(queries, function(query) {
67
+ return jQuery.map(query.split(''), function(l, i) {
68
+ return '\u0001$' + (i*2+1) + '\u0002$' + (i*2+2);
69
+ }).join('');
70
+ });
71
+ }
72
+
73
+ // function longMatchRegexp(index, longIndex, regexps) {
74
+ // for (var i = regexps.length - 1; i >= 0; i--){
75
+ // if (!index.match(regexps[i]) && !longIndex.match(regexps[i])) return false;
76
+ // };
77
+ // return true;
78
+ // }
79
+
80
+
81
+ /* ----- Mathchers ------ */
82
+
83
+ /*
84
+ * This record matches if the index starts with queries[0] and the record
85
+ * matches all of the regexps
86
+ */
87
+ function matchPassBeginning(index, longIndex, queries, regexps) {
88
+ if (index.indexOf(queries[0]) != 0) return false;
89
+ for (var i=1, l = regexps.length; i < l; i++) {
90
+ if (!index.match(regexps[i]) && !longIndex.match(regexps[i]))
91
+ return false;
92
+ };
93
+ return true;
94
+ }
95
+
96
+ /*
97
+ * This record matches if the longIndex starts with queries[0] and the
98
+ * longIndex matches all of the regexps
99
+ */
100
+ function matchPassLongIndex(index, longIndex, queries, regexps) {
101
+ if (longIndex.indexOf(queries[0]) != 0) return false;
102
+ for (var i=1, l = regexps.length; i < l; i++) {
103
+ if (!longIndex.match(regexps[i]))
104
+ return false;
105
+ };
106
+ return true;
107
+ }
108
+
109
+ /*
110
+ * This record matches if the index contains queries[0] and the record
111
+ * matches all of the regexps
112
+ */
113
+ function matchPassContains(index, longIndex, queries, regexps) {
114
+ if (index.indexOf(queries[0]) == -1) return false;
115
+ for (var i=1, l = regexps.length; i < l; i++) {
116
+ if (!index.match(regexps[i]) && !longIndex.match(regexps[i]))
117
+ return false;
118
+ };
119
+ return true;
120
+ }
121
+
122
+ /*
123
+ * This record matches if regexps[0] matches the index and the record
124
+ * matches all of the regexps
125
+ */
126
+ function matchPassRegexp(index, longIndex, queries, regexps) {
127
+ if (!index.match(regexps[0])) return false;
128
+ for (var i=1, l = regexps.length; i < l; i++) {
129
+ if (!index.match(regexps[i]) && !longIndex.match(regexps[i]))
130
+ return false;
131
+ };
132
+ return true;
133
+ }
134
+
135
+
136
+ /* ----- Highlighters ------ */
137
+ function highlightRegexp(info, queries, regexps, highlighters) {
138
+ var result = createResult(info);
139
+ for (var i=0, l = regexps.length; i < l; i++) {
140
+ result.title = result.title.replace(regexps[i], highlighters[i]);
141
+ result.namespace = result.namespace.replace(regexps[i], highlighters[i]);
142
+ };
143
+ return result;
144
+ }
145
+
146
+ function hltSubstring(string, pos, length) {
147
+ return string.substring(0, pos) + '\u0001' + string.substring(pos, pos + length) + '\u0002' + string.substring(pos + length);
148
+ }
149
+
150
+ function highlightQuery(info, queries, regexps, highlighters) {
151
+ var result = createResult(info);
152
+ var pos = 0;
153
+ var lcTitle = result.title.toLowerCase();
154
+
155
+ pos = lcTitle.indexOf(queries[0]);
156
+ if (pos != -1) {
157
+ result.title = hltSubstring(result.title, pos, queries[0].length);
158
+ }
159
+
160
+ result.namespace = result.namespace.replace(regexps[0], highlighters[0]);
161
+ for (var i=1, l = regexps.length; i < l; i++) {
162
+ result.title = result.title.replace(regexps[i], highlighters[i]);
163
+ result.namespace = result.namespace.replace(regexps[i], highlighters[i]);
164
+ };
165
+ return result;
166
+ }
167
+
168
+ function createResult(info) {
169
+ var result = {};
170
+ result.title = info[0];
171
+ result.namespace = info[1];
172
+ result.path = info[2];
173
+ result.params = info[3];
174
+ result.snippet = info[4];
175
+ return result;
176
+ }
177
+
178
+ /* ----- Searching ------ */
179
+ function performSearch(data, regexps, queries, highlighters, state) {
180
+ var searchIndex = data.searchIndex;
181
+ var longSearchIndex = data.longSearchIndex;
182
+ var info = data.info;
183
+ var result = [];
184
+ var i = state.from;
185
+ var l = searchIndex.length;
186
+ var togo = CHUNK_SIZE;
187
+ var matchFunc, hltFunc;
188
+
189
+ while (state.pass < 4 && state.limit > 0 && togo > 0) {
190
+ if (state.pass == 0) {
191
+ matchFunc = matchPassBeginning;
192
+ hltFunc = highlightQuery;
193
+ } else if (state.pass == 1) {
194
+ matchFunc = matchPassLongIndex;
195
+ hltFunc = highlightQuery;
196
+ } else if (state.pass == 2) {
197
+ matchFunc = matchPassContains;
198
+ hltFunc = highlightQuery;
199
+ } else if (state.pass == 3) {
200
+ matchFunc = matchPassRegexp;
201
+ hltFunc = highlightRegexp;
202
+ }
203
+
204
+ for (; togo > 0 && i < l && state.limit > 0; i++, togo--) {
205
+ if (info[i].n == state.n) continue;
206
+ if (matchFunc(searchIndex[i], longSearchIndex[i], queries, regexps)) {
207
+ info[i].n = state.n;
208
+ result.push(hltFunc(info[i], queries, regexps, highlighters));
209
+ state.limit--;
210
+ }
211
+ };
212
+ if (searchIndex.length <= i) {
213
+ state.pass++;
214
+ i = state.from = 0;
215
+ } else {
216
+ state.from = i;
217
+ }
218
+ }
219
+ return result;
220
+ }
221
+
222
+ function triggerResults(results, isLast) {
223
+ jQuery.each(this.handlers, function(i, fn) {
224
+ fn.call(this, results, isLast)
225
+ })
226
+ }
227
+ }
228
+
@@ -0,0 +1,10 @@
1
+ /*
2
+ * Thickbox 3 - One Box To Rule Them All.
3
+ * By Cody Lindley (http://www.codylindley.com)
4
+ * Copyright (c) 2007 cody lindley
5
+ * Licensed under the MIT License: http://www.opensource.org/licenses/mit-license.php
6
+ */
7
+
8
+ var tb_pathToImage = "../images/loadingAnimation.gif";
9
+
10
+ eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('$(o).2S(9(){1u(\'a.18, 3n.18, 3i.18\');1w=1p 1t();1w.L=2H});9 1u(b){$(b).s(9(){6 t=X.Q||X.1v||M;6 a=X.u||X.23;6 g=X.1N||P;19(t,a,g);X.2E();H P})}9 19(d,f,g){3m{3(2t o.v.J.2i==="2g"){$("v","11").r({A:"28%",z:"28%"});$("11").r("22","2Z");3(o.1Y("1F")===M){$("v").q("<U 5=\'1F\'></U><4 5=\'B\'></4><4 5=\'8\'></4>");$("#B").s(G)}}n{3(o.1Y("B")===M){$("v").q("<4 5=\'B\'></4><4 5=\'8\'></4>");$("#B").s(G)}}3(1K()){$("#B").1J("2B")}n{$("#B").1J("2z")}3(d===M){d=""}$("v").q("<4 5=\'K\'><1I L=\'"+1w.L+"\' /></4>");$(\'#K\').2y();6 h;3(f.O("?")!==-1){h=f.3l(0,f.O("?"))}n{h=f}6 i=/\\.2s$|\\.2q$|\\.2m$|\\.2l$|\\.2k$/;6 j=h.1C().2h(i);3(j==\'.2s\'||j==\'.2q\'||j==\'.2m\'||j==\'.2l\'||j==\'.2k\'){1D="";1G="";14="";1z="";1x="";R="";1n="";1r=P;3(g){E=$("a[@1N="+g+"]").36();25(D=0;((D<E.1c)&&(R===""));D++){6 k=E[D].u.1C().2h(i);3(!(E[D].u==f)){3(1r){1z=E[D].Q;1x=E[D].u;R="<1e 5=\'1X\'>&1d;&1d;<a u=\'#\'>2T &2R;</a></1e>"}n{1D=E[D].Q;1G=E[D].u;14="<1e 5=\'1U\'>&1d;&1d;<a u=\'#\'>&2O; 2N</a></1e>"}}n{1r=1b;1n="1t "+(D+1)+" 2L "+(E.1c)}}}S=1p 1t();S.1g=9(){S.1g=M;6 a=2x();6 x=a[0]-1M;6 y=a[1]-1M;6 b=S.z;6 c=S.A;3(b>x){c=c*(x/b);b=x;3(c>y){b=b*(y/c);c=y}}n 3(c>y){b=b*(y/c);c=y;3(b>x){c=c*(x/b);b=x}}13=b+30;1a=c+2G;$("#8").q("<a u=\'\' 5=\'1L\' Q=\'1o\'><1I 5=\'2F\' L=\'"+f+"\' z=\'"+b+"\' A=\'"+c+"\' 23=\'"+d+"\'/></a>"+"<4 5=\'2D\'>"+d+"<4 5=\'2C\'>"+1n+14+R+"</4></4><4 5=\'2A\'><a u=\'#\' 5=\'Z\' Q=\'1o\'>1l</a> 1k 1j 1s</4>");$("#Z").s(G);3(!(14==="")){9 12(){3($(o).N("s",12)){$(o).N("s",12)}$("#8").C();$("v").q("<4 5=\'8\'></4>");19(1D,1G,g);H P}$("#1U").s(12)}3(!(R==="")){9 1i(){$("#8").C();$("v").q("<4 5=\'8\'></4>");19(1z,1x,g);H P}$("#1X").s(1i)}o.1h=9(e){3(e==M){I=2w.2v}n{I=e.2u}3(I==27){G()}n 3(I==3k){3(!(R=="")){o.1h="";1i()}}n 3(I==3j){3(!(14=="")){o.1h="";12()}}};16();$("#K").C();$("#1L").s(G);$("#8").r({Y:"T"})};S.L=f}n{6 l=f.2r(/^[^\\?]+\\??/,\'\');6 m=2p(l);13=(m[\'z\']*1)+30||3h;1a=(m[\'A\']*1)+3g||3f;W=13-30;V=1a-3e;3(f.O(\'2j\')!=-1){1E=f.1B(\'3d\');$("#15").C();3(m[\'1A\']!="1b"){$("#8").q("<4 5=\'2f\'><4 5=\'1H\'>"+d+"</4><4 5=\'2e\'><a u=\'#\' 5=\'Z\' Q=\'1o\'>1l</a> 1k 1j 1s</4></4><U 1W=\'0\' 2d=\'0\' L=\'"+1E[0]+"\' 5=\'15\' 1v=\'15"+1f.2c(1f.1y()*2b)+"\' 1g=\'1m()\' J=\'z:"+(W+29)+"p;A:"+(V+17)+"p;\' > </U>")}n{$("#B").N();$("#8").q("<U 1W=\'0\' 2d=\'0\' L=\'"+1E[0]+"\' 5=\'15\' 1v=\'15"+1f.2c(1f.1y()*2b)+"\' 1g=\'1m()\' J=\'z:"+(W+29)+"p;A:"+(V+17)+"p;\'> </U>")}}n{3($("#8").r("Y")!="T"){3(m[\'1A\']!="1b"){$("#8").q("<4 5=\'2f\'><4 5=\'1H\'>"+d+"</4><4 5=\'2e\'><a u=\'#\' 5=\'Z\'>1l</a> 1k 1j 1s</4></4><4 5=\'F\' J=\'z:"+W+"p;A:"+V+"p\'></4>")}n{$("#B").N();$("#8").q("<4 5=\'F\' 3c=\'3b\' J=\'z:"+W+"p;A:"+V+"p;\'></4>")}}n{$("#F")[0].J.z=W+"p";$("#F")[0].J.A=V+"p";$("#F")[0].3a=0;$("#1H").11(d)}}$("#Z").s(G);3(f.O(\'37\')!=-1){$("#F").q($(\'#\'+m[\'26\']).1T());$("#8").24(9(){$(\'#\'+m[\'26\']).q($("#F").1T())});16();$("#K").C();$("#8").r({Y:"T"})}n 3(f.O(\'2j\')!=-1){16();3($.1q.35){$("#K").C();$("#8").r({Y:"T"})}}n{$("#F").34(f+="&1y="+(1p 33().32()),9(){16();$("#K").C();1u("#F a.18");$("#8").r({Y:"T"})})}}3(!m[\'1A\']){o.21=9(e){3(e==M){I=2w.2v}n{I=e.2u}3(I==27){G()}}}}31(e){}}9 1m(){$("#K").C();$("#8").r({Y:"T"})}9 G(){$("#2Y").N("s");$("#Z").N("s");$("#8").2X("2W",9(){$(\'#8,#B,#1F\').2V("24").N().C()});$("#K").C();3(2t o.v.J.2i=="2g"){$("v","11").r({A:"1Z",z:"1Z"});$("11").r("22","")}o.1h="";o.21="";H P}9 16(){$("#8").r({2U:\'-\'+20((13/2),10)+\'p\',z:13+\'p\'});3(!(1V.1q.2Q&&1V.1q.2P<7)){$("#8").r({38:\'-\'+20((1a/2),10)+\'p\'})}}9 2p(a){6 b={};3(!a){H b}6 c=a.1B(/[;&]/);25(6 i=0;i<c.1c;i++){6 d=c[i].1B(\'=\');3(!d||d.1c!=2){39}6 e=2a(d[0]);6 f=2a(d[1]);f=f.2r(/\\+/g,\' \');b[e]=f}H b}9 2x(){6 a=o.2M;6 w=1S.2o||1R.2o||(a&&a.1Q)||o.v.1Q;6 h=1S.1P||1R.1P||(a&&a.2n)||o.v.2n;1O=[w,h];H 1O}9 1K(){6 a=2K.2J.1C();3(a.O(\'2I\')!=-1&&a.O(\'3o\')!=-1){H 1b}}',62,211,'|||if|div|id|var||TB_window|function||||||||||||||else|document|px|append|css|click||href|body||||width|height|TB_overlay|remove|TB_Counter|TB_TempArray|TB_ajaxContent|tb_remove|return|keycode|style|TB_load|src|null|unbind|indexOf|false|title|TB_NextHTML|imgPreloader|block|iframe|ajaxContentH|ajaxContentW|this|display|TB_closeWindowButton||html|goPrev|TB_WIDTH|TB_PrevHTML|TB_iframeContent|tb_position||thickbox|tb_show|TB_HEIGHT|true|length|nbsp|span|Math|onload|onkeydown|goNext|Esc|or|close|tb_showIframe|TB_imageCount|Close|new|browser|TB_FoundURL|Key|Image|tb_init|name|imgLoader|TB_NextURL|random|TB_NextCaption|modal|split|toLowerCase|TB_PrevCaption|urlNoQuery|TB_HideSelect|TB_PrevURL|TB_ajaxWindowTitle|img|addClass|tb_detectMacXFF|TB_ImageOff|150|rel|arrayPageSize|innerHeight|clientWidth|self|window|children|TB_prev|jQuery|frameborder|TB_next|getElementById|auto|parseInt|onkeyup|overflow|alt|unload|for|inlineId||100||unescape|1000|round|hspace|TB_closeAjaxWindow|TB_title|undefined|match|maxHeight|TB_iframe|bmp|gif|png|clientHeight|innerWidth|tb_parseQuery|jpeg|replace|jpg|typeof|which|keyCode|event|tb_getPageSize|show|TB_overlayBG|TB_closeWindow|TB_overlayMacFFBGHack|TB_secondLine|TB_caption|blur|TB_Image|60|tb_pathToImage|mac|userAgent|navigator|of|documentElement|Prev|lt|version|msie|gt|ready|Next|marginLeft|trigger|fast|fadeOut|TB_imageOff|hidden||catch|getTime|Date|load|safari|get|TB_inline|marginTop|continue|scrollTop|TB_modal|class|TB_|45|440|40|630|input|188|190|substr|try|area|firefox'.split('|'),0,{}))