├── .copyrightignore ├── .edts ├── .gitignore ├── .gitreview ├── CHANGES ├── CMakeLists.txt ├── GNUmakefile ├── LICENSE.txt ├── README.markdown ├── apps ├── ale │ ├── .gitignore │ ├── Makefile │ ├── README │ ├── VERSION │ ├── include │ │ └── ale.hrl │ ├── rebar │ ├── rebar.config │ ├── src │ │ ├── ale.app.src │ │ ├── ale.erl │ │ ├── ale_app.erl │ │ ├── ale_codegen.erl │ │ ├── ale_default_formatter.erl │ │ ├── ale_disk_sink.erl │ │ ├── ale_dynamic_sup.erl │ │ ├── ale_error_logger_handler.erl │ │ ├── ale_noop_formatter.erl │ │ ├── ale_stderr_sink.erl │ │ ├── ale_sup.erl │ │ ├── ale_transform.erl │ │ ├── ale_utils.erl │ │ └── dynamic_compile.erl │ └── test │ │ └── ale_tests.erl ├── cb_dets │ └── src │ │ ├── cb_dets.app.src │ │ ├── cb_dets.erl │ │ ├── cb_dets.hrl │ │ ├── cb_dets_server.erl │ │ ├── cb_dets_sup.erl │ │ ├── cb_dets_utils.erl │ │ └── cb_dets_v9.erl ├── config_remap │ ├── CMakeLists.txt │ ├── README.md │ ├── rebar.config │ └── src │ │ ├── config_remap.app.src │ │ └── config_remap.erl ├── ns_babysitter │ ├── rebar.config.in │ └── src │ │ ├── cb_gosecrets_runner.erl │ │ ├── child_erlang.erl │ │ ├── child_ns_server_sup.erl │ │ ├── ns_babysitter.app.src │ │ ├── ns_babysitter.erl │ │ ├── ns_babysitter_bootstrap.erl │ │ ├── ns_babysitter_log.erl │ │ ├── ns_babysitter_sup.erl │ │ ├── ns_child_ports_sup.erl │ │ ├── ns_port_server.erl │ │ ├── ns_ports_manager.erl │ │ └── supervisor_cushion.erl ├── ns_common │ ├── include │ │ ├── cut.hrl │ │ └── generic.hrl │ ├── rebar.config │ ├── src │ │ ├── cut.erl │ │ ├── functools.erl │ │ ├── generic.erl │ │ └── ns_common.app.src │ └── test │ │ └── cut_tests.erl ├── ns_couchdb │ ├── rebar.config │ └── src │ │ ├── capi_ddoc_manager.erl │ │ ├── capi_ddoc_manager_sup.erl │ │ ├── capi_frontend.erl │ │ ├── capi_indexer.erl │ │ ├── capi_replication.erl │ │ ├── capi_set_view_manager.erl │ │ ├── capi_spatial.erl │ │ ├── capi_url_cache.erl │ │ ├── capi_utils.erl │ │ ├── capi_view.erl │ │ ├── cb_auth_info.erl │ │ ├── cb_config_couch_sync.erl │ │ ├── cb_couch_sup.erl │ │ ├── cb_init_loggers.erl │ │ ├── couch_log.erl │ │ ├── couch_stats_reader.erl │ │ ├── ns_couchdb.app.src │ │ ├── ns_couchdb.erl │ │ ├── ns_couchdb_api.erl │ │ ├── ns_couchdb_chronicle_dup.erl │ │ ├── ns_couchdb_config_rep.erl │ │ ├── ns_couchdb_config_sup.erl │ │ ├── ns_couchdb_stats_collector.erl │ │ ├── ns_couchdb_storage.erl │ │ ├── ns_couchdb_sup.erl │ │ └── set_view_update_daemon.erl └── ns_server │ ├── include │ ├── bucket_hibernation.hrl │ ├── couch_api_wrap.hrl │ ├── global_tasks.hrl │ ├── jwt.hrl │ ├── mc_constants.hrl │ ├── mc_entry.hrl │ ├── menelaus_web.hrl │ ├── ns_bucket.hrl │ ├── ns_common.hrl │ ├── ns_config.hrl │ ├── ns_heart.hrl │ ├── ns_log.hrl │ ├── ns_stats.hrl │ ├── ns_test.hrl │ ├── pipes.hrl │ ├── rbac.hrl │ ├── service_api.hrl │ └── websocket.hrl │ ├── priv │ └── kv_stats_mappings.txt │ ├── rebar.config.in │ ├── src │ ├── active_cache.erl │ ├── activity_aggregator.erl │ ├── activity_tracker.erl │ ├── addr_util.erl │ ├── analytics_prod_compat.erl │ ├── analytics_settings_manager.erl │ ├── app_telemetry_aggregator.erl │ ├── app_telemetry_pool.erl │ ├── app_telemetry_scraper.erl │ ├── async.erl │ ├── auth_mapping.erl │ ├── auto_failover.erl │ ├── auto_failover_logic.erl │ ├── auto_rebalance.erl │ ├── auto_rebalance_settings.erl │ ├── auto_reprovision.erl │ ├── backoff.erl │ ├── bucket_info_cache.erl │ ├── bucket_placer.erl │ ├── capi_crud.erl │ ├── cb_atomic_persistent_term.erl │ ├── cb_aws_kms_ear_key.erl │ ├── cb_cluster_secrets.erl │ ├── cb_cluster_secrets.hrl │ ├── cb_creds_rotation.erl │ ├── cb_crypto.erl │ ├── cb_deks.erl │ ├── cb_deks_audit.erl │ ├── cb_deks_bucket.erl │ ├── cb_deks_config.erl │ ├── cb_deks_log.erl │ ├── cb_deks_raw_utils.erl │ ├── cb_dist.erl │ ├── cb_epmd.erl │ ├── cb_gcp_kms_ear_key.erl │ ├── cb_kmip_ear_key.erl │ ├── cb_kms_ear_key.erl │ ├── cb_log_counter_sink.erl │ ├── cb_managed_ear_key.erl │ ├── cb_saml.erl │ ├── cb_stats_info.erl │ ├── cb_util.erl │ ├── cgroups.erl │ ├── chronicle_compat.erl │ ├── chronicle_compat_events.erl │ ├── chronicle_kv_log.erl │ ├── chronicle_local.erl │ ├── chronicle_master.erl │ ├── chronicle_metakv.erl │ ├── chronicle_upgrade.erl │ ├── ciphers.erl │ ├── cluster_compat_mode.erl │ ├── cluster_logs_collection_task.erl │ ├── cluster_logs_sup.erl │ ├── collections.erl │ ├── compaction_api.erl │ ├── compaction_daemon.erl │ ├── compaction_dbs.erl │ ├── compaction_scheduler.erl │ ├── compat_mode_manager.erl │ ├── config_profile.erl │ ├── couch_api_wrap.erl │ ├── couch_api_wrap_httpc.erl │ ├── dcp_commands.erl │ ├── dcp_consumer_conn.erl │ ├── dcp_producer_conn.erl │ ├── dcp_proxy.erl │ ├── dcp_replication_manager.erl │ ├── dcp_replicator.erl │ ├── dcp_sup.erl │ ├── dcp_traffic_monitor.erl │ ├── derived_metrics.erl │ ├── diag_handler.erl │ ├── dir_size.erl │ ├── dist_manager.erl │ ├── doc_replication_srv.erl │ ├── doc_replicator.erl │ ├── docs_kv_sup.erl │ ├── encryption_service.erl │ ├── event_log.erl │ ├── event_log_server.erl │ ├── eventing_settings_manager.erl │ ├── failover.erl │ ├── failover_safeness_level.erl │ ├── fusion_local_agent.erl │ ├── fusion_uploaders.erl │ ├── gen_server2.erl │ ├── global_tasks.erl │ ├── goport.erl │ ├── gossip_replicator.erl │ ├── goxdcr_rest.erl │ ├── goxdcr_status_keeper.erl │ ├── guardrail_enforcer.erl │ ├── guardrail_monitor.erl │ ├── health_monitor.erl │ ├── health_monitor_sup.erl │ ├── hibernation_manager.erl │ ├── hibernation_utils.erl │ ├── http_uri_deprecated.erl │ ├── index_monitor.erl │ ├── index_settings_manager.erl │ ├── initargs_updater.erl │ ├── janitor_agent.erl │ ├── janitor_agent_sup.erl │ ├── json_builder.erl │ ├── json_rpc_connection.erl │ ├── json_rpc_connection_sup.erl │ ├── json_settings_manager.erl │ ├── jwt_auth.erl │ ├── jwt_cache.erl │ ├── jwt_issuer.erl │ ├── kv_hibernation_agent.erl │ ├── kv_monitor.erl │ ├── kv_stats_monitor.erl │ ├── ldap_auth.erl │ ├── ldap_auth_cache.erl │ ├── ldap_filter_parser.erl │ ├── ldap_rfc4515_lexer.xrl │ ├── ldap_rfc4515_parser.yrl │ ├── ldap_util.erl │ ├── leader_activities.erl │ ├── leader_lease_acquire_worker.erl │ ├── leader_lease_acquirer.erl │ ├── leader_lease_agent.erl │ ├── leader_leases_sup.erl │ ├── leader_quorum_nodes_manager.erl │ ├── leader_registry.erl │ ├── leader_registry_sup.erl │ ├── leader_services_sup.erl │ ├── leader_utils.erl │ ├── license_reporting.erl │ ├── local_tasks.erl │ ├── log_os_info.erl │ ├── master_activity_events.erl │ ├── master_activity_events_keeper.erl │ ├── master_activity_events_pids_watcher.erl │ ├── mb_map.erl │ ├── mb_master.erl │ ├── mb_master_sup.erl │ ├── mc_binary.erl │ ├── mc_client_binary.erl │ ├── memcached_auth_server.erl │ ├── memcached_bucket_config.erl │ ├── memcached_cfg.erl │ ├── memcached_config_mgr.erl │ ├── memcached_passwords.erl │ ├── memcached_permissions.erl │ ├── memcached_refresh.erl │ ├── memory_quota.erl │ ├── menelaus_access_log_formatter.erl │ ├── menelaus_alert.erl │ ├── menelaus_auth.erl │ ├── menelaus_cbauth.erl │ ├── menelaus_cbauth_worker.erl │ ├── menelaus_deps.erl │ ├── menelaus_event.erl │ ├── menelaus_local_auth.erl │ ├── menelaus_metakv.erl │ ├── menelaus_metakv2.erl │ ├── menelaus_old_roles.erl │ ├── menelaus_pluggable_ui.erl │ ├── menelaus_rest.erl │ ├── menelaus_roles.erl │ ├── menelaus_stats.erl │ ├── menelaus_stats_gatherer.erl │ ├── menelaus_sup.erl │ ├── menelaus_ui_auth.erl │ ├── menelaus_users.erl │ ├── menelaus_util.erl │ ├── menelaus_web.erl │ ├── menelaus_web_activity.erl │ ├── menelaus_web_alerts_srv.erl │ ├── menelaus_web_analytics.erl │ ├── menelaus_web_app_telemetry.erl │ ├── menelaus_web_audit.erl │ ├── menelaus_web_auto_failover.erl │ ├── menelaus_web_auto_rebalance.erl │ ├── menelaus_web_autocompaction.erl │ ├── menelaus_web_buckets.erl │ ├── menelaus_web_cache.erl │ ├── menelaus_web_cert.erl │ ├── menelaus_web_cluster.erl │ ├── menelaus_web_cluster_logs.erl │ ├── menelaus_web_collections.erl │ ├── menelaus_web_crud.erl │ ├── menelaus_web_encr_at_rest.erl │ ├── menelaus_web_fusion.erl │ ├── menelaus_web_groups.erl │ ├── menelaus_web_guardrails.erl │ ├── menelaus_web_indexes.erl │ ├── menelaus_web_jwt.erl │ ├── menelaus_web_jwt_key.erl │ ├── menelaus_web_ldap.erl │ ├── menelaus_web_license.erl │ ├── menelaus_web_mcd_settings.erl │ ├── menelaus_web_misc.erl │ ├── menelaus_web_node.erl │ ├── menelaus_web_pools.erl │ ├── menelaus_web_prometheus.erl │ ├── menelaus_web_queries.erl │ ├── menelaus_web_rbac.erl │ ├── menelaus_web_recovery.erl │ ├── menelaus_web_saml.erl │ ├── menelaus_web_samples.erl │ ├── menelaus_web_secrets.erl │ ├── menelaus_web_settings.erl │ ├── menelaus_web_settings2.erl │ ├── menelaus_web_sm.erl │ ├── menelaus_web_stats.erl │ ├── menelaus_web_sup.erl │ ├── menelaus_web_xdcr_target.erl │ ├── menelaus_websocket.erl │ ├── metakv.erl │ ├── misc.erl │ ├── mru_cache.erl │ ├── netconfig_updater.erl │ ├── network.erl │ ├── new_concurrency_throttle.erl │ ├── node_monitor.erl │ ├── node_status_analyzer.erl │ ├── ns_audit.erl │ ├── ns_audit_cfg.erl │ ├── ns_bootstrap.erl │ ├── ns_bucket.erl │ ├── ns_bucket_sup.erl │ ├── ns_bucket_worker.erl │ ├── ns_bucket_worker_sup.erl │ ├── ns_cgroups_manager.erl │ ├── ns_cluster.erl │ ├── ns_cluster_membership.erl │ ├── ns_config.erl │ ├── ns_config_auth.erl │ ├── ns_config_default.erl │ ├── ns_config_log.erl │ ├── ns_config_rep.erl │ ├── ns_config_rep_sup.erl │ ├── ns_config_replica.erl │ ├── ns_config_sup.erl │ ├── ns_connection_pool.erl │ ├── ns_cookie_manager.erl │ ├── ns_disksup.erl │ ├── ns_doctor.erl │ ├── ns_doctor_sup.erl │ ├── ns_email_alert.erl │ ├── ns_error_messages.erl │ ├── ns_gc_runner.erl │ ├── ns_heart.erl │ ├── ns_heart_sup.erl │ ├── ns_info.erl │ ├── ns_janitor.erl │ ├── ns_janitor_server.erl │ ├── ns_log.erl │ ├── ns_log_browser.erl │ ├── ns_log_categorizing.erl │ ├── ns_log_sink.erl │ ├── ns_mail.erl │ ├── ns_memcached.erl │ ├── ns_memcached_sockets_pool.erl │ ├── ns_memcached_sup.erl │ ├── ns_node_disco.erl │ ├── ns_node_disco_log.erl │ ├── ns_node_disco_sup.erl │ ├── ns_online_config_upgrader.erl │ ├── ns_orchestrator.erl │ ├── ns_orchestrator_child_sup.erl │ ├── ns_orchestrator_sup.erl │ ├── ns_ports_setup.erl │ ├── ns_process_registry.erl │ ├── ns_pubsub.erl │ ├── ns_rebalance_observer.erl │ ├── ns_rebalance_report_manager.erl │ ├── ns_rebalancer.erl │ ├── ns_secrets.erl │ ├── ns_server.app.src.in │ ├── ns_server.erl │ ├── ns_server_cert.erl │ ├── ns_server_cluster_sup.erl │ ├── ns_server_monitor.erl │ ├── ns_server_nodes_sup.erl │ ├── ns_server_stats.erl │ ├── ns_server_sup.erl │ ├── ns_server_testrunner_api.erl │ ├── ns_single_vbucket_mover.erl │ ├── ns_ssl_services_setup.erl │ ├── ns_ssl_services_sup.erl │ ├── ns_storage_conf.erl │ ├── ns_tick.erl │ ├── ns_tick_agent.erl │ ├── ns_vbucket_mover.erl │ ├── one_shot_barrier.erl │ ├── path_config.erl │ ├── pipes.erl │ ├── promQL.erl │ ├── prometheus.erl │ ├── prometheus_cfg.erl │ ├── query_rest.erl │ ├── query_settings_manager.erl │ ├── rebalance.erl │ ├── rebalance_agent.erl │ ├── rebalance_quirks.erl │ ├── rebalance_stage_info.erl │ ├── recovery.erl │ ├── recovery_server.erl │ ├── remote_api.erl │ ├── remote_monitors.erl │ ├── replicated_dets.erl │ ├── replicated_storage.erl │ ├── replication_manager.erl │ ├── request_tracker.erl │ ├── rest_lhttpc_pool_sup.erl │ ├── rest_utils.erl │ ├── restartable.erl │ ├── ringbuffer.erl │ ├── roles_cache.erl │ ├── root_sup.erl │ ├── samples_loader_tasks.erl │ ├── saslauthd_auth.erl │ ├── scram_sha.erl │ ├── service_agent.erl │ ├── service_agent_sup.erl │ ├── service_api.erl │ ├── service_cbas.erl │ ├── service_eventing.erl │ ├── service_fts.erl │ ├── service_index.erl │ ├── service_janitor.erl │ ├── service_manager.erl │ ├── service_ports.erl │ ├── service_stats_collector.erl │ ├── service_status_keeper.erl │ ├── service_status_keeper_sup.erl │ ├── services_stats_sup.erl │ ├── sigar.erl │ ├── simple_store.erl │ ├── single_bucket_kv_sup.erl │ ├── sjson.erl │ ├── stat_names_mappings.erl │ ├── stats_archiver.erl │ ├── stats_interface.erl │ ├── stats_reader.erl │ ├── suppress_max_restart_intensity.erl │ ├── terse_bucket_info_uploader.erl │ ├── terse_cluster_info_uploader.erl │ ├── testconditions.erl │ ├── timeout_diag_logger.erl │ ├── timer_lag_recorder.erl │ ├── token_server.erl │ ├── tombstone_agent.erl │ ├── tombstone_keeper.erl │ ├── tombstone_purger.erl │ ├── user_io.erl │ ├── users_storage_sup.erl │ ├── users_sup.erl │ ├── validator.erl │ ├── vbucket_map_mirror.erl │ ├── vbucket_move_scheduler.erl │ ├── vclock.erl │ ├── versioned_cache.erl │ ├── work_queue.erl │ └── yaml.erl │ └── test │ ├── cgroup_v2_tests.erl │ ├── cgroups2 │ ├── cgroup.controllers │ ├── cgroup.procs │ ├── correct_mtab │ ├── incorrect_mtab_flags │ ├── memory.current │ ├── memory.high │ ├── memory.max │ ├── no_cgroup_mtab │ └── services │ │ ├── cgroup.controllers │ │ ├── cgroup.procs │ │ ├── kv │ │ ├── cgroup.controllers │ │ ├── cgroup.procs │ │ ├── memory.current │ │ ├── memory.high │ │ └── memory.max │ │ ├── memory.current │ │ ├── memory.high │ │ ├── memory.max │ │ ├── n1ql │ │ ├── cgroup.controllers │ │ ├── cgroup.procs │ │ ├── memory.current │ │ ├── memory.high │ │ └── memory.max │ │ └── ns_server │ │ ├── cgroup.controllers │ │ ├── cgroup.procs │ │ ├── memory.current │ │ ├── memory.high │ │ └── memory.max │ ├── dcp_tests.erl │ ├── failover_tests.erl │ ├── fake_chronicle_kv.erl │ ├── fake_config_helpers.erl │ ├── fake_dcp_endpoint.erl │ ├── fake_dcp_server.erl │ ├── fake_ns_config.erl │ ├── gen_server2_tests.erl │ ├── health_monitor_tests.erl │ ├── io_lib_tests.erl │ ├── leader_registry_tests.erl │ ├── misc_tests.erl │ ├── mock_helpers.erl │ ├── ns_config_mock_tests.erl │ ├── ns_config_tests.erl │ ├── rebalance_tests.erl │ ├── supervisor_tests.erl │ ├── t.erl │ ├── triq_utils.erl │ ├── tty_safe_stderr_sink.erl │ └── vbucket_move_scheduler_validation.erl ├── cbbrowse_logs ├── cbcollect_info.in ├── cluster_connect ├── cluster_run ├── cluster_tests ├── CMakeLists.txt ├── README ├── dummy_test.py ├── get_pip.cmake ├── requirements.txt ├── resources │ ├── fixtures │ │ ├── analytics_debug.log │ │ ├── backup_with_ldap_group.json │ │ ├── backup_with_users.json │ │ └── full_backup.json │ ├── jwt │ │ ├── jwks.json │ │ ├── jwks_rotated.json │ │ ├── mock_ed25519_private.pem │ │ ├── mock_ed25519_public.pem │ │ ├── mock_ed448_private.pem │ │ ├── mock_ed448_public.pem │ │ ├── mock_es256_private.pem │ │ ├── mock_es256_public.pem │ │ ├── mock_es256k_private.pem │ │ ├── mock_es256k_public.pem │ │ ├── mock_es384_private.pem │ │ ├── mock_es384_public.pem │ │ ├── mock_es512_private.pem │ │ ├── mock_es512_public.pem │ │ ├── mock_hmac_secrets.json │ │ ├── mock_invalid_jwks1.json │ │ ├── mock_invalid_jwks2.json │ │ ├── mock_rsa_private.pem │ │ ├── mock_rsa_private_rotated.pem │ │ ├── mock_rsa_public.pem │ │ └── mock_rsa_public_invalid.pem │ ├── pykmip │ │ ├── kmip_pkcs8.key │ │ ├── localhost.crt │ │ └── private.key │ ├── saml │ │ ├── mockidp2_cert.pem │ │ ├── mockidp2_key.pem │ │ ├── mockidp_cert.pem │ │ ├── mockidp_cert_fingerprints.pem │ │ ├── mockidp_key.pem │ │ ├── mocksp_cert.pem │ │ └── mocksp_key.pem │ ├── secrets_management │ │ ├── getpass.sh │ │ ├── getpass_fail.sh │ │ ├── getpass_notexec.sh │ │ ├── getpass_wrong.sh │ │ └── secretmngmt.py │ └── test_certs │ │ ├── test_CA.pem │ │ ├── test_CA.pkey │ │ ├── test_CA2.pem │ │ ├── test_CA2.pkey │ │ ├── test_CA2_int.pem │ │ └── test_CA2_int.pkey ├── run.py ├── testlib │ ├── __init__.py │ ├── cluster.py │ ├── node.py │ ├── requirements.py │ ├── test_tag_decorator.py │ ├── testlib.py │ └── util.py └── testsets │ ├── alerting_tests.py │ ├── app_telemetry_tests.py │ ├── authn_tests.py │ ├── auto_compaction_test.py │ ├── auto_failover_test.py │ ├── bucket_deletion_test.py │ ├── bucket_dirs_cleanup_tests.py │ ├── bucket_migration_test.py │ ├── bucket_test.py │ ├── cbauth_cache_config_tests.py │ ├── cbcollect_tests.py │ ├── cert_load_tests.py │ ├── cli_integration_tests.py │ ├── collection_tests.py │ ├── config_remap_tests.py │ ├── crud_tests.py │ ├── fusion_tests.py │ ├── hard_reset_test.py │ ├── internal_creds_rotation_tests.py │ ├── jwt_tests.py │ ├── ldap_tests.py │ ├── metakv2_tests.py │ ├── metakv_tests.py │ ├── native_encryption_tests.py │ ├── node_addition_tests.py │ ├── node_remap_tests.py │ ├── pass_hashing_settings_tests.py │ ├── prom_sd_config_test.py │ ├── rebalance_tests.py │ ├── resource_management_test.py │ ├── rest_eject_test.py │ ├── saml_tests.py │ ├── sample_buckets.py │ ├── secret_management_tests.py │ ├── serviceless_node_tests.py │ ├── services_topology_tests.py │ ├── settings_managers_tests.py │ ├── stats_tests.py │ ├── tasks_test.py │ ├── users_backup_tests.py │ ├── users_tests.py │ ├── web_server_tests.py │ └── web_settings_tests.py ├── cmake_modules ├── abspath.cmake ├── couchbase-server-black-duck-manifest.yaml ├── do-dialyzer.cmake ├── do-test.cmake └── string-replace.cmake ├── configure ├── couchbase-server.sh.in ├── deps ├── CMakeLists.txt └── gocode │ ├── CMakeLists.txt │ ├── awsutils │ ├── awsutils.go │ └── awsutils_test.go │ ├── azureutils │ ├── azureutils.go │ └── azureutils_test.go │ ├── chunked_reader │ ├── README.md │ └── chunked_reader.go │ ├── gcputils │ ├── gcputils.go │ └── gcputils_test.go │ ├── generate_cert │ └── generate_cert.go │ ├── generate_hash │ └── generate_hash.go │ ├── go-kmip │ ├── .gitignore │ ├── .golangci.yml │ ├── .travis.yml │ ├── LICENSE │ ├── Makefile │ ├── README.md │ ├── attribute.go │ ├── auth.go │ ├── certificates.go │ ├── client.go │ ├── consts.go │ ├── decode.go │ ├── decode_core.go │ ├── decode_test.go │ ├── doc.go │ ├── encode.go │ ├── encode_core.go │ ├── encode_test.go │ ├── errors.go │ ├── fields.go │ ├── go.mod │ ├── go.sum │ ├── keys.go │ ├── operations.go │ ├── request.go │ ├── request_test.go │ ├── response.go │ ├── server.go │ ├── server_test.go │ ├── tls.go │ ├── tls_test.go │ └── types.go │ ├── go.mod │ ├── go.sum │ ├── gocbutils │ └── utils.go │ ├── godu │ └── godu.go │ ├── goport │ ├── main.go │ ├── netstring.go │ ├── ops.go │ ├── process.go │ ├── reader.go │ ├── utils.go │ ├── utils_linux.go │ ├── utils_other.go │ ├── utils_posix.go │ └── writer.go │ ├── gosecrets │ ├── aws_stored_key.go │ ├── base_stored_key.go │ ├── gcp_stored_key.go │ ├── gosecrets.go │ ├── kmip_stored_key.go │ ├── misc.go │ ├── raw_aes_stored_key.go │ └── stored_keys.go │ ├── kmiputils │ └── kmiputils.go │ ├── minify_css │ └── main.go │ └── minify_js │ └── main.go ├── doc ├── UI-coding-guidelines.txt ├── api-changes │ ├── compact-bucket-links.txt │ └── ddocs-list.txt ├── api.txt ├── cbcollect_info_deps.txt ├── cluster-add-sequence.txt ├── forcing-terse-bucket-info.txt ├── log-files-setup.txt ├── logging-guidelines.txt ├── master-events.txt ├── mb_master_state_diagram.md ├── ns-server-hierarchy.txt ├── rebalance-flow.md ├── some-babysitting-details.txt └── ui-internals-guide.txt ├── etc ├── analytics_profile ├── analytics_provisioned_profile ├── audit_descriptor.json ├── capi.ini.in ├── create-provisioned-cgroups.sh ├── default_profile ├── hosts.cfg ├── metrics_metadata.json ├── provisioned_profile ├── serverless_profile ├── ssl_dist_opts.in └── static_config.in ├── licenses ├── APL2-oidcc.txt ├── APL2.txt ├── BSD-erlang-training.txt ├── BSD-moon.txt ├── BSL-Couchbase.txt ├── EPL-1-1.txt ├── MIT-cnv.txt ├── MIT-jiffy.txt └── MIT-jose.txt ├── priv ├── config └── public │ ├── 2-line-chart.svg │ ├── android-chrome-192x192.png │ ├── android-chrome-512x512.png │ ├── apple-touch-icon.png │ ├── browserconfig.xml │ ├── cb_logo_bug_white.svg │ ├── cb_logo_bug_white_2.svg │ ├── cb_logo_red_withtext.svg │ ├── favicon-16x16.png │ ├── favicon-32x32.png │ ├── favicon.ico │ ├── manifest.json │ ├── mstile-144x144.png │ ├── mstile-150x150.png │ ├── mstile-310x150.png │ ├── mstile-310x310.png │ ├── mstile-70x70.png │ ├── safari-pinned-tab.svg │ ├── spinner_3.gif │ └── ui │ ├── .eslintrc.json │ ├── .gitignore │ ├── CE_license_agreement.txt │ ├── EE_subscription_license_agreement.txt │ ├── README.md │ ├── app-old │ ├── app.js │ ├── mn-admin-component.js │ ├── mn-admin-service.js │ ├── mn-admin.html │ ├── mn-auto-compaction-component.js │ ├── mn-auto-compaction-form-component.js │ ├── mn-auto-compaction-form.html │ ├── mn-auto-compaction.html │ ├── mn-bar-usage-component.js │ ├── mn-bar-usage.html │ ├── mn-client-certificate-component.js │ ├── mn-client-certificate.html │ ├── mn-core.js │ ├── mn-draggable-directive.js │ ├── mn-email-alerts-component.js │ ├── mn-email-alerts.html │ ├── mn-general-settings-component.js │ ├── mn-general-settings.html │ ├── mn-groups-service.js │ ├── mn-gsi-service.js │ ├── mn-period-component.js │ ├── mn-period.html │ ├── mn-query-settings-config-component.js │ ├── mn-query-settings-config.html │ ├── mn-root-certificate-component.js │ ├── mn-root-certificate.html │ ├── mn-search.html │ ├── mn-security-component.js │ ├── mn-security-service.js │ ├── mn-security.html │ ├── mn-servers-add-dialog-component.js │ ├── mn-servers-add-dialog.html │ ├── mn-servers-component.js │ ├── mn-servers-eject-dialog-component.js │ ├── mn-servers-eject-dialog.html │ ├── mn-servers-failover-component.js │ ├── mn-servers-failover-conf-component.js │ ├── mn-servers-failover-conf.html │ ├── mn-servers-failover.html │ ├── mn-servers-item-component.js │ ├── mn-servers-item-details-component.js │ ├── mn-servers-item-details.html │ ├── mn-servers-item.html │ ├── mn-servers-service.js │ ├── mn-servers-stop-reb-conf-component.js │ ├── mn-servers-stop-reb-conf.html │ ├── mn-servers.html │ ├── mn-settings-component.js │ ├── mn-settings-service.js │ ├── mn-settings.html │ ├── mn-tasks-service.js │ ├── mn-user-roles-component.js │ ├── mn-user-roles-item-component.js │ ├── mn-user-roles-item.html │ ├── mn-user-roles-service.js │ ├── mn-user-roles.html │ ├── mn-warmup-progress-component.js │ ├── mn-warmup-progress.html │ ├── mn.app.module.js │ └── styles.css │ ├── app │ ├── ajs.upgraded.components.js │ ├── ajs.upgraded.providers.js │ ├── app.js │ ├── app_config.js │ ├── components │ │ ├── directives │ │ │ ├── mn_auto_compaction_form │ │ │ │ ├── mn_auto_compaction_form.html │ │ │ │ └── mn_auto_compaction_form.js │ │ │ ├── mn_autocomplete_off.js │ │ │ ├── mn_bar_usage │ │ │ │ ├── mn_bar_usage.html │ │ │ │ └── mn_bar_usage.js │ │ │ ├── mn_detail_stats.html │ │ │ ├── mn_detail_stats_controller.js │ │ │ ├── mn_drag_and_drop.js │ │ │ ├── mn_dropdown.html │ │ │ ├── mn_dropdown.js │ │ │ ├── mn_element_crane │ │ │ │ └── mn_element_crane.js │ │ │ ├── mn_encryption_status │ │ │ │ ├── mn_encryption_status.html │ │ │ │ ├── mn_encryption_status.js │ │ │ │ └── mn_encryption_status_template.html │ │ │ ├── mn_field.html │ │ │ ├── mn_field_directive.js │ │ │ ├── mn_focus.js │ │ │ ├── mn_launchpad.js │ │ │ ├── mn_main_spinner.js │ │ │ ├── mn_memory_quota │ │ │ │ ├── mn_memory_quota.html │ │ │ │ ├── mn_memory_quota.js │ │ │ │ └── mn_memory_quota_service.js │ │ │ ├── mn_period │ │ │ │ ├── mn_period.html │ │ │ │ └── mn_period.js │ │ │ ├── mn_search │ │ │ │ ├── mn_search.html │ │ │ │ └── mn_search_directive.js │ │ │ ├── mn_select │ │ │ │ ├── mn_select.html │ │ │ │ └── mn_select.js │ │ │ ├── mn_selectable_nodes_list.html │ │ │ ├── mn_selectable_nodes_list.js │ │ │ ├── mn_services │ │ │ │ ├── mn_services.html │ │ │ │ └── mn_services.js │ │ │ ├── mn_services_disk_paths.html │ │ │ ├── mn_services_disk_paths.js │ │ │ ├── mn_sortable_table.js │ │ │ ├── mn_spinner.js │ │ │ ├── mn_storage_mode │ │ │ │ ├── mn_storage_mode.html │ │ │ │ └── mn_storage_mode.js │ │ │ ├── mn_user_roles_select.html │ │ │ ├── mn_user_roles_select_controller.js │ │ │ ├── mn_user_roles_select_form.html │ │ │ ├── mn_validation │ │ │ │ ├── mn_equal.js │ │ │ │ ├── mn_maxlength.js │ │ │ │ └── mn_minlength.js │ │ │ └── mn_warmup_progress │ │ │ │ ├── mn_warmup_progress.html │ │ │ │ └── mn_warmup_progress.js │ │ ├── mn_alerts.js │ │ ├── mn_alerts_popup_message.html │ │ ├── mn_buckets_stats.js │ │ ├── mn_compaction.js │ │ ├── mn_env.js │ │ ├── mn_exception_reporter.js │ │ ├── mn_file_reader.js │ │ ├── mn_filters.js │ │ ├── mn_helper.js │ │ ├── mn_http.js │ │ ├── mn_pending_query_keeper.js │ │ ├── mn_permissions.js │ │ ├── mn_pluggable_ui_registry.js │ │ ├── mn_poll.js │ │ ├── mn_pool_default.js │ │ ├── mn_pools.js │ │ ├── mn_promise_helper.js │ │ ├── mn_store_service.js │ │ └── mn_tasks_details.js │ ├── constants │ │ └── constants.js │ ├── css │ │ ├── cbui-base.css │ │ ├── cbui-base_dwb.css │ │ ├── cbui-components.css │ │ ├── cbui-hybrid.css │ │ ├── cbui-layout.css │ │ ├── cbui-layout_dwb.css │ │ ├── cbui-responsive.css │ │ ├── font-awesome.css │ │ ├── fonts │ │ │ ├── OpenSans-Bold.woff │ │ │ ├── OpenSans-Italic.woff │ │ │ ├── OpenSans-Regular.woff │ │ │ ├── OpenSans-Semibold.woff │ │ │ └── fontawesome-webfont.woff │ │ ├── main.css │ │ ├── modal.css │ │ └── tooltip.css │ ├── main.js │ ├── mn.admin.service.js │ ├── mn.alerts.service.js │ ├── mn.app.component.js │ ├── mn.app.imports.js │ ├── mn.app.module.js │ ├── mn.app.service.js │ ├── mn.auth.change.password.component.js │ ├── mn.auth.change.password.html │ ├── mn.auth.component.js │ ├── mn.auth.html │ ├── mn.auth.module.js │ ├── mn.auth.service.js │ ├── mn.bar.usage.component.js │ ├── mn.bar.usage.html │ ├── mn.bar.usage.module.js │ ├── mn.bucket.delete.dialog.component.js │ ├── mn.bucket.delete.dialog.html │ ├── mn.bucket.dialog.component.js │ ├── mn.bucket.dialog.html │ ├── mn.bucket.flush.dialog.component.js │ ├── mn.bucket.flush.dialog.html │ ├── mn.bucket.full.dialog.component.js │ ├── mn.bucket.full.dialog.html │ ├── mn.bucket.item.component.js │ ├── mn.bucket.item.details.component.js │ ├── mn.bucket.item.details.html │ ├── mn.bucket.item.html │ ├── mn.buckets.component.js │ ├── mn.buckets.html │ ├── mn.buckets.module.js │ ├── mn.buckets.service.js │ ├── mn.cluster.summary.dialog.component.js │ ├── mn.cluster.summary.dialog.html │ ├── mn.codemirror.editor.component.js │ ├── mn.codemirror.editor.html │ ├── mn.codemirror.editor.module.js │ ├── mn.collections.add.item.component.js │ ├── mn.collections.add.item.html │ ├── mn.collections.add.scope.component.js │ ├── mn.collections.add.scope.html │ ├── mn.collections.component.js │ ├── mn.collections.delete.item.component.js │ ├── mn.collections.delete.item.html │ ├── mn.collections.delete.scope.component.js │ ├── mn.collections.delete.scope.html │ ├── mn.collections.edit.item.component.js │ ├── mn.collections.edit.item.html │ ├── mn.collections.html │ ├── mn.collections.item.component.js │ ├── mn.collections.item.html │ ├── mn.collections.module.js │ ├── mn.collections.scope.component.js │ ├── mn.collections.scope.details.component.js │ ├── mn.collections.scope.details.html │ ├── mn.collections.scope.html │ ├── mn.collections.service.js │ ├── mn.core.js │ ├── mn.documents.service.js │ ├── mn.element.crane.js │ ├── mn.encryption.force.confirmation.component.js │ ├── mn.encryption.force.confirmation.html │ ├── mn.encryption.status.component.js │ ├── mn.encryption.status.html │ ├── mn.encryption.status.module.js │ ├── mn.exception.handler.service.js │ ├── mn.focus.directive.js │ ├── mn.form.service.js │ ├── mn.helper.service.js │ ├── mn.hostname.config.component.js │ ├── mn.hostname.config.html │ ├── mn.http.interceptor.js │ ├── mn.http.request.js │ ├── mn.input.filter.component.js │ ├── mn.input.filter.html │ ├── mn.input.filter.module.js │ ├── mn.keyspace.selector.component.js │ ├── mn.keyspace.selector.downgrade.module.js │ ├── mn.keyspace.selector.html │ ├── mn.keyspace.selector.module.js │ ├── mn.keyspace.selector.service.js │ ├── mn.logs.collectInfo.component.js │ ├── mn.logs.collectInfo.form.component.js │ ├── mn.logs.collectInfo.form.html │ ├── mn.logs.collectInfo.module.js │ ├── mn.logs.collectInfo.result.component.js │ ├── mn.logs.collectInfo.result.html │ ├── mn.logs.collectInfo.service.js │ ├── mn.logs.collectInfo.stop.collection.component.js │ ├── mn.logs.collectInfo.stop.collection.html │ ├── mn.logs.component.js │ ├── mn.logs.html │ ├── mn.logs.list.component.js │ ├── mn.logs.list.html │ ├── mn.logs.list.module.js │ ├── mn.logs.list.service.js │ ├── mn.logs.module.js │ ├── mn.node.storage.config.component.js │ ├── mn.node.storage.config.html │ ├── mn.path.field.component.js │ ├── mn.path.field.html │ ├── mn.permissions.service.js │ ├── mn.pipes.js │ ├── mn.pipes.module.js │ ├── mn.pools.service.js │ ├── mn.router.service.js │ ├── mn.security.audit.component.js │ ├── mn.security.audit.html │ ├── mn.security.audit.item.component.js │ ├── mn.security.audit.item.html │ ├── mn.security.audit.module.js │ ├── mn.security.audit.user.activity.groups.component.js │ ├── mn.security.audit.user.activity.groups.html │ ├── mn.security.audit.user.activity.role.component.js │ ├── mn.security.audit.user.activity.role.html │ ├── mn.security.log.redaction.module.js │ ├── mn.security.other.component.js │ ├── mn.security.other.html │ ├── mn.security.other.module.js │ ├── mn.security.saml.component.js │ ├── mn.security.saml.html │ ├── mn.security.saml.module.js │ ├── mn.security.secrets.add.dialog.component.js │ ├── mn.security.secrets.add.dialog.html │ ├── mn.security.secrets.component.js │ ├── mn.security.secrets.delete.dialog.component.js │ ├── mn.security.secrets.delete.dialog.html │ ├── mn.security.secrets.delete.key.dialog.component.js │ ├── mn.security.secrets.delete.key.dialog.html │ ├── mn.security.secrets.encryption.dialog.component.js │ ├── mn.security.secrets.encryption.dialog.html │ ├── mn.security.secrets.html │ ├── mn.security.secrets.item.component.js │ ├── mn.security.secrets.item.details.component.js │ ├── mn.security.secrets.item.details.html │ ├── mn.security.secrets.item.html │ ├── mn.security.secrets.module.js │ ├── mn.security.secrets.reencrypt.confirmation.component.js │ ├── mn.security.secrets.reencrypt.confirmation.html │ ├── mn.security.secrets.service.js │ ├── mn.security.service.js │ ├── mn.select.component.js │ ├── mn.select.html │ ├── mn.select.module.js │ ├── mn.selectable.node.item.component.js │ ├── mn.selectable.node.item.html │ ├── mn.selectable.nodes.component.js │ ├── mn.selectable.nodes.html │ ├── mn.selectable.nodes.module.js │ ├── mn.server.groups.service.js │ ├── mn.services.config.component.js │ ├── mn.services.config.html │ ├── mn.session.component.js │ ├── mn.session.module.js │ ├── mn.session.service.js │ ├── mn.session.timeout.dialog.component.js │ ├── mn.session.timeout.dialog.html │ ├── mn.settings.alerts.component.js │ ├── mn.settings.alerts.html │ ├── mn.settings.alerts.module.js │ ├── mn.settings.alerts.service.js │ ├── mn.settings.auto.compaction.component.js │ ├── mn.settings.auto.compaction.form.component.js │ ├── mn.settings.auto.compaction.form.html │ ├── mn.settings.auto.compaction.form.module.js │ ├── mn.settings.auto.compaction.html │ ├── mn.settings.auto.compaction.module.js │ ├── mn.settings.auto.compaction.service.js │ ├── mn.settings.auto.compaction.time.period.component.js │ ├── mn.settings.auto.compaction.time.period.html │ ├── mn.settings.sample.buckets.component.js │ ├── mn.settings.sample.buckets.html │ ├── mn.settings.sample.buckets.module.js │ ├── mn.settings.sample.buckets.service.js │ ├── mn.shared.module.js │ ├── mn.spinner.directive.js │ ├── mn.stats.service.js │ ├── mn.storage.mode.component.js │ ├── mn.storage.mode.html │ ├── mn.tasks.service.js │ ├── mn.text.expander.component.js │ ├── mn.text.expander.html │ ├── mn.text.expander.module.js │ ├── mn.timezone.details.component.js │ ├── mn.timezone.details.downgrade.module.js │ ├── mn.timezone.details.html │ ├── mn.timezone.details.module.js │ ├── mn.timezone.details.service.js │ ├── mn.user.roles.service.js │ ├── mn.views.component.js │ ├── mn.views.confirm.override.dialog.component.js │ ├── mn.views.confirm.override.dialog.html │ ├── mn.views.copy.dialog.component.js │ ├── mn.views.copy.dialog.html │ ├── mn.views.create.dialog.component.js │ ├── mn.views.create.dialog.html │ ├── mn.views.delete.dialog.ddoc.component.js │ ├── mn.views.delete.dialog.ddoc.html │ ├── mn.views.delete.dialog.view.component.js │ ├── mn.views.delete.dialog.view.html │ ├── mn.views.editing.component.js │ ├── mn.views.editing.html │ ├── mn.views.editing.result.component.js │ ├── mn.views.editing.result.html │ ├── mn.views.editing.service.js │ ├── mn.views.filter.component.js │ ├── mn.views.filter.html │ ├── mn.views.html │ ├── mn.views.list.component.js │ ├── mn.views.list.html │ ├── mn.views.list.item.component.js │ ├── mn.views.list.item.html │ ├── mn.views.list.service.js │ ├── mn.views.module.js │ ├── mn.warmup.progress.component.js │ ├── mn.warmup.progress.html │ ├── mn.warmup.progress.module.js │ ├── mn.wizard.component.js │ ├── mn.wizard.html │ ├── mn.wizard.join.cluster.component.js │ ├── mn.wizard.join.cluster.html │ ├── mn.wizard.module.js │ ├── mn.wizard.new.cluster.config.component.js │ ├── mn.wizard.new.cluster.config.html │ ├── mn.wizard.service.js │ ├── mn.wizard.setup.new.cluster.component.js │ ├── mn.wizard.setup.new.cluster.html │ ├── mn.wizard.terms.and.conditions.component.js │ ├── mn.wizard.terms.and.conditions.html │ ├── mn.wizard.welcome.component.js │ ├── mn.wizard.welcome.html │ ├── mn.xdcr.add.ref.component.js │ ├── mn.xdcr.add.ref.html │ ├── mn.xdcr.add.rep.component.js │ ├── mn.xdcr.add.rep.html │ ├── mn.xdcr.add.rep.mapping.component.js │ ├── mn.xdcr.add.rep.mapping.controls.component.js │ ├── mn.xdcr.add.rep.mapping.controls.html │ ├── mn.xdcr.add.rep.mapping.html │ ├── mn.xdcr.add.rep.mapping.item.component.js │ ├── mn.xdcr.add.rep.mapping.item.html │ ├── mn.xdcr.add.rep.mapping.rules.component.js │ ├── mn.xdcr.add.rep.mapping.rules.html │ ├── mn.xdcr.add.rep.scope.component.js │ ├── mn.xdcr.add.rep.scope.html │ ├── mn.xdcr.component.js │ ├── mn.xdcr.conflict.log.component.js │ ├── mn.xdcr.conflict.log.html │ ├── mn.xdcr.conflict.log.mapping.controls.component.js │ ├── mn.xdcr.conflict.log.mapping.controls.html │ ├── mn.xdcr.conflict.log.mapping.item.component.js │ ├── mn.xdcr.conflict.log.mapping.item.html │ ├── mn.xdcr.conflict.log.mapping.rules.component.js │ ├── mn.xdcr.conflict.log.mapping.rules.html │ ├── mn.xdcr.conflict.log.scope.component.js │ ├── mn.xdcr.conflict.log.scope.html │ ├── mn.xdcr.delete.ref.component.js │ ├── mn.xdcr.delete.ref.html │ ├── mn.xdcr.delete.rep.component.js │ ├── mn.xdcr.delete.rep.html │ ├── mn.xdcr.edit.rep.component.js │ ├── mn.xdcr.edit.rep.html │ ├── mn.xdcr.errors.component.js │ ├── mn.xdcr.errors.html │ ├── mn.xdcr.filter.component.js │ ├── mn.xdcr.filter.html │ ├── mn.xdcr.html │ ├── mn.xdcr.incoming.component.js │ ├── mn.xdcr.incoming.details.component.js │ ├── mn.xdcr.incoming.details.html │ ├── mn.xdcr.incoming.html │ ├── mn.xdcr.incoming.replication.details.component.js │ ├── mn.xdcr.incoming.replication.details.html │ ├── mn.xdcr.incoming.replication.settings.component.js │ ├── mn.xdcr.incoming.replication.settings.html │ ├── mn.xdcr.item.component.js │ ├── mn.xdcr.item.details.component.js │ ├── mn.xdcr.item.details.html │ ├── mn.xdcr.item.html │ ├── mn.xdcr.mobile.setting.component.js │ ├── mn.xdcr.mobile.setting.html │ ├── mn.xdcr.module.js │ ├── mn.xdcr.ref.item.component.js │ ├── mn.xdcr.ref.item.html │ ├── mn.xdcr.rep.message.component.js │ ├── mn.xdcr.rep.message.html │ ├── mn.xdcr.service.js │ ├── mn.xdcr.settings.component.js │ ├── mn.xdcr.settings.html │ ├── mn_admin │ │ ├── memory_quota_dialog.html │ │ ├── memory_quota_dialog_controller.js │ │ ├── mn_admin.html │ │ ├── mn_admin_config.js │ │ ├── mn_admin_controller.js │ │ ├── mn_analytics_service.js │ │ ├── mn_audit_service.js │ │ ├── mn_buckets_service.js │ │ ├── mn_certificates.html │ │ ├── mn_certificates_controller.js │ │ ├── mn_certificates_delete_dialog.html │ │ ├── mn_certificates_delete_dialog_controller.js │ │ ├── mn_certificates_service.js │ │ ├── mn_cluster_info_dialog.html │ │ ├── mn_d3_service.js │ │ ├── mn_developer_settings.html │ │ ├── mn_developer_settings_controller.js │ │ ├── mn_documents_service.js │ │ ├── mn_groups.html │ │ ├── mn_groups_controller.js │ │ ├── mn_groups_delete_dialog.html │ │ ├── mn_groups_delete_dialog_controller.js │ │ ├── mn_groups_group_dialog.html │ │ ├── mn_groups_group_dialog_controller.js │ │ ├── mn_groups_service.js │ │ ├── mn_gsi.html │ │ ├── mn_gsi_controller.js │ │ ├── mn_gsi_drop_confirm_dialog.html │ │ ├── mn_gsi_footer_controller.js │ │ ├── mn_gsi_item_details.html │ │ ├── mn_gsi_item_details.js │ │ ├── mn_gsi_service.js │ │ ├── mn_gsi_table_directive.html │ │ ├── mn_gsi_table_directive.js │ │ ├── mn_internal_settings.html │ │ ├── mn_internal_settings_controller.js │ │ ├── mn_internal_settings_service.js │ │ ├── mn_ldap.html │ │ ├── mn_ldap_controller.js │ │ ├── mn_logs_controller.js │ │ ├── mn_logs_service.js │ │ ├── mn_lost_connection.html │ │ ├── mn_lost_connection_config.js │ │ ├── mn_lost_connection_service.js │ │ ├── mn_multi_chart_directive.js │ │ ├── mn_multiple_failover_dialog.html │ │ ├── mn_multiple_failover_dialog.js │ │ ├── mn_overview.html │ │ ├── mn_overview_controller.js │ │ ├── mn_poor_mans_alerts.html │ │ ├── mn_poor_mans_alerts_controller.js │ │ ├── mn_poor_mans_alerts_service.js │ │ ├── mn_redaction.html │ │ ├── mn_redaction_controller.js │ │ ├── mn_redaction_service.js │ │ ├── mn_reset_password_dialog.html │ │ ├── mn_reset_password_dialog_controller.js │ │ ├── mn_reset_password_dialog_service.js │ │ ├── mn_roles.html │ │ ├── mn_roles_controller.js │ │ ├── mn_roles_groups.html │ │ ├── mn_roles_groups_add_dialog.html │ │ ├── mn_roles_groups_add_dialog_controller.js │ │ ├── mn_roles_groups_controller.js │ │ ├── mn_roles_groups_delete_dialog.html │ │ ├── mn_roles_groups_delete_dialog_controller.js │ │ ├── mn_root_certificate_service.js │ │ ├── mn_security.html │ │ ├── mn_security_config.js │ │ ├── mn_servers.html │ │ ├── mn_servers_add_dialog.html │ │ ├── mn_servers_add_dialog_controller.js │ │ ├── mn_servers_controller.js │ │ ├── mn_servers_eject_dialog.html │ │ ├── mn_servers_eject_dialog_controller.js │ │ ├── mn_servers_failover_confirmation_dialog.html │ │ ├── mn_servers_failover_dialog.html │ │ ├── mn_servers_failover_dialog_controller.js │ │ ├── mn_servers_list.html │ │ ├── mn_servers_list_item.html │ │ ├── mn_servers_list_item_controller.js │ │ ├── mn_servers_list_item_details.html │ │ ├── mn_servers_list_item_details_controller.js │ │ ├── mn_servers_list_item_details_service.js │ │ ├── mn_servers_modify_services.html │ │ ├── mn_servers_modify_services_controller.js │ │ ├── mn_servers_service.js │ │ ├── mn_servers_stop_rebalance_dialog.html │ │ ├── mn_settings.html │ │ ├── mn_settings_auto_compaction_service.js │ │ ├── mn_settings_auto_failover.html │ │ ├── mn_settings_auto_failover_controller.js │ │ ├── mn_settings_auto_failover_service.js │ │ ├── mn_settings_cluster.html │ │ ├── mn_settings_cluster_all_xdcr_log_levels_dialog.html │ │ ├── mn_settings_cluster_all_xdcr_log_levels_dialog_controller.js │ │ ├── mn_settings_cluster_confirmation_dialog.html │ │ ├── mn_settings_cluster_controller.js │ │ ├── mn_settings_cluster_service.js │ │ ├── mn_settings_config.js │ │ ├── mn_settings_notifications.html │ │ ├── mn_settings_notifications_controller.js │ │ ├── mn_settings_notifications_service.js │ │ ├── mn_settings_query.html │ │ ├── mn_settings_query_controller.js │ │ ├── mn_statistics.html │ │ ├── mn_statistics_chart_builder.html │ │ ├── mn_statistics_chart_builder_controller.js │ │ ├── mn_statistics_chart_builder_delete.html │ │ ├── mn_statistics_chart_directive.html │ │ ├── mn_statistics_chart_directive.js │ │ ├── mn_statistics_controller.js │ │ ├── mn_statistics_description.js │ │ ├── mn_statistics_description_service.js │ │ ├── mn_statistics_detailed_chart.html │ │ ├── mn_statistics_detailed_chart_controller.js │ │ ├── mn_statistics_group.html │ │ ├── mn_statistics_group_controller.js │ │ ├── mn_statistics_group_delete.html │ │ ├── mn_statistics_reset_dialog.html │ │ ├── mn_statistics_scenario_controller.js │ │ ├── mn_statistics_scenario_delete.html │ │ ├── mn_statistics_service.js │ │ ├── mn_user_roles.html │ │ ├── mn_user_roles_add_dialog.html │ │ ├── mn_user_roles_add_dialog_controller.js │ │ ├── mn_user_roles_controller.js │ │ ├── mn_user_roles_delete_dialog.html │ │ ├── mn_user_roles_delete_dialog_controller.js │ │ ├── mn_user_roles_lock_dialog.html │ │ ├── mn_user_roles_lock_dialog_controller.js │ │ ├── mn_user_roles_reset_password_dialog.html │ │ ├── mn_user_roles_reset_password_dialog_controller.js │ │ ├── mn_user_roles_service.js │ │ ├── mn_user_roles_unlock_dialog.html │ │ ├── mn_user_roles_unlock_dialog_controller.js │ │ ├── mn_views_list_service.js │ │ └── mn_xdcr_service.js │ ├── mn_auth │ │ └── mn_auth_service.js │ └── mn_wizard │ │ └── mn_cluster_configuration │ │ └── mn_cluster_configuration_service.js │ ├── importmap.json │ ├── index-deprecated.html │ ├── index-dev.html │ ├── index.css │ ├── libs │ ├── ace │ │ ├── @nowzoo │ │ │ ├── ngx-ace.js │ │ │ └── ngx-ace.js.map │ │ ├── ace-loader.js │ │ ├── ace-wrapper.js │ │ ├── ace.js │ │ ├── ext-cb-searchbox.js │ │ ├── ext-language_tools.js │ │ ├── mode-javascript.js │ │ ├── mode-json.js │ │ ├── mode-n1ql.js │ │ ├── mode-sql-plus-plus.js │ │ ├── mode-text.js │ │ ├── query-formatter.js │ │ ├── snippets │ │ │ ├── javascript.js │ │ │ └── text.js │ │ ├── worker-javascript.js │ │ └── worker-json.js │ ├── angular-legacy-sortable.js │ ├── angular-ui-codemirror.js │ ├── angular-ui-select.css │ ├── codemirror.css │ ├── codemirror.javascript.js │ ├── es-module-shims-options.js │ ├── es-module-shims.js │ ├── ngclipboard.js │ ├── reflect-metadata.js │ ├── selectize.default.css │ ├── ui-ace.js │ ├── ui-select.js │ └── zone.js │ ├── metrics │ └── metrics.json │ ├── package-lock.json │ ├── package.json │ └── web_modules │ ├── @angular │ ├── common.js │ ├── common │ │ └── http.js │ ├── compiler.js │ ├── core.js │ ├── forms.js │ ├── platform-browser-dynamic.js │ ├── platform-browser.js │ ├── upgrade.js │ └── upgrade │ │ └── static.js │ ├── @ng-bootstrap │ └── ng-bootstrap.js │ ├── @uirouter │ ├── angular-hybrid.js │ ├── angular.js │ ├── angularjs.js │ ├── core.js │ └── rx.js │ ├── angular-animate.js │ ├── angular-messages.js │ ├── angular-sanitize.js │ ├── angular-ui-bootstrap.js │ ├── angular-ui-tree.js │ ├── angular.js │ ├── clipboard.js │ ├── codemirror.js │ ├── common │ ├── ArgumentOutOfRangeError-91c779f5.js │ ├── EmptyError-a9e17542.js │ ├── Notification-9e07e457.js │ ├── ReplaySubject-8316d9c1.js │ ├── _commonjsHelpers-6a48b99e.js │ ├── concat-981db672.js │ ├── concatMap-326c8f32.js │ ├── cubehelix-b37f4760.js │ ├── defaultLocale-579b98ca.js │ ├── filter-d76a729c.js │ ├── forkJoin-269e2e92.js │ ├── index-35caf4f7.js │ ├── index-729b989c.js │ ├── index-e88ffd88.js │ ├── index-f3df269c.js │ ├── index-fc7f5fbd.js │ ├── interface-c1256a29.js │ ├── merge-183efbc7.js │ ├── mergeMap-64c6f393.js │ ├── never-2f7c2de7.js │ ├── nodrag-20481c62.js │ ├── piecewise-ef887050.js │ ├── precisionRound-dc953fe5.js │ ├── quantile-0d207231.js │ ├── rgb-50db7803.js │ ├── share-d41e3509.js │ ├── shareReplay-5c54bf83.js │ ├── string-cfd0b55d.js │ ├── switchMap-c513d696.js │ ├── take-7bfdafe5.js │ ├── timer-a781bf0e.js │ ├── touch-775b0bb4.js │ ├── tslib.es6-c4a4947b.js │ ├── ui-router-rx-04f7f595.js │ ├── utcMonth-4fcc394c.js │ ├── utcYear-c83ede8f.js │ ├── value-2cd045dd.js │ ├── viewScroll-db255824.js │ ├── withLatestFrom-853e2e94.js │ ├── zip-41358de8.js │ └── zoom-74300348.js │ ├── d3-array.js │ ├── d3-axis.js │ ├── d3-brush.js │ ├── d3-collection.js │ ├── d3-dsv.js │ ├── d3-format.js │ ├── d3-hierarchy.js │ ├── d3-interpolate.js │ ├── d3-scale-chromatic.js │ ├── d3-scale.js │ ├── d3-selection.js │ ├── d3-shape.js │ ├── d3-time-format.js │ ├── d3-time.js │ ├── d3-transition.js │ ├── d3-zoom.js │ ├── file-saver.js │ ├── import-map.json │ ├── ipaddr.js │ ├── js-beautify.js │ ├── lodash.js │ ├── ngx-clipboard.js │ ├── oclazyload.js │ ├── ramda.js │ ├── rxjs.js │ ├── rxjs │ └── operators.js │ └── sortablejs.js ├── pylib ├── cbcollect_test.py ├── cluster_run_lib.py ├── evil_pipes.py ├── gosecrets_client_lib.py └── installed_script_helpers.py ├── rebar.config ├── rebar.lock ├── requirements.txt ├── scripts ├── allocators.awk ├── analyze-rebalance-waiting.rb ├── analyze-takeovers.rb ├── ast.sh ├── base-test.rb ├── cbdump-config ├── certs_generation │ ├── README.markdown │ ├── generate_client_cert │ ├── generate_cluster_ca │ ├── generate_intermediate_cert │ ├── generate_node_cert │ ├── intermediate_template.cnf │ └── root_template.cnf ├── cluster_run_wrapper ├── compile-reload-changed.rb ├── diagrams │ └── generate_state_diagram.py ├── dump-bucket-deks ├── dump-guts ├── dump-keys ├── echo-server.rb ├── escript-wrapper ├── exercise-vbmap.rb ├── fake-phone-home ├── formatter │ ├── erlang_formatter.py │ ├── format_erlang_diff_with_emacs.py │ └── get_diffs_to_format.py ├── generate-deeper-cert.go ├── generate-kv-stats-mappings.erl ├── generate_index_workload.py ├── indent_erl.el ├── indent_erl.sh ├── jq │ ├── human-time │ ├── master_events │ │ ├── group-moves │ │ ├── inflight-moves │ │ ├── last-rebalance │ │ ├── plot-bucket-rebalance │ │ ├── plot_bucket_rebalance.py │ │ └── read │ ├── rebalance_report │ │ └── parser.py │ └── stats │ │ ├── avg_cpu │ │ └── cpu ├── large_allocations.stp ├── master_events_2_gtrace ├── master_events_epoch_time_converter.py ├── memory_monitor.sh ├── merge_distributed_logs ├── node_remap ├── node_remap.py ├── parse_stats_log.py ├── proxy-testing.rb ├── proxyrb.rb ├── purge_tombstones │ ├── .gitignore │ ├── GNUmakefile │ ├── README │ ├── purge_tombstones.erl │ └── purge_tombstones.sh.in ├── rebalance_analyser.py ├── rebuild_replicas.sh ├── rebuild_vbuckets_on_nodes.sh ├── reformat-master-events.rb ├── remove_stats.erl ├── rest-methods.rb ├── review ├── run_in_cgroup ├── run_in_ns.rb ├── tag ├── test-cbauth.rb ├── test-ciphers.sh ├── test-deeper-cert-gen.rb ├── test-groups.rb ├── test-repl.rb ├── validate_stats.py ├── vbhash.rb ├── visualize-rebalance-2.rb ├── visualize-rebalance.rb └── visualize-simulate-results.rb └── validate-cpu-microarchitecture.sh /.copyrightignore: -------------------------------------------------------------------------------- 1 | deps/gen_smtp/.* 2 | deps/triq/.* 3 | deps/meck/.* 4 | priv/public/ui/app/components/mn_filters.js 5 | priv/public/ui/app/components/mn_jquery.js 6 | priv/public/ui/libs/.* 7 | priv/public/ui/web_modules/.* 8 | src/gen_server2.erl 9 | README.markdown 10 | 11 | -------------------------------------------------------------------------------- /.edts: -------------------------------------------------------------------------------- 1 | :name "ns_server" 2 | :node-name "ns_server" 3 | :lib-dirs '("deps") 4 | :app-include-dirs '("include") 5 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.beam 2 | *.tar.gz 3 | *~ 4 | .DS_Store 5 | .configuration 6 | .eunit 7 | .project 8 | .settings 9 | .coverage 10 | _build 11 | /TAGS 12 | /apps/*/_build 13 | /build 14 | /common_tests/*.beam 15 | /core* 16 | /couch 17 | /couchbase.plt 18 | /coverage 19 | /data 20 | /deps/chronicle/ 21 | /doc/API/_site 22 | /lib 23 | /logs 24 | /make.out 25 | /ns_server.plt 26 | /priv/public/js/all-images.js 27 | /priv/ui_tests/screenshots_output 28 | /priv/public/ui/index.html 29 | apps/ns_babysitter/rebar.config 30 | apps/ns_server/rebar.config 31 | apps/ns_server/src/ns_server.app.src 32 | /tmp/version_num.tmp 33 | TAGS 34 | bin 35 | extra 36 | cluster_run_n_* 37 | ebucketmigrator 38 | ebucketmigrator**.tmp 39 | erl_crash.dump* 40 | fprof.trace 41 | ns_server-*.tar.gz 42 | priv/ip 43 | priv/isasl.pw 44 | test/log 45 | tmp 46 | .rebar/ 47 | rebar3.crashdump 48 | /deps/gen_smtp/src/smtp_rfc822_parse.erl 49 | apps/ns_server/src/ldap_rfc4515_lexer.erl 50 | apps/ns_server/src/ldap_rfc4515_parser.erl 51 | .idea/ 52 | *.iml 53 | /venv 54 | *.swp 55 | apps/ns_server/src/kv_stats_mappings.erl 56 | /cluster_tests/test_cluster_data* 57 | **/__pycache__/ 58 | /deps/config_remap/config_remap 59 | -------------------------------------------------------------------------------- /.gitreview: -------------------------------------------------------------------------------- 1 | # -*- mode: conf; -*- 2 | 3 | [gerrit] 4 | scheme=ssh 5 | host=review.couchbase.org 6 | port=29418 7 | project=ns_server 8 | defaultremote=gerrit 9 | defaultbranch=master 10 | defaultrebase=0 11 | track=0 12 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Source code in this repository is licensed under various licenses. The 2 | Business Source License 1.1 (BSL) is one such license. Each file indicates in 3 | a section at the beginning of the file the name of the license that applies to 4 | it. All licenses used in this repository can be found in the top-level 5 | licenses directory. 6 | -------------------------------------------------------------------------------- /apps/ale/.gitignore: -------------------------------------------------------------------------------- 1 | ebin/ 2 | dist/ 3 | -------------------------------------------------------------------------------- /apps/ale/Makefile: -------------------------------------------------------------------------------- 1 | APP_SRC := src/ale.app.src 2 | APP_SRC_IN := $(APP_SRC).in 3 | 4 | define get_version 5 | `([ -f VERSION ] && cat VERSION) || git describe --always` 6 | endef 7 | 8 | .PHONY: all clean dist shell 9 | 10 | all: $(APP_SRC) 11 | @./rebar compile 12 | 13 | $(APP_SRC): $(APP_SRC_IN) 14 | @TMPFILE=$(APP_SRC).$$$$ && \ 15 | VERSION=$(call get_version) && \ 16 | sed "s/@ALE_VERSION@/$${VERSION}/g" $< > "$${TMPFILE}" && \ 17 | mv "$${TMPFILE}" "$@" 18 | 19 | clean: 20 | @rm -f "$(APP_SRC)" "$(VERSION)" 21 | @./rebar clean 22 | @rm -rf dist/ ebin/ 23 | 24 | dist: 25 | @rm -rf $@ 26 | @mkdir -p $@ 27 | @git archive --format=tar --prefix=ale/ HEAD | (cd $@ && tar xf -) 28 | @VERSION=$(call get_version) && echo $${VERSION} > $@/ale/VERSION 29 | 30 | shell: 31 | @erl -pa ebin 32 | -------------------------------------------------------------------------------- /apps/ale/README: -------------------------------------------------------------------------------- 1 | Another Logger for Erlang -------------------------------------------------------------------------------- /apps/ale/VERSION: -------------------------------------------------------------------------------- 1 | 56cc0a6 2 | -------------------------------------------------------------------------------- /apps/ale/rebar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/couchbase/ns_server/55791dba46d71554aedc379ee8d2d394bad71972/apps/ale/rebar -------------------------------------------------------------------------------- /apps/ale/rebar.config: -------------------------------------------------------------------------------- 1 | {erl_first_files, ["src/ale_codegen.erl", "src/ale_transform.erl"]}. 2 | {erl_opts, [nowarn_deprecated_type, 3 | {parse_transform, ale_transform}]}. -------------------------------------------------------------------------------- /apps/ale/src/ale.app.src: -------------------------------------------------------------------------------- 1 | % Copyright 2019-Present Couchbase, Inc. 2 | % 3 | % Use of this software is governed by the Business Source License included in 4 | % the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 5 | % file, in accordance with the Business Source License, use of this software 6 | % will be governed by the Apache License, Version 2.0, included in the file 7 | % licenses/APL2.txt. 8 | 9 | {application, ale, 10 | [ 11 | {description, "Another Logger for Erlang"}, 12 | {vsn, "0.0.0"}, 13 | {registered, []}, 14 | {applications, [ 15 | kernel, 16 | stdlib 17 | ]}, 18 | {mod, { ale_app, []}}, 19 | {env, []} 20 | ]}. 21 | -------------------------------------------------------------------------------- /apps/ale/src/ale_app.erl: -------------------------------------------------------------------------------- 1 | %% @author Couchbase 2 | %% @copyright 2011-Present Couchbase, Inc. 3 | %% 4 | %% Use of this software is governed by the Business Source License included in 5 | %% the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 6 | %% file, in accordance with the Business Source License, use of this software 7 | %% will be governed by the Apache License, Version 2.0, included in the file 8 | %% licenses/APL2.txt. 9 | 10 | -module(ale_app). 11 | 12 | -behaviour(application). 13 | 14 | %% Application callbacks 15 | -export([start/2, stop/1, prep_stop/1]). 16 | 17 | %% =================================================================== 18 | %% Application callbacks 19 | %% =================================================================== 20 | 21 | start(_StartType, _StartArgs) -> 22 | ale_sup:start_link(). 23 | 24 | prep_stop(_State) -> 25 | ale:sync_all_sinks(). 26 | 27 | stop(_State) -> 28 | ok. 29 | -------------------------------------------------------------------------------- /apps/ale/src/ale_noop_formatter.erl: -------------------------------------------------------------------------------- 1 | %% @author Couchbase 2 | %% @copyright 2014-Present Couchbase, Inc. 3 | %% 4 | %% Use of this software is governed by the Business Source License included in 5 | %% the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 6 | %% file, in accordance with the Business Source License, use of this software 7 | %% will be governed by the Apache License, Version 2.0, included in the file 8 | %% licenses/APL2.txt. 9 | 10 | -module(ale_noop_formatter). 11 | 12 | -export([format_msg/2]). 13 | 14 | format_msg(_, UserMsg) -> 15 | UserMsg. 16 | -------------------------------------------------------------------------------- /apps/cb_dets/src/cb_dets.app.src: -------------------------------------------------------------------------------- 1 | {application, cb_dets, 2 | [ 3 | {description, "Fork of erlang dets"}, 4 | {vsn, "0.0.0"}, 5 | {registered, []}, 6 | {applications, [ 7 | kernel, 8 | stdlib 9 | ]}, 10 | {modules, []}, 11 | {env, []} 12 | ]}. 13 | -------------------------------------------------------------------------------- /apps/config_remap/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | REBAR (TARGET config_remap 2 | DEPENDS ale chronicle 3 | # Some misc functions used by script that live in ns_server 4 | ns_server 5 | # For cb_gosecrets_runner 6 | ns_babysitter 7 | CLEAN_HOOK ns_realclean) 8 | REBAR (TARGET config_remap_script 9 | COMMAND escriptize 10 | DEPENDS config_remap 11 | NOCLEAN) 12 | INSTALL (PROGRAMS config_remap DESTINATION bin) 13 | -------------------------------------------------------------------------------- /apps/config_remap/rebar.config: -------------------------------------------------------------------------------- 1 | {escript_main_app, config_remap}. 2 | {escript_name, config_remap}. 3 | {escript_emu_args, "%%! -escript main config_remap\n"}. 4 | 5 | {erl_opts, [debug_info, warn_export_vars, 6 | {i, ["src"]}, 7 | {parse_transform, ale_transform}]}. 8 | 9 | {provider_hooks, 10 | [{post, [{compile, escriptize}]}]}. 11 | 12 | {artifacts, ["{{profile_dir}}/bin/config_remap"]}. 13 | -------------------------------------------------------------------------------- /apps/config_remap/src/config_remap.app.src: -------------------------------------------------------------------------------- 1 | {application,config_remap, 2 | [{description,"Config Remap"}, 3 | {vsn,"0.0.1"}, 4 | {modules,[]}, 5 | {registered,[]}, 6 | {applications,[kernel,stdlib]}]}. -------------------------------------------------------------------------------- /apps/ns_babysitter/rebar.config.in: -------------------------------------------------------------------------------- 1 | {erl_opts, [bin_info_opt, nowarn_deprecated_type, 2 | {i, "apps/ns_server/include"}, 3 | %% parse transform is a runtime dependency for cluster run 4 | {parse_transform, ale_transform}, 5 | {d, 'DEFAULT_PROFILE_STR', "@DEFAULT_PROFILE@"}]}. 6 | -------------------------------------------------------------------------------- /apps/ns_babysitter/src/child_ns_server_sup.erl: -------------------------------------------------------------------------------- 1 | %% @author Couchbase 2 | %% @copyright 2013-Present Couchbase, Inc. 3 | %% 4 | %% Use of this software is governed by the Business Source License included in 5 | %% the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 6 | %% file, in accordance with the Business Source License, use of this software 7 | %% will be governed by the Apache License, Version 2.0, included in the file 8 | %% licenses/APL2.txt. 9 | 10 | -module(child_ns_server_sup). 11 | 12 | -behavior(supervisor). 13 | 14 | -export([start_link/0]). 15 | 16 | -export([init/1]). 17 | 18 | start_link() -> 19 | supervisor:start_link({local, ?MODULE}, ?MODULE, []). 20 | 21 | init([]) -> 22 | {ok, {{one_for_one, 1000, 10}, 23 | [ns_child_ports_sup:create_ns_server_supervisor_spec()]}}. 24 | -------------------------------------------------------------------------------- /apps/ns_babysitter/src/ns_babysitter.app.src: -------------------------------------------------------------------------------- 1 | %% @author Couchbase 2 | %% @copyright 2013-Present Couchbase, Inc. 3 | %% 4 | %% Use of this software is governed by the Business Source License included in 5 | %% the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 6 | %% file, in accordance with the Business Source License, use of this software 7 | %% will be governed by the Apache License, Version 2.0, included in the file 8 | %% licenses/APL2.txt. 9 | %% 10 | {application, ns_babysitter, 11 | [{description, "Couchbase server babysitter"}, 12 | {vsn, "0.0.0"}, 13 | {modules, []}, 14 | {registered, []}, 15 | {applications, [kernel, stdlib]}, 16 | {mod, {ns_babysitter, []}} 17 | ]}. 18 | -------------------------------------------------------------------------------- /apps/ns_common/include/cut.hrl: -------------------------------------------------------------------------------- 1 | %% @author Couchbase 2 | %% @copyright 2017-Present Couchbase, Inc. 3 | %% 4 | %% Use of this software is governed by the Business Source License included in 5 | %% the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 6 | %% file, in accordance with the Business Source License, use of this software 7 | %% will be governed by the Apache License, Version 2.0, included in the file 8 | %% licenses/APL2.txt. 9 | %% 10 | -compile({parse_transform, cut}). 11 | 12 | -define(cut(Expr), cut:f(Expr)). 13 | -------------------------------------------------------------------------------- /apps/ns_common/rebar.config: -------------------------------------------------------------------------------- 1 | {profiles, 2 | [{test, [ 3 | {erl_opts, [{parse_tranform, triq_autoexport}]} 4 | ]}] 5 | }. 6 | -------------------------------------------------------------------------------- /apps/ns_common/src/ns_common.app.src: -------------------------------------------------------------------------------- 1 | % Copyright 2024-Present Couchbase, Inc. 2 | % 3 | % Use of this software is governed by the Business Source License included in 4 | % the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 5 | % file, in accordance with the Business Source License, use of this software 6 | % will be governed by the Apache License, Version 2.0, included in the file 7 | % licenses/APL2.txt. 8 | {application, ns_common, 9 | [ 10 | {description, "Common code used in ns_server applications"}, 11 | {vsn, "0.0.0"}, 12 | {registered, []}, 13 | {applications, [ 14 | kernel, 15 | stdlib 16 | ]}, 17 | {modules, []}, 18 | {env, []} 19 | ]}. -------------------------------------------------------------------------------- /apps/ns_couchdb/rebar.config: -------------------------------------------------------------------------------- 1 | {erl_opts, [bin_info_opt, nowarn_deprecated_type, 2 | %% Paths need to be relative to the top level of ns_server 3 | {i, "apps/ns_server/include"}, 4 | {i, "../couchdb/src/"}, 5 | {i, "../couchdb/src/couchdb"}, 6 | {parse_transform, ale_transform}]}. 7 | -------------------------------------------------------------------------------- /apps/ns_couchdb/src/cb_init_loggers.erl: -------------------------------------------------------------------------------- 1 | %% @author Couchbase 2 | %% @copyright 2011-Present Couchbase, Inc. 3 | %% 4 | %% Use of this software is governed by the Business Source License included in 5 | %% the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 6 | %% file, in accordance with the Business Source License, use of this software 7 | %% will be governed by the Apache License, Version 2.0, included in the file 8 | %% licenses/APL2.txt. 9 | 10 | -module(cb_init_loggers). 11 | 12 | -export([start_link/0]). 13 | 14 | start_link() -> 15 | set_couchdb_loglevel(), 16 | ignore. 17 | 18 | set_couchdb_loglevel() -> 19 | LogLevel = ns_server:get_loglevel(couchdb), 20 | CouchLogLevel = ns_server_to_couchdb_loglevel(LogLevel), 21 | ok = couch_config:set("log", "level", CouchLogLevel). 22 | 23 | ns_server_to_couchdb_loglevel(debug) -> 24 | "debug"; 25 | ns_server_to_couchdb_loglevel(info) -> 26 | "info"; 27 | ns_server_to_couchdb_loglevel(warn) -> 28 | "error"; 29 | ns_server_to_couchdb_loglevel(error) -> 30 | "error"; 31 | ns_server_to_couchdb_loglevel(critical) -> 32 | "error". 33 | -------------------------------------------------------------------------------- /apps/ns_couchdb/src/ns_couchdb.app.src: -------------------------------------------------------------------------------- 1 | %% @author Couchbase 2 | %% @copyright 2014-Present Couchbase, Inc. 3 | %% 4 | %% Use of this software is governed by the Business Source License included in 5 | %% the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 6 | %% file, in accordance with the Business Source License, use of this software 7 | %% will be governed by the Apache License, Version 2.0, included in the file 8 | %% licenses/APL2.txt. 9 | %% 10 | 11 | {application, ns_couchdb, 12 | [ 13 | {description, "Node that hosts couchdb"}, 14 | {vsn, "0.0.0"}, 15 | {registered, []}, 16 | {applications, [ 17 | kernel, 18 | stdlib, 19 | ns_common 20 | ]}, 21 | {mod, {ns_couchdb, []}} 22 | ]}. 23 | -------------------------------------------------------------------------------- /apps/ns_couchdb/src/ns_couchdb_stats_collector.erl: -------------------------------------------------------------------------------- 1 | %% @author Couchbase 2 | %% @copyright 2014-Present Couchbase, Inc. 3 | %% 4 | %% Use of this software is governed by the Business Source License included in 5 | %% the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 6 | %% file, in accordance with the Business Source License, use of this software 7 | %% will be governed by the Apache License, Version 2.0, included in the file 8 | %% licenses/APL2.txt. 9 | %% 10 | %% @doc facility for collecting stats on ns_couchdb node 11 | %% 12 | 13 | -module(ns_couchdb_stats_collector). 14 | 15 | -export([start_link/0, get_stats/0]). 16 | 17 | start_link() -> 18 | proc_lib:start_link(erlang, apply, [fun start_loop/0, []]). 19 | 20 | start_loop() -> 21 | ns_server_stats:init_stats(), 22 | 23 | proc_lib:init_ack({ok, self()}), 24 | ns_server_stats:stale_histo_epoch_cleaner(). 25 | 26 | get_stats() -> 27 | lists:sort(ets:tab2list(ns_server_system_stats)). 28 | -------------------------------------------------------------------------------- /apps/ns_server/include/bucket_hibernation.hrl: -------------------------------------------------------------------------------- 1 | %% @author Couchbase 2 | %% @copyright 2023-Present Couchbase, Inc. 3 | %% 4 | %% Use of this software is governed by the Business Source License included in 5 | %% the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 6 | %% file, in accordance with the Business Source License, use of this software 7 | %% will be governed by the Apache License, Version 2.0, included in the file 8 | %% licenses/APL2.txt. 9 | 10 | -include("ns_common.hrl"). 11 | 12 | -record(bucket_hibernation_op_args, 13 | {bucket :: bucket_name(), 14 | remote_path :: string(), 15 | blob_storage_region :: string(), 16 | rate_limit :: non_neg_integer()}). 17 | -------------------------------------------------------------------------------- /apps/ns_server/include/couch_api_wrap.hrl: -------------------------------------------------------------------------------- 1 | % Copyright 2013-Present Couchbase, Inc. 2 | % 3 | % Use of this software is governed by the Business Source License included in 4 | % the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 5 | % file, in accordance with the Business Source License, use of this software 6 | % will be governed by the Apache License, Version 2.0, included in the file 7 | % licenses/APL2.txt. 8 | 9 | 10 | 11 | -record(httpdb, { 12 | url, 13 | oauth = nil, 14 | headers = [ 15 | {"Accept", "application/json"}, 16 | {"User-Agent", "CouchDB/" ++ couch_server:get_version()} 17 | ], 18 | timeout, % milliseconds 19 | lhttpc_options = [], 20 | retries = 10, 21 | wait = 250, % milliseconds 22 | httpc_pool = nil, 23 | http_connections 24 | }). 25 | 26 | -record(oauth, { 27 | consumer_key, 28 | token, 29 | token_secret, 30 | consumer_secret, 31 | signature_method 32 | }). 33 | -------------------------------------------------------------------------------- /apps/ns_server/include/jwt.hrl: -------------------------------------------------------------------------------- 1 | %% @author Couchbase 2 | %% @copyright 2025-Present Couchbase, Inc. 3 | %% 4 | %% Use of this software is governed by the Business Source License included in 5 | %% the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 6 | %% file, in accordance with the Business Source License, use of this software 7 | %% will be governed by the Apache License, Version 2.0, included in the file 8 | %% licenses/APL2.txt. 9 | 10 | -define(JWT_SIGNING_KEYS_KEY, jwt_signing_keys). 11 | 12 | -define(JWT_ALGORITHMS, 13 | ['RS256', 'RS384', 'RS512', 'PS256', 'PS384', 'PS512', 14 | 'ES256', 'ES256K', 'ES384', 'ES512', 15 | 'EdDSA', 16 | 'HS256', 'HS384', 'HS512']). 17 | 18 | -type jwt_algorithm() :: 19 | 'RS256' | 'RS384' | 'RS512' | 'PS256' | 'PS384' | 'PS512' | 20 | 'ES256' | 'ES256K' | 'ES384' | 'ES512' | 21 | 'EdDSA' | 22 | 'HS256' | 'HS384' | 'HS512'. 23 | 24 | -type jwt_kid_to_jwk() :: #{binary() | undefined => jose_jwk:key()}. 25 | -------------------------------------------------------------------------------- /apps/ns_server/include/menelaus_web.hrl: -------------------------------------------------------------------------------- 1 | %% @author Couchbase 2 | %% @copyright 2011-Present Couchbase, Inc. 3 | %% 4 | %% Use of this software is governed by the Business Source License included in 5 | %% the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 6 | %% file, in accordance with the Business Source License, use of this software 7 | %% will be governed by the Apache License, Version 2.0, included in the file 8 | %% licenses/APL2.txt. 9 | -include("ns_common.hrl"). 10 | 11 | %% The range used within this file is arbitrary and undefined, so I'm 12 | %% defining an arbitrary value here just to be rebellious. 13 | -define(BUCKET_DELETED, 11). 14 | -define(BUCKET_CREATED, 12). 15 | -define(START_FAIL, 100). 16 | -define(NODE_EJECTED, 101). 17 | -define(UI_SIDE_ERROR_REPORT, 102). 18 | 19 | -define(MENELAUS_WEB_LOG(Code, Msg, Args), 20 | ale:xlog(?MENELAUS_LOGGER, 21 | ns_log_sink:get_loglevel(menelaus_web, Code), 22 | {menelaus_web, Code}, Msg, Args)). 23 | 24 | -define(MENELAUS_WEB_LOG(Code, Msg), ?MENELAUS_WEB_LOG(Code, Msg, [])). 25 | -------------------------------------------------------------------------------- /apps/ns_server/include/ns_heart.hrl: -------------------------------------------------------------------------------- 1 | %% @author Couchbase 2 | %% @copyright 2011-Present Couchbase, Inc. 3 | %% 4 | %% Use of this software is governed by the Business Source License included in 5 | %% the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 6 | %% file, in accordance with the Business Source License, use of this software 7 | %% will be governed by the Apache License, Version 2.0, included in the file 8 | %% licenses/APL2.txt. 9 | %% 10 | -define(HEART_BEAT_PERIOD, 5000). 11 | -------------------------------------------------------------------------------- /apps/ns_server/include/ns_log.hrl: -------------------------------------------------------------------------------- 1 | %% @author Couchbase 2 | %% @copyright 2010-Present Couchbase, Inc. 3 | %% 4 | %% Use of this software is governed by the Business Source License included in 5 | %% the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 6 | %% file, in accordance with the Business Source License, use of this software 7 | %% will be governed by the Apache License, Version 2.0, included in the file 8 | %% licenses/APL2.txt. 9 | -type log_classification() :: 'warn' | 'info' | 'crit'. 10 | 11 | -record(log_entry, { 12 | tstamp :: erlang:timestamp(), 13 | node :: atom(), 14 | module :: atom(), 15 | code :: undefined | integer(), 16 | msg :: iolist(), 17 | args :: list(), 18 | cat :: log_classification(), 19 | server_time :: undefined | calendar:datetime1970() 20 | }). 21 | -------------------------------------------------------------------------------- /apps/ns_server/include/pipes.hrl: -------------------------------------------------------------------------------- 1 | %% @author Couchbase 2 | %% @copyright 2016-Present Couchbase, Inc. 3 | %% 4 | %% Use of this software is governed by the Business Source License included in 5 | %% the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 6 | %% file, in accordance with the Business Source License, use of this software 7 | %% will be governed by the Apache License, Version 2.0, included in the file 8 | %% licenses/APL2.txt. 9 | %% 10 | -define(make_producer(Body), 11 | fun (__Yield) -> 12 | Body 13 | end). 14 | -define(make_transducer(Body), 15 | fun (__Producer) -> 16 | fun (__Yield) -> 17 | Body 18 | end 19 | end). 20 | -define(make_consumer(Body), 21 | fun (__Producer) -> 22 | Body 23 | end). 24 | 25 | -define(producer(), __Producer). 26 | -define(yield(), __Yield). 27 | -define(yield(R), __Yield(R)). 28 | -------------------------------------------------------------------------------- /apps/ns_server/include/websocket.hrl: -------------------------------------------------------------------------------- 1 | %% @author Couchbase 2 | %% @copyright 2024-Present Couchbase, Inc. 3 | %% 4 | %% Use of this software is governed by the Business Source License included in 5 | %% the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 6 | %% file, in accordance with the Business Source License, use of this software 7 | %% will be governed by the Apache License, Version 2.0, included in the file 8 | %% licenses/APL2.txt. 9 | 10 | -define(websocket_globally_unique_identifier, 11 | "258EAFA5-E914-47DA-95CA-C5AB0DC85B11"). 12 | -define(websocket_response, 13 | "Upgrade: WebSocket\r\n" 14 | "Connection: Upgrade\r\n" 15 | "Sec-WebSocket-Accept: "). 16 | 17 | -define(OPCODE_BINARY, 16#2). 18 | -define(OPCODE_CLOSE, 16#8). 19 | -define(OPCODE_PING, 16#9). 20 | -define(OPCODE_PONG, 16#A). 21 | 22 | -type socket() :: any(). 23 | -type re_entry() :: fun ((any()) -> no_return()). 24 | -type reply_channel() :: fun ((any()) -> ok | {error, any()}). 25 | -------------------------------------------------------------------------------- /apps/ns_server/rebar.config.in: -------------------------------------------------------------------------------- 1 | {erl_first_files, ["src/ns_log_categorizing.erl", 2 | "src/replicated_storage.erl", 3 | "src/json_settings_manager.erl", 4 | "src/memcached_cfg.erl" 5 | ]}. 6 | 7 | {erl_opts, [{src_dirs, ["src"]}, 8 | {i, "@COUCHDB_SRC_DIR@/src/couchdb"}, 9 | {i, "@COUCHDB_SRC_DIR@/src"}, 10 | {parse_transform, ale_transform}, warnings_as_errors, 11 | {d, 'DEFAULT_PROFILE_STR', "@DEFAULT_PROFILE@"}]}. 12 | -------------------------------------------------------------------------------- /apps/ns_server/src/cb_cluster_secrets.hrl: -------------------------------------------------------------------------------- 1 | -ifndef(_CLUSTER_SECRETS__HRL_). 2 | -define(_CLUSTER_SECRETS__HRL_,). 3 | 4 | -define(CHRONICLE_SECRETS_KEY, cluster_secrets). 5 | -define(CHRONICLE_NEXT_ID_KEY, cluster_secrets_next_id). 6 | -define(CHRONICLE_DEK_COUNTERS_KEY, cluster_dek_counters). 7 | -define(CHRONICLE_DEK_COUNTERS_TIME_KEY, cluster_dek_counters_update_time). 8 | -define(CHRONICLE_ENCR_AT_REST_SETTINGS_KEY, encr_at_rest_settings). 9 | -define(CB_MANAGED_KEY_TYPE, 'cb-server-managed-aes-key-256'). 10 | -define(AWSKMS_KEY_TYPE, 'awskms-symmetric-key'). 11 | -define(GCPKMS_KEY_TYPE, 'gcpkms-symmetric-key'). 12 | -define(KMIP_KEY_TYPE, 'kmip-aes-key-256'). 13 | -define(ENVELOP_CIPHER, aes_256_gcm). 14 | -define(SECRET_ID_NOT_SET, -1). 15 | -define(DEK_CFG_FILENAME, "deks.cfg"). 16 | -define(NULL_DEK, null_dek_id). 17 | -define(DEK_INFINITY_LIFETIME, 0). 18 | 19 | -define(DEK_ERROR_PATTERN(Id, Reason), 20 | #{type := error, id := Id, reason := Reason}). 21 | 22 | -endif. 23 | -------------------------------------------------------------------------------- /apps/ns_server/src/ldap_rfc4515_lexer.xrl: -------------------------------------------------------------------------------- 1 | Definitions. 2 | 3 | STR = [A-Za-z0-9\-\.\s\\%]+ 4 | 5 | Rules. 6 | 7 | \:[dD][nN] : {token, {list_to_atom(string:to_lower(TokenChars)), TokenLine}}. 8 | \~= : {token, {list_to_atom(TokenChars), TokenLine}}. 9 | >= : {token, {list_to_atom(TokenChars), TokenLine}}. 10 | <= : {token, {list_to_atom(TokenChars), TokenLine}}. 11 | \:= : {token, {list_to_atom(TokenChars), TokenLine}}. 12 | =\* : {token, {list_to_atom(TokenChars), TokenLine}}. 13 | [()&\|!=\:\*] : {token, {list_to_atom(TokenChars), TokenLine}}. 14 | {STR} : {token, {str, TokenLine, TokenChars}}. 15 | 16 | Erlang code. 17 | -------------------------------------------------------------------------------- /apps/ns_server/src/leader_leases_sup.erl: -------------------------------------------------------------------------------- 1 | %% @author Couchbase 2 | %% @copyright 2018-Present Couchbase, Inc. 3 | %% 4 | %% Use of this software is governed by the Business Source License included in 5 | %% the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 6 | %% file, in accordance with the Business Source License, use of this software 7 | %% will be governed by the Apache License, Version 2.0, included in the file 8 | %% licenses/APL2.txt. 9 | %% 10 | -module(leader_leases_sup). 11 | 12 | -behaviour(supervisor). 13 | 14 | -export([start_link/0]). 15 | -export([init/1]). 16 | 17 | start_link() -> 18 | supervisor:start_link({local, ?MODULE}, ?MODULE, []). 19 | 20 | init([]) -> 21 | {ok, {{rest_for_one, 22 | misc:get_env_default(max_r, 3), 23 | misc:get_env_default(max_t, 10)}, 24 | child_specs()}}. 25 | 26 | child_specs() -> 27 | [{leader_activities, {leader_activities, start_link, []}, 28 | permanent, 10000, worker, []}, 29 | {leader_lease_agent, {leader_lease_agent, start_link, []}, 30 | permanent, 1000, worker, []}]. 31 | -------------------------------------------------------------------------------- /apps/ns_server/src/leader_registry_sup.erl: -------------------------------------------------------------------------------- 1 | %% @author Couchbase 2 | %% @copyright 2018-Present Couchbase, Inc. 3 | %% 4 | %% Use of this software is governed by the Business Source License included in 5 | %% the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 6 | %% file, in accordance with the Business Source License, use of this software 7 | %% will be governed by the Apache License, Version 2.0, included in the file 8 | %% licenses/APL2.txt. 9 | %% 10 | -module(leader_registry_sup). 11 | 12 | -behaviour(supervisor). 13 | 14 | -export([start_link/0]). 15 | -export([init/1]). 16 | 17 | start_link() -> 18 | supervisor:start_link({local, ?MODULE}, ?MODULE, []). 19 | 20 | init([]) -> 21 | {ok, {{rest_for_one, 22 | misc:get_env_default(max_r, 3), 23 | misc:get_env_default(max_t, 10)}, 24 | child_specs()}}. 25 | 26 | child_specs() -> 27 | [{leader_registry, {leader_registry, start_link, []}, 28 | permanent, 1000, worker, [leader_registry]}, 29 | {mb_master, {mb_master, start_link, []}, 30 | permanent, infinity, supervisor, [mb_master]}]. 31 | -------------------------------------------------------------------------------- /apps/ns_server/src/leader_services_sup.erl: -------------------------------------------------------------------------------- 1 | %% @author Couchbase 2 | %% @copyright 2017-Present Couchbase, Inc. 3 | %% 4 | %% Use of this software is governed by the Business Source License included in 5 | %% the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 6 | %% file, in accordance with the Business Source License, use of this software 7 | %% will be governed by the Apache License, Version 2.0, included in the file 8 | %% licenses/APL2.txt. 9 | %% 10 | -module(leader_services_sup). 11 | 12 | -behaviour(supervisor). 13 | 14 | -export([start_link/0]). 15 | -export([init/1]). 16 | 17 | start_link() -> 18 | supervisor:start_link({local, ?MODULE}, ?MODULE, []). 19 | 20 | init([]) -> 21 | {ok, {{one_for_one, 22 | misc:get_env_default(max_r, 3), 23 | misc:get_env_default(max_t, 10)}, 24 | child_specs()}}. 25 | 26 | child_specs() -> 27 | [{leader_leases_sup, {leader_leases_sup, start_link, []}, 28 | permanent, infinity, supervisor, []}, 29 | {leader_registry_sup, {leader_registry_sup, start_link, []}, 30 | permanent, infinity, supervisor, []}]. 31 | -------------------------------------------------------------------------------- /apps/ns_server/src/leader_utils.erl: -------------------------------------------------------------------------------- 1 | %% @author Couchbase 2 | %% @copyright 2018-Present Couchbase, Inc. 3 | %% 4 | %% Use of this software is governed by the Business Source License included in 5 | %% the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 6 | %% file, in accordance with the Business Source License, use of this software 7 | %% will be governed by the Apache License, Version 2.0, included in the file 8 | %% licenses/APL2.txt. 9 | %% 10 | -module(leader_utils). 11 | 12 | -include_lib("ns_common/include/cut.hrl"). 13 | -include("ns_common.hrl"). 14 | 15 | -export([live_nodes/0, live_nodes/1, live_nodes/2]). 16 | 17 | live_nodes() -> 18 | live_nodes(ns_node_disco:nodes_wanted()). 19 | 20 | live_nodes(WantedNodes) -> 21 | live_nodes(ns_config:latest(), WantedNodes). 22 | 23 | live_nodes(Snapshot, WantedNodes) -> 24 | Nodes = ns_cluster_membership:get_nodes_with_status(Snapshot, 25 | WantedNodes, 26 | _ =/= inactiveFailed), 27 | ns_node_disco:only_live_nodes(Nodes). 28 | -------------------------------------------------------------------------------- /apps/ns_server/src/log_os_info.erl: -------------------------------------------------------------------------------- 1 | %% @author Couchbase 2 | %% @copyright 2009-Present Couchbase, Inc. 3 | %% 4 | %% Use of this software is governed by the Business Source License included in 5 | %% the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 6 | %% file, in accordance with the Business Source License, use of this software 7 | %% will be governed by the Apache License, Version 2.0, included in the file 8 | %% licenses/APL2.txt. 9 | %% 10 | %% @doc Log information about the OS 11 | %% 12 | -module (log_os_info). 13 | 14 | -include("ns_common.hrl"). 15 | 16 | -export([start_link/0]). 17 | 18 | start_link() -> 19 | ?log_info("OS type: ~p Version: ~p~nRuntime info: ~p", 20 | [os:type(), os:version(), ns_info:runtime()]), 21 | ?log_info("Manifest:~n~p~n", [diag_handler:manifest()]), 22 | ignore. 23 | -------------------------------------------------------------------------------- /apps/ns_server/src/ns_bucket_worker_sup.erl: -------------------------------------------------------------------------------- 1 | %% @author Couchbase 2 | %% @copyright 2013-Present Couchbase, Inc. 3 | %% 4 | %% Use of this software is governed by the Business Source License included in 5 | %% the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 6 | %% file, in accordance with the Business Source License, use of this software 7 | %% will be governed by the Apache License, Version 2.0, included in the file 8 | %% licenses/APL2.txt. 9 | 10 | -module(ns_bucket_worker_sup). 11 | 12 | -behaviour(supervisor). 13 | 14 | -export([start_link/0]). 15 | -export([init/1]). 16 | 17 | start_link() -> 18 | supervisor:start_link({local, ?MODULE}, ?MODULE, []). 19 | 20 | init([]) -> 21 | {ok, {{one_for_all, 3, 10}, child_specs()}}. 22 | 23 | child_specs() -> 24 | [{ns_bucket_sup, {ns_bucket_sup, start_link, []}, 25 | permanent, infinity, supervisor, [ns_bucket_sup]}, 26 | 27 | %% ns_bucket_worker calls into ns_bucket_sup, so it needs to start after 28 | %% it. 29 | {ns_bucket_worker, {ns_bucket_worker, start_link, []}, 30 | permanent, 1000, worker, [ns_bucket_worker]}]. 31 | -------------------------------------------------------------------------------- /apps/ns_server/src/ns_doctor_sup.erl: -------------------------------------------------------------------------------- 1 | %% @author Couchbase, Inc 2 | %% @copyright 2015-Present Couchbase, Inc. 3 | %% 4 | %% Use of this software is governed by the Business Source License included in 5 | %% the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 6 | %% file, in accordance with the Business Source License, use of this software 7 | %% will be governed by the Apache License, Version 2.0, included in the file 8 | %% licenses/APL2.txt. 9 | %% 10 | -module(ns_doctor_sup). 11 | 12 | -export([start_link/0, init/1]). 13 | 14 | start_link() -> 15 | supervisor:start_link({local, ?MODULE}, ?MODULE, []). 16 | 17 | init([]) -> 18 | Children = 19 | [{ns_doctor_events, {gen_event, start_link, [{local, ns_doctor_events}]}, 20 | permanent, 1000, worker, dynamic}, 21 | {ns_doctor, {ns_doctor, start_link, []}, 22 | permanent, 1000, worker, [ns_doctor]}], 23 | {ok, {{one_for_all, 24 | misc:get_env_default(max_r, 3), 25 | misc:get_env_default(max_t, 10)}, 26 | Children}}. 27 | -------------------------------------------------------------------------------- /apps/ns_server/src/ns_heart_sup.erl: -------------------------------------------------------------------------------- 1 | %% @author Couchbase 2 | %% @copyright 2014-Present Couchbase, Inc. 3 | %% 4 | %% Use of this software is governed by the Business Source License included in 5 | %% the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 6 | %% file, in accordance with the Business Source License, use of this software 7 | %% will be governed by the Apache License, Version 2.0, included in the file 8 | %% licenses/APL2.txt. 9 | %% 10 | -module(ns_heart_sup). 11 | 12 | -behaviour(supervisor). 13 | 14 | -export([start_link/0]). 15 | 16 | -export([init/1]). 17 | 18 | start_link() -> 19 | supervisor:start_link({local, ?MODULE}, ?MODULE, []). 20 | 21 | init([]) -> 22 | {ok, {{rest_for_one, 23 | misc:get_env_default(max_r, 3), 24 | misc:get_env_default(max_t, 10)}, 25 | child_specs()}}. 26 | 27 | child_specs() -> 28 | [{ns_heart, {ns_heart, start_link, []}, 29 | permanent, 1000, worker, [ns_heart]}, 30 | {ns_heart_slow_updater, {ns_heart, start_link_slow_updater, []}, 31 | permanent, 1000, worker, [ns_heart]}]. 32 | -------------------------------------------------------------------------------- /apps/ns_server/src/ns_log_categorizing.erl: -------------------------------------------------------------------------------- 1 | %% @author Couchbase 2 | %% @copyright 2010-Present Couchbase, Inc. 3 | %% 4 | %% Use of this software is governed by the Business Source License included in 5 | %% the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 6 | %% file, in accordance with the Business Source License, use of this software 7 | %% will be governed by the Apache License, Version 2.0, included in the file 8 | %% licenses/APL2.txt. 9 | %% 10 | % 11 | % This behavior defines necessary functions making up modules that can 12 | % categorize logging. 13 | % 14 | 15 | -module(ns_log_categorizing). 16 | 17 | -callback ns_log_cat(Code :: integer()) -> Severity :: info | warn | crit. 18 | -callback ns_log_code_string(Code :: integer()) -> Description :: string(). 19 | -------------------------------------------------------------------------------- /apps/ns_server/src/query_rest.erl: -------------------------------------------------------------------------------- 1 | %% @author Couchbase 2 | %% @copyright 2015-Present Couchbase, Inc. 3 | %% 4 | %% Use of this software is governed by the Business Source License included in 5 | %% the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 6 | %% file, in accordance with the Business Source License, use of this software 7 | %% will be governed by the Apache License, Version 2.0, included in the file 8 | %% licenses/APL2.txt. 9 | %% 10 | %% @doc this module implements access to cbq-engine via REST API 11 | %% 12 | 13 | -module(query_rest). 14 | 15 | -include("ns_common.hrl"). 16 | 17 | -export([get_stats/0]). 18 | 19 | get_stats() -> 20 | case ns_cluster_membership:should_run_service(n1ql, node()) of 21 | true -> 22 | do_get_stats(); 23 | false -> 24 | [] 25 | end. 26 | 27 | do_get_stats() -> 28 | Port = service_ports:get_port(query_port, ns_config:latest(), node()), 29 | Timeout = ?get_timeout(stats, 30000), 30 | case rest_utils:get_json_local(n1ql, "/admin/stats", Port, Timeout) of 31 | {ok, _Headers, {Stats}} -> 32 | Stats; 33 | Error -> 34 | Error 35 | end. 36 | -------------------------------------------------------------------------------- /apps/ns_server/src/root_sup.erl: -------------------------------------------------------------------------------- 1 | %% @author Couchbase 2 | %% @copyright 2010-Present Couchbase, Inc. 3 | %% 4 | %% Use of this software is governed by the Business Source License included in 5 | %% the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 6 | %% file, in accordance with the Business Source License, use of this software 7 | %% will be governed by the Apache License, Version 2.0, included in the file 8 | %% licenses/APL2.txt. 9 | %% 10 | %% @doc root supervisor for ns_server 11 | 12 | -module(root_sup). 13 | 14 | -behavior(supervisor). 15 | 16 | -export([start_link/0, init/1]). 17 | 18 | start_link() -> 19 | supervisor:start_link({local, ?MODULE}, ?MODULE, []). 20 | 21 | init([]) -> 22 | {ok, {{rest_for_one, 10, 1}, 23 | [{dist_manager, {dist_manager, start_link, []}, 24 | permanent, 1000, worker, [dist_manager]}, 25 | {ns_server_cluster_sup, {ns_server_cluster_sup, start_link, []}, 26 | permanent, infinity, supervisor, [ns_server_cluster_sup]}]}}. 27 | -------------------------------------------------------------------------------- /apps/ns_server/src/service_cbas.erl: -------------------------------------------------------------------------------- 1 | %% @author Couchbase, Inc 2 | %% @copyright 2018-Present Couchbase, Inc. 3 | %% 4 | %% Use of this software is governed by the Business Source License included in 5 | %% the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 6 | %% file, in accordance with the Business Source License, use of this software 7 | %% will be governed by the Apache License, Version 2.0, included in the file 8 | %% licenses/APL2.txt. 9 | %% 10 | -module(service_cbas). 11 | 12 | 13 | -export([get_type/0]). 14 | 15 | get_type() -> 16 | cbas. 17 | -------------------------------------------------------------------------------- /apps/ns_server/src/stats_archiver.erl: -------------------------------------------------------------------------------- 1 | %% @author Couchbase 2 | %% @copyright 2009-Present Couchbase, Inc. 3 | %% 4 | %% Use of this software is governed by the Business Source License included in 5 | %% the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 6 | %% file, in accordance with the Business Source License, use of this software 7 | %% will be governed by the Apache License, Version 2.0, included in the file 8 | %% licenses/APL2.txt. 9 | %% 10 | %% @doc Store and aggregate statistics collected from stats_collector into a 11 | %% collection of ETS tables, emitting 'sample_archived' events when aggregates 12 | %% are created. The contents of ETS table is periodically dumped to files that 13 | %% then used to restore ETS tables after restart. 14 | %% 15 | 16 | -module(stats_archiver). 17 | 18 | -export([archives/0]). 19 | 20 | %% This is old stats backward compat code 21 | %% @doc the type of statistics collected 22 | %% {Period, Seconds, Samples} 23 | archives() -> 24 | [{minute, 1, 60}, 25 | {hour, 4, 900}, 26 | {day, 60, 1440}, % 24 hours 27 | {week, 600, 1152}, % eight days (computer weeks) 28 | {month, 1800, 1488}, % 31 days 29 | {year, 21600, 1464}]. % 366 days 30 | -------------------------------------------------------------------------------- /apps/ns_server/src/users_storage_sup.erl: -------------------------------------------------------------------------------- 1 | %% @author Couchbase 2 | %% @copyright 2017-Present Couchbase, Inc. 3 | %% 4 | %% Use of this software is governed by the Business Source License included in 5 | %% the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 6 | %% file, in accordance with the Business Source License, use of this software 7 | %% will be governed by the Apache License, Version 2.0, included in the file 8 | %% licenses/APL2.txt. 9 | %% 10 | %% @doc supervisor for users storage and corresponding replicator 11 | 12 | -module(users_storage_sup). 13 | 14 | -behaviour(supervisor). 15 | 16 | -export([start_link/0]). 17 | -export([init/1]). 18 | 19 | -include("ns_common.hrl"). 20 | 21 | start_link() -> 22 | supervisor:start_link({local, ?MODULE}, ?MODULE, []). 23 | 24 | init([]) -> 25 | {ok, {{one_for_all, 3, 10}, child_specs()}}. 26 | 27 | child_specs() -> 28 | [{users_replicator, 29 | {menelaus_users, start_replicator, []}, 30 | permanent, 1000, worker, [doc_replicator]}, 31 | 32 | {users_storage, 33 | {menelaus_users, start_storage, []}, 34 | permanent, 1000, worker, [replicated_dets, replicated_storage]}]. 35 | -------------------------------------------------------------------------------- /apps/ns_server/test/cgroups2/cgroup.controllers: -------------------------------------------------------------------------------- 1 | cpuset cpu io memory pids 2 | -------------------------------------------------------------------------------- /apps/ns_server/test/cgroups2/cgroup.procs: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /apps/ns_server/test/cgroups2/correct_mtab: -------------------------------------------------------------------------------- 1 | sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0 2 | tmpfs /run/lock tmpfs rw,nosuid,nodev,noexec,relatime,size=5120k,inode64 0 0 3 | cgroup2 /sys/fs/cgroup cgroup2 rw,nosuid,nodev,noexec,relatime,nsdelegate,memory_recursiveprot 0 0 4 | mqueue /dev/mqueue mqueue rw,nosuid,nodev,noexec,relatime 0 0 -------------------------------------------------------------------------------- /apps/ns_server/test/cgroups2/incorrect_mtab_flags: -------------------------------------------------------------------------------- 1 | sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0 2 | tmpfs /run/lock tmpfs rw,nosuid,nodev,noexec,relatime,size=5120k,inode64 0 0 3 | cgroup /sys/fs/cgroup cgroup2 ro,nosuid,nodev,noexec,relatime,nsdelegate,memory_recursiveprot 0 0 4 | mqueue /dev/mqueue mqueue rw,nosuid,nodev,noexec,relatime 0 0 -------------------------------------------------------------------------------- /apps/ns_server/test/cgroups2/memory.current: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /apps/ns_server/test/cgroups2/memory.high: -------------------------------------------------------------------------------- 1 | 123456 2 | -------------------------------------------------------------------------------- /apps/ns_server/test/cgroups2/memory.max: -------------------------------------------------------------------------------- 1 | max 2 | -------------------------------------------------------------------------------- /apps/ns_server/test/cgroups2/no_cgroup_mtab: -------------------------------------------------------------------------------- 1 | sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0 2 | securityfs /sys/kernel/security securityfs rw,nosuid,nodev,noexec,relatime 0 0 3 | bpf /sys/fs/bpf bpf rw,nosuid,nodev,noexec,relatime,mode=700 0 0 4 | mqueue /dev/mqueue mqueue rw,nosuid,nodev,noexec,relatime 0 0 -------------------------------------------------------------------------------- /apps/ns_server/test/cgroups2/services/cgroup.controllers: -------------------------------------------------------------------------------- 1 | memory pids 2 | -------------------------------------------------------------------------------- /apps/ns_server/test/cgroups2/services/cgroup.procs: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /apps/ns_server/test/cgroups2/services/kv/cgroup.controllers: -------------------------------------------------------------------------------- 1 | memory 2 | -------------------------------------------------------------------------------- /apps/ns_server/test/cgroups2/services/kv/cgroup.procs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/couchbase/ns_server/55791dba46d71554aedc379ee8d2d394bad71972/apps/ns_server/test/cgroups2/services/kv/cgroup.procs -------------------------------------------------------------------------------- /apps/ns_server/test/cgroups2/services/kv/memory.current: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /apps/ns_server/test/cgroups2/services/kv/memory.high: -------------------------------------------------------------------------------- 1 | max 2 | -------------------------------------------------------------------------------- /apps/ns_server/test/cgroups2/services/kv/memory.max: -------------------------------------------------------------------------------- 1 | 123 2 | -------------------------------------------------------------------------------- /apps/ns_server/test/cgroups2/services/memory.current: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /apps/ns_server/test/cgroups2/services/memory.high: -------------------------------------------------------------------------------- 1 | 6666 2 | -------------------------------------------------------------------------------- /apps/ns_server/test/cgroups2/services/memory.max: -------------------------------------------------------------------------------- 1 | 321 2 | -------------------------------------------------------------------------------- /apps/ns_server/test/cgroups2/services/n1ql/cgroup.controllers: -------------------------------------------------------------------------------- 1 | memory 2 | -------------------------------------------------------------------------------- /apps/ns_server/test/cgroups2/services/n1ql/cgroup.procs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/couchbase/ns_server/55791dba46d71554aedc379ee8d2d394bad71972/apps/ns_server/test/cgroups2/services/n1ql/cgroup.procs -------------------------------------------------------------------------------- /apps/ns_server/test/cgroups2/services/n1ql/memory.current: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /apps/ns_server/test/cgroups2/services/n1ql/memory.high: -------------------------------------------------------------------------------- 1 | max 2 | -------------------------------------------------------------------------------- /apps/ns_server/test/cgroups2/services/n1ql/memory.max: -------------------------------------------------------------------------------- 1 | 123 2 | -------------------------------------------------------------------------------- /apps/ns_server/test/cgroups2/services/ns_server/cgroup.controllers: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/couchbase/ns_server/55791dba46d71554aedc379ee8d2d394bad71972/apps/ns_server/test/cgroups2/services/ns_server/cgroup.controllers -------------------------------------------------------------------------------- /apps/ns_server/test/cgroups2/services/ns_server/cgroup.procs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/couchbase/ns_server/55791dba46d71554aedc379ee8d2d394bad71972/apps/ns_server/test/cgroups2/services/ns_server/cgroup.procs -------------------------------------------------------------------------------- /apps/ns_server/test/cgroups2/services/ns_server/memory.current: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/couchbase/ns_server/55791dba46d71554aedc379ee8d2d394bad71972/apps/ns_server/test/cgroups2/services/ns_server/memory.current -------------------------------------------------------------------------------- /apps/ns_server/test/cgroups2/services/ns_server/memory.high: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/couchbase/ns_server/55791dba46d71554aedc379ee8d2d394bad71972/apps/ns_server/test/cgroups2/services/ns_server/memory.high -------------------------------------------------------------------------------- /apps/ns_server/test/cgroups2/services/ns_server/memory.max: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/couchbase/ns_server/55791dba46d71554aedc379ee8d2d394bad71972/apps/ns_server/test/cgroups2/services/ns_server/memory.max -------------------------------------------------------------------------------- /apps/ns_server/test/tty_safe_stderr_sink.erl: -------------------------------------------------------------------------------- 1 | %% @author Couchbase 2 | %% @copyright 2018-Present Couchbase, Inc. 3 | %% 4 | %% Use of this software is governed by the Business Source License included in 5 | %% the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 6 | %% file, in accordance with the Business Source License, use of this software 7 | %% will be governed by the Apache License, Version 2.0, included in the file 8 | %% licenses/APL2.txt. 9 | %% 10 | -module(tty_safe_stderr_sink). 11 | 12 | -behaviour(gen_server2). 13 | -compile(nowarn_export_all). 14 | -compile(export_all). 15 | 16 | start_link(Name) -> 17 | gen_server2:start_link({local, Name}, ?MODULE, [], []). 18 | 19 | handle_call(sync, _From, State) -> 20 | {reply, ok, State}; 21 | handle_call({log, Msg}, _From, State) -> 22 | io:put_chars(standard_error, Msg), 23 | {reply, ok, State}. 24 | 25 | meta() -> 26 | [{type, preformatted}]. 27 | -------------------------------------------------------------------------------- /cluster_tests/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(GET_PIP_PY_FILE ${CMAKE_CURRENT_BINARY_DIR}/get-pip.py) 2 | 3 | # We call this with a cmake call so that we can download the file at build time, 4 | # rather than configure time, which avoids downloading the file needlessly 5 | SET (GET_PIP_CMD "${CMAKE_COMMAND}" 6 | -D "GET_PIP_PY_FILE=${GET_PIP_PY_FILE}" 7 | -P "${CMAKE_CURRENT_SOURCE_DIR}/get_pip.cmake") 8 | 9 | ADD_CUSTOM_TARGET(cluster_tests_python_requirements 10 | COMMAND ${GET_PIP_CMD} 11 | COMMAND ${PYTHON_EXE} ${GET_PIP_PY_FILE} 12 | COMMAND ${PYTHON_EXE} -m pip 13 | install -r ${CMAKE_CURRENT_SOURCE_DIR}/requirements.txt) 14 | SEPARATE_ARGUMENTS(cluster_test_args NATIVE_COMMAND $ENV{CLUSTER_TESTS_ARGS}) 15 | ADD_CUSTOM_TARGET(cluster_tests 16 | COMMAND JAVA_HOME=${Java_JAVA_HOME} ${PYTHON_EXE} 17 | ${CMAKE_CURRENT_SOURCE_DIR}/run.py ${cluster_test_args} 18 | DEPENDS cluster_tests_python_requirements 19 | COMMAND_EXPAND_LISTS) 20 | # Retain old name as an alias to allow the existing jenkins jobs to work 21 | ADD_CUSTOM_TARGET(api_test DEPENDS cluster_tests) 22 | 23 | ADD_TEST(cluster_tests 24 | "${CMAKE_COMMAND}" 25 | --build "${CMAKE_BINARY_DIR}" 26 | --target cluster_tests) 27 | -------------------------------------------------------------------------------- /cluster_tests/dummy_test.py: -------------------------------------------------------------------------------- 1 | # @author Couchbase 2 | # @copyright 2020-Present Couchbase, Inc. 3 | # 4 | # Use of this software is governed by the Business Source License included in 5 | # the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 6 | # file, in accordance with the Business Source License, use of this software 7 | # will be governed by the Apache License, Version 2.0, included in the file 8 | # licenses/APL2.txt. 9 | 10 | import testlib 11 | 12 | class DummyTestSet(testlib.BaseTestSet): 13 | 14 | @staticmethod 15 | def requirements(): 16 | return testlib.ClusterRequirements(num_nodes=1) 17 | 18 | def setup(self): 19 | pass 20 | 21 | def teardown(self): 22 | pass 23 | 24 | def test_teardown(self): 25 | pass 26 | 27 | def dummy1_test(self): 28 | assert False, "Dummy error reason" 29 | 30 | def dummy2_test(self): 31 | pass 32 | -------------------------------------------------------------------------------- /cluster_tests/get_pip.cmake: -------------------------------------------------------------------------------- 1 | FILE(DOWNLOAD https://bootstrap.pypa.io/get-pip.py 2 | ${GET_PIP_PY_FILE} TIMEOUT 60) 3 | -------------------------------------------------------------------------------- /cluster_tests/requirements.txt: -------------------------------------------------------------------------------- 1 | requests>=2.32.3 2 | python-ldap-test~=0.3.1 3 | scramp~=1.4.4 4 | poetry~=1.4.2 5 | pysaml2 @ git+https://github.com/couchbasedeps/pysaml2@couchbase-v7.4.1 6 | PyYAML~=6.0 7 | traceback-with-variables~=2.0.4 8 | cryptography~=38.0.1 9 | jsondiff~=2.0.0 10 | python-dateutil~=2.9.0 11 | couchbase 12 | pyzipper~=0.3.6 13 | websockets~=14.1 14 | PyJWT>=2.0.0 15 | pykmip>=0.10.0 16 | -------------------------------------------------------------------------------- /cluster_tests/resources/jwt/jwks.json: -------------------------------------------------------------------------------- 1 | { 2 | "keys": [ 3 | { 4 | "kty": "EC", 5 | "alg": "ES256", 6 | "crv": "P-256", 7 | "x": "MKBCTNIcKUSDii11ySs3526iDZ8AiTo7Tu6KPAqv7D4", 8 | "y": "4Etl6SRW2YiLUrN5vfvVHuhp7x8PxltmWWlbbM4IFyM", 9 | "use": "sig", 10 | "kid": "1" 11 | }, 12 | { 13 | "kty": "RSA", 14 | "alg": "RS256", 15 | "n": "uVCkymFxcVbSFOLF75H_OWckZ2BXykc1mNKVtXewBcX9svAkQodMmJo3qNjxD-Q_ITVuxUj5HmYrQ5Yru55aQID6JrrAqFi3tt9ap4padR2x--m6nadZKI8OK8RQ6WwTKfI7D-BpUb_Ow5s9u2ej-fu70mPfNj3KsayiWikeXynHloyoZsJ9W3-Ce0yuUlf9VVbp_igql43f10gmVwqE4VdJ9nHyl-Fdr005M_SalPiL9tgGak5VR01DSk-gdlBEocftJWHRELVGCJYfYEZqYjNXI8y5d4kadnQ1-89rlvbAFfRvJAxXKXqZVviE8cYrjqzjm_MDaxunDCckQJlJ4w", 16 | "e": "AQAB", 17 | "use": "sig", 18 | "kid": "2011-04-29" 19 | } 20 | ] 21 | } 22 | 23 | -------------------------------------------------------------------------------- /cluster_tests/resources/jwt/jwks_rotated.json: -------------------------------------------------------------------------------- 1 | { 2 | "keys": [ 3 | { 4 | "kty": "RSA", 5 | "alg": "RS256", 6 | "n": "wQB6kL8vCmPj3gnTVy8-XgRtaDMnpeTQb8UCxrZYJ1iXDym2lZLWtmB60EpnacVf2CZ3XvMkpLMKNRorfopkDhTlvgdKQRV8p4HTgVdFqxAnq-TLWlcC0JK17xD9ZlKXZopzP9amu8kkkSpQGYQl0nd3ynszdtmjU6Jv1YlJIA__vntmfuVu6Hmc52Ytg8MiRUOHoJUdhNCPDg_qL9RBnVrF6cwDUHXBSgi-G5uE7_SZmppT-qQ8GEyg5a6dyOWETjqo1hFNn5qCZkvvaG1AEDi1lnQASxy3dKcArul1YHkj1t7VHLJtibB8_NHVkZWW2qY2YUzrXMt3yqfu6l74Xw", 7 | "e": "AQAB", 8 | "use": "sig", 9 | "kid": "rotated-key" 10 | }, 11 | { 12 | "kty": "RSA", 13 | "alg": "RS256", 14 | "n": "uVCkymFxcVbSFOLF75H_OWckZ2BXykc1mNKVtXewBcX9svAkQodMmJo3qNjxD-Q_ITVuxUj5HmYrQ5Yru55aQID6JrrAqFi3tt9ap4padR2x--m6nadZKI8OK8RQ6WwTKfI7D-BpUb_Ow5s9u2ej-fu70mPfNj3KsayiWikeXynHloyoZsJ9W3-Ce0yuUlf9VVbp_igql43f10gmVwqE4VdJ9nHyl-Fdr005M_SalPiL9tgGak5VR01DSk-gdlBEocftJWHRELVGCJYfYEZqYjNXI8y5d4kadnQ1-89rlvbAFfRvJAxXKXqZVviE8cYrjqzjm_MDaxunDCckQJlJ4w", 15 | "e": "AQAB", 16 | "use": "sig", 17 | "kid": "2011-04-29" 18 | } 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /cluster_tests/resources/jwt/mock_ed25519_private.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MC4CAQAwBQYDK2VwBCIEIAFQXkkZiNRvPnHjQEthehBX1GDYLfNXVRP/8TXOIOAF 3 | -----END PRIVATE KEY----- 4 | -------------------------------------------------------------------------------- /cluster_tests/resources/jwt/mock_ed25519_public.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN PUBLIC KEY----- 2 | MCowBQYDK2VwAyEAkxn+VqsN+hbq47WBqGv66a/LF6ObDuJIOA1+vL/z7g4= 3 | -----END PUBLIC KEY----- 4 | -------------------------------------------------------------------------------- /cluster_tests/resources/jwt/mock_ed448_private.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MEcCAQAwBQYDK2VxBDsEOaq3MVe/F39C0J36kJd+J1lSoxq587XD2Up22ylcIoZV 3 | HlL9Nz032z2VfUq1U0D+1DJRY45i09Iljg== 4 | -----END PRIVATE KEY----- 5 | -------------------------------------------------------------------------------- /cluster_tests/resources/jwt/mock_ed448_public.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN PUBLIC KEY----- 2 | MEMwBQYDK2VxAzoAdwhw1w1k1E1QXD3LO6em4F91ez9sh9YTpFIbn4gezDNjnM45 3 | LM+fcPU/H8/vukKehr/yC3ixDbGA 4 | -----END PUBLIC KEY----- 5 | -------------------------------------------------------------------------------- /cluster_tests/resources/jwt/mock_es256_private.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN EC PRIVATE KEY----- 2 | MHcCAQEEIEVimv6N4knIKLOfBcYZw4lRTt8SV8CiMBW/8bJMHOD/oAoGCCqGSM49 3 | AwEHoUQDQgAEEtxG4Q4cJL59Cf566QpZnO1ZJIhPLTaYLMPCPER2ZEOwPoxLP8kd 4 | 5qBEwaWA3535ds+oGGnNPMcMRAkQdNGPdw== 5 | -----END EC PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /cluster_tests/resources/jwt/mock_es256_public.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN PUBLIC KEY----- 2 | MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEEtxG4Q4cJL59Cf566QpZnO1ZJIhP 3 | LTaYLMPCPER2ZEOwPoxLP8kd5qBEwaWA3535ds+oGGnNPMcMRAkQdNGPdw== 4 | -----END PUBLIC KEY----- 5 | -------------------------------------------------------------------------------- /cluster_tests/resources/jwt/mock_es256k_private.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN EC PRIVATE KEY----- 2 | MHQCAQEEIDvVAReZ94aimYhyYCndFYyMYz2V9QyOqxx7a038EcaxoAcGBSuBBAAK 3 | oUQDQgAExUC3O+QXM7Q4YZTyqYMd1kPa64+8XpX9A5Afn2FGyxWF4tcFoe5tyKpV 4 | Rr/XePa15Z20x7GwoFnuC7D0ZpvCWQ== 5 | -----END EC PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /cluster_tests/resources/jwt/mock_es256k_public.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN PUBLIC KEY----- 2 | MFYwEAYHKoZIzj0CAQYFK4EEAAoDQgAExUC3O+QXM7Q4YZTyqYMd1kPa64+8XpX9 3 | A5Afn2FGyxWF4tcFoe5tyKpVRr/XePa15Z20x7GwoFnuC7D0ZpvCWQ== 4 | -----END PUBLIC KEY----- 5 | -------------------------------------------------------------------------------- /cluster_tests/resources/jwt/mock_es384_private.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN EC PRIVATE KEY----- 2 | MIGkAgEBBDAkz6q6YmBc+FvdYQ4zgWPuG49EQ3cHOfIPbnUc3qwSwfpLtBZkunKE 3 | /MJiD+LeG+GgBwYFK4EEACKhZANiAAT2INYl8Uh0oqROod43QW30041/+E6gMrql 4 | uUUTyEj4n80f0ypxIUmFT+rrL6O5krpezTCbdz9/G9RNmsrc3G0A2g/ntwu/Vm5z 5 | Qkb6Cnf1bVZnKdBBdu2jciHCRQGbEr0= 6 | -----END EC PRIVATE KEY----- 7 | -------------------------------------------------------------------------------- /cluster_tests/resources/jwt/mock_es384_public.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN PUBLIC KEY----- 2 | MHYwEAYHKoZIzj0CAQYFK4EEACIDYgAE9iDWJfFIdKKkTqHeN0Ft9NONf/hOoDK6 3 | pblFE8hI+J/NH9MqcSFJhU/q6y+juZK6Xs0wm3c/fxvUTZrK3NxtANoP57cLv1Zu 4 | c0JG+gp39W1WZynQQXbto3IhwkUBmxK9 5 | -----END PUBLIC KEY----- 6 | -------------------------------------------------------------------------------- /cluster_tests/resources/jwt/mock_es512_private.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN EC PRIVATE KEY----- 2 | MIHcAgEBBEIBA3bROgu1PDBwZtr3lrAc7q18XFEMZ2vujewRUDSiPUh0qW1Hy1C5 3 | z9cT5c4SI66VqXqP7ooRe9COd7N0rnNtCR2gBwYFK4EEACOhgYkDgYYABAAiQxVO 4 | q8n6wSXLtttwlWLqGF8n5vgR6jqWUXw8hTzvAy8uYHRg+/0P6tKJUArK1LXONERA 5 | I8WzTYhBA8GsMRg3cgCgXpKrQ7Pq3wrLlwotAdp4CyYnzbqp6fO4i/1FAPuA3/jp 6 | A1Wr+BiBtxdPINjvG8gf/90YdUZlwFFyCuDAXaNnzw== 7 | -----END EC PRIVATE KEY----- 8 | -------------------------------------------------------------------------------- /cluster_tests/resources/jwt/mock_es512_public.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN PUBLIC KEY----- 2 | MIGbMBAGByqGSM49AgEGBSuBBAAjA4GGAAQAIkMVTqvJ+sEly7bbcJVi6hhfJ+b4 3 | Eeo6llF8PIU87wMvLmB0YPv9D+rSiVAKytS1zjREQCPFs02IQQPBrDEYN3IAoF6S 4 | q0Oz6t8Ky5cKLQHaeAsmJ826qenzuIv9RQD7gN/46QNVq/gYgbcXTyDY7xvIH//d 5 | GHVGZcBRcgrgwF2jZ88= 6 | -----END PUBLIC KEY----- 7 | -------------------------------------------------------------------------------- /cluster_tests/resources/jwt/mock_invalid_jwks1.json: -------------------------------------------------------------------------------- 1 | { 2 | "keys": [ 3 | { 4 | "kty": "EC", 5 | "crv": "P-256", 6 | "x": "l7ZJ5Xo5NN9pU8dOqpl1TTeHQF2F6WZrBXxQyBcY4Ys", 7 | "y": "v7v1JNzFzVVTA7gVhIoI0Ptt7IAaHDzK1QwmvA5YoYk", 8 | "alg": "ES256", 9 | "use": "sig", 10 | "kid": "duplicate-key-id" 11 | }, 12 | { 13 | "kty": "EC", 14 | "crv": "P-256", 15 | "x": "A-2eZ3N8xCv6xy37lQ_VPoMyL3MBIUBqK0_f9m3hnsA", 16 | "y": "S5p1dOVYjTLp8sX7SZD3AeBzTllNsDEGe6HV7qY3fpU", 17 | "alg": "ES256", 18 | "use": "sig", 19 | "kid": "duplicate-key-id" 20 | } 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /cluster_tests/resources/jwt/mock_invalid_jwks2.json: -------------------------------------------------------------------------------- 1 | { 2 | "keys": [ 3 | { 4 | "kty": "RSA", 5 | "alg": "RS256", 6 | "use": "sig", 7 | "kid": "short-rsa-1", 8 | "n": "AKlMfLtWREvNRKx9LVCYmZtRoU2f5DCmRHC8l21PjXHqNwXeebM7FvgNyebjDpJlAgbAcDbZmVjk2FpA5KOI3Q", 9 | "e": "AQAB" 10 | }, 11 | { 12 | "kty": "RSA", 13 | "alg": "RS256", 14 | "use": "sig", 15 | "kid": "short-rsa-2", 16 | "n": "AKNc8nG7FaLmfBC3GJmCcXKfs6wQXyzSTXOhJmjag9iW26i4l1bxlDMBXKiZ2YQjx3tQ1YQXz2sK3qPq4dU", 17 | "e": "AQAB" 18 | }, 19 | { 20 | "kty": "OKP", 21 | "alg": "EdDSA", 22 | "crv": "Ed25519", 23 | "use": "sig", 24 | "kid": "valid-eddsa", 25 | "x": "11q_YvP5I_sOG0rXoHFhzHneOytZ6E6hdBR4JYqSHb8" 26 | } 27 | ] 28 | } 29 | -------------------------------------------------------------------------------- /cluster_tests/resources/jwt/mock_rsa_public.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN PUBLIC KEY----- 2 | MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuVCkymFxcVbSFOLF75H/ 3 | OWckZ2BXykc1mNKVtXewBcX9svAkQodMmJo3qNjxD+Q/ITVuxUj5HmYrQ5Yru55a 4 | QID6JrrAqFi3tt9ap4padR2x++m6nadZKI8OK8RQ6WwTKfI7D+BpUb/Ow5s9u2ej 5 | +fu70mPfNj3KsayiWikeXynHloyoZsJ9W3+Ce0yuUlf9VVbp/igql43f10gmVwqE 6 | 4VdJ9nHyl+Fdr005M/SalPiL9tgGak5VR01DSk+gdlBEocftJWHRELVGCJYfYEZq 7 | YjNXI8y5d4kadnQ1+89rlvbAFfRvJAxXKXqZVviE8cYrjqzjm/MDaxunDCckQJlJ 8 | 4wIDAQAB 9 | -----END PUBLIC KEY----- 10 | -------------------------------------------------------------------------------- /cluster_tests/resources/jwt/mock_rsa_public_invalid.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN PUBLIC KEY----- 2 | MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDa4GruUpi3j/KFxWrCM2lwZU75 3 | EdnRTw0NSDczaFYSAVRpFcnW8kLMGyWrq4tBDIl+MZF3L842fQDQidmfbHInNsyQ 4 | 2pBdnJkO9/6O2Aj862tT4S+xua6WioaF0TydmNdSbT1RvqLZ9Vh7cKK7y6NGnN+U 5 | P+YVRlSr/ws2Fr1JZwIDAQAB 6 | -----END PUBLIC KEY----- 7 | -------------------------------------------------------------------------------- /cluster_tests/resources/pykmip/kmip_pkcs8.key: -------------------------------------------------------------------------------- 1 | -----BEGIN ENCRYPTED PRIVATE KEY----- 2 | MIH0MF8GCSqGSIb3DQEFDTBSMDEGCSqGSIb3DQEFDDAkBBAgFhnuUcrjFN7r3a/9 3 | BMaUAgIIADAMBggqhkiG9w0CCQUAMB0GCWCGSAFlAwQBKgQQCRHbjkSBrCWMnmca 4 | qWJcIASBkE9st6pIzWp9VDDNjvXQtEtmL6uXbLHuLsVD+Z53sYVciUB0gGuTUA6t 5 | fDqz6nkdXy+ZB31vbnMGbXmYEDUlWj7RfnZP4IAwDWgezTdAmaC2sYdMbonD8PAt 6 | gfVHZjvRhhOj0YcbWQdDSzfiIQjUflRY5jRJmqKCQSc6vBUjK9D1kn8wYY1LapPw 7 | 55+uvpiBCw== 8 | -----END ENCRYPTED PRIVATE KEY----- 9 | -------------------------------------------------------------------------------- /cluster_tests/resources/pykmip/localhost.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIBiDCCAS6gAwIBAgIUXS4+Y9TJH1I3LuQjt8CHeJxIuggwCgYIKoZIzj0EAwIw 3 | FDESMBAGA1UEAwwJbG9jYWxob3N0MCAXDTI1MDkwODIyNTEzM1oYDzIxMjUwODE1 4 | MjI1MTMzWjAUMRIwEAYDVQQDDAlsb2NhbGhvc3QwWTATBgcqhkjOPQIBBggqhkjO 5 | PQMBBwNCAAQ+8xWiLWV2NsKzJPBgLcZ9UdBt/XuYg1qj/05xugZSwCD7OdUuuUK0 6 | XociqwZ2HL5iScsUS4ivzmqXfBmm4B79o1wwWjAaBgNVHREEEzARgglsb2NhbGhv 7 | c3SHBH8AAAEwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMB0GA1UdDgQW 8 | BBS2EvL3lvXyRQcDZEc7Bj0F4FdD5DAKBggqhkjOPQQDAgNIADBFAiEA9A1icq94 9 | 1p8OfmuJ5E9gqdjN5wSfL57zqmfqldi/LxkCID4jF7NoyNm8DDuva3yEGMLN6JZ0 10 | flK24ichuQy/CBoq 11 | -----END CERTIFICATE----- 12 | -------------------------------------------------------------------------------- /cluster_tests/resources/pykmip/private.key: -------------------------------------------------------------------------------- 1 | -----BEGIN EC PARAMETERS----- 2 | BggqhkjOPQMBBw== 3 | -----END EC PARAMETERS----- 4 | -----BEGIN EC PRIVATE KEY----- 5 | MHcCAQEEIHeLmFrpXLmdEeh25AGhREoXTDjUehX03NpfmL4STnlNoAoGCCqGSM49 6 | AwEHoUQDQgAEPvMVoi1ldjbCsyTwYC3GfVHQbf17mINao/9OcboGUsAg+znVLrlC 7 | tF6HIqsGdhy+YknLFEuIr85ql3wZpuAe/Q== 8 | -----END EC PRIVATE KEY----- 9 | -------------------------------------------------------------------------------- /cluster_tests/resources/saml/mockidp_cert_fingerprints.pem: -------------------------------------------------------------------------------- 1 | 2B:B2:DB:E4:B4:67:A1:99:E9:8A:DB:16:0A:8F:A4:C6:B8:B0:24:5C:C8:E8:EC:DF:1D:71:47:94:47:9F:88:91:21:79:A6:41:10:70:46:0C:94:9A:98:3C:61:3F:1F:EB:1B:BA:CF:10:83:F6:15:63:73:14:1D:12:0B:D1:CD:46 2 | -------------------------------------------------------------------------------- /cluster_tests/resources/secrets_management/getpass.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo -n "a6077d7d420d7f86517d" 4 | -------------------------------------------------------------------------------- /cluster_tests/resources/secrets_management/getpass_fail.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo "getting password failed" >&2 4 | 5 | exit 1 6 | -------------------------------------------------------------------------------- /cluster_tests/resources/secrets_management/getpass_notexec.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo -n "a6077d7d420d7f86517d" 4 | -------------------------------------------------------------------------------- /cluster_tests/resources/secrets_management/getpass_wrong.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo -n "wrong" 4 | -------------------------------------------------------------------------------- /cluster_tests/resources/test_certs/test_CA.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIDDDCCAfSgAwIBAgIIF3WP74X5GqAwDQYJKoZIhvcNAQELBQAwJDEiMCAGA1UE 3 | AxMZQ291Y2hiYXNlIFNlcnZlciAxYmVmNDI4YjAeFw0xMzAxMDEwMDAwMDBaFw00 4 | OTEyMzEyMzU5NTlaMCQxIjAgBgNVBAMTGUNvdWNoYmFzZSBTZXJ2ZXIgMWJlZjQy 5 | OGIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDjUPwoYdNJGWIHHjEO 6 | dMrY12Sh5QwsHaq+mObGZH2NUB368iZG0SCEOOXMBydDB2gQPebKQNnuceN8mKI1 7 | uINgfolid1tcOPfppd0RotWZ+734EH4na3UYYcnbu9J6zAy1Wpmpe5qfCW2KYKTA 8 | HW5VGeroDHCZzhVTZc3l6djhw9YGwkfkdR0+0RbqwDO1YZ1q2SdfcthS3grDJIG6 9 | FweOK73iQF+uVqudikbSUVN7g322l8f1y4n/cR4osxezPKVwS0p+4EqAhswZCr/V 10 | xWnJFSCqdUh51E9f/Pvv2rDr+OfiGALWu84t59MBOtqFTX/LzPP+fnt/kvElCuPa 11 | zWW5AgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MB0G 12 | A1UdDgQWBBReIegeXjxj4ZNa7iWssdI0g5Ep4DANBgkqhkiG9w0BAQsFAAOCAQEA 13 | aqXiGoV926eu6c0Yk1iQYeb3NhEDH6bQIVy2BvffgBQsSt1/4oevclPFTdwg7RYt 14 | JPlgfTke6JYADujJdIkjmM0DnwBVoOU5KKVIOSIW/2D7nvz3DU16jpCUfzMH5epF 15 | djsIGEdnceKaSrYcM8MnFSRFk+giD1g3iln1zJbztJ4/dp9+UoFZUO1lOLlJYHgA 16 | pYxEejC+X+V7FrvaBZsgKIo7gGVXzJFXxXz1U/xWPsLEtw2JuLLsSHgrL7IjWcb0 17 | 8Ol0hfb2JqY+4Z1Zkz6MnV9Oz5WnkebA2FG0YFa7FCOzEu6mD04fMZHoLb9PW5j9 18 | bR2rA3eQR//vBdwzjk7ZlA== 19 | -----END CERTIFICATE----- 20 | -------------------------------------------------------------------------------- /cluster_tests/resources/test_certs/test_CA2.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIDDDCCAfSgAwIBAgIIF4LAbHjLyTAwDQYJKoZIhvcNAQELBQAwJDEiMCAGA1UE 3 | AxMZQ291Y2hiYXNlIFNlcnZlciBkMmM4MDM1OTAeFw0xMzAxMDEwMDAwMDBaFw00 4 | OTEyMzEyMzU5NTlaMCQxIjAgBgNVBAMTGUNvdWNoYmFzZSBTZXJ2ZXIgZDJjODAz 5 | NTkwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDQ6SYRkA88FmgU69tE 6 | YmdgH7HQf+rJ8OEKbZSstrPF6gsQL1yz4238Yhpsu2muF5uJua5tlfS9TCITB40s 7 | tIyz/WxRkzyT+tXXUO4/GBjmEDcER2/swIY+xwxlJcsbnXleF4OzMqvZyey9bEEV 8 | /LQ9DsHkPJuPOTjAqPNdJ+DlzWYapAdx6qXgOQpabircsPSaZrsLXSNAgl1uGroN 9 | rwUQE7XFP0Iukqlhxh8HPOsUXu2XtvJRlnjnO9O7C/KfGlEVZoAvsZHoGXlV9n1g 10 | k/LJQXMJpcZzzG2V6MtBOQk2SQlw03wITb1HJweqjNZNekZXAjTzZle4dZjLGtpt 11 | k1f/AgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MB0G 12 | A1UdDgQWBBStxbzTqDonwxdUzkzS+Zi43WqXATANBgkqhkiG9w0BAQsFAAOCAQEA 13 | KJ8T7LLQjNndpgfew5xRLZT0B+RNGaV/UyOniTVkD69QfTBKgORRHNIucY5sSc32 14 | 54EY0HyKYk3ete+lK2Z37t7tq43mloAxlQvIarfgs113laAMBRd5o6Bl9xVcncaT 15 | GG3LB+D1W1kase1ZELssUqasVyfA+IveO7ME4MZLV008l88Dv368g+bLZ/rjK11T 16 | EFLFdleKVZKFEM1BY0WcBAN1ypASdx83fzVDDQ3uafPWDEnr68UYMzRnq4MUF25H 17 | OemDnH1/9BDynwN4rkRZLESepMQf9IRFSvLHqJ8rp5nXC0paKr1FMGXEI8QjTP9Q 18 | IH8HtkU6UGkhpedxOz6JKw== 19 | -----END CERTIFICATE----- 20 | -------------------------------------------------------------------------------- /cluster_tests/testlib/__init__.py: -------------------------------------------------------------------------------- 1 | # @author Couchbase 2 | # @copyright 2023-Present Couchbase, Inc. 3 | # 4 | # Use of this software is governed by the Business Source License included in 5 | # the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 6 | # file, in accordance with the Business Source License, use of this software 7 | # will be governed by the Apache License, Version 2.0, included in the file 8 | # licenses/APL2.txt. 9 | from testlib.testlib import * 10 | from testlib.cluster import Cluster 11 | from testlib.node import Node 12 | from testlib.requirements import ClusterRequirements 13 | from testlib.util import * -------------------------------------------------------------------------------- /cmake_modules/abspath.cmake: -------------------------------------------------------------------------------- 1 | # Utility script to compute absolute path given any input 2 | GET_FILENAME_COMPONENT (result "${dir}" REALPATH) 3 | EXECUTE_PROCESS (COMMAND "${CMAKE_COMMAND}" -E echo "${result}") 4 | -------------------------------------------------------------------------------- /cmake_modules/couchbase-server-black-duck-manifest.yaml: -------------------------------------------------------------------------------- 1 | components: 2 | enacl: 3 | bd-id: e72b97ab-d670-4214-803a-d6af3ea7ac28 4 | versions: [ "v1.2.1" ] 5 | erl-iso8601: 6 | bd-id: 406e7219-dc9b-40f8-ab7f-b68e66d4ae94 7 | versions: [ "1.3.3" ] 8 | -------------------------------------------------------------------------------- /cmake_modules/string-replace.cmake: -------------------------------------------------------------------------------- 1 | SET ("${SEARCH}" "${REPLACE}") 2 | CONFIGURE_FILE ("${INPUT_FILE}" "${OUTPUT_FILE}" @ONLY) 3 | -------------------------------------------------------------------------------- /deps/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ADD_SUBDIRECTORY (gocode) 2 | -------------------------------------------------------------------------------- /deps/gocode/go-kmip/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | *.test 24 | *.prof 25 | 26 | coverage.txt 27 | .idea -------------------------------------------------------------------------------- /deps/gocode/go-kmip/.golangci.yml: -------------------------------------------------------------------------------- 1 | linters: 2 | enable: 3 | - gofmt 4 | - gosec 5 | - unconvert 6 | - goimports 7 | - misspell 8 | -------------------------------------------------------------------------------- /deps/gocode/go-kmip/.travis.yml: -------------------------------------------------------------------------------- 1 | dist: xenial 2 | sudo: false 3 | language: go 4 | go: 5 | - 1.12.x 6 | 7 | env: 8 | - GO111MODULE=on 9 | 10 | before_install: 11 | - curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.16.0 12 | 13 | after_success: 14 | - bash <(curl -s https://codecov.io/bash) 15 | -------------------------------------------------------------------------------- /deps/gocode/go-kmip/Makefile: -------------------------------------------------------------------------------- 1 | all: test lint 2 | 3 | .PHONY: test 4 | test: 5 | go test -v -race -coverprofile=coverage.txt -covermode=atomic . 6 | 7 | .PHONY: lint 8 | lint: 9 | golangci-lint run 10 | -------------------------------------------------------------------------------- /deps/gocode/go-kmip/certificates.go: -------------------------------------------------------------------------------- 1 | package kmip 2 | 3 | type Certificate struct { 4 | Tag `kmip:"CERTIFICATE"` 5 | 6 | CertificateType Enum `kmip:"CERTIFICATE_TYPE,required"` 7 | CertificateValue []byte `kmip:"CERTIFICATE_VALUE,required"` 8 | } 9 | -------------------------------------------------------------------------------- /deps/gocode/go-kmip/errors.go: -------------------------------------------------------------------------------- 1 | package kmip 2 | 3 | /* This Source Code Form is subject to the terms of the Mozilla Public 4 | * License, v. 2.0. If a copy of the MPL was not distributed with this 5 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 6 | 7 | // Error enhances error with "Result Reason" field 8 | // 9 | // Any Error instance is returned back to the caller with message and 10 | // result reason set, any other Go error is returned as "General Failure" 11 | type Error interface { 12 | error 13 | ResultReason() Enum 14 | } 15 | 16 | type protocolError struct { 17 | error 18 | reason Enum 19 | } 20 | 21 | func (e protocolError) ResultReason() Enum { 22 | return e.reason 23 | } 24 | 25 | func wrapError(err error, reason Enum) protocolError { 26 | return protocolError{err, reason} 27 | } 28 | -------------------------------------------------------------------------------- /deps/gocode/go-kmip/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/akeylesslabs/go-kmip 2 | 3 | go 1.16 4 | 5 | require ( 6 | github.com/pkg/errors v0.8.1 7 | github.com/stretchr/testify v1.3.0 8 | ) 9 | -------------------------------------------------------------------------------- /deps/gocode/go-kmip/go.sum: -------------------------------------------------------------------------------- 1 | github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= 2 | github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 3 | github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= 4 | github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= 5 | github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= 6 | github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 7 | github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= 8 | github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= 9 | github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= 10 | -------------------------------------------------------------------------------- /deps/gocode/go-kmip/tls.go: -------------------------------------------------------------------------------- 1 | package kmip 2 | 3 | import "crypto/tls" 4 | 5 | /* This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 8 | 9 | // DefaultServerTLSConfig fills in good defaults for server TLS configuration 10 | func DefaultServerTLSConfig(config *tls.Config) { 11 | config.MinVersion = tls.VersionTLS12 12 | config.PreferServerCipherSuites = true 13 | config.ClientAuth = tls.RequireAndVerifyClientCert 14 | } 15 | 16 | // DefaultClientTLSConfig fills in good defaults for client TLS configuration 17 | func DefaultClientTLSConfig(config *tls.Config) { 18 | config.MinVersion = tls.VersionTLS12 19 | } 20 | -------------------------------------------------------------------------------- /deps/gocode/gocbutils/utils.go: -------------------------------------------------------------------------------- 1 | // @author Couchbase 2 | // @copyright 2019-Present Couchbase, Inc. 3 | // 4 | // Use of this software is governed by the Business Source License included in 5 | // the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 6 | // file, in accordance with the Business Source License, use of this software 7 | // will be governed by the Apache License, Version 2.0, included in the file 8 | // licenses/APL2.txt. 9 | package gocbutils 10 | 11 | import ( 12 | "runtime" 13 | ) 14 | 15 | const ( 16 | maxCPUThreads = 4 17 | ) 18 | 19 | // LimitCPUThreads adjusts the GOMAXPROCS setting to not exceed 20 | // maxCPUThreads. Only meant to be used by the long running go processes 21 | // internal to ns_server. Most of those processes do too little to warrant 22 | // spawning tens of threads on machines that have a large number of CPUs. Yet 23 | // that's what happens with the default GOMAXPROCS setting. This doesn't 24 | // affect the number of threads that golang's runtime might start for doing 25 | // IO, since there's no way to control that. 26 | func LimitCPUThreads() { 27 | numCPU := runtime.NumCPU() 28 | if numCPU > maxCPUThreads { 29 | runtime.GOMAXPROCS(maxCPUThreads) 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /deps/gocode/goport/utils_linux.go: -------------------------------------------------------------------------------- 1 | // @author Couchbase 2 | // @copyright 2025-Present Couchbase, Inc. 3 | // 4 | // Use of this software is governed by the Business Source License included in 5 | // the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 6 | // file, in accordance with the Business Source License, use of this software 7 | // will be governed by the Apache License, Version 2.0, included in the file 8 | // licenses/APL2.txt. 9 | 10 | // +build linux 11 | 12 | package main 13 | 14 | import ( 15 | "os/exec" 16 | "syscall" 17 | ) 18 | 19 | func doSetPgid(cmd *exec.Cmd) { 20 | cmd.SysProcAttr = &syscall.SysProcAttr{Setpgid: true} 21 | } 22 | 23 | func doSetCgroup(cmd *exec.Cmd, fd uintptr) { 24 | cmd.SysProcAttr = &syscall.SysProcAttr{CgroupFD: int(fd), UseCgroupFD: true} 25 | } 26 | 27 | func doKillPgroup(cmd *exec.Cmd) error { 28 | return syscall.Kill(-cmd.Process.Pid, syscall.SIGKILL) 29 | } 30 | -------------------------------------------------------------------------------- /deps/gocode/goport/utils_other.go: -------------------------------------------------------------------------------- 1 | // @author Couchbase 2 | // @copyright 2015-Present Couchbase, Inc. 3 | // 4 | // Use of this software is governed by the Business Source License included in 5 | // the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 6 | // file, in accordance with the Business Source License, use of this software 7 | // will be governed by the Apache License, Version 2.0, included in the file 8 | // licenses/APL2.txt. 9 | 10 | // +build !linux,!darwin,!freebsd,!solaris,!netbsd,!openbsd 11 | 12 | package main 13 | 14 | import ( 15 | "os/exec" 16 | ) 17 | 18 | func doSetPgid(_ *exec.Cmd) { 19 | } 20 | 21 | func doSetCgroup(_ *exec.Cmd, _ uintptr) { 22 | } 23 | 24 | func doKillPgroup(cmd *exec.Cmd) error { 25 | return cmd.Process.Kill() 26 | } 27 | -------------------------------------------------------------------------------- /deps/gocode/goport/utils_posix.go: -------------------------------------------------------------------------------- 1 | // @author Couchbase 2 | // @copyright 2015-Present Couchbase, Inc. 3 | // 4 | // Use of this software is governed by the Business Source License included in 5 | // the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 6 | // file, in accordance with the Business Source License, use of this software 7 | // will be governed by the Apache License, Version 2.0, included in the file 8 | // licenses/APL2.txt. 9 | 10 | // +build darwin freebsd solaris netbsd openbsd 11 | 12 | package main 13 | 14 | import ( 15 | "os/exec" 16 | "syscall" 17 | ) 18 | 19 | func doSetPgid(cmd *exec.Cmd) { 20 | cmd.SysProcAttr = &syscall.SysProcAttr{Setpgid: true} 21 | } 22 | 23 | func doSetCgroup(_ *exec.Cmd, _ uintptr) { 24 | } 25 | 26 | func doKillPgroup(cmd *exec.Cmd) error { 27 | return syscall.Kill(-cmd.Process.Pid, syscall.SIGKILL) 28 | } 29 | -------------------------------------------------------------------------------- /deps/gocode/gosecrets/base_stored_key.go: -------------------------------------------------------------------------------- 1 | // @author Couchbase 2 | // @copyright 2025-Present Couchbase, Inc. 3 | // 4 | // Use of this software is governed by the Business Source License included in 5 | // the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 6 | // file, in accordance with the Business Source License, use of this software 7 | // will be governed by the Apache License, Version 2.0, included in the file 8 | // licenses/APL2.txt. 9 | package main 10 | 11 | type baseStoredKey struct { 12 | Name string `json:"name"` 13 | Kind string `json:"kind"` 14 | CreationTime string `json:"creationTime"` 15 | } 16 | 17 | func (b baseStoredKey) name() string { 18 | return b.Name 19 | } 20 | 21 | func (b baseStoredKey) kind() string { 22 | return b.Kind 23 | } 24 | -------------------------------------------------------------------------------- /doc/api-changes/compact-bucket-links.txt: -------------------------------------------------------------------------------- 1 | In our tradition of advertising hyperlinks to various information & 2 | services we need to publish links to POST requests that forcefully 3 | trigger bucket compaction. 4 | 5 | It's now done as part of controllers field of bucket info. E.g.: 6 | 7 | "controllers": { 8 | "flush": "/pools/default/buckets/default/controller/doFlush", 9 | "compactAll": "/pools/default/buckets/default/controller/compactBucket", 10 | "compactDB": "/pools/default/buckets/default/controller/compactDatabases" 11 | }, 12 | -------------------------------------------------------------------------------- /doc/log-files-setup.txt: -------------------------------------------------------------------------------- 1 | 2 | Here's what log files we have with information what gets into those files: 3 | 4 | * couchdb - log message with category couchdb with severity info and above 5 | 6 | * debug - all categories except couchdb, xdcr, stats and ns_doctor 7 | with messages of severity debug and above (i.e. all messages). That's 8 | my team's main log file. 9 | 10 | * info - all categories except couchdb, xdcr, stats and ns_doctor with 11 | messages of severity info and above 12 | 13 | * error - all categories except xdcr with severity error 14 | 15 | * xdcr_error - category xdcr and severity error 16 | 17 | * xdcr - category xdcr and any severity 18 | 19 | * mapreduce_errors - category mapreduce (our views will send js errors from 20 | map/reduce functions here) 21 | 22 | * views - category views. We log ns_server's interaction with indexes 23 | here. Initially, to enable Filipe to see what we do without parsing 24 | lots of 'irrelevant' stuff in our logs. We've considered killing it, 25 | but decided to keep for now. 26 | 27 | * stats - categories stats and ns_doctor. Stats & ns_doctor states are 28 | logged here periodically. 29 | 30 | All files are set to rotate after 10M. And there's limit of 20 files 31 | per log. So in total thats 200M per log. 32 | -------------------------------------------------------------------------------- /doc/mb_master_state_diagram.md: -------------------------------------------------------------------------------- 1 | ```mermaid 2 | %%{ init: { 'flowchart': { 'curve': 'monotoneX' } } }%% 3 | flowchart LR 4 | init --> | Only node in cluster | master 5 | init --> | Other nodes in cluster | candidate 6 | candidate --> | Only node remaining | master 7 | candidate --> | Master removed from the cluster | master 8 | candidate --> | Have not heard from higher priority node for 10s | master 9 | master --> | Master removed from cluster | candidate 10 | master --> | Surrendering mastership, newer node in cluster | candidate 11 | ``` -------------------------------------------------------------------------------- /etc/default_profile: -------------------------------------------------------------------------------- 1 | {name, "default"}. 2 | {{indexer, disable_shard_affinity}, true}. 3 | {{resource_management, configurables}, 4 | ["diskUsage"]}. -------------------------------------------------------------------------------- /etc/hosts.cfg: -------------------------------------------------------------------------------- 1 | {host, {127,0,0,1}, ["cb.local"]}. 2 | {host, {0,0,0,0,0,0,0,1}, ["cb.local"]}. 3 | {lookup, [file,native]}. 4 | -------------------------------------------------------------------------------- /licenses/MIT-jose.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | Copyright (c) 2014-2019, Andrew Bennett potatosaladx@gmail.com 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy of 5 | this software and associated documentation files (the "Software"), to deal in 6 | the Software without restriction, including without limitation the rights to 7 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 8 | the Software, and to permit persons to whom the Software is furnished to do so, 9 | subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 16 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 17 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 18 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 19 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /priv/config: -------------------------------------------------------------------------------- 1 | % -*- mode: erlang -*- 2 | % 3 | % The installer might put installation-time overrides in this priv/config file. 4 | -------------------------------------------------------------------------------- /priv/public/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/couchbase/ns_server/55791dba46d71554aedc379ee8d2d394bad71972/priv/public/android-chrome-192x192.png -------------------------------------------------------------------------------- /priv/public/android-chrome-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/couchbase/ns_server/55791dba46d71554aedc379ee8d2d394bad71972/priv/public/android-chrome-512x512.png -------------------------------------------------------------------------------- /priv/public/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/couchbase/ns_server/55791dba46d71554aedc379ee8d2d394bad71972/priv/public/apple-touch-icon.png -------------------------------------------------------------------------------- /priv/public/browserconfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 12 | 13 | 14 | 15 | 16 | 17 | #da532c 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /priv/public/cb_logo_bug_white.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 8 | 13 | 14 | -------------------------------------------------------------------------------- /priv/public/cb_logo_bug_white_2.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 9 | 14 | 15 | -------------------------------------------------------------------------------- /priv/public/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/couchbase/ns_server/55791dba46d71554aedc379ee8d2d394bad71972/priv/public/favicon-16x16.png -------------------------------------------------------------------------------- /priv/public/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/couchbase/ns_server/55791dba46d71554aedc379ee8d2d394bad71972/priv/public/favicon-32x32.png -------------------------------------------------------------------------------- /priv/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/couchbase/ns_server/55791dba46d71554aedc379ee8d2d394bad71972/priv/public/favicon.ico -------------------------------------------------------------------------------- /priv/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Couchbase Server", 3 | "icons": [ 4 | { 5 | "src": "/android-chrome-192x192.png", 6 | "sizes": "192x192", 7 | "type": "image/png" 8 | }, 9 | { 10 | "src": "/android-chrome-512x512.png", 11 | "sizes": "512x512", 12 | "type": "image/png" 13 | } 14 | ], 15 | "theme_color": "#ffffff", 16 | "background_color": "#ffffff", 17 | "display": "standalone" 18 | } -------------------------------------------------------------------------------- /priv/public/mstile-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/couchbase/ns_server/55791dba46d71554aedc379ee8d2d394bad71972/priv/public/mstile-144x144.png -------------------------------------------------------------------------------- /priv/public/mstile-150x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/couchbase/ns_server/55791dba46d71554aedc379ee8d2d394bad71972/priv/public/mstile-150x150.png -------------------------------------------------------------------------------- /priv/public/mstile-310x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/couchbase/ns_server/55791dba46d71554aedc379ee8d2d394bad71972/priv/public/mstile-310x150.png -------------------------------------------------------------------------------- /priv/public/mstile-310x310.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/couchbase/ns_server/55791dba46d71554aedc379ee8d2d394bad71972/priv/public/mstile-310x310.png -------------------------------------------------------------------------------- /priv/public/mstile-70x70.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/couchbase/ns_server/55791dba46d71554aedc379ee8d2d394bad71972/priv/public/mstile-70x70.png -------------------------------------------------------------------------------- /priv/public/spinner_3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/couchbase/ns_server/55791dba46d71554aedc379ee8d2d394bad71972/priv/public/spinner_3.gif -------------------------------------------------------------------------------- /priv/public/ui/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | dist/ -------------------------------------------------------------------------------- /priv/public/ui/CE_license_agreement.txt: -------------------------------------------------------------------------------- 1 | cluster_run (Community Edition) 2 | 3 | IMPORTANT-READ CAREFULLY: THIS IS NOT THE REAL LICENSE FILE 4 | 5 | This file is only displayed when using "cluster_run". The canonical license text is located at git://github.com/couchbase/product-texts, and is embedded into the Couchbase Server product during the build process. 6 | 7 | "cluster_run" consumes UI elements including this license file from the ns_server source directory, so we leave this stub file in place to ensure people don't believe it is the canonical license file. -------------------------------------------------------------------------------- /priv/public/ui/EE_subscription_license_agreement.txt: -------------------------------------------------------------------------------- 1 | cluster_run (Enterprise Edition) 2 | 3 | IMPORTANT-READ CAREFULLY: THIS IS NOT THE REAL LICENSE FILE 4 | 5 | This file is only displayed when using "cluster_run". The canonical license text is located at git://github.com/couchbase/product-texts, and is embedded into the Couchbase Server product during the build process. 6 | 7 | "cluster_run" consumes UI elements including this license file from the ns_server source directory, so we leave this stub file in place to ensure people don't believe it is the canonical license file. -------------------------------------------------------------------------------- /priv/public/ui/README.md: -------------------------------------------------------------------------------- 1 | In order to rebuild web_modules run: 2 | 3 | npm run rebuild 4 | 5 | Also, make sure that you have Node.js >= 13.5 6 | -------------------------------------------------------------------------------- /priv/public/ui/app-old/mn-bar-usage-component.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018-Present Couchbase, Inc. 3 | 4 | Use of this software is governed by the Business Source License included in 5 | the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 6 | file, in accordance with the Business Source License, use of this software will 7 | be governed by the Apache License, Version 2.0, included in the file 8 | licenses/APL2.txt. 9 | */ 10 | 11 | var mn = mn || {}; 12 | mn.components = mn.components || {}; 13 | mn.components.MnBarUsage = 14 | (function () { 15 | "use strict"; 16 | 17 | MnBarUsageComponent.annotations = [ 18 | new ng.core.Component({ 19 | selector: "mn-bar-usage", 20 | templateUrl: "app-new/mn-bar-usage.html", 21 | inputs: [ 22 | "baseInfo", 23 | "total" 24 | ], 25 | changeDetection: ng.core.ChangeDetectionStrategy.OnPush 26 | }) 27 | ]; 28 | 29 | return MnBarUsageComponent; 30 | 31 | function MnBarUsageComponent() {} 32 | })(); 33 | -------------------------------------------------------------------------------- /priv/public/ui/app-old/mn-gsi-service.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018-Present Couchbase, Inc. 3 | 4 | Use of this software is governed by the Business Source License included in 5 | the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 6 | file, in accordance with the Business Source License, use of this software will 7 | be governed by the Apache License, Version 2.0, included in the file 8 | licenses/APL2.txt. 9 | */ 10 | 11 | var mn = mn || {}; 12 | mn.services = mn.services || {}; 13 | mn.services.MnGSI = (function (Rx) { 14 | "use strict"; 15 | 16 | MnGSI.annotations = [ 17 | new ng.core.Injectable() 18 | ]; 19 | 20 | MnGSI.parameters = [ 21 | ng.common.http.HttpClient 22 | ]; 23 | 24 | MnGSI.prototype.getIndexStatus = getIndexStatus; 25 | 26 | return MnGSI; 27 | 28 | function MnGSI(http) { 29 | this.http = http; 30 | this.stream = {}; 31 | 32 | this.stream.getIndexStatus = 33 | (new Rx.BehaviorSubject()).pipe( 34 | Rx.operators.switchMap(this.getIndexStatus.bind(this)), 35 | mn.core.rxOperatorsShareReplay(1)); 36 | } 37 | 38 | function getIndexStatus() { 39 | return this.http.get("/indexStatus"); 40 | } 41 | 42 | })(window.rxjs); 43 | -------------------------------------------------------------------------------- /priv/public/ui/app-old/mn-period-component.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018-Present Couchbase, Inc. 3 | 4 | Use of this software is governed by the Business Source License included in 5 | the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 6 | file, in accordance with the Business Source License, use of this software will 7 | be governed by the Apache License, Version 2.0, included in the file 8 | licenses/APL2.txt. 9 | */ 10 | 11 | var mn = mn || {}; 12 | mn.components = mn.components || {}; 13 | mn.components.MnPeriod = 14 | (function (Rx) { 15 | "use strict"; 16 | 17 | mn.core.extend(MnPeriod, mn.core.MnEventableComponent); 18 | 19 | MnPeriod.annotations = [ 20 | new ng.core.Component({ 21 | templateUrl: "app-new/mn-period.html", 22 | selector: "mn-period", 23 | inputs: [ 24 | "group", 25 | "error", 26 | "errorGroup" 27 | ], 28 | changeDetection: ng.core.ChangeDetectionStrategy.OnPush 29 | }) 30 | ]; 31 | 32 | MnPeriod.parameters = []; 33 | 34 | return MnPeriod; 35 | 36 | function MnPeriod() { 37 | mn.core.MnEventableComponent.call(this); 38 | this.componentID = Math.random(); 39 | } 40 | })(window.rxjs); 41 | -------------------------------------------------------------------------------- /priv/public/ui/app-old/mn-query-settings-config-component.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018-Present Couchbase, Inc. 3 | 4 | Use of this software is governed by the Business Source License included in 5 | the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 6 | file, in accordance with the Business Source License, use of this software will 7 | be governed by the Apache License, Version 2.0, included in the file 8 | licenses/APL2.txt. 9 | */ 10 | 11 | var mn = mn || {}; 12 | mn.components = mn.components || {}; 13 | mn.components.MnQuerySettingsConfig = 14 | (function () { 15 | "use strict"; 16 | 17 | MnQuerySettingsConfig.annotations = [ 18 | new ng.core.Component({ 19 | selector: "mn-query-settings-config", 20 | templateUrl: "app-new/mn-query-settings-config.html", 21 | inputs: [ 22 | "group" 23 | ], 24 | changeDetection: ng.core.ChangeDetectionStrategy.OnPush 25 | }) 26 | ]; 27 | 28 | MnQuerySettingsConfig.parameters = [ 29 | mn.services.MnWizard 30 | ]; 31 | 32 | return MnQuerySettingsConfig; 33 | 34 | function MnQuerySettingsConfig(mnWizardService) { 35 | this.querySettingsHttp = mnWizardService.stream.querySettingsHttp; 36 | } 37 | })(); 38 | -------------------------------------------------------------------------------- /priv/public/ui/app-old/mn-search.html: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 18 | 19 | filter 23 | 24 | done 28 | 29 | -------------------------------------------------------------------------------- /priv/public/ui/app-old/mn-servers-failover-conf.html: -------------------------------------------------------------------------------- 1 | 10 | 11 |
12 |
13 |

Confirm Failover

14 | X 15 |
16 |
17 |
18 | 19 |

20 | Some servers cannot be contacted. Failover coordination throughout the 21 | cluster could be compromised. Do you wish to proceed with the failover 22 | anyway? 23 |

24 |
25 |
26 | 32 |
33 | -------------------------------------------------------------------------------- /priv/public/ui/app-old/mn-servers-stop-reb-conf.html: -------------------------------------------------------------------------------- 1 | 10 | 11 |
12 |
13 |

Confirm Rebalance Stop

14 | X 15 |
16 |
17 |

18 | Warning: Stopping rebalance is unsafe at this 19 | moment since cluster may be in a partitioned state. Continue only if 20 | you're perfectly sure that this is not the case. 21 |

22 |
23 | 29 |
30 | -------------------------------------------------------------------------------- /priv/public/ui/app-old/mn-warmup-progress.html: -------------------------------------------------------------------------------- 1 | 10 | 11 |
12 |
Warmup Progress
13 |
14 |
15 |
16 | 19 | {{task[mnSortBy]}} 20 | 21 | {{task | mnFormatWarmupMessage}} 22 |
23 | 26 | {{toggleText | async}} 27 | 28 |
29 |
30 | -------------------------------------------------------------------------------- /priv/public/ui/app/components/directives/mn_dropdown.html: -------------------------------------------------------------------------------- 1 | 10 | 11 |
12 |
17 | 22 |
23 | -------------------------------------------------------------------------------- /priv/public/ui/app/components/directives/mn_element_crane/mn_element_crane.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-Present Couchbase, Inc. 3 | 4 | Use of this software is governed by the Business Source License included in 5 | the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 6 | file, in accordance with the Business Source License, use of this software will 7 | be governed by the Apache License, Version 2.0, included in the file 8 | licenses/APL2.txt. 9 | */ 10 | 11 | import angular from 'angular'; 12 | 13 | import {MnElementCargoComponent, 14 | MnElementDepotComponent} from '../../../mn.element.crane.js'; 15 | 16 | import {downgradeComponent, setAngularJSGlobal} from '@angular/upgrade/static'; 17 | setAngularJSGlobal(angular); 18 | 19 | export default 'mnElementCrane'; 20 | 21 | angular 22 | .module('mnElementCrane', []) 23 | .directive('mnElementDepot', downgradeComponent({component: MnElementDepotComponent})) 24 | .directive('mnElementCargo', downgradeComponent({component: MnElementCargoComponent})); 25 | -------------------------------------------------------------------------------- /priv/public/ui/app/components/directives/mn_field_directive.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2019-Present Couchbase, Inc. 3 | 4 | Use of this software is governed by the Business Source License included in 5 | the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 6 | file, in accordance with the Business Source License, use of this software will 7 | be governed by the Apache License, Version 2.0, included in the file 8 | licenses/APL2.txt. 9 | */ 10 | 11 | import angular from 'angular'; 12 | import template from "./mn_field.html"; 13 | 14 | export default 'mnField'; 15 | 16 | angular 17 | .module('mnField', []) 18 | .directive('mnField', mnFieldDirective); 19 | 20 | function mnFieldDirective() { 21 | var mnFieldDirective = { 22 | restrict: "AE", 23 | scope: { 24 | mnName: "@", 25 | mnType: "@", 26 | mnId: "@", 27 | mnDisabled: "=", 28 | mnLabel: "@", 29 | mnErrors: "=?", 30 | mnModel: "=", 31 | mnItems: "=" 32 | }, 33 | template, 34 | controller: controller, 35 | controllerAs: "thisCtl" 36 | }; 37 | 38 | return mnFieldDirective; 39 | 40 | function controller() { 41 | 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /priv/public/ui/app/components/directives/mn_period/mn_period.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-Present Couchbase, Inc. 3 | 4 | Use of this software is governed by the Business Source License included in 5 | the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 6 | file, in accordance with the Business Source License, use of this software will 7 | be governed by the Apache License, Version 2.0, included in the file 8 | licenses/APL2.txt. 9 | */ 10 | 11 | import angular from 'angular'; 12 | import template from "./mn_period.html"; 13 | 14 | export default 'mnPeriod'; 15 | 16 | angular 17 | .module('mnPeriod', []) 18 | .directive('mnPeriod', mnPeriodDirective); 19 | 20 | function mnPeriodDirective() { 21 | var mnPeriod = { 22 | restrict: 'A', 23 | scope: { 24 | mnPeriod: "@", 25 | autoCompactionSettings: '=', 26 | errors: "=", 27 | rbac: "=" 28 | }, 29 | template 30 | }; 31 | 32 | return mnPeriod; 33 | } 34 | -------------------------------------------------------------------------------- /priv/public/ui/app/components/directives/mn_validation/mn_equal.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-Present Couchbase, Inc. 3 | 4 | Use of this software is governed by the Business Source License included in 5 | the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 6 | file, in accordance with the Business Source License, use of this software will 7 | be governed by the Apache License, Version 2.0, included in the file 8 | licenses/APL2.txt. 9 | */ 10 | 11 | import angular from 'angular'; 12 | 13 | export default 'mnEqual'; 14 | 15 | angular 16 | .module('mnEqual', []) 17 | .directive('mnEqual', mnEqualDirective); 18 | 19 | function mnEqualDirective() { 20 | var mnEqual = { 21 | restrict: 'A', 22 | require: 'ngModel', 23 | link: link 24 | }; 25 | return mnEqual; 26 | 27 | function link(scope, element, attrs, ctrl) { 28 | function validate(value) { 29 | ctrl.$setValidity('mnEqual', (value === undefined ? "" : value) === attrs.mnEqual); 30 | return value; 31 | } 32 | 33 | ctrl.$parsers.unshift(validate); 34 | ctrl.$formatters.push(validate); 35 | 36 | attrs.$observe('mnEqual', function () { 37 | return validate(ctrl.$viewValue); 38 | }); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /priv/public/ui/app/components/directives/mn_validation/mn_maxlength.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-Present Couchbase, Inc. 3 | 4 | Use of this software is governed by the Business Source License included in 5 | the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 6 | file, in accordance with the Business Source License, use of this software will 7 | be governed by the Apache License, Version 2.0, included in the file 8 | licenses/APL2.txt. 9 | */ 10 | 11 | import angular from 'angular'; 12 | 13 | export default 'mnMaxlength'; 14 | 15 | angular 16 | .module('mnMaxlength', []) 17 | .directive('mnMaxlength', mnMaxlengthDirective); 18 | 19 | function mnMaxlengthDirective() { 20 | var mnMaxlength = { 21 | restrict: 'A', 22 | require: 'ngModel', 23 | link: link 24 | }; 25 | return mnMaxlength; 26 | 27 | function link(scope, element, attrs, ctrl) { 28 | 29 | ctrl.$parsers.unshift(function (value) { 30 | var max = attrs.mnMaxlength; 31 | ctrl.$setValidity('mnMaxlength', max && value && value.length <= parseInt(max)); 32 | return value; 33 | }); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /priv/public/ui/app/components/directives/mn_validation/mn_minlength.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016-Present Couchbase, Inc. 3 | 4 | Use of this software is governed by the Business Source License included in 5 | the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 6 | file, in accordance with the Business Source License, use of this software will 7 | be governed by the Apache License, Version 2.0, included in the file 8 | licenses/APL2.txt. 9 | */ 10 | 11 | import angular from 'angular'; 12 | 13 | export default 'mnMinlength'; 14 | 15 | angular 16 | .module('mnMinlength', []) 17 | .directive('mnMinlength', mnMinlengthDirective); 18 | 19 | function mnMinlengthDirective() { 20 | var mnMinlength = { 21 | restrict: 'A', 22 | require: 'ngModel', 23 | link: link 24 | }; 25 | return mnMinlength; 26 | 27 | function link(scope, element, attrs, ctrl) { 28 | 29 | ctrl.$parsers.unshift(function (value) { 30 | var min = attrs.mnMinlength; 31 | ctrl.$setValidity('mnMinlength', min && value && value.length >= parseInt(min)); 32 | return value; 33 | }); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /priv/public/ui/app/components/directives/mn_warmup_progress/mn_warmup_progress.html: -------------------------------------------------------------------------------- 1 | 10 | 11 |
12 |
Warmup Progress
13 |
14 |
15 |
16 | {{task[$parent.sortBy]}} 17 | {{task | formatWarmupMessage}} 18 |
19 | ... more 22 | less 25 |
26 |
27 | -------------------------------------------------------------------------------- /priv/public/ui/app/components/mn_alerts_popup_message.html: -------------------------------------------------------------------------------- 1 | 10 | 11 |
12 |

13 | {{title}} 14 |

15 |
16 |
19 |
20 | {{text}} 21 |
22 |
23 |
26 | {{alertsCtl.message}} 27 |
28 |
29 | 32 |
33 | -------------------------------------------------------------------------------- /priv/public/ui/app/components/mn_buckets_stats.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2015-Present Couchbase, Inc. 3 | 4 | Use of this software is governed by the Business Source License included in 5 | the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 6 | file, in accordance with the Business Source License, use of this software will 7 | be governed by the Apache License, Version 2.0, included in the file 8 | licenses/APL2.txt. 9 | */ 10 | 11 | import angular from 'angular'; 12 | 13 | export default 'mnBucketsStats'; 14 | 15 | angular 16 | .module("mnBucketsStats", []) 17 | .factory("mnBucketsStats", ["$http", "$cacheFactory", mnBucketsFactory]); 18 | 19 | function mnBucketsFactory($http, $cacheFactory) { 20 | var mnBucketsStats = { 21 | get: get, 22 | clearCache: clearCache, 23 | }; 24 | 25 | return mnBucketsStats; 26 | 27 | function get(mnHttpParams) { 28 | return $http({ 29 | method: "GET", 30 | cache: true, 31 | url: '/pools/default/buckets?basic_stats=true&skipMap=true', 32 | mnHttp: mnHttpParams 33 | }); 34 | } 35 | 36 | function clearCache() { 37 | $cacheFactory.get('$http').remove('/pools/default/buckets?basic_stats=true&skipMap=true'); 38 | return this; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /priv/public/ui/app/css/cbui-hybrid.css: -------------------------------------------------------------------------------- 1 | ng-component, ui-view {display: block;} 2 | .items-center {justify-content: center! important;} 3 | 4 | .modal { 5 | position: fixed; 6 | overflow: auto; 7 | height: 100%; 8 | top: 0; 9 | width: 100%; 10 | z-index: 1050; 11 | justify-content: center; 12 | align-items: flex-start; 13 | display: flex!important; 14 | min-height: 1rem; 15 | opacity: 1; 16 | } 17 | 18 | .modal-dialog { 19 | position: relative; 20 | z-index: 101; 21 | top: 2.5rem; 22 | background-color: #fff; 23 | border: none; 24 | border-radius: 3px 3px 2px 2px; 25 | box-shadow: 0px 1px 1px 1px rgba(0,0,0,0.25); 26 | } 27 | 28 | input[type="checkbox"][disabled] + label:before, 29 | input[type="radio"][disabled] + label:before { 30 | opacity: .5; 31 | } 32 | input[type="checkbox"][disabled] + label { 33 | cursor: default !important; 34 | } 35 | -------------------------------------------------------------------------------- /priv/public/ui/app/css/fonts/OpenSans-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/couchbase/ns_server/55791dba46d71554aedc379ee8d2d394bad71972/priv/public/ui/app/css/fonts/OpenSans-Bold.woff -------------------------------------------------------------------------------- /priv/public/ui/app/css/fonts/OpenSans-Italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/couchbase/ns_server/55791dba46d71554aedc379ee8d2d394bad71972/priv/public/ui/app/css/fonts/OpenSans-Italic.woff -------------------------------------------------------------------------------- /priv/public/ui/app/css/fonts/OpenSans-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/couchbase/ns_server/55791dba46d71554aedc379ee8d2d394bad71972/priv/public/ui/app/css/fonts/OpenSans-Regular.woff -------------------------------------------------------------------------------- /priv/public/ui/app/css/fonts/OpenSans-Semibold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/couchbase/ns_server/55791dba46d71554aedc379ee8d2d394bad71972/priv/public/ui/app/css/fonts/OpenSans-Semibold.woff -------------------------------------------------------------------------------- /priv/public/ui/app/css/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/couchbase/ns_server/55791dba46d71554aedc379ee8d2d394bad71972/priv/public/ui/app/css/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /priv/public/ui/app/css/main.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/couchbase/ns_server/55791dba46d71554aedc379ee8d2d394bad71972/priv/public/ui/app/css/main.css -------------------------------------------------------------------------------- /priv/public/ui/app/main.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2019-Present Couchbase, Inc. 3 | 4 | Use of this software is governed by the Business Source License included in 5 | the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 6 | file, in accordance with the Business Source License, use of this software will 7 | be governed by the Apache License, Version 2.0, included in the file 8 | licenses/APL2.txt. 9 | */ 10 | import angular from 'angular'; 11 | 12 | import {NgZone} from '@angular/core'; 13 | import {platformBrowserDynamic} from '@angular/platform-browser-dynamic'; 14 | import {UIRouter} from '@uirouter/core'; 15 | 16 | import {MnAppModule} from './mn.app.module.js'; 17 | 18 | platformBrowserDynamic().bootstrapModule(MnAppModule, {preserveWhitespaces: true}).then(platformRef => { 19 | const urlService = platformRef.injector.get(UIRouter).urlService; 20 | // Instruct UIRouter to listen to URL changes 21 | function startUIRouter() { 22 | urlService.listen(); 23 | urlService.sync(); 24 | } 25 | platformRef.injector.get(NgZone).run(startUIRouter); 26 | }); 27 | -------------------------------------------------------------------------------- /priv/public/ui/app/mn.app.component.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2020-Present Couchbase, Inc. 3 | 4 | Use of this software is governed by the Business Source License included in 5 | the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 6 | file, in accordance with the Business Source License, use of this software will 7 | be governed by the Apache License, Version 2.0, included in the file 8 | licenses/APL2.txt. 9 | */ 10 | 11 | import { Component } from '@angular/core'; 12 | 13 | export { MnAppComponent }; 14 | 15 | class MnAppComponent { 16 | static get annotations() { return [ 17 | new Component({ 18 | selector: "mn-app", 19 | template: '' 20 | }) 21 | ]} 22 | 23 | constructor() { 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /priv/public/ui/app/mn.bar.usage.component.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2021-Present Couchbase, Inc. 3 | 4 | Use of this software is governed by the Business Source License included in 5 | the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 6 | file, in accordance with the Business Source License, use of this software will 7 | be governed by the Apache License, Version 2.0, included in the file 8 | licenses/APL2.txt. 9 | */ 10 | 11 | import {ChangeDetectionStrategy, Component} from '@angular/core'; 12 | 13 | import {MnLifeCycleHooksToStream} from "./mn.core.js"; 14 | import template from "./mn.bar.usage.html"; 15 | 16 | export {MnBarUsageComponent}; 17 | 18 | class MnBarUsageComponent extends MnLifeCycleHooksToStream { 19 | static get annotations() { return [ 20 | new Component({ 21 | selector: "mn-bar-usage", 22 | template, 23 | inputs: [ 24 | "baseInfo", 25 | "total" 26 | ], 27 | changeDetection: ChangeDetectionStrategy.OnPush 28 | }) 29 | ]} 30 | 31 | static get parameters() { 32 | return []; 33 | } 34 | 35 | constructor() { 36 | super(); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /priv/public/ui/app/mn.bar.usage.module.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2021-Present Couchbase, Inc. 3 | 4 | Use of this software is governed by the Business Source License included in 5 | the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 6 | file, in accordance with the Business Source License, use of this software will 7 | be governed by the Apache License, Version 2.0, included in the file 8 | licenses/APL2.txt. 9 | */ 10 | 11 | import {NgModule} from '@angular/core'; 12 | 13 | import {MnSharedModule} from './mn.shared.module.js'; 14 | import {MnPipesModule} from './mn.pipes.module.js'; 15 | import {MnBarUsageComponent} from './mn.bar.usage.component.js'; 16 | 17 | export {MnBarUsageModule} 18 | 19 | class MnBarUsageModule { 20 | static get annotations() { return [ 21 | new NgModule({ 22 | imports: [ 23 | MnSharedModule, 24 | MnPipesModule 25 | ], 26 | declarations: [ 27 | MnBarUsageComponent 28 | ], 29 | exports: [ 30 | MnBarUsageComponent 31 | ] 32 | }) 33 | ]} 34 | } 35 | -------------------------------------------------------------------------------- /priv/public/ui/app/mn.bucket.delete.dialog.html: -------------------------------------------------------------------------------- 1 | 10 | 11 |
12 |
13 |

Confirm Drop Bucket

14 | X 15 |
16 |
19 |
20 |
21 | 22 |

23 | Warning: Bucket data will be lost. 24 |
Drop {{bucket.name}}? 25 |

26 |
27 |
28 | 32 |
33 |
34 | -------------------------------------------------------------------------------- /priv/public/ui/app/mn.bucket.full.dialog.component.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2021-Present Couchbase, Inc. 3 | 4 | Use of this software is governed by the Business Source License included in 5 | the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 6 | file, in accordance with the Business Source License, use of this software will 7 | be governed by the Apache License, Version 2.0, included in the file 8 | licenses/APL2.txt. 9 | */ 10 | 11 | import {ChangeDetectionStrategy, Component} from '@angular/core'; 12 | import {NgbActiveModal} from '@ng-bootstrap/ng-bootstrap'; 13 | 14 | import {MnLifeCycleHooksToStream} from './mn.core.js'; 15 | import template from "./mn.bucket.full.dialog.html"; 16 | 17 | export {MnBucketFullDialogComponent}; 18 | 19 | class MnBucketFullDialogComponent extends MnLifeCycleHooksToStream { 20 | 21 | static get annotations() { return [ 22 | new Component({ 23 | template, 24 | changeDetection: ChangeDetectionStrategy.OnPush 25 | }) 26 | ]} 27 | 28 | static get parameters() { return [ 29 | NgbActiveModal 30 | ]} 31 | 32 | constructor(activeModal) { 33 | super(); 34 | 35 | this.activeModal = activeModal; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /priv/public/ui/app/mn.bucket.full.dialog.html: -------------------------------------------------------------------------------- 1 | 10 | 11 |
12 |
13 |

Cluster Memory Fully Allocated

14 | X 15 |
16 |
17 |

All the RAM in the cluster is already allocated to existing buckets.

18 |

Delete some buckets or change bucket sizes to make RAM available for additional buckets.

19 |
20 | 25 |
26 | -------------------------------------------------------------------------------- /priv/public/ui/app/mn.codemirror.editor.html: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /priv/public/ui/app/mn.codemirror.editor.module.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2021-Present Couchbase, Inc. 3 | 4 | Use of this software is governed by the Business Source License included in 5 | the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 6 | file, in accordance with the Business Source License, use of this software will 7 | be governed by the Apache License, Version 2.0, included in the file 8 | licenses/APL2.txt. 9 | */ 10 | 11 | import { NgModule } from '@angular/core'; 12 | import { MnCodeMirrorEditorComponent } from './mn.codemirror.editor.component.js'; 13 | 14 | export { MnCodeMirrorEditorModule }; 15 | 16 | class MnCodeMirrorEditorModule { 17 | static get annotations() { return [ 18 | new NgModule({ 19 | declarations: [ 20 | MnCodeMirrorEditorComponent, 21 | ], 22 | exports: [ 23 | MnCodeMirrorEditorComponent 24 | ] 25 | }) 26 | ]} 27 | } 28 | -------------------------------------------------------------------------------- /priv/public/ui/app/mn.collections.delete.item.html: -------------------------------------------------------------------------------- 1 | 10 | 11 |
12 |
13 |

Confirm Drop Collection

14 | X 15 |
16 |
17 |
18 |
19 | 20 |

21 | Warning: Collection data will be lost. 22 |
Drop {{collectionName}}? 23 |

24 |
25 |
26 | 30 |
31 |
32 | -------------------------------------------------------------------------------- /priv/public/ui/app/mn.collections.delete.scope.html: -------------------------------------------------------------------------------- 1 | 10 | 11 |
12 |
13 |

Confirm Drop Scope

14 | X 15 |
16 |
17 |
18 |
19 | 20 |

21 | Warning: Data & collections will be lost. 22 |
Drop {{scopeName}}? 23 |

24 |
25 |
26 | 30 |
31 |
32 | -------------------------------------------------------------------------------- /priv/public/ui/app/mn.encryption.force.confirmation.html: -------------------------------------------------------------------------------- 1 | 10 | 11 |
12 |
13 |

Confirm Force Encryption

14 | X 19 |
20 |
21 |
22 | 23 |

24 | Are you sure you want to fully {{isEncryptionEnabled ? 'encrypt' : 'decrypt'}} the {{itemType}} {{bucketName ? bucketName : ''}}? 25 |

26 |
27 |
28 | 32 |
33 | -------------------------------------------------------------------------------- /priv/public/ui/app/mn.input.filter.module.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2020-Present Couchbase, Inc. 3 | 4 | Use of this software is governed by the Business Source License included in 5 | the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 6 | file, in accordance with the Business Source License, use of this software will 7 | be governed by the Apache License, Version 2.0, included in the file 8 | licenses/APL2.txt. 9 | */ 10 | 11 | import {NgModule} from '@angular/core'; 12 | import {CommonModule} from '@angular/common'; 13 | import {ReactiveFormsModule} from '@angular/forms'; 14 | 15 | import {MnInputFilterComponent} from './mn.input.filter.component.js'; 16 | import {MnSharedModule} from './mn.shared.module.js'; 17 | 18 | export {MnInputFilterModule} 19 | 20 | class MnInputFilterModule { 21 | static get annotations() { return [ 22 | new NgModule({ 23 | imports: [ 24 | ReactiveFormsModule, 25 | CommonModule, 26 | MnSharedModule 27 | ], 28 | declarations: [ 29 | MnInputFilterComponent 30 | ], 31 | exports: [ 32 | MnInputFilterComponent 33 | ] 34 | }) 35 | ]} 36 | } 37 | -------------------------------------------------------------------------------- /priv/public/ui/app/mn.keyspace.selector.downgrade.module.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2021-Present Couchbase, Inc. 3 | 4 | Use of this software is governed by the Business Source License included in 5 | the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 6 | file, in accordance with the Business Source License, use of this software will 7 | be governed by the Apache License, Version 2.0, included in the file 8 | licenses/APL2.txt. 9 | */ 10 | 11 | import angular from 'angular'; 12 | import {downgradeComponent, 13 | downgradeInjectable, 14 | setAngularJSGlobal} from '@angular/upgrade/static'; 15 | setAngularJSGlobal(angular); 16 | 17 | import {MnKeyspaceSelectorComponent} from "./mn.keyspace.selector.component.js"; 18 | import {MnKeyspaceSelectorService} from './mn.keyspace.selector.service.js'; 19 | 20 | export default "mnKeyspaceSelectorDowngradeModule"; 21 | 22 | angular 23 | .module('mnKeyspaceSelectorDowngradeModule', []) 24 | .factory('mnKeyspaceSelectorServiceDowngrade', downgradeInjectable(MnKeyspaceSelectorService)) 25 | .directive('mnKeyspaceSelectorDowngrade', downgradeComponent({ 26 | component: MnKeyspaceSelectorComponent 27 | })); 28 | -------------------------------------------------------------------------------- /priv/public/ui/app/mn.logs.collectInfo.component.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2021-Present Couchbase, Inc. 3 | 4 | Use of this software is governed by the Business Source License included in 5 | the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 6 | file, in accordance with the Business Source License, use of this software will 7 | be governed by the Apache License, Version 2.0, included in the file 8 | licenses/APL2.txt. 9 | */ 10 | 11 | import {ChangeDetectionStrategy, Component} from '@angular/core'; 12 | import {MnLifeCycleHooksToStream} from './mn.core.js'; 13 | 14 | export { MnLogsCollectInfoComponent }; 15 | 16 | class MnLogsCollectInfoComponent extends MnLifeCycleHooksToStream { 17 | static get annotations() { return [ 18 | new Component({ 19 | selector: "mn-logs-collect-info", 20 | template: "
", 21 | changeDetection: ChangeDetectionStrategy.OnPush 22 | }) 23 | ]} 24 | 25 | static get parameters() { return [ 26 | 27 | ]} 28 | 29 | constructor() { 30 | super(); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /priv/public/ui/app/mn.logs.collectInfo.stop.collection.html: -------------------------------------------------------------------------------- 1 | 10 | 11 |
12 |
13 |

Confirm Log Collection Stop

14 |
15 |
18 |
19 |

Are you sure you want to stop log collection?

20 |
21 | 25 |
26 |
-------------------------------------------------------------------------------- /priv/public/ui/app/mn.logs.component.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2021-Present Couchbase, Inc. 3 | 4 | Use of this software is governed by the Business Source License included in 5 | the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 6 | file, in accordance with the Business Source License, use of this software 7 | will be governed by the Apache License, Version 2.0, included in the file 8 | licenses/APL2.txt. 9 | */ 10 | import {Component, ChangeDetectionStrategy} from '@angular/core'; 11 | 12 | import {MnLifeCycleHooksToStream} from './mn.core.js'; 13 | import {MnPermissions} from './ajs.upgraded.providers.js'; 14 | import template from "./mn.logs.html"; 15 | 16 | export {MnLogsComponent}; 17 | 18 | class MnLogsComponent extends MnLifeCycleHooksToStream { 19 | 20 | static get annotations() { 21 | return [ 22 | new Component({ 23 | template, 24 | changeDetection: ChangeDetectionStrategy.OnPush 25 | }) 26 | ]} 27 | 28 | static get parameters() { return [ 29 | MnPermissions 30 | ]} 31 | 32 | constructor(mnPermissions) { 33 | super(); 34 | 35 | this.permissions = mnPermissions.stream; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /priv/public/ui/app/mn.logs.html: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 26 | 27 | 28 |
29 | -------------------------------------------------------------------------------- /priv/public/ui/app/mn.path.field.html: -------------------------------------------------------------------------------- 1 | 10 | 11 | 19 |

20 | Free: {{lookUpPath | async}} 21 |

22 | -------------------------------------------------------------------------------- /priv/public/ui/app/mn.security.secrets.delete.key.dialog.html: -------------------------------------------------------------------------------- 1 | 10 | 11 |
12 |
13 |

Confirm Delete

14 |
15 |
16 |
20 | {{(deleteKey.error | async)?.error?.errors?._}} 21 |
22 |
23 | 24 |

25 | Warning: This action is not reversible. 26 |
Delete key? 27 |

28 |
29 |
30 | 34 |
35 | -------------------------------------------------------------------------------- /priv/public/ui/app/mn.selectable.node.item.component.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2021-Present Couchbase, Inc. 3 | 4 | Use of this software is governed by the Business Source License included in 5 | the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 6 | file, in accordance with the Business Source License, use of this software will 7 | be governed by the Apache License, Version 2.0, included in the file 8 | licenses/APL2.txt. 9 | */ 10 | 11 | import {Component, ChangeDetectionStrategy} from '@angular/core'; 12 | import {MnLifeCycleHooksToStream} from './mn.core.js'; 13 | import template from "./mn.selectable.node.item.html"; 14 | 15 | export {MnSelectableNodeItemComponent}; 16 | 17 | class MnSelectableNodeItemComponent extends MnLifeCycleHooksToStream { 18 | static get annotations() { return [ 19 | new Component({ 20 | selector: "mn-selectable-node-item", 21 | template, 22 | inputs: [ 23 | "mnSelectableNode", 24 | "mnGroup" 25 | ], 26 | changeDetection: ChangeDetectionStrategy.OnPush 27 | }) 28 | ]} 29 | 30 | static get parameters() { return [ 31 | ]} 32 | 33 | constructor() { 34 | super(); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /priv/public/ui/app/mn.session.timeout.dialog.html: -------------------------------------------------------------------------------- 1 | 10 | 11 |
12 |
13 |

Session Ending

14 | X 15 |
16 |
17 |
18 |

You will be automatically logged out in {{time | async}} sec

19 |
20 | 23 |
24 |
25 | -------------------------------------------------------------------------------- /priv/public/ui/app/mn.settings.auto.compaction.time.period.component.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2021-Present Couchbase, Inc. 3 | 4 | Use of this software is governed by the Business Source License included in 5 | the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 6 | file, in accordance with the Business Source License, use of this software will 7 | be governed by the Apache License, Version 2.0, included in the file 8 | licenses/APL2.txt. 9 | */ 10 | 11 | import {Component, ChangeDetectionStrategy} from '@angular/core'; 12 | import template from "./mn.settings.auto.compaction.time.period.html"; 13 | 14 | export {MnSettingsAutoCompactionTimePeriodComponent}; 15 | 16 | class MnSettingsAutoCompactionTimePeriodComponent { 17 | static get annotations() { return [ 18 | new Component({ 19 | selector: "mn-time-period", 20 | template, 21 | changeDetection: ChangeDetectionStrategy.OnPush, 22 | inputs: [ 23 | 'mnGroup', 24 | 'mnErrors', 25 | 'mnKey' 26 | ] 27 | }) 28 | ]} 29 | 30 | static get parameters() { return []} 31 | 32 | constructor() {} 33 | } 34 | -------------------------------------------------------------------------------- /priv/public/ui/app/mn.stats.service.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2021-Present Couchbase, Inc. 3 | 4 | Use of this software is governed by the Business Source License included in 5 | the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 6 | file, in accordance with the Business Source License, use of this software will 7 | be governed by the Apache License, Version 2.0, included in the file 8 | licenses/APL2.txt. 9 | */ 10 | 11 | import {Injectable} from '@angular/core'; 12 | import {HttpClient} from '@angular/common/http'; 13 | import {map} from 'rxjs/operators'; 14 | 15 | import {singletonGuard} from './mn.core.js'; 16 | 17 | export {MnStatsService}; 18 | 19 | class MnStatsService { 20 | static get annotations() { return [ 21 | new Injectable() 22 | ]} 23 | 24 | static get parameters() { return [ 25 | HttpClient 26 | ]} 27 | 28 | constructor(http) { 29 | singletonGuard(MnStatsService); 30 | this.http = http; 31 | 32 | this.stream = {}; 33 | } 34 | 35 | postStatsRange(configs) { 36 | return this.http.post("/pools/default/stats/range/", configs) 37 | .pipe(map(resp => JSON.parse(resp))); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /priv/public/ui/app/mn.text.expander.html: -------------------------------------------------------------------------------- 1 | 10 | {{text|mnTruncate:((toggler.state | async) ? Infinity : limit):''}} 11 | {{(toggler.state | async) ? 'hide' : 'show...'}} 14 | 15 | -------------------------------------------------------------------------------- /priv/public/ui/app/mn.text.expander.module.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2021-Present Couchbase, Inc. 3 | 4 | Use of this software is governed by the Business Source License included in 5 | the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 6 | file, in accordance with the Business Source License, use of this software will 7 | be governed by the Apache License, Version 2.0, included in the file 8 | licenses/APL2.txt. 9 | */ 10 | import {NgModule} from '@angular/core'; 11 | import {CommonModule} from '@angular/common'; 12 | 13 | import {MnTextExpanderComponent} from './mn.text.expander.component.js'; 14 | import {MnPipesModule} from './mn.pipes.module.js'; 15 | 16 | export {MnTextExpanderModule} 17 | 18 | class MnTextExpanderModule { 19 | static get annotations() { return [ 20 | new NgModule({ 21 | imports:[ 22 | CommonModule, 23 | MnPipesModule 24 | ], 25 | declarations: [ 26 | MnTextExpanderComponent 27 | ], 28 | exports: [ 29 | MnTextExpanderComponent 30 | ] 31 | }) 32 | ]} 33 | } 34 | -------------------------------------------------------------------------------- /priv/public/ui/app/mn.timezone.details.downgrade.module.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2025-Present Couchbase, Inc. 3 | 4 | Use of this software is governed by the Business Source License included in 5 | the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 6 | file, in accordance with the Business Source License, use of this software will 7 | be governed by the Apache License, Version 2.0, included in the file 8 | licenses/APL2.txt. 9 | */ 10 | 11 | import angular from 'angular'; 12 | import {downgradeComponent, 13 | downgradeInjectable, 14 | setAngularJSGlobal} from '@angular/upgrade/static'; 15 | setAngularJSGlobal(angular); 16 | 17 | import {MnTimezoneDetailsComponent} from './mn.timezone.details.component.js'; 18 | import {MnTimezoneDetailsService} from './mn.timezone.details.service.js'; 19 | 20 | export default "mnTimezoneDetailsDowngradeModule"; 21 | 22 | angular 23 | .module('mnTimezoneDetailsDowngradeModule', []) 24 | .factory('mnTimezoneDetailsServiceDowngrade', downgradeInjectable(MnTimezoneDetailsService)) 25 | .directive('mnTimezoneDetailsDowngrade', downgradeComponent({ 26 | component: MnTimezoneDetailsComponent 27 | })); 28 | -------------------------------------------------------------------------------- /priv/public/ui/app/mn.timezone.details.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |
Date-times are displayed in browser's local time: {{localTimezoneLabel}} {{localGMT}}
4 |
Server timezone offset is {{serverGMTOffset | async}}
5 |
6 |
7 | 8 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /priv/public/ui/app/mn.views.component.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2021-Present Couchbase, Inc. 3 | 4 | Use of this software is governed by the Business Source License included in 5 | the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 6 | file, in accordance with the Business Source License, use of this software will 7 | be governed by the Apache License, Version 2.0, included in the file 8 | licenses/APL2.txt. 9 | */ 10 | 11 | import { Component, ChangeDetectionStrategy } from '@angular/core'; 12 | import template from "./mn.views.html"; 13 | 14 | export { MnViewsComponent }; 15 | 16 | class MnViewsComponent { 17 | static get annotations() { return [ 18 | new Component({ 19 | template, 20 | changeDetection: ChangeDetectionStrategy.OnPush 21 | }) 22 | ]} 23 | } 24 | -------------------------------------------------------------------------------- /priv/public/ui/app/mn.views.confirm.override.dialog.html: -------------------------------------------------------------------------------- 1 | 10 | 11 |
12 |

Confirm Over-Write

13 |
14 |
15 | 16 |

17 | Warning: A design document with this name already exists. 18 |
Overwrite this design document? 19 |

20 |
21 |
22 | 28 |
29 | -------------------------------------------------------------------------------- /priv/public/ui/app/mn.views.editing.service.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2021-Present Couchbase, Inc. 3 | 4 | Use of this software is governed by the Business Source License included in 5 | the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 6 | file, in accordance with the Business Source License, use of this software will 7 | be governed by the Apache License, Version 2.0, included in the file 8 | licenses/APL2.txt. 9 | */ 10 | 11 | import { Injectable } from "@angular/core"; 12 | import { HttpClient } from '@angular/common/http'; 13 | import {MnHttpRequest} from './mn.http.request.js'; 14 | 15 | export { MnViewsEditingService } 16 | 17 | class MnViewsEditingService { 18 | static get annotations() { return [ 19 | new Injectable() 20 | ]} 21 | 22 | static get parameters() { return [ 23 | HttpClient 24 | ]} 25 | 26 | constructor(http) { 27 | this.http = http; 28 | this.stream = {}; 29 | 30 | this.stream.getViewResult = 31 | new MnHttpRequest(this.getViewResult.bind(this)) 32 | .addSuccess() 33 | .addError(); 34 | } 35 | 36 | getViewResult(url) { 37 | if (url) { 38 | return this.http.get(url); 39 | } else { 40 | return []; 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /priv/public/ui/app/mn.views.html: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /priv/public/ui/app/mn.warmup.progress.html: -------------------------------------------------------------------------------- 1 | 10 | 11 |
12 |
Warmup Progress
13 |
14 |
15 |
16 | 19 | {{task[mnSortBy]}} 20 | 21 | {{task | mnFormatWarmupMessage}} 22 |
23 | 26 | {{toggleText | async}} 27 | 28 |
29 |
30 | -------------------------------------------------------------------------------- /priv/public/ui/app/mn.warmup.progress.module.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2021-Present Couchbase, Inc. 3 | 4 | Use of this software is governed by the Business Source License included in 5 | the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 6 | file, in accordance with the Business Source License, use of this software will 7 | be governed by the Apache License, Version 2.0, included in the file 8 | licenses/APL2.txt. 9 | */ 10 | 11 | import {NgModule} from '@angular/core'; 12 | 13 | import {MnSharedModule} from './mn.shared.module.js'; 14 | import {MnPipesModule} from './mn.pipes.module.js'; 15 | import {MnWarmupProgressComponent} from './mn.warmup.progress.component.js'; 16 | 17 | export {MnWarmupProgressModule} 18 | 19 | class MnWarmupProgressModule { 20 | static get annotations() { return [ 21 | new NgModule({ 22 | imports: [ 23 | MnSharedModule, 24 | MnPipesModule 25 | ], 26 | declarations: [ 27 | MnWarmupProgressComponent 28 | ], 29 | exports: [ 30 | MnWarmupProgressComponent 31 | ] 32 | }) 33 | ]} 34 | } 35 | -------------------------------------------------------------------------------- /priv/public/ui/app/mn.wizard.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |
7 |
8 |
9 | 10 | 17 | -------------------------------------------------------------------------------- /priv/public/ui/app/mn.xdcr.add.rep.scope.html: -------------------------------------------------------------------------------- 1 | 10 | 11 |
12 |
13 | 20 | 21 |
22 | 23 | 31 | 32 |
33 | -------------------------------------------------------------------------------- /priv/public/ui/app/mn.xdcr.conflict.log.mapping.rules.html: -------------------------------------------------------------------------------- 1 | 10 |
11 |
12 |
15 | 16 | {{item[0]}} > {{item[1] || ""}} 17 | 18 | X 21 |
22 |
23 |
24 | -------------------------------------------------------------------------------- /priv/public/ui/app/mn.xdcr.delete.rep.html: -------------------------------------------------------------------------------- 1 | 10 | 11 |
12 |
13 |

Confirm Delete

14 | X 15 |
16 |
17 |
18 | 19 |

20 | Warning: This action is not reversible. 21 |
Delete this replication? 22 |

23 |
24 |
25 | 31 |
32 | -------------------------------------------------------------------------------- /priv/public/ui/app/mn.xdcr.incoming.html: -------------------------------------------------------------------------------- 1 | 10 |
13 |
15 | 17 | {{sourceClusterName | async}} 18 | 19 | 20 | {{sourceClusterId | async}} 21 | 22 | 23 | {{replicationCount | async}} 24 | 25 |
26 | 30 | 31 |
32 | -------------------------------------------------------------------------------- /priv/public/ui/app/mn.xdcr.rep.message.component.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2021-Present Couchbase, Inc. 3 | 4 | Use of this software is governed by the Business Source License included in 5 | the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 6 | file, in accordance with the Business Source License, use of this software will 7 | be governed by the Apache License, Version 2.0, included in the file 8 | licenses/APL2.txt. 9 | */ 10 | 11 | import {Component, ChangeDetectionStrategy} from '@angular/core'; 12 | import template from "./mn.xdcr.rep.message.html"; 13 | 14 | export {MnXDCRRepMessageComponent}; 15 | 16 | class MnXDCRRepMessageComponent { 17 | static get annotations() { return [ 18 | new Component({ 19 | selector: "mn-xdcr-rep-message", 20 | template, 21 | inputs: [ 22 | "fromBucket", 23 | "toBucket", 24 | "toCluster", 25 | "isEditMode" 26 | ], 27 | changeDetection: ChangeDetectionStrategy.OnPush 28 | }) 29 | ]} 30 | 31 | static get parameters() { return []} 32 | 33 | constructor() {} 34 | } 35 | -------------------------------------------------------------------------------- /priv/public/ui/app/mn_admin/mn_certificates_delete_dialog.html: -------------------------------------------------------------------------------- 1 | 10 | 11 |
12 |
13 |

Delete Certificate

14 |
15 |
16 |
17 | 18 |

Are you sure want to delete this certificate?

19 |
20 |
21 | 27 |
28 | -------------------------------------------------------------------------------- /priv/public/ui/app/mn_admin/mn_cluster_info_dialog.html: -------------------------------------------------------------------------------- 1 | 10 | 11 |
12 |
13 |

Cluster Summary Info

14 |
15 | 16 |
17 |
18 |
{{info}}
19 |
20 |
21 | 22 | 31 |
32 | -------------------------------------------------------------------------------- /priv/public/ui/app/mn_admin/mn_developer_settings.html: -------------------------------------------------------------------------------- 1 | 10 | 11 |
12 |
13 |

Tweak internal settings

14 |
15 |
16 |
17 |
18 | Dump Stats 7.0
19 |
20 |
21 | Dump Stats 6.5 22 |
23 |
24 | 27 |
28 |
29 | -------------------------------------------------------------------------------- /priv/public/ui/app/mn_admin/mn_groups_delete_dialog.html: -------------------------------------------------------------------------------- 1 | 10 | 11 |
12 |
13 |

Confirm Delete Group

14 |
15 |
18 |
19 |
20 | 21 |

22 | Warning: This action is not reversible. 23 |
Delete this server group? 24 |

25 |
26 |
27 | 31 |
32 |
33 | -------------------------------------------------------------------------------- /priv/public/ui/app/mn_admin/mn_groups_delete_dialog_controller.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2020-Present Couchbase, Inc. 3 | 4 | Use of this software is governed by the Business Source License included in 5 | the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 6 | file, in accordance with the Business Source License, use of this software will 7 | be governed by the Apache License, Version 2.0, included in the file 8 | licenses/APL2.txt. 9 | */ 10 | 11 | export default mnGroupsDeleteDialogController; 12 | 13 | mnGroupsDeleteDialogController.$inject = ["$uibModalInstance", "mnGroupsService", "mnPromiseHelper", "group"]; 14 | function mnGroupsDeleteDialogController($uibModalInstance, mnGroupsService, mnPromiseHelper, group) { 15 | var vm = this; 16 | 17 | vm.onSubmit = onSubmit; 18 | 19 | function onSubmit() { 20 | if (vm.viewLoading) { 21 | return; 22 | } 23 | 24 | var promise = mnGroupsService.deleteGroup(group.uri); 25 | mnPromiseHelper(vm, promise, $uibModalInstance) 26 | .showGlobalSpinner() 27 | .catchErrors() 28 | .closeFinally() 29 | .reloadState("app.admin.groups") 30 | .showGlobalSuccess("Group deleted successfully!"); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /priv/public/ui/app/mn_admin/mn_gsi_drop_confirm_dialog.html: -------------------------------------------------------------------------------- 1 | 10 | 11 |
12 |
13 |

Drop Index

14 |
15 |
16 |
17 | 18 |

Are you sure want to drop this index? 19 |
All partitions of this index will be dropped.

20 |
21 |
22 | 28 |
29 | -------------------------------------------------------------------------------- /priv/public/ui/app/mn_admin/mn_internal_settings_service.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2020-Present Couchbase, Inc. 3 | 4 | Use of this software is governed by the Business Source License included in 5 | the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 6 | file, in accordance with the Business Source License, use of this software will 7 | be governed by the Apache License, Version 2.0, included in the file 8 | licenses/APL2.txt. 9 | */ 10 | 11 | import angular from "angular"; 12 | 13 | export default "mnInternalSettingsService"; 14 | 15 | angular 16 | .module("mnInternalSettingsService", []) 17 | .factory("mnInternalSettingsService", ["$http", mnInternalSettingsFactory]); 18 | 19 | function mnInternalSettingsFactory($http) { 20 | var mnInternalSettingsService = { 21 | getState: getState, 22 | save: save 23 | }; 24 | 25 | return mnInternalSettingsService; 26 | 27 | function save(data) { 28 | return $http({ 29 | method: "POST", 30 | url: "/internalSettings", 31 | data: data 32 | }); 33 | } 34 | 35 | function getState() { 36 | return $http({ 37 | method: "GET", 38 | url: "/internalSettings" 39 | }).then(function (resp) { 40 | return resp.data; 41 | }) 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /priv/public/ui/app/mn_admin/mn_logs_controller.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/couchbase/ns_server/55791dba46d71554aedc379ee8d2d394bad71972/priv/public/ui/app/mn_admin/mn_logs_controller.js -------------------------------------------------------------------------------- /priv/public/ui/app/mn_admin/mn_lost_connection.html: -------------------------------------------------------------------------------- 1 | 10 | 11 |
14 |

Lost connection to server at {{lostConnCtl.lostConnectionAt}}. Repeating in {{lostConnCtl.state.repeatAt}} seconds. Retry now

15 |
16 | -------------------------------------------------------------------------------- /priv/public/ui/app/mn_admin/mn_redaction_service.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2020-Present Couchbase, Inc. 3 | 4 | Use of this software is governed by the Business Source License included in 5 | the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 6 | file, in accordance with the Business Source License, use of this software will 7 | be governed by the Apache License, Version 2.0, included in the file 8 | licenses/APL2.txt. 9 | */ 10 | 11 | import angular from "angular"; 12 | 13 | export default "mnLogRedactionService"; 14 | 15 | angular 16 | .module("mnLogRedactionService", []) 17 | .factory("mnLogRedactionService", ["$http", mnRedactionFactory]); 18 | 19 | function mnRedactionFactory($http) { 20 | var mnLogRedactionService = { 21 | get: get, 22 | post: post 23 | }; 24 | 25 | return mnLogRedactionService; 26 | 27 | function get() { 28 | return $http.get("/settings/logRedaction").then(function (resp) { 29 | return resp.data; 30 | }); 31 | } 32 | 33 | function post(data) { 34 | return $http.post("/settings/logRedaction", data); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /priv/public/ui/app/mn_admin/mn_roles.html: -------------------------------------------------------------------------------- 1 | 10 | 11 |
12 | 13 | 24 | 25 | 26 | 27 |
-------------------------------------------------------------------------------- /priv/public/ui/app/mn_admin/mn_roles_groups_delete_dialog_controller.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2020-Present Couchbase, Inc. 3 | 4 | Use of this software is governed by the Business Source License included in 5 | the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 6 | file, in accordance with the Business Source License, use of this software will 7 | be governed by the Apache License, Version 2.0, included in the file 8 | licenses/APL2.txt. 9 | */ 10 | 11 | export default mnRolesGroupsDeleteDialogController; 12 | 13 | mnRolesGroupsDeleteDialogController.$inject = ["mnUserRolesService", "rolesGroup", "mnPromiseHelper", "$uibModalInstance"]; 14 | function mnRolesGroupsDeleteDialogController(mnUserRolesService, rolesGroup, mnPromiseHelper, $uibModalInstance) { 15 | var vm = this; 16 | vm.grolesGroupsId = rolesGroup.id; 17 | vm.onSubmit = onSubmit; 18 | 19 | function onSubmit() { 20 | mnPromiseHelper(vm, mnUserRolesService.deleteRolesGroup(rolesGroup), $uibModalInstance) 21 | .showGlobalSpinner() 22 | .closeFinally() 23 | .broadcast("reloadRolesGroupsPoller") 24 | .showGlobalSuccess("Group deleted successfully!"); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /priv/public/ui/app/mn_admin/mn_root_certificate_service.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2020-Present Couchbase, Inc. 3 | 4 | Use of this software is governed by the Business Source License included in 5 | the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 6 | file, in accordance with the Business Source License, use of this software will 7 | be governed by the Apache License, Version 2.0, included in the file 8 | licenses/APL2.txt. 9 | */ 10 | 11 | import angular from "angular"; 12 | 13 | export default "mnRootCertificateService"; 14 | 15 | angular 16 | .module("mnRootCertificateService", []) 17 | .factory("mnRootCertificateService", ["$http", mnRootCertificateFactory]); 18 | 19 | function mnRootCertificateFactory($http) { 20 | var mnRootCertificateService = { 21 | getDefaultCertificate: getDefaultCertificate 22 | }; 23 | 24 | return mnRootCertificateService; 25 | 26 | function getDefaultCertificate() { 27 | return $http({ 28 | method: 'GET', 29 | url: '/pools/default/certificate', 30 | params: { 31 | extended: true 32 | } 33 | }).then(function (resp) { 34 | return resp.data; 35 | }); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /priv/public/ui/app/mn_admin/mn_servers_eject_dialog_controller.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2020-Present Couchbase, Inc. 3 | 4 | Use of this software is governed by the Business Source License included in 5 | the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 6 | file, in accordance with the Business Source License, use of this software will 7 | be governed by the Apache License, Version 2.0, included in the file 8 | licenses/APL2.txt. 9 | */ 10 | 11 | export default mnServersEjectDialogController; 12 | 13 | mnServersEjectDialogController.$inject = ["$rootScope", "$uibModalInstance", "node", "warnings", "mnServersService"]; 14 | function mnServersEjectDialogController($rootScope, $uibModalInstance, node, warnings, mnServersService) { 15 | var vm = this; 16 | vm.warningFlags = warnings; 17 | vm.doEjectServer = doEjectServer; 18 | 19 | function doEjectServer() { 20 | mnServersService.addToPendingEject(node); 21 | $uibModalInstance.close(); 22 | $rootScope.$broadcast("reloadNodes"); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /priv/public/ui/app/mn_admin/mn_servers_failover_confirmation_dialog.html: -------------------------------------------------------------------------------- 1 | 10 | 11 |
12 |
13 |

Confirm Failover

14 |
15 |
16 |
17 | 18 |

19 | Some servers cannot be contacted. Failover coordination throughout the 20 | cluster could be compromised. Do you wish to proceed with the failover 21 | anyway? 22 |

23 |
24 |
25 | 31 |
32 | -------------------------------------------------------------------------------- /priv/public/ui/app/mn_admin/mn_servers_stop_rebalance_dialog.html: -------------------------------------------------------------------------------- 1 | 10 | 11 |
12 |
13 |

Confirm Rebalance Stop

14 |
15 |
16 |
17 |

18 | Warning: Stopping rebalance is unsafe at this 19 | moment since cluster may be in a partitioned state. Continue only if 20 | you're perfectly sure that this is not the case. 21 |

22 |
23 | 29 |
30 |
31 | -------------------------------------------------------------------------------- /priv/public/ui/app/mn_admin/mn_settings_cluster_all_xdcr_log_levels_dialog_controller.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2024-Present Couchbase, Inc. 3 | 4 | Use of this software is governed by the Business Source License included in 5 | the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 6 | file, in accordance with the Business Source License, use of this software will 7 | be governed by the Apache License, Version 2.0, included in the file 8 | licenses/APL2.txt. 9 | */ 10 | 11 | import angular from 'angular'; 12 | 13 | export default 'mnSettingsClusterAllXDCRLogLevelsDialogController'; 14 | 15 | angular.module('mnSettingsClusterAllXDCRLogLevelsDialogController', []).controller('mnSettingsClusterAllXDCRLogLevelsDialogController', ["$uibModalInstance", "logLevels", "initialLogLevels", mnSettingsClusterAllXDCRLogLevelsDialogController]); 16 | 17 | function mnSettingsClusterAllXDCRLogLevelsDialogController($uibModalInstance, logLevels, initialLogLevels) { 18 | let vm = this; 19 | vm.logLevels = logLevels; 20 | vm.initialLogLevels = initialLogLevels; 21 | vm.XDCRServices = Object.keys(logLevels); 22 | vm.closeModal = $uibModalInstance.close; 23 | } 24 | 25 | -------------------------------------------------------------------------------- /priv/public/ui/app/mn_admin/mn_settings_cluster_confirmation_dialog.html: -------------------------------------------------------------------------------- 1 | 10 | 11 |
12 |

13 | Confirm Indexer Memory Quota Change 14 |

15 |
16 |

17 | Warning: Changing the index memory quota will cause the index processes to be restarted and will make indexes briefly unavailable. Are you sure you wish to continue? 18 |

19 | 23 |
24 |
25 | -------------------------------------------------------------------------------- /priv/public/ui/app/mn_admin/mn_statistics_chart_builder_delete.html: -------------------------------------------------------------------------------- 1 | 10 | 11 |
12 |
13 |

Delete Chart

14 |
15 |
16 |
17 | 18 |

Delete this chart?

19 |
20 |
21 | 25 |
26 | -------------------------------------------------------------------------------- /priv/public/ui/app/mn_admin/mn_statistics_chart_directive.html: -------------------------------------------------------------------------------- 1 | 10 | 11 |
12 | 20 | {{title}} 21 | 22 |   23 |
24 | 33 | -------------------------------------------------------------------------------- /priv/public/ui/app/mn_admin/mn_statistics_group_delete.html: -------------------------------------------------------------------------------- 1 | 10 | 11 |
12 |

13 | Delete Group 14 |

15 |
16 |
17 |
18 | 19 |

Delete this group and all its charts?

20 |
21 |
22 | 26 |
27 |
28 | -------------------------------------------------------------------------------- /priv/public/ui/app/mn_admin/mn_statistics_reset_dialog.html: -------------------------------------------------------------------------------- 1 | 10 | 11 |
12 |
13 |

Reset Dashboard

14 |
15 |
16 |
17 | 18 |

19 | This will permanently delete all your custom dashboard configurations 20 | and reset your dashboard to its initial state. 21 |

22 |
23 |
24 | 30 |
31 | -------------------------------------------------------------------------------- /priv/public/ui/app/mn_admin/mn_statistics_scenario_delete.html: -------------------------------------------------------------------------------- 1 | 10 | 11 |
12 |

13 | Delete Custom Dashboard 14 |

15 |
16 |
17 |
18 | 19 |

Delete this dashboard?

20 |
21 |
22 | 26 |
27 |
28 | -------------------------------------------------------------------------------- /priv/public/ui/app/mn_admin/mn_user_roles_delete_dialog.html: -------------------------------------------------------------------------------- 1 | 10 | 11 |
12 |
13 |

Confirm Delete User

14 |
15 |
18 |
19 |
20 | 21 |

22 | Warning: This action is not reversible. 23 |
Delete {{userRolesDeleteDialogCtl.username}}? 24 |

25 |
26 |
27 | 31 |
32 |
33 | -------------------------------------------------------------------------------- /priv/public/ui/app/mn_admin/mn_user_roles_delete_dialog_controller.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2020-Present Couchbase, Inc. 3 | 4 | Use of this software is governed by the Business Source License included in 5 | the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 6 | file, in accordance with the Business Source License, use of this software will 7 | be governed by the Apache License, Version 2.0, included in the file 8 | licenses/APL2.txt. 9 | */ 10 | 11 | export default mnUserRolesDeleteDialogController; 12 | 13 | mnUserRolesDeleteDialogController.$inject = ["mnUserRolesService", "user", "mnPromiseHelper", "$uibModalInstance"]; 14 | function mnUserRolesDeleteDialogController(mnUserRolesService, user, mnPromiseHelper, $uibModalInstance) { 15 | var vm = this; 16 | vm.username = user.id; 17 | vm.onSubmit = onSubmit; 18 | 19 | function onSubmit() { 20 | mnPromiseHelper(vm, mnUserRolesService.deleteUser(user), $uibModalInstance) 21 | .showGlobalSpinner() 22 | .closeFinally() 23 | .broadcast("reloadRolesPoller") 24 | .showGlobalSuccess("User deleted successfully!"); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /priv/public/ui/app/mn_admin/mn_user_roles_lock_dialog_controller.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2020-Present Couchbase, Inc. 3 | 4 | Use of this software is governed by the Business Source License included in 5 | the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 6 | file, in accordance with the Business Source License, use of this software will 7 | be governed by the Apache License, Version 2.0, included in the file 8 | licenses/APL2.txt. 9 | */ 10 | 11 | export default mnUserRolesLockDialogController; 12 | 13 | mnUserRolesLockDialogController.$inject = ["mnUserRolesService", "user", "mnPromiseHelper", "$uibModalInstance"]; 14 | function mnUserRolesLockDialogController(mnUserRolesService, user, mnPromiseHelper, $uibModalInstance) { 15 | var vm = this; 16 | vm.username = user.id; 17 | vm.onSubmit = onSubmit; 18 | 19 | function onSubmit() { 20 | mnPromiseHelper(vm, mnUserRolesService.lockUser(user), $uibModalInstance) 21 | .showGlobalSpinner() 22 | .catchGlobalErrors() 23 | .closeFinally() 24 | .broadcast("reloadRolesPoller") 25 | .showGlobalSuccess("User locked successfully!"); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /priv/public/ui/app/mn_admin/mn_user_roles_unlock_dialog_controller.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2020-Present Couchbase, Inc. 3 | 4 | Use of this software is governed by the Business Source License included in 5 | the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 6 | file, in accordance with the Business Source License, use of this software will 7 | be governed by the Apache License, Version 2.0, included in the file 8 | licenses/APL2.txt. 9 | */ 10 | 11 | export default mnUserRolesUnlockDialogController; 12 | 13 | mnUserRolesUnlockDialogController.$inject = ["mnUserRolesService", "user", "mnPromiseHelper", "$uibModalInstance"]; 14 | function mnUserRolesUnlockDialogController(mnUserRolesService, user, mnPromiseHelper, $uibModalInstance) { 15 | var vm = this; 16 | vm.username = user.id; 17 | vm.onSubmit = onSubmit; 18 | 19 | function onSubmit() { 20 | mnPromiseHelper(vm, mnUserRolesService.unlockUser(user), $uibModalInstance) 21 | .showGlobalSpinner() 22 | .catchGlobalErrors() 23 | .closeFinally() 24 | .broadcast("reloadRolesPoller") 25 | .showGlobalSuccess("User unlocked successfully!"); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /priv/public/ui/index.css: -------------------------------------------------------------------------------- 1 | @import "./app/css/cbui-base.css"; 2 | @import "./app/css/cbui-layout.css"; 3 | @import "./app/css/cbui-components.css"; 4 | @import "./app/css/cbui-responsive.css"; 5 | @import "./app/css/cbui-hybrid.css"; 6 | 7 | @import "./app/css/font-awesome.css"; 8 | @import "./app/css/modal.css"; 9 | @import "./app/css/tooltip.css"; 10 | @import "./libs/selectize.default.css"; 11 | @import "./libs/angular-ui-select.css"; 12 | @import "./libs/codemirror.css"; 13 | -------------------------------------------------------------------------------- /priv/public/ui/libs/ace/ace-loader.js: -------------------------------------------------------------------------------- 1 | import modeN1ql from './mode-n1ql.js'; 2 | import modeJavascript from './mode-javascript.js'; 3 | import modeJson from './mode-json.js'; 4 | import modeSqlPlusPlus from './mode-sql-plus-plus.js'; 5 | import queryFormatter from "./query-formatter.js"; 6 | import cbSearchbox from "./ext-cb-searchbox.js"; 7 | import languageTools from "./ext-language_tools.js"; 8 | -------------------------------------------------------------------------------- /priv/public/ui/libs/ace/ace-wrapper.js: -------------------------------------------------------------------------------- 1 | import ace from './ace.js'; 2 | 3 | export default ace; 4 | -------------------------------------------------------------------------------- /priv/public/ui/libs/ace/mode-text.js: -------------------------------------------------------------------------------- 1 | 2 | ; (function() { 3 | ace.require(["ace/mode/text"], function(m) { 4 | if (typeof module == "object" && typeof exports == "object" && module) { 5 | module.exports = m; 6 | } 7 | }); 8 | })(); 9 | -------------------------------------------------------------------------------- /priv/public/ui/libs/ace/snippets/text.js: -------------------------------------------------------------------------------- 1 | window.ace.define("ace/snippets/text",["require","exports","module"], function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText =undefined; 5 | exports.scope = "text"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /priv/public/ui/libs/es-module-shims-options.js: -------------------------------------------------------------------------------- 1 | window.esmsInitOptions = { 2 | shimMode: true, 3 | fetch: function (url, options) { 4 | let doFetch = fetch(url, options); 5 | if (!url.endsWith('.html')) { 6 | return doFetch; 7 | } 8 | return doFetch 9 | .then(res => res.text()) 10 | .then(result => { 11 | let blob = new Blob( 12 | ['export default ' + JSON.stringify(result)], 13 | {type: 'application/javascript'} 14 | ); 15 | 16 | return new Response(blob); 17 | }); 18 | } 19 | }; 20 | -------------------------------------------------------------------------------- /priv/public/ui/libs/ngclipboard.js: -------------------------------------------------------------------------------- 1 | /*! ngclipboard - v1.1.1 - 2016-02-26 2 | * https://github.com/sachinchoolur/ngclipboard 3 | * Copyright (c) 2016 Sachin; Licensed MIT */ 4 | import angular from "angular"; 5 | import Clipboard from "clipboard"; 6 | var MODULE_NAME = 'ngclipboard'; 7 | export default MODULE_NAME; 8 | 9 | angular.module(MODULE_NAME, []).directive('ngclipboard', function() { 10 | return { 11 | restrict: 'A', 12 | scope: { 13 | ngclipboardSuccess: '&', 14 | ngclipboardError: '&' 15 | }, 16 | link: function(scope, element) { 17 | var clipboard = new Clipboard(element[0]); 18 | 19 | clipboard.on('success', function(e) { 20 | scope.$apply(function () { 21 | scope.ngclipboardSuccess({ 22 | e: e 23 | }); 24 | }); 25 | }); 26 | 27 | clipboard.on('error', function(e) { 28 | scope.$apply(function () { 29 | scope.ngclipboardError({ 30 | e: e 31 | }); 32 | }); 33 | }); 34 | 35 | } 36 | }; 37 | }); 38 | -------------------------------------------------------------------------------- /priv/public/ui/web_modules/angular.js: -------------------------------------------------------------------------------- 1 | export { a as default } from './common/index-729b989c.js'; 2 | -------------------------------------------------------------------------------- /priv/public/ui/web_modules/common/ArgumentOutOfRangeError-91c779f5.js: -------------------------------------------------------------------------------- 1 | /** PURE_IMPORTS_START PURE_IMPORTS_END */ 2 | var ArgumentOutOfRangeErrorImpl = /*@__PURE__*/ (function () { 3 | function ArgumentOutOfRangeErrorImpl() { 4 | Error.call(this); 5 | this.message = 'argument out of range'; 6 | this.name = 'ArgumentOutOfRangeError'; 7 | return this; 8 | } 9 | ArgumentOutOfRangeErrorImpl.prototype = /*@__PURE__*/ Object.create(Error.prototype); 10 | return ArgumentOutOfRangeErrorImpl; 11 | })(); 12 | var ArgumentOutOfRangeError = ArgumentOutOfRangeErrorImpl; 13 | 14 | export { ArgumentOutOfRangeError as A }; 15 | -------------------------------------------------------------------------------- /priv/public/ui/web_modules/common/EmptyError-a9e17542.js: -------------------------------------------------------------------------------- 1 | /** PURE_IMPORTS_START PURE_IMPORTS_END */ 2 | var EmptyErrorImpl = /*@__PURE__*/ (function () { 3 | function EmptyErrorImpl() { 4 | Error.call(this); 5 | this.message = 'no elements in sequence'; 6 | this.name = 'EmptyError'; 7 | return this; 8 | } 9 | EmptyErrorImpl.prototype = /*@__PURE__*/ Object.create(Error.prototype); 10 | return EmptyErrorImpl; 11 | })(); 12 | var EmptyError = EmptyErrorImpl; 13 | 14 | export { EmptyError as E }; 15 | -------------------------------------------------------------------------------- /priv/public/ui/web_modules/common/_commonjsHelpers-6a48b99e.js: -------------------------------------------------------------------------------- 1 | var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; 2 | 3 | function unwrapExports (x) { 4 | return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x; 5 | } 6 | 7 | function createCommonjsModule(fn, module) { 8 | return module = { exports: {} }, fn(module, module.exports), module.exports; 9 | } 10 | 11 | export { commonjsGlobal as a, createCommonjsModule as c, unwrapExports as u }; 12 | -------------------------------------------------------------------------------- /priv/public/ui/web_modules/common/concatMap-326c8f32.js: -------------------------------------------------------------------------------- 1 | import { m as mergeMap } from './mergeMap-64c6f393.js'; 2 | 3 | /** PURE_IMPORTS_START _mergeMap PURE_IMPORTS_END */ 4 | function concatMap(project, resultSelector) { 5 | return mergeMap(project, resultSelector, 1); 6 | } 7 | 8 | export { concatMap as c }; 9 | -------------------------------------------------------------------------------- /priv/public/ui/web_modules/common/nodrag-20481c62.js: -------------------------------------------------------------------------------- 1 | import { e as event } from './index-e88ffd88.js'; 2 | import { s as select } from './touch-775b0bb4.js'; 3 | 4 | function noevent() { 5 | event.preventDefault(); 6 | event.stopImmediatePropagation(); 7 | } 8 | 9 | function dragDisable(view) { 10 | var root = view.document.documentElement, 11 | selection = select(view).on("dragstart.drag", noevent, true); 12 | if ("onselectstart" in root) { 13 | selection.on("selectstart.drag", noevent, true); 14 | } else { 15 | root.__noselect = root.style.MozUserSelect; 16 | root.style.MozUserSelect = "none"; 17 | } 18 | } 19 | 20 | function yesdrag(view, noclick) { 21 | var root = view.document.documentElement, 22 | selection = select(view).on("dragstart.drag", null); 23 | if (noclick) { 24 | selection.on("click.drag", noevent, true); 25 | setTimeout(function() { selection.on("click.drag", null); }, 0); 26 | } 27 | if ("onselectstart" in root) { 28 | selection.on("selectstart.drag", null); 29 | } else { 30 | root.style.MozUserSelect = root.__noselect; 31 | delete root.__noselect; 32 | } 33 | } 34 | 35 | export { dragDisable as d, yesdrag as y }; 36 | -------------------------------------------------------------------------------- /priv/public/ui/web_modules/common/piecewise-ef887050.js: -------------------------------------------------------------------------------- 1 | function interpolateRound(a, b) { 2 | return a = +a, b = +b, function(t) { 3 | return Math.round(a * (1 - t) + b * t); 4 | }; 5 | } 6 | 7 | function piecewise(interpolate, values) { 8 | var i = 0, n = values.length - 1, v = values[0], I = new Array(n < 0 ? 0 : n); 9 | while (i < n) I[i] = interpolate(v, v = values[++i]); 10 | return function(t) { 11 | var i = Math.max(0, Math.min(n - 1, Math.floor(t *= n))); 12 | return I[i](t - i); 13 | }; 14 | } 15 | 16 | export { interpolateRound as i, piecewise as p }; 17 | -------------------------------------------------------------------------------- /priv/public/ui/web_modules/d3-format.js: -------------------------------------------------------------------------------- 1 | export { F as FormatSpecifier, f as format, d as formatDefaultLocale, b as formatLocale, a as formatPrefix, c as formatSpecifier, p as precisionFixed, e as precisionPrefix, g as precisionRound } from './common/precisionRound-dc953fe5.js'; 2 | -------------------------------------------------------------------------------- /priv/public/ui/web_modules/d3-time-format.js: -------------------------------------------------------------------------------- 1 | import './common/utcYear-c83ede8f.js'; 2 | import { u as utcFormat, a as utcParse } from './common/defaultLocale-579b98ca.js'; 3 | export { t as timeFormat, d as timeFormatDefaultLocale, f as timeFormatLocale, b as timeParse, u as utcFormat, a as utcParse } from './common/defaultLocale-579b98ca.js'; 4 | 5 | var isoSpecifier = "%Y-%m-%dT%H:%M:%S.%LZ"; 6 | 7 | function formatIsoNative(date) { 8 | return date.toISOString(); 9 | } 10 | 11 | var formatIso = Date.prototype.toISOString 12 | ? formatIsoNative 13 | : utcFormat(isoSpecifier); 14 | 15 | function parseIsoNative(string) { 16 | var date = new Date(string); 17 | return isNaN(date) ? null : date; 18 | } 19 | 20 | var parseIso = +new Date("2000-01-01T00:00:00.000Z") 21 | ? parseIsoNative 22 | : utcParse(isoSpecifier); 23 | 24 | export { formatIso as isoFormat, parseIso as isoParse }; 25 | -------------------------------------------------------------------------------- /priv/public/ui/web_modules/d3-time.js: -------------------------------------------------------------------------------- 1 | export { t as timeDay, j as timeDays, v as timeFriday, x as timeFridays, n as timeInterval, m as timeMonday, l as timeMondays, y as timeSaturday, z as timeSaturdays, s as timeSunday, k as timeSundays, f as timeThursday, r as timeThursdays, o as timeTuesday, p as timeTuesdays, w as timeWednesday, q as timeWednesdays, s as timeWeek, k as timeWeeks, a as timeYear, A as timeYears, u as utcDay, B as utcDays, J as utcFriday, K as utcFridays, d as utcMonday, D as utcMondays, L as utcSaturday, M as utcSaturdays, b as utcSunday, C as utcSundays, e as utcThursday, I as utcThursdays, E as utcTuesday, F as utcTuesdays, G as utcWednesday, H as utcWednesdays, b as utcWeek, C as utcWeeks, c as utcYear, N as utcYears } from './common/utcYear-c83ede8f.js'; 2 | export { b as timeHour, h as timeHours, u as timeMillisecond, m as timeMilliseconds, t as timeMinute, g as timeMinutes, c as timeMonth, i as timeMonths, a as timeSecond, s as timeSeconds, e as utcHour, k as utcHours, u as utcMillisecond, m as utcMilliseconds, d as utcMinute, j as utcMinutes, f as utcMonth, l as utcMonths, a as utcSecond, s as utcSeconds } from './common/utcMonth-4fcc394c.js'; 3 | -------------------------------------------------------------------------------- /priv/public/ui/web_modules/d3-transition.js: -------------------------------------------------------------------------------- 1 | import { S as SCHEDULED, T as Transition } from './common/index-35caf4f7.js'; 2 | export { i as interrupt, t as transition } from './common/index-35caf4f7.js'; 3 | import './common/index-e88ffd88.js'; 4 | import './common/rgb-50db7803.js'; 5 | import './common/string-cfd0b55d.js'; 6 | import './common/index-f3df269c.js'; 7 | 8 | var root = [null]; 9 | 10 | function active(node, name) { 11 | var schedules = node.__transition, 12 | schedule, 13 | i; 14 | 15 | if (schedules) { 16 | name = name == null ? null : name + ""; 17 | for (i in schedules) { 18 | if ((schedule = schedules[i]).state > SCHEDULED && schedule.name === name) { 19 | return new Transition([[node]], root, name, +i); 20 | } 21 | } 22 | } 23 | 24 | return null; 25 | } 26 | 27 | export { active }; 28 | -------------------------------------------------------------------------------- /pylib/installed_script_helpers.py: -------------------------------------------------------------------------------- 1 | import os.path 2 | 3 | def basedir(): 4 | # We are installed in $INSTALL_DIR/lib/python, so need to go up three 5 | # levels 6 | return os.path.normpath( 7 | os.path.join( 8 | os.path.abspath(__file__), 9 | '..', '..', '..' 10 | ) 11 | ) 12 | 13 | def get_initargs_variants(root=basedir()): 14 | return [ 15 | os.path.abspath( 16 | os.path.join( 17 | root, 18 | "var", 19 | "lib", 20 | "couchbase", 21 | "initargs")), 22 | "/opt/couchbase/var/lib/couchbase/initargs", 23 | os.path.expanduser("~/Library/Application Support/Couchbase/var/lib/couchbase/initargs")] 24 | 25 | def find_binary(name, root=basedir()): 26 | path = os.path.join(root, "bin", name) 27 | if os.path.exists(path): 28 | return os.path.abspath(path) 29 | 30 | return None 31 | 32 | def find_valid_binary(name, root=basedir()): 33 | path = find_binary(name, root); 34 | if path is None: 35 | raise RuntimeError("Could not find binary") 36 | 37 | return path -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | requests>=2.32.3 2 | watchdog>=6.0.0 3 | -------------------------------------------------------------------------------- /scripts/ast.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # @author Couchbase 4 | # @copyright 2018-Present Couchbase, Inc. 5 | # 6 | # Use of this software is governed by the Business Source License included in 7 | # the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 8 | # file, in accordance with the Business Source License, use of this software 9 | # will be governed by the Apache License, Version 2.0, included in the file 10 | # licenses/APL2.txt. 11 | # 12 | # Extract abstract syntax tree from a beam file compiled with 13 | # debug_info flag. 14 | # 15 | # ./ast.sh misc.beam 16 | 17 | erl_file=$1 18 | erl_script=$(cat < 2 | # @copyright 2013-Present Couchbase, Inc. 3 | # 4 | # Use of this software is governed by the Business Source License included in 5 | # the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 6 | # file, in accordance with the Business Source License, use of this software 7 | # will be governed by the Apache License, Version 2.0, included in the file 8 | # licenses/APL2.txt. 9 | require_relative 'rest-methods' 10 | 11 | self.send(:extend, RESTMethods) 12 | 13 | discover_nodes! 14 | 15 | puts 16 | puts "Nodes discovered: #{$all_nodes}" 17 | -------------------------------------------------------------------------------- /scripts/cluster_run_wrapper: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # @author Couchbase 4 | # @copyright 2011-Present Couchbase, Inc. 5 | # 6 | # Use of this software is governed by the Business Source License included in 7 | # the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 8 | # file, in accordance with the Business Source License, use of this software 9 | # will be governed by the Apache License, Version 2.0, included in the file 10 | # licenses/APL2.txt. 11 | # Wraps cluster_run command to kill process group when stdin closes 12 | (cat && kill 0) | ./cluster_run $* 13 | -------------------------------------------------------------------------------- /scripts/echo-server.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # 3 | # @author Couchbase 4 | # @copyright 2013-Present Couchbase, Inc. 5 | # 6 | # Use of this software is governed by the Business Source License included in 7 | # the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 8 | # file, in accordance with the Business Source License, use of this software 9 | # will be governed by the Apache License, Version 2.0, included in the file 10 | # licenses/APL2.txt. 11 | 12 | require 'socket' 13 | 14 | BIND_PORT = ARGV[0] ? ARGV[0].to_i : 22222 15 | 16 | def run_accept_loop(server_sock) 17 | while true 18 | client = server_sock.accept 19 | puts "got client #{client}" 20 | Thread.new { run_client_loop(client) } 21 | end 22 | end 23 | 24 | def run_client_loop(client) 25 | puts "starting client loop: #{client}" 26 | while true 27 | stuff = client.readpartial(16384) 28 | puts "#{client}: got #{stuff.inspect}" 29 | client.write stuff 30 | end 31 | rescue EOFError 32 | client.close rescue nil 33 | puts "ended client: #{client}" 34 | return 35 | rescue Exception => exc 36 | puts "got exception: #{exc}" 37 | end 38 | 39 | run_accept_loop(TCPServer.new(BIND_PORT)) 40 | 41 | -------------------------------------------------------------------------------- /scripts/indent_erl.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # @author Couchbase 4 | # @copyright 2015-Present Couchbase, Inc. 5 | # 6 | # Use of this software is governed by the Business Source License included in 7 | # the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 8 | # file, in accordance with the Business Source License, use of this software 9 | # will be governed by the Apache License, Version 2.0, included in the file 10 | # licenses/APL2.txt. 11 | 12 | emacs --no-init-file --script $(dirname $0)/indent_erl.el "$@" 13 | -------------------------------------------------------------------------------- /scripts/jq/master_events/inflight-moves: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # @author Couchbase 4 | # @copyright 2016-Present Couchbase, Inc. 5 | # 6 | # Use of this software is governed by the Business Source License included in 7 | # the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 8 | # file, in accordance with the Business Source License, use of this software 9 | # will be governed by the Apache License, Version 2.0, included in the file 10 | # licenses/APL2.txt. 11 | # 12 | # Filter and group events for unfinished moves. 13 | # 14 | 15 | exec jq ' 16 | def has_vbucketMoveStart: any(.type == "vbucketMoveStart"); 17 | def has_vbucketMoveDone: any(.type == "vbucketMoveDone"); 18 | 19 | map(select(has("bucket") and has("vbucket"))) | 20 | group_by([.bucket,.vbucket]) | 21 | map(select(has_vbucketMoveStart and (has_vbucketMoveDone | not))) 22 | ' "$@" 23 | -------------------------------------------------------------------------------- /scripts/jq/master_events/last-rebalance: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # @author Couchbase 4 | # @copyright 2016-Present Couchbase, Inc. 5 | # 6 | # Use of this software is governed by the Business Source License included in 7 | # the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 8 | # file, in accordance with the Business Source License, use of this software 9 | # will be governed by the Apache License, Version 2.0, included in the file 10 | # licenses/APL2.txt. 11 | # 12 | # Filter only events relevant to last rebalance. 13 | # 14 | 15 | exec jq ' 16 | (length as $size | 17 | to_entries | 18 | map({key: .key, type: .value.type} | 19 | select(.type == "rebalanceStart" or 20 | .type == "rebalanceEnd")) | 21 | (length - 1) as $last | 22 | if .[$last].type == "rebalanceEnd" then 23 | [.[$last-1].key, .[$last].key+1] 24 | else 25 | [.[$last].key, $size] 26 | end) as [$a,$b] | .[$a:$b] 27 | ' "$@" 28 | -------------------------------------------------------------------------------- /scripts/jq/master_events/read: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # @author Couchbase 4 | # @copyright 2016-Present Couchbase, Inc. 5 | # 6 | # Use of this software is governed by the Business Source License included in 7 | # the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 8 | # file, in accordance with the Business Source License, use of this software 9 | # will be governed by the Apache License, Version 2.0, included in the file 10 | # licenses/APL2.txt. 11 | # 12 | # Read master events into a single array of events. 13 | # 14 | 15 | exec jq -s . "$@" 16 | -------------------------------------------------------------------------------- /scripts/jq/stats/cpu: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # @author Couchbase 4 | # @copyright 2016-Present Couchbase, Inc. 5 | # 6 | # Use of this software is governed by the Business Source License included in 7 | # the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 8 | # file, in accordance with the Business Source License, use of this software 9 | # will be governed by the Apache License, Version 2.0, included in the file 10 | # licenses/APL2.txt. 11 | # 12 | # Extract cpu utilization stats from stats archive. 13 | # 14 | # Example usage: 15 | # 16 | # ./cpu --period minute stats_archives.json | jq 'sort_by(.total_cpu)' 17 | # 18 | 19 | PERIOD=hour 20 | ARGS=$(getopt -o p: -l period: -n "$0" -- "$@") 21 | 22 | if [ $? != 0 ]; then 23 | exit 1 24 | fi 25 | 26 | eval set -- "$ARGS" 27 | 28 | while true; do 29 | case "$1" in 30 | -p|--period) PERIOD=$2; shift 2;; 31 | --) shift; break;; 32 | esac 33 | done 34 | 35 | exec jq --arg period "$PERIOD" ' 36 | .["@system-processes"][$period].samples 37 | | map((.sample | with_entries(select(.key | test("cpu_utilization")))) as $cpu 38 | | ($cpu | values | add) as $total 39 | | {ts: .ts, total_cpu: $total, cpu: $cpu}) 40 | ' "$@" 41 | -------------------------------------------------------------------------------- /scripts/purge_tombstones/.gitignore: -------------------------------------------------------------------------------- 1 | /purge_tombstones.erl.str 2 | /purge_tombstones.sh 3 | -------------------------------------------------------------------------------- /scripts/purge_tombstones/GNUmakefile: -------------------------------------------------------------------------------- 1 | SCRIPT_IN = purge_tombstones.sh.in 2 | SCRIPT_OUT = purge_tombstones.sh 3 | 4 | ERL_MODULE = purge_tombstones.erl 5 | ERL_MODULE_STRING = purge_tombstones.erl.str 6 | 7 | all: ${SCRIPT_OUT} 8 | 9 | define ERL_SCRIPT 10 | {ok, C} = file:read_file("$(ERL_MODULE)"), 11 | io:format("~p~n", [binary_to_list(C)]), 12 | erlang:halt(0). 13 | endef 14 | 15 | export ERL_SCRIPT 16 | 17 | ${ERL_MODULE_STRING}: ${ERL_MODULE} 18 | erl -noshell -eval "$$ERL_SCRIPT" > "$@" 19 | 20 | define SED_SCRIPT 21 | /^__MODULE__$$/ { 22 | r ${ERL_MODULE_STRING} 23 | d 24 | } 25 | s/^__GENERATED__$$/# This file is auto-generated. Do not edit./g 26 | endef 27 | 28 | export SED_SCRIPT 29 | 30 | ${SCRIPT_OUT}: ${SCRIPT_IN} ${ERL_MODULE_STRING} 31 | sed "$$SED_SCRIPT" "${SCRIPT_IN}" > "$@" 32 | chmod +x "$@" 33 | 34 | .PHONY: clean 35 | clean: 36 | rm -f "${SCRIPT_OUT}" "${ERL_MODULE_STRING}" 37 | 38 | .PHONY: check_syntax 39 | check_syntax: 40 | erlc +strong_validation "${ERL_MODULE}" 41 | -------------------------------------------------------------------------------- /scripts/reformat-master-events.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # 3 | # @author Couchbase 4 | # @copyright 2012-Present Couchbase, Inc. 5 | # 6 | # Use of this software is governed by the Business Source License included in 7 | # the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 8 | # file, in accordance with the Business Source License, use of this software 9 | # will be governed by the Apache License, Version 2.0, included in the file 10 | # licenses/APL2.txt. 11 | 12 | # we're going to try to rely on ruby 1.9+ ordered hashes 13 | 14 | require 'json' 15 | require 'pp' 16 | 17 | # ev = JSON.parse(<","node":"n_3@10.17.30.106","bucket":"default","chainBefore":["n_3@10.17.30.106"],"chainAfter":["10.17.30.106:11997"]} 19 | # HERE 20 | 21 | def reformat_ev(ev) 22 | new_ev = {} 23 | %w[type ts vbucket node pid].each do |k| 24 | new_ev[k] = ev[k] if ev.has_key? k 25 | end 26 | new_ev.update(ev) 27 | new_ev 28 | end 29 | 30 | # pp ev 31 | # pp reformat_ev(ev) 32 | 33 | STDIN.each_line do |l| 34 | puts reformat_ev(JSON.parse(l)).to_json 35 | end 36 | -------------------------------------------------------------------------------- /scripts/tag: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # @author Couchbase 4 | # @copyright 2018-Present Couchbase, Inc. 5 | # 6 | # Use of this software is governed by the Business Source License included in 7 | # the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that 8 | # file, in accordance with the Business Source License, use of this software 9 | # will be governed by the Apache License, Version 2.0, included in the file 10 | # licenses/APL2.txt. 11 | 12 | TAG="$1" 13 | COMMIT="$2" 14 | 15 | DATE=$(git show -s --pretty=format:%cD "$COMMIT" 2>/dev/null) 16 | if [ $? -ne 0 ]; then 17 | echo "Failed to get commit's '$COMMIT' date" >&2 18 | exit 1 19 | fi 20 | 21 | echo "Tagging '$COMMIT' with tag '$TAG'. Tag date: $DATE" 22 | 23 | export GIT_COMMITTER_DATE="$DATE" 24 | TAG_OUTPUT=$(git tag -a -m "tagging $TAG" "$TAG" "$COMMIT" 2>&1) 25 | 26 | if [ $? -ne 0 ]; then 27 | echo "FAILED: $TAG_OUTPUT" 28 | else 29 | echo "OK" 30 | fi 31 | --------------------------------------------------------------------------------