├── public ├── favicon.ico ├── stylesheets │ ├── tr_back.gif │ ├── chosen-sprite.png │ ├── chosen-changes.css │ ├── images │ │ ├── ui-icons_222222_256x240.png │ │ ├── ui-icons_2e83ff_256x240.png │ │ ├── ui-icons_454545_256x240.png │ │ ├── ui-icons_888888_256x240.png │ │ ├── ui-icons_cd0a0a_256x240.png │ │ ├── ui-bg_flat_0_aaaaaa_40x100.png │ │ ├── ui-bg_flat_75_e3e2da_40x100.png │ │ ├── ui-bg_glass_55_fbf9ee_1x400.png │ │ ├── ui-bg_glass_65_ffffff_1x400.png │ │ ├── ui-bg_glass_75_dadada_1x400.png │ │ ├── ui-bg_glass_75_e6e6e6_1x400.png │ │ ├── ui-bg_inset-soft_95_fef1ec_1x100.png │ │ └── ui-bg_highlight-soft_75_990000_1x100.png │ ├── form.css │ ├── reset.css │ ├── scaffold.css │ ├── formtastic_changes.css │ └── application.css ├── images │ ├── bg.gif │ ├── logo.png │ ├── filtrar.png │ ├── header.png │ ├── loader.gif │ ├── bg_content.png │ ├── btn-sm-bg.png │ ├── mid_aviso.png │ ├── separador.png │ ├── top_aviso.png │ ├── bottom_aviso.png │ ├── login-isp_03.jpg │ ├── bg_button_left.gif │ ├── bg_button_right.gif │ ├── loader_horizontal.gif │ ├── sequreisp_logo_r.png │ ├── _bg_button_left_cancel.gif │ └── _bg_button_left_submit.gif ├── robots.txt ├── javascripts │ ├── main.js │ ├── jquery.jtruncate.pack.js │ └── jquery.autogrowtextarea.js ├── 422.html ├── 404.html └── 500.en.html ├── lib ├── generators │ └── sequreisp_plugin │ │ ├── USAGE │ │ └── templates │ │ ├── install.rb │ │ ├── uninstall.rb │ │ ├── routes.rb │ │ ├── sequreisp_patch.rb │ │ ├── READE │ │ ├── README │ │ ├── en.yml │ │ ├── es.yml │ │ ├── pt.yml │ │ ├── layout.rb │ │ └── MIT-LICENSE ├── sequreisp_plugins.rb ├── sequreisp_config.rb ├── comma_separated_array.rb ├── daemons │ └── sequreispd_ctl ├── tasks │ └── common.rake ├── boot_hook.rb ├── daemon_hook.rb ├── sequre_mailer.rb ├── prios_check.rb └── ip_address_check.rb ├── spec ├── rcov.opts ├── spec.opts ├── models │ └── plan_spec.rb └── factories.rb ├── app ├── helpers │ ├── disks_helper.rb │ ├── dashboard_helper.rb │ ├── avoid_proxy_hosts_helper.rb │ ├── avoid_balancing_hosts_helper.rb │ ├── plans_helper.rb │ ├── users_helper.rb │ ├── backup_helper.rb │ ├── clients_helper.rb │ ├── interfaces_helper.rb │ ├── user_sessions_helper.rb │ ├── configurations_helper.rb │ ├── provider_groups_helper.rb │ ├── providers_helper.rb │ └── graphs_helper.rb ├── views │ ├── layouts │ │ ├── partials │ │ │ ├── _footer.html.erb │ │ │ ├── _header.html.erb │ │ │ ├── _apply_changes_banner.html.erb │ │ │ └── _plugin_submenu.html.erb │ │ ├── login.html.erb │ │ └── application.html.erb │ ├── shared │ │ ├── _submenu_items.html.erb │ │ ├── _plugins_table_cells.erb │ │ ├── _plugins_table_headers.erb │ │ ├── _empty_submenu.html.erb │ │ ├── _create_new_button.html.erb │ │ ├── _graph_history.html.erb │ │ └── _address_fields.html.erb │ ├── always_allowed_sites │ │ ├── edit.html.erb │ │ ├── new.html.erb │ │ └── _always_allowed_site.html.erb │ ├── plans │ │ ├── new.html.erb │ │ └── edit.html.erb │ ├── users │ │ ├── new.html.erb │ │ ├── edit.html.erb │ │ └── _user.html.erb │ ├── clients │ │ ├── new.html.erb │ │ └── edit.html.erb │ ├── configurations │ │ ├── edit.html.erb │ │ └── named.conf.options.erb │ ├── iproutes │ │ ├── new.html.erb │ │ ├── edit.html.erb │ │ └── _iproute.html.erb │ ├── providers │ │ ├── new.html.erb │ │ └── edit.html.erb │ ├── interfaces │ │ ├── new.html.erb │ │ ├── edit.html.erb │ │ └── graph.html.erb │ ├── provider_groups │ │ ├── new.html.erb │ │ ├── edit.html.erb │ │ └── _provider_group.html.erb │ ├── contracts │ │ ├── new.html.erb │ │ ├── edit.html.erb │ │ └── _forwarded_port_fields.html.erb │ ├── avoid_balancing_hosts │ │ ├── new.html.erb │ │ ├── edit.html.erb │ │ └── _avoid_balancing_host.html.erb │ ├── abouts │ │ └── show.html.erb │ ├── app_mailer │ │ └── check_links_email.text.plain.erb │ └── user_sessions │ │ └── new.html.erb ├── models │ ├── traffic.rb │ ├── always_allowed_site.rb │ ├── avoid_balancing_host.rb │ ├── provider_klass.rb │ ├── user_session.rb │ ├── language.rb │ ├── klass.rb │ ├── queued_command.rb │ └── prohibited_forward_port.rb └── controllers │ └── abouts_controller.rb ├── vendor └── plugins │ ├── engines │ ├── test │ │ ├── plugins │ │ │ ├── test_assets │ │ │ │ ├── init.rb │ │ │ │ ├── public │ │ │ │ │ ├── file.txt │ │ │ │ │ └── subfolder │ │ │ │ │ │ └── file_in_subfolder.txt │ │ │ │ └── app │ │ │ │ │ ├── controllers │ │ │ │ │ └── assets_controller.rb │ │ │ │ │ └── views │ │ │ │ │ ├── layouts │ │ │ │ │ └── assets.html.erb │ │ │ │ │ └── assets │ │ │ │ │ └── index.html.erb │ │ │ ├── test_load_path │ │ │ │ └── init.rb │ │ │ ├── test_migration │ │ │ │ ├── init.rb │ │ │ │ └── db │ │ │ │ │ └── migrate │ │ │ │ │ ├── 001_create_tests.rb │ │ │ │ │ ├── 002_create_others.rb │ │ │ │ │ └── 003_create_extras.rb │ │ │ ├── test_routing │ │ │ │ ├── init.rb │ │ │ │ ├── app │ │ │ │ │ └── controllers │ │ │ │ │ │ ├── namespace │ │ │ │ │ │ └── test_routing_controller.rb │ │ │ │ │ │ └── test_routing_controller.rb │ │ │ │ └── config │ │ │ │ │ └── routes.rb │ │ │ ├── test_testing │ │ │ │ ├── init.rb │ │ │ │ ├── test │ │ │ │ │ ├── fixtures │ │ │ │ │ │ └── testing_fixtures.yml │ │ │ │ │ └── unit │ │ │ │ │ │ └── override_test.rb │ │ │ │ └── app │ │ │ │ │ └── README.txt │ │ │ ├── test_plugin_mailing │ │ │ │ ├── init.rb │ │ │ │ └── app │ │ │ │ │ ├── views │ │ │ │ │ └── plugin_mail │ │ │ │ │ │ ├── mail_from_plugin.erb │ │ │ │ │ │ ├── multipart_from_plugin_html.html.erb │ │ │ │ │ │ ├── multipart_from_plugin_plain.html.erb │ │ │ │ │ │ ├── multipart_from_plugin_with_application_template_html.html.erb │ │ │ │ │ │ └── multipart_from_plugin_with_application_template_plain.html.erb │ │ │ │ │ └── models │ │ │ │ │ └── plugin_mail.rb │ │ │ ├── test_assets_with_assets_directory │ │ │ │ ├── init.rb │ │ │ │ └── assets │ │ │ │ │ ├── file.txt │ │ │ │ │ └── subfolder │ │ │ │ │ └── file_in_subfolder.txt │ │ │ ├── test_assets_with_no_subdirectory │ │ │ │ ├── init.rb │ │ │ │ └── assets │ │ │ │ │ └── file.txt │ │ │ ├── not_a_plugin │ │ │ │ └── public │ │ │ │ │ └── should_not_be_copied.txt │ │ │ ├── beta_plugin │ │ │ │ ├── init.rb │ │ │ │ ├── locales │ │ │ │ │ └── en.yml │ │ │ │ └── app │ │ │ │ │ ├── views │ │ │ │ │ ├── shared_plugin │ │ │ │ │ │ └── a_view.html.erb │ │ │ │ │ └── namespace │ │ │ │ │ │ └── shared_plugin │ │ │ │ │ │ └── a_view.html.erb │ │ │ │ │ ├── models │ │ │ │ │ └── shared_plugin_model.rb │ │ │ │ │ └── controllers │ │ │ │ │ ├── app_and_plugin_controller.rb │ │ │ │ │ ├── shared_plugin_controller.rb │ │ │ │ │ └── namespace │ │ │ │ │ └── shared_plugin_controller.rb │ │ │ ├── test_code_mixing │ │ │ │ ├── init.rb │ │ │ │ └── app │ │ │ │ │ └── things │ │ │ │ │ └── thing.rb │ │ │ └── alpha_plugin │ │ │ │ ├── app │ │ │ │ ├── views │ │ │ │ │ ├── layouts │ │ │ │ │ │ └── plugin_layout.erb │ │ │ │ │ ├── alpha_plugin │ │ │ │ │ │ └── a_view.html.erb │ │ │ │ │ ├── namespace │ │ │ │ │ │ ├── alpha_plugin │ │ │ │ │ │ │ └── a_view.html.erb │ │ │ │ │ │ ├── app_and_plugin │ │ │ │ │ │ │ └── a_view.html.erb │ │ │ │ │ │ └── shared_plugin │ │ │ │ │ │ │ └── a_view.html.erb │ │ │ │ │ ├── app_and_plugin │ │ │ │ │ │ └── a_view.html.erb │ │ │ │ │ └── shared_plugin │ │ │ │ │ │ └── a_view.html.erb │ │ │ │ ├── models │ │ │ │ │ ├── alpha_plugin_model.rb │ │ │ │ │ ├── shared_plugin_model.rb │ │ │ │ │ └── app_and_plugin_model.rb │ │ │ │ └── controllers │ │ │ │ │ ├── namespace │ │ │ │ │ ├── alpha_plugin_controller.rb │ │ │ │ │ ├── app_and_plugin_controller.rb │ │ │ │ │ └── shared_plugin_controller.rb │ │ │ │ │ ├── app_and_plugin_controller.rb │ │ │ │ │ ├── shared_plugin_controller.rb │ │ │ │ │ └── alpha_plugin_controller.rb │ │ │ │ ├── locales │ │ │ │ └── en.yml │ │ │ │ └── lib │ │ │ │ ├── alpha_plugin_lib_model.rb │ │ │ │ └── app_and_plugin_lib_model.rb │ │ ├── app │ │ │ ├── views │ │ │ │ ├── notify_mail │ │ │ │ │ ├── multipart_plain.html.erb │ │ │ │ │ ├── implicit_multipart.text.plain.erb │ │ │ │ │ ├── multipart_html.html.erb │ │ │ │ │ ├── implicit_multipart.text.html.erb │ │ │ │ │ └── signup.text.plain.erb │ │ │ │ ├── app_and_plugin │ │ │ │ │ └── a_view.html.erb │ │ │ │ ├── namespace │ │ │ │ │ └── app_and_plugin │ │ │ │ │ │ └── a_view.html.erb │ │ │ │ └── plugin_mail │ │ │ │ │ ├── mail_from_plugin_with_application_template.text.plain.erb │ │ │ │ │ └── multipart_from_plugin_with_application_template_plain.html.erb │ │ │ ├── things │ │ │ │ └── thing.rb │ │ │ ├── helpers │ │ │ │ └── mail_helper.rb │ │ │ ├── models │ │ │ │ ├── app_and_plugin_model.rb │ │ │ │ └── notify_mail.rb │ │ │ └── controllers │ │ │ │ ├── app_and_plugin_controller.rb │ │ │ │ └── namespace │ │ │ │ └── app_and_plugin_controller.rb │ │ ├── lib │ │ │ ├── app_and_plugin_lib_model.rb │ │ │ └── render_information.rb │ │ ├── unit │ │ │ ├── test_testing │ │ │ │ └── override_test.rb │ │ │ ├── backwards_compat_test.rb │ │ │ ├── plugins_test.rb │ │ │ └── testing_test.rb │ │ └── functional │ │ │ ├── exception_notification_compatibility_test.rb │ │ │ ├── locale_loading_test.rb │ │ │ ├── routes_test.rb │ │ │ └── view_helpers_test.rb │ ├── init.rb │ ├── lib │ │ └── engines │ │ │ ├── plugin │ │ │ ├── loader.rb │ │ │ ├── locator.rb │ │ │ └── list.rb │ │ │ └── rails_extensions │ │ │ └── rails.rb │ ├── about.yml │ ├── generators │ │ └── plugin_migration │ │ │ └── templates │ │ │ └── plugin_migration.erb │ ├── boot.rb │ └── MIT-LICENSE │ ├── daemon_generator │ ├── install.rb │ ├── generators │ │ └── daemon │ │ │ ├── templates │ │ │ ├── daemons.yml │ │ │ ├── daemons │ │ │ ├── script.rb │ │ │ └── script_ctl │ │ │ └── daemon_generator.rb │ └── README │ └── validation_reflection │ ├── VERSION.yml │ ├── rails │ └── init.rb │ ├── about.yml │ ├── test │ └── test_helper.rb │ ├── LICENSE │ └── CHANGELOG ├── config ├── initializers │ ├── date_formats.rb │ ├── formtastic.rb │ ├── plugin.rb │ ├── search_extensions.rb │ ├── hooks_helper.rb │ ├── plugins_initializers.rb │ ├── mime_types.rb │ ├── inflections.rb │ ├── backtrace_silencers.rb │ ├── email.rb │ ├── new_rails_defaults.rb │ └── session_store.rb ├── daemons.yml ├── email.yml.sample ├── database.yml.sample ├── sequreisp_config_production.yml ├── sequreisp_config_development.yml ├── schedule.rb ├── preinitializer.rb ├── environments │ ├── development.rb │ └── production.rb └── locales │ ├── es.authlogic.yml │ └── pt.authlogic.yml ├── script ├── daemons ├── plugin ├── runner ├── server ├── console ├── dbconsole ├── destroy ├── generate ├── performance │ ├── profiler │ └── benchmarker ├── create_current_traffic_for_all_contracts.rb ├── about ├── autospec ├── spec ├── create_plugin_migration └── fixes │ └── 2013-08-23-v3.4.8-destroy_traffic_duplicate_for_each_contract.rb ├── db ├── files │ ├── valid_helpers │ └── valid_protocols └── migrate │ ├── 20100226205134_add_state_to_provider.rb │ ├── 20100817193307_add_kind_to_interface.rb │ ├── 20131011135123_add_attr_free_in_model_drive.rb │ ├── 20100411152259_remove_periodicity_from_plan.rb │ ├── 20100827160630_add_proxy_arp_to_contract.rb │ ├── 20130124150324_add_start_date_to_contract.rb │ ├── 20131009141508_add_attr_raid_in_model_drive.rb │ ├── 20100728200658_add_online_to_provider.rb │ ├── 20100816171623_add_state_to_provider_group.rb │ ├── 20110629195819_add_description_to_interface.rb │ ├── 20131108160333_add_prepare_disk_for_to_disk.rb │ ├── 20110401173735_add_language_to_configuration.rb │ ├── 20100818145133_add_reload_to_configuration.rb │ ├── 20100914203454_add_arp_filter_to_provider.rb │ ├── 20110513134624_add_use_in_nat_pool_to_address.rb │ ├── 20100914485127_remove_forward_ports_from_contract.rb │ ├── 20110301192148_add_language_id_to_configuration.rb │ ├── 20110729202546_remove_charge_in_advance_from_plans.rb │ ├── 20130318140727_add_default_value_address_client.rb │ ├── 20131015135729_add_attr_partitioned_in_model_disk.rb │ ├── 20110125153906_add_charge_in_advance_to_plan.rb │ ├── 20110401173545_remove_language_id_from_configuration.rb │ ├── 20110628183800_add_unique_provider_id_to_contract.rb │ ├── 20120705172526_add_avoid_nat_addresses_to_provider.rb │ ├── 20101220154541_add_physical_link_to_interface.rb │ ├── 20110208172546_add_external_client_number_to_client.rb │ ├── 20131129125615_remove_column_prepare_disk_for_in_model_disk.rb │ ├── 20100910215515_remove_interface_id_from_provider_group.rb │ ├── 20101216193104_add_time_zone_to_configuration.rb │ ├── 20130927143548_add_mount_cache_in_configuration.rb │ ├── 20131025162342_add_attr_clean_partition_in_model_disk.rb │ ├── 20100909152817_add_proxy_arp_interface_id_to_contract.rb │ ├── 20110203124848_add_notification_flag_to_provider.rb │ ├── 20130801140054_add_allow_dns_queries_to_provider.rb │ ├── 20140102133120_add_attr_is_connected_in_model_contract.rb │ ├── 20100716202915_create_klasses.rb │ ├── 20100802202634_add_unique_mac_address_to_provider.rb │ ├── 20100819131324_add_notification_email_to_configuration.rb │ ├── 20110228210823_create_languages.rb │ ├── 20110405153829_drop_languages.rb │ ├── 20120509192016_add_dhcp_force32_netmask_to_provider.rb │ ├── 20101119215044_add_logged_in_timeout_to_configuration.rb │ ├── 20110121155848_add_clamp_mss_to_pmtu_to_configuration.rb │ ├── 20110627202649_add_use_global_prios_to_configuration.rb │ ├── 20110706142311_add_changes_to_apply_to_configuration.rb │ ├── 20101015195759_add_role_name_to_user.rb │ ├── 20110304190603_add_last_changes_applied_at_to_configurations.rb │ ├── 20111031190332_add_ip_unique_index_to_contract.rb │ ├── 20130603154843_add_national_identification_number_to_client.rb │ ├── 20131129124342_add_column_prepare_disk_for_cache_in_model_disk.rb │ ├── 20110314185143_change_external_client_number_to_string_in_clients.rb │ ├── 20091020163013_create_provider_groups.rb │ ├── 20101215200016_add_filter_by_mac_address_to_configuration.rb │ ├── 20110202151450_add_notification_timeframe_to_configuration.rb │ ├── 20110705203119_add_shape_rate_down_on_ingress_to_provider.rb │ ├── 20120418143018_create_avoid_proxy_hosts.rb │ ├── 20130726141504_create_always_allowed_sites.rb │ ├── 20130903123419_change_national_identification_number_to_string.rb │ ├── 20100826140304_add_transparent_proxy_n_to_m_to_configuration.rb │ ├── 20110511200225_add_burst_to_plan.rb │ ├── 20110128140115_create_queued_commands.rb │ ├── 20120529152323_add_use_global_prios_strategy_to_configuration.rb │ ├── 20100706151507_remove_name_from_configuration.rb │ ├── 20130314140343_add_in_client_attribute_taxpayer_identification_number.rb │ ├── 20100904151929_add_transparent_proxy_zph_enabled_to_configuration.rb │ ├── 20120507155144_create_iproutes.rb │ ├── 20131108140741_change_column_name_mount_cache_for_new_disk_for_cache_added.rb │ ├── 20100507203501_create_interfaces.rb │ ├── 20100729160717_create_provider_klasses.rb │ ├── 20100817194905_create_addresses.rb │ ├── 20101104220301_add_tc_contracts_per_provider_in_lan_to_configuration.rb │ ├── 20101125122744_add_tc_contracts_per_provider_in_wan_to_configuration.rb │ ├── 20130226135252_add_attribute_use_external_number_client_in_configuration.rb │ ├── 20100902202704_add_public_address_id_to_contract.rb │ ├── 20110901192910_add_transparent_proxy_max_load_average_to_configuration.rb │ ├── 20110201134009_create_prohibited_forward_ports.rb │ ├── 20110203161220_add_online_changed_at_to_providers.rb │ ├── 20120417125953_create_avoid_balancing_hosts.rb │ ├── 20130925115932_create_disks.rb │ ├── 20100802204228_add_arp_vars_to_provider.rb │ ├── 20110905135251_add_transparent_proxy_windows_update_hack_to_configuration.rb │ ├── 20091020160916_create_clients.rb │ ├── 20110512192151_add_long_download_upload_max_to_plan.rb │ ├── 20131007133525_add_attr_identification_number_and_capacity_used_in_model_disk.rb │ ├── 20110518140731_add_contract_details_to_contract.rb │ ├── 20100412140548_remove_default_ceil_dfl_percent_and_r2q_from_configuration.rb │ ├── 20121024150206_add_proxy_arp_provider_id_and_proxy_arp_gateway_to_contract.rb │ ├── 20131129123334_delete_column_partitioned_and_clean_partition_in_model_disk.rb │ ├── 20091020160743_create_plans.rb │ ├── 20100914393123_create_forwarded_ports.rb │ ├── 20100826195914_add_alerted_options_to_configuration.rb │ ├── 20101214143356_add_netmask_to_contract.rb │ ├── 20110502204821_add_backup_restore_and_backup_reboot_to_configuration.rb │ ├── 20121031142755_add_proxy_arp_use_lan_gateway_and_proxy_arp_lan_gateway_to_contract.rb │ ├── 20101216205352_add_deliver_notifications_to_configuration.rb │ ├── 20110916144958_add_apply_changes_automatically_fields_to_configuration.rb │ ├── 20110721133221_add_iptables_tree_optimization_enabled_to_configuration.rb │ ├── 20100802214909_add_transparent_proxy_to_contract.rb │ ├── 20100823193812_change_transparent_proxy_to_string_in_contract.rb │ ├── 20091020162918_create_providers.rb │ ├── 20130527155403_create_traffic_accountings.rb │ ├── 20091020162512_create_contracts.rb │ ├── 20100603150440_add_queues_to_contract.rb │ ├── 20131025123752_add_web_interface_listen_on_ports_to_configuration.rb │ ├── 20140602164035_add_attrs_for_bind_dns_in_configuration.rb │ ├── 20100224150104_create_configurations.rb │ ├── 20100604134403_add_consumptions_to_contract.rb │ ├── 20100608140705_add_consumptions_to_provider.rb │ ├── 20100607222517_add_consumptions_to_provider_group.rb │ ├── 20101213125305_add_audits_table.rb │ ├── 20100805191958_remove_and_add_items_to_confgiuration.rb │ ├── 20101124201859_add_general_indexes.rb │ └── 20140529164321_add_attr_for_mail_relay_in_configuration.rb ├── doc └── README_FOR_APP ├── Rakefile ├── misc ├── migrate_forward_ports.rb └── translate_iptables_save.rb └── bin └── sequreisp_rrd_feed.sh /public/favicon.ico: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/stylesheets/tr_back.gif: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/generators/sequreisp_plugin/USAGE: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /spec/rcov.opts: -------------------------------------------------------------------------------- 1 | --exclude "spec/*,gems/*" 2 | --rails -------------------------------------------------------------------------------- /app/helpers/disks_helper.rb: -------------------------------------------------------------------------------- 1 | module DisksHelper 2 | end 3 | -------------------------------------------------------------------------------- /vendor/plugins/engines/test/plugins/test_assets/init.rb: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vendor/plugins/engines/test/plugins/test_load_path/init.rb: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vendor/plugins/engines/test/plugins/test_migration/init.rb: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vendor/plugins/engines/test/plugins/test_routing/init.rb: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vendor/plugins/engines/test/plugins/test_testing/init.rb: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vendor/plugins/engines/test/plugins/test_assets/public/file.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vendor/plugins/engines/test/plugins/test_plugin_mailing/init.rb: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/helpers/dashboard_helper.rb: -------------------------------------------------------------------------------- 1 | module DashboardHelper 2 | end 3 | -------------------------------------------------------------------------------- /vendor/plugins/engines/test/plugins/test_assets_with_assets_directory/init.rb: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vendor/plugins/engines/test/plugins/test_assets_with_no_subdirectory/init.rb: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/helpers/avoid_proxy_hosts_helper.rb: -------------------------------------------------------------------------------- 1 | module AvoidProxyHostsHelper 2 | end 3 | -------------------------------------------------------------------------------- /config/initializers/date_formats.rb: -------------------------------------------------------------------------------- 1 | Date::DATE_FORMATS[:default] = "%d/%m/%Y" 2 | -------------------------------------------------------------------------------- /lib/generators/sequreisp_plugin/templates/install.rb: -------------------------------------------------------------------------------- 1 | # Install hook code here 2 | -------------------------------------------------------------------------------- /spec/spec.opts: -------------------------------------------------------------------------------- 1 | --colour 2 | --format progress 3 | --loadby mtime 4 | --reverse 5 | -------------------------------------------------------------------------------- /vendor/plugins/engines/test/plugins/not_a_plugin/public/should_not_be_copied.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vendor/plugins/engines/test/plugins/test_testing/test/fixtures/testing_fixtures.yml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/helpers/avoid_balancing_hosts_helper.rb: -------------------------------------------------------------------------------- 1 | module AvoidBalancingHostsHelper 2 | end 3 | -------------------------------------------------------------------------------- /lib/generators/sequreisp_plugin/templates/uninstall.rb: -------------------------------------------------------------------------------- 1 | # Uninstall hook code here 2 | -------------------------------------------------------------------------------- /vendor/plugins/engines/test/plugins/test_assets/public/subfolder/file_in_subfolder.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vendor/plugins/engines/test/plugins/test_assets_with_assets_directory/assets/file.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vendor/plugins/engines/test/plugins/test_assets_with_no_subdirectory/assets/file.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sequre/sequreisp/HEAD/public/images/bg.gif -------------------------------------------------------------------------------- /public/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sequre/sequreisp/HEAD/public/images/logo.png -------------------------------------------------------------------------------- /public/images/filtrar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sequre/sequreisp/HEAD/public/images/filtrar.png -------------------------------------------------------------------------------- /public/images/header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sequre/sequreisp/HEAD/public/images/header.png -------------------------------------------------------------------------------- /public/images/loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sequre/sequreisp/HEAD/public/images/loader.gif -------------------------------------------------------------------------------- /vendor/plugins/daemon_generator/install.rb: -------------------------------------------------------------------------------- 1 | puts IO.read(File.join(File.dirname(__FILE__), 'README')) -------------------------------------------------------------------------------- /vendor/plugins/validation_reflection/VERSION.yml: -------------------------------------------------------------------------------- 1 | --- 2 | :major: 0 3 | :minor: 3 4 | :patch: 5 5 | -------------------------------------------------------------------------------- /vendor/plugins/validation_reflection/rails/init.rb: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | require 'validation_reflection' -------------------------------------------------------------------------------- /config/initializers/formtastic.rb: -------------------------------------------------------------------------------- 1 | Formtastic::SemanticFormBuilder.i18n_lookups_by_default = true 2 | 3 | -------------------------------------------------------------------------------- /public/images/bg_content.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sequre/sequreisp/HEAD/public/images/bg_content.png -------------------------------------------------------------------------------- /public/images/btn-sm-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sequre/sequreisp/HEAD/public/images/btn-sm-bg.png -------------------------------------------------------------------------------- /public/images/mid_aviso.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sequre/sequreisp/HEAD/public/images/mid_aviso.png -------------------------------------------------------------------------------- /public/images/separador.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sequre/sequreisp/HEAD/public/images/separador.png -------------------------------------------------------------------------------- /public/images/top_aviso.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sequre/sequreisp/HEAD/public/images/top_aviso.png -------------------------------------------------------------------------------- /vendor/plugins/engines/test/app/views/notify_mail/multipart_plain.html.erb: -------------------------------------------------------------------------------- 1 | the plaintext part of the email -------------------------------------------------------------------------------- /vendor/plugins/engines/test/plugins/beta_plugin/init.rb: -------------------------------------------------------------------------------- 1 | # just here so that Rails recognizes this as a plugin -------------------------------------------------------------------------------- /vendor/plugins/engines/test/plugins/test_assets_with_assets_directory/assets/subfolder/file_in_subfolder.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/views/layouts/partials/_footer.html.erb: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /config/daemons.yml: -------------------------------------------------------------------------------- 1 | dir_mode: script 2 | dir: ../../log 3 | multiple: false 4 | backtrace: true 5 | monitor: true -------------------------------------------------------------------------------- /public/images/bottom_aviso.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sequre/sequreisp/HEAD/public/images/bottom_aviso.png -------------------------------------------------------------------------------- /public/images/login-isp_03.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sequre/sequreisp/HEAD/public/images/login-isp_03.jpg -------------------------------------------------------------------------------- /vendor/plugins/engines/test/plugins/test_code_mixing/init.rb: -------------------------------------------------------------------------------- 1 | # just here so that Rails recognizes this as a plugin -------------------------------------------------------------------------------- /vendor/plugins/engines/test/plugins/test_plugin_mailing/app/views/plugin_mail/mail_from_plugin.erb: -------------------------------------------------------------------------------- 1 | <%= @note %> -------------------------------------------------------------------------------- /lib/generators/sequreisp_plugin/templates/routes.rb: -------------------------------------------------------------------------------- 1 | ActionController::Routing::Routes.draw do |map| 2 | 3 | end 4 | -------------------------------------------------------------------------------- /public/images/bg_button_left.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sequre/sequreisp/HEAD/public/images/bg_button_left.gif -------------------------------------------------------------------------------- /public/images/bg_button_right.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sequre/sequreisp/HEAD/public/images/bg_button_right.gif -------------------------------------------------------------------------------- /vendor/plugins/engines/test/plugins/alpha_plugin/app/views/layouts/plugin_layout.erb: -------------------------------------------------------------------------------- 1 | <%= yield %> (with plugin layout) -------------------------------------------------------------------------------- /app/views/shared/_submenu_items.html.erb: -------------------------------------------------------------------------------- 1 | <% submenu_links.each do |link|%> 2 |
  • <%= link %>
  • 3 | <% end %> 4 | -------------------------------------------------------------------------------- /config/initializers/plugin.rb: -------------------------------------------------------------------------------- 1 | WillPaginate::ViewHelpers.pagination_options[:renderer] = 'PaginationListLinkRenderer' 2 | -------------------------------------------------------------------------------- /public/images/loader_horizontal.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sequre/sequreisp/HEAD/public/images/loader_horizontal.gif -------------------------------------------------------------------------------- /public/images/sequreisp_logo_r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sequre/sequreisp/HEAD/public/images/sequreisp_logo_r.png -------------------------------------------------------------------------------- /script/daemons: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | Dir[File.dirname(__FILE__) + "/../lib/daemons/*_ctl"].each {|f| `#{f} #{ARGV.first}`} -------------------------------------------------------------------------------- /script/plugin: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require File.dirname(__FILE__) + '/../config/boot' 3 | require 'commands/plugin' 4 | -------------------------------------------------------------------------------- /script/runner: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require File.dirname(__FILE__) + '/../config/boot' 3 | require 'commands/runner' 4 | -------------------------------------------------------------------------------- /script/server: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require File.dirname(__FILE__) + '/../config/boot' 3 | require 'commands/server' 4 | -------------------------------------------------------------------------------- /vendor/plugins/engines/test/app/views/app_and_plugin/a_view.html.erb: -------------------------------------------------------------------------------- 1 | <%= TestHelper.view_path_for __FILE__ %> (from app) -------------------------------------------------------------------------------- /vendor/plugins/engines/test/app/views/notify_mail/implicit_multipart.text.plain.erb: -------------------------------------------------------------------------------- 1 | the implicit plaintext part of the email -------------------------------------------------------------------------------- /vendor/plugins/engines/test/plugins/alpha_plugin/locales/en.yml: -------------------------------------------------------------------------------- 1 | en: 2 | hello: "Hello from alfa" 3 | plugin: "alfa" 4 | -------------------------------------------------------------------------------- /vendor/plugins/engines/test/plugins/beta_plugin/locales/en.yml: -------------------------------------------------------------------------------- 1 | en: 2 | hello: "Hello from beta" 3 | plugin: "beta" 4 | -------------------------------------------------------------------------------- /lib/sequreisp_plugins.rb: -------------------------------------------------------------------------------- 1 | module SequreispPlugins 2 | 3 | def self.internal_ip 4 | "1.1.1.1" 5 | end 6 | 7 | end 8 | -------------------------------------------------------------------------------- /public/stylesheets/chosen-sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sequre/sequreisp/HEAD/public/stylesheets/chosen-sprite.png -------------------------------------------------------------------------------- /script/console: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require File.dirname(__FILE__) + '/../config/boot' 3 | require 'commands/console' 4 | -------------------------------------------------------------------------------- /script/dbconsole: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require File.dirname(__FILE__) + '/../config/boot' 3 | require 'commands/dbconsole' 4 | -------------------------------------------------------------------------------- /script/destroy: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require File.dirname(__FILE__) + '/../config/boot' 3 | require 'commands/destroy' 4 | -------------------------------------------------------------------------------- /script/generate: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require File.dirname(__FILE__) + '/../config/boot' 3 | require 'commands/generate' 4 | -------------------------------------------------------------------------------- /vendor/plugins/engines/test/plugins/alpha_plugin/app/views/alpha_plugin/a_view.html.erb: -------------------------------------------------------------------------------- 1 | <%= TestHelper.view_path_for __FILE__ %> -------------------------------------------------------------------------------- /vendor/plugins/engines/test/plugins/test_plugin_mailing/app/views/plugin_mail/multipart_from_plugin_html.html.erb: -------------------------------------------------------------------------------- 1 | html template -------------------------------------------------------------------------------- /vendor/plugins/engines/test/plugins/test_plugin_mailing/app/views/plugin_mail/multipart_from_plugin_plain.html.erb: -------------------------------------------------------------------------------- 1 | plain template -------------------------------------------------------------------------------- /public/images/_bg_button_left_cancel.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sequre/sequreisp/HEAD/public/images/_bg_button_left_cancel.gif -------------------------------------------------------------------------------- /public/images/_bg_button_left_submit.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sequre/sequreisp/HEAD/public/images/_bg_button_left_submit.gif -------------------------------------------------------------------------------- /public/stylesheets/chosen-changes.css: -------------------------------------------------------------------------------- 1 | div.chzn-container, div.chzn-container div{ 2 | overflow:visible; 3 | margin:0; 4 | } 5 | -------------------------------------------------------------------------------- /vendor/plugins/engines/test/app/views/namespace/app_and_plugin/a_view.html.erb: -------------------------------------------------------------------------------- 1 | <%= TestHelper.view_path_for __FILE__ %> (from app) -------------------------------------------------------------------------------- /app/views/shared/_plugins_table_cells.erb: -------------------------------------------------------------------------------- 1 | <% plugins_table_columns_values(object).each do |td| %> 2 | <%= td %> 3 | <% end %> -------------------------------------------------------------------------------- /vendor/plugins/engines/test/app/things/thing.rb: -------------------------------------------------------------------------------- 1 | class Thing 2 | def self.from_app; TestHelper::report_location(__FILE__); end 3 | end -------------------------------------------------------------------------------- /vendor/plugins/engines/test/app/views/notify_mail/multipart_html.html.erb: -------------------------------------------------------------------------------- 1 | the html part of the email <%= do_something_helpful("semaj") %> -------------------------------------------------------------------------------- /vendor/plugins/engines/test/app/views/plugin_mail/mail_from_plugin_with_application_template.text.plain.erb: -------------------------------------------------------------------------------- 1 | <%= @note %> (from application) -------------------------------------------------------------------------------- /vendor/plugins/engines/test/plugins/alpha_plugin/app/views/namespace/alpha_plugin/a_view.html.erb: -------------------------------------------------------------------------------- 1 | <%= TestHelper.view_path_for __FILE__ %> -------------------------------------------------------------------------------- /vendor/plugins/engines/test/plugins/test_assets/app/controllers/assets_controller.rb: -------------------------------------------------------------------------------- 1 | class AssetsController < ApplicationController 2 | end -------------------------------------------------------------------------------- /vendor/plugins/engines/test/plugins/test_assets/app/views/layouts/assets.html.erb: -------------------------------------------------------------------------------- 1 |
    2 | <%= yield %> 3 |
    -------------------------------------------------------------------------------- /vendor/plugins/engines/test/plugins/alpha_plugin/app/views/app_and_plugin/a_view.html.erb: -------------------------------------------------------------------------------- 1 | <%= TestHelper.view_path_for __FILE__ %> (from a_view) -------------------------------------------------------------------------------- /vendor/plugins/engines/test/plugins/alpha_plugin/app/views/namespace/app_and_plugin/a_view.html.erb: -------------------------------------------------------------------------------- 1 | <%= TestHelper.view_path_for __FILE__ %> -------------------------------------------------------------------------------- /vendor/plugins/engines/test/plugins/alpha_plugin/app/views/shared_plugin/a_view.html.erb: -------------------------------------------------------------------------------- 1 | <%= TestHelper.view_path_for __FILE__ %> (from alpha_plugin) -------------------------------------------------------------------------------- /vendor/plugins/engines/test/plugins/beta_plugin/app/views/shared_plugin/a_view.html.erb: -------------------------------------------------------------------------------- 1 | <%= TestHelper.view_path_for __FILE__ %> (from beta_plugin) -------------------------------------------------------------------------------- /config/initializers/search_extensions.rb: -------------------------------------------------------------------------------- 1 | ActionView::Base.send :include, SearchExtensions 2 | SearchExtensions.autoload_search_form_extensions 3 | 4 | -------------------------------------------------------------------------------- /script/performance/profiler: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require File.dirname(__FILE__) + '/../../config/boot' 3 | require 'commands/performance/profiler' 4 | -------------------------------------------------------------------------------- /vendor/plugins/engines/test/app/helpers/mail_helper.rb: -------------------------------------------------------------------------------- 1 | module MailHelper 2 | def do_something_helpful(var) 3 | var.to_s.reverse 4 | end 5 | end -------------------------------------------------------------------------------- /public/stylesheets/images/ui-icons_222222_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sequre/sequreisp/HEAD/public/stylesheets/images/ui-icons_222222_256x240.png -------------------------------------------------------------------------------- /public/stylesheets/images/ui-icons_2e83ff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sequre/sequreisp/HEAD/public/stylesheets/images/ui-icons_2e83ff_256x240.png -------------------------------------------------------------------------------- /public/stylesheets/images/ui-icons_454545_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sequre/sequreisp/HEAD/public/stylesheets/images/ui-icons_454545_256x240.png -------------------------------------------------------------------------------- /public/stylesheets/images/ui-icons_888888_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sequre/sequreisp/HEAD/public/stylesheets/images/ui-icons_888888_256x240.png -------------------------------------------------------------------------------- /public/stylesheets/images/ui-icons_cd0a0a_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sequre/sequreisp/HEAD/public/stylesheets/images/ui-icons_cd0a0a_256x240.png -------------------------------------------------------------------------------- /vendor/plugins/engines/test/app/views/notify_mail/implicit_multipart.text.html.erb: -------------------------------------------------------------------------------- 1 | the implicit html part of the email <%= do_something_helpful("semaj") %> -------------------------------------------------------------------------------- /vendor/plugins/engines/test/app/views/plugin_mail/multipart_from_plugin_with_application_template_plain.html.erb: -------------------------------------------------------------------------------- 1 | plugin mail template loaded from application -------------------------------------------------------------------------------- /vendor/plugins/engines/test/plugins/alpha_plugin/app/views/namespace/shared_plugin/a_view.html.erb: -------------------------------------------------------------------------------- 1 | <%= TestHelper.view_path_for __FILE__ %> (from alpha_plugin) -------------------------------------------------------------------------------- /vendor/plugins/engines/test/plugins/beta_plugin/app/views/namespace/shared_plugin/a_view.html.erb: -------------------------------------------------------------------------------- 1 | <%= TestHelper.view_path_for __FILE__ %> (from beta_plugin) -------------------------------------------------------------------------------- /script/create_current_traffic_for_all_contracts.rb: -------------------------------------------------------------------------------- 1 | Contract.all.each{ |contract| contract.create_traffic_for_this_period if contract.current_traffic.nil? } 2 | -------------------------------------------------------------------------------- /script/performance/benchmarker: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require File.dirname(__FILE__) + '/../../config/boot' 3 | require 'commands/performance/benchmarker' 4 | -------------------------------------------------------------------------------- /vendor/plugins/engines/test/plugins/test_code_mixing/app/things/thing.rb: -------------------------------------------------------------------------------- 1 | class Thing 2 | def self.from_plugin; TestHelper::report_location(__FILE__); end 3 | end -------------------------------------------------------------------------------- /vendor/plugins/engines/test/plugins/test_plugin_mailing/app/views/plugin_mail/multipart_from_plugin_with_application_template_html.html.erb: -------------------------------------------------------------------------------- 1 | template from plugin -------------------------------------------------------------------------------- /vendor/plugins/engines/test/plugins/test_plugin_mailing/app/views/plugin_mail/multipart_from_plugin_with_application_template_plain.html.erb: -------------------------------------------------------------------------------- 1 | template from plugin -------------------------------------------------------------------------------- /public/stylesheets/images/ui-bg_flat_0_aaaaaa_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sequre/sequreisp/HEAD/public/stylesheets/images/ui-bg_flat_0_aaaaaa_40x100.png -------------------------------------------------------------------------------- /public/stylesheets/images/ui-bg_flat_75_e3e2da_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sequre/sequreisp/HEAD/public/stylesheets/images/ui-bg_flat_75_e3e2da_40x100.png -------------------------------------------------------------------------------- /public/stylesheets/images/ui-bg_glass_55_fbf9ee_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sequre/sequreisp/HEAD/public/stylesheets/images/ui-bg_glass_55_fbf9ee_1x400.png -------------------------------------------------------------------------------- /public/stylesheets/images/ui-bg_glass_65_ffffff_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sequre/sequreisp/HEAD/public/stylesheets/images/ui-bg_glass_65_ffffff_1x400.png -------------------------------------------------------------------------------- /public/stylesheets/images/ui-bg_glass_75_dadada_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sequre/sequreisp/HEAD/public/stylesheets/images/ui-bg_glass_75_dadada_1x400.png -------------------------------------------------------------------------------- /public/stylesheets/images/ui-bg_glass_75_e6e6e6_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sequre/sequreisp/HEAD/public/stylesheets/images/ui-bg_glass_75_e6e6e6_1x400.png -------------------------------------------------------------------------------- /vendor/plugins/daemon_generator/generators/daemon/templates/daemons.yml: -------------------------------------------------------------------------------- 1 | dir_mode: script 2 | dir: ../../log 3 | multiple: false 4 | backtrace: true 5 | monitor: true -------------------------------------------------------------------------------- /vendor/plugins/engines/test/plugins/test_testing/app/README.txt: -------------------------------------------------------------------------------- 1 | Fixtures are only copied from plugins with an +app+ directory, but git needs this directory to be non-empty -------------------------------------------------------------------------------- /app/views/shared/_plugins_table_headers.erb: -------------------------------------------------------------------------------- 1 | 2 | <% plugins_table_columns.each do |th| %> 3 | <%= th %> 4 | <% end %> 5 | -------------------------------------------------------------------------------- /public/stylesheets/images/ui-bg_inset-soft_95_fef1ec_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sequre/sequreisp/HEAD/public/stylesheets/images/ui-bg_inset-soft_95_fef1ec_1x100.png -------------------------------------------------------------------------------- /script/about: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require File.dirname(__FILE__) + '/../config/boot' 3 | $LOAD_PATH.unshift "#{RAILTIES_PATH}/builtin/rails_info" 4 | require 'commands/about' -------------------------------------------------------------------------------- /vendor/plugins/daemon_generator/generators/daemon/templates/daemons: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | Dir[File.dirname(__FILE__) + "/../lib/daemons/*_ctl"].each {|f| `#{f} #{ARGV.first}`} -------------------------------------------------------------------------------- /config/initializers/hooks_helper.rb: -------------------------------------------------------------------------------- 1 | require_dependency 'hooks_helper' 2 | unless ActionView::Base.include?(HooksHelper) 3 | ActionView::Base.send :include, HooksHelper 4 | end 5 | -------------------------------------------------------------------------------- /db/files/valid_helpers: -------------------------------------------------------------------------------- 1 | proto_gre 2 | ftp 3 | snmp_basic 4 | proto_dccp 5 | proto_sctp 6 | pptp 7 | h323 8 | sip 9 | irc 10 | tftp 11 | amanda 12 | proto_udplite 13 | 14 | -------------------------------------------------------------------------------- /public/stylesheets/images/ui-bg_highlight-soft_75_990000_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sequre/sequreisp/HEAD/public/stylesheets/images/ui-bg_highlight-soft_75_990000_1x100.png -------------------------------------------------------------------------------- /vendor/plugins/engines/test/app/models/app_and_plugin_model.rb: -------------------------------------------------------------------------------- 1 | class AppAndPluginModel < ActiveRecord::Base 2 | def self.report_location; TestHelper::report_location(__FILE__); end 3 | end -------------------------------------------------------------------------------- /vendor/plugins/engines/test/lib/app_and_plugin_lib_model.rb: -------------------------------------------------------------------------------- 1 | class AppAndPluginLibModel < ActiveRecord::Base 2 | def self.report_location; TestHelper::report_location(__FILE__); end 3 | end -------------------------------------------------------------------------------- /app/views/shared/_empty_submenu.html.erb: -------------------------------------------------------------------------------- 1 | <% if submenu_links.any? %> 2 | 5 | <% end %> -------------------------------------------------------------------------------- /config/email.yml.sample: -------------------------------------------------------------------------------- 1 | # Outgoing email settings 2 | 3 | production: 4 | delivery_method: :sendmail 5 | sendmail_settings: 6 | location: /usr/sbin/sendmail 7 | arguments: -i -t 8 | 9 | -------------------------------------------------------------------------------- /vendor/plugins/engines/test/plugins/alpha_plugin/app/models/alpha_plugin_model.rb: -------------------------------------------------------------------------------- 1 | class AlphaPluginModel < ActiveRecord::Base 2 | def self.report_location; TestHelper::report_location(__FILE__); end 3 | end -------------------------------------------------------------------------------- /vendor/plugins/engines/test/plugins/alpha_plugin/lib/alpha_plugin_lib_model.rb: -------------------------------------------------------------------------------- 1 | class AlphaPluginLibModel < ActiveRecord::Base 2 | def self.report_location; TestHelper::report_location(__FILE__); end 3 | end -------------------------------------------------------------------------------- /vendor/plugins/engines/test/plugins/beta_plugin/app/models/shared_plugin_model.rb: -------------------------------------------------------------------------------- 1 | class SharedPluginModel < ActiveRecord::Base 2 | def self.report_location; TestHelper::report_location(__FILE__); end 3 | end -------------------------------------------------------------------------------- /vendor/plugins/engines/test/app/controllers/app_and_plugin_controller.rb: -------------------------------------------------------------------------------- 1 | class AppAndPluginController < ApplicationController 2 | def an_action 3 | render_class_and_action 'from app' 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /vendor/plugins/engines/test/plugins/alpha_plugin/app/models/shared_plugin_model.rb: -------------------------------------------------------------------------------- 1 | class SharedPluginModel < ActiveRecord::Base 2 | def self.report_location; TestHelper::report_location(__FILE__); end 3 | end -------------------------------------------------------------------------------- /lib/generators/sequreisp_plugin/templates/sequreisp_patch.rb: -------------------------------------------------------------------------------- 1 | Dir.glob(Rails.root.join 'vendor/plugins/sequreisp_<%= name.downcase %>/lib/<%= name.downcase %>_patches/*').each do |path| 2 | require path 3 | end 4 | -------------------------------------------------------------------------------- /config/initializers/plugins_initializers.rb: -------------------------------------------------------------------------------- 1 | Dir.glob(File.join(Rails.root, 'vendor', 'plugins', '**', 'config', 'initializers', '*')) do |initializer| 2 | self.send(:eval, File.open(initializer, 'r').read) 3 | end 4 | -------------------------------------------------------------------------------- /spec/models/plan_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | #EXAMPLE TEST 4 | #describe Plan do 5 | # it "should be greate" do 6 | # plan = FactoryGirl.build :plan 7 | # plan.should be_true 8 | # end 9 | #end 10 | -------------------------------------------------------------------------------- /vendor/plugins/engines/test/app/controllers/namespace/app_and_plugin_controller.rb: -------------------------------------------------------------------------------- 1 | class Namespace::AppAndPluginController < ApplicationController 2 | def an_action 3 | render_class_and_action 'from app' 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /doc/README_FOR_APP: -------------------------------------------------------------------------------- 1 | Use this README file to introduce your application and point to useful places in the API for learning more. 2 | Run "rake doc:app" to generate API documentation for your models, controllers, helpers, and libraries. 3 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | # See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file 2 | # 3 | # To ban all spiders from the entire site uncomment the next two lines: 4 | User-Agent: * 5 | Disallow: / 6 | -------------------------------------------------------------------------------- /vendor/plugins/engines/test/plugins/alpha_plugin/app/controllers/namespace/alpha_plugin_controller.rb: -------------------------------------------------------------------------------- 1 | class Namespace::AlphaPluginController < ApplicationController 2 | def an_action 3 | render_class_and_action 4 | end 5 | end -------------------------------------------------------------------------------- /vendor/plugins/engines/test/plugins/beta_plugin/app/controllers/app_and_plugin_controller.rb: -------------------------------------------------------------------------------- 1 | class AppAndPluginController < ApplicationController 2 | def an_action 3 | render_class_and_action 'from beta_plugin' 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /vendor/plugins/engines/test/plugins/beta_plugin/app/controllers/shared_plugin_controller.rb: -------------------------------------------------------------------------------- 1 | class SharedPluginController < ApplicationController 2 | def an_action 3 | render_class_and_action 'from beta_plugin' 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /vendor/plugins/engines/test/plugins/test_routing/app/controllers/namespace/test_routing_controller.rb: -------------------------------------------------------------------------------- 1 | class Namespace::TestRoutingController < ApplicationController 2 | def routed_action 3 | render_class_and_action 4 | end 5 | end -------------------------------------------------------------------------------- /vendor/plugins/engines/init.rb: -------------------------------------------------------------------------------- 1 | # Only call Engines.init once, in the after_initialize block so that Rails 2 | # plugin reloading works when turned on 3 | config.after_initialize do 4 | Engines.init(initializer) if defined? :Engines 5 | end -------------------------------------------------------------------------------- /vendor/plugins/engines/test/plugins/alpha_plugin/app/controllers/app_and_plugin_controller.rb: -------------------------------------------------------------------------------- 1 | class AppAndPluginController < ApplicationController 2 | def an_action 3 | render_class_and_action 'from alpha_plugin' 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /vendor/plugins/engines/test/plugins/alpha_plugin/app/controllers/shared_plugin_controller.rb: -------------------------------------------------------------------------------- 1 | class SharedEngineController < ApplicationController 2 | def an_action 3 | render_class_and_action 'from alpha_engine' 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /app/views/always_allowed_sites/edit.html.erb: -------------------------------------------------------------------------------- 1 | <% content_for :title, t('actions.edit', :model => AlwaysAllowedSite.human_name) %> 2 | <% heading t('actions.edit', :model => AlwaysAllowedSite.human_name) %> 3 | 4 | <%= render @always_allowed_site %> -------------------------------------------------------------------------------- /app/views/always_allowed_sites/new.html.erb: -------------------------------------------------------------------------------- 1 | <% content_for :title, t('actions.new', :model => AlwaysAllowedSite.human_name) %> 2 | <% heading t('actions.new', :model => AlwaysAllowedSite.human_name) %> 3 | 4 | <%= render 'always_allowed_site' %> -------------------------------------------------------------------------------- /app/views/plans/new.html.erb: -------------------------------------------------------------------------------- 1 | <% content_for :title, t('actions.new', :model => Plan.human_name) %> 2 | <% heading t('actions.new', :model => Plan.human_name) %> 3 | 4 | <%= render :partial => "shared/empty_submenu" %> 5 | 6 | <%= render @plan %> 7 | 8 | -------------------------------------------------------------------------------- /app/views/users/new.html.erb: -------------------------------------------------------------------------------- 1 | <% content_for :title, t('actions.new', :model => User.human_name) %> 2 | <% heading t('actions.new', :model => User.human_name) %> 3 | 4 | <%= render :partial => "shared/empty_submenu" %> 5 | 6 | <%= render @user %> 7 | 8 | -------------------------------------------------------------------------------- /config/initializers/mime_types.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Add new mime types for use in respond_to blocks: 4 | # Mime::Type.register "text/richtext", :rtf 5 | # Mime::Type.register_alias "text/html", :iphone 6 | -------------------------------------------------------------------------------- /lib/sequreisp_config.rb: -------------------------------------------------------------------------------- 1 | module SequreispConfig 2 | # load de files de configuración 3 | suffix = Rails.env.production? ? 'production' : 'development' 4 | CONFIG = YAML::load(File.open("#{RAILS_ROOT}/config/sequreisp_config_#{suffix}.yml")) 5 | end 6 | -------------------------------------------------------------------------------- /vendor/plugins/engines/test/plugins/beta_plugin/app/controllers/namespace/shared_plugin_controller.rb: -------------------------------------------------------------------------------- 1 | class Namespace::SharedPluginController < ApplicationController 2 | def an_action 3 | render_class_and_action 'from beta_plugin' 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /app/views/clients/new.html.erb: -------------------------------------------------------------------------------- 1 | <% content_for :title, t('actions.new', :model => Client.human_name) %> 2 | <% heading t('actions.new', :model => Client.human_name) %> 3 | 4 | <%= render :partial => "shared/empty_submenu" %> 5 | <%= render @client %> 6 | 7 | -------------------------------------------------------------------------------- /vendor/plugins/engines/test/plugins/alpha_plugin/app/controllers/namespace/app_and_plugin_controller.rb: -------------------------------------------------------------------------------- 1 | class Namespace::AppAndPluginController < ApplicationController 2 | def an_action 3 | render_class_and_action 'from alpha_plugin' 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /vendor/plugins/engines/test/plugins/alpha_plugin/app/controllers/namespace/shared_plugin_controller.rb: -------------------------------------------------------------------------------- 1 | class Namespace::SharedPluginController < ApplicationController 2 | def an_action 3 | render_class_and_action 'from alpha_plugin' 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /app/views/configurations/edit.html.erb: -------------------------------------------------------------------------------- 1 | <% content_for :title, t('actions.edit', :model => Configuration.human_name) %> 2 | <% heading Configuration.human_name %> 3 | 4 | <%= render :partial => "shared/empty_submenu" %> 5 | 6 | <%= render @configuration %> 7 | 8 | -------------------------------------------------------------------------------- /app/views/iproutes/new.html.erb: -------------------------------------------------------------------------------- 1 | <% content_for :title, t('actions.new', :model => Iproute.human_name) %> 2 | <% heading t('actions.new', :model => Iproute.human_name) %> 3 | 4 | <%= render :partial => "shared/empty_submenu" %> 5 | 6 | <%= render @iproute %> 7 | -------------------------------------------------------------------------------- /config/database.yml.sample: -------------------------------------------------------------------------------- 1 | production: 2 | adapter: mysql 3 | encoding: utf8 4 | reconnect: false 5 | database: sequreisp_production 6 | pool: 5 7 | username: sequreisp 8 | password: somepassword 9 | socket: /var/run/mysqld/mysqld.sock 10 | -------------------------------------------------------------------------------- /vendor/plugins/engines/test/app/views/notify_mail/signup.text.plain.erb: -------------------------------------------------------------------------------- 1 | Signup template from application 2 | 3 | Here's a local variable set in the Mail object: <%= @name %>. 4 | 5 | And here's a method called in a mail helper: <%= do_something_helpful(@name) %> 6 | -------------------------------------------------------------------------------- /app/views/providers/new.html.erb: -------------------------------------------------------------------------------- 1 | <% content_for :title, t('actions.new', :model => Provider.human_name) %> 2 | <% heading t('actions.new', :model => Provider.human_name) %> 3 | 4 | <%= render :partial => "shared/empty_submenu" %> 5 | 6 | <%= render @provider %> 7 | 8 | -------------------------------------------------------------------------------- /public/javascripts/main.js: -------------------------------------------------------------------------------- 1 | /*$(function(){ 2 | $.easy.navigation(); 3 | $.easy.tooltip(); 4 | $.easy.popup(); 5 | $.easy.external(); 6 | $.easy.rotate(); 7 | $.easy.cycle(); 8 | $.easy.forms(); 9 | $.easy.showhide(); 10 | $.easy.jump(); 11 | });*/ 12 | -------------------------------------------------------------------------------- /app/views/interfaces/new.html.erb: -------------------------------------------------------------------------------- 1 | <% content_for :title, t('actions.new', :model => Interface.human_name) %> 2 | <% heading t('actions.new', :model => Interface.human_name) %> 3 | 4 | <%= render :partial => "shared/empty_submenu" %> 5 | 6 | <%= render @interface %> 7 | 8 | -------------------------------------------------------------------------------- /db/migrate/20100226205134_add_state_to_provider.rb: -------------------------------------------------------------------------------- 1 | class AddStateToProvider < ActiveRecord::Migration 2 | def self.up 3 | add_column :providers, :state, :string 4 | end 5 | 6 | def self.down 7 | remove_column :providers, :state 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20100817193307_add_kind_to_interface.rb: -------------------------------------------------------------------------------- 1 | class AddKindToInterface < ActiveRecord::Migration 2 | def self.up 3 | add_column :interfaces, :kind, :string 4 | end 5 | 6 | def self.down 7 | remove_column :interfaces, :kind 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20131011135123_add_attr_free_in_model_drive.rb: -------------------------------------------------------------------------------- 1 | class AddAttrFreeInModelDrive < ActiveRecord::Migration 2 | def self.up 3 | add_column :disks, :free, :boolean 4 | end 5 | 6 | def self.down 7 | remove_column :disks, :free 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /vendor/plugins/engines/test/plugins/test_routing/config/routes.rb: -------------------------------------------------------------------------------- 1 | ActionController::Routing::Routes.draw do |map| 2 | map.connect 'routes/:action', :controller => "test_routing" 3 | map.plugin_route 'somespace/routes/:action', :controller => "namespace/test_routing" 4 | end -------------------------------------------------------------------------------- /db/migrate/20100411152259_remove_periodicity_from_plan.rb: -------------------------------------------------------------------------------- 1 | class RemovePeriodicityFromPlan < ActiveRecord::Migration 2 | def self.up 3 | remove_column :plans, :periodicity 4 | end 5 | 6 | def self.down 7 | add_column :plans, :periodicity, :integer 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20100827160630_add_proxy_arp_to_contract.rb: -------------------------------------------------------------------------------- 1 | class AddProxyArpToContract < ActiveRecord::Migration 2 | def self.up 3 | add_column :contracts, :proxy_arp, :boolean 4 | end 5 | 6 | def self.down 7 | remove_column :contracts, :proxy_arp 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20130124150324_add_start_date_to_contract.rb: -------------------------------------------------------------------------------- 1 | class AddStartDateToContract < ActiveRecord::Migration 2 | def self.up 3 | add_column :contracts, :start_date, :date 4 | end 5 | 6 | def self.down 7 | remove_column :contracts, :start_date 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20131009141508_add_attr_raid_in_model_drive.rb: -------------------------------------------------------------------------------- 1 | class AddAttrRaidInModelDrive < ActiveRecord::Migration 2 | def self.up 3 | add_column :disks, :raid, :string, :default => nil 4 | end 5 | 6 | def self.down 7 | remove_column :disks, :raid 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /vendor/plugins/validation_reflection/about.yml: -------------------------------------------------------------------------------- 1 | author: Michael Schuerig 2 | summary: Reflection on validations 3 | homepage: http://rubyforge.org/projects/valirefl/validation_reflection/trunk 4 | plugin: validation_reflection 5 | license: MIT 6 | version: 0.3.1 7 | rails_version: >= 1.1.6 8 | -------------------------------------------------------------------------------- /app/views/provider_groups/new.html.erb: -------------------------------------------------------------------------------- 1 | <% content_for :title, t('actions.new', :model => ProviderGroup.human_name) %> 2 | <% heading t('actions.new', :model => ProviderGroup.human_name) %> 3 | 4 | <%= render :partial => "shared/empty_submenu" %> 5 | 6 | <%= render @provider_group %> 7 | 8 | -------------------------------------------------------------------------------- /db/migrate/20100728200658_add_online_to_provider.rb: -------------------------------------------------------------------------------- 1 | class AddOnlineToProvider < ActiveRecord::Migration 2 | def self.up 3 | add_column :providers, :online, :boolean, :default => false 4 | end 5 | 6 | def self.down 7 | remove_column :providers, :online 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20100816171623_add_state_to_provider_group.rb: -------------------------------------------------------------------------------- 1 | class AddStateToProviderGroup < ActiveRecord::Migration 2 | def self.up 3 | add_column :provider_groups, :state, :string 4 | end 5 | 6 | def self.down 7 | remove_column :provider_groups, :state 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20110629195819_add_description_to_interface.rb: -------------------------------------------------------------------------------- 1 | class AddDescriptionToInterface < ActiveRecord::Migration 2 | def self.up 3 | add_column :interfaces, :description, :string 4 | end 5 | 6 | def self.down 7 | remove_column :interfaces, :description 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20131108160333_add_prepare_disk_for_to_disk.rb: -------------------------------------------------------------------------------- 1 | class AddPrepareDiskForToDisk < ActiveRecord::Migration 2 | def self.up 3 | add_column :disks, :prepare_disk_for, :string 4 | end 5 | 6 | def self.down 7 | remove_column :disks, :prepare_disk_for 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /lib/generators/sequreisp_plugin/templates/READE: -------------------------------------------------------------------------------- 1 | Sequreisp<%= name.camelize %> 2 | ============== 3 | 4 | Introduction goes here. 5 | 6 | 7 | Example 8 | ======= 9 | 10 | Example goes here. 11 | 12 | 13 | Copyright (c) 2011 [name of plugin creator], released under the MIT license 14 | -------------------------------------------------------------------------------- /lib/generators/sequreisp_plugin/templates/README: -------------------------------------------------------------------------------- 1 | Sequreisp<%= name.camelize %> 2 | ============== 3 | 4 | Introduction goes here. 5 | 6 | 7 | Example 8 | ======= 9 | 10 | Example goes here. 11 | 12 | 13 | Copyright (c) 2011 [name of plugin creator], released under the MIT license 14 | -------------------------------------------------------------------------------- /app/views/contracts/new.html.erb: -------------------------------------------------------------------------------- 1 | <% content_for :title, t('actions.new', :model => Contract.human_name) %> 2 | <% heading t('actions.new', :model => Contract.human_name) %> 3 | 4 | <%= render :partial => "shared/empty_submenu", :locals => {:model => :contract} %> 5 | 6 | <%= render @contract %> 7 | 8 | -------------------------------------------------------------------------------- /app/views/shared/_create_new_button.html.erb: -------------------------------------------------------------------------------- 1 | <% content_for :heading do %> 2 |
    3 | <% link_to path, :class => "button crear_nuevo" do %> 4 | 5 | <%= t('buttons.create_new') %> 6 | 7 | <% end %> 8 |
    9 | <% end %> -------------------------------------------------------------------------------- /db/migrate/20110401173735_add_language_to_configuration.rb: -------------------------------------------------------------------------------- 1 | class AddLanguageToConfiguration < ActiveRecord::Migration 2 | def self.up 3 | add_column :configurations, :language, :string 4 | end 5 | 6 | def self.down 7 | remove_column :configurations, :language 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /vendor/plugins/engines/test/plugins/alpha_plugin/lib/app_and_plugin_lib_model.rb: -------------------------------------------------------------------------------- 1 | class AppAndPluginLibModel < ActiveRecord::Base 2 | def self.report_location; TestHelper::report_location(__FILE__); end 3 | 4 | def defined_only_in_alpha_plugin_version 5 | # should not be defined 6 | end 7 | end -------------------------------------------------------------------------------- /app/views/avoid_balancing_hosts/new.html.erb: -------------------------------------------------------------------------------- 1 | <% content_for :title, t('actions.new', :model => AvoidBalancingHost.human_name) %> 2 | <% heading t('actions.new', :model => AvoidBalancingHost.human_name) %> 3 | 4 | <%= render :partial => "shared/empty_submenu" %> 5 | 6 | <%= render @avoid_balancing_host %> 7 | -------------------------------------------------------------------------------- /db/migrate/20100818145133_add_reload_to_configuration.rb: -------------------------------------------------------------------------------- 1 | class AddReloadToConfiguration < ActiveRecord::Migration 2 | def self.up 3 | add_column :configurations, :daemon_reload, :boolean 4 | end 5 | 6 | def self.down 7 | remove_column :configurations, :daemon_reload 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20100914203454_add_arp_filter_to_provider.rb: -------------------------------------------------------------------------------- 1 | class AddArpFilterToProvider < ActiveRecord::Migration 2 | def self.up 3 | add_column :providers, :arp_filter, :boolean, :default => true 4 | end 5 | 6 | def self.down 7 | remove_column :providers, :arp_filter 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20110513134624_add_use_in_nat_pool_to_address.rb: -------------------------------------------------------------------------------- 1 | class AddUseInNatPoolToAddress < ActiveRecord::Migration 2 | def self.up 3 | add_column :addresses, :use_in_nat_pool, :boolean 4 | end 5 | 6 | def self.down 7 | remove_column :addresses, :use_in_nat_pool 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /vendor/plugins/engines/test/lib/render_information.rb: -------------------------------------------------------------------------------- 1 | module RenderInformation 2 | def render_class_and_action(note = nil, options={}) 3 | text = "rendered in #{self.class.name}##{params[:action]}" 4 | text += " (#{note})" unless note.nil? 5 | render options.update(:text => text) 6 | end 7 | end -------------------------------------------------------------------------------- /db/migrate/20100914485127_remove_forward_ports_from_contract.rb: -------------------------------------------------------------------------------- 1 | class RemoveForwardPortsFromContract < ActiveRecord::Migration 2 | def self.up 3 | remove_column :contracts, :forward_ports 4 | end 5 | 6 | def self.down 7 | add_column :contracts, :forward_ports, :string 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20110301192148_add_language_id_to_configuration.rb: -------------------------------------------------------------------------------- 1 | class AddLanguageIdToConfiguration < ActiveRecord::Migration 2 | def self.up 3 | add_column :configurations, :language_id, :integer 4 | end 5 | 6 | def self.down 7 | remove_column :configurations, :language_id 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20110729202546_remove_charge_in_advance_from_plans.rb: -------------------------------------------------------------------------------- 1 | class RemoveChargeInAdvanceFromPlans < ActiveRecord::Migration 2 | def self.up 3 | remove_column :plans, :charge_in_advance 4 | end 5 | 6 | def self.down 7 | add_column :plans, :charge_in_advance, :boolean 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20130318140727_add_default_value_address_client.rb: -------------------------------------------------------------------------------- 1 | class AddDefaultValueAddressClient < ActiveRecord::Migration 2 | def self.up 3 | change_column_default :clients, :address, "" 4 | end 5 | 6 | def self.down 7 | change_column_default :clients, :address, nil 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20131015135729_add_attr_partitioned_in_model_disk.rb: -------------------------------------------------------------------------------- 1 | class AddAttrPartitionedInModelDisk < ActiveRecord::Migration 2 | def self.up 3 | add_column :disks, :partitioned, :boolean, :default => false 4 | end 5 | 6 | def self.down 7 | remove_column :disks, :partitioned 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /vendor/plugins/engines/test/plugins/alpha_plugin/app/controllers/alpha_plugin_controller.rb: -------------------------------------------------------------------------------- 1 | class AlphaPluginController < ApplicationController 2 | def an_action 3 | render_class_and_action 4 | end 5 | def action_with_layout 6 | render_class_and_action(nil, :layout => "plugin_layout") 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /vendor/plugins/engines/test/plugins/test_migration/db/migrate/001_create_tests.rb: -------------------------------------------------------------------------------- 1 | class CreateTests < ActiveRecord::Migration 2 | def self.up 3 | create_table 'tests' do |t| 4 | t.column 'name', :string 5 | end 6 | end 7 | 8 | def self.down 9 | drop_table 'tests' 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /db/migrate/20110125153906_add_charge_in_advance_to_plan.rb: -------------------------------------------------------------------------------- 1 | class AddChargeInAdvanceToPlan < ActiveRecord::Migration 2 | def self.up 3 | add_column :plans, :charge_in_advance, :boolean, :default => false 4 | end 5 | 6 | def self.down 7 | remove_column :plans, :charge_in_advance 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20110401173545_remove_language_id_from_configuration.rb: -------------------------------------------------------------------------------- 1 | class RemoveLanguageIdFromConfiguration < ActiveRecord::Migration 2 | def self.up 3 | remove_column :configurations, :language_id 4 | end 5 | 6 | def self.down 7 | add_column :configurations, :language_id, :integer 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20110628183800_add_unique_provider_id_to_contract.rb: -------------------------------------------------------------------------------- 1 | class AddUniqueProviderIdToContract < ActiveRecord::Migration 2 | def self.up 3 | add_column :contracts, :unique_provider_id, :integer 4 | end 5 | 6 | def self.down 7 | remove_column :contracts, :unique_provider_id 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20120705172526_add_avoid_nat_addresses_to_provider.rb: -------------------------------------------------------------------------------- 1 | class AddAvoidNatAddressesToProvider < ActiveRecord::Migration 2 | def self.up 3 | add_column :providers, :avoid_nat_addresses, :text 4 | end 5 | 6 | def self.down 7 | remove_column :providers, :avoid_nat_addresses 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /vendor/plugins/engines/test/plugins/test_migration/db/migrate/002_create_others.rb: -------------------------------------------------------------------------------- 1 | class CreateOthers < ActiveRecord::Migration 2 | def self.up 3 | create_table 'others' do |t| 4 | t.column 'name', :string 5 | end 6 | end 7 | 8 | def self.down 9 | drop_table 'others' 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /vendor/plugins/engines/test/plugins/test_migration/db/migrate/003_create_extras.rb: -------------------------------------------------------------------------------- 1 | class CreateExtras < ActiveRecord::Migration 2 | def self.up 3 | create_table 'extras' do |t| 4 | t.column 'name', :string 5 | end 6 | end 7 | 8 | def self.down 9 | drop_table 'extras' 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /db/migrate/20101220154541_add_physical_link_to_interface.rb: -------------------------------------------------------------------------------- 1 | class AddPhysicalLinkToInterface < ActiveRecord::Migration 2 | def self.up 3 | add_column :interfaces, :physical_link, :boolean, :default => false 4 | end 5 | 6 | def self.down 7 | remove_column :interfaces, :physical_link 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20110208172546_add_external_client_number_to_client.rb: -------------------------------------------------------------------------------- 1 | class AddExternalClientNumberToClient < ActiveRecord::Migration 2 | def self.up 3 | add_column :clients, :external_client_number, :integer 4 | end 5 | 6 | def self.down 7 | remove_column :clients, :external_client_number 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20131129125615_remove_column_prepare_disk_for_in_model_disk.rb: -------------------------------------------------------------------------------- 1 | class RemoveColumnPrepareDiskForInModelDisk < ActiveRecord::Migration 2 | def self.up 3 | remove_column :disks, :prepare_disk_for 4 | end 5 | 6 | def self.down 7 | add_column :disks, :prepare_disk_for, :string 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20100910215515_remove_interface_id_from_provider_group.rb: -------------------------------------------------------------------------------- 1 | class RemoveInterfaceIdFromProviderGroup < ActiveRecord::Migration 2 | def self.up 3 | remove_column :provider_groups, :interface_id 4 | end 5 | 6 | def self.down 7 | add_column :provider_groups, :interface_id, :integer 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20101216193104_add_time_zone_to_configuration.rb: -------------------------------------------------------------------------------- 1 | class AddTimeZoneToConfiguration < ActiveRecord::Migration 2 | def self.up 3 | add_column :configurations, :time_zone, :string, :default => "Buenos Aires" 4 | end 5 | 6 | def self.down 7 | remove_column :configurations, :time_zone 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20130927143548_add_mount_cache_in_configuration.rb: -------------------------------------------------------------------------------- 1 | class AddMountCacheInConfiguration < ActiveRecord::Migration 2 | def self.up 3 | add_column :configurations, :mount_cache, :boolean, :default => false 4 | end 5 | 6 | def self.down 7 | remove_column :configurations, :mount_cache 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20131025162342_add_attr_clean_partition_in_model_disk.rb: -------------------------------------------------------------------------------- 1 | class AddAttrCleanPartitionInModelDisk < ActiveRecord::Migration 2 | def self.up 3 | add_column :disks, :clean_partition, :boolean, :default => true 4 | end 5 | 6 | def self.down 7 | remove_column :disks, :clean_partition 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /vendor/plugins/engines/lib/engines/plugin/loader.rb: -------------------------------------------------------------------------------- 1 | module Engines 2 | class Plugin 3 | class Loader < Rails::Plugin::Loader 4 | protected 5 | def register_plugin_as_loaded(plugin) 6 | super plugin 7 | Engines.plugins << plugin 8 | end 9 | end 10 | end 11 | end -------------------------------------------------------------------------------- /vendor/plugins/engines/test/plugins/test_routing/app/controllers/test_routing_controller.rb: -------------------------------------------------------------------------------- 1 | class TestRoutingController < ApplicationController 2 | def routed_action 3 | render_class_and_action 4 | end 5 | 6 | def test_named_routes_from_plugin 7 | render :text => plugin_route_path(:action => "index") 8 | end 9 | end -------------------------------------------------------------------------------- /vendor/plugins/engines/test/unit/test_testing/override_test.rb: -------------------------------------------------------------------------------- 1 | require File.join(File.dirname(__FILE__), *%w[.. .. test_helper]) 2 | 3 | class OverrideTest < ActiveSupport::TestCase 4 | def test_overrides_from_the_application_should_work 5 | assert true, "overriding plugin tests from the application should work" 6 | end 7 | end -------------------------------------------------------------------------------- /db/migrate/20100909152817_add_proxy_arp_interface_id_to_contract.rb: -------------------------------------------------------------------------------- 1 | class AddProxyArpInterfaceIdToContract < ActiveRecord::Migration 2 | def self.up 3 | add_column :contracts, :proxy_arp_interface_id, :integer 4 | end 5 | 6 | def self.down 7 | remove_column :contracts, :proxy_arp_interface_id 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20110203124848_add_notification_flag_to_provider.rb: -------------------------------------------------------------------------------- 1 | class AddNotificationFlagToProvider < ActiveRecord::Migration 2 | def self.up 3 | add_column :providers, :notification_flag, :boolean, :default => false 4 | end 5 | 6 | def self.down 7 | remove_column :providers, :notification_flag 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20130801140054_add_allow_dns_queries_to_provider.rb: -------------------------------------------------------------------------------- 1 | class AddAllowDnsQueriesToProvider < ActiveRecord::Migration 2 | def self.up 3 | add_column :providers, :allow_dns_queries, :boolean, :default => false 4 | end 5 | 6 | def self.down 7 | remove_column :providers, :allow_dns_queries 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20140102133120_add_attr_is_connected_in_model_contract.rb: -------------------------------------------------------------------------------- 1 | class AddAttrIsConnectedInModelContract < ActiveRecord::Migration 2 | def self.up 3 | add_column :contracts, :is_connected, :boolean, :default => false 4 | end 5 | 6 | def self.down 7 | remove_column :contracts, :is_connected 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20100716202915_create_klasses.rb: -------------------------------------------------------------------------------- 1 | class CreateKlasses < ActiveRecord::Migration 2 | def self.up 3 | create_table :klasses do |t| 4 | t.integer :contract_id 5 | t.integer :number 6 | 7 | t.timestamps 8 | end 9 | end 10 | 11 | def self.down 12 | drop_table :klasses 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /db/migrate/20100802202634_add_unique_mac_address_to_provider.rb: -------------------------------------------------------------------------------- 1 | class AddUniqueMacAddressToProvider < ActiveRecord::Migration 2 | def self.up 3 | add_column :providers, :unique_mac_address, :boolean, :default => false 4 | end 5 | 6 | def self.down 7 | remove_column :providers, :unique_mac_address 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20100819131324_add_notification_email_to_configuration.rb: -------------------------------------------------------------------------------- 1 | class AddNotificationEmailToConfiguration < ActiveRecord::Migration 2 | def self.up 3 | add_column :configurations, :notification_email, :string 4 | end 5 | 6 | def self.down 7 | remove_column :configurations, :notification_email 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20110228210823_create_languages.rb: -------------------------------------------------------------------------------- 1 | class CreateLanguages < ActiveRecord::Migration 2 | def self.up 3 | create_table :languages do |t| 4 | t.string :name 5 | t.string :short_name 6 | 7 | t.timestamps 8 | end 9 | end 10 | 11 | def self.down 12 | drop_table :languages 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /db/migrate/20110405153829_drop_languages.rb: -------------------------------------------------------------------------------- 1 | class DropLanguages < ActiveRecord::Migration 2 | def self.up 3 | drop_table :languages 4 | end 5 | 6 | def self.down 7 | create_table :languages do |t| 8 | t.string :name 9 | t.string :short_name 10 | 11 | t.timestamps 12 | end 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /vendor/plugins/engines/lib/engines/plugin/locator.rb: -------------------------------------------------------------------------------- 1 | module Engines 2 | class Plugin 3 | class FileSystemLocator < Rails::Plugin::FileSystemLocator 4 | def create_plugin(path) 5 | plugin = Engines::Plugin.new(path) 6 | plugin.valid? ? plugin : nil 7 | end 8 | end 9 | end 10 | end 11 | 12 | -------------------------------------------------------------------------------- /vendor/plugins/engines/test/plugins/alpha_plugin/app/models/app_and_plugin_model.rb: -------------------------------------------------------------------------------- 1 | class AppAndPluginModel < ActiveRecord::Base 2 | def self.report_location; TestHelper::report_location(__FILE__); end 3 | 4 | def defined_only_in_alpha_plugin_version 5 | # should not be defined as the model in app/models takes precedence 6 | end 7 | end -------------------------------------------------------------------------------- /db/migrate/20120509192016_add_dhcp_force32_netmask_to_provider.rb: -------------------------------------------------------------------------------- 1 | class AddDhcpForce32NetmaskToProvider < ActiveRecord::Migration 2 | def self.up 3 | add_column :providers, :dhcp_force_32_netmask, :boolean, :default => true 4 | end 5 | 6 | def self.down 7 | remove_column :providers, :dhcp_force_32_netmask 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20101119215044_add_logged_in_timeout_to_configuration.rb: -------------------------------------------------------------------------------- 1 | class AddLoggedInTimeoutToConfiguration < ActiveRecord::Migration 2 | def self.up 3 | add_column :configurations, :logged_in_timeout, :integer, :default => 300 4 | end 5 | 6 | def self.down 7 | remove_column :configurations, :logged_in_timeout 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20110121155848_add_clamp_mss_to_pmtu_to_configuration.rb: -------------------------------------------------------------------------------- 1 | class AddClampMssToPmtuToConfiguration < ActiveRecord::Migration 2 | def self.up 3 | add_column :configurations, :clamp_mss_to_pmtu, :boolean, :default => true 4 | end 5 | 6 | def self.down 7 | remove_column :configurations, :clamp_mss_to_pmtu 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20110627202649_add_use_global_prios_to_configuration.rb: -------------------------------------------------------------------------------- 1 | class AddUseGlobalPriosToConfiguration < ActiveRecord::Migration 2 | def self.up 3 | add_column :configurations, :use_global_prios, :boolean, :default => false 4 | end 5 | 6 | def self.down 7 | remove_column :configurations, :use_global_prios 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20110706142311_add_changes_to_apply_to_configuration.rb: -------------------------------------------------------------------------------- 1 | class AddChangesToApplyToConfiguration < ActiveRecord::Migration 2 | def self.up 3 | add_column :configurations, :changes_to_apply, :boolean, :default => false 4 | end 5 | 6 | def self.down 7 | remove_column :configurations, :changes_to_apply 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20101015195759_add_role_name_to_user.rb: -------------------------------------------------------------------------------- 1 | class AddRoleNameToUser < ActiveRecord::Migration 2 | def self.up 3 | add_column :users, :role_name, :string 4 | User.reset_column_information 5 | User.update_all(:role_name => "admin") 6 | end 7 | 8 | def self.down 9 | remove_column :users, :role_name 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /db/migrate/20110304190603_add_last_changes_applied_at_to_configurations.rb: -------------------------------------------------------------------------------- 1 | class AddLastChangesAppliedAtToConfigurations < ActiveRecord::Migration 2 | def self.up 3 | add_column :configurations, :last_changes_applied_at, :timestamp 4 | end 5 | 6 | def self.down 7 | remove_column :configurations, :last_changes_applied_at 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20111031190332_add_ip_unique_index_to_contract.rb: -------------------------------------------------------------------------------- 1 | class AddIpUniqueIndexToContract < ActiveRecord::Migration 2 | def self.up 3 | remove_index :contracts, :ip 4 | add_index :contracts, :ip, :unique => true 5 | end 6 | 7 | def self.down 8 | remove_index :contracts, :ip 9 | add_index :contracts, :ip 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /db/migrate/20130603154843_add_national_identification_number_to_client.rb: -------------------------------------------------------------------------------- 1 | class AddNationalIdentificationNumberToClient < ActiveRecord::Migration 2 | def self.up 3 | add_column :clients, :national_identification_number, :integer 4 | end 5 | 6 | def self.down 7 | remove_column :clients, :national_identification_number 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20131129124342_add_column_prepare_disk_for_cache_in_model_disk.rb: -------------------------------------------------------------------------------- 1 | class AddColumnPrepareDiskForCacheInModelDisk < ActiveRecord::Migration 2 | def self.up 3 | add_column :disks, :prepare_disk_for_cache, :boolean, :default => false 4 | end 5 | 6 | def self.down 7 | remove_column :disks, :prepare_disk_for_cache 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /vendor/plugins/engines/test/plugins/test_assets/app/views/assets/index.html.erb: -------------------------------------------------------------------------------- 1 | <%= image_tag 'image.png', :plugin => 'test_assets' %> 2 | <%= javascript_include_tag 'file.1.js', 'file2', :plugin => "test_assets" %> 3 | <%= stylesheet_link_tag 'file.1.css', 'file2', :plugin => "test_assets" %> 4 | <%= image_submit_tag 'image.png', :plugin => "test_assets" %> 5 | -------------------------------------------------------------------------------- /vendor/plugins/engines/test/unit/backwards_compat_test.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../test_helper' 2 | 3 | class BackwardsCompatibilityTest < Test::Unit::TestCase 4 | def test_rails_module_plugin_method_should_delegate_to_engines_plugins 5 | assert_nothing_raised { Rails.plugins } 6 | assert_equal Engines.plugins, Rails.plugins 7 | end 8 | end -------------------------------------------------------------------------------- /db/migrate/20110314185143_change_external_client_number_to_string_in_clients.rb: -------------------------------------------------------------------------------- 1 | class ChangeExternalClientNumberToStringInClients < ActiveRecord::Migration 2 | def self.up 3 | change_column :clients, :external_client_number, :string 4 | end 5 | 6 | def self.down 7 | change_column :clients, :external_client_number, :integer 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20091020163013_create_provider_groups.rb: -------------------------------------------------------------------------------- 1 | class CreateProviderGroups < ActiveRecord::Migration 2 | def self.up 3 | create_table :provider_groups do |t| 4 | t.string :name 5 | t.integer :interface_id 6 | 7 | t.timestamps 8 | end 9 | end 10 | 11 | def self.down 12 | drop_table :provider_groups 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /db/migrate/20101215200016_add_filter_by_mac_address_to_configuration.rb: -------------------------------------------------------------------------------- 1 | class AddFilterByMacAddressToConfiguration < ActiveRecord::Migration 2 | def self.up 3 | add_column :configurations, :filter_by_mac_address, :boolean, :default => true 4 | end 5 | 6 | def self.down 7 | remove_column :configurations, :filter_by_mac_address 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20110202151450_add_notification_timeframe_to_configuration.rb: -------------------------------------------------------------------------------- 1 | class AddNotificationTimeframeToConfiguration < ActiveRecord::Migration 2 | def self.up 3 | add_column :configurations, :notification_timeframe, :integer, :default => 60 4 | end 5 | 6 | def self.down 7 | remove_column :configurations, :notification_timeframe 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20110705203119_add_shape_rate_down_on_ingress_to_provider.rb: -------------------------------------------------------------------------------- 1 | class AddShapeRateDownOnIngressToProvider < ActiveRecord::Migration 2 | def self.up 3 | add_column :providers, :shape_rate_down_on_ingress, :boolean, :default => false 4 | end 5 | 6 | def self.down 7 | remove_column :providers, :shape_rate_down_on_ingress 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20120418143018_create_avoid_proxy_hosts.rb: -------------------------------------------------------------------------------- 1 | class CreateAvoidProxyHosts < ActiveRecord::Migration 2 | def self.up 3 | create_table :avoid_proxy_hosts do |t| 4 | t.string :name 5 | t.string :detail 6 | 7 | t.timestamps 8 | end 9 | end 10 | 11 | def self.down 12 | drop_table :avoid_proxy_hosts 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /config/sequreisp_config_production.yml: -------------------------------------------------------------------------------- 1 | base_dir: "/opt/sequreisp" 2 | deploy_dir: "/opt/sequreisp/deploy/current" 3 | ppp_dir: "/etc/ppp" 4 | dhcpd_dir: "/etc/dhcp3" 5 | pingable_servers: "198.41.0.4 192.228.79.201 192.33.4.12 128.8.10.90 192.5.5.241 192.36.148.17" 6 | ifb_up: "ifb0" 7 | ifb_down: "ifb1" 8 | ifb_ingress: "ifb2" 9 | demo: false 10 | tar_command: "tar" 11 | -------------------------------------------------------------------------------- /db/migrate/20130726141504_create_always_allowed_sites.rb: -------------------------------------------------------------------------------- 1 | class CreateAlwaysAllowedSites < ActiveRecord::Migration 2 | def self.up 3 | create_table :always_allowed_sites do |t| 4 | t.string :name 5 | t.string :detail 6 | t.timestamps 7 | end 8 | end 9 | 10 | def self.down 11 | drop_table :always_allowed_sites 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /db/migrate/20130903123419_change_national_identification_number_to_string.rb: -------------------------------------------------------------------------------- 1 | class ChangeNationalIdentificationNumberToString < ActiveRecord::Migration 2 | def self.up 3 | change_column :clients, :national_identification_number, :string 4 | end 5 | 6 | def self.down 7 | change_column :clients, :national_identification_number, :integer 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /config/sequreisp_config_development.yml: -------------------------------------------------------------------------------- 1 | base_dir: "/tmp/sequreisp" 2 | deploy_dir: "/tmp/sequreisp/deploy/current" 3 | ppp_dir: "/tmp/ppp" 4 | dhcpd_dir: "/tmp/dhcp3" 5 | pingable_servers: "198.41.0.4 192.228.79.201 192.33.4.12 128.8.10.90 192.5.5.241 192.36.148.17" 6 | ifb_up: "ifb0" 7 | ifb_down: "ifb1" 8 | ifb_ingress: "ifb2" 9 | demo: false 10 | tar_command: "tar" 11 | -------------------------------------------------------------------------------- /db/migrate/20100826140304_add_transparent_proxy_n_to_m_to_configuration.rb: -------------------------------------------------------------------------------- 1 | class AddTransparentProxyNToMToConfiguration < ActiveRecord::Migration 2 | def self.up 3 | add_column :configurations, :transparent_proxy_n_to_m, :boolean, :default => false 4 | end 5 | 6 | def self.down 7 | remove_column :configurations, :transparent_proxy_n_to_m 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20110511200225_add_burst_to_plan.rb: -------------------------------------------------------------------------------- 1 | class AddBurstToPlan < ActiveRecord::Migration 2 | def self.up 3 | add_column :plans, :burst_down, :integer, :default => 0 4 | add_column :plans, :burst_up, :integer, :default => 0 5 | end 6 | 7 | def self.down 8 | remove_column :plans, :burst_down 9 | remove_column :plans, :burst_up 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /db/migrate/20110128140115_create_queued_commands.rb: -------------------------------------------------------------------------------- 1 | class CreateQueuedCommands < ActiveRecord::Migration 2 | def self.up 3 | create_table :queued_commands do |t| 4 | t.text :command 5 | t.boolean :executed, :default => false 6 | 7 | t.timestamps 8 | end 9 | end 10 | 11 | def self.down 12 | drop_table :queued_commands 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /db/migrate/20120529152323_add_use_global_prios_strategy_to_configuration.rb: -------------------------------------------------------------------------------- 1 | class AddUseGlobalPriosStrategyToConfiguration < ActiveRecord::Migration 2 | def self.up 3 | add_column :configurations, :use_global_prios_strategy, :string, :default => 'provider' 4 | end 5 | 6 | def self.down 7 | remove_column :configurations, :use_global_prios_strategy 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20100706151507_remove_name_from_configuration.rb: -------------------------------------------------------------------------------- 1 | class RemoveNameFromConfiguration < ActiveRecord::Migration 2 | def self.up 3 | remove_column :configurations, :name 4 | remove_column :configurations, :active 5 | end 6 | 7 | def self.down 8 | add_column :configurations, :name, :string 9 | add_column :configurations, :active, :boolean 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /db/migrate/20130314140343_add_in_client_attribute_taxpayer_identification_number.rb: -------------------------------------------------------------------------------- 1 | class AddInClientAttributeTaxpayerIdentificationNumber < ActiveRecord::Migration 2 | def self.up 3 | add_column :clients, :taxpayer_identification_number, :string, :default => "" 4 | end 5 | 6 | def self.down 7 | remove_column :clients, :taxpayer_identifitacion_number 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20100904151929_add_transparent_proxy_zph_enabled_to_configuration.rb: -------------------------------------------------------------------------------- 1 | class AddTransparentProxyZphEnabledToConfiguration < ActiveRecord::Migration 2 | def self.up 3 | add_column :configurations, :transparent_proxy_zph_enabled, :boolean, :default => true 4 | end 5 | 6 | def self.down 7 | remove_column :configurations, :transparent_proxy_zph_enabled 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /script/autospec: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | gem 'test-unit', '1.2.3' if RUBY_VERSION.to_f >= 1.9 3 | ENV['RSPEC'] = 'true' # allows autotest to discover rspec 4 | ENV['AUTOTEST'] = 'true' # allows autotest to run w/ color on linux 5 | system((RUBY_PLATFORM =~ /mswin|mingw/ ? 'autotest.bat' : 'autotest'), *ARGV) || 6 | $stderr.puts("Unable to find autotest. Please install ZenTest or fix your PATH") 7 | -------------------------------------------------------------------------------- /vendor/plugins/engines/test/unit/plugins_test.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../test_helper' 2 | 3 | class PluginsTest < Test::Unit::TestCase 4 | 5 | def test_should_allow_access_to_plugins_by_strings_or_symbols 6 | p = Engines.plugins["alpha_plugin"] 7 | q = Engines.plugins[:alpha_plugin] 8 | assert_kind_of Engines::Plugin, p 9 | assert_equal p, q 10 | end 11 | end -------------------------------------------------------------------------------- /db/migrate/20120507155144_create_iproutes.rb: -------------------------------------------------------------------------------- 1 | class CreateIproutes < ActiveRecord::Migration 2 | def self.up 3 | create_table :iproutes do |t| 4 | t.string :dst_address 5 | t.string :gateway 6 | t.integer :interface_id 7 | t.string :detail 8 | 9 | t.timestamps 10 | end 11 | end 12 | 13 | def self.down 14 | drop_table :iproutes 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /db/migrate/20131108140741_change_column_name_mount_cache_for_new_disk_for_cache_added.rb: -------------------------------------------------------------------------------- 1 | class ChangeColumnNameMountCacheForNewDiskForCacheAdded < ActiveRecord::Migration 2 | def self.up 3 | rename_column :configurations, :mount_cache, :new_disk_for_cache_added 4 | end 5 | 6 | def self.down 7 | rename_column :configurations, :new_disk_for_cache_added, :mount_cache 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /app/models/traffic.rb: -------------------------------------------------------------------------------- 1 | class Traffic < ActiveRecord::Base 2 | 3 | belongs_to :contract 4 | 5 | named_scope :currents, :conditions => ["from_date <= ? and to_date >= ?", Date.today, Date.today] 6 | 7 | named_scope :for_date, lambda {|date| { :conditions => ["from_date >= ?", date]}} 8 | 9 | named_scope :for_contract, lambda {|id| { :conditions => (["contract_id = ?", id])}} 10 | 11 | end 12 | -------------------------------------------------------------------------------- /db/migrate/20100507203501_create_interfaces.rb: -------------------------------------------------------------------------------- 1 | class CreateInterfaces < ActiveRecord::Migration 2 | def self.up 3 | create_table :interfaces do |t| 4 | t.string :name 5 | t.boolean :vlan 6 | t.string :vlan_id 7 | t.integer :vlan_interface_id 8 | 9 | t.timestamps 10 | end 11 | end 12 | 13 | def self.down 14 | drop_table :interfaces 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /db/migrate/20100729160717_create_provider_klasses.rb: -------------------------------------------------------------------------------- 1 | class CreateProviderKlasses < ActiveRecord::Migration 2 | def self.up 3 | create_table :provider_klasses do |t| 4 | t.integer :number 5 | t.integer :klassable_id 6 | t.string :klassable_type 7 | 8 | t.timestamps 9 | end 10 | end 11 | 12 | def self.down 13 | drop_table :provider_klasses 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /db/migrate/20100817194905_create_addresses.rb: -------------------------------------------------------------------------------- 1 | class CreateAddresses < ActiveRecord::Migration 2 | def self.up 3 | create_table :addresses do |t| 4 | t.integer :addressable_id 5 | t.string :addressable_type 6 | t.string :ip 7 | t.string :netmask 8 | 9 | t.timestamps 10 | end 11 | end 12 | 13 | def self.down 14 | drop_table :addresses 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /db/migrate/20101104220301_add_tc_contracts_per_provider_in_lan_to_configuration.rb: -------------------------------------------------------------------------------- 1 | class AddTcContractsPerProviderInLanToConfiguration < ActiveRecord::Migration 2 | def self.up 3 | add_column :configurations, :tc_contracts_per_provider_in_lan, :boolean, :default => false 4 | end 5 | 6 | def self.down 7 | remove_column :configurations, :tc_contracts_per_provider_in_lan 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20101125122744_add_tc_contracts_per_provider_in_wan_to_configuration.rb: -------------------------------------------------------------------------------- 1 | class AddTcContractsPerProviderInWanToConfiguration < ActiveRecord::Migration 2 | def self.up 3 | add_column :configurations, :tc_contracts_per_provider_in_wan, :boolean, :default => false 4 | end 5 | 6 | def self.down 7 | remove_column :configurations, :tc_contracts_per_provider_in_wan 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20130226135252_add_attribute_use_external_number_client_in_configuration.rb: -------------------------------------------------------------------------------- 1 | class AddAttributeUseExternalNumberClientInConfiguration < ActiveRecord::Migration 2 | def self.up 3 | add_column :configurations, :use_external_number_client, :boolean, :default => false 4 | end 5 | 6 | def self.down 7 | remove_column :configurations, :use_external_number_client 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20100902202704_add_public_address_id_to_contract.rb: -------------------------------------------------------------------------------- 1 | class AddPublicAddressIdToContract < ActiveRecord::Migration 2 | def self.up 3 | add_column :contracts, :public_address_id, :integer 4 | remove_column :contracts, :public_ip 5 | end 6 | 7 | def self.down 8 | add_column :contracts, :public_ip, :string 9 | remove_column :contracts, :public_address_id 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /db/migrate/20110901192910_add_transparent_proxy_max_load_average_to_configuration.rb: -------------------------------------------------------------------------------- 1 | class AddTransparentProxyMaxLoadAverageToConfiguration < ActiveRecord::Migration 2 | def self.up 3 | add_column :configurations, :transparent_proxy_max_load_average, :integer, :default => 20 4 | end 5 | 6 | def self.down 7 | remove_column :configurations, :transparent_proxy_max_load_average 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /lib/comma_separated_array.rb: -------------------------------------------------------------------------------- 1 | module CommaSeparatedArray 2 | 3 | def self.included(base) 4 | base.send(:extend, ClassMethods) 5 | end 6 | module ClassMethods 7 | def comma_separated_array_field(*fields) 8 | fields.each do |field| 9 | define_method field.to_s + '_array' do 10 | self[field].to_s.split(",") 11 | end 12 | end 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /db/migrate/20110201134009_create_prohibited_forward_ports.rb: -------------------------------------------------------------------------------- 1 | class CreateProhibitedForwardPorts < ActiveRecord::Migration 2 | def self.up 3 | create_table :prohibited_forward_ports do |t| 4 | t.integer :port 5 | t.boolean :tcp 6 | t.boolean :udp 7 | 8 | t.timestamps 9 | end 10 | end 11 | 12 | def self.down 13 | drop_table :prohibited_forward_ports 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /db/migrate/20110203161220_add_online_changed_at_to_providers.rb: -------------------------------------------------------------------------------- 1 | class AddOnlineChangedAtToProviders < ActiveRecord::Migration 2 | def self.up 3 | add_column :providers, :online_changed_at, :timestamp 4 | Provider.update_all({:online_changed_at => DateTime.now.utc }, "online_changed_at is NULL") 5 | end 6 | 7 | def self.down 8 | remove_column :providers, :online_changed_at 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /db/migrate/20120417125953_create_avoid_balancing_hosts.rb: -------------------------------------------------------------------------------- 1 | class CreateAvoidBalancingHosts < ActiveRecord::Migration 2 | def self.up 3 | create_table :avoid_balancing_hosts do |t| 4 | t.string :name 5 | t.integer :provider_id 6 | t.string :detail 7 | 8 | t.timestamps 9 | end 10 | end 11 | 12 | def self.down 13 | drop_table :avoid_balancing_hosts 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /db/migrate/20130925115932_create_disks.rb: -------------------------------------------------------------------------------- 1 | class CreateDisks < ActiveRecord::Migration 2 | def self.up 3 | create_table :disks do |t| 4 | t.string :name 5 | t.string :capacity 6 | t.boolean :system, :default => false 7 | t.boolean :cache, :default => false 8 | 9 | t.timestamps 10 | end 11 | end 12 | 13 | def self.down 14 | drop_table :disks 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /db/migrate/20100802204228_add_arp_vars_to_provider.rb: -------------------------------------------------------------------------------- 1 | class AddArpVarsToProvider < ActiveRecord::Migration 2 | def self.up 3 | add_column :providers, :arp_ignore, :boolean, :default => true 4 | add_column :providers, :arp_announce, :boolean, :default => true 5 | end 6 | 7 | def self.down 8 | remove_column :providers, :arp_announce 9 | remove_column :providers, :arp_ignore 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /vendor/plugins/engines/about.yml: -------------------------------------------------------------------------------- 1 | author: James Adam 2 | email: james.adam@gmail.com 3 | homepage: http://www.rails-engines.org 4 | summary: Enhances the plugin mechanism to perform more flexible sharing 5 | description: The Rails Engines plugin allows the sharing of almost any type of code or asset that you could use in a Rails application, including controllers, models, stylesheets, and views. 6 | license: MIT 7 | version: 2.3.2 -------------------------------------------------------------------------------- /db/migrate/20110905135251_add_transparent_proxy_windows_update_hack_to_configuration.rb: -------------------------------------------------------------------------------- 1 | class AddTransparentProxyWindowsUpdateHackToConfiguration < ActiveRecord::Migration 2 | def self.up 3 | add_column :configurations, :transparent_proxy_windows_update_hack, :boolean, :default => false 4 | end 5 | 6 | def self.down 7 | remove_column :configurations, :transparent_proxy_windows_update_hack 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /app/views/layouts/partials/_header.html.erb: -------------------------------------------------------------------------------- 1 | 9 | 10 | 16 | -------------------------------------------------------------------------------- /db/migrate/20091020160916_create_clients.rb: -------------------------------------------------------------------------------- 1 | class CreateClients < ActiveRecord::Migration 2 | def self.up 3 | create_table :clients do |t| 4 | t.string :name 5 | t.string :email 6 | t.string :phone 7 | t.string :phone_mobile 8 | t.string :address 9 | t.text :details 10 | 11 | t.timestamps 12 | end 13 | end 14 | 15 | def self.down 16 | drop_table :clients 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /db/migrate/20110512192151_add_long_download_upload_max_to_plan.rb: -------------------------------------------------------------------------------- 1 | class AddLongDownloadUploadMaxToPlan < ActiveRecord::Migration 2 | def self.up 3 | add_column :plans, :long_download_max, :integer, :default => 0 4 | add_column :plans, :long_upload_max, :integer, :default => 0 5 | end 6 | 7 | def self.down 8 | remove_column :plans, :long_upload_max 9 | remove_column :plans, :long_download_max 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /config/initializers/inflections.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Add new inflection rules using the following format 4 | # (all these examples are active by default): 5 | # ActiveSupport::Inflector.inflections do |inflect| 6 | # inflect.plural /^(ox)$/i, '\1en' 7 | # inflect.singular /^(ox)en/i, '\1' 8 | # inflect.irregular 'person', 'people' 9 | # inflect.uncountable %w( fish sheep ) 10 | # end 11 | -------------------------------------------------------------------------------- /db/migrate/20131007133525_add_attr_identification_number_and_capacity_used_in_model_disk.rb: -------------------------------------------------------------------------------- 1 | class AddAttrIdentificationNumberAndCapacityUsedInModelDisk < ActiveRecord::Migration 2 | def self.up 3 | add_column :disks, :capacity_used, :string, :default => "0" 4 | add_column :disks, :serial, :string 5 | end 6 | 7 | def self.down 8 | remove_column :disks, :capacity_used 9 | remove_column :disks, :serial 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /config/initializers/backtrace_silencers.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. 4 | # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } 5 | 6 | # You can also remove all the silencers if you're trying do debug a problem that might steem from framework code. 7 | # Rails.backtrace_cleaner.remove_silencers! -------------------------------------------------------------------------------- /db/migrate/20110518140731_add_contract_details_to_contract.rb: -------------------------------------------------------------------------------- 1 | class AddContractDetailsToContract < ActiveRecord::Migration 2 | def self.up 3 | add_column :contracts, :detail, :string 4 | add_column :contracts, :cpe, :string 5 | add_column :contracts, :node, :string 6 | end 7 | 8 | def self.down 9 | remove_column :contracts, :node 10 | remove_column :contracts, :cpe 11 | remove_column :contracts, :detail 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /vendor/plugins/validation_reflection/test/test_helper.rb: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | ENV['RAILS_ENV'] = 'test' 3 | RAILS_ROOT = File.join(File.dirname(__FILE__)) 4 | 5 | require 'rubygems' 6 | 7 | begin 8 | require 'active_record' 9 | rescue LoadError 10 | gem 'activerecord', '>= 1.2.3' 11 | require 'active_record' 12 | end 13 | 14 | begin 15 | require 'test/unit' 16 | rescue LoadError 17 | gem 'test-unit', '>= 1.2.3' 18 | require 'test/unit' 19 | end -------------------------------------------------------------------------------- /script/spec: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | if ARGV.any? {|arg| %w[--drb -X --generate-options -G --help -h --version -v].include?(arg)} 3 | require 'rubygems' unless ENV['NO_RUBYGEMS'] 4 | else 5 | gem 'test-unit', '1.2.3' if RUBY_VERSION.to_f >= 1.9 6 | ENV["RAILS_ENV"] ||= 'test' 7 | require File.expand_path(File.dirname(__FILE__) + "/../config/environment") unless defined?(RAILS_ROOT) 8 | end 9 | require 'spec/autorun' 10 | exit ::Spec::Runner::CommandLine.run 11 | -------------------------------------------------------------------------------- /db/migrate/20100412140548_remove_default_ceil_dfl_percent_and_r2q_from_configuration.rb: -------------------------------------------------------------------------------- 1 | class RemoveDefaultCeilDflPercentAndR2qFromConfiguration < ActiveRecord::Migration 2 | def self.up 3 | remove_column :configurations, :default_ceil_dfl_percent 4 | remove_column :configurations, :r2q 5 | end 6 | 7 | def self.down 8 | add_column :configurations, :default_ceil_dfl_percent, :string 9 | add_column :configurations, :r2q, :integer 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /lib/daemons/sequreispd_ctl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require 'rubygems' 3 | require "daemons" 4 | require 'yaml' 5 | 6 | options = YAML::load(File.open(File.dirname(__FILE__) + "/../../config/daemons.yml")) 7 | options = options.inject({}) do |opt, (key, value)| 8 | opt[(key.to_sym rescue key) || key] = value 9 | opt 10 | end 11 | options[:dir_mode] = options[:dir_mode].to_sym 12 | 13 | Daemons.run File.dirname(__FILE__) + '/sequreispd.rb', options 14 | 15 | 16 | -------------------------------------------------------------------------------- /db/migrate/20121024150206_add_proxy_arp_provider_id_and_proxy_arp_gateway_to_contract.rb: -------------------------------------------------------------------------------- 1 | class AddProxyArpProviderIdAndProxyArpGatewayToContract < ActiveRecord::Migration 2 | def self.up 3 | add_column :contracts, :proxy_arp_provider_id, :integer 4 | add_column :contracts, :proxy_arp_gateway, :string 5 | end 6 | 7 | def self.down 8 | remove_column :contracts, :proxy_arp_gateway 9 | remove_column :contracts, :proxy_arp_provider_id 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /db/migrate/20131129123334_delete_column_partitioned_and_clean_partition_in_model_disk.rb: -------------------------------------------------------------------------------- 1 | class DeleteColumnPartitionedAndCleanPartitionInModelDisk < ActiveRecord::Migration 2 | def self.up 3 | remove_column :disks, :clean_partition 4 | remove_column :disks, :partitioned 5 | end 6 | 7 | def self.down 8 | add_column :disks, :clean_partition, :boolean, :default => true 9 | add_column :disks, :partitioned, :boolean, :default => false 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /db/migrate/20091020160743_create_plans.rb: -------------------------------------------------------------------------------- 1 | class CreatePlans < ActiveRecord::Migration 2 | def self.up 3 | create_table :plans do |t| 4 | t.string :name 5 | t.integer :provider_group_id 6 | t.integer :rate_down 7 | t.integer :ceil_down 8 | t.integer :rate_up 9 | t.integer :ceil_up 10 | t.integer :periodicity 11 | 12 | t.timestamps 13 | end 14 | end 15 | 16 | def self.down 17 | drop_table :plans 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /vendor/plugins/engines/lib/engines/rails_extensions/rails.rb: -------------------------------------------------------------------------------- 1 | # This is only here to allow for backwards compability with Engines that 2 | # have been implemented based on Engines for Rails 1.2. It is preferred that 3 | # the plugin list be accessed via Engines.plugins. 4 | 5 | module Rails 6 | # Returns the Engines::Plugin::List from Engines.plugins. It is preferable to 7 | # access Engines.plugins directly. 8 | def self.plugins 9 | Engines.plugins 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /app/views/plans/edit.html.erb: -------------------------------------------------------------------------------- 1 | <% content_for :title, t('actions.edit', :model => Plan.human_name) %> 2 | <% heading t('actions.edit', :model => Plan.human_name) %> 3 | 4 | 8 |
    9 | 10 | <%= render @plan %> 11 | -------------------------------------------------------------------------------- /db/migrate/20100914393123_create_forwarded_ports.rb: -------------------------------------------------------------------------------- 1 | class CreateForwardedPorts < ActiveRecord::Migration 2 | def self.up 3 | create_table :forwarded_ports do |t| 4 | t.integer :contract_id 5 | t.integer :provider_id 6 | t.integer :public_port 7 | t.integer :private_port 8 | t.boolean :tcp 9 | t.boolean :udp 10 | 11 | t.timestamps 12 | end 13 | end 14 | 15 | def self.down 16 | drop_table :forwarded_ports 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /db/migrate/20100826195914_add_alerted_options_to_configuration.rb: -------------------------------------------------------------------------------- 1 | class AddAlertedOptionsToConfiguration < ActiveRecord::Migration 2 | def self.up 3 | add_column :configurations, :alerted_cuts_per_hour, :integer, :default => 1 4 | add_column :configurations, :alerted_cut_duration, :integer, :default => 5 5 | end 6 | 7 | def self.down 8 | remove_column :configurations, :alerted_cut_duration 9 | remove_column :configurations, :alerted_cuts_per_hour 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /app/views/users/edit.html.erb: -------------------------------------------------------------------------------- 1 | <% content_for :title, t('actions.edit', :model => User.human_name) %> 2 | <% heading t('actions.edit', :model => User.human_name) %> 3 | 4 | 8 |
    9 | 10 | <%= render @user %> 11 | 12 | -------------------------------------------------------------------------------- /db/migrate/20101214143356_add_netmask_to_contract.rb: -------------------------------------------------------------------------------- 1 | class AddNetmaskToContract < ActiveRecord::Migration 2 | def self.up 3 | add_column :contracts, :netmask, :string 4 | Contract.reset_column_information 5 | Contract.all.each do |c| 6 | c.netmask = IP.new(c.ip).netmask.to_s 7 | Contract.update_all("netmask = '#{IP.new(c.ip).netmask.to_s}'", ['id = ?', c.id]) 8 | end 9 | end 10 | 11 | def self.down 12 | remove_column :contracts, :netmask 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /db/migrate/20110502204821_add_backup_restore_and_backup_reboot_to_configuration.rb: -------------------------------------------------------------------------------- 1 | class AddBackupRestoreAndBackupRebootToConfiguration < ActiveRecord::Migration 2 | def self.up 3 | add_column :configurations, :backup_reboot, :boolean, :default => false 4 | add_column :configurations, :backup_restore, :string, :default => nil 5 | end 6 | 7 | def self.down 8 | remove_column :configurations, :backup_restore 9 | remove_column :configurations, :backup_reboot 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /vendor/plugins/daemon_generator/generators/daemon/daemon_generator.rb: -------------------------------------------------------------------------------- 1 | class DaemonGenerator < Rails::Generator::NamedBase 2 | def manifest 3 | record do |m| 4 | m.directory "lib/daemons" 5 | m.file "daemons", "script/daemons", :chmod => 0755 6 | m.template "script.rb", "lib/daemons/#{file_name}.rb", :chmod => 0755 7 | m.template "script_ctl", "lib/daemons/#{file_name}_ctl", :chmod => 0755 8 | m.file "daemons.yml", "config/daemons.yml" 9 | end 10 | end 11 | end -------------------------------------------------------------------------------- /vendor/plugins/engines/generators/plugin_migration/templates/plugin_migration.erb: -------------------------------------------------------------------------------- 1 | class <%= class_name %> < ActiveRecord::Migration 2 | def self.up 3 | <%- plugins.each do |plugin| -%> 4 | Engines.plugins["<%= plugin.name %>"].migrate(<%= new_versions[plugin.name] %>) 5 | <%- end -%> 6 | end 7 | 8 | def self.down 9 | <%- plugins.each do |plugin| -%> 10 | Engines.plugins["<%= plugin.name %>"].migrate(<%= current_versions[plugin.name] %>) 11 | <%- end -%> 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /app/views/contracts/edit.html.erb: -------------------------------------------------------------------------------- 1 | <% content_for :title, t('actions.edit', :model => Contract.human_name) %> 2 | <% heading t('actions.edit', :model => Contract.human_name) %> 3 | 4 | 8 |
    9 | 10 | <%= render @contract %> 11 | -------------------------------------------------------------------------------- /config/schedule.rb: -------------------------------------------------------------------------------- 1 | # http://github.com/javan/whenever 2 | 3 | every 5.minutes do 4 | command "cd /opt/sequreisp/deploy/current/bin/ && ./sequreisp_rrd_feed.sh", :output => "../log/cron_log.log" 5 | end 6 | 7 | every 1.hour do 8 | runner "Configuration.apply_changes_automatically!", :output => "log/cron_log.log" 9 | end 10 | 11 | Dir.glob(File.join(File.dirname(__FILE__), 'vendor', 'plugins', '**', "config", "schedule.rb")) do |schedule| 12 | self.send(:eval, File.open(schedule, 'r').read) 13 | end 14 | -------------------------------------------------------------------------------- /vendor/plugins/daemon_generator/generators/daemon/templates/script.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | 3 | # You might want to change this 4 | ENV["RAILS_ENV"] ||= "production" 5 | 6 | require File.dirname(__FILE__) + "/../../config/environment" 7 | 8 | $running = true 9 | Signal.trap("TERM") do 10 | $running = false 11 | end 12 | 13 | while($running) do 14 | 15 | # Replace this with your code 16 | ActiveRecord::Base.logger.info "This daemon is still running at #{Time.now}.\n" 17 | 18 | sleep 10 19 | end -------------------------------------------------------------------------------- /app/views/providers/edit.html.erb: -------------------------------------------------------------------------------- 1 | <% content_for :title, t('actions.edit', :model => Provider.human_name) %> 2 | <% heading t('actions.edit', :model => Provider.human_name) %> 3 | 4 | 8 |
    9 | 10 | <%= render @provider %> 11 | 12 | -------------------------------------------------------------------------------- /app/views/abouts/show.html.erb: -------------------------------------------------------------------------------- 1 | <% content_for :title, t('menu.about') %> 2 | <% heading t('menu.about') %> 3 | 4 | <%= render :partial => "shared/empty_submenu" %> 5 | 17 | 18 | -------------------------------------------------------------------------------- /app/views/iproutes/edit.html.erb: -------------------------------------------------------------------------------- 1 | <% content_for :title, t('actions.edit', :model => Iproute.human_name) %> 2 | <% heading t('actions.edit', :model => Iproute.human_name) %> 3 | 4 | 8 |
    9 | 10 | <%= render @iproute %> 11 | 12 | 13 | -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- 1 | # Add your own tasks in files placed in lib/tasks ending in .rake, 2 | # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. 3 | 4 | require(File.join(File.dirname(__FILE__), 'config', 'boot')) 5 | 6 | require 'rake' 7 | require 'rake/testtask' 8 | require 'rdoc/task' 9 | 10 | require 'tasks/rails' 11 | 12 | Dir.glob(File.join(File.dirname(__FILE__), 'vendor', 'plugins', '**', "Rakefile.base")) do |rakefile| 13 | self.send(:eval, File.open(rakefile, 'r').read) 14 | end 15 | -------------------------------------------------------------------------------- /app/views/shared/_graph_history.html.erb: -------------------------------------------------------------------------------- 1 | 2 |

    <%=t 'graph.last_24h' %>

    3 | <%= @graph.img("day", "large") %> 4 |
    5 |
    6 |
    7 |

    <%=t 'graph.last_week' %>

    8 | <%= @graph.img("week", "large") %> 9 |
    10 |
    11 |
    12 |

    <%=t 'graph.last_month' %>

    13 | <%= @graph.img("month", "large") %> 14 |
    15 |
    16 |
    17 |

    <%=t 'graph.last_year' %>

    18 | <%= @graph.img("year", "large") %> 19 |
    20 |
    21 |
    22 | -------------------------------------------------------------------------------- /db/migrate/20121031142755_add_proxy_arp_use_lan_gateway_and_proxy_arp_lan_gateway_to_contract.rb: -------------------------------------------------------------------------------- 1 | class AddProxyArpUseLanGatewayAndProxyArpLanGatewayToContract < ActiveRecord::Migration 2 | def self.up 3 | add_column :contracts, :proxy_arp_use_lan_gateway, :boolean, :default => false 4 | add_column :contracts, :proxy_arp_lan_gateway, :string 5 | end 6 | 7 | def self.down 8 | remove_column :contracts, :proxy_arp_lan_gateway 9 | remove_column :contracts, :proxy_arp_use_lan_gateway 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /lib/generators/sequreisp_plugin/templates/en.yml: -------------------------------------------------------------------------------- 1 | en: 2 | plugin: 3 | <%= name.downcase %>: 4 | 5 | menu: 6 | <%= name.downcase %>: 7 | 8 | # submenu: 9 | 10 | # buttons: 11 | 12 | # activerecord: 13 | # shared: 14 | 15 | # models: 16 | 17 | # attributes: 18 | 19 | # messages: 20 | 21 | # labels: 22 | # models: 23 | 24 | # hints: 25 | # models: 26 | 27 | # errors: 28 | # models: 29 | 30 | # formtastic: 31 | # hints: 32 | 33 | # fieldsets: 34 | -------------------------------------------------------------------------------- /lib/generators/sequreisp_plugin/templates/es.yml: -------------------------------------------------------------------------------- 1 | es: 2 | plugin: 3 | <%= name.downcase %>: 4 | 5 | menu: 6 | <%= name.downcase %>: 7 | 8 | # submenu: 9 | 10 | # buttons: 11 | 12 | # activerecord: 13 | # shared: 14 | 15 | # models: 16 | 17 | # attributes: 18 | 19 | # messages: 20 | 21 | # labels: 22 | # models: 23 | 24 | # hints: 25 | # models: 26 | 27 | # errors: 28 | # models: 29 | 30 | # formtastic: 31 | # hints: 32 | 33 | # fieldsets: 34 | -------------------------------------------------------------------------------- /lib/generators/sequreisp_plugin/templates/pt.yml: -------------------------------------------------------------------------------- 1 | pt: 2 | plugin: 3 | <%= name.downcase %>: 4 | 5 | menu: 6 | <%= name.downcase %>: 7 | 8 | # submenu: 9 | 10 | # buttons: 11 | 12 | # activerecord: 13 | # shared: 14 | 15 | # models: 16 | 17 | # attributes: 18 | 19 | # messages: 20 | 21 | # labels: 22 | # models: 23 | 24 | # hints: 25 | # models: 26 | 27 | # errors: 28 | # models: 29 | 30 | # formtastic: 31 | # hints: 32 | 33 | # fieldsets: 34 | -------------------------------------------------------------------------------- /app/views/interfaces/edit.html.erb: -------------------------------------------------------------------------------- 1 | <% content_for :title, t('actions.edit', :model => Interface.human_name) %> 2 | <% heading t('actions.edit', :model => Interface.human_name) %> 3 | 4 | 8 |
    9 | 10 | <%= render @interface %> 11 | 12 | 13 | -------------------------------------------------------------------------------- /db/files/valid_protocols: -------------------------------------------------------------------------------- 1 | ip 2 | icmp 3 | igmp 4 | ggp 5 | ipencap 6 | st 7 | tcp 8 | egp 9 | igp 10 | pup 11 | udp 12 | hmp 13 | xns-idp 14 | rdp 15 | iso-tp4 16 | xtp 17 | ddp 18 | idpr-cmtp 19 | ipv6 20 | ipv6-route 21 | ipv6-frag 22 | idrp 23 | rsvp 24 | gre 25 | esp 26 | ah 27 | skip 28 | ipv6-icmp 29 | ipv6-nonxt 30 | ipv6-opts 31 | rspf 32 | vmtp 33 | eigrp 34 | ospf 35 | ax.25 36 | ipip 37 | etherip 38 | encap 39 | pim 40 | ipcomp 41 | vrrp 42 | l2tp 43 | isis 44 | sctp 45 | fc 46 | udplite 47 | mpls-in-ip 48 | manet 49 | hip 50 | -------------------------------------------------------------------------------- /app/views/provider_groups/edit.html.erb: -------------------------------------------------------------------------------- 1 | <% content_for :title, t('actions.edit', :model => ProviderGroup.human_name) %> 2 | <% heading t('actions.edit', :model => ProviderGroup.human_name) %> 3 | 4 | 8 |
    9 | 10 | <%= render @provider_group %> 11 | 12 | -------------------------------------------------------------------------------- /vendor/plugins/engines/test/plugins/test_testing/test/unit/override_test.rb: -------------------------------------------------------------------------------- 1 | require File.expand_path(File.join(File.dirname(__FILE__), *%w[.. .. .. .. .. test test_helper])) 2 | 3 | class OverrideTest < ActiveSupport::TestCase 4 | def test_overrides_from_the_application_should_work 5 | flunk "this test should be overridden by the app" 6 | end 7 | 8 | def test_tests_within_the_plugin_should_still_run 9 | assert true, "non-overridden plugin tests should still run" 10 | end 11 | end 12 | 13 | Engines::Testing.override_tests_from_app -------------------------------------------------------------------------------- /db/migrate/20101216205352_add_deliver_notifications_to_configuration.rb: -------------------------------------------------------------------------------- 1 | class AddDeliverNotificationsToConfiguration < ActiveRecord::Migration 2 | def self.up 3 | add_column :configurations, :deliver_notifications, :boolean, :default => false 4 | Configuration.reset_column_information 5 | c = Configuration.first 6 | if c and !c.notification_email.blank? 7 | Configuration.update_all('deliver_notifications = 1') 8 | end 9 | end 10 | 11 | def self.down 12 | remove_column :configurations, :deliver_notifications 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /db/migrate/20110916144958_add_apply_changes_automatically_fields_to_configuration.rb: -------------------------------------------------------------------------------- 1 | class AddApplyChangesAutomaticallyFieldsToConfiguration < ActiveRecord::Migration 2 | def self.up 3 | add_column :configurations, :apply_changes_automatically, :boolean, :default => false 4 | add_column :configurations, :apply_changes_automatically_hour, :integer, :default => 4 5 | end 6 | 7 | def self.down 8 | remove_column :configurations, :apply_changes_automatically_hour 9 | remove_column :configurations, :apply_changes_automatically 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /vendor/plugins/daemon_generator/README: -------------------------------------------------------------------------------- 1 | Daemon Generator 2 | ================ 3 | 4 | To get yourself rolling: 5 | > sudo gem install daemons 6 | > ./script/generate daemon 7 | 8 | Then insert your code in the lib/daemons/.rb stub. All pid's and logs will live in the normal log/ folder. This helps to make things Capistrano friendly. 9 | 10 | Individual control script: 11 | > ./lib/daemons/_ctl [start|stop|restart] 12 | 13 | App-wide control script (I add this to my capistrano recipe's after_restart task): 14 | > ./script/daemons [start|stop|restart] -------------------------------------------------------------------------------- /misc/migrate_forward_ports.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | 3 | Contract.all(:conditions => "forward_ports is not null and forward_ports != ''").each do |c| 4 | c.forward_ports.split(",").each do |port| 5 | in_port,out_port = port.split(":") 6 | out_port = in_port if out_port.blank? 7 | c.provider_group.providers.enabled.each do |p| 8 | c.forwarded_ports.create!( :provider => p, :public_port => in_port, :private_port => out_port, :tcp => true, :udp => true) 9 | puts "#{c.id} p #{p.id} public #{in_port} private #{out_port}" 10 | end 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /app/views/avoid_balancing_hosts/edit.html.erb: -------------------------------------------------------------------------------- 1 | <% content_for :title, t('actions.edit', :model => AvoidBalancingHost.human_name) %> 2 | <% heading t('actions.edit', :model => AvoidBalancingHost.human_name) %> 3 | 4 | 8 |
    9 | 10 | <%= render @avoid_balancing_host %> 11 | 12 | 13 | -------------------------------------------------------------------------------- /db/migrate/20110721133221_add_iptables_tree_optimization_enabled_to_configuration.rb: -------------------------------------------------------------------------------- 1 | class AddIptablesTreeOptimizationEnabledToConfiguration < ActiveRecord::Migration 2 | def self.up 3 | #optimze only on known 64bits machines 4 | optimize = begin 5 | `uname -m`.chomp == 'x86_64' ? true : false 6 | rescue 7 | false 8 | end 9 | add_column :configurations, :iptables_tree_optimization_enabled, :boolean, :default => optimize 10 | end 11 | 12 | def self.down 13 | remove_column :configurations, :iptables_tree_optimization_enabled 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /db/migrate/20100802214909_add_transparent_proxy_to_contract.rb: -------------------------------------------------------------------------------- 1 | class AddTransparentProxyToContract < ActiveRecord::Migration 2 | def self.up 3 | add_column :contracts, :transparent_proxy, :boolean, :default => nil 4 | add_column :plans, :transparent_proxy, :boolean, :default => false 5 | add_column :configurations, :transparent_proxy, :boolean, :default => true 6 | end 7 | 8 | def self.down 9 | remove_column :contracts, :transparent_proxy 10 | remove_column :plans, :transparent_proxy 11 | remove_column :configurations, :transparent_proxy 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /db/migrate/20100823193812_change_transparent_proxy_to_string_in_contract.rb: -------------------------------------------------------------------------------- 1 | class ChangeTransparentProxyToStringInContract < ActiveRecord::Migration 2 | def self.up 3 | change_column :contracts, :transparent_proxy, :string, :default => "default" 4 | Contract.reset_column_information 5 | Contract.update_all( {:transparent_proxy => "default" } ) 6 | end 7 | 8 | def self.down 9 | change_column :contracts, :transparent_proxy, :boolean, :default => nil 10 | Contract.reset_column_information 11 | Contract.update_all( {:transparent_proxy => nil } ) 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /db/migrate/20091020162918_create_providers.rb: -------------------------------------------------------------------------------- 1 | class CreateProviders < ActiveRecord::Migration 2 | def self.up 3 | create_table :providers do |t| 4 | t.integer :provider_group_id 5 | t.integer :interface_id 6 | t.string :kind 7 | t.string :name 8 | t.string :ip 9 | t.string :netmask 10 | t.string :gateway 11 | t.integer :rate_down 12 | t.integer :rate_up 13 | t.string :pppoe_user 14 | t.string :pppoe_pass 15 | 16 | t.timestamps 17 | end 18 | end 19 | 20 | def self.down 21 | drop_table :providers 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /misc/translate_iptables_save.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # 3 | 4 | IPTABLES_FILE="/tmp/sequreisp/scripts/iptables" 5 | OUTPUT_FILE="/tmp/iptables.sh" 6 | table=nil 7 | File.open(OUTPUT_FILE, "w") do |f| 8 | File.open(IPTABLES_FILE, "r").each do |line| 9 | if line.match /^\*(.*)$/ 10 | table=$1 11 | f.puts "iptables -t #{table} -F" 12 | f.puts "iptables -t #{table} -X" 13 | elsif line.match /^-/ 14 | f.puts "iptables -t #{table} #{line}" 15 | elsif line.match /^:([^ ]+) .*$/ 16 | f.puts "iptables -t #{table} -N #{$1}" 17 | end 18 | end 19 | f.chmod 0755 20 | end 21 | -------------------------------------------------------------------------------- /script/create_plugin_migration: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #Colors 4 | # text 5 | black='\e[0;30m' 6 | white='\e[0;37m' 7 | yellow='\e[0;33m' 8 | red='\e[00;31m' 9 | green='\e[00;32m' 10 | close_color='\e[00m' 11 | 12 | plugins=`ls vendor/plugins/ | grep 'sequreisp_'` 13 | current_directory=`pwd` 14 | for plugin in $plugins 15 | do 16 | cd vendor/plugins/$plugin 17 | branch=`git branch | awk '/\*/ { print $2; }'` 18 | echo -e "${red} script/generate plugin_migration $plugin${close_color} ${green}[${branch}]${close_color}" 19 | cd $current_directory 20 | script/generate plugin_migration $plugin 2> /dev/null 21 | done 22 | -------------------------------------------------------------------------------- /db/migrate/20130527155403_create_traffic_accountings.rb: -------------------------------------------------------------------------------- 1 | class CreateTrafficAccountings < ActiveRecord::Migration 2 | def self.up 3 | create_table :traffics do |t| 4 | t.decimal :data_total, :default => 0, :precision => 20 5 | t.decimal :data_total_extra, :default => 0, :precision => 20 6 | t.decimal :data_count, :default => 0, :precision => 20 7 | t.date :from_date 8 | t.date :to_date 9 | t.integer :contract_id 10 | t.timestamps 11 | end 12 | add_index :traffics, :contract_id 13 | end 14 | 15 | def self.down 16 | drop_table :traffics 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /config/initializers/email.rb: -------------------------------------------------------------------------------- 1 | # Loads action_mailer settings from email.yml 2 | # and turns deliveries on if configuration file is found 3 | 4 | filename = File.join(File.dirname(__FILE__), '..', 'email.yml') 5 | if File.file?(filename) 6 | mailconfig = YAML::load_file(filename) 7 | 8 | if mailconfig.is_a?(Hash) && mailconfig.has_key?(Rails.env) 9 | # Enable deliveries 10 | ActionMailer::Base.perform_deliveries = true 11 | 12 | mailconfig[Rails.env].each do |k, v| 13 | v.symbolize_keys! if v.respond_to?(:symbolize_keys!) 14 | ActionMailer::Base.send("#{k}=", v) 15 | end 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /public/stylesheets/form.css: -------------------------------------------------------------------------------- 1 | div.errorExplanation{ 2 | background-color: #B6B6B6; 3 | margin: 5px 5px 15px 5px; 4 | padding: 7px; 5 | width: 50%; 6 | } 7 | 8 | div.errorExplanation h2{ 9 | font-size: 17px; 10 | color: #900; 11 | margin-left: 7px; 12 | font-weight: bold; 13 | } 14 | 15 | div.errorExplanation p{ 16 | margin-left: 7px; 17 | margin-bottom: 4px; 18 | font-weight: bold; 19 | } 20 | 21 | div.errorExplanation li{ 22 | list-style: disc; 23 | } 24 | 25 | div.errorExplanation span.attribute_name{ 26 | font-style: italic; 27 | font-weight: bold; 28 | color: #900; 29 | } 30 | -------------------------------------------------------------------------------- /app/views/layouts/partials/_apply_changes_banner.html.erb: -------------------------------------------------------------------------------- 1 |
    2 | <% if current_user.may_doreload_configuration? and Configuration.first.changes_to_apply? %> 3 |
    4 | 5 | <%= t('notifications.changes_to_be_applied_notice') %> 6 | 7 |
    8 | <% link_to({:controller => "configurations", :action => "doreload"}, :class => "button") do %> 9 | 10 | <%= t('menu.apply_changes') %> 11 | 12 | <% end %> 13 |
    14 |
    15 | <% end %> 16 |
    17 | -------------------------------------------------------------------------------- /app/views/app_mailer/check_links_email.text.plain.erb: -------------------------------------------------------------------------------- 1 | Cambio de estado de los enlaces 2 | 3 | <% ProviderGroup.enabled.each do |pg| %> 4 | Grupo: <%= pg.name %> 5 | <%= sprintf "-----------------------------------------------------------" %> 6 | <%= sprintf "| %-20s | %10s | %19s |", "Proveedor", "Estado", "IP" %> 7 | <%= sprintf "-----------------------------------------------------------" %> 8 | <%- pg.providers.enabled.each do |p| -%> 9 | <%= sprintf "| %-20s | %10s | %19s |", p.name[0..19], p.online ? "online" : "offline", p.ip.blank? ? "-" : p.ip %> 10 | <% end -%> 11 | <%= sprintf "-----------------------------------------------------------" %> 12 | <% end -%> 13 | -------------------------------------------------------------------------------- /app/views/shared/_address_fields.html.erb: -------------------------------------------------------------------------------- 1 |
    2 | <%= f.input :ip, :input_html => { :class => "input_address_ip" }, :wrapper_html => { :class => "left" } %> 3 | <%= f.input :netmask, :input_html => { :class => "input_address_ip" }, :wrapper_html => { :class => "left" } %> 4 | <%#FIXME should not be printed and hidden, the if f.object.addressable_type == 'Provider' approuch return nil on new :( %> 5 | <%= f.input :use_in_nat_pool, :input_html => { :class => "checkbox_address" }, :wrapper_html => { :class => "left use_in_nat_pool" } %> 6 | <%# end %> 7 |
  • <%= link_to_remove_fields t('buttons.delete'), f %>
  • 8 |
    9 | -------------------------------------------------------------------------------- /vendor/plugins/engines/test/unit/testing_test.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../test_helper' 2 | 3 | class TestingTest < Test::Unit::TestCase 4 | def setup 5 | Engines::Testing.set_fixture_path 6 | @filename = File.join(Engines::Testing.temporary_fixtures_directory, 'testing_fixtures.yml') 7 | File.delete(@filename) if File.exists?(@filename) 8 | end 9 | 10 | def teardown 11 | File.delete(@filename) if File.exists?(@filename) 12 | end 13 | 14 | def test_should_copy_fixtures_files_to_tmp_directory 15 | assert !File.exists?(@filename) 16 | Engines::Testing.setup_plugin_fixtures 17 | assert File.exists?(@filename) 18 | end 19 | end -------------------------------------------------------------------------------- /db/migrate/20091020162512_create_contracts.rb: -------------------------------------------------------------------------------- 1 | class CreateContracts < ActiveRecord::Migration 2 | def self.up 3 | create_table :contracts do |t| 4 | t.integer :plan_id 5 | t.integer :client_id 6 | t.date :date_start 7 | t.string :ip 8 | t.string :mac_address 9 | t.string :public_ip 10 | t.integer :ceil_dfl_percent 11 | t.string :tcp_prio_ports 12 | t.string :udp_prio_ports 13 | t.string :prio_protos 14 | t.string :prio_helpers 15 | t.string :forward_ports 16 | t.string :state 17 | 18 | t.timestamps 19 | end 20 | end 21 | 22 | def self.down 23 | drop_table :contracts 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /script/fixes/2013-08-23-v3.4.8-destroy_traffic_duplicate_for_each_contract.rb: -------------------------------------------------------------------------------- 1 | Contract.all.each do |c| 2 | unless c.traffics.empty? 3 | init = c.traffics.first.from_date 4 | final = c.traffics.last.to_date 5 | while init <= final 6 | traffic = Traffic.first(:conditions => ["from_date = '#{init.strftime('%Y-%m-%d')}' and contract_id = #{c.id}"]) 7 | unless traffic.nil? 8 | Traffic.delete_all(["to_date = '#{traffic.to_date.strftime('%Y-%m-%d')}' and from_date = '#{traffic.from_date.strftime('%Y-%m-%d')}' and contract_id = #{c.id} and id != #{traffic.id}"]) 9 | end 10 | init = (init + 1.month).beginning_of_month 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /app/models/always_allowed_site.rb: -------------------------------------------------------------------------------- 1 | class AlwaysAllowedSite < ActiveRecord::Base 2 | 3 | acts_as_audited 4 | 5 | validates_presence_of :name 6 | validates_format_of :name, :with => /^(?=.{1,255}$)[0-9A-Za-z](?:(?:[0-9A-Za-z]|\b-){0,61}[0-9A-Za-z])?(?:\.[0-9A-Za-z](?:(?:[0-9A-Za-z]|\b-){0,61}[0-9A-Za-z])?)*\.?$/ 7 | 8 | include ModelsWatcher 9 | watch_fields :name 10 | watch_on_destroy 11 | 12 | def ip_addresses 13 | require 'resolv' 14 | begin 15 | Resolv.getaddresses(name).select do |a| IP.new(a).is_a?(IP::V4) end 16 | rescue 17 | [] 18 | end 19 | end 20 | 21 | def auditable_name 22 | "#{self.class.human_name}: #{website}" 23 | end 24 | end 25 | -------------------------------------------------------------------------------- /app/views/layouts/login.html.erb: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | <%= render :partial => "layouts/partials/head" %> 8 | 9 | 10 |
    11 | <%= render :partial => "layouts/partials/header" %> 12 |
    13 | <%= yield %> 14 |
    15 | <%= render :partial => "layouts/partials/footer" %> 16 |
    17 | 18 | -------------------------------------------------------------------------------- /db/migrate/20100603150440_add_queues_to_contract.rb: -------------------------------------------------------------------------------- 1 | class AddQueuesToContract < ActiveRecord::Migration 2 | def self.up 3 | add_column :contracts, :queue_down_prio, :float, :default => 0, :limit => 8 4 | add_column :contracts, :queue_up_prio, :float, :default => 0, :limit => 8 5 | add_column :contracts, :queue_down_dfl, :float, :default => 0, :limit => 8 6 | add_column :contracts, :queue_up_dfl, :float, :default => 0, :limit => 8 7 | end 8 | 9 | def self.down 10 | remove_column :contracts, :queue_up_dfl 11 | remove_column :contracts, :queue_down_dfl 12 | remove_column :contracts, :queue_up_prio 13 | remove_column :contracts, :queue_down_prio 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /db/migrate/20131025123752_add_web_interface_listen_on_ports_to_configuration.rb: -------------------------------------------------------------------------------- 1 | class AddWebInterfaceListenOnPortsToConfiguration < ActiveRecord::Migration 2 | def self.up 3 | add_column :configurations, :web_interface_listen_on_80, :boolean, :default => true 4 | add_column :configurations, :web_interface_listen_on_443, :boolean, :default => true 5 | add_column :configurations, :web_interface_listen_on_8080, :boolean, :default => true 6 | end 7 | 8 | def self.down 9 | remove_column :configurations, :web_interface_listen_on_8080 10 | remove_column :configurations, :web_interface_listen_on_443 11 | remove_column :configurations, :web_interface_listen_on_80 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /config/preinitializer.rb: -------------------------------------------------------------------------------- 1 | begin 2 | require "rubygems" 3 | require "bundler" 4 | rescue LoadError 5 | raise "Could not load the bundler gem. Install it with `gem install bundler`." 6 | end 7 | 8 | if Gem::Version.new(Bundler::VERSION) <= Gem::Version.new("0.9.24") 9 | raise RuntimeError, "Your bundler version is too old for Rails 2.3." + 10 | "Run `gem install bundler` to upgrade." 11 | end 12 | 13 | begin 14 | # Set up load paths for all bundled gems 15 | ENV["BUNDLE_GEMFILE"] = File.expand_path("../../Gemfile", __FILE__) 16 | Bundler.setup 17 | rescue Bundler::GemNotFound 18 | raise RuntimeError, "Bundler couldn't find some gems." + 19 | "Did you run `bundle install`?" 20 | end 21 | 22 | -------------------------------------------------------------------------------- /db/migrate/20140602164035_add_attrs_for_bind_dns_in_configuration.rb: -------------------------------------------------------------------------------- 1 | class AddAttrsForBindDnsInConfiguration < ActiveRecord::Migration 2 | def self.up 3 | add_column :configurations, :dns_use_forwarders, :boolean, :default => false 4 | add_column :configurations, :dns_first_server, :string 5 | add_column :configurations, :dns_second_server, :string 6 | add_column :configurations, :dns_third_server, :string 7 | end 8 | 9 | def self.down 10 | remove_column :configurations, :dns_use_forwarders 11 | remove_column :configurations, :dns_first_server 12 | remove_column :configurations, :dns_second_server 13 | remove_column :configurations, :dns_third_server 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /app/views/always_allowed_sites/_always_allowed_site.html.erb: -------------------------------------------------------------------------------- 1 |
    2 | <% semantic_form_for @always_allowed_site do |form| %> 3 | <%= error_messages @always_allowed_site %> 4 | <% form.inputs do %> 5 | <%= form.input :name, :wrapper_html => { :class => "left" } %> 6 | <%= form.input :detail, :wrapper_html => { :class => "left" } %> 7 |
    8 | <%= form_extensions form %> 9 | <% end %> 10 | <% if current_user.may_create_always_allowed_site? %> 11 | <% form.buttons do %> 12 | <%= form.commit_button @commit_text, :button_html => {:disable_with => t('buttons.please_wait')} %> 13 | <% end %> 14 | <% end %> 15 | <% end %> 16 |
    -------------------------------------------------------------------------------- /app/models/avoid_balancing_host.rb: -------------------------------------------------------------------------------- 1 | class AvoidBalancingHost < ActiveRecord::Base 2 | belongs_to :provider 3 | acts_as_audited 4 | validates_presence_of :name, :provider 5 | validates_format_of :name, :with => /^(?=.{1,255}$)[0-9A-Za-z](?:(?:[0-9A-Za-z]|\b-){0,61}[0-9A-Za-z])?(?:\.[0-9A-Za-z](?:(?:[0-9A-Za-z]|\b-){0,61}[0-9A-Za-z])?)*\.?$/ 6 | 7 | include ModelsWatcher 8 | watch_fields :name, :provider_id 9 | watch_on_destroy 10 | 11 | def ip_addresses 12 | require 'resolv' 13 | begin 14 | Resolv.getaddresses(name).select do |a| IP.new(a).is_a?(IP::V4) end 15 | rescue 16 | [] 17 | end 18 | end 19 | 20 | def auditable_name 21 | "#{self.class.human_name}: #{name}" 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /db/migrate/20100224150104_create_configurations.rb: -------------------------------------------------------------------------------- 1 | class CreateConfigurations < ActiveRecord::Migration 2 | def self.up 3 | create_table :configurations do |t| 4 | t.string :name 5 | t.string :default_tcp_prio_ports 6 | t.string :default_udp_prio_ports 7 | t.string :default_prio_protos 8 | t.string :default_prio_helpers 9 | t.string :default_ceil_dfl_percent 10 | t.string :rate_dfl_percent 11 | t.integer :mtu 12 | t.integer :r2q 13 | t.integer :class_start 14 | t.integer :rate_granted 15 | t.string :quantum_factor 16 | t.boolean :active 17 | 18 | t.timestamps 19 | end 20 | end 21 | 22 | def self.down 23 | drop_table :configurations 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /db/migrate/20100604134403_add_consumptions_to_contract.rb: -------------------------------------------------------------------------------- 1 | class AddConsumptionsToContract < ActiveRecord::Migration 2 | def self.up 3 | add_column :contracts, :consumption_down_prio, 'bigint unsigned', :default => 0 4 | add_column :contracts, :consumption_up_prio, 'bigint unsigned', :default => 0 5 | add_column :contracts, :consumption_down_dfl, 'bigint unsigned', :default => 0 6 | add_column :contracts, :consumption_up_dfl, 'bigint unsigned', :default => 0 7 | end 8 | 9 | def self.down 10 | remove_column :contracts, :consumption_up_dfl 11 | remove_column :contracts, :consumption_down_dfl 12 | remove_column :contracts, :consumption_up_prio 13 | remove_column :contracts, :consumption_down_prio 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /db/migrate/20100608140705_add_consumptions_to_provider.rb: -------------------------------------------------------------------------------- 1 | class AddConsumptionsToProvider < ActiveRecord::Migration 2 | def self.up 3 | add_column :providers, :consumption_down_prio, 'bigint unsigned', :default => 0 4 | add_column :providers, :consumption_up_prio, 'bigint unsigned', :default => 0 5 | add_column :providers, :consumption_down_dfl, 'bigint unsigned', :default => 0 6 | add_column :providers, :consumption_up_dfl, 'bigint unsigned', :default => 0 7 | end 8 | 9 | def self.down 10 | remove_column :providers, :consumption_up_dfl 11 | remove_column :providers, :consumption_down_dfl 12 | remove_column :providers, :consumption_up_prio 13 | remove_column :providers, :consumption_down_prio 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /vendor/plugins/engines/test/app/models/notify_mail.rb: -------------------------------------------------------------------------------- 1 | class NotifyMail < ActionMailer::Base 2 | 3 | helper :mail 4 | 5 | def signup(txt) 6 | body(:name => txt) 7 | end 8 | 9 | def multipart 10 | recipients 'some_address@email.com' 11 | subject 'multi part email' 12 | from "another_user@email.com" 13 | content_type 'multipart/alternative' 14 | 15 | part :content_type => "text/html", :body => render_message("multipart_html", {}) 16 | part "text/plain" do |p| 17 | p.body = render_message("multipart_plain", {}) 18 | end 19 | end 20 | 21 | def implicit_multipart 22 | recipients 'some_address@email.com' 23 | subject 'multi part email' 24 | from "another_user@email.com" 25 | end 26 | end -------------------------------------------------------------------------------- /lib/generators/sequreisp_plugin/templates/layout.rb: -------------------------------------------------------------------------------- 1 | <% content_for :sequreisp_plugin_menu do %> 2 | <% content_for :plugin_name, t("plugin.name") %> 3 | <% content_for :plugin_menu do %> 4 | 18 | <% end %> 19 | <%= render :partial => 'layouts/partials/plugin_submenu' %> 20 | <% end %> 21 | <%= render :file => 'layouts/application' %> 22 | -------------------------------------------------------------------------------- /public/stylesheets/reset.css: -------------------------------------------------------------------------------- 1 | *, html, body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, form, fieldset, input, p, blockquote, label, table, th, tr, td, embed, object { 2 | margin: 0 0 0 0; 3 | padding: 0 0 0 0; 4 | } 5 | 6 | table { 7 | border-collapse: collapse; 8 | border-spacing: 0; 9 | } 10 | 11 | fieldset, img, a img, a:link img, a:visited img { 12 | border: 0; 13 | } 14 | 15 | address ,caption, cite, code, dfn, th, var { 16 | font-style: normal; 17 | font-weight: normal; 18 | } 19 | 20 | ol, ul { 21 | list-style: none; 22 | } 23 | 24 | caption, th { 25 | text-align: left; 26 | } 27 | 28 | h1, h2, h3, h4, h5, h6 { 29 | font-size: 100%; 30 | } 31 | 32 | q:before, 33 | q:after { 34 | content: ''; 35 | } 36 | 37 | embed, object { 38 | display: block; 39 | } 40 | 41 | -------------------------------------------------------------------------------- /db/migrate/20100607222517_add_consumptions_to_provider_group.rb: -------------------------------------------------------------------------------- 1 | class AddConsumptionsToProviderGroup < ActiveRecord::Migration 2 | def self.up 3 | add_column :provider_groups, :consumption_down_prio, 'bigint unsigned', :default => 0 4 | add_column :provider_groups, :consumption_up_prio, 'bigint unsigned', :default => 0 5 | add_column :provider_groups, :consumption_down_dfl, 'bigint unsigned', :default => 0 6 | add_column :provider_groups, :consumption_up_dfl, 'bigint unsigned', :default => 0 7 | end 8 | 9 | def self.down 10 | remove_column :provider_groups, :consumption_up_dfl 11 | remove_column :provider_groups, :consumption_down_dfl 12 | remove_column :provider_groups, :consumption_up_prio 13 | remove_column :provider_groups, :consumption_down_prio 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /vendor/plugins/engines/boot.rb: -------------------------------------------------------------------------------- 1 | begin 2 | require 'rails/version' 3 | unless Rails::VERSION::MAJOR >= 2 && Rails::VERSION::MINOR >= 3 && Rails::VERSION::TINY >= 2 4 | raise "This version of the engines plugin requires Rails 2.3.2 or later!" 5 | end 6 | end 7 | 8 | require File.join(File.dirname(__FILE__), 'lib/engines') 9 | 10 | # initialize Rails::Configuration with our own default values to spare users 11 | # some hassle with the installation and keep the environment cleaner 12 | 13 | { :default_plugin_locators => (defined?(Gem) ? [Rails::Plugin::GemLocator] : []).push(Engines::Plugin::FileSystemLocator), 14 | :default_plugin_loader => Engines::Plugin::Loader, 15 | :default_plugins => [:engines, :all] }.each do |name, default| 16 | Rails::Configuration.send(:define_method, name) { default } 17 | end -------------------------------------------------------------------------------- /lib/tasks/common.rake: -------------------------------------------------------------------------------- 1 | namespace :db do 2 | desc 'Run migrations from start' 3 | task :remigrate => :environment do 4 | ActiveRecord::Base.connection.tables.each { |t| ActiveRecord::Base.connection.drop_table t } 5 | # Migrate upward 6 | Rake::Task["db:migrate"].invoke 7 | # Dump the schema 8 | Rake::Task["db:schema:dump"].invoke 9 | end 10 | 11 | desc 'Remigrate and seed' 12 | task :reseed => [:remigrate, :seed] 13 | 14 | desc 'Remigrate and seed' 15 | task :repopulate => [:remigrate, :seed, 'populate:all'] 16 | 17 | desc 'Same as script/runner misc/simulate-rrd.rb' 18 | task :simulate => :environment do 19 | eval(File.open('misc/simulate-rrd.rb', 'r').read) 20 | end 21 | 22 | desc 'Reset, populate and simulate' 23 | task :resimulate => [:reset, 'populate:all', :simulate] 24 | end 25 | -------------------------------------------------------------------------------- /db/migrate/20101213125305_add_audits_table.rb: -------------------------------------------------------------------------------- 1 | class AddAuditsTable < ActiveRecord::Migration 2 | def self.up 3 | create_table :audits, :force => true do |t| 4 | t.column :auditable_id, :integer 5 | t.column :auditable_type, :string 6 | t.column :user_id, :integer 7 | t.column :user_type, :string 8 | t.column :username, :string 9 | t.column :action, :string 10 | t.column :changes, :text 11 | t.column :version, :integer, :default => 0 12 | t.column :created_at, :datetime 13 | end 14 | 15 | add_index :audits, [:auditable_id, :auditable_type], :name => 'auditable_index' 16 | add_index :audits, [:user_id, :user_type], :name => 'user_index' 17 | add_index :audits, :created_at 18 | end 19 | 20 | def self.down 21 | drop_table :audits 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /app/helpers/plans_helper.rb: -------------------------------------------------------------------------------- 1 | # Sequreisp - Copyright 2010, 2011 Luciano Ruete 2 | # 3 | # This file is part of Sequreisp. 4 | # 5 | # Sequreisp is free software: you can redistribute it and/or modify 6 | # it under the terms of the GNU Afero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # Sequreisp is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Afero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Afero General Public License 16 | # along with Sequreisp. If not, see . 17 | 18 | module PlansHelper 19 | end 20 | -------------------------------------------------------------------------------- /app/helpers/users_helper.rb: -------------------------------------------------------------------------------- 1 | # Sequreisp - Copyright 2010, 2011 Luciano Ruete 2 | # 3 | # This file is part of Sequreisp. 4 | # 5 | # Sequreisp is free software: you can redistribute it and/or modify 6 | # it under the terms of the GNU Afero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # Sequreisp is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Afero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Afero General Public License 16 | # along with Sequreisp. If not, see . 17 | 18 | module UsersHelper 19 | end 20 | -------------------------------------------------------------------------------- /app/views/clients/edit.html.erb: -------------------------------------------------------------------------------- 1 | <% content_for :title, t('actions.edit', :model => Client.human_name) %> 2 | <% heading t('actions.edit', :model => Client.human_name)%> 3 | 4 | 14 |
    15 | 16 | <%= render @client %> 17 | 18 | -------------------------------------------------------------------------------- /app/helpers/backup_helper.rb: -------------------------------------------------------------------------------- 1 | # Sequreisp - Copyright 2010, 2011 Luciano Ruete 2 | # 3 | # This file is part of Sequreisp. 4 | # 5 | # Sequreisp is free software: you can redistribute it and/or modify 6 | # it under the terms of the GNU Afero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # Sequreisp is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Afero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Afero General Public License 16 | # along with Sequreisp. If not, see . 17 | 18 | module BackupHelper 19 | end 20 | -------------------------------------------------------------------------------- /app/helpers/clients_helper.rb: -------------------------------------------------------------------------------- 1 | # Sequreisp - Copyright 2010, 2011 Luciano Ruete 2 | # 3 | # This file is part of Sequreisp. 4 | # 5 | # Sequreisp is free software: you can redistribute it and/or modify 6 | # it under the terms of the GNU Afero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # Sequreisp is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Afero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Afero General Public License 16 | # along with Sequreisp. If not, see . 17 | 18 | module ClientsHelper 19 | end 20 | -------------------------------------------------------------------------------- /app/helpers/interfaces_helper.rb: -------------------------------------------------------------------------------- 1 | # Sequreisp - Copyright 2010, 2011 Luciano Ruete 2 | # 3 | # This file is part of Sequreisp. 4 | # 5 | # Sequreisp is free software: you can redistribute it and/or modify 6 | # it under the terms of the GNU Afero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # Sequreisp is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Afero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Afero General Public License 16 | # along with Sequreisp. If not, see . 17 | 18 | module InterfacesHelper 19 | end 20 | -------------------------------------------------------------------------------- /app/helpers/user_sessions_helper.rb: -------------------------------------------------------------------------------- 1 | # Sequreisp - Copyright 2010, 2011 Luciano Ruete 2 | # 3 | # This file is part of Sequreisp. 4 | # 5 | # Sequreisp is free software: you can redistribute it and/or modify 6 | # it under the terms of the GNU Afero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # Sequreisp is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Afero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Afero General Public License 16 | # along with Sequreisp. If not, see . 17 | 18 | module UserSessionsHelper 19 | end 20 | -------------------------------------------------------------------------------- /vendor/plugins/daemon_generator/generators/daemon/templates/script_ctl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require 'rubygems' 3 | require "daemons" 4 | require 'yaml' 5 | require 'erb' 6 | 7 | file_name = File.dirname(__FILE__) + "/../../vendor/rails/activesupport/lib/active_support.rb" 8 | 9 | if(File.exists?(file_name)) 10 | require file_name 11 | else 12 | rails_version = File.new(File.dirname(__FILE__)+ "/../../config/environment.rb").read.scan(/^ *RAILS_GEM_VERSION.*=.*['|"](.*)['|"]/)[0].to_s 13 | 14 | gem 'activesupport', rails_version 15 | require 'active_support' 16 | end 17 | 18 | options = YAML.load( 19 | ERB.new( 20 | IO.read( 21 | File.dirname(__FILE__) + "/../../config/daemons.yml" 22 | )).result).with_indifferent_access 23 | options[:dir_mode] = options[:dir_mode].to_sym 24 | 25 | Daemons.run File.dirname(__FILE__) + '/<%=file_name%>.rb', options 26 | -------------------------------------------------------------------------------- /lib/boot_hook.rb: -------------------------------------------------------------------------------- 1 | # Sequreisp - Copyright 2010, 2011 Luciano Ruete 2 | # 3 | # This file is part of Sequreisp. 4 | # 5 | # Sequreisp is free software: you can redistribute it and/or modify 6 | # it under the terms of the GNU Afero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # Sequreisp is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Afero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Afero General Public License 16 | # along with Sequreisp. If not, see . 17 | 18 | module BootHook 19 | 20 | def self.run options 21 | end 22 | 23 | end -------------------------------------------------------------------------------- /config/environments/development.rb: -------------------------------------------------------------------------------- 1 | # Settings specified here will take precedence over those in config/environment.rb 2 | 3 | # In the development environment your application's code is reloaded on 4 | # every request. This slows down response time but is perfect for development 5 | # since you don't have to restart the webserver when you make code changes. 6 | config.cache_classes = false 7 | 8 | # Log error messages when you accidentally call methods on nil. 9 | config.whiny_nils = true 10 | 11 | # Show full error reports and disable caching 12 | config.action_controller.consider_all_requests_local = true 13 | config.action_view.debug_rjs = true 14 | config.action_controller.perform_caching = false 15 | 16 | # Don't care if the mailer can't send 17 | config.action_mailer.raise_delivery_errors = true 18 | 19 | config.reload_plugins = true 20 | 21 | -------------------------------------------------------------------------------- /config/initializers/new_rails_defaults.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # These settings change the behavior of Rails 2 apps and will be defaults 4 | # for Rails 3. You can remove this initializer when Rails 3 is released. 5 | 6 | if defined?(ActiveRecord) 7 | # Include Active Record class name as root for JSON serialized output. 8 | ActiveRecord::Base.include_root_in_json = true 9 | 10 | # Store the full class name (including module namespace) in STI type column. 11 | ActiveRecord::Base.store_full_sti_class = true 12 | end 13 | 14 | # Use ISO 8601 format for JSON serialized times and dates. 15 | ActiveSupport.use_standard_json_time_format = true 16 | 17 | # Don't escape HTML entities in JSON, leave that for the #json_escape helper. 18 | # if you're including raw json in an HTML page. 19 | ActiveSupport.escape_html_entities_in_json = false -------------------------------------------------------------------------------- /config/initializers/session_store.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Your secret key for verifying cookie session data integrity. 4 | # If you change this key, all old sessions will become invalid! 5 | # Make sure the secret is at least 30 characters and all random, 6 | # no regular words or you'll be exposed to dictionary attacks. 7 | ActionController::Base.session = { 8 | :key => '_sequreisp_session', 9 | :secret => '1c4bf270642d3f6619185181bbe54e7d53ff2c5af6d11332e11a6dc13edf223e5785df7f86fbdca74d7d871f3c2702dd08d59d34afe835b72abfa0d9c14847f5' 10 | } 11 | 12 | # Use the database for sessions instead of the cookie-based default, 13 | # which shouldn't be used to store highly confidential information 14 | # (create the session table with "rake db:sessions:create") 15 | # ActionController::Base.session_store = :active_record_store 16 | -------------------------------------------------------------------------------- /app/models/provider_klass.rb: -------------------------------------------------------------------------------- 1 | # Sequreisp - Copyright 2010, 2011 Luciano Ruete 2 | # 3 | # This file is part of Sequreisp. 4 | # 5 | # Sequreisp is free software: you can redistribute it and/or modify 6 | # it under the terms of the GNU Afero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # Sequreisp is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Afero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Afero General Public License 16 | # along with Sequreisp. If not, see . 17 | 18 | class ProviderKlass < ActiveRecord::Base 19 | belongs_to :klassable, :polymorphic => true 20 | end 21 | -------------------------------------------------------------------------------- /vendor/plugins/engines/test/functional/exception_notification_compatibility_test.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../test_helper' 2 | 3 | class ExceptionNotificationCompatibilityTest < ActionController::TestCase 4 | ExceptionNotifier.exception_recipients = %w(joe@schmoe.com bill@schmoe.com) 5 | class SimpleController < ApplicationController 6 | include ExceptionNotifiable 7 | local_addresses.clear 8 | consider_all_requests_local = false 9 | def index 10 | begin 11 | raise "Fail!" 12 | rescue Exception => e 13 | rescue_action_in_public(e) 14 | end 15 | end 16 | end 17 | 18 | def setup 19 | @controller = SimpleController.new 20 | @request = ActionController::TestRequest.new 21 | @response = ActionController::TestResponse.new 22 | end 23 | 24 | def test_should_work 25 | assert_nothing_raised do 26 | get :index 27 | end 28 | end 29 | end -------------------------------------------------------------------------------- /lib/daemon_hook.rb: -------------------------------------------------------------------------------- 1 | # Sequreisp - Copyright 2010, 2011 Luciano Ruete 2 | # 3 | # This file is part of Sequreisp. 4 | # 5 | # Sequreisp is free software: you can redistribute it and/or modify 6 | # it under the terms of the GNU Afero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # Sequreisp is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Afero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Afero General Public License 16 | # along with Sequreisp. If not, see . 17 | 18 | module DaemonHook 19 | 20 | def self.run options 21 | end 22 | 23 | def self.data_counting options 24 | end 25 | 26 | end 27 | -------------------------------------------------------------------------------- /lib/sequre_mailer.rb: -------------------------------------------------------------------------------- 1 | # Sequreisp - Copyright 2010, 2011 Luciano Ruete 2 | # 3 | # This file is part of Sequreisp. 4 | # 5 | # Sequreisp is free software: you can redistribute it and/or modify 6 | # it under the terms of the GNU Afero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # Sequreisp is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Afero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Afero General Public License 16 | # along with Sequreisp. If not, see . 17 | 18 | class SequreMailer < ActionMailer::Base 19 | def set_language 20 | I18n.locale = Configuration.language 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /app/models/user_session.rb: -------------------------------------------------------------------------------- 1 | # Sequreisp - Copyright 2010, 2011 Luciano Ruete 2 | # 3 | # This file is part of Sequreisp. 4 | # 5 | # Sequreisp is free software: you can redistribute it and/or modify 6 | # it under the terms of the GNU Afero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # Sequreisp is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Afero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Afero General Public License 16 | # along with Sequreisp. If not, see . 17 | 18 | class UserSession < Authlogic::Session::Base 19 | logout_on_timeout true 20 | consecutive_failed_logins_limit 35 21 | end 22 | -------------------------------------------------------------------------------- /app/models/language.rb: -------------------------------------------------------------------------------- 1 | # Sequreisp - Copyright 2010, 2011 Luciano Ruete 2 | # 3 | # This file is part of Sequreisp. 4 | # 5 | # Sequreisp is free software: you can redistribute it and/or modify 6 | # it under the terms of the GNU Afero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # Sequreisp is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Afero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Afero General Public License 16 | # along with Sequreisp. If not, see . 17 | 18 | class Language 19 | def self.languages_for_select 20 | [["English", "en"], ["Español", "es"], ["Português", "pt"]] 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /app/views/users/_user.html.erb: -------------------------------------------------------------------------------- 1 | <% unless current_user.may_update_user?(@user) %> 2 | 7 | <% end %> 8 |
    9 | <% semantic_form_for @user do |form| %> 10 | <%= error_messages @user %> 11 | <% form.inputs do %> 12 | <%= form.input :name %> 13 | <%= form.input :email %> 14 | <%= form.input :role_name, :as => :select, :collection => User.roles_for_select, :include_blank => false %> 15 | <%= form.input :password %> 16 | <%= form.input :password_confirmation %> 17 | <%= form_extensions form%> 18 | <% end %> 19 | <% if current_user.may_update_user?(@user) or current_user.may_create_user? %> 20 | <% form.buttons do %> 21 | <%= if @commit_text.nil? then form.commit_button else form.commit_button @commit_text end %> 22 | <% end %> 23 | <% end %> 24 | <% end %> 25 |
    26 | -------------------------------------------------------------------------------- /app/views/provider_groups/_provider_group.html.erb: -------------------------------------------------------------------------------- 1 | <% unless current_user.may_update_provider_group?(@provider_group) %> 2 | 7 | <% end %> 8 |
    9 | <% semantic_form_for @provider_group do |form| %> 10 | <%= error_messages @provider_group %> 11 | <% form.inputs do %> 12 | <%= form.input :name, :wrapper_html => { :class => "left" } %> 13 | <%= form.input :state, :as => :select, :collection => Provider.aasm_states_for_select, :include_blank => false %> 14 | <%= form_extensions form%> 15 | <% end %> 16 | <% if current_user.may_update_provider_group?(@provider_group) or current_user.may_create_provider_group? %> 17 | <% form.buttons do %> 18 | <%= if @commit_text.nil? then form.commit_button else form.commit_button @commit_text end %> 19 | <% end %> 20 | <% end %> 21 | <% end %> 22 |
    23 | -------------------------------------------------------------------------------- /public/javascripts/jquery.jtruncate.pack.js: -------------------------------------------------------------------------------- 1 | (function($){$.fn.jTruncate=function(h){var i={length:300,minTrail:20,moreText:"more",lessText:"less",ellipsisText:"...",moreAni:"",lessAni:""};var h=$.extend(i,h);return this.each(function(){obj=$(this);var a=obj.html();if(a.length>h.length+h.minTrail){var b=a.indexOf(' ',h.length);if(b!=-1){var b=a.indexOf(' ',h.length);var c=a.substring(0,b);var d=a.substring(b,a.length-1);obj.html(c+''+h.ellipsisText+''+''+d+'');obj.find('.truncate_more').css("display","none");obj.append('');var e=$('.truncate_more_link',obj);var f=$('.truncate_more',obj);var g=$('.truncate_ellipsis',obj);e.click(function(){if(e.text()==h.moreText){f.show(h.moreAni);e.text(h.lessText);g.css("display","none")}else{f.hide(h.lessAni);e.text(h.moreText);g.css("display","inline")}return false})}}})}})(jQuery); -------------------------------------------------------------------------------- /app/views/layouts/partials/_plugin_submenu.html.erb: -------------------------------------------------------------------------------- 1 | 35 | 38 |
    39 | 40 |
    41 | <%= yield :plugin_menu %> 42 |
    43 |
    44 | -------------------------------------------------------------------------------- /db/migrate/20100805191958_remove_and_add_items_to_confgiuration.rb: -------------------------------------------------------------------------------- 1 | class RemoveAndAddItemsToConfgiuration < ActiveRecord::Migration 2 | def self.up 3 | add_column :configurations, :nf_conntrack_max, :integer 4 | add_column :configurations, :gc_thresh1, :integer 5 | add_column :configurations, :gc_thresh2, :integer 6 | add_column :configurations, :gc_thresh3, :integer 7 | remove_column :configurations, :rate_dfl_percent 8 | remove_column :configurations, :class_start 9 | remove_column :configurations, :rate_granted 10 | end 11 | 12 | def self.down 13 | remove_column :configurations, :nf_conntrack_max 14 | remove_column :configurations, :gc_thresh1 15 | remove_column :configurations, :gc_thresh2 16 | remove_column :configurations, :gc_thresh3 17 | add_column :configurations, :rate_dfl_percent, :string 18 | add_column :configurations, :class_start, :integer 19 | add_column :configurations, :rate_granted, :integer 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /app/views/contracts/_forwarded_port_fields.html.erb: -------------------------------------------------------------------------------- 1 | 12 |
    13 | <%= f.input :provider, :wrapper_html => { :class => "left" }, :input_html => { :class => "provider" } %> 14 | <%= f.input :public_port, :wrapper_html => { :class => "left" }, :input_html => { :class => "port" } %> 15 | <%= f.input :private_port, :wrapper_html => { :class => "left" }, :input_html => { :class => "port" } %> 16 | <%= f.input :tcp, :wrapper_html => { :class => "left down" } %> 17 | <%= f.input :udp, :wrapper_html => { :class => "left down" } %> 18 |
  • <%= link_to_remove_fields t('buttons.delete'), f %>
  • 19 |
    20 |
  • 21 | <%= f.object.errors.on_base %> 22 |
  • 23 |
    24 | 25 | -------------------------------------------------------------------------------- /app/controllers/abouts_controller.rb: -------------------------------------------------------------------------------- 1 | # Sequreisp - Copyright 2010, 2011 Luciano Ruete 2 | # 3 | # This file is part of Sequreisp. 4 | # 5 | # Sequreisp is free software: you can redistribute it and/or modify 6 | # it under the terms of the GNU Afero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # Sequreisp is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Afero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Afero General Public License 16 | # along with Sequreisp. If not, see . 17 | 18 | class AboutsController < ApplicationController 19 | before_filter :require_user 20 | permissions :about 21 | def show 22 | require 'sequreisp_about' 23 | end 24 | end 25 | -------------------------------------------------------------------------------- /vendor/plugins/engines/test/plugins/test_plugin_mailing/app/models/plugin_mail.rb: -------------------------------------------------------------------------------- 1 | class PluginMail < ActionMailer::Base 2 | def mail_from_plugin(note=nil) 3 | body(:note => note) 4 | end 5 | 6 | def mail_from_plugin_with_application_template(note=nil) 7 | body(:note => note) 8 | end 9 | 10 | def multipart_from_plugin 11 | content_type 'multipart/alternative' 12 | part :content_type => "text/html", :body => render_message("multipart_from_plugin_html", {}) 13 | part "text/plain" do |p| 14 | p.body = render_message("multipart_from_plugin_plain", {}) 15 | end 16 | end 17 | 18 | def multipart_from_plugin_with_application_template 19 | content_type 'multipart/alternative' 20 | part :content_type => "text/html", :body => render_message("multipart_from_plugin_with_application_template_html", {}) 21 | part "text/plain" do |p| 22 | p.body = render_message("multipart_from_plugin_with_application_template_plain", {}) 23 | end 24 | end 25 | 26 | end -------------------------------------------------------------------------------- /app/helpers/configurations_helper.rb: -------------------------------------------------------------------------------- 1 | # Sequreisp - Copyright 2010, 2011 Luciano Ruete 2 | # 3 | # This file is part of Sequreisp. 4 | # 5 | # Sequreisp is free software: you can redistribute it and/or modify 6 | # it under the terms of the GNU Afero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # Sequreisp is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Afero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Afero General Public License 16 | # along with Sequreisp. If not, see . 17 | 18 | module ConfigurationsHelper 19 | 20 | def options_for_mail_relay 21 | [[t("messages.configuration.own"), "own"], [t("messages.configuration.gmail"), "gmail"]] 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /config/locales/es.authlogic.yml: -------------------------------------------------------------------------------- 1 | es: 2 | authlogic: 3 | error_messages: 4 | login_blank: no puede estar en blanco 5 | login_not_found: no es válido 6 | login_invalid: debe utilizar sólo letras, números, espacios y .-_@ 7 | consecutive_failed_logins_limit_exceeded: El número de accesos no autorizados se ha superado, la cuenta ha sido desactivada por 2 horas. 8 | email_invalid: no es una dirección de e-mail válida. 9 | password_blank: no puede estar en blanco 10 | password_invalid: no es válido 11 | not_active: Su cuenta está desactivada. 12 | not_confirmed: Su cuenta no está confirmada. 13 | not_approved: Su cuenta no ha sido aprobada. 14 | no_authentication_details: Debe introducir sus datos de identificación. 15 | models: 16 | user_session: Sesión de usuario 17 | attributes: 18 | user_session: 19 | login: nombre de usuario 20 | email: e-mail 21 | password: contraseña 22 | remember_me: Recordarme 23 | -------------------------------------------------------------------------------- /config/locales/pt.authlogic.yml: -------------------------------------------------------------------------------- 1 | pt: 2 | authlogic: 3 | error_messages: 4 | login_blank: não pode estar em blanco 5 | login_not_found: não é válido 6 | login_invalid: deve utilizar só letras, números, espacios e .-_@ 7 | consecutive_failed_logins_limit_exceeded: O número de acessos ãno autorizados tem sido ultrapassado, a conta tem sido desativada por duas horas. 8 | email_invalid: não é um endereço de de e-mail válido. 9 | password_blank: não pode estar em blanco 10 | password_invalid: não é válido 11 | not_active: Sau conta está desativada. 12 | not_confirmed: Sua conta não está confirmada. 13 | not_approved: Sua conta não tem sido aprovada. 14 | no_authentication_details: Deve ingressar seus dados de identificação. 15 | models: 16 | user_session: Sessão de usuário 17 | attributes: 18 | user_session: 19 | login: nome de usuário 20 | email: e-mail 21 | password: senha 22 | remember_me: Lembrar-me 23 | -------------------------------------------------------------------------------- /vendor/plugins/engines/test/functional/locale_loading_test.rb: -------------------------------------------------------------------------------- 1 | # Tests in this file ensure that: 2 | # 3 | # * translations in the application take precedence over those in plugins 4 | # * translations in subsequently loaded plugins take precendence over those in previously loaded plugins 5 | 6 | require File.dirname(__FILE__) + '/../test_helper' 7 | 8 | class LocaleLoadingTest < ActionController::TestCase 9 | def setup 10 | @request = ActionController::TestRequest.new 11 | @response = ActionController::TestResponse.new 12 | end 13 | 14 | # app takes precedence over plugins 15 | 16 | def test_WITH_a_translation_defined_in_both_app_and_plugin_IT_should_find_the_one_in_app 17 | assert_equal I18n.t('hello'), 'Hello world' 18 | end 19 | 20 | # subsequently loaded plugins take precendence over previously loaded plugins 21 | 22 | def test_WITH_a_translation_defined_in_two_plugins_IT_should_find_the_latter_of_both 23 | assert_equal I18n.t('plugin'), 'beta' 24 | end 25 | end 26 | 27 | -------------------------------------------------------------------------------- /app/views/interfaces/graph.html.erb: -------------------------------------------------------------------------------- 1 | <% content_for :javascript do %> 2 | <%= javascript_include_tag "highcharts" %> 3 | <%= javascript_include_tag "sequreispcharts" %> 4 | <% end %> 5 | 20 | 21 | <% heading t('graph.heading', :name => @graph.name) %> 22 |
    23 |
    24 |

    <%=t 'graph.instant' %>

    25 |
    26 |
    27 |
    28 |
    29 | <%= render :partial => 'shared/graph_history' %> 30 |
    31 | -------------------------------------------------------------------------------- /app/helpers/provider_groups_helper.rb: -------------------------------------------------------------------------------- 1 | # Sequreisp - Copyright 2010, 2011 Luciano Ruete 2 | # 3 | # This file is part of Sequreisp. 4 | # 5 | # Sequreisp is free software: you can redistribute it and/or modify 6 | # it under the terms of the GNU Afero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # Sequreisp is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Afero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Afero General Public License 16 | # along with Sequreisp. If not, see . 17 | 18 | module ProviderGroupsHelper 19 | def pretty_currency_index(ci) 20 | color = ci > 20 ? "#00cc00" : "#ff0000" 21 | "#{ci}" 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /db/migrate/20101124201859_add_general_indexes.rb: -------------------------------------------------------------------------------- 1 | class AddGeneralIndexes < ActiveRecord::Migration 2 | def self.up 3 | add_index :clients, :name 4 | add_index :contracts, :plan_id 5 | add_index :contracts, :client_id 6 | add_index :contracts, :ip 7 | add_index :forwarded_ports, :contract_id 8 | add_index :klasses, :contract_id 9 | add_index :klasses, :number 10 | add_index :provider_klasses, :klassable_id 11 | add_index :providers, :interface_id 12 | add_index :addresses, :addressable_id 13 | end 14 | 15 | def self.down 16 | remove_index :clients, :name 17 | remove_index :contracts, :plan_id 18 | remove_index :contracts, :client_id 19 | remove_index :contracts, :ip 20 | remove_index :forwarded_ports, :contract_id 21 | remove_index :klasses, :contract_id 22 | remove_index :klasses, :number 23 | remove_index :provider_klasses, :klassable_id 24 | remove_index :providers, :interface_id 25 | remove_index :addresses, :addressable_id 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /app/models/klass.rb: -------------------------------------------------------------------------------- 1 | # Sequreisp - Copyright 2010, 2011 Luciano Ruete 2 | # 3 | # This file is part of Sequreisp. 4 | # 5 | # Sequreisp is free software: you can redistribute it and/or modify 6 | # it under the terms of the GNU Afero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # Sequreisp is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Afero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Afero General Public License 16 | # along with Sequreisp. If not, see . 17 | 18 | class Klass < ActiveRecord::Base 19 | belongs_to :contract 20 | 21 | def prio1 22 | self.number + 1 23 | end 24 | def prio2 25 | self.number + 2 26 | end 27 | def prio3 28 | self.number + 3 29 | end 30 | end 31 | -------------------------------------------------------------------------------- /app/views/iproutes/_iproute.html.erb: -------------------------------------------------------------------------------- 1 | <% unless current_user.may_update_iproute?(@iproute) %> 2 | 7 | <% end %> 8 |
    9 | <% semantic_form_for @iproute do |form| %> 10 | <%= error_messages @iproute %> 11 | <% form.inputs do %> 12 | <%= form.input :dst_address, :wrapper_html => { :class => "left" } %> 13 | <%= form.input :gateway, :wrapper_html => { :class => "left" } %> 14 | <%= form.input :interface, :wrapper_html => { :class => "left" } %> 15 | <%= form.input :detail, :wrapper_html => { :class => "left" } %> 16 |
    17 | <%= form_extensions form %> 18 | <% end %> 19 | <% if current_user.may_update_iproute?(@iproute) or current_user.may_create_iproute? %> 20 | <% form.buttons do %> 21 | <%= if @commit_text.nil? then form.commit_button else form.commit_button @commit_text end %> 22 | <% end %> 23 | <% end %> 24 | <% end %> 25 |
    26 | -------------------------------------------------------------------------------- /app/models/queued_command.rb: -------------------------------------------------------------------------------- 1 | # Sequreisp - Copyright 2010, 2011 Luciano Ruete 2 | # 3 | # This file is part of Sequreisp. 4 | # 5 | # Sequreisp is free software: you can redistribute it and/or modify 6 | # it under the terms of the GNU Afero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # Sequreisp is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Afero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Afero General Public License 16 | # along with Sequreisp. If not, see . 17 | 18 | class QueuedCommand < ActiveRecord::Base 19 | named_scope :pending, :conditions => { :executed => false } 20 | def initialize(attributes = nil) 21 | super(attributes) 22 | self.command = "" if self.command.nil? 23 | end 24 | end 25 | -------------------------------------------------------------------------------- /bin/sequreisp_rrd_feed.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Sequreisp - Copyright 2010, 2011 Luciano Ruete 4 | # 5 | # This file is part of Sequreisp. 6 | # 7 | # Sequreisp is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU Afero General Public License as published by 9 | # the Free Software Foundation, either version 3 of the License, or 10 | # (at your option) any later version. 11 | # 12 | # Sequreisp is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU Afero General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU Afero General Public License 18 | # along with Sequreisp. If not, see . 19 | 20 | #avoid run multiple instaneces of feeder 21 | #set -x 22 | script="sequreisp_rrd_feed.rb" 23 | count=$(pgrep -c -f $script) 24 | if [ $count -eq 0 ]; then 25 | ../script/runner -e production $script 2>/dev/null 26 | fi 27 | -------------------------------------------------------------------------------- /public/422.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | The change you wanted was rejected (422) 9 | 21 | 22 | 23 | 24 | 25 |
    26 |

    The change you wanted was rejected.

    27 |

    Maybe you tried to change something you didn't have access to.

    28 |
    29 | 30 | -------------------------------------------------------------------------------- /app/helpers/providers_helper.rb: -------------------------------------------------------------------------------- 1 | # Sequreisp - Copyright 2010, 2011 Luciano Ruete 2 | # 3 | # This file is part of Sequreisp. 4 | # 5 | # Sequreisp is free software: you can redistribute it and/or modify 6 | # it under the terms of the GNU Afero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # Sequreisp is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Afero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Afero General Public License 16 | # along with Sequreisp. If not, see . 17 | 18 | module ProvidersHelper 19 | # this display_name is hookeable with alias_method_chain, should check plugins if changed 20 | def display_name(provider) 21 | h "#{provider.name} (#{t('selects.provider.kind.' + provider.kind)})" 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /public/404.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | The page you were looking for doesn't exist (404) 9 | 21 | 22 | 23 | 24 | 25 |
    26 |

    The page you were looking for doesn't exist.

    27 |

    You may have mistyped the address or the page may have moved.

    28 |
    29 | 30 | -------------------------------------------------------------------------------- /app/views/avoid_balancing_hosts/_avoid_balancing_host.html.erb: -------------------------------------------------------------------------------- 1 | <% unless current_user.may_update_avoid_balancing_host?(@avoid_balancing_host) %> 2 | 7 | <% end %> 8 |
    9 | <% semantic_form_for @avoid_balancing_host do |form| %> 10 | <%= error_messages @avoid_balancing_host %> 11 | <% form.inputs do %> 12 | <%= form.input :name, :wrapper_html => { :class => "left" } %> 13 | <%= form.input :provider, :wrapper_html => { :class => "left" } %> 14 | <%= form.input :detail, :wrapper_html => { :class => "left" } %> 15 |
    16 | <%= form_extensions form %> 17 | <% end %> 18 | <% if current_user.may_update_avoid_balancing_host?(@avoid_balancing_host) or current_user.may_create_avoid_balancing_host? %> 19 | <% form.buttons do %> 20 | <%= if @commit_text.nil? then form.commit_button else form.commit_button @commit_text end %> 21 | <% end %> 22 | <% end %> 23 | <% end %> 24 |
    25 | -------------------------------------------------------------------------------- /app/models/prohibited_forward_port.rb: -------------------------------------------------------------------------------- 1 | # Sequreisp - Copyright 2010, 2011 Luciano Ruete 2 | # 3 | # This file is part of Sequreisp. 4 | # 5 | # Sequreisp is free software: you can redistribute it and/or modify 6 | # it under the terms of the GNU Afero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # Sequreisp is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Afero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Afero General Public License 16 | # along with Sequreisp. If not, see . 17 | 18 | class ProhibitedForwardPort < ActiveRecord::Base 19 | before_save :set_tcp_by_default 20 | 21 | validates_presence_of :port 22 | 23 | def set_tcp_by_default 24 | if !self.tcp and !self.udp 25 | self.tcp = true 26 | end 27 | end 28 | end 29 | -------------------------------------------------------------------------------- /lib/prios_check.rb: -------------------------------------------------------------------------------- 1 | module PriosCheck 2 | FILE_SERVICES = RAILS_ROOT + "/db/files/valid_services" 3 | FILE_PROTOCOLS = RAILS_ROOT + "/db/files/valid_protocols" 4 | FILE_HELPERS = RAILS_ROOT + "/db/files/valid_helpers" 5 | def validate_in_range_or_in_file(attr, min, max, type) 6 | if self[attr].present? 7 | file = case type 8 | when :service 9 | FILE_SERVICES 10 | when :protocol 11 | FILE_PROTOCOLS 12 | when :helper 13 | FILE_HELPERS 14 | end 15 | valid_services= IO.readlines(file).collect{ |i| i.chomp } rescue [] 16 | invalid_values = [] 17 | self[attr].split(/,|:/).each do |i| 18 | is_integer = Integer(i) rescue false 19 | unless (is_integer and i.to_i > min and i.to_i < max) or valid_services.include?(i) 20 | invalid_values << i 21 | end 22 | end 23 | if not invalid_values.empty? 24 | errors.add(attr, I18n.t('validations.contract.in_range_or_in_file_invalid', :invalid_values => invalid_values.join(","))) 25 | end 26 | end 27 | end 28 | end 29 | -------------------------------------------------------------------------------- /app/views/layouts/application.html.erb: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | <%= yield :page_header %> 7 | <%= render :partial => "layouts/partials/head" %> 8 | 9 | > 10 |
    11 | <%= render :partial => "layouts/partials/header" %> 12 |
    13 | <%= render :partial => "layouts/partials/apply_changes_banner" %> 14 | <%= render :partial => "layouts/partials/menu" %> 15 | <%= yield :sequreisp_plugin_menu %> 16 | <%= render :partial => "layouts/partials/notification" %> 17 |
    18 | <%= yield :heading %> 19 |
    20 | <%= yield %> 21 |
    22 | <%= render :partial => "layouts/partials/footer" %> 23 |
    24 | <%= render :partial => "layouts/partials/context_help" %> 25 | 26 | 27 | -------------------------------------------------------------------------------- /vendor/plugins/engines/test/functional/routes_test.rb: -------------------------------------------------------------------------------- 1 | # Tests in this file ensure that: 2 | # 3 | # * Routes from plugins can be routed to 4 | # * Named routes can be defined within a plugin 5 | 6 | require File.dirname(__FILE__) + '/../test_helper' 7 | 8 | class RoutesTest < ActionController::TestCase 9 | tests TestRoutingController 10 | 11 | def test_WITH_a_route_defined_in_a_plugin_IT_should_route_it 12 | path = '/routes/an_action' 13 | opts = {:controller => 'test_routing', :action => 'an_action'} 14 | assert_routing path, opts 15 | assert_recognizes opts, path # not sure what exactly the difference is, but it won't hurt either 16 | end 17 | 18 | def test_WITH_a_route_for_a_namespaced_controller_defined_in_a_plugin_IT_should_route_it 19 | path = 'somespace/routes/an_action' 20 | opts = {:controller => 'namespace/test_routing', :action => 'an_action'} 21 | assert_routing path, opts 22 | assert_recognizes opts, path 23 | end 24 | 25 | def test_should_properly_generate_named_routes 26 | get :test_named_routes_from_plugin 27 | assert_response_body '/somespace/routes' 28 | end 29 | end -------------------------------------------------------------------------------- /config/environments/production.rb: -------------------------------------------------------------------------------- 1 | # Settings specified here will take precedence over those in config/environment.rb 2 | 3 | # The production environment is meant for finished, "live" apps. 4 | # Code is not reloaded between requests 5 | config.cache_classes = true 6 | 7 | # Full error reports are disabled and caching is turned on 8 | config.action_controller.consider_all_requests_local = false 9 | config.action_controller.perform_caching = true 10 | config.action_view.cache_template_loading = true 11 | 12 | # See everything in the log (default is :info) 13 | # config.log_level = :debug 14 | 15 | # Use a different logger for distributed setups 16 | # config.logger = SyslogLogger.new 17 | 18 | # Use a different cache store in production 19 | # config.cache_store = :mem_cache_store 20 | 21 | # Enable serving of images, stylesheets, and javascripts from an asset server 22 | # config.action_controller.asset_host = "http://assets.example.com" 23 | 24 | # Disable delivery errors, bad email addresses will be ignored 25 | config.action_mailer.raise_delivery_errors = false 26 | 27 | # Enable threaded mode 28 | # config.threadsafe! 29 | -------------------------------------------------------------------------------- /db/migrate/20140529164321_add_attr_for_mail_relay_in_configuration.rb: -------------------------------------------------------------------------------- 1 | class AddAttrForMailRelayInConfiguration < ActiveRecord::Migration 2 | def self.up 3 | add_column :configurations, :mail_relay_manipulated_for_sequreisp, :boolean, :default => false 4 | add_column :configurations, :mail_relay_used, :boolean, :default => false 5 | add_column :configurations, :mail_relay_option_server, :string 6 | add_column :configurations, :mail_relay_smtp_server, :string 7 | add_column :configurations, :mail_relay_smtp_port, :integer 8 | add_column :configurations, :mail_relay_mail, :string 9 | add_column :configurations, :mail_relay_password, :string 10 | end 11 | 12 | def self.down 13 | remove_column :configurations, :mail_relay_manipulated_for_sequreisp 14 | remove_column :configurations, :mail_relay_used 15 | remove_column :configurations, :mail_relay_option_server 16 | remove_column :configurations, :mail_relay_smtp_server 17 | remove_column :configurations, :mail_relay_smtp_port 18 | remove_column :configurations, :mail_relay_mail 19 | remove_column :configurations, :mail_relay_password 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /public/stylesheets/scaffold.css: -------------------------------------------------------------------------------- 1 | body { background-color: #fff; color: #333; } 2 | 3 | body, p, ol, ul, td { 4 | font-family: verdana, arial, helvetica, sans-serif; 5 | font-size: 13px; 6 | line-height: 18px; 7 | } 8 | 9 | pre { 10 | background-color: #eee; 11 | padding: 10px; 12 | font-size: 11px; 13 | } 14 | 15 | a { color: #000; } 16 | a:visited { color: #666; } 17 | a:hover { color: #fff; background-color:#000; } 18 | 19 | .fieldWithErrors { 20 | padding: 2px; 21 | background-color: red; 22 | display: table; 23 | } 24 | 25 | #errorExplanation { 26 | width: 400px; 27 | border: 2px solid red; 28 | padding: 7px; 29 | padding-bottom: 12px; 30 | margin-bottom: 20px; 31 | background-color: #f0f0f0; 32 | } 33 | 34 | #errorExplanation h2 { 35 | text-align: left; 36 | font-weight: bold; 37 | padding: 5px 5px 5px 15px; 38 | font-size: 12px; 39 | margin: -7px; 40 | background-color: #c00; 41 | color: #fff; 42 | } 43 | 44 | #errorExplanation p { 45 | color: #333; 46 | margin-bottom: 0; 47 | padding: 5px; 48 | } 49 | 50 | #errorExplanation ul li { 51 | font-size: 12px; 52 | list-style: square; 53 | } 54 | 55 | -------------------------------------------------------------------------------- /lib/ip_address_check.rb: -------------------------------------------------------------------------------- 1 | module IpAddressCheck 2 | 3 | def self.included(base) 4 | return if base.include? InstanceMethods 5 | 6 | base.send(:include, InstanceMethods) 7 | base.send(:extend, ClassMethods) 8 | 9 | base.class_eval do 10 | @__ip_fields ||= [] 11 | validate :check_ip_fields 12 | end 13 | end 14 | module ClassMethods 15 | def validate_ip_format_of(*args) 16 | options = args.extract_options! 17 | @__ip_fields += args 18 | args.each do |f| 19 | unless options[:with_netmask] 20 | validates_format_of f, :with => /^([12]{0,1}[0-9]{0,1}[0-9]{1}\.){3}[12]{0,1}[0-9]{0,1}[0-9]{1}$/, :allow_blank => true 21 | end 22 | end 23 | end 24 | end 25 | 26 | module InstanceMethods 27 | def check_ip_fields 28 | fields = self.class.instance_eval do @__ip_fields end 29 | fields.each do |f| 30 | next if self[f].blank? 31 | begin 32 | ip = IP.new self[f] 33 | self[f] = ip.to_s 34 | rescue 35 | errors.add f, I18n.t("validations.ip_is_not_valid") 36 | end 37 | end 38 | end 39 | end 40 | end 41 | -------------------------------------------------------------------------------- /vendor/plugins/engines/MIT-LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2008 James Adam 2 | 3 | The MIT License 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /vendor/plugins/validation_reflection/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2006 Michael Schuerig 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /lib/generators/sequreisp_plugin/templates/MIT-LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2011 [name of plugin creator] 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /public/stylesheets/formtastic_changes.css: -------------------------------------------------------------------------------- 1 | /* ------------------------------------------------------------------------------------------------- 2 | 3 | Load this stylesheet after formtastic.css in your layouts to override the CSS to suit your needs. 4 | This will allow you to update formtastic.css with new releases without clobbering your own changes. 5 | 6 | For example, to make the inline hint paragraphs a little darker in color than the standard #666: 7 | 8 | form.formtastic fieldset ol li p.inline-hints { color:#333; } 9 | 10 | --------------------------------------------------------------------------------------------------*/ 11 | 12 | form.formtastic fieldset ol li.string input { width:220px; } 13 | form.formtastic fieldset ol li.password input { width:220px; } 14 | form.formtastic fieldset ol li.numeric input { width:220px; } 15 | form.formtastic fieldset ol li.text textarea { width:220px; } 16 | 17 | form.formtastic fieldset ol li label { } 18 | /*required rojo*/ 19 | form.formtastic abbr, form.formtastic acronym { color: #F00; } 20 | 21 | /*inline hints*/ 22 | form.formtastic fieldset ol li p.inline-hints { font-size: 11px; } 23 | form.formtastic fieldset ol li p.inline-errors { font-size: 11px; } 24 | -------------------------------------------------------------------------------- /vendor/plugins/validation_reflection/CHANGELOG: -------------------------------------------------------------------------------- 1 | == 0.3.5, 2009-10-09 2 | * version bump 3 | 4 | == 0.3.4, 2009-10-09 5 | * Enhancements from Jonas Grimfelt 6 | ** Don't include instead of explicit namespaces to make the code much DRY:er and readable 7 | ** Avoid mutable strings 8 | ** Be clear about the namespaces for external classes (to avoid Ruby 1.9.x issues) 9 | ** Fixing gem loading issues on Ruby 1.9.x 10 | ** Removed the freezing of validations 11 | 12 | == 0.3.3, 2009-09-12 13 | * version bump 14 | 15 | == 0.3.2, 2009-09-12 16 | * gemified by Christopher Redinger 17 | 18 | == 0.3.1, 2008-01-03 19 | * require 'ostruct'; thanks to Georg Friedrich. 20 | 21 | == 0.3, 2008-01-01 22 | * Added configurability in config/plugins/validation_reflection.rb 23 | 24 | == 0.2.1, 2006-12-28 25 | * Moved lib files into subfolder boiler_plate. 26 | 27 | == 0.2, 2006-08-06 28 | ? 29 | 30 | = Deprecation Notice 31 | 32 | Version 0.1 had supplied three methods 33 | 34 | - validates_presence_of_mandatory_content_columns 35 | - validates_lengths_of_string_attributes 36 | - validates_all_associated 37 | 38 | These have been removed. Please use the Enforce Schema Rules plugin instead 39 | 40 | http://enforce-schema-rules.googlecode.com/svn/trunk/enforce_schema_rules/ 41 | -------------------------------------------------------------------------------- /app/helpers/graphs_helper.rb: -------------------------------------------------------------------------------- 1 | # Sequreisp - Copyright 2010, 2011 Luciano Ruete 2 | # 3 | # This file is part of Sequreisp. 4 | # 5 | # Sequreisp is free software: you can redistribute it and/or modify 6 | # it under the terms of the GNU Afero General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # Sequreisp is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Afero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Afero General Public License 16 | # along with Sequreisp. If not, see . 17 | 18 | module GraphsHelper 19 | def instant_rate_path 20 | case @graph.element.class.to_s 21 | when "Contract" 22 | instant_rate_contract_path(@graph.element) 23 | when "Provider" 24 | instant_rate_interface_path(@graph.element.interface) 25 | when "ProviderGroup" 26 | instant_rate_provider_group_path(@graph.element) 27 | when "Interface" 28 | instant_rate_interface_path(@graph.element) 29 | end 30 | end 31 | end 32 | -------------------------------------------------------------------------------- /public/stylesheets/application.css: -------------------------------------------------------------------------------- 1 | 2 | /*-------------------------------------------------------------------------------------------------- 3 | PAGE DEFINITIONS 4 | --------------------------------------------------------------------------------------------------*/ 5 | 6 | body { 7 | min-width: 100%; 8 | font-family: "Helvetica Neue", Helvetica, clean, sans-serif; 9 | font-size: 13px; 10 | } 11 | 12 | #container { 13 | } 14 | 15 | h1 { 16 | font-size: 24px; 17 | font-weight: normal; 18 | margin: 6px 0 24px 0; 19 | } 20 | 21 | #buttons { 22 | height: 50px; 23 | } 24 | 25 | #links { 26 | height: 50px; 27 | } 28 | 29 | /* 30 | Deprecated in favor of foldeable menues 31 | #plugins_menu { 32 | display:none; 33 | border-top: #C4C4B5 solid 1px; 34 | } 35 | */ 36 | 37 | div#apply_changes_banner{ 38 | background-color: #B6B6B6; 39 | height: 40px; 40 | margin: 0 -20px 0 -20px; 41 | 42 | } 43 | 44 | div#apply_changes_banner a{ 45 | background-color: #B6B6B6; 46 | } 47 | div#apply_changes_banner span#apply_changes_notice{ 48 | line-height: 40px; 49 | margin:0 20px; 50 | color: #900; 51 | font-weight: bold; 52 | } 53 | 54 | div#apply_changes_button{ 55 | float:right; 56 | padding-right: 20px; 57 | margin-top: 7px; 58 | } 59 | 60 | 61 | -------------------------------------------------------------------------------- /spec/factories.rb: -------------------------------------------------------------------------------- 1 | Factory.define :client do |f| 2 | f.sequence(:name) { |n| Faker::Name.name + n.to_s } 3 | f.sequence(:email) { |n| n.to_s + Faker::Internet.email } 4 | f.phone Faker::PhoneNumber.phone_number 5 | end 6 | 7 | Factory.define :plan do |f| 8 | f.sequence(:name) {|n| "Test Plan #{n}" } 9 | f.association :provider_group 10 | f.rate_down 0 11 | f.ceil_down 256 12 | f.rate_up 0 13 | f.ceil_up 128 14 | f.transparent_proxy true 15 | end 16 | 17 | Factory.define :contract do |f| 18 | f.sequence(:ip) { |n| "192.168.1.#{n}" } 19 | f.ceil_dfl_percent 70 20 | f.association :client 21 | f.association :plan 22 | end 23 | 24 | Factory.define :provider_group do |f| 25 | f.sequence(:name) {|n| "Test Provider Group #{n}" } 26 | f.after_build do |u| 27 | Factory.create(:provider, :provider_group => u) 28 | end 29 | end 30 | 31 | Factory.define :provider do |f| 32 | f.association :provider_group 33 | f.association :interface 34 | f.sequence(:name) { |n| "Test Provider#{n}" } 35 | f.rate_down 10000000000 36 | f.rate_up 10000000000 37 | f.sequence(:ip) { |n| "192.168.0.#{n}" } 38 | f.kind 'static' 39 | f.netmask '255.255.255.0' 40 | f.gateway '192.168.0.254' 41 | end 42 | 43 | Factory.define :interface do |f| 44 | f.sequence(:name) { |n| 'eth' + n.to_s } 45 | end 46 | -------------------------------------------------------------------------------- /public/javascripts/jquery.autogrowtextarea.js: -------------------------------------------------------------------------------- 1 | /*! * Autogrow Textarea Plugin Version v2.0 * http://www.technoreply.com/autogrow-textarea-plugin-version-2-0 * * Copyright 2011, Jevin O. Sewaruth * * Date: March 13, 2011 */ jQuery.fn.autoGrow = function(){ return this.each(function(){ // Variables var colsDefault = this.cols; var rowsDefault = this.rows; //Functions var grow = function() { growByRef(this); } var growByRef = function(obj) { var linesCount = 0; var lines = obj.value.split('\n'); for (var i=lines.length-1; i>=0; --i) { linesCount += Math.floor((lines[i].length / colsDefault) + 1); } if (linesCount >= rowsDefault) obj.rows = linesCount + 1; else obj.rows = rowsDefault; } var characterWidth = function (obj){ var characterWidth = 0; var temp1 = 0; var temp2 = 0; var tempCols = obj.cols; obj.cols = 1; temp1 = obj.offsetWidth; obj.cols = 2; temp2 = obj.offsetWidth; characterWidth = temp2 - temp1; obj.cols = tempCols; return characterWidth; } // Manipulations this.style.width = "auto"; this.style.height = "auto"; this.style.overflow = "hidden"; this.style.width = ((characterWidth(this) * this.cols) + 6) + "px"; this.onkeyup = grow; this.onfocus = grow; this.onblur = grow; growByRef(this); }); }; -------------------------------------------------------------------------------- /vendor/plugins/engines/test/functional/view_helpers_test.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../test_helper' 2 | 3 | class ViewHelpersTest < ActionController::TestCase 4 | tests AssetsController 5 | 6 | def setup 7 | get :index 8 | end 9 | 10 | def test_plugin_javascript_helpers 11 | base_selector = "script[type='text/javascript']" 12 | js_dir = "/plugin_assets/test_assets/javascripts" 13 | assert_select "#{base_selector}[src='#{js_dir}/file.1.js']" 14 | assert_select "#{base_selector}[src='#{js_dir}/file2.js']" 15 | end 16 | 17 | def test_plugin_stylesheet_helpers 18 | base_selector = "link[media='screen'][rel='stylesheet'][type='text/css']" 19 | css_dir = "/plugin_assets/test_assets/stylesheets" 20 | assert_select "#{base_selector}[href='#{css_dir}/file.1.css']" 21 | assert_select "#{base_selector}[href='#{css_dir}/file2.css']" 22 | end 23 | 24 | def test_plugin_image_helpers 25 | assert_select "img[src='/plugin_assets/test_assets/images/image.png'][alt='Image']" 26 | end 27 | 28 | def test_plugin_layouts 29 | get :index 30 | assert_select "div[id='assets_layout']" 31 | end 32 | 33 | def test_plugin_image_submit_helpers 34 | assert_select "input[src='/plugin_assets/test_assets/images/image.png'][type='image']" 35 | end 36 | 37 | end 38 | -------------------------------------------------------------------------------- /vendor/plugins/engines/lib/engines/plugin/list.rb: -------------------------------------------------------------------------------- 1 | # The PluginList class is an array, enhanced to allow access to loaded plugins 2 | # by name, and iteration over loaded plugins in order of priority. This array is used 3 | # by Engines::RailsExtensions::RailsInitializer to create the Engines.plugins array. 4 | # 5 | # Each loaded plugin has a corresponding Plugin instance within this array, and 6 | # the order the plugins were loaded is reflected in the entries in this array. 7 | # 8 | # For more information, see the Rails module. 9 | module Engines 10 | class Plugin 11 | class List < Array 12 | # Finds plugins with the set with the given name (accepts Strings or Symbols), or 13 | # index. So, Engines.plugins[0] returns the first-loaded Plugin, and Engines.plugins[:engines] 14 | # returns the Plugin instance for the engines plugin itself. 15 | def [](name_or_index) 16 | if name_or_index.is_a?(Fixnum) 17 | super 18 | else 19 | self.find { |plugin| plugin.name.to_s == name_or_index.to_s } 20 | end 21 | end 22 | 23 | # Go through each plugin, highest priority first (last loaded first). Effectively, 24 | # this is like Engines.plugins.reverse 25 | def by_precedence 26 | reverse 27 | end 28 | end 29 | end 30 | end -------------------------------------------------------------------------------- /app/views/configurations/named.conf.options.erb: -------------------------------------------------------------------------------- 1 | options { 2 | directory "/var/cache/bind"; 3 | 4 | // If there is a firewall between you and nameservers you want 5 | // to talk to, you may need to fix the firewall to allow multiple 6 | // ports to talk. See http://www.kb.cert.org/vuls/id/800113 7 | 8 | // If your ISP provided one or more IP addresses for stable 9 | // nameservers, you probably want to use them as forwarders. 10 | // Uncomment the following block, and insert the addresses replacing 11 | // the all-0's placeholder. 12 | 13 | <% params[:forwarders].each do |server| %> 14 | <%= server %> 15 | <% end %> 16 | 17 | //allow-query { 18 | // 127.0.0.1; 19 | // 192.168.0.0/16; 20 | // 10.0.0.0/8; 21 | // 172.16.0.0/12; 22 | // 192.0.2.0/24; 23 | // 198.18.0.0/15; 24 | //}; 25 | auth-nxdomain no; # conform to RFC1035 26 | max-ncache-ttl 1; 27 | #no limito a 90M el cache de bind 28 | max-cache-size 200M; 29 | recursive-clients 3000; 30 | datasize unlimited; 31 | listen-on { !192.0.2.0/24; !198.18.0.0/15; any; }; 32 | listen-on-v6 { none; }; 33 | allow-query { any; }; 34 | }; -------------------------------------------------------------------------------- /public/500.en.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | We're sorry, but something went wrong (500) 9 | 17 | 18 | 19 | 20 | 21 |
    22 | SequreISP 23 |

    There was a problem serving the requested page.

    24 |

    Usually this means that an unexpected error happened while processing 25 | your request. Here's what you can try next:

    26 | 27 |

    Refresh this page, the problem may be temporary.

    28 |

    If the problem persist, contact us and we'll help get you on you way.

    29 |
    30 | 31 | 32 | -------------------------------------------------------------------------------- /app/views/user_sessions/new.html.erb: -------------------------------------------------------------------------------- 1 | 22 | <% content_for :title, t('actions.login') %> 23 | 42 | 43 | --------------------------------------------------------------------------------