From 814561511fdff9874bab7d4f4aff730964b5a28c Mon Sep 17 00:00:00 2001 From: Tom Krouper Date: Wed, 5 Aug 2020 15:47:07 -0700 Subject: [PATCH] Revert "2020-07-29 Update of code" --- ...ocker_test_2.yml => cluster_vtctl_web.yml} | 11 +- .github/workflows/golangci-linter.yml | 23 - ...docker_test_1.yml => misc_test_docker.yml} | 9 +- Makefile | 37 +- build.env | 1 - config/init_db.sql | 2 +- config/mycnf/default.cnf | 1 + config/tablet/default.yaml | 17 +- docker/k8s/orchestrator/Dockerfile | 2 +- docker/local/Dockerfile | 30 - docker/local/install_local_dependencies.sh | 22 - docker/local/run.sh | 3 - docker/mini/Dockerfile | 61 - docker/mini/docker-entry | 132 - docker/mini/install_mini_dependencies.sh | 28 - docker/mini/orchestrator-up.sh | 19 - .../mini/orchestrator-vitess-mini.conf.json | 67 - docker/mini/run.sh | 58 - docker/mini/vtctld-mini-up.sh | 40 - docker/mini/vttablet-mini-up.sh | 90 - docker/orchestrator/build.sh | 8 +- docker/test/run.sh | 2 - examples/are-you-alive/README.md | 8 - examples/are-you-alive/build/dev/Dockerfile | 19 +- examples/are-you-alive/build/dev/reflex.conf | 5 +- .../are-you-alive/build/release/Dockerfile | 3 +- .../are-you-alive/cmd/are-you-alive/main.go | 255 +- examples/are-you-alive/docker-compose.yml | 2 + examples/are-you-alive/go.mod | 9 +- examples/are-you-alive/go.sum | 29 - examples/are-you-alive/pkg/client/client.go | 67 +- examples/operator/101_initial_cluster.yaml | 2 +- examples/operator/pf.sh | 6 +- go.mod | 25 +- go.sum | 122 +- go/cmd/automation_client/automation_client.go | 4 +- go/cmd/mysqlctl/mysqlctl.go | 3 +- go/cmd/vtbackup/vtbackup.go | 20 +- go/cmd/vtcombo/main.go | 2 +- go/cmd/vtctld/schema.go | 9 +- go/cmd/vtgateclienttest/services/echo.go | 4 +- go/cmd/vttablet/healthz.go | 42 + go/cmd/vttablet/status.go | 82 +- go/cmd/vttablet/vttablet.go | 109 +- go/cmd/zkctl/zkctl.go | 3 +- go/cmd/zkctld/zkctld.go | 7 +- go/mysql/binlog_event.go | 2 +- go/mysql/binlog_event_make.go | 2 +- go/mysql/binlog_event_make_test.go | 10 +- go/mysql/binlog_event_mysql56_test.go | 2 +- go/mysql/conn.go | 8 +- go/mysql/constants.go | 8 +- go/mysql/endtoend/client_test.go | 8 +- go/mysql/fakesqldb/server.go | 44 +- go/mysql/filepos_gtid.go | 18 +- go/mysql/flavor.go | 154 +- go/mysql/flavor_filepos.go | 65 +- go/mysql/flavor_filepos_test.go | 25 +- go/mysql/flavor_mariadb.go | 76 +- go/mysql/flavor_mariadb_test.go | 10 +- go/mysql/flavor_mysql.go | 82 +- go/mysql/flavor_mysql_test.go | 30 +- go/mysql/gtid_set.go | 3 - go/mysql/gtid_test.go | 1 - go/mysql/mariadb_gtid.go | 26 +- go/mysql/mariadb_gtid_test.go | 16 - go/mysql/master_status.go | 37 - go/mysql/mysql56_gtid.go | 7 +- go/mysql/mysql56_gtid_set.go | 26 +- go/mysql/mysql56_gtid_set_test.go | 35 - go/mysql/query_test.go | 2 +- go/mysql/replication.go | 16 +- go/mysql/replication_constants.go | 93 +- go/mysql/replication_position.go | 17 - ...{replication_status.go => slave_status.go} | 38 +- ...on_status_test.go => slave_status_test.go} | 44 +- go/sqltypes/bind_variables.go | 16 - .../transform/backup_transform_utils.go | 4 +- .../backup/vtbackup/backup_only_test.go | 22 +- .../backup/vtctlbackup/backup_utils.go | 5 +- go/test/endtoend/cellalias/cell_alias_test.go | 43 +- go/test/endtoend/cluster/cluster_util.go | 19 +- go/test/endtoend/cluster/mysqlctl_process.go | 2 - .../endtoend/cluster/vtctlclient_process.go | 14 +- go/test/endtoend/cluster/vtctld_process.go | 6 +- go/test/endtoend/cluster/vtgate_process.go | 11 +- go/test/endtoend/cluster/vttablet_process.go | 19 +- go/test/endtoend/clustertest/vtctld_test.go | 4 + .../encrypted_replication_test.go | 40 +- .../encrypted_transport_test.go | 93 +- go/test/endtoend/keyspace/keyspace_test.go | 6 +- .../endtoend/recovery/pitr/binlog_server.go | 110 - go/test/endtoend/recovery/pitr/main_test.go | 134 - go/test/endtoend/recovery/pitr/pitr_test.go | 172 - go/test/endtoend/recovery/recovery_util.go | 10 +- .../shardedrecovery/sharded_recovery_test.go | 177 +- .../recovery/unshardedrecovery/recovery.go | 60 +- .../reparent/reparent_range_based_test.go | 19 +- go/test/endtoend/reparent/reparent_test.go | 319 +- go/test/endtoend/sharding/base_sharding.go | 12 +- .../sharding/initialsharding/sharding_util.go | 118 +- .../mergesharding/mergesharding_base.go | 123 +- .../sharding/resharding/resharding_base.go | 29 +- .../verticalsplit/vertical_split_test.go | 183 +- .../tabletgateway/buffer/buffer_test.go | 4 +- .../cellalias/cell_alias_test.go | 12 + .../tabletmanager/custom_rule_topo_test.go | 16 +- .../tabletmanager/lock_unlock_test.go | 14 +- go/test/endtoend/tabletmanager/main_test.go | 12 +- .../tabletmanager/tablet_health_test.go | 301 +- .../tablet_security_policy_test.go | 44 +- go/test/endtoend/tabletmanager/tablet_test.go | 20 +- go/test/endtoend/vreplication/cluster.go | 219 +- go/test/endtoend/vreplication/config.go | 3 - go/test/endtoend/vreplication/helper.go | 2 - .../vreplication/vreplication_test.go | 227 +- .../vreplication/vreplication_test_env.go | 20 +- .../vtctldweb/vtctld_web_main_test.go | 15 +- go/test/endtoend/vtgate/buffer/buffer_test.go | 43 +- go/test/endtoend/vtgate/get_lock_test.go | 230 - go/test/endtoend/vtgate/main_test.go | 44 - go/test/endtoend/vtgate/misc_test.go | 183 - go/test/endtoend/vtgate/schema/schema_test.go | 2 +- .../endtoend/vtgate/setstatement/main_test.go | 9 - .../vtgate/setstatement/sysvar_test.go | 209 +- go/test/utils/sort.go | 13 - go/timer/timer.go | 6 - go/timer/timer_flaky_test.go | 50 +- go/trace/opentracing.go | 25 +- go/trace/opentracing_test.go | 18 +- go/vt/binlog/binlog_streamer.go | 6 +- go/vt/binlog/binlogplayer/framework_test.go | 8 +- go/vt/binlog/keyrange_filter.go | 6 +- ...nlog_connection.go => slave_connection.go} | 66 +- go/vt/binlog/updatestreamctl.go | 22 +- go/vt/dbconfigs/dbconfigs.go | 12 - go/vt/discovery/fake_healthcheck.go | 64 +- go/vt/discovery/healthcheck.go | 71 +- go/vt/discovery/healthcheck_test.go | 199 +- go/vt/discovery/legacy_healthcheck.go | 6 +- .../legacy_healthcheck_flaky_test.go | 20 +- .../legacy_tablet_stats_cache_test.go | 14 +- go/vt/discovery/tablet_health_check.go | 3 +- go/vt/discovery/tablet_picker.go | 125 +- go/vt/discovery/tablet_picker_test.go | 300 +- go/vt/grpcclient/client.go | 2 +- go/vt/health/health.go | 175 + go/vt/health/health_test.go | 59 + go/vt/mysqlctl/azblobbackupstorage/azblob.go | 19 +- go/vt/mysqlctl/backup.go | 6 +- go/vt/mysqlctl/backupstorage/interface.go | 5 - go/vt/mysqlctl/builtinbackupengine.go | 66 +- go/vt/mysqlctl/cephbackupstorage/ceph.go | 19 +- .../fakemysqldaemon/fakemysqldaemon.go | 138 +- go/vt/mysqlctl/filebackupstorage/file.go | 17 - go/vt/mysqlctl/gcsbackupstorage/gcs.go | 17 - go/vt/mysqlctl/grpcmysqlctlclient/client.go | 2 +- go/vt/mysqlctl/metadata_tables.go | 2 +- go/vt/mysqlctl/mycnf.go | 5 + go/vt/mysqlctl/mycnf_flag.go | 3 + go/vt/mysqlctl/mycnf_gen.go | 1 + go/vt/mysqlctl/mycnf_test.go | 2 - go/vt/mysqlctl/mysql_daemon.go | 25 +- go/vt/mysqlctl/mysqld.go | 4 +- go/vt/mysqlctl/reparent.go | 7 +- go/vt/mysqlctl/replication.go | 180 +- go/vt/mysqlctl/rice-box.go | 84 +- go/vt/mysqlctl/s3backupstorage/retryer.go | 4 +- .../mysqlctl/s3backupstorage/retryer_test.go | 94 - go/vt/mysqlctl/s3backupstorage/s3.go | 22 +- go/vt/mysqlctl/s3backupstorage/s3_test.go | 43 - go/vt/mysqlctl/tmutils/permissions.go | 2 +- go/vt/mysqlctl/tmutils/schema_test.go | 2 +- go/vt/mysqlctl/xtrabackupengine.go | 2 +- go/vt/proto/binlogdata/binlogdata.pb.go | 264 +- go/vt/proto/query/query.pb.go | 398 +- .../replicationdata/replicationdata.pb.go | 245 +- .../tabletmanagerdata/tabletmanagerdata.pb.go | 1974 ++-- .../tabletmanagerservice.pb.go | 889 +- go/vt/proto/throttlerdata/throttlerdata.pb.go | 6 +- go/vt/proto/topodata/topodata.pb.go | 2 +- go/vt/proto/vtgate/vtgate.pb.go | 169 +- go/vt/schemamanager/schemamanager.go | 2 +- go/vt/schemamanager/schemamanager_test.go | 10 +- go/vt/schemamanager/tablet_executor.go | 10 +- go/vt/schemamanager/tablet_executor_test.go | 8 +- go/vt/sqlparser/analyzer.go | 39 - go/vt/sqlparser/ast.go | 73 +- go/vt/sqlparser/ast_funcs.go | 33 +- go/vt/sqlparser/comments.go | 46 - go/vt/sqlparser/comments_test.go | 55 - go/vt/sqlparser/impossible_query.go | 5 +- go/vt/sqlparser/normalizer.go | 3 - go/vt/sqlparser/parse_test.go | 80 +- go/vt/sqlparser/precedence.go | 4 +- go/vt/sqlparser/precedence_test.go | 4 +- go/vt/sqlparser/random_expr.go | 10 - go/vt/sqlparser/rewriter.go | 63 +- go/vt/sqlparser/sql.go | 7997 ++++++++--------- go/vt/sqlparser/sql.y | 123 +- go/vt/sqlparser/token.go | 6 +- go/vt/srvtopo/resolver.go | 5 - go/vt/tableacl/tableacl.go | 23 + go/vt/tableacl/tableacl_test.go | 47 + go/vt/throttler/max_replication_lag_module.go | 46 +- .../max_replication_lag_module_config.go | 2 +- .../max_replication_lag_module_test.go | 12 +- go/vt/throttler/memory_test.go | 42 +- go/vt/throttler/result.go | 14 +- go/vt/throttler/result_test.go | 126 +- go/vt/throttler/throttlerlogz.go | 8 +- go/vt/throttler/throttlerz.go | 15 +- go/vt/topo/cells_aliases.go | 22 - go/vt/topo/consultopo/server.go | 2 +- go/vt/topo/consultopo/server_flaky_test.go | 23 +- go/vt/topo/etcd2topo/lock.go | 5 +- go/vt/topo/etcd2topo/server_test.go | 12 +- go/vt/topo/helpers/copy_test.go | 16 +- .../clientset/versioned/fake/register.go | 2 +- go/vt/topo/k8stopo/server.go | 2 +- go/vt/topo/shard.go | 7 +- go/vt/topo/tablet.go | 17 +- go/vt/topo/test/tablet.go | 3 +- go/vt/topo/topoproto/tablet.go | 56 +- go/vt/topo/vschema.go | 6 +- go/vt/topo/zk2topo/lock.go | 5 +- go/vt/topotools/rebuild_keyspace.go | 2 + go/vt/topotools/shard_test.go | 2 +- go/vt/topotools/utils.go | 10 +- go/vt/vtcombo/tablet_map.go | 200 +- go/vt/vtctl/backup.go | 2 +- go/vt/vtctl/query.go | 11 +- go/vt/vtctl/reparent.go | 38 +- go/vt/vtctl/vtctl.go | 291 +- go/vt/vtctl/vtctlclienttest/client.go | 3 +- go/vt/vtctld/api.go | 10 +- go/vt/vtctld/rice-box.go | 74 +- go/vt/vtctld/tablet_data_test.go | 24 +- go/vt/vterrors/aggregate.go | 3 - .../multi-output/deletesharded-output.txt | 10 +- .../multi-output/insertsharded-output.txt | 4 + .../multi-output/selectsharded-output.txt | 8 +- .../testdata/multi-output/target-output.txt | 2 + .../multi-output/unsharded-output.txt | 4 + .../multi-output/updatesharded-output.txt | 6 +- .../twopc-output/deletesharded-output.txt | 2 +- .../twopc-output/selectsharded-output.txt | 7 +- go/vt/vtexplain/vtexplain_flaky_test.go | 24 +- go/vt/vtexplain/vtexplain_topo.go | 4 +- go/vt/vtexplain/vtexplain_vtgate.go | 19 +- go/vt/vtexplain/vtexplain_vttablet.go | 79 +- go/vt/vtexplain/vtexplain_vttablet_test.go | 1 - go/vt/vtgate/api.go | 2 +- go/vt/vtgate/autocommit_test.go | 144 +- go/vt/vtgate/discoverygateway.go | 2 +- go/vt/vtgate/discoverygateway_test.go | 18 +- .../vtgate/endtoend/deletetest/delete_test.go | 7 +- go/vt/vtgate/endtoend/vstream_test.go | 53 - go/vt/vtgate/engine/concatenate.go | 209 - go/vt/vtgate/engine/concatenate_test.go | 250 - go/vt/vtgate/engine/delete_test.go | 2 +- go/vt/vtgate/engine/fake_vcursor_test.go | 49 +- go/vt/vtgate/engine/insert_test.go | 19 +- go/vt/vtgate/engine/join.go | 2 +- go/vt/vtgate/engine/join_test.go | 120 +- go/vt/vtgate/engine/memory_sort.go | 2 +- go/vt/vtgate/engine/memory_sort_test.go | 70 +- go/vt/vtgate/engine/primitive.go | 21 +- go/vt/vtgate/engine/reserve.go | 78 - go/vt/vtgate/engine/route_test.go | 46 +- go/vt/vtgate/engine/set.go | 101 +- go/vt/vtgate/engine/set_test.go | 99 +- go/vt/vtgate/engine/update_test.go | 2 +- go/vt/vtgate/executor.go | 102 +- go/vt/vtgate/executor_dml_test.go | 171 +- go/vt/vtgate/executor_framework_test.go | 65 +- go/vt/vtgate/executor_scatter_stats_test.go | 6 +- go/vt/vtgate/executor_select_test.go | 253 +- go/vt/vtgate/executor_set_test.go | 136 +- go/vt/vtgate/executor_stream_test.go | 2 +- go/vt/vtgate/executor_test.go | 327 +- go/vt/vtgate/executor_vschema_ddl_test.go | 16 +- go/vt/vtgate/legacy_scatter_conn_test.go | 629 -- go/vt/vtgate/plan_execute.go | 20 - go/vt/vtgate/planbuilder/builder.go | 6 +- go/vt/vtgate/planbuilder/concatenate.go | 124 - go/vt/vtgate/planbuilder/join.go | 10 - go/vt/vtgate/planbuilder/limit.go | 5 - go/vt/vtgate/planbuilder/memory_sort.go | 5 - go/vt/vtgate/planbuilder/merge_sort.go | 10 +- go/vt/vtgate/planbuilder/ordered_aggregate.go | 5 - go/vt/vtgate/planbuilder/plan_test.go | 19 +- go/vt/vtgate/planbuilder/pullout_subquery.go | 10 - go/vt/vtgate/planbuilder/route.go | 11 +- go/vt/vtgate/planbuilder/route_option.go | 1 - go/vt/vtgate/planbuilder/select.go | 42 +- go/vt/vtgate/planbuilder/set.go | 278 +- go/vt/vtgate/planbuilder/subquery.go | 5 - .../planbuilder/testdata/lock_cases.txt | 19 - .../vtgate/planbuilder/testdata/set_cases.txt | 61 - .../planbuilder/testdata/set_sysvar_cases.txt | 30 +- .../testdata/transaction_cases.txt | 48 - .../planbuilder/testdata/union_cases.txt | 282 - .../testdata/unsupported_cases.txt | 48 +- go/vt/vtgate/planbuilder/union.go | 88 +- go/vt/vtgate/planbuilder/vindex_func.go | 5 - go/vt/vtgate/queryz_test.go | 2 +- go/vt/vtgate/resolver.go | 21 +- go/vt/vtgate/safe_session.go | 128 +- go/vt/vtgate/safe_session_test.go | 68 - go/vt/vtgate/scatter_conn.go | 269 +- go/vt/vtgate/scatter_conn_test.go | 773 +- go/vt/vtgate/tabletgateway.go | 72 +- go/vt/vtgate/tx_conn.go | 89 +- go/vt/vtgate/tx_conn_test.go | 591 +- go/vt/vtgate/vcursor_impl.go | 81 +- go/vt/vtgate/vcursor_impl_test.go | 139 +- go/vt/vtgate/vindexes/consistent_lookup.go | 8 - .../vtgate/vindexes/consistent_lookup_test.go | 45 +- go/vt/vtgate/vindexes/lookup.go | 8 - go/vt/vtgate/vindexes/lookup_hash.go | 8 - go/vt/vtgate/vindexes/lookup_hash_test.go | 6 +- .../vindexes/lookup_hash_unique_test.go | 6 +- go/vt/vtgate/vindexes/lookup_internal.go | 53 +- go/vt/vtgate/vindexes/lookup_test.go | 39 +- .../vindexes/lookup_unicodeloosemd5_hash.go | 8 - .../lookup_unicodeloosemd5_hash_test.go | 28 +- go/vt/vtgate/vindexes/lookup_unique_test.go | 2 +- go/vt/vtgate/vschema_manager.go | 2 - go/vt/vtgate/vstream_manager.go | 2 +- go/vt/vtgate/vstream_manager_test.go | 24 +- go/vt/vtgate/vtgate.go | 7 +- .../test_agent_rpc.go} | 690 +- go/vt/vttablet/endtoend/config_test.go | 3 - go/vt/vttablet/endtoend/framework/client.go | 103 +- go/vt/vttablet/endtoend/framework/server.go | 3 +- go/vt/vttablet/endtoend/misc_test.go | 37 +- go/vt/vttablet/endtoend/reserve_test.go | 807 -- go/vt/vttablet/endtoend/savepoint_test.go | 157 - go/vt/vttablet/endtoend/vstreamer_test.go | 149 +- go/vt/vttablet/faketmclient/fake_client.go | 122 +- go/vt/vttablet/filelogger/filelogger.go | 2 +- go/vt/vttablet/filelogger/filelogger_test.go | 3 - go/vt/vttablet/grpcqueryservice/server.go | 79 +- go/vt/vttablet/grpctabletconn/conn.go | 115 +- go/vt/vttablet/grpctmclient/client.go | 261 +- go/vt/vttablet/grpctmserver/server.go | 336 +- go/vt/vttablet/grpctmserver/server_test.go | 8 +- go/vt/vttablet/heartbeat/heartbeat.go | 49 + .../repltracker => heartbeat}/reader.go | 61 +- .../repltracker => heartbeat}/reader_test.go | 13 +- .../repltracker => heartbeat}/writer.go | 129 +- go/vt/vttablet/heartbeat/writer_test.go | 119 + .../fakes/stream_health_query_service.go | 2 +- go/vt/vttablet/queryservice/queryservice.go | 14 +- go/vt/vttablet/queryservice/wrapped.go | 70 +- go/vt/vttablet/sandboxconn/sandboxconn.go | 117 +- .../tabletconntest/fakequeryservice.go | 38 +- .../vttablet/tabletconntest/tabletconntest.go | 30 +- go/vt/vttablet/tabletmanager/action_agent.go | 903 ++ go/vt/vttablet/tabletmanager/healthcheck.go | 360 + .../tabletmanager/healthcheck_test.go | 1061 +++ .../tabletmanager/heartbeat_reporter.go | 57 + go/vt/vttablet/tabletmanager/init_tablet.go | 270 + .../tabletmanager/init_tablet_test.go | 350 + .../vttablet/tabletmanager/initial_rebuild.go | 53 + go/vt/vttablet/tabletmanager/orchestrator.go | 10 +- .../tabletmanager/replication_reporter.go | 167 + .../replication_reporter_test.go | 112 + go/vt/vttablet/tabletmanager/replmanager.go | 185 - .../tabletmanager/replmanager_test.go | 80 - go/vt/vttablet/tabletmanager/restore.go | 287 +- go/vt/vttablet/tabletmanager/rpc_actions.go | 99 +- go/vt/vttablet/tabletmanager/rpc_agent.go | 49 +- go/vt/vttablet/tabletmanager/rpc_backup.go | 70 +- .../vttablet/tabletmanager/rpc_lock_tables.go | 62 +- go/vt/vttablet/tabletmanager/rpc_query.go | 16 +- .../vttablet/tabletmanager/rpc_replication.go | 638 +- go/vt/vttablet/tabletmanager/rpc_schema.go | 34 +- go/vt/vttablet/tabletmanager/rpc_server.go | 51 +- go/vt/vttablet/tabletmanager/shard_sync.go | 106 +- go/vt/vttablet/tabletmanager/state_change.go | 438 + .../tabletmanager/state_change_test.go | 72 + go/vt/vttablet/tabletmanager/tm_init.go | 677 -- go/vt/vttablet/tabletmanager/tm_init_test.go | 473 - go/vt/vttablet/tabletmanager/tm_state.go | 392 - go/vt/vttablet/tabletmanager/tm_state_test.go | 245 - .../{rpc_vreplication.go => vreplication.go} | 8 +- .../tabletmanager/vreplication/controller.go | 18 +- .../vreplication/controller_test.go | 11 +- .../tabletmanager/vreplication/engine.go | 227 +- .../tabletmanager/vreplication/engine_test.go | 153 +- .../vreplication/external_connector.go | 6 +- .../vreplication/framework_test.go | 12 +- .../vreplication/journal_test.go | 1 + .../vreplication/replica_connector.go | 100 - .../tabletmanager/vreplication/vplayer.go | 35 +- .../vreplication/vplayer_flaky_test.go | 64 +- .../tabletmanager/vreplication/vreplicator.go | 18 +- go/vt/vttablet/tabletserver/bench_test.go | 28 +- .../vttablet/tabletserver/connpool/dbconn.go | 9 - go/vt/vttablet/tabletserver/connpool/pool.go | 4 +- go/vt/vttablet/tabletserver/controller.go | 11 +- .../vttablet/tabletserver/health_streamer.go | 182 - .../tabletserver/health_streamer_test.go | 135 - .../vttablet/tabletserver/messager/engine.go | 13 +- .../tabletserver/planbuilder/permission.go | 2 - .../vttablet/tabletserver/planbuilder/plan.go | 54 +- .../tabletserver/planbuilder/plan_test.go | 75 +- .../planbuilder/testdata/exec_cases.txt | 4 + .../testdata/pool_unsafe_cases.txt | 23 - .../planbuilder/testdata/stream_cases.txt | 2 +- go/vt/vttablet/tabletserver/query_engine.go | 47 +- .../tabletserver/query_engine_test.go | 18 +- go/vt/vttablet/tabletserver/query_executor.go | 39 +- .../tabletserver/query_executor_test.go | 71 +- go/vt/vttablet/tabletserver/querylogz.go | 2 - go/vt/vttablet/tabletserver/querylogz_test.go | 4 - ...nlog_watcher.go => replication_watcher.go} | 64 +- .../tabletserver/replication_watcher_test.go | 161 + .../tabletserver/repltracker/poller.go | 59 - .../tabletserver/repltracker/poller_test.go | 53 - .../tabletserver/repltracker/repltracker.go | 126 - .../repltracker/repltracker_test.go | 96 - .../tabletserver/repltracker/writer_test.go | 110 - go/vt/vttablet/tabletserver/schema/engine.go | 133 +- .../tabletserver/schema/engine_test.go | 8 +- .../vttablet/tabletserver/schema/historian.go | 283 +- .../tabletserver/schema/historian_test.go | 54 +- go/vt/vttablet/tabletserver/schema/tracker.go | 235 +- .../tabletserver/schema/tracker_test.go | 128 +- go/vt/vttablet/tabletserver/state_manager.go | 713 -- .../tabletserver/state_manager_test.go | 739 -- .../tabletserver/stateful_connection.go | 115 +- .../tabletserver/stateful_connection_pool.go | 18 +- .../stateful_connection_pool_test.go | 17 +- go/vt/vttablet/tabletserver/status.go | 134 +- .../vttablet/tabletserver/tabletenv/config.go | 101 +- .../tabletserver/tabletenv/config_test.go | 171 - .../tabletserver/tabletenv/logstats.go | 1 - .../tabletserver/tabletenv/seconds.go | 41 - .../tabletserver/tabletenv/seconds_test.go | 52 - .../vttablet/tabletserver/tabletenv/stats.go | 10 +- go/vt/vttablet/tabletserver/tabletserver.go | 946 +- .../tabletserver/tabletserver_test.go | 1178 ++- go/vt/vttablet/tabletserver/twopc.go | 71 +- go/vt/vttablet/tabletserver/tx/api.go | 67 +- go/vt/vttablet/tabletserver/tx_engine.go | 194 +- go/vt/vttablet/tabletserver/tx_engine_test.go | 179 +- go/vt/vttablet/tabletserver/tx_executor.go | 16 +- .../vttablet/tabletserver/tx_executor_test.go | 2 +- go/vt/vttablet/tabletserver/tx_pool.go | 84 +- go/vt/vttablet/tabletserver/tx_pool_test.go | 46 +- go/vt/vttablet/tabletserver/tx_prep_pool.go | 18 +- .../tabletserver/txthrottler/tx_throttler.go | 17 +- .../txthrottler/tx_throttler_test.go | 12 +- go/vt/vttablet/tabletserver/vstreamer/copy.go | 11 +- .../vttablet/tabletserver/vstreamer/engine.go | 62 +- .../tabletserver/vstreamer/main_test.go | 55 +- .../tabletserver/vstreamer/rowstreamer.go | 18 +- .../tabletserver/vstreamer/testenv/testenv.go | 3 - .../tabletserver/vstreamer/uvstreamer.go | 41 +- .../tabletserver/vstreamer/uvstreamer_test.go | 76 +- .../tabletserver/vstreamer/vstreamer.go | 49 +- .../tabletserver/vstreamer/vstreamer_test.go | 153 +- go/vt/vttablet/tabletservermock/controller.go | 43 +- go/vt/vttablet/tmclient/rpc_client_api.go | 78 +- go/vt/withddl/withddl.go | 143 - go/vt/withddl/withddl_test.go | 284 - go/vt/worker/diff_utils.go | 36 +- go/vt/worker/legacy_split_clone.go | 6 +- go/vt/worker/legacy_split_clone_test.go | 2 +- go/vt/worker/multi_split_diff.go | 28 +- go/vt/worker/split_clone.go | 6 +- go/vt/worker/split_clone_flaky_test.go | 4 +- go/vt/worker/split_diff.go | 22 +- go/vt/worker/topo_utils.go | 4 +- go/vt/worker/vertical_split_diff.go | 22 +- .../mock_resharding_wrangler_test.go | 10 +- .../resharding/resharding_wrangler.go | 6 +- go/vt/workflow/resharding/tasks.go | 2 +- go/vt/workflow/resharding/workflow.go | 4 +- go/vt/workflow/resharding/workflow_test.go | 4 +- .../reshardingworkflowgen/workflow.go | 4 +- go/vt/wrangler/cleaner.go | 22 +- go/vt/wrangler/fake_tablet_test.go | 48 +- go/vt/wrangler/keyspace.go | 2 +- go/vt/wrangler/materializer.go | 40 +- go/vt/wrangler/materializer_test.go | 73 - go/vt/wrangler/permissions.go | 4 +- go/vt/wrangler/reparent.go | 134 +- go/vt/wrangler/resharder.go | 12 +- go/vt/wrangler/resharder_test.go | 109 +- go/vt/wrangler/schema.go | 28 +- go/vt/wrangler/stream_migrater_test.go | 2 +- go/vt/wrangler/switcher.go | 4 +- go/vt/wrangler/switcher_dry_run.go | 6 +- go/vt/wrangler/switcher_interface.go | 2 +- go/vt/wrangler/tablet.go | 14 +- go/vt/wrangler/testlib/backup_test.go | 16 +- .../testlib/emergency_reparent_shard_test.go | 1 - .../testlib/external_reparent_test.go | 55 +- go/vt/wrangler/testlib/fake_tablet.go | 52 +- go/vt/wrangler/testlib/find_tablet_test.go | 16 +- .../testlib/init_shard_master_test.go | 317 + .../testlib/migrate_served_from_test.go | 8 +- .../testlib/migrate_served_types_test.go | 48 +- .../testlib/planned_reparent_shard_test.go | 77 +- go/vt/wrangler/testlib/reparent_utils_test.go | 49 +- go/vt/wrangler/testlib/semi_sync_test.go | 2 +- go/vt/wrangler/testlib/shard_test.go | 10 +- go/vt/wrangler/testlib/version_test.go | 2 +- go/vt/wrangler/traffic_switcher.go | 39 +- go/vt/wrangler/traffic_switcher_env_test.go | 14 +- go/vt/wrangler/traffic_switcher_test.go | 37 +- go/vt/wrangler/validator.go | 32 +- go/vt/wrangler/vdiff.go | 12 +- go/vt/wrangler/vdiff_test.go | 18 +- go/vt/wrangler/version.go | 8 +- go/vt/wrangler/vexec.go | 399 - go/vt/wrangler/vexec_plan.go | 205 - go/vt/wrangler/vexec_test.go | 373 - go/vt/wrangler/wrangler_env_test.go | 307 - go/vtbench/client.go | 2 +- helm/vitess/CHANGELOG.md | 2 +- java/client/pom.xml | 2 +- .../java/io/vitess/client/RpcClientTest.java | 4 +- java/example/pom.xml | 2 +- java/grpc-client/pom.xml | 2 +- java/jdbc/pom.xml | 2 +- java/pom.xml | 4 +- misc/git/hooks/golangci-lint | 21 +- misc/git/hooks/staticcheck | 70 + misc/git/ps1 | 0 proto/binlogdata.proto | 5 +- proto/query.proto | 5 +- proto/replicationdata.proto | 35 +- proto/tabletmanagerdata.proto | 163 +- proto/tabletmanagerservice.proto | 77 +- proto/throttlerdata.proto | 6 +- proto/topodata.proto | 2 +- proto/vtgate.proto | 7 - sonar-project.properties | 4 +- test/bin/rippled | Bin 6604008 -> 0 bytes test/config.json | 13 +- tools/all_test_for_coverage.sh | 2 +- tools/dependency_check.sh | 7 +- tools/statsd.go | 2 + tools/web_bootstrap.sh | 55 - tools/web_build.sh | 36 - web/vtctld2/README.md | 60 +- web/vtctld2/app/index.html | 2 +- web/vtctld2/app/inline.js | 2 +- ...js => main.3a2141f06032f2bc1229.bundle.js} | 10 +- ...=> main.3a2141f06032f2bc1229.bundle.js.gz} | Bin 367057 -> 367066 bytes web/vtctld2/package.json | 4 +- web/vtctld2/proxy.conf.json | 7 - .../src/app/dashboard/shard.component.html | 2 +- .../src/app/dashboard/shard.component.ts | 20 +- .../src/app/dashboard/tablet.component.ts | 12 +- 560 files changed, 19580 insertions(+), 31839 deletions(-) rename .github/workflows/{docker_test_2.yml => cluster_vtctl_web.yml} (58%) delete mode 100644 .github/workflows/golangci-linter.yml rename .github/workflows/{docker_test_1.yml => misc_test_docker.yml} (62%) delete mode 100644 docker/local/Dockerfile delete mode 100755 docker/local/install_local_dependencies.sh delete mode 100755 docker/local/run.sh delete mode 100644 docker/mini/Dockerfile delete mode 100755 docker/mini/docker-entry delete mode 100755 docker/mini/install_mini_dependencies.sh delete mode 100755 docker/mini/orchestrator-up.sh delete mode 100644 docker/mini/orchestrator-vitess-mini.conf.json delete mode 100755 docker/mini/run.sh delete mode 100755 docker/mini/vtctld-mini-up.sh delete mode 100755 docker/mini/vttablet-mini-up.sh create mode 100644 go/cmd/vttablet/healthz.go delete mode 100644 go/mysql/master_status.go rename go/mysql/{replication_status.go => slave_status.go} (77%) rename go/mysql/{replication_status_test.go => slave_status_test.go} (64%) delete mode 100644 go/test/endtoend/recovery/pitr/binlog_server.go delete mode 100644 go/test/endtoend/recovery/pitr/main_test.go delete mode 100644 go/test/endtoend/recovery/pitr/pitr_test.go delete mode 100644 go/test/endtoend/vtgate/get_lock_test.go delete mode 100644 go/test/utils/sort.go rename go/vt/binlog/{binlog_connection.go => slave_connection.go} (78%) create mode 100644 go/vt/health/health.go create mode 100644 go/vt/health/health_test.go delete mode 100644 go/vt/mysqlctl/s3backupstorage/retryer_test.go delete mode 100644 go/vt/mysqlctl/s3backupstorage/s3_test.go delete mode 100644 go/vt/vtgate/engine/concatenate.go delete mode 100644 go/vt/vtgate/engine/concatenate_test.go delete mode 100644 go/vt/vtgate/engine/reserve.go delete mode 100644 go/vt/vtgate/legacy_scatter_conn_test.go delete mode 100644 go/vt/vtgate/planbuilder/concatenate.go delete mode 100644 go/vt/vtgate/planbuilder/testdata/lock_cases.txt delete mode 100644 go/vt/vtgate/planbuilder/testdata/transaction_cases.txt delete mode 100644 go/vt/vtgate/planbuilder/testdata/union_cases.txt delete mode 100644 go/vt/vtgate/safe_session_test.go rename go/vt/vttablet/{tmrpctest/test_tm_rpc.go => agentrpctest/test_agent_rpc.go} (55%) delete mode 100644 go/vt/vttablet/endtoend/reserve_test.go delete mode 100644 go/vt/vttablet/endtoend/savepoint_test.go create mode 100644 go/vt/vttablet/heartbeat/heartbeat.go rename go/vt/vttablet/{tabletserver/repltracker => heartbeat}/reader.go (76%) rename go/vt/vttablet/{tabletserver/repltracker => heartbeat}/reader_test.go (90%) rename go/vt/vttablet/{tabletserver/repltracker => heartbeat}/writer.go (53%) create mode 100644 go/vt/vttablet/heartbeat/writer_test.go create mode 100644 go/vt/vttablet/tabletmanager/action_agent.go create mode 100644 go/vt/vttablet/tabletmanager/healthcheck.go create mode 100644 go/vt/vttablet/tabletmanager/healthcheck_test.go create mode 100644 go/vt/vttablet/tabletmanager/heartbeat_reporter.go create mode 100644 go/vt/vttablet/tabletmanager/init_tablet.go create mode 100644 go/vt/vttablet/tabletmanager/init_tablet_test.go create mode 100644 go/vt/vttablet/tabletmanager/initial_rebuild.go create mode 100644 go/vt/vttablet/tabletmanager/replication_reporter.go create mode 100644 go/vt/vttablet/tabletmanager/replication_reporter_test.go delete mode 100644 go/vt/vttablet/tabletmanager/replmanager.go delete mode 100644 go/vt/vttablet/tabletmanager/replmanager_test.go create mode 100644 go/vt/vttablet/tabletmanager/state_change.go create mode 100644 go/vt/vttablet/tabletmanager/state_change_test.go delete mode 100644 go/vt/vttablet/tabletmanager/tm_init.go delete mode 100644 go/vt/vttablet/tabletmanager/tm_init_test.go delete mode 100644 go/vt/vttablet/tabletmanager/tm_state.go delete mode 100644 go/vt/vttablet/tabletmanager/tm_state_test.go rename go/vt/vttablet/tabletmanager/{rpc_vreplication.go => vreplication.go} (75%) delete mode 100644 go/vt/vttablet/tabletmanager/vreplication/replica_connector.go delete mode 100644 go/vt/vttablet/tabletserver/health_streamer.go delete mode 100644 go/vt/vttablet/tabletserver/health_streamer_test.go delete mode 100644 go/vt/vttablet/tabletserver/planbuilder/testdata/pool_unsafe_cases.txt rename go/vt/vttablet/tabletserver/{binlog_watcher.go => replication_watcher.go} (51%) create mode 100644 go/vt/vttablet/tabletserver/replication_watcher_test.go delete mode 100644 go/vt/vttablet/tabletserver/repltracker/poller.go delete mode 100644 go/vt/vttablet/tabletserver/repltracker/poller_test.go delete mode 100644 go/vt/vttablet/tabletserver/repltracker/repltracker.go delete mode 100644 go/vt/vttablet/tabletserver/repltracker/repltracker_test.go delete mode 100644 go/vt/vttablet/tabletserver/repltracker/writer_test.go delete mode 100644 go/vt/vttablet/tabletserver/state_manager.go delete mode 100644 go/vt/vttablet/tabletserver/state_manager_test.go delete mode 100644 go/vt/vttablet/tabletserver/tabletenv/seconds.go delete mode 100644 go/vt/vttablet/tabletserver/tabletenv/seconds_test.go delete mode 100644 go/vt/withddl/withddl.go delete mode 100644 go/vt/withddl/withddl_test.go create mode 100644 go/vt/wrangler/testlib/init_shard_master_test.go delete mode 100644 go/vt/wrangler/vexec.go delete mode 100644 go/vt/wrangler/vexec_plan.go delete mode 100644 go/vt/wrangler/vexec_test.go delete mode 100644 go/vt/wrangler/wrangler_env_test.go create mode 100755 misc/git/hooks/staticcheck mode change 100755 => 100644 misc/git/ps1 delete mode 100755 test/bin/rippled delete mode 100755 tools/web_bootstrap.sh delete mode 100755 tools/web_build.sh rename web/vtctld2/app/{main.9a3d6a925af135b7c609.bundle.js => main.3a2141f06032f2bc1229.bundle.js} (95%) rename web/vtctld2/app/{main.9a3d6a925af135b7c609.bundle.js.gz => main.3a2141f06032f2bc1229.bundle.js.gz} (55%) delete mode 100644 web/vtctld2/proxy.conf.json diff --git a/.github/workflows/docker_test_2.yml b/.github/workflows/cluster_vtctl_web.yml similarity index 58% rename from .github/workflows/docker_test_2.yml rename to .github/workflows/cluster_vtctl_web.yml index 81433ea58a7..82597559b0e 100644 --- a/.github/workflows/docker_test_2.yml +++ b/.github/workflows/cluster_vtctl_web.yml @@ -1,11 +1,10 @@ -name: docker test 2 +name: cluster_vtctl_web on: [push, pull_request] jobs: build: - name: Docker Test 2 + name: cluster vtctl web runs-on: ubuntu-latest - steps: - name: Set up Go @@ -16,6 +15,8 @@ jobs: - name: Check out code uses: actions/checkout@v2 - - name: Run tests which requires docker - 2 + - name: Run vtctl web run: | - go run test.go -docker=true --follow -shard 25 \ No newline at end of file + # Running web test inside docker + go run test.go -docker=true -print-log -shard 10 + diff --git a/.github/workflows/golangci-linter.yml b/.github/workflows/golangci-linter.yml deleted file mode 100644 index 0862c6fed3e..00000000000 --- a/.github/workflows/golangci-linter.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: golangci-lint -on: [push,pull_request] -jobs: - - build: - name: Build - runs-on: ubuntu-latest - steps: - - - name: Set up Go 1.13 - uses: actions/setup-go@v1 - with: - go-version: 1.13 - id: go - - - name: Check out code into the Go module directory - uses: actions/checkout@v1 - - - name: Install golangci-lint - run: curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $(go env GOPATH)/bin v1.27.0 - - - name: Run golangci-lint - run: $(go env GOPATH)/bin/golangci-lint run --disable=errcheck --timeout=10m go/... diff --git a/.github/workflows/docker_test_1.yml b/.github/workflows/misc_test_docker.yml similarity index 62% rename from .github/workflows/docker_test_1.yml rename to .github/workflows/misc_test_docker.yml index c963d1788b8..fd617e46b34 100644 --- a/.github/workflows/docker_test_1.yml +++ b/.github/workflows/misc_test_docker.yml @@ -1,11 +1,10 @@ -name: docker_test_1 +name: misc test on: [push, pull_request] jobs: build: - name: Docker Test 1 + name: Misc Test runs-on: ubuntu-latest - steps: - name: Set up Go @@ -16,6 +15,6 @@ jobs: - name: Check out code uses: actions/checkout@v2 - - name: Run tests which requires docker 1 + - name: Run Misc test which requires docker run: | - go run test.go -docker=true --follow -shard 10 \ No newline at end of file + go run test.go -docker=true -shard 25 \ No newline at end of file diff --git a/Makefile b/Makefile index 4a04dbe2a12..e6d44a39e24 100644 --- a/Makefile +++ b/Makefile @@ -22,7 +22,7 @@ export REWRITER=go/vt/sqlparser/rewriter.go # Since we are not using this Makefile for compilation, limiting parallelism will not increase build time. .NOTPARALLEL: -.PHONY: all build install test clean unit_test unit_test_cover unit_test_race integration_test proto proto_banner site_test site_integration_test docker_bootstrap docker_test docker_unit_test java_test reshard_tests e2e_test e2e_test_race minimaltools tools web_bootstrap web_build web_start +.PHONY: all build build_web install test clean unit_test unit_test_cover unit_test_race integration_test proto proto_banner site_test site_integration_test docker_bootstrap docker_test docker_unit_test java_test reshard_tests e2e_test e2e_test_race minimaltools tools all: build @@ -37,11 +37,22 @@ ifdef VT_EXTRA_BUILD_FLAGS export EXTRA_BUILD_FLAGS := $(VT_EXTRA_BUILD_FLAGS) endif +# This target needs to be manually run every time any file within web/vtctld2/app is modified to regenerate rice-box.go +embed_static: + cd go/vt/vtctld + go run github.com/GeertJohan/go.rice/rice embed-go + go build . + embed_config: cd go/vt/mysqlctl go run github.com/GeertJohan/go.rice/rice embed-go go build . +build_web: + echo $$(date): Building web artifacts + cd web/vtctld2 && ng build -prod + cp -f web/vtctld2/src/{favicon.ico,plotly-latest.min.js,primeui-ng-all.min.css} web/vtctld2/dist/ + build: ifndef NOBANNER echo $$(date): Building source tree @@ -276,14 +287,6 @@ docker_lite_testing: chmod -R o=g * docker build -f docker/lite/Dockerfile.testing -t vitess/lite:testing . -docker_local: - chmod -R o=g * - docker build -f docker/local/Dockerfile -t vitess/local . - -docker_mini: - chmod -R o=g * - docker build -f docker/mini/Dockerfile -t vitess/mini . - # This rule loads the working copy of the code into a bootstrap image, # and then runs the tests inside Docker. # Example: $ make docker_test flavor=mariadb @@ -348,19 +351,3 @@ client_go_gen: # Move and cleanup mv vitess.io/vitess/go/vt/topo/k8stopo/client go/vt/topo/k8stopo/ rmdir -p vitess.io/vitess/go/vt/topo/k8stopo/ - -# Check prerequisites and install dependencies -web_bootstrap: - ./tools/web_bootstrap.sh - -# Do a production build of the vtctld UI. -# This target needs to be manually run every time any file within web/vtctld2/app -# is modified to regenerate rice-box.go -web_build: web_bootstrap - ./tools/web_build.sh - -# Start a front-end dev server with hot reloading on http://localhost:4200. -# This expects that you have a vtctld API server running on http://localhost:15000. -# Following the local Docker install guide is recommended: https://vitess.io/docs/get-started/local-docker/ -web_start: web_bootstrap - cd web/vtctld2 && npm run start diff --git a/build.env b/build.env index c16ec1e2da8..a09807bdf5a 100755 --- a/build.env +++ b/build.env @@ -43,4 +43,3 @@ mkdir -p .git/hooks ln -sf "$PWD/misc/git/pre-commit" .git/hooks/pre-commit ln -sf "$PWD/misc/git/commit-msg" .git/hooks/commit-msg git config core.hooksPath .git/hooks -export EXTRA_BIN=$PWD/test/bin \ No newline at end of file diff --git a/config/init_db.sql b/config/init_db.sql index 64d2382e3f7..836c8c997e6 100644 --- a/config/init_db.sql +++ b/config/init_db.sql @@ -91,7 +91,7 @@ GRANT SELECT, PROCESS, SUPER, REPLICATION CLIENT, RELOAD GRANT SELECT, UPDATE, DELETE, DROP ON performance_schema.* TO 'vt_monitoring'@'localhost'; -# User for Orchestrator (https://github.com/openark/orchestrator). +# User for Orchestrator (https://github.com/github/orchestrator). CREATE USER 'orc_client_user'@'%' IDENTIFIED BY 'orc_client_user_password'; GRANT SUPER, PROCESS, REPLICATION SLAVE, RELOAD ON *.* TO 'orc_client_user'@'%'; diff --git a/config/mycnf/default.cnf b/config/mycnf/default.cnf index 8facbbe0343..14d1feaa12f 100644 --- a/config/mycnf/default.cnf +++ b/config/mycnf/default.cnf @@ -19,6 +19,7 @@ server-id = {{.ServerID}} # additional configuration (like enabling semi-sync) before we connect to # the master. skip_slave_start +slave_load_tmpdir = {{.SlaveLoadTmpDir}} socket = {{.SocketFile}} tmpdir = {{.TmpDir}} diff --git a/config/tablet/default.yaml b/config/tablet/default.yaml index 1526ac96315..68de610693e 100644 --- a/config/tablet/default.yaml +++ b/config/tablet/default.yaml @@ -78,27 +78,16 @@ oltp: maxRows: 10000 # queryserver-config-max-result-size warnRows: 0 # queryserver-config-warn-result-size -healthcheck: - intervalSeconds: 20 # health_check_interval - degradedThresholdSeconds: 30 # degraded_threshold - unhealthyThresholdSeconds: 7200 # unhealthy_threshold - -gracePeriods: - transactionShutdownSeconds: 0 # transaction_shutdown_grace_period - transitionSeconds: 0 # serving_state_grace_period - -replicationTracker: - mode: disable # enable_replication_reporter - heartbeatIntervalMilliseconds: 0 # heartbeat_enable, heartbeat_interval - hotRowProtection: mode: disable|dryRun|enable # enable_hot_row_protection, enable_hot_row_protection_dry_run - # Recommended value: same as txPool.size. + # Default value is same as txPool.size. maxQueueSize: 20 # hot_row_protection_max_queue_size maxGlobalQueueSize: 1000 # hot_row_protection_max_global_queue_size maxConcurrency: 5 # hot_row_protection_concurrent_transactions consolidator: enable|disable|notOnMaster # enable-consolidator, enable-consolidator-replicas +heartbeatIntervalMilliseconds: 0 # heartbeat_enable, heartbeat_interval +shutdownGracePeriodSeconds: 0 # transaction_shutdown_grace_period passthroughDML: false # queryserver-config-passthrough-dmls streamBufferSize: 32768 # queryserver-config-stream-buffer-size queryCacheSize: 5000 # queryserver-config-query-cache-size diff --git a/docker/k8s/orchestrator/Dockerfile b/docker/k8s/orchestrator/Dockerfile index 68f4889123c..26ee5922bc5 100644 --- a/docker/k8s/orchestrator/Dockerfile +++ b/docker/k8s/orchestrator/Dockerfile @@ -19,7 +19,7 @@ FROM debian:stretch-slim RUN apt-get update && \ apt-get upgrade -qq && \ apt-get install wget ca-certificates jq -qq --no-install-recommends && \ - wget https://github.com/openark/orchestrator/releases/download/v3.1.1/orchestrator_3.1.0_amd64.deb && \ + wget https://github.com/github/orchestrator/releases/download/v3.1.1/orchestrator_3.1.0_amd64.deb && \ dpkg -i orchestrator_3.1.0_amd64.deb && \ rm orchestrator_3.1.0_amd64.deb && \ apt-get purge wget -qq && \ diff --git a/docker/local/Dockerfile b/docker/local/Dockerfile deleted file mode 100644 index a4e76e1a7d1..00000000000 --- a/docker/local/Dockerfile +++ /dev/null @@ -1,30 +0,0 @@ -FROM vitess/bootstrap:common - -RUN apt-get update -RUN apt-get install -y sudo curl vim jq mysql-server - -COPY docker/local/install_local_dependencies.sh /vt/dist/install_local_dependencies.sh -RUN /vt/dist/install_local_dependencies.sh -RUN echo "source /vt/local/env.sh" >> /etc/bash.bashrc - -# Allows some docker builds to disable CGO -ARG CGO_ENABLED=0 - -# Re-copy sources from working tree. -COPY --chown=vitess:vitess . /vt/src/vitess.io/vitess - -# Build and install Vitess in a temporary output directory. -USER vitess - -WORKDIR /vt/src/vitess.io/vitess -RUN make install PREFIX=/vt/install - -ENV VTROOT /vt/src/vitess.io/vitess -ENV VTDATAROOT /vt/vtdataroot -ENV PATH $VTROOT/bin:$PATH -ENV PATH="/var/opt/etcd:${PATH}" - -RUN mkdir /vt/local -COPY examples/local /vt/local - -CMD cd /vt/local && ./101_initial_cluster.sh && /bin/bash diff --git a/docker/local/install_local_dependencies.sh b/docker/local/install_local_dependencies.sh deleted file mode 100755 index b723ee99452..00000000000 --- a/docker/local/install_local_dependencies.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash - -# This is a script that gets run as part of the Dockerfile build -# to install dependencies for the vitess/mini image. -# -# Usage: install_mini_dependencies.sh - -set -euo pipefail - -# Install etcd -ETCD_VER=v3.4.9 -DOWNLOAD_URL=https://storage.googleapis.com/etcd - -curl -k -L ${DOWNLOAD_URL}/${ETCD_VER}/etcd-${ETCD_VER}-linux-amd64.tar.gz -o /tmp/etcd-${ETCD_VER}-linux-amd64.tar.gz -mkdir -p /var/opt/etcd -sudo tar xzvf /tmp/etcd-${ETCD_VER}-linux-amd64.tar.gz -C /var/opt/etcd --strip-components=1 -rm -f /tmp/etcd-${ETCD_VER}-linux-amd64.tar.gz - -mkdir -p /var/run/etcd && chown -R vitess:vitess /var/run/etcd - -# Clean up files we won't need in the final image. -rm -rf /var/lib/apt/lists/* diff --git a/docker/local/run.sh b/docker/local/run.sh deleted file mode 100755 index 1774d091d05..00000000000 --- a/docker/local/run.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -docker run -p 15000:15000 -p 15001:15001 --rm -it vitess/local diff --git a/docker/mini/Dockerfile b/docker/mini/Dockerfile deleted file mode 100644 index df299ce8634..00000000000 --- a/docker/mini/Dockerfile +++ /dev/null @@ -1,61 +0,0 @@ -# Copyright 2019 The Vitess Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# NOTE: We have to build the Vitess binaries from scratch instead of sharing -# a base image because Docker Hub dropped the feature we relied upon to -# ensure images contain the right binaries. - -# Use a temporary layer for the build stage. -FROM vitess/base AS base - -FROM vitess/lite - -USER root - -RUN apt-get update -RUN apt-get install -y sudo curl vim python3 jq sqlite3 -RUN ln -s /usr/bin/python3 /usr/bin/python - -# Install minivitess dependencies -COPY docker/mini/install_mini_dependencies.sh /vt/dist/install_mini_dependencies.sh -RUN /vt/dist/install_mini_dependencies.sh - -COPY docker/mini/orchestrator-vitess-mini.conf.json /etc/orchestrator.conf.json -RUN chown vitess:vitess /etc/orchestrator.conf.json - -COPY docker/mini/docker-entry /vt/dist/docker/mini/docker-entry -COPY examples/local/scripts /vt/dist/scripts -COPY examples/local/env.sh /vt/dist/scripts/env.sh -COPY docker/mini/vtctld-mini-up.sh /vt/dist/scripts/vtctld-mini-up.sh -COPY docker/mini/vttablet-mini-up.sh /vt/dist/scripts/vttablet-mini-up.sh -COPY docker/mini/orchestrator-up.sh /vt/dist/scripts/orchestrator-up.sh -RUN echo "hostname=127.0.0.1" >> /vt/dist/scripts/env.sh -RUN cat /vt/dist/scripts/env.sh | egrep "^alias" >> /etc/bash.bashrc - -COPY --from=base /vt/bin/vtctl /vt/bin/ -COPY --from=base /vt/bin/mysqlctl /vt/bin/ - -# Set up Vitess environment (just enough to run pre-built Go binaries) -ENV VTROOT /vt/src/vitess.io/vitess -ENV VTDATAROOT /vt/vtdataroot -ENV PATH $VTROOT/bin:$PATH -ENV PATH="/vt/bin:${PATH}" -ENV PATH="/var/opt/etcd:${PATH}" -ENV TOPO="etcd" - -# Create mount point for actual data (e.g. MySQL data dir) -VOLUME /vt/vtdataroot -USER vitess -EXPOSE 15000-15200 16000-16200 -CMD /vt/dist/docker/mini/docker-entry && /bin/bash diff --git a/docker/mini/docker-entry b/docker/mini/docker-entry deleted file mode 100755 index 4c3e3d909bc..00000000000 --- a/docker/mini/docker-entry +++ /dev/null @@ -1,132 +0,0 @@ -#!/bin/bash - -# Copyright 2020 The Vitess Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# This script probes for an existing MySQL topologies and sets up a mini vitess setup matching that topology. -# - -echo_sleep() { - local SECONDS="$1" - for i in $(seq 1 $SECONDS) ; do - echo -n "." - sleep 1 - done - echo -} - -echo_header() { - local HEADER="$1" - echo "" - echo "# $HEADER" -} - -SCRIPTS_PATH="/vt/dist/scripts" -export CELL=${CELL:-zone1} -export $TOPOLOGY_USER -export $TOPOLOGY_PASSWORD - - -cat <<- "EOF" -============================================= - -| \/ (_)_ __ (_) \ / (_) |_ ___ ___ ___ -| |\/| | | '_ \| |\ \ / /| | __/ _ \/ __/ __| -| | | | | | | | | \ V / | | || __/\__ \__ \ -|_| |_|_|_| |_|_| \_/ |_|\__\___||___/___/ - -============================================= -EOF - -if [ -z "$MYSQL_SCHEMA" ] ; then - echo "Expected MYSQL_SCHEMA environment variable" - exit 1 -fi -if [ -z "$TOPOLOGY_SERVER" ] ; then - echo "TOPOLOGY_SERVER environment variable not found. You must specify a MySQL server within your topology." - echo "This mini-vitess setup will attempt to discover your topology using that server and will bootstrap to match your topology" - exit 1 -fi -if [ -z "$TOPOLOGY_USER" ] ; then - echo "TOPOLOGY_USER environment variable not found. You must specify a MySQL username accessible to vitess." - exit 1 -fi -if [ -z "$TOPOLOGY_PASSWORD" ] ; then - echo "TOPOLOGY_PASSWORD environment variable not found. You must specify a MySQL password accessible to vitess." - exit 1 -fi - -echo "MiniVitess is starting up..." -echo "- Given MySQL topology server: $TOPOLOGY_SERVER" -echo "- Given MySQL schema: $MYSQL_SCHEMA" - -cd $SCRIPTS_PATH - -source ./env.sh - -echo_header "orchestrator" -./orchestrator-up.sh -echo "- orchestrator will meanwhile probe and map your MySQL replication topology" - -echo_header "etcd" -./etcd-up.sh - -echo_header "vtctld" -./vtctld-mini-up.sh - -echo_header "Waiting for topology to be detected and analyzed" -echo_sleep 15 - -echo_header "orchestrator has detected the following MySQL servers:" -orchestrator-client -c all-instances - -echo_header "Bootstrapping vttablets for the above instances..." - -BASE_TABLET_UID=100 -for i in $(orchestrator-client -c all-instances) ; do - read -r mysql_host mysql_port <<<$(echo $i | tr ':' ' ') - - is_master="" - if [ "$i" == "$(orchestrator-client -c which-cluster-master -i "$i")" ] ; then - is_master="true" - fi - - KEYSPACE=$MYSQL_SCHEMA TABLET_UID=$BASE_TABLET_UID ./vttablet-mini-up.sh "$mysql_host" "$mysql_port" "$is_master" - BASE_TABLET_UID=$((BASE_TABLET_UID + 1)) -done - -echo_header "vtgate" -./vtgate-up.sh - -echo_header "Setup complete" - -echo_header "Your topology is:" -orchestrator-client -c topology-tabulated -i ${TOPOLOGY_SERVER} | tr '|' ' ' - -echo_header "vtgate is listening for MySQL connection on port 15306" - -echo_header "On this container, try running any of the following commands:" -echo " mysql ${MYSQL_SCHEMA} -e 'show tables'" -echo " mysql ${MYSQL_SCHEMA}@master -e 'select @@hostname, @@port'" -echo " mysql ${MYSQL_SCHEMA}@replica -e 'select @@hostname, @@port'" - -echo_header "Outside this container, try running any of the following commands:" -echo " mysql -h $(hostname) --port=15306 ${MYSQL_SCHEMA} -e 'show tables'" -echo " mysql -h $(hostname) --port=15306 ${MYSQL_SCHEMA}@master -e 'select @@hostname, @@port'" -echo " mysql -h $(hostname) --port=15306 ${MYSQL_SCHEMA}@replica -e 'select @@hostname, @@port'" - -echo_header "Ready" - -echo "" - diff --git a/docker/mini/install_mini_dependencies.sh b/docker/mini/install_mini_dependencies.sh deleted file mode 100755 index 03a97cc0962..00000000000 --- a/docker/mini/install_mini_dependencies.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash - -# This is a script that gets run as part of the Dockerfile build -# to install dependencies for the vitess/mini image. -# -# Usage: install_mini_dependencies.sh - -set -euo pipefail - -# Install etcd -ETCD_VER=v3.4.9 -DOWNLOAD_URL=https://storage.googleapis.com/etcd - -curl -k -L ${DOWNLOAD_URL}/${ETCD_VER}/etcd-${ETCD_VER}-linux-amd64.tar.gz -o /tmp/etcd-${ETCD_VER}-linux-amd64.tar.gz -mkdir -p /var/opt/etcd -sudo tar xzvf /tmp/etcd-${ETCD_VER}-linux-amd64.tar.gz -C /var/opt/etcd --strip-components=1 -rm -f /tmp/etcd-${ETCD_VER}-linux-amd64.tar.gz - -mkdir -p /var/run/etcd && chown -R vitess:vitess /var/run/etcd - -# Install orchestrator -curl -k -L https://github.com/openark/orchestrator/releases/download/v3.2.2/orchestrator_3.2.2_amd64.deb -o /tmp/orchestrator.deb -dpkg -i /tmp/orchestrator.deb -rm -f /tmp/orchestrator.deb -cp /usr/local/orchestrator/resources/bin/orchestrator-client /usr/bin - -# Clean up files we won't need in the final image. -rm -rf /var/lib/apt/lists/* diff --git a/docker/mini/orchestrator-up.sh b/docker/mini/orchestrator-up.sh deleted file mode 100755 index 6e4ff486fad..00000000000 --- a/docker/mini/orchestrator-up.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash - -source ./env.sh - -echo "- Configuring orchestrator with given topology server and credentials..." -cp /etc/orchestrator.conf.json /tmp/ -sed -i /tmp/orchestrator.conf.json -e "s/DISCOVERY_SEED_PLACEHOLDER/$TOPOLOGY_SERVER/g" -sed -i /tmp/orchestrator.conf.json -e "s/MYSQL_TOPOLOGY_USER_PLACEHOLDER/$TOPOLOGY_USER/g" -sed -i /tmp/orchestrator.conf.json -e "s/MYSQL_TOPOLOGY_PASSWORD_PLACEHOLDER/$TOPOLOGY_PASSWORD/g" - -cat /tmp/orchestrator.conf.json > /etc/orchestrator.conf.json -rm /tmp/orchestrator.conf.json - -ORCHESTRATOR_LOG="${VTDATAROOT}/tmp/orchestrator.out" - -echo "- Starting orchestrator... Logfile is $ORCHESTRATOR_LOG" - -cd /usr/local/orchestrator -./orchestrator http > $ORCHESTRATOR_LOG 2>&1 & diff --git a/docker/mini/orchestrator-vitess-mini.conf.json b/docker/mini/orchestrator-vitess-mini.conf.json deleted file mode 100644 index 352b22e3121..00000000000 --- a/docker/mini/orchestrator-vitess-mini.conf.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "Debug": true, - "EnableSyslog": false, - "ListenAddress": ":3000", - "MySQLTopologyUser": "MYSQL_TOPOLOGY_USER_PLACEHOLDER", - "MySQLTopologyPassword": "MYSQL_TOPOLOGY_PASSWORD_PLACEHOLDER", - "BackendDB": "sqlite", - "SQLite3DataFile": "/tmp/orchestrator.sqlite3", - "MySQLConnectTimeoutSeconds": 1, - "DefaultInstancePort": 3306, - "DiscoverByShowSlaveHosts": true, - "InstancePollSeconds": 1, - "HostnameResolveMethod": "none", - "MySQLHostnameResolveMethod": "@@report_host", - "SkipBinlogServerUnresolveCheck": true, - "ExpiryHostnameResolvesMinutes": 60, - "VerifyReplicationFilters": false, - "ReasonableMaintenanceReplicationLagSeconds": 20, - "CandidateInstanceExpireMinutes": 60, - "ReadOnly": false, - "AuthenticationMethod": "", - "ReplicationLagQuery": "", - "DetectClusterAliasQuery": "", - "DetectClusterDomainQuery": "", - "DetectInstanceAliasQuery": "", - "DetectPromotionRuleQuery": "", - "DetectDataCenterQuery": "", - "DetectRegionQuery": "", - "DetectPhysicalEnvironmentQuery": "", - "DetectSemiSyncEnforcedQuery": "", - "DiscoverySeeds": [ - "DISCOVERY_SEED_PLACEHOLDER" - ], - "ServeAgentsHttp": false, - "UseSSL": false, - "UseMutualTLS": false, - "MySQLTopologyUseMixedTLS": false, - "StatusEndpoint": "/api/status", - "StatusSimpleHealth": true, - "StatusOUVerify": false, - "BinlogEventsChunkSize": 10000, - "SkipBinlogEventsContaining": [], - "ReduceReplicationAnalysisCount": false, - "FailureDetectionPeriodBlockMinutes": 5, - "FailMasterPromotionOnLagMinutes": 0, - "RecoveryPeriodBlockSeconds": 0, - "RecoveryIgnoreHostnameFilters": [], - "RecoverMasterClusterFilters": [], - "RecoverIntermediateMasterClusterFilters": [], - "OnFailureDetectionProcesses": [], - "PreGracefulTakeoverProcesses": [], - "PreFailoverProcesses": [], - "PostFailoverProcesses": [], - "PostUnsuccessfulFailoverProcesses": [], - "PostMasterFailoverProcesses": [], - "PostIntermediateMasterFailoverProcesses": [], - "PostGracefulTakeoverProcesses": [], - "CoMasterRecoveryMustPromoteOtherCoMaster": true, - "DetachLostReplicasAfterMasterFailover": true, - "ApplyMySQLPromotionAfterMasterFailover": true, - "PreventCrossDataCenterMasterFailover": false, - "PreventCrossRegionMasterFailover": true, - "MasterFailoverDetachReplicaMasterHost": false, - "MasterFailoverLostInstancesDowntimeMinutes": 0, - "PostponeReplicaRecoveryOnLagMinutes": 0, - "RaftEnabled": false -} diff --git a/docker/mini/run.sh b/docker/mini/run.sh deleted file mode 100755 index 860df0bab3a..00000000000 --- a/docker/mini/run.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/bin/bash -# -# Run a MiniVitess docker image, with details and credentials for a MySQL replication topology -# - -TOPOLOGY_SERVER="" -MYSQL_SCHEMA="" -TOPOLOGY_USER="" -TOPOLOGY_PASSWORD="" - -help() { -cat <<- "EOF" -Usage: - docker/mini/run.sh - -Mandatory options: - -s : in hostname[:port] format; a single MySQL server in your replication - topology from which MiniVitess will discover your entire topology - -d : database/schema name on your MySQL server. A single schema is supported. - -u : MySQL username with enough privileges for Vitess to run DML, and for - orchestrator to probe replication - -p : password for given user -EOF - exit 1 -} - -error_help() { - local message="$1" - echo "ERROR: $message" - help -} - -while getopts "s:d:u:p:h" OPTION -do - case $OPTION in - h) help ;; - s) TOPOLOGY_SERVER="$OPTARG" ;; - d) MYSQL_SCHEMA="$OPTARG" ;; - u) TOPOLOGY_USER="$OPTARG" ;; - p) TOPOLOGY_PASSWORD="$OPTARG" ;; - *) help ;; - esac -done - -if [ -z "$TOPOLOGY_SERVER" ] ; then - error_help "Expected topology server" -fi -if [ -z "$MYSQL_SCHEMA" ] ; then - error_help "Expected MySQL schema/database name" -fi -if [ -z "$TOPOLOGY_USER" ] ; then - error_help "Expected MySQL user" -fi -if [ -z "$TOPOLOGY_PASSWORD" ] ; then - error_help "Expected MySQL password" -fi - -docker run --rm -it -p 3000:3000 -p 15000:15000 -p 15001:15001 -e "TOPOLOGY_SERVER=$TOPOLOGY_SERVER" -e "TOPOLOGY_USER=$TOPOLOGY_USER" -e "TOPOLOGY_PASSWORD=$TOPOLOGY_PASSWORD" -e "MYSQL_SCHEMA=$MYSQL_SCHEMA" --network=host vitess/mini:latest diff --git a/docker/mini/vtctld-mini-up.sh b/docker/mini/vtctld-mini-up.sh deleted file mode 100755 index 9d318949970..00000000000 --- a/docker/mini/vtctld-mini-up.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/bash - -# Copyright 2019 The Vitess Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# This is an example script that starts vtctld. - -source ./env.sh - -cell=${CELL:-'test'} -grpc_port=15999 - -echo "- Starting vtctld..." -# shellcheck disable=SC2086 -vtctld \ - $TOPOLOGY_FLAGS \ - --disable_active_reparents \ - -cell $cell \ - -workflow_manager_init \ - -workflow_manager_use_election \ - -service_map 'grpc-vtctl' \ - -backup_storage_implementation file \ - -file_backup_storage_root $VTDATAROOT/backups \ - -log_dir $VTDATAROOT/tmp \ - -port $vtctld_web_port \ - -grpc_port $grpc_port \ - -pid_file $VTDATAROOT/tmp/vtctld.pid \ - > $VTDATAROOT/tmp/vtctld.out 2>&1 & -echo "+ started" diff --git a/docker/mini/vttablet-mini-up.sh b/docker/mini/vttablet-mini-up.sh deleted file mode 100755 index 6d31ccc9b9c..00000000000 --- a/docker/mini/vttablet-mini-up.sh +++ /dev/null @@ -1,90 +0,0 @@ -#!/bin/bash - -# Copyright 2019 The Vitess Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -mysql_host="$1" -mysql_port="$2" -is_master="$3" - -source ./env.sh - -cell=${CELL:-'test'} -keyspace=${KEYSPACE:-'test_keyspace'} -shard=${SHARD:-'0'} -uid=$TABLET_UID -port=$[15000 + $TABLET_UID] -grpc_port=$[16000 + $uid] -printf -v alias '%s-%010d' $cell $uid -printf -v tablet_dir 'vt_%010d' $uid -tablet_hostname="$mysql_host" -printf -v tablet_logfile 'vttablet_%010d_querylog.txt' $uid - -mkdir -p "$VTDATAROOT/$tablet_dir" - -tablet_type=replica - -echo "> Starting vttablet for server $mysql_host:$mysql_port" -echo " - Tablet alias is $alias" -echo " - Tablet listens on http://$hostname:$port" -# shellcheck disable=SC2086 -vttablet \ - $TOPOLOGY_FLAGS \ - -log_dir $VTDATAROOT/tmp \ - -log_queries_to_file $VTDATAROOT/tmp/$tablet_logfile \ - -tablet-path $alias \ - -tablet_hostname "$tablet_hostname" \ - -init_db_name_override "$keyspace" \ - -init_keyspace $keyspace \ - -init_shard $shard \ - -init_tablet_type $tablet_type \ - -health_check_interval 5s \ - -heartbeat_enable \ - -heartbeat_interval 500ms \ - -enable_semi_sync \ - -enable_replication_reporter \ - -backup_storage_implementation file \ - -file_backup_storage_root $VTDATAROOT/backups \ - -port $port \ - -grpc_port $grpc_port \ - -db_host $mysql_host \ - -db_port $mysql_port \ - -db_app_user $TOPOLOGY_USER \ - -db_app_password $TOPOLOGY_PASSWORD \ - -db_dba_user $TOPOLOGY_USER \ - -db_dba_password $TOPOLOGY_PASSWORD \ - -mycnf_mysql_port $mysql_port \ - -service_map 'grpc-queryservice,grpc-tabletmanager,grpc-updatestream' \ - -pid_file $VTDATAROOT/$tablet_dir/vttablet.pid \ - -vtctld_addr http://$hostname:$vtctld_web_port/ \ - > $VTDATAROOT/$tablet_dir/vttablet.out 2>&1 & - -# Block waiting for the tablet to be listening -# Not the same as healthy - -for i in $(seq 0 300); do - curl -I "http://$hostname:$port/debug/status" >/dev/null 2>&1 && break - sleep 0.1 -done - -# check one last time -curl -I "http://$hostname:$port/debug/status" >/dev/null 2>&1 || fail "tablet could not be started!" - -echo " + vttablet started" - -if [ "$is_master" == "true" ] ; then - echo " > Setting this tablet as master" - vtctlclient TabletExternallyReparented "$alias" && - echo " + done" -fi diff --git a/docker/orchestrator/build.sh b/docker/orchestrator/build.sh index dbc8dfc464b..0f81c7b2dd2 100755 --- a/docker/orchestrator/build.sh +++ b/docker/orchestrator/build.sh @@ -19,14 +19,14 @@ set -e tmpdir=`mktemp -d` script="go get vitess.io/vitess/go/cmd/vtctlclient && \ - git clone https://github.com/openark/orchestrator.git src/github.com/openark/orchestrator && \ - go install github.com/openark/orchestrator/go/cmd/orchestrator" + git clone https://github.com/github/orchestrator.git src/github.com/github/orchestrator && \ + go install github.com/github/orchestrator/go/cmd/orchestrator" echo "Building orchestrator..." -docker run -ti --name=vt_orc_build golang:1.14.4-stretch bash -c "$script" +docker run -ti --name=vt_orc_build golang:1.7 bash -c "$script" docker cp vt_orc_build:/go/bin/orchestrator $tmpdir docker cp vt_orc_build:/go/bin/vtctlclient $tmpdir -docker cp vt_orc_build:/go/src/github.com/openark/orchestrator/resources $tmpdir +docker cp vt_orc_build:/go/src/github.com/github/orchestrator/resources $tmpdir docker rm vt_orc_build echo "Building Docker image..." diff --git a/docker/test/run.sh b/docker/test/run.sh index 842c4512b1b..539a7fa57e0 100755 --- a/docker/test/run.sh +++ b/docker/test/run.sh @@ -139,7 +139,6 @@ args="$args -v /tmp/mavencache:/home/vitess/.m2" # Add in the vitess user args="$args --user vitess" -args="$args -v $PWD/test/bin:/tmp/bin" # Mount in host VTDATAROOT if one exists, since it might be a RAM disk or SSD. if [[ -n "$VTDATAROOT" ]]; then @@ -173,7 +172,6 @@ fi # Reset the environment if this was an old bootstrap. We can detect this from VTTOP presence. bashcmd=$(append_cmd "$bashcmd" "export VTROOT=/vt/src/vitess.io/vitess") bashcmd=$(append_cmd "$bashcmd" "export VTDATAROOT=/vt/vtdataroot") -bashcmd=$(append_cmd "$bashcmd" "export EXTRA_BIN=/tmp/bin") bashcmd=$(append_cmd "$bashcmd" "mkdir -p dist; mkdir -p bin; mkdir -p lib; mkdir -p vthook") bashcmd=$(append_cmd "$bashcmd" "rm -rf /vt/dist; ln -s /vt/src/vitess.io/vitess/dist /vt/dist") diff --git a/examples/are-you-alive/README.md b/examples/are-you-alive/README.md index 7da5460c64d..65bff90cad6 100644 --- a/examples/are-you-alive/README.md +++ b/examples/are-you-alive/README.md @@ -73,14 +73,6 @@ After you run docker compose, navigate to `http://localhost:9090` to see Prometheus and `http://localhost:8080/metrics` to see the raw metrics being exported. -## Test Specific Tablet Types - -See [this vitess -documentation](https://vitess.io/docs/user-guides/faq/#how-do-i-choose-between-master-vs-replica-for-queries) -for how to target specific tablet types. In the configuration file you'll want -to, for example, put "@master" or "@replica" on the ends of your connection -strings. - ## Push to Registry If you have push access to the [planetscale public diff --git a/examples/are-you-alive/build/dev/Dockerfile b/examples/are-you-alive/build/dev/Dockerfile index 7a6a06d590b..3b079cfcf8a 100644 --- a/examples/are-you-alive/build/dev/Dockerfile +++ b/examples/are-you-alive/build/dev/Dockerfile @@ -1,6 +1,13 @@ -FROM golang:1.14 -RUN go get -v github.com/cespare/reflex -COPY reflex.conf /reflex.conf -COPY entrypoint.sh /entrypoint.sh -COPY endpoints.yaml /endpoints.yaml -ENTRYPOINT ["/entrypoint.sh"] +# Use a [multi stage +# build](https://docs.docker.com/develop/develop-images/multistage-build/) to +# build [reflex](https://github.com/cespare/reflex), a tool that will allow us +# to automatically rerun the project when any files change. +FROM golang:1.12.5 AS build +# Build reflex as a static binary (CGO_ENABLED=0) so we can run it in our final +# container. +RUN CGO_ENABLED=0 go get -v github.com/cespare/reflex + +FROM golang:1.12.5-alpine AS runtime +COPY --from=build /go/bin/reflex /go/bin/reflex +COPY reflex.conf / +ENTRYPOINT ["/go/bin/reflex", "-c", "/reflex.conf"] diff --git a/examples/are-you-alive/build/dev/reflex.conf b/examples/are-you-alive/build/dev/reflex.conf index 6985f66d979..9e92ab1a7ca 100644 --- a/examples/are-you-alive/build/dev/reflex.conf +++ b/examples/are-you-alive/build/dev/reflex.conf @@ -1,5 +1,2 @@ -# Get all dependencies when go.mod changes. --r '(\.mod$)' -s -- go get vitess.io/vitess/examples/are-you-alive/cmd/are-you-alive/... - # Rerun "go run" every time a ".go" file changes. --r '(\.go$)' -s -- go run vitess.io/vitess/examples/are-you-alive/cmd/are-you-alive --initialize --endpoints_config /endpoints.yaml +-r '(\.go$)' -s -- go run vitess.io/vitess/examples/are-you-alive/cmd/are-you-alive --initialize diff --git a/examples/are-you-alive/build/release/Dockerfile b/examples/are-you-alive/build/release/Dockerfile index 55b8c9f66a1..67310da895a 100644 --- a/examples/are-you-alive/build/release/Dockerfile +++ b/examples/are-you-alive/build/release/Dockerfile @@ -1,6 +1,5 @@ -FROM golang:1.14 AS build +FROM golang:1.12.5 AS build COPY . /go/src/vitess.io/vitess/examples/are-you-alive -RUN go get vitess.io/vitess/examples/are-you-alive/cmd/are-you-alive/... RUN CGO_ENABLED=0 go install vitess.io/vitess/examples/are-you-alive/cmd/are-you-alive FROM debian:stretch-slim AS runtime diff --git a/examples/are-you-alive/cmd/are-you-alive/main.go b/examples/are-you-alive/cmd/are-you-alive/main.go index 4744c68efd4..fd747468558 100644 --- a/examples/are-you-alive/cmd/are-you-alive/main.go +++ b/examples/are-you-alive/cmd/are-you-alive/main.go @@ -2,7 +2,6 @@ package main import ( "database/sql" - "errors" "flag" "fmt" "github.com/go-sql-driver/mysql" @@ -10,13 +9,12 @@ import ( "github.com/prometheus/client_golang/prometheus/promauto" "github.com/prometheus/client_golang/prometheus/promhttp" "github.com/sirupsen/logrus" - "go.uber.org/ratelimit" - "gopkg.in/yaml.v2" "math/rand" "net/http" "os" "os/signal" "sync" + "time" "vitess.io/vitess/examples/are-you-alive/pkg/client" ) @@ -40,10 +38,10 @@ var ( ) ) -func writeNextRecord(connectionString string) error { +func writeNextRecord(environmentName string, connectionString string) error { // 1. Call monitored client - err := client.Write(connectionString, maxPage) + err := client.Write(environmentName, connectionString, maxPage) if err != nil { // Check to see if this is a duplicate key error. We've seen this // sometimes happen, and when it does this client app gets stuck in an @@ -72,7 +70,7 @@ func writeNextRecord(connectionString string) error { return nil } -func readRandomRecord(connectionString string) error { +func readRandomRecord(environmentName string, connectionString string) error { // 1. Pick Random Number Between "minPage" and "maxPage" if minPage == maxPage { @@ -82,7 +80,7 @@ func readRandomRecord(connectionString string) error { page := (rand.Int() % (maxPage - minPage)) + minPage // 2. Read Record - readID, readMsg, err := client.Read(connectionString, page) + readID, readMsg, err := client.Read(environmentName, connectionString, page) if err != nil { if err == sql.ErrNoRows { // This races with deletion, but if our page is greater than minPage @@ -127,10 +125,10 @@ func readRandomRecord(connectionString string) error { return nil } -func runCount(connectionString string) error { +func runCount(environmentName string, connectionString string) error { // 1. Run Count - count, err := client.Count(connectionString) + count, err := client.Count(environmentName, connectionString) if err != nil { logrus.WithError(err).Error("Error counting records") return err @@ -143,7 +141,7 @@ func runCount(connectionString string) error { return nil } -func deleteLastRecordIfNecessary(connectionString string) error { +func deleteLastRecordIfNecessary(environmentName string, connectionString string) error { // 1. Compare "maxPage" - "minPage" to Desired Dataset Size if (maxPage - minPage) < *datasetSize { @@ -155,7 +153,7 @@ func deleteLastRecordIfNecessary(connectionString string) error { }).Debug("Deleting last record") // 2. Delete Record If We Are Above Desired Size - err := client.Delete(connectionString, minPage) + err := client.Delete(environmentName, connectionString, minPage) if err != nil { logrus.WithError(err).Error("Error deleting record") return err @@ -167,27 +165,33 @@ func deleteLastRecordIfNecessary(connectionString string) error { } var ( + mysqlConnectionString = flag.String( + "mysql_connection_string", "", "Connection string for db to test") prometheusMetricsAddress = flag.String( "prometheus_metrics_address", ":8080", "Address on which to serve prometheus metrics") - debug = flag.Bool("debug", false, "Enable debug logging") - useVtgate = flag.Bool("vtgate", false, "Using vtgate (for @master and @replica)") - initialize = flag.Bool("initialize", false, "Initialize database (for testing)") - datasetSize = flag.Int("dataset_size", 10, "Number of total records in database") - endpointsConfigFilename = flag.String("endpoints_config", "", "Endpoint and load configuration.") + debug = flag.Bool("debug", false, "Enable debug logging") + useVtgate = flag.Bool("vtgate", false, "Using vtgate (for @master and @replica)") + readFromReplica = flag.Bool("replica", false, "Read from replica") + readFromReadOnly = flag.Bool("rdonly", false, "Read from rdonly") + initialize = flag.Bool("initialize", false, "Initialize database (for testing)") + sleepTime = flag.Int("delay", 1*1000*1000*1000, "Delay in nanoseconds between ops") + datasetSize = flag.Int("dataset_size", 10, "Number of total records in database") + environmentName = flag.String("environment_name", "prod", + "Environment the database is deployed in that this client is pointing at") ) type runner struct { - connString string - fn func(string) error - errMessage string - opsPerSecond int + connString string + envName string + fn func(string, string) error + errMessage string + sleepTime time.Duration } func (r *runner) run() { - rl := ratelimit.New(r.opsPerSecond) for { - _ = rl.Take() - err := r.fn(r.connString) + time.Sleep(r.sleepTime) + err := r.fn(r.envName, r.connString) if err != nil { logrus.WithError(err).Error(r.errMessage) } @@ -212,35 +216,6 @@ func runPrometheus() { logrus.Fatal(http.ListenAndServe(*prometheusMetricsAddress, nil)) } -func loadEndpointsConfig(endpointsConfigFilename string) (endpointsConfig, error) { - if endpointsConfigFilename == "" { - return endpointsConfig{}, errors.New("You must pass an endpoints configuration file") - } - - f, err := os.Open(endpointsConfigFilename) - if err != nil { - return endpointsConfig{}, err - } - defer f.Close() - - var cfg endpointsConfig - decoder := yaml.NewDecoder(f) - err = decoder.Decode(&cfg) - if err != nil { - return endpointsConfig{}, err - } - return cfg, nil -} - -type endpointsConfig struct { - Endpoints []struct { - ConnectionString string `yaml:"connectionString"` - TargetCountsPerSecond int `yaml:"targetCountsPerSecond"` - TargetQueriesPerSecond int `yaml:"targetQueriesPerSecond"` - TargetWritesPerSecond int `yaml:"targetWritesPerSecond"` - } `yaml:"endpoints"` -} - func main() { // 0. Handle Arguments @@ -249,31 +224,24 @@ func main() { logrus.SetLevel(logrus.DebugLevel) } logrus.WithFields(logrus.Fields{ - "endpointsConfigFilename": *endpointsConfigFilename, + "mysqlConnectionString": *mysqlConnectionString, "prometheusMetricsAddress": *prometheusMetricsAddress, "debug": *debug, }).Debug("Command line arguments") - var endpoints endpointsConfig - endpoints, err := loadEndpointsConfig(*endpointsConfigFilename) - if err != nil { - logrus.WithError(err).Error("Failed to load endpoints config.") - os.Exit(1) + connectionString := "" + if *mysqlConnectionString != "" { + connectionString = *mysqlConnectionString + } else if os.Getenv("MYSQL_CONN_STRING") != "" { + connectionString = os.Getenv("MYSQL_CONN_STRING") } - - // 0. Set Up Prometheus Metrics - logrus.Info("Prometheus Go") - go runPrometheus() - - // 1. Pass "interpolateParams" - for _, endpoint := range endpoints.Endpoints { - logrus.WithFields(logrus.Fields{ - "connectionString": endpoint.ConnectionString, - "targetCountsPerSecond": endpoint.TargetCountsPerSecond, - "targetQueriesPerSecond": endpoint.TargetQueriesPerSecond, - "targetWritesPerSecond": endpoint.TargetWritesPerSecond, - }).Info("Found endpoint configuration") - + masterConnectionString := connectionString + replicaConnectionString := connectionString + rdonlyConnectionString := connectionString + // When using vtgate, we want to append @master and @replica to the DSN, but + // this will fail against normal mysql which we're using for testing. See: + // https://vitess.io/docs/user-guides/faq/#how-do-i-choose-between-master-vs-replica-for-queries + if *useVtgate { // We need to pass interpolateParams when using a vtgate because // prepare is not supported. // @@ -281,72 +249,101 @@ func main() { // - https://github.com/go-sql-driver/mysql/blob/master/README.md#interpolateparams // - https://github.com/src-d/go-mysql-server/issues/428 // - https://github.com/vitessio/vitess/pull/3862 - endpoint.ConnectionString = fmt.Sprintf("%s?interpolateParams=true", endpoint.ConnectionString) + masterConnectionString = fmt.Sprintf("%s@master?interpolateParams=true", connectionString) + replicaConnectionString = fmt.Sprintf("%s@replica?interpolateParams=true", connectionString) + rdonlyConnectionString = fmt.Sprintf("%s@rdonly?interpolateParams=true", connectionString) } + fmt.Println("masterConnectionString:", masterConnectionString) + fmt.Println("replicaConnectionString:", replicaConnectionString) + fmt.Println("rdonlyConnectionString:", rdonlyConnectionString) + + // 1. Set Up Prometheus Metrics + logrus.Info("Prometheus Go") + go runPrometheus() // 2. Initialize Database - for _, endpoint := range endpoints.Endpoints { - logrus.WithFields(logrus.Fields{ - "connectionString": endpoint.ConnectionString, - "targetCountsPerSecond": endpoint.TargetCountsPerSecond, - "targetQueriesPerSecond": endpoint.TargetQueriesPerSecond, - "targetWritesPerSecond": endpoint.TargetWritesPerSecond, - }).Info("Found endpoint configuration") - - if endpoint.TargetWritesPerSecond > 0 { - logrus.Info("Initializing database") - // For local testing, does not initialize vschema - if *initialize { - client.InitializeDatabase(endpoint.ConnectionString, "are_you_alive_messages") - } - client.WipeTestTable(endpoint.ConnectionString, "are_you_alive_messages") - } + logrus.Info("Initializing database") + // For local testing, does not initialize vschema + if *initialize { + client.InitializeDatabase(*environmentName, masterConnectionString, "are_you_alive_messages") } + client.WipeTestTable(*environmentName, masterConnectionString, "are_you_alive_messages") - // 3. Start Client Goroutines + // 3. Start goroutines to do various things logrus.Info("Starting client goroutines") - for _, endpoint := range endpoints.Endpoints { - logrus.WithFields(logrus.Fields{ - "connectionString": endpoint.ConnectionString, - "targetCountsPerSecond": endpoint.TargetCountsPerSecond, - "targetQueriesPerSecond": endpoint.TargetQueriesPerSecond, - "targetWritesPerSecond": endpoint.TargetWritesPerSecond, - }).Info("Found endpoint configuration") - - if endpoint.TargetWritesPerSecond > 0 { - writer := runner{ - connString: endpoint.ConnectionString, - fn: writeNextRecord, - errMessage: "Recieved error writing next record", - opsPerSecond: endpoint.TargetWritesPerSecond, - } - go writer.run() - deleter := runner{ - connString: endpoint.ConnectionString, - fn: deleteLastRecordIfNecessary, - errMessage: "Recieved error deleting last record", - opsPerSecond: 100, // This is based on target "dataset_size", and will not make a query if not needed. TODO: Actually tune this in a reasonable way after redesigning the schema? - } - go deleter.run() + deleter := runner{ + connString: masterConnectionString, + envName: *environmentName, + fn: deleteLastRecordIfNecessary, + errMessage: "Recieved error deleting last record", + sleepTime: time.Duration(*sleepTime), + } + go deleter.run() + writer := runner{ + connString: masterConnectionString, + envName: *environmentName, + fn: writeNextRecord, + errMessage: "Recieved error writing next record", + sleepTime: time.Duration(*sleepTime), + } + go writer.run() + reader := runner{ + connString: masterConnectionString, + envName: *environmentName, + fn: readRandomRecord, + errMessage: "Recieved error reading record", + sleepTime: time.Duration(*sleepTime), + } + go reader.run() + counter := runner{ + connString: masterConnectionString, + envName: *environmentName, + fn: runCount, + errMessage: "Recieved error running count", + sleepTime: time.Duration(*sleepTime), + } + go counter.run() + + // Only bother starting a replica reader/counter if we are using a vtgate + // and actually are asking to do replica reads + if *useVtgate && *readFromReplica { + replicaReader := runner{ + connString: replicaConnectionString, + envName: *environmentName, + fn: readRandomRecord, + errMessage: "Recieved error reading record from replica", + sleepTime: time.Duration(*sleepTime), } - if endpoint.TargetQueriesPerSecond > 0 { - reader := runner{ - connString: endpoint.ConnectionString, - fn: readRandomRecord, - errMessage: "Recieved error reading record", - opsPerSecond: endpoint.TargetQueriesPerSecond, - } - go reader.run() + go replicaReader.run() + replicaRowCounter := runner{ + connString: replicaConnectionString, + envName: *environmentName, + fn: runCount, + errMessage: "Recieved error running count on replica", + sleepTime: time.Duration(*sleepTime), } - if endpoint.TargetCountsPerSecond > 0 { - counter := runner{ - connString: endpoint.ConnectionString, - fn: runCount, - errMessage: "Recieved error running count", - opsPerSecond: endpoint.TargetCountsPerSecond, - } - go counter.run() + go replicaRowCounter.run() + } + + // Only bother starting a rdonly reader/counter if we are using a vtgate and + // actually are asking to do rdonly reads + if *useVtgate && *readFromReadOnly { + replicaReader := runner{ + connString: rdonlyConnectionString, + envName: *environmentName, + fn: readRandomRecord, + errMessage: "Recieved error reading record from rdonly", + sleepTime: time.Duration(*sleepTime), + } + go replicaReader.run() + replicaRowCounter := runner{ + connString: rdonlyConnectionString, + envName: *environmentName, + fn: runCount, + errMessage: "Recieved error running count on rdonly", + sleepTime: time.Duration(*sleepTime), } + go replicaRowCounter.run() } logrus.Info("Press Ctrl+C to end\n") diff --git a/examples/are-you-alive/docker-compose.yml b/examples/are-you-alive/docker-compose.yml index 700d840b0c2..603353dcb89 100644 --- a/examples/are-you-alive/docker-compose.yml +++ b/examples/are-you-alive/docker-compose.yml @@ -7,6 +7,8 @@ services: volumes: - .:/go/src/vitess.io/vitess/examples/are-you-alive working_dir: /go/src/vitess.io/vitess/examples/are-you-alive + environment: + MYSQL_CONN_STRING: root:mysql@tcp(mysql)/testfixture depends_on: - mysql ports: diff --git a/examples/are-you-alive/go.mod b/examples/are-you-alive/go.mod index 79c3fc251bf..9bb69e1307b 100644 --- a/examples/are-you-alive/go.mod +++ b/examples/are-you-alive/go.mod @@ -1,12 +1,9 @@ module vitess.io/vitess/examples/are-you-alive -go 1.14 +go 1.12 require ( github.com/go-sql-driver/mysql v1.5.0 - github.com/prometheus/client_golang v1.6.0 - github.com/sirupsen/logrus v1.6.0 - go.uber.org/ratelimit v0.1.0 - golang.org/x/sys v0.0.0-20200519105757-fe76b779f299 // indirect - gopkg.in/yaml.v2 v2.2.5 + github.com/prometheus/client_golang v1.4.1 + github.com/sirupsen/logrus v1.4.2 ) diff --git a/examples/are-you-alive/go.sum b/examples/are-you-alive/go.sum index 409a0ce1d02..7c05c83b99b 100644 --- a/examples/are-you-alive/go.sum +++ b/examples/are-you-alive/go.sum @@ -22,13 +22,6 @@ github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5y github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0 h1:oOuy+ugB+P/kBdUnG5QaMXSIyJ1q38wWSojYCb3z5VQ= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -37,8 +30,6 @@ github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/u github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.3 h1:CE8S1cTafDpPvMhIxNJKvHsGVBgn1xWYf1NbHQhywc8= -github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= @@ -57,8 +48,6 @@ github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXP github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.4.1 h1:FFSuS004yOQEtDdTq+TAOLP5xUq63KqAFYyOi8zA+Y8= github.com/prometheus/client_golang v1.4.1/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= -github.com/prometheus/client_golang v1.6.0 h1:YVPodQOcK15POxhgARIvnDRVpLcuK8mglnMrWfyrw6A= -github.com/prometheus/client_golang v1.6.0/go.mod h1:ZLOG9ck3JLRdB5MgO8f+lLTe83AXG6ro35rLTxvnIl4= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= @@ -70,20 +59,14 @@ github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8 h1:+fpWZdT24pJBiqJdAwYBjPSk+5YmQzYNPYzQsdzLkt8= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= -github.com/prometheus/procfs v0.0.11 h1:DhHlBtkHWPYi8O2y31JkK0TF+DGM+51OopZjH/Ia5qI= -github.com/prometheus/procfs v0.0.11/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.6.0 h1:UBcNElsrwanuuMsnGSlYmtmgbb23qDR5dG+6X6Oo89I= -github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -go.uber.org/ratelimit v0.1.0 h1:U2AruXqeTb4Eh9sYQSTrMhH8Cb7M0Ian2ibBOnBcnAw= -go.uber.org/ratelimit v0.1.0/go.mod h1:2X8KaoNd1J0lZV+PxJk/5+DGbO/tpwLR1m++a7FnB/Y= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -95,27 +78,15 @@ golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82 h1:ywK/j/KkyTHcdyYSZNXGjMwgmDSfjglYZ3vStQ/gSCU= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f h1:gWF768j/LaZugp8dyS4UwsslYCYz9XgFxvlgsn0n9H8= -golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200519105757-fe76b779f299 h1:DYfZAGf2WMFjMxbgTjaC+2HC7NkNAQs+6Q8b9WEB/F4= -golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= -google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= -google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= -google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0 h1:qdOKuR/EIArgaWNjetjgTzgVTAZ+S/WXVrq9HW9zimw= -google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.5 h1:ymVxjfMaHvXD8RqPRmzHHsB3VvucivSkIAvJFDI5O3c= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= vitess.io/vitess v2.1.1+incompatible h1:nuuGHiWYWpudD3gOCLeGzol2EJ25e/u5Wer2wV1O130= diff --git a/examples/are-you-alive/pkg/client/client.go b/examples/are-you-alive/pkg/client/client.go index 95a564af678..e4f35d3e882 100644 --- a/examples/are-you-alive/pkg/client/client.go +++ b/examples/are-you-alive/pkg/client/client.go @@ -22,70 +22,70 @@ var ( Help: "Latency to recieve a count error", Buckets: defaultBuckets, }, - []string{"database_name", "tablet_type"}, + []string{"environment_name", "database_name", "tablet_type"}, ) readErrorLatency = promauto.NewHistogramVec(prometheus.HistogramOpts{ Name: "are_you_alive_read_error_latency_seconds", Help: "Latency to recieve a read error", Buckets: defaultBuckets, }, - []string{"database_name", "tablet_type"}, + []string{"environment_name", "database_name", "tablet_type"}, ) deleteErrorLatency = promauto.NewHistogramVec(prometheus.HistogramOpts{ Name: "are_you_alive_delete_error_latency_seconds", Help: "Latency to recieve a delete error", Buckets: defaultBuckets, }, - []string{"database_name"}, + []string{"environment_name", "database_name"}, ) writeErrorLatency = promauto.NewHistogramVec(prometheus.HistogramOpts{ Name: "are_you_alive_write_error_latency_seconds", Help: "Latency to recieve a write error", Buckets: defaultBuckets, }, - []string{"database_name"}, + []string{"environment_name", "database_name"}, ) connectErrorLatency = promauto.NewHistogramVec(prometheus.HistogramOpts{ Name: "are_you_alive_connect_error_latency_seconds", Help: "Latency to recieve a connect error", Buckets: defaultBuckets, }, - []string{"database_name", "tablet_type"}, + []string{"environment_name", "database_name", "tablet_type"}, ) countLatency = promauto.NewHistogramVec(prometheus.HistogramOpts{ Name: "are_you_alive_count_latency_seconds", Help: "Time it takes to count to the database", Buckets: defaultBuckets, }, - []string{"database_name", "tablet_type"}, + []string{"environment_name", "database_name", "tablet_type"}, ) readLatency = promauto.NewHistogramVec(prometheus.HistogramOpts{ Name: "are_you_alive_read_latency_seconds", Help: "Time it takes to read to the database", Buckets: defaultBuckets, }, - []string{"database_name", "tablet_type"}, + []string{"environment_name", "database_name", "tablet_type"}, ) deleteLatency = promauto.NewHistogramVec(prometheus.HistogramOpts{ Name: "are_you_alive_delete_latency_seconds", Help: "Time it takes to delete to the database", Buckets: defaultBuckets, }, - []string{"database_name"}, + []string{"environment_name", "database_name"}, ) writeLatency = promauto.NewHistogramVec(prometheus.HistogramOpts{ Name: "are_you_alive_write_latency_seconds", Help: "Time it takes to write to the database", Buckets: defaultBuckets, }, - []string{"database_name"}, + []string{"environment_name", "database_name"}, ) connectLatency = promauto.NewHistogramVec(prometheus.HistogramOpts{ Name: "are_you_alive_connect_latency_seconds", Help: "Time it takes to connect to the database", Buckets: defaultBuckets, }, - []string{"database_name", "tablet_type"}, + []string{"environment_name", "database_name", "tablet_type"}, ) ) @@ -115,7 +115,7 @@ func ParseTabletType(connectionString string) string { } } -func openDatabase(connectionString string) (*sql.DB, error) { +func openDatabase(environmentName string, connectionString string) (*sql.DB, error) { databaseName := ParseDBName(connectionString) tabletType := ParseTabletType(connectionString) // NOTE: This is probably not measuring open connections. I think they @@ -125,8 +125,9 @@ func openDatabase(connectionString string) (*sql.DB, error) { // happening locally. We should just see everything complete within // milliseconds. labels := prometheus.Labels{ - "database_name": databaseName, - "tablet_type": tabletType} + "environment_name": environmentName, + "database_name": databaseName, + "tablet_type": tabletType} connectTimer := prometheus.NewTimer(connectLatency.With(labels)) connectErrorTimer := prometheus.NewTimer(connectErrorLatency.With(labels)) db, err := sql.Open("mysql", connectionString) @@ -143,13 +144,13 @@ func openDatabase(connectionString string) (*sql.DB, error) { // given tableName, and recreate it with the schema that the rest of the client // expects. This is not something any normal client would do but is convenient // here because we are just using this client for monitoring. -func InitializeDatabase(connectionString string, tableName string) error { +func InitializeDatabase(environmentName string, connectionString string, tableName string) error { // 0. Create logger log := logrus.WithField("connection_string", connectionString) // 1. Open client to database - db, err := openDatabase(connectionString) + db, err := openDatabase(environmentName, connectionString) if err != nil { log.WithError(err).Error("Error opening database") return err @@ -175,13 +176,13 @@ func InitializeDatabase(connectionString string, tableName string) error { // everything in the table given by tableName because this client expects the // table to be empty. No client would normally do this, but it's convenient for // testing. -func WipeTestTable(connectionString string, tableName string) error { +func WipeTestTable(environmentName string, connectionString string, tableName string) error { // 0. Create logger log := logrus.WithField("connection_string", connectionString) // 1. Open client to database - db, err := openDatabase(connectionString) + db, err := openDatabase(environmentName, connectionString) if err != nil { log.WithError(err).Error("Error opening database") return err @@ -197,14 +198,14 @@ func WipeTestTable(connectionString string, tableName string) error { // Write will write the record given by page to the test table in the database // referenced by connectionString. -func Write(connectionString string, page int) error { +func Write(environmentName string, connectionString string, page int) error { // 0. Create logger log := logrus.WithField("connection_string", connectionString) // 1. Open client to database databaseName := ParseDBName(connectionString) - db, err := openDatabase(connectionString) + db, err := openDatabase(environmentName, connectionString) if err != nil { log.WithError(err).Error("Error opening database") return err @@ -213,7 +214,8 @@ func Write(connectionString string, page int) error { // 2. Write record labels := prometheus.Labels{ - "database_name": databaseName} + "environment_name": environmentName, + "database_name": databaseName} writeTimer := prometheus.NewTimer(writeLatency.With(labels)) writeErrorTimer := prometheus.NewTimer(writeErrorLatency.With(labels)) if _, err := db.Exec("INSERT INTO are_you_alive_messages (page, message) VALUES (?, ?)", page, "foo"); err != nil { @@ -227,14 +229,14 @@ func Write(connectionString string, page int) error { // Read will read the record given by page from the test table in the database // referenced by connectionString. -func Read(connectionString string, page int) (int, string, error) { +func Read(environmentName string, connectionString string, page int) (int, string, error) { // 0. Create logger log := logrus.WithField("connection_string", connectionString) // 1. Open client to database databaseName := ParseDBName(connectionString) - db, err := openDatabase(connectionString) + db, err := openDatabase(environmentName, connectionString) if err != nil { log.WithError(err).Error("Error opening database") return 0, "", err @@ -244,8 +246,9 @@ func Read(connectionString string, page int) (int, string, error) { // 2. Read record tabletType := ParseTabletType(connectionString) labels := prometheus.Labels{ - "database_name": databaseName, - "tablet_type": tabletType} + "environment_name": environmentName, + "database_name": databaseName, + "tablet_type": tabletType} readTimer := prometheus.NewTimer(readLatency.With(labels)) readErrorTimer := prometheus.NewTimer(readErrorLatency.With(labels)) row := db.QueryRow("SELECT * FROM are_you_alive_messages WHERE page=?", page) @@ -272,14 +275,14 @@ func Read(connectionString string, page int) (int, string, error) { // Count will count all the documents in the test table in the database // referenced by connectionString. -func Count(connectionString string) (int, error) { +func Count(environmentName string, connectionString string) (int, error) { // 0. Create logger log := logrus.WithField("connection_string", connectionString) // 1. Open client to database databaseName := ParseDBName(connectionString) - db, err := openDatabase(connectionString) + db, err := openDatabase(environmentName, connectionString) if err != nil { log.WithError(err).Error("Error opening database") return 0, err @@ -289,8 +292,9 @@ func Count(connectionString string) (int, error) { // 2. Run Count tabletType := ParseTabletType(connectionString) labels := prometheus.Labels{ - "database_name": databaseName, - "tablet_type": tabletType} + "environment_name": environmentName, + "database_name": databaseName, + "tablet_type": tabletType} countTimer := prometheus.NewTimer(countLatency.With(labels)) countErrorTimer := prometheus.NewTimer(countErrorLatency.With(labels)) row := db.QueryRow("SELECT COUNT(*) FROM are_you_alive_messages") @@ -309,7 +313,7 @@ func Count(connectionString string) (int, error) { // Delete will delete the record given by page from the test table in the // database referenced by connectionString. -func Delete(connectionString string, page int) error { +func Delete(environmentName string, connectionString string, page int) error { // 0. Create logger log := logrus.WithFields(logrus.Fields{ @@ -320,10 +324,11 @@ func Delete(connectionString string, page int) error { // 1. Open client to database databaseName := ParseDBName(connectionString) labels := prometheus.Labels{ - "database_name": databaseName} + "environment_name": environmentName, + "database_name": databaseName} deleteTimer := prometheus.NewTimer(deleteLatency.With(labels)) deleteErrorTimer := prometheus.NewTimer(deleteErrorLatency.With(labels)) - db, err := openDatabase(connectionString) + db, err := openDatabase(environmentName, connectionString) if err != nil { log.WithError(err).Error("Error opening database") deleteErrorTimer.ObserveDuration() diff --git a/examples/operator/101_initial_cluster.yaml b/examples/operator/101_initial_cluster.yaml index 10671a4dcc0..60e8d118b50 100644 --- a/examples/operator/101_initial_cluster.yaml +++ b/examples/operator/101_initial_cluster.yaml @@ -173,7 +173,7 @@ stringData: SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER ON *.* TO 'vt_filtered'@'localhost'; - # User for Orchestrator (https://github.com/openark/orchestrator). + # User for Orchestrator (https://github.com/github/orchestrator). # TODO: Reenable when the password is randomly generated. #CREATE USER 'orc_client_user'@'%' IDENTIFIED BY 'orc_client_user_password'; #GRANT SUPER, PROCESS, REPLICATION SLAVE, RELOAD diff --git a/examples/operator/pf.sh b/examples/operator/pf.sh index c0b267155f5..09485e04c6a 100755 --- a/examples/operator/pf.sh +++ b/examples/operator/pf.sh @@ -1,12 +1,12 @@ #!/bin/sh -kubectl port-forward --address localhost "$(kubectl get service --selector="planetscale.com/component=vtctld" -o name | head -n1)" 15000 15999 & +kubectl port-forward --address localhost deployment/"$(kubectl get deployment --selector="planetscale.com/component=vtctld" -o=jsonpath="{.items..metadata.name}")" 15000 15999 & process_id1=$! -kubectl port-forward --address localhost "$(kubectl get service --selector="planetscale.com/component=vtgate,!planetscale.com/cell" -o name | head -n1)" 15306:3306 & +kubectl port-forward --address localhost deployment/"$(kubectl get deployment --selector="planetscale.com/component=vtgate" -o=jsonpath="{.items..metadata.name}")" 15306:3306 & process_id2=$! sleep 2 echo "You may point your browser to http://localhost:15000, use the following aliases as shortcuts:" -echo 'alias vtctlclient="vtctlclient -server=localhost:15999 -logtostderr"' +echo 'alias vtctlclient="vtctlclient -server=localhost:15999"' echo 'alias mysql="mysql -h 127.0.0.1 -P 15306 -u user"' echo "Hit Ctrl-C to stop the port forwards" wait $process_id1 diff --git a/go.mod b/go.mod index 1ff58dc17cc..7143ed608d6 100644 --- a/go.mod +++ b/go.mod @@ -5,10 +5,9 @@ go 1.13 require ( cloud.google.com/go v0.45.1 github.com/Azure/azure-storage-blob-go v0.8.0 - github.com/Azure/go-autorest/autorest v0.10.0 // indirect + github.com/Azure/go-autorest/autorest/adal v0.8.1 // indirect github.com/GeertJohan/go.rice v1.0.0 github.com/PuerkitoBio/goquery v1.5.1 - github.com/TylerBrock/colorjson v0.0.0-20180527164720-95ec53f28296 github.com/armon/go-metrics v0.0.0-20190430140413-ec5e00d3c878 // indirect github.com/aws/aws-sdk-go v1.28.8 github.com/buger/jsonparser v0.0.0-20200322175846-f7e751efca13 @@ -26,19 +25,18 @@ require ( github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6 // indirect github.com/golang/mock v1.3.1 github.com/golang/protobuf v1.3.2 - github.com/golang/snappy v0.0.1 + github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db github.com/google/go-cmp v0.4.0 github.com/googleapis/gnostic v0.2.0 // indirect github.com/gorilla/websocket v1.4.0 github.com/grpc-ecosystem/go-grpc-middleware v1.1.0 github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 - github.com/hashicorp/consul/api v1.5.0 - github.com/hashicorp/go-immutable-radix v1.1.0 // indirect + github.com/hashicorp/consul v1.4.5 github.com/hashicorp/go-msgpack v0.5.5 // indirect - github.com/hashicorp/go-sockaddr v1.0.2 // indirect - github.com/hashicorp/go-uuid v1.0.2 // indirect + github.com/hashicorp/go-rootcerts v1.0.2 // indirect github.com/hashicorp/golang-lru v0.5.3 // indirect - github.com/hashicorp/serf v0.9.2 // indirect + github.com/hashicorp/memberlist v0.1.4 // indirect + github.com/hashicorp/serf v0.8.5 // indirect github.com/icrowley/fake v0.0.0-20180203215853-4178557ae428 github.com/imdario/mergo v0.3.6 // indirect github.com/klauspost/compress v1.4.1 // indirect @@ -47,12 +45,9 @@ require ( github.com/konsorten/go-windows-terminal-sequences v1.0.2 // indirect github.com/krishicks/yaml-patch v0.0.10 github.com/magiconair/properties v1.8.1 - github.com/manifoldco/promptui v0.7.0 github.com/minio/minio-go v0.0.0-20190131015406-c8a261de75c1 - github.com/mitchellh/go-ps v1.0.0 // indirect github.com/mitchellh/go-testing-interface v1.14.0 // indirect - github.com/mitchellh/mapstructure v1.2.3 // indirect - github.com/olekukonko/tablewriter v0.0.5-0.20200416053754-163badb3bac6 + github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5 github.com/onsi/ginkgo v1.10.3 // indirect github.com/onsi/gomega v1.7.1 // indirect github.com/opentracing-contrib/go-grpc v0.0.0-20180928155321-4b5a12d3ff02 @@ -63,9 +58,8 @@ require ( github.com/pkg/errors v0.8.1 github.com/prometheus/client_golang v1.4.1 github.com/prometheus/common v0.9.1 - github.com/satori/go.uuid v1.2.0 // indirect + github.com/satori/go.uuid v0.0.0-20160713180306-0aa62d5ddceb // indirect github.com/smartystreets/goconvey v1.6.4 // indirect - github.com/spf13/cobra v0.0.5 github.com/stretchr/testify v1.4.0 github.com/tchap/go-patricia v0.0.0-20160729071656-dd168db6051b github.com/tebeka/selenium v0.9.9 @@ -76,11 +70,10 @@ require ( github.com/uber/jaeger-lib v2.0.0+incompatible // indirect github.com/ugorji/go v1.1.7 // indirect github.com/z-division/go-zookeeper v0.0.0-20190128072838-6d7457066b9b - golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975 + golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413 golang.org/x/lint v0.0.0-20190409202823-959b441ac422 golang.org/x/net v0.0.0-20200202094626-16171245cfb2 golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 - golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e golang.org/x/text v0.3.2 golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 golang.org/x/tools v0.0.0-20191219041853-979b82bfef62 diff --git a/go.sum b/go.sum index d017a2f9d3b..057f55bc830 100644 --- a/go.sum +++ b/go.sum @@ -15,11 +15,9 @@ github.com/Azure/azure-storage-blob-go v0.8.0/go.mod h1:lPI3aLPpuLTeUwh1sViKXFxw github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/Azure/go-autorest/autorest v0.9.0 h1:MRvx8gncNaXJqOoLmhNjUAKh33JJF8LyxPhomEtOsjs= github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= -github.com/Azure/go-autorest/autorest v0.10.0 h1:mvdtztBqcL8se7MdrUweNieTNi4kfNG6GOJuurQJpuY= -github.com/Azure/go-autorest/autorest v0.10.0/go.mod h1:/FALq9T/kS7b5J5qsQ+RSTUdAmGFqi0vUdVNNx8q630= github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= -github.com/Azure/go-autorest/autorest/adal v0.8.2 h1:O1X4oexUxnZCaEUGsvMnr8ZGj8HI37tNezwY4npRqA0= -github.com/Azure/go-autorest/autorest/adal v0.8.2/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= +github.com/Azure/go-autorest/autorest/adal v0.8.1 h1:pZdL8o72rK+avFWl+p9nE8RWi1JInZrWJYlnpfXJwHk= +github.com/Azure/go-autorest/autorest/adal v0.8.1/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= github.com/Azure/go-autorest/autorest/date v0.2.0 h1:yW+Zlqf26583pE43KhfnhFcdmSWlm5Ew6bxipnr/tbM= github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= @@ -37,7 +35,6 @@ github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802 h1:1BDTz0u9nC3//pOC github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/BurntSushi/xgbutil v0.0.0-20160919175755-f7c97cef3b4e h1:4ZrkT/RzpnROylmoQL57iVUL57wGKTR5O6KpVnbm2tA= github.com/BurntSushi/xgbutil v0.0.0-20160919175755-f7c97cef3b4e/go.mod h1:uw9h2sd4WWHOPdJ13MQpwK5qYWKYDumDqxWWIknEQ+k= -github.com/DataDog/datadog-go v2.2.0+incompatible h1:V5BKkxACZLjzHjSgBbr2gvLA2Ae49yhc6CSY7MLy5k4= github.com/DataDog/datadog-go v2.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/GeertJohan/go.incremental v1.0.0 h1:7AH+pY1XUgQE4Y1HcXYaMqAI0m9yrFqo/jt0CW30vsg= github.com/GeertJohan/go.incremental v1.0.0/go.mod h1:6fAjUhbVuX1KcMD3c8TEgVUqmo4seqhv0i0kdATSkM0= @@ -54,8 +51,6 @@ github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbt github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= -github.com/TylerBrock/colorjson v0.0.0-20180527164720-95ec53f28296 h1:JYWTroLXcNzSCgu66NMgdjwoMHQRbv2SoOVNFb4kRkE= -github.com/TylerBrock/colorjson v0.0.0-20180527164720-95ec53f28296/go.mod h1:VSw57q4QFiWDbRnjdX8Cb3Ow0SFncRw+bA/ofY6Q83w= github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= github.com/akavel/rsrc v0.8.0 h1:zjWn7ukO9Kc5Q62DOJCcxGpXC18RawVtYAGdz2aLlfw= github.com/akavel/rsrc v0.8.0/go.mod h1:uLoCtb9J+EyAqh+26kdrTgmzRBFPGOolLWKpdxkKq+c= @@ -68,15 +63,12 @@ github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRF github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= github.com/andybalholm/cascadia v1.1.0 h1:BuuO6sSfQNFRu1LppgbD25Hr2vLYW25JvxHs5zzsLTo= github.com/andybalholm/cascadia v1.1.0/go.mod h1:GsXiBklL0woXo1j/WYWtSYYC4ouU9PqHO0sqidkEA4Y= -github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e h1:QEF07wC0T1rKkctt1RINW/+RMTVmiwxETico2l3gxJA= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-metrics v0.0.0-20190430140413-ec5e00d3c878 h1:EFSB7Zo9Eg91v7MJPVsifUysc/wPdN+NOnVe6bWbdBM= github.com/armon/go-metrics v0.0.0-20190430140413-ec5e00d3c878/go.mod h1:3AMJUQhVx52RsWOnlkpikZr01T/yAVN2gn0861vByNg= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/armon/go-radix v1.0.0 h1:F4z6KzEeeQIMeLFa97iZU6vupzoecKdU5TX24SNppXI= -github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= @@ -88,7 +80,6 @@ github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24 github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/blang/semver v3.5.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ= @@ -97,13 +88,7 @@ github.com/buger/jsonparser v0.0.0-20200322175846-f7e751efca13 h1:+qUNY4VRkEH46b github.com/buger/jsonparser v0.0.0-20200322175846-f7e751efca13/go.mod h1:tgcrVJ81GPSF0mz+0nu1Xaz0fazGPrmmJfJtxjbHhUQ= github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e h1:fY5BOSpyZCqRo5OhCuC+XN+r/bBCmeuuJtjz+bCNIf8= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= -github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible h1:C29Ae4G5GtYyYMm1aztcyj/J5ckgJm2zwdDajFbx1NY= github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= -github.com/circonus-labs/circonusllhist v0.1.3 h1:TJH+oke8D16535+jHExHj4nQvzlZrj7ug5D7I/orNUA= github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= @@ -115,7 +100,6 @@ github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkE github.com/coreos/etcd v3.3.10+incompatible h1:jFneRYjIvLMLhDLCzuTuU4rSJUjRplcJQ7pD7MnhC04= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= -github.com/coreos/go-oidc v2.1.0+incompatible h1:sdJrfw8akMnCuUlaZU3tE/uYXFgfqom8DBE9so9EBsM= github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM= @@ -154,8 +138,6 @@ github.com/evanphx/json-patch v4.5.0+incompatible h1:ouOWdg56aJriqS0huScTkVXPC5I github.com/evanphx/json-patch v4.5.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/color v1.9.0 h1:8xPHl4/q1VyqGIPif1F+1V3Y3lSmrq01EabUW3CoW5s= -github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= @@ -234,8 +216,8 @@ github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5y github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4= -github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db h1:woRePGFeVFfLKN/pOkfl+p/TAqKOfFu+7KPlMVpok/w= +github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= @@ -246,7 +228,6 @@ github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-github/v27 v27.0.4/go.mod h1:/0Gr8pJ55COkmv+S/yPKCczSkUPIM/LnFyubufRNIS0= -github.com/google/go-querystring v1.0.0 h1:Xkwi/a1rcvNg1PPYe5vI8GbeBY/jrVuDX5ASuANWTrk= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/gofuzz v0.0.0-20161122191042-44d81051d367/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= @@ -266,7 +247,6 @@ github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5m github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/googleapis/gnostic v0.2.0 h1:l6N3VoaVzTncYYW+9yOz2LJJammFZGBO13sqgEhpy9g= github.com/googleapis/gnostic v0.2.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= -github.com/gophercloud/gophercloud v0.1.0 h1:P/nh25+rzXouhytV2pUHBb65fnds26Ghl8/391+sT5o= github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e h1:JKmoR8x90Iww1ks85zJ1lfDGgIiMDuIptTOhJq+zKyg= @@ -282,43 +262,29 @@ github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92Bcuy github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.9.5 h1:UImYN5qQ8tuGpGE16ZmjvcTtTw24zw1QAp/SlnNrZhI= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/hashicorp/consul/api v1.5.0 h1:Yo2bneoGy68A7aNwmuETFnPhjyBEm7n3vzRacEVMjvI= -github.com/hashicorp/consul/api v1.5.0/go.mod h1:LqwrLNW876eYSuUOo4ZLHBcdKc038txr/IMfbLPATa4= -github.com/hashicorp/consul/sdk v0.5.0 h1:WC4594Wp/LkEeML/OdQKEC1yqBmEYkRp6i7X5u0zDAs= -github.com/hashicorp/consul/sdk v0.5.0/go.mod h1:fY08Y9z5SvJqevyZNy6WWPXiG3KwBPAvlcdx16zZ0fM= +github.com/hashicorp/consul v1.4.5 h1:ubKneQZvooWl/UkkIdx/Rhr/YKOo4OYL3qDAAfkU1Mw= +github.com/hashicorp/consul v1.4.5/go.mod h1:mFrjN1mfidgJfYP1xrJCF+AfRhr6Eaqhb2+sfyn/OOI= github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-cleanhttp v0.5.0 h1:wvCrVc9TjDls6+YGAF2hAifE1E5U1+b4tH6KdvN3Gig= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-cleanhttp v0.5.1 h1:dH3aiDG9Jvb5r5+bYHsikaOUIpcM0xvgMXVoDkXMzJM= -github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-hclog v0.12.0 h1:d4QkX8FRTYaKaCZBoXYY8zJX2BXjWxurN/GA2tkrmZM= -github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-immutable-radix v1.0.0 h1:AKDB1HM5PWEA7i4nhcpwOrO2byshxBjXVn/J/3+z5/0= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-immutable-radix v1.1.0 h1:vN9wG1D6KG6YHRTWr8512cxGOVgTMEfgEdSj/hr8MPc= -github.com/hashicorp/go-immutable-radix v1.1.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-msgpack v0.5.5 h1:i9R9JSrqIz0QVLz3sz+i3YJdT7TTSLcfLLzJi9aZTuI= github.com/hashicorp/go-msgpack v0.5.5/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0 h1:iVjPR7a6H0tWELX5NxNe7bYopibicUzc7uPribsnS6o= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-multierror v1.1.0 h1:B9UzwGQJehnUY1yNrnwREHc3fGbC2xefo8g4TbElacI= -github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-rootcerts v1.0.2 h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5Oi2viEzc= github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= github.com/hashicorp/go-sockaddr v1.0.0 h1:GeH6tui99pF4NJgfnhp+L6+FfobzVW3Ah46sLo0ICXs= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= -github.com/hashicorp/go-sockaddr v1.0.2 h1:ztczhD1jLxIRjVejw8gFomI1BQZOe2WoVOu0SyteCQc= -github.com/hashicorp/go-sockaddr v1.0.2/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjGlgmH/UkBUC97A= -github.com/hashicorp/go-syslog v1.0.0 h1:KaodqZuhUoZereWVIYmpUgZysurB1kBLX2j0MwMrUAE= github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1 h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-uuid v1.0.2 h1:cfejS+Tpcp13yd5nYHWDI6qVCny6wyX2Mt5SGur2IGE= -github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.3 h1:YPkqC67at8FYaadspW/6uE0COsBxS2656RLEr8Bppgk= @@ -326,14 +292,12 @@ github.com/hashicorp/golang-lru v0.5.3/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uG github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= -github.com/hashicorp/mdns v1.0.1 h1:XFSOubp8KWB+Jd2PDyaX5xUd5bhSP/+pTDZVDMzZJM8= -github.com/hashicorp/mdns v1.0.1/go.mod h1:4gW7WsVCke5TE7EPeYliwHlRUyBtfCwuFwuMg2DmyNY= -github.com/hashicorp/memberlist v0.2.0/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= -github.com/hashicorp/memberlist v0.2.2 h1:5+RffWKwqJ71YPu9mWsF7ZOscZmwfasdA8kbdC7AO2g= -github.com/hashicorp/memberlist v0.2.2/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= -github.com/hashicorp/serf v0.9.0/go.mod h1:YL0HO+FifKOW2u1ke99DGVu1zhcpZzNwrLIqBC7vbYU= -github.com/hashicorp/serf v0.9.2 h1:yJoyfZXo4Pk2p/M/viW+YLibBFiIbKoP79gu7kDAFP0= -github.com/hashicorp/serf v0.9.2/go.mod h1:UWDWwZeL5cuWDJdl0C6wrvrUwEqtQ4ZKBKKENpqIUyk= +github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= +github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= +github.com/hashicorp/memberlist v0.1.4 h1:gkyML/r71w3FL8gUi74Vk76avkj/9lYAY9lvg0OcoGs= +github.com/hashicorp/memberlist v0.1.4/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= +github.com/hashicorp/serf v0.8.5 h1:ZynDUIQiA8usmRgPdGPHFdPnb1wgGI9tK3mO9hcAJjc= +github.com/hashicorp/serf v0.8.5/go.mod h1:UpNcs7fFbpKIyZaUuSW6EPiH+eZC7OuyFD+wc1oal+k= github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/icrowley/fake v0.0.0-20180203215853-4178557ae428 h1:Mo9W14pwbO9VfRe+ygqZ8dFbPpoIK1HFrG/zjTuQ+nc= @@ -360,8 +324,6 @@ github.com/jtolds/gls v4.2.1+incompatible h1:fSuqC+Gmlu6l/ZYAoZzx2pyucC8Xza35fpR github.com/jtolds/gls v4.2.1+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/juju/ansiterm v0.0.0-20180109212912-720a0952cc2a h1:FaWFmfWdAUKbSCtOU2QjDaorUexogfaMgbipgYATUMU= -github.com/juju/ansiterm v0.0.0-20180109212912-720a0952cc2a/go.mod h1:UJSiEoRfvx3hP73CvoARgeLjaIOjybY9vj8PUPPFGeU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= @@ -380,16 +342,12 @@ github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxv github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs= -github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/krishicks/yaml-patch v0.0.10 h1:H4FcHpnNwVmw8u0MjPRjWyIXtco6zM2F78t+57oNM3E= github.com/krishicks/yaml-patch v0.0.10/go.mod h1:Sm5TchwZS6sm7RJoyg87tzxm2ZcKzdRE4Q7TjNhPrME= -github.com/lunixbochs/vtclean v0.0.0-20180621232353-2d01aacdc34a h1:weJVJJRzAJBFRlAiJQROKQs8oC9vOxvm4rZmBBk0ONw= -github.com/lunixbochs/vtclean v0.0.0-20180621232353-2d01aacdc34a/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm/+2c2E2WMI= github.com/magiconair/properties v1.8.0 h1:LLgXmsheXeRoUOBOjtwPQCWIYqM/LU1ayDtDePerRcY= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4= @@ -400,52 +358,27 @@ github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= -github.com/manifoldco/promptui v0.7.0 h1:3l11YT8tm9MnwGFQ4kETwkzpAwY2Jt9lCrumCUW4+z4= -github.com/manifoldco/promptui v0.7.0/go.mod h1:n4zTdgP0vr0S3w7/O/g98U+e0gwLScEXGwov2nIKuGQ= -github.com/mattn/go-colorable v0.0.9 h1:UVL0vNpWh04HeJXV0KLcaT7r06gOH2l4OW6ddYRUIY4= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.6 h1:6Su7aK7lXmJ/U79bYtBjLNaha4Fs1Rg9plHpcH+vvnE= -github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-ieproxy v0.0.0-20190610004146-91bb50d98149 h1:HfxbT6/JcvIljmERptWhwa8XzP7H3T+Z2N26gTsaDaA= github.com/mattn/go-ieproxy v0.0.0-20190610004146-91bb50d98149/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.4 h1:bnP0vzxcAdeI1zdubAl5PjU6zsERjGZb7raWodagDYs= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= -github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= -github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= -github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-runewidth v0.0.2 h1:UnlwIPBGaTZfPQ6T1IGzPI0EkYAQmT9fAEJ/poFC63o= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-runewidth v0.0.7 h1:Ei8KR0497xHyKJPAv59M1dkC+rOZCMBJ+t3fZ+twI54= -github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/miekg/dns v1.0.14 h1:9jZdLNd/P4+SfEJ0TNyxYpsK8N4GtfylBLqtbYN1sbA= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/miekg/dns v1.1.26 h1:gPxPSwALAeHJSjarOs00QjVdV9QoBvc1D2ujQUr5BzU= -github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= github.com/minio/minio-go v0.0.0-20190131015406-c8a261de75c1 h1:jw16EimP5oAEM/2wt+SiEUov/YDyTCTDuPtIKgQIvk0= github.com/minio/minio-go v0.0.0-20190131015406-c8a261de75c1/go.mod h1:vuvdOZLJuf5HmJAJrKV64MmozrSsk+or0PB5dzdfspg= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= -github.com/mitchellh/cli v1.1.0 h1:tEElEatulEHDeedTxwckzyYMA5c86fbmNIUL1hBIiTg= -github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-ps v1.0.0 h1:i6ampVEEF4wQFF+bkYfwYgY+F/uYJDktmvLPf7qIgjc= -github.com/mitchellh/go-ps v1.0.0/go.mod h1:J4lOc8z8yJs6vUwklHw2XEIiT4z4C40KtWVN3nvg8Pg= -github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/go-testing-interface v1.14.0 h1:/x0XQ6h+3U3nAyk1yx+bHPURrKa9sVVvYbuqZ7pIAtI= github.com/mitchellh/go-testing-interface v1.14.0/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8= -github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.2.3 h1:f/MjBEBDLttYCGfRaKBbKSRVF5aV2O6fnBpzknuE3jU= -github.com/mitchellh/mapstructure v1.2.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -462,10 +395,6 @@ github.com/nkovacs/streamquote v0.0.0-20170412213628-49af9bddb229 h1:E2B8qYyeSgv github.com/nkovacs/streamquote v0.0.0-20170412213628-49af9bddb229/go.mod h1:0aYXnNPJ8l7uZxf45rWW1a/uME32OF0rhiYGNQ2oF2E= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5 h1:58+kh9C6jJVXYjt8IE48G2eWl6BjwU5Gj0gqY84fy78= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= -github.com/olekukonko/tablewriter v0.0.4 h1:vHD/YYe1Wolo78koG299f7V/VAS08c6IpCLn+Ejf/w8= -github.com/olekukonko/tablewriter v0.0.4/go.mod h1:zq6QwlOf5SlnkVbMSr5EoBv3636FWnp+qbPhuoO21uA= -github.com/olekukonko/tablewriter v0.0.5-0.20200416053754-163badb3bac6 h1:F721VBMijn0OBFZ5wUSuMVVLQj2IJiiupn6UNd7UbBE= -github.com/olekukonko/tablewriter v0.0.5-0.20200416053754-163badb3bac6/go.mod h1:zq6QwlOf5SlnkVbMSr5EoBv3636FWnp+qbPhuoO21uA= github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= @@ -498,8 +427,6 @@ github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77 github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= -github.com/posener/complete v1.2.3 h1:NP0eAhjcjImqslEwo/1hq7gpajME0fTLTezBKDqfXqo= -github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.2 h1:awm861/B8OKDd2I/6o1dy3ra4BamzKhYOiGItCeZ740= @@ -528,10 +455,8 @@ github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6So github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/ryanuber/columnize v2.1.0+incompatible h1:j1Wcmh8OrK4Q7GXY+V7SVSY8nUWQxHW5TkBe7YUl+2s= -github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww= -github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= +github.com/satori/go.uuid v0.0.0-20160713180306-0aa62d5ddceb h1:1r/p6yT1FfHR1+qBm7UYBPgfqCmzz/8mpNvfc+iKlfU= +github.com/satori/go.uuid v0.0.0-20160713180306-0aa62d5ddceb/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= @@ -584,7 +509,6 @@ github.com/tinylib/msgp v1.1.1/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDW github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5 h1:LnC5Kc/wtumK+WB441p7ynQJzVuNRJiqddSIE3IlSEQ= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926 h1:G3dpKMzFDjgEh2q1Z7zUUtKa8ViPtH+ocF0bE0g00O8= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= github.com/uber-go/atomic v1.4.0 h1:yOuPqEq4ovnhEjpHmfFwsqBXDYbQeT6Nb0bwD6XnD5o= github.com/uber-go/atomic v1.4.0/go.mod h1:/Ct5t2lcmbJ4OSe/waGBoaVvVqtO0bmtfVNex1PFV8g= @@ -636,13 +560,10 @@ golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550 h1:ObdrDkeb4kJdCP557AjRjq69pTHfNouLtWZG7j9rPN8= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413 h1:ULYEB3JvPRE/IfO+9uO7vKV/xzVTO7XPAwm8xbf4w2g= golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975 h1:/Tl7pH94bvbAAHBdZJT947M/+gp0+CqQXDtMRC0fseo= -golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190312203227-4b39c73a6495/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -680,7 +601,6 @@ golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191004110552-13f9640d40b9 h1:rjwSpXsdiK0dV8/Naq3kAw9ymfAeJIyd0upUIElB+lI= golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2 h1:CCH4IOTTfewWjGOlSp+zGcjutRKlBEZQ6wTn8ozI/nI= @@ -705,12 +625,10 @@ golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190124100055-b90733256f2e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190209173611-3b5209105503/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190321052220-f7bb7a8bee54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -721,16 +639,8 @@ golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82 h1:ywK/j/KkyTHcdyYSZNXGjMwgmDSfjglYZ3vStQ/gSCU= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae h1:/WDfKMnPU+m5M4xB+6x4kaepxRw6jWvR5iDRdvjHgy8= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -761,7 +671,6 @@ golang.org/x/tools v0.0.0-20190617190820-da514acc4774/go.mod h1:/rFqwRUd4F7ZHNgw golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190624190245-7f2218787638/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190920225731-5eefd052ad72/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191219041853-979b82bfef62 h1:vDaiisQl0rGVXqk3wT2yc43gSnwlj4haEG5J78IGZP4= golang.org/x/tools v0.0.0-20191219041853-979b82bfef62/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= @@ -826,7 +735,6 @@ gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ldap.v2 v2.5.0 h1:1rO3ojzsHUk+gq4ZYhC4Pg+EzWaaKIV8+DJwExS5/QQ= gopkg.in/ldap.v2 v2.5.0/go.mod h1:oI0cpe/D7HRtBQl8aTg+ZmzFUAvu4lsv3eLXMLGFxWk= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= -gopkg.in/resty.v1 v1.12.0 h1:CuXP0Pjfw9rOuY6EP+UvtNvt5DSqHpIxILZKT/quCZI= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= diff --git a/go/cmd/automation_client/automation_client.go b/go/cmd/automation_client/automation_client.go index 61bb65b47a6..4cea96c83d0 100644 --- a/go/cmd/automation_client/automation_client.go +++ b/go/cmd/automation_client/automation_client.go @@ -92,7 +92,7 @@ func main() { Parameters: params.parameters, } fmt.Printf("Sending request:\n%v", proto.MarshalTextString(enqueueRequest)) - enqueueResponse, err := client.EnqueueClusterOperation(context.Background(), enqueueRequest, grpc.WaitForReady(true)) + enqueueResponse, err := client.EnqueueClusterOperation(context.Background(), enqueueRequest, grpc.FailFast(false)) if err != nil { fmt.Println("Failed to enqueue ClusterOperation. Error:", err) os.Exit(4) @@ -113,7 +113,7 @@ func waitForClusterOp(client automationservicepb.AutomationClient, id string) (* Id: id, } - resp, err := client.GetClusterOperationDetails(context.Background(), req, grpc.WaitForReady(true)) + resp, err := client.GetClusterOperationDetails(context.Background(), req, grpc.FailFast(false)) if err != nil { return nil, fmt.Errorf("failed to get ClusterOperation Details. Request: %v Error: %v", req, err) } diff --git a/go/cmd/mysqlctl/mysqlctl.go b/go/cmd/mysqlctl/mysqlctl.go index 362e2a41bfa..8793d8420a6 100644 --- a/go/cmd/mysqlctl/mysqlctl.go +++ b/go/cmd/mysqlctl/mysqlctl.go @@ -42,8 +42,7 @@ var ( tabletUID = flag.Uint("tablet_uid", 41983, "tablet uid") mysqlSocket = flag.String("mysql_socket", "", "path to the mysql socket") - // Reason for nolint : Being used in line 246 (tabletAddr = netutil.JoinHostPort("localhost", int32(*port)) - tabletAddr string //nolint + tabletAddr string ) func initConfigCmd(subFlags *flag.FlagSet, args []string) error { diff --git a/go/cmd/vtbackup/vtbackup.go b/go/cmd/vtbackup/vtbackup.go index 5cb4d5be52c..944e593a5e1 100644 --- a/go/cmd/vtbackup/vtbackup.go +++ b/go/cmd/vtbackup/vtbackup.go @@ -322,7 +322,7 @@ func takeBackup(ctx context.Context, topoServer *topo.Server, backupStorage back // Get the current master replication position, and wait until we catch up // to that point. We do this instead of looking at Seconds_Behind_Master - // because that value can + // (replication lag reported by SHOW SLAVE STATUS) because that value can // sometimes lie and tell you there's 0 lag when actually replication is // stopped. Also, if replication is making progress but is too slow to ever // catch up to live changes, we'd rather take a backup of something rather @@ -360,7 +360,7 @@ func takeBackup(ctx context.Context, topoServer *topo.Server, backupStorage back case <-time.After(time.Second): } - status, statusErr := mysqld.ReplicationStatus() + status, statusErr := mysqld.SlaveStatus() if statusErr != nil { log.Warningf("Error getting replication status: %v", statusErr) continue @@ -371,7 +371,7 @@ func takeBackup(ctx context.Context, topoServer *topo.Server, backupStorage back log.Infof("Replication caught up to %v after %v", status.Position, time.Since(waitStartTime)) break } - if !status.ReplicationRunning() { + if !status.SlaveRunning() { log.Warning("Replication has stopped before backup could be taken. Trying to restart replication.") if err := startReplication(ctx, mysqld, topoServer); err != nil { log.Warningf("Failed to restart replication: %v", err) @@ -380,12 +380,12 @@ func takeBackup(ctx context.Context, topoServer *topo.Server, backupStorage back } // Stop replication and see where we are. - if err := mysqld.StopReplication(nil); err != nil { + if err := mysqld.StopSlave(nil); err != nil { return fmt.Errorf("can't stop replication: %v", err) } // Did we make any progress? - status, err := mysqld.ReplicationStatus() + status, err := mysqld.SlaveStatus() if err != nil { return fmt.Errorf("can't get replication status: %v", err) } @@ -414,14 +414,14 @@ func resetReplication(ctx context.Context, pos mysql.Position, mysqld mysqlctl.M "RESET SLAVE ALL", // "ALL" makes it forget master host:port. } if err := mysqld.ExecuteSuperQueryList(ctx, cmds); err != nil { - return vterrors.Wrap(err, "failed to reset replication") + return vterrors.Wrap(err, "failed to reset slave") } // Check if we have a position to resume from, if not reset to the beginning of time if !pos.IsZero() { // Set the position at which to resume from the master. - if err := mysqld.SetReplicationPosition(ctx, pos); err != nil { - return vterrors.Wrap(err, "failed to set replica position") + if err := mysqld.SetSlavePosition(ctx, pos); err != nil { + return vterrors.Wrap(err, "failed to set slave position") } } else { if err := mysqld.ResetReplication(ctx); err != nil { @@ -448,8 +448,8 @@ func startReplication(ctx context.Context, mysqld mysqlctl.MysqlDaemon, topoServ return vterrors.Wrapf(err, "Cannot read master tablet %v", si.MasterAlias) } - // Stop replication (in case we're restarting), set master, and start replication. - if err := mysqld.SetMaster(ctx, ti.Tablet.MysqlHostname, int(ti.Tablet.MysqlPort), true /* stopReplicationBefore */, true /* startReplicationAfter */); err != nil { + // Stop slave (in case we're restarting), set master, and start slave. + if err := mysqld.SetMaster(ctx, topoproto.MysqlHostname(ti.Tablet), int(topoproto.MysqlPort(ti.Tablet)), true /* slaveStopBefore */, true /* slaveStartAfter */); err != nil { return vterrors.Wrap(err, "MysqlDaemon.SetMaster failed") } return nil diff --git a/go/cmd/vtcombo/main.go b/go/cmd/vtcombo/main.go index d5175475646..89afce3d45a 100644 --- a/go/cmd/vtcombo/main.go +++ b/go/cmd/vtcombo/main.go @@ -165,7 +165,7 @@ func main() { exit.Return(1) } - // Now that we have fully initialized the tablets, rebuild the keyspace graph. + // Now that we have fully initialized the tablets, rebuild the keyspace graph. This is what would normally happen in InitTablet. for _, ks := range tpb.Keyspaces { err := topotools.RebuildKeyspace(context.Background(), logutil.NewConsoleLogger(), ts, ks.GetName(), tpb.Cells) if err != nil { diff --git a/go/cmd/vtctld/schema.go b/go/cmd/vtctld/schema.go index df93cbc393c..5f508d6e129 100644 --- a/go/cmd/vtctld/schema.go +++ b/go/cmd/vtctld/schema.go @@ -36,9 +36,7 @@ var ( schemaChangeController = flag.String("schema_change_controller", "", "schema change controller is responsible for finding schema changes and responding to schema change events") schemaChangeCheckInterval = flag.Int("schema_change_check_interval", 60, "this value decides how often we check schema change dir, in seconds") schemaChangeUser = flag.String("schema_change_user", "", "The user who submits this schema change.") - // for backwards compatibility - deprecatedTimeout = flag.Duration("schema_change_slave_timeout", wrangler.DefaultWaitReplicasTimeout, "DEPRECATED -- use -schema_change_replicas_timeout instead") - schemaChangeReplicasTimeout = flag.Duration("schema_change_replicas_timeout", wrangler.DefaultWaitReplicasTimeout, "how long to wait for replicas to receive the schema change") + schemaChangeSlaveTimeout = flag.Duration("schema_change_slave_timeout", 10*time.Second, "how long to wait for slaves to receive the schema change") ) func initSchema() { @@ -48,9 +46,6 @@ func initSchema() { if *schemaChangeCheckInterval > 0 { interval = *schemaChangeCheckInterval } - if *deprecatedTimeout != 10*time.Second { - *schemaChangeReplicasTimeout = *deprecatedTimeout - } timer := timer.NewTimer(time.Duration(interval) * time.Second) controllerFactory, err := schemamanager.GetControllerFactory(*schemaChangeController) @@ -72,7 +67,7 @@ func initSchema() { err = schemamanager.Run( ctx, controller, - schemamanager.NewTabletExecutor(wr, *schemaChangeReplicasTimeout), + schemamanager.NewTabletExecutor(wr, *schemaChangeSlaveTimeout), ) if err != nil { log.Errorf("Schema change failed, error: %v", err) diff --git a/go/cmd/vtgateclienttest/services/echo.go b/go/cmd/vtgateclienttest/services/echo.go index 33908ba676e..4323defe961 100644 --- a/go/cmd/vtgateclienttest/services/echo.go +++ b/go/cmd/vtgateclienttest/services/echo.go @@ -150,7 +150,7 @@ func (c *echoClient) VStream(ctx context.Context, tabletType topodatapb.TabletTy Type: 1, Timestamp: 1234, Gtid: "echo-gtid-1", - Statement: "echo-ddl-1", + Ddl: "echo-ddl-1", Vgtid: vgtid, RowEvent: &binlogdatapb.RowEvent{ TableName: "echo-table-1", @@ -160,7 +160,7 @@ func (c *echoClient) VStream(ctx context.Context, tabletType topodatapb.TabletTy Type: 2, Timestamp: 4321, Gtid: "echo-gtid-2", - Statement: "echo-ddl-2", + Ddl: "echo-ddl-2", Vgtid: vgtid, FieldEvent: &binlogdatapb.FieldEvent{ TableName: "echo-table-2", diff --git a/go/cmd/vttablet/healthz.go b/go/cmd/vttablet/healthz.go new file mode 100644 index 00000000000..09bc92ef748 --- /dev/null +++ b/go/cmd/vttablet/healthz.go @@ -0,0 +1,42 @@ +/* +Copyright 2019 The Vitess Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +package main + +import ( + "fmt" + "net/http" + + "vitess.io/vitess/go/vt/servenv" +) + +// This file registers a /healthz URL that reports the health of the agent. + +var okMessage = []byte("ok\n") + +func init() { + servenv.OnRun(func() { + http.Handle("/healthz", http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) { + if _, err := agent.Healthy(); err != nil { + http.Error(rw, fmt.Sprintf("500 internal server error: agent not healthy: %v", err), http.StatusInternalServerError) + return + } + + rw.Header().Set("Content-Length", fmt.Sprintf("%v", len(okMessage))) + rw.WriteHeader(http.StatusOK) + rw.Write(okMessage) + })) + }) +} diff --git a/go/cmd/vttablet/status.go b/go/cmd/vttablet/status.go index 4d4c5e565f7..920e5f70445 100644 --- a/go/cmd/vttablet/status.go +++ b/go/cmd/vttablet/status.go @@ -17,9 +17,13 @@ limitations under the License. package main import ( + "html/template" + + "vitess.io/vitess/go/vt/health" "vitess.io/vitess/go/vt/servenv" _ "vitess.io/vitess/go/vt/status" "vitess.io/vitess/go/vt/topo" + "vitess.io/vitess/go/vt/vttablet/tabletmanager" "vitess.io/vitess/go/vt/vttablet/tabletmanager/vreplication" "vitess.io/vitess/go/vt/vttablet/tabletserver" ) @@ -30,6 +34,7 @@ var ( tabletTemplate = ` \n\n \n \n\n \n\n\n Loading...\n\n\n"), + Content: string("\n\n\n \n Vitess\n \n\n \n \n \n \n\n \n \n\n \n \n\n \n\n\n Loading...\n\n\n"), } fileh := &embedded.EmbeddedFile{ Filename: "inline.js", - FileModTime: time.Unix(1595880692, 0), + FileModTime: time.Unix(1585527421, 0), - Content: string("!function(e){function __webpack_require__(r){if(t[r])return t[r].exports;var n=t[r]={i:r,l:!1,exports:{}};return e[r].call(n.exports,n,n.exports,__webpack_require__),n.l=!0,n.exports}var r=window.webpackJsonp;window.webpackJsonp=function(t,o,c){for(var _,a,i,u=0,p=[];u1;){var o=r.shift();i=i.hasOwnProperty(o)&&isPresent(i[o])?i[o]:i[o]={}}void 0!==i&&null!==i||(i={}),i[r.shift()]=n}function getSymbolIterator(){if(isBlank(h))if(isPresent(n.Symbol)&&isPresent(Symbol.iterator))h=Symbol.iterator;else for(var e=Object.getOwnPropertyNames(Map.prototype),t=0;t=0&&e[r]==t;r--)n--;e=e.substring(0,n)}return e},StringWrapper.replace=function(e,t,n){return e.replace(t,n)},StringWrapper.replaceAll=function(e,t,n){return e.replace(t,n)},StringWrapper.slice=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=null),e.slice(t,null===n?void 0:n)},StringWrapper.replaceAllMapped=function(e,t,n){return e.replace(t,function(){for(var e=[],t=0;tt?1:0},StringWrapper}();t.StringWrapper=s;var a=function(){function StringJoiner(e){void 0===e&&(e=[]),this.parts=e}return StringJoiner.prototype.add=function(e){this.parts.push(e)},StringJoiner.prototype.toString=function(){return this.parts.join(\"\")},StringJoiner}();t.StringJoiner=a;var l=function(e){function NumberParseError(t){e.call(this),this.message=t}return r(NumberParseError,e),NumberParseError.prototype.toString=function(){return this.message},NumberParseError}(Error);t.NumberParseError=l;var c=function(){function NumberWrapper(){}return NumberWrapper.toFixed=function(e,t){return e.toFixed(t)},NumberWrapper.equal=function(e,t){return e===t},NumberWrapper.parseIntAutoRadix=function(e){var t=parseInt(e);if(isNaN(t))throw new l(\"Invalid integer literal when parsing \"+e);return t},NumberWrapper.parseInt=function(e,t){if(10==t){if(/^(\\-|\\+)?[0-9]+$/.test(e))return parseInt(e,t)}else if(16==t){if(/^(\\-|\\+)?[0-9ABCDEFabcdef]+$/.test(e))return parseInt(e,t)}else{var n=parseInt(e,t);if(!isNaN(n))return n}throw new l(\"Invalid integer literal when parsing \"+e+\" in base \"+t)},NumberWrapper.parseFloat=function(e){return parseFloat(e)},Object.defineProperty(NumberWrapper,\"NaN\",{get:function(){return NaN},enumerable:!0,configurable:!0}),NumberWrapper.isNumeric=function(e){return!isNaN(e-parseFloat(e))},NumberWrapper.isNaN=function(e){return isNaN(e)},NumberWrapper.isInteger=function(e){return Number.isInteger(e)},NumberWrapper}();t.NumberWrapper=c,t.RegExp=i.RegExp;var u=function(){function FunctionWrapper(){}return FunctionWrapper.apply=function(e,t){return e.apply(null,t)},FunctionWrapper.bind=function(e,t){return e.bind(t)},FunctionWrapper}();t.FunctionWrapper=u,t.looseIdentical=looseIdentical,t.getMapKey=getMapKey,t.normalizeBlank=normalizeBlank,t.normalizeBool=normalizeBool,t.isJsObject=isJsObject,t.print=print,t.warn=warn;var p=function(){function Json(){}return Json.parse=function(e){return i.JSON.parse(e)},Json.stringify=function(e){return i.JSON.stringify(e,null,2)},Json}();t.Json=p;var d=function(){function DateWrapper(){}return DateWrapper.create=function(e,n,r,i,o,s,a){return void 0===n&&(n=1),void 0===r&&(r=1),void 0===i&&(i=0),void 0===o&&(o=0),void 0===s&&(s=0),void 0===a&&(a=0),new t.Date(e,n-1,r,i,o,s,a)},DateWrapper.fromISOString=function(e){return new t.Date(e)},DateWrapper.fromMillis=function(e){return new t.Date(e)},DateWrapper.toMillis=function(e){return e.getTime()},DateWrapper.now=function(){return new t.Date},DateWrapper.toJson=function(e){return e.toJSON()},DateWrapper}();t.DateWrapper=d,t.setValueOnPath=setValueOnPath;var h=null;t.getSymbolIterator=getSymbolIterator,t.evalExpression=evalExpression,t.isPrimitive=isPrimitive,t.hasConstructor=hasConstructor,t.escape=escape,t.escapeRegExp=escapeRegExp}).call(t,n(82))},4,function(e,t,n){\"use strict\";var r=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},i=n(217),o=n(41),s=n(215),a=n(897),l=function(e){function Subscriber(t,n,r){switch(e.call(this),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=a.empty;break;case 1:if(!t){this.destination=a.empty;break}if(\"object\"==typeof t){t instanceof Subscriber?(this.destination=t,this.destination.add(this)):(this.syncErrorThrowable=!0,this.destination=new c(this,t));break}default:this.syncErrorThrowable=!0,this.destination=new c(this,t,n,r)}}return r(Subscriber,e),Subscriber.create=function(e,t,n){var r=new Subscriber(e,t,n);return r.syncErrorThrowable=!1,r},Subscriber.prototype.next=function(e){this.isStopped||this._next(e)},Subscriber.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},Subscriber.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},Subscriber.prototype.unsubscribe=function(){this.isUnsubscribed||(this.isStopped=!0,e.prototype.unsubscribe.call(this))},Subscriber.prototype._next=function(e){this.destination.next(e)},Subscriber.prototype._error=function(e){this.destination.error(e),this.unsubscribe()},Subscriber.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},Subscriber.prototype[s.$$rxSubscriber]=function(){return this},Subscriber}(o.Subscription);t.Subscriber=l;var c=function(e){function SafeSubscriber(t,n,r,o){e.call(this),this._parent=t;var s,a=this;i.isFunction(n)?s=n:n&&(a=n,s=n.next,r=n.error,o=n.complete,i.isFunction(a.unsubscribe)&&this.add(a.unsubscribe.bind(a)),a.unsubscribe=this.unsubscribe.bind(this)),this._context=a,this._next=s,this._error=r,this._complete=o}return r(SafeSubscriber,e),SafeSubscriber.prototype.next=function(e){if(!this.isStopped&&this._next){var t=this._parent;t.syncErrorThrowable?this.__tryOrSetError(t,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}},SafeSubscriber.prototype.error=function(e){if(!this.isStopped){var t=this._parent;if(this._error)t.syncErrorThrowable?(this.__tryOrSetError(t,this._error,e),this.unsubscribe()):(this.__tryOrUnsub(this._error,e),this.unsubscribe());else{if(!t.syncErrorThrowable)throw this.unsubscribe(),e;t.syncErrorValue=e,t.syncErrorThrown=!0,this.unsubscribe()}}},SafeSubscriber.prototype.complete=function(){if(!this.isStopped){var e=this._parent;this._complete?e.syncErrorThrowable?(this.__tryOrSetError(e,this._complete),this.unsubscribe()):(this.__tryOrUnsub(this._complete),this.unsubscribe()):this.unsubscribe()}},SafeSubscriber.prototype.__tryOrUnsub=function(e,t){try{e.call(this._context,t)}catch(n){throw this.unsubscribe(),n}},SafeSubscriber.prototype.__tryOrSetError=function(e,t,n){try{t.call(this._context,n)}catch(r){return e.syncErrorValue=r,e.syncErrorThrown=!0,!0}return!1},SafeSubscriber.prototype._unsubscribe=function(){var e=this._parent;this._context=null,this._parent=null,e.unsubscribe()},SafeSubscriber}(l)},4,function(e,t,n){var r=n(15);e.exports=function(e){if(!r(e))throw TypeError(e+\" is not an object!\");return e}},function(e,t,n){\"use strict\";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.metadata)return Reflect.metadata(e,t)},o=n(0),s=function(){function DomHandler(){}return DomHandler.prototype.addClass=function(e,t){e.classList?e.classList.add(t):e.className+=\" \"+t},DomHandler.prototype.addMultipleClasses=function(e,t){if(e.classList)for(var n=t.split(\" \"),r=0;rwindow.innerHeight?-1*i.height:o,r=a.left+i.width>window.innerWidth?s-i.width:0,e.style.top=n+\"px\",e.style.left=r+\"px\"},DomHandler.prototype.absolutePosition=function(e,t){var n,r,i=e.offsetParent?{width:e.offsetWidth,height:e.offsetHeight}:this.getHiddenElementDimensions(e),o=i.height,s=i.width,a=t.offsetHeight,l=t.offsetWidth,c=t.getBoundingClientRect(),u=this.getWindowScrollTop(),p=this.getWindowScrollLeft();n=c.top+a+o>window.innerHeight?c.top+u-o:a+c.top+u,r=c.left+l+s>window.innerWidth?c.left+p+l-s:c.left+p,e.style.top=n+\"px\",e.style.left=r+\"px\"},DomHandler.prototype.getHiddenElementOuterHeight=function(e){e.style.visibility=\"hidden\",e.style.display=\"block\";var t=e.offsetHeight;return e.style.display=\"none\",e.style.visibility=\"visible\",t},DomHandler.prototype.getHiddenElementOuterWidth=function(e){e.style.visibility=\"hidden\",e.style.display=\"block\";var t=e.offsetWidth;return e.style.display=\"none\",e.style.visibility=\"visible\",t},DomHandler.prototype.getHiddenElementDimensions=function(e){var t={};return e.style.visibility=\"hidden\",e.style.display=\"block\",t.width=e.offsetWidth,t.height=e.offsetHeight,e.style.display=\"none\",e.style.visibility=\"visible\",t},DomHandler.prototype.scrollInView=function(e,t){var n=getComputedStyle(e).getPropertyValue(\"borderTopWidth\"),r=n?parseFloat(n):0,i=getComputedStyle(e).getPropertyValue(\"paddingTop\"),o=i?parseFloat(i):0,s=e.getBoundingClientRect(),a=t.getBoundingClientRect(),l=a.top+document.body.scrollTop-(s.top+document.body.scrollTop)-r-o,c=e.scrollTop,u=e.clientHeight,p=this.getOuterHeight(t);l<0?e.scrollTop=c+l:l+p>u&&(e.scrollTop=c+l-u+p)},DomHandler.prototype.fadeIn=function(e,t){e.style.opacity=0;var n=+new Date,r=function(){e.style.opacity=+e.style.opacity+((new Date).getTime()-n)/t,n=+new Date,+e.style.opacity<1&&(window.requestAnimationFrame&&requestAnimationFrame(r)||setTimeout(r,16))};r()},DomHandler.prototype.fadeOut=function(e,t){var n=1,r=50,i=t,o=r/i,s=setInterval(function(){n-=o,e.style.opacity=n,n<=0&&clearInterval(s)},r)},DomHandler.prototype.getWindowScrollTop=function(){var e=document.documentElement;return(window.pageYOffset||e.scrollTop)-(e.clientTop||0)},DomHandler.prototype.getWindowScrollLeft=function(){var e=document.documentElement;return(window.pageXOffset||e.scrollLeft)-(e.clientLeft||0)},DomHandler.prototype.matches=function(e,t){var n=Element.prototype,r=n.matches||n.webkitMatchesSelector||n.mozMatchesSelector||n.msMatchesSelector||function(e){return[].indexOf.call(document.querySelectorAll(e),this)!==-1};return r.call(e,t)},DomHandler.prototype.getOuterWidth=function(e,t){var n=e.offsetWidth;if(t){var r=getComputedStyle(e);n+=parseInt(r.paddingLeft)+parseInt(r.paddingRight)}return n},DomHandler.prototype.getHorizontalMargin=function(e){var t=getComputedStyle(e);return parseInt(t.marginLeft)+parseInt(t.marginRight)},DomHandler.prototype.innerWidth=function(e){var t=e.offsetWidth,n=getComputedStyle(e);return t+=parseInt(n.paddingLeft)+parseInt(n.paddingRight)},DomHandler.prototype.width=function(e){var t=e.offsetWidth,n=getComputedStyle(e);return t-=parseInt(n.paddingLeft)+parseInt(n.paddingRight)},DomHandler.prototype.getOuterHeight=function(e,t){var n=e.offsetHeight;if(t){var r=getComputedStyle(e);n+=parseInt(r.marginTop)+parseInt(r.marginBottom)}return n},DomHandler.prototype.getHeight=function(e){var t=e.offsetHeight,n=getComputedStyle(e);return t-=parseInt(n.paddingTop)+parseInt(n.paddingBottom)+parseInt(n.borderTopWidth)+parseInt(n.borderBottomWidth)},DomHandler.prototype.getViewport=function(){var e=window,t=document,n=t.documentElement,r=t.getElementsByTagName(\"body\")[0],i=e.innerWidth||n.clientWidth||r.clientWidth,o=e.innerHeight||n.clientHeight||r.clientHeight;return{width:i,height:o}},DomHandler.prototype.equals=function(e,t){if(null==e||null==t)return!1;if(e==t)return!0;if(\"object\"==typeof e&&\"object\"==typeof t){for(var n in e){if(e.hasOwnProperty(n)!==t.hasOwnProperty(n))return!1;switch(typeof e[n]){case\"object\":if(!this.equals(e[n],t[n]))return!1;break;case\"function\":if(\"undefined\"==typeof t[n]||\"compare\"!=n&&e[n].toString()!=t[n].toString())return!1;break;default:if(e[n]!=t[n])return!1}}for(var n in t)if(\"undefined\"==typeof e[n])return!1;return!0}return!1},DomHandler.zindex=1e3,DomHandler=r([o.Injectable(),i(\"design:paramtypes\",[])],DomHandler)}();t.DomHandler=s},[1104,5],function(e,t,n){\"use strict\";var r=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},i=n(6),o=function(e){function OuterSubscriber(){e.apply(this,arguments)}return r(OuterSubscriber,e),OuterSubscriber.prototype.notifyNext=function(e,t,n,r,i){this.destination.next(t)},OuterSubscriber.prototype.notifyError=function(e,t){this.destination.error(e)},OuterSubscriber.prototype.notifyComplete=function(e){this.destination.complete()},OuterSubscriber}(i.Subscriber);t.OuterSubscriber=o},function(e,t,n){\"use strict\";function subscribeToResult(e,t,n,u){var p=new c.InnerSubscriber(e,n,u);if(!p.isUnsubscribed){if(t instanceof s.Observable)return t._isScalar?(p.next(t.value),void p.complete()):t.subscribe(p);if(i.isArray(t)){for(var d=0,h=t.length;d=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.metadata)return Reflect.metadata(e,t)},o=n(0),s=n(3),a=n(0),l=function(){function Header(){}return Header=r([a.Component({selector:\"header\",template:\"\"}),i(\"design:paramtypes\",[])],Header)}();t.Header=l;var c=function(){function Footer(){}return Footer=r([a.Component({selector:\"footer\",template:\"\"}),i(\"design:paramtypes\",[])],Footer)}();t.Footer=c;var u=function(){function TemplateWrapper(e){this.viewContainer=e}return TemplateWrapper.prototype.ngOnInit=function(){this.viewContainer.createEmbeddedView(this.templateRef,{$implicit:this.item})},r([o.Input(),i(\"design:type\",Object)],TemplateWrapper.prototype,\"item\",void 0),r([o.Input(\"pTemplateWrapper\"),i(\"design:type\",o.TemplateRef)],TemplateWrapper.prototype,\"templateRef\",void 0),TemplateWrapper=r([o.Directive({selector:\"[pTemplateWrapper]\"}),i(\"design:paramtypes\",[o.ViewContainerRef])],TemplateWrapper)}();t.TemplateWrapper=u;var p=function(){function Column(){this.sortFunction=new o.EventEmitter}return r([o.Input(),i(\"design:type\",String)],Column.prototype,\"field\",void 0),r([o.Input(),i(\"design:type\",String)],Column.prototype,\"header\",void 0),r([o.Input(),i(\"design:type\",String)],Column.prototype,\"footer\",void 0),r([o.Input(),i(\"design:type\",Object)],Column.prototype,\"sortable\",void 0),r([o.Input(),i(\"design:type\",Boolean)],Column.prototype,\"editable\",void 0),r([o.Input(),i(\"design:type\",Boolean)],Column.prototype,\"filter\",void 0),r([o.Input(),i(\"design:type\",String)],Column.prototype,\"filterMatchMode\",void 0),r([o.Input(),i(\"design:type\",Number)],Column.prototype,\"rowspan\",void 0),r([o.Input(),i(\"design:type\",Number)],Column.prototype,\"colspan\",void 0),r([o.Input(),i(\"design:type\",Object)],Column.prototype,\"style\",void 0),r([o.Input(),i(\"design:type\",String)],Column.prototype,\"styleClass\",void 0),r([o.Input(),i(\"design:type\",Boolean)],Column.prototype,\"hidden\",void 0),r([o.Input(),i(\"design:type\",Boolean)],Column.prototype,\"expander\",void 0),r([o.Input(),i(\"design:type\",String)],Column.prototype,\"selectionMode\",void 0),r([o.Output(),i(\"design:type\",o.EventEmitter)],Column.prototype,\"sortFunction\",void 0),r([o.ContentChild(o.TemplateRef),i(\"design:type\",o.TemplateRef)],Column.prototype,\"template\",void 0),Column=r([a.Component({selector:\"p-column\",template:\"\"}),i(\"design:paramtypes\",[])],Column)}();t.Column=p;var d=function(){function ColumnTemplateLoader(e){this.viewContainer=e}return ColumnTemplateLoader.prototype.ngOnInit=function(){this.viewContainer.createEmbeddedView(this.column.template,{$implicit:this.column,rowData:this.rowData,rowIndex:this.rowIndex})},r([o.Input(),i(\"design:type\",Object)],ColumnTemplateLoader.prototype,\"column\",void 0),r([o.Input(),i(\"design:type\",Object)],ColumnTemplateLoader.prototype,\"rowData\",void 0),r([o.Input(),i(\"design:type\",Number)],ColumnTemplateLoader.prototype,\"rowIndex\",void 0),ColumnTemplateLoader=r([a.Component({selector:\"p-columnTemplateLoader\",template:\"\"}),i(\"design:paramtypes\",[o.ViewContainerRef])],ColumnTemplateLoader)}();t.ColumnTemplateLoader=d;var h=function(){function SharedModule(){}return SharedModule=r([o.NgModule({imports:[s.CommonModule],exports:[l,c,p,u,d],declarations:[l,c,p,u,d]}),i(\"design:paramtypes\",[])],SharedModule)}();t.SharedModule=h},function(e,t,n){\"use strict\";var r=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},i=n(1),o=n(6),s=n(41),a=n(899),l=n(215),c=n(517),u=n(317),p=function(e){function Subject(t,n){e.call(this),this.destination=t,this.source=n,this.observers=[],this.isUnsubscribed=!1,this.isStopped=!1,this.hasErrored=!1,this.dispatching=!1,this.hasCompleted=!1,this.source=n}return r(Subject,e),Subject.prototype.lift=function(e){var t=new Subject(this.destination||this,this);return t.operator=e,t},Subject.prototype.add=function(e){return s.Subscription.prototype.add.call(this,e)},Subject.prototype.remove=function(e){s.Subscription.prototype.remove.call(this,e)},Subject.prototype.unsubscribe=function(){s.Subscription.prototype.unsubscribe.call(this)},Subject.prototype._subscribe=function(e){if(this.source)return this.source.subscribe(e);if(!e.isUnsubscribed){if(this.hasErrored)return e.error(this.errorValue);if(this.hasCompleted)return e.complete();this.throwIfUnsubscribed();var t=new a.SubjectSubscription(this,e);return this.observers.push(e),t}},Subject.prototype._unsubscribe=function(){this.source=null,this.isStopped=!0,this.observers=null,this.destination=null},Subject.prototype.next=function(e){this.throwIfUnsubscribed(),this.isStopped||(this.dispatching=!0,this._next(e),this.dispatching=!1,this.hasErrored?this._error(this.errorValue):this.hasCompleted&&this._complete())},Subject.prototype.error=function(e){this.throwIfUnsubscribed(),this.isStopped||(this.isStopped=!0,this.hasErrored=!0,this.errorValue=e,this.dispatching||this._error(e))},Subject.prototype.complete=function(){this.throwIfUnsubscribed(),this.isStopped||(this.isStopped=!0,this.hasCompleted=!0,this.dispatching||this._complete())},Subject.prototype.asObservable=function(){var e=new d(this);return e},Subject.prototype._next=function(e){this.destination?this.destination.next(e):this._finalNext(e)},Subject.prototype._finalNext=function(e){for(var t=-1,n=this.observers.slice(0),r=n.length;++t\"+i+\"\"};e.exports=function(e,t){var n={};n[e]=t(a),r(r.P+r.F*i(function(){var t=\"\"[e]('\"');return t!==t.toLowerCase()||t.split('\"').length>3}),\"String\",n)}},function(e,t,n){\"use strict\";var r=n(81),i=n(514),o=n(217),s=n(42),a=n(38),l=n(513),c=function(){function Subscription(e){this.isUnsubscribed=!1,e&&(this._unsubscribe=e)}return Subscription.prototype.unsubscribe=function(){var e,t=!1;if(!this.isUnsubscribed){this.isUnsubscribed=!0;var n=this,c=n._unsubscribe,u=n._subscriptions;if(this._subscriptions=null,o.isFunction(c)){var p=s.tryCatch(c).call(this);p===a.errorObject&&(t=!0,(e=e||[]).push(a.errorObject.e))}if(r.isArray(u))for(var d=-1,h=u.length;++d0?i(r(e),9007199254740991):0}},function(e,t,n){\"use strict\";var r=n(1082);t.async=new r.AsyncScheduler},function(e,t,n){\"use strict\";function __export(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}var r=n(86);t.HostMetadata=r.HostMetadata,t.InjectMetadata=r.InjectMetadata,t.InjectableMetadata=r.InjectableMetadata,t.OptionalMetadata=r.OptionalMetadata,t.SelfMetadata=r.SelfMetadata,t.SkipSelfMetadata=r.SkipSelfMetadata,__export(n(115));var i=n(162);t.forwardRef=i.forwardRef,t.resolveForwardRef=i.resolveForwardRef;var o=n(163);t.Injector=o.Injector;var s=n(571);t.ReflectiveInjector=s.ReflectiveInjector;var a=n(250);t.Binding=a.Binding,t.ProviderBuilder=a.ProviderBuilder,t.bind=a.bind,t.Provider=a.Provider,t.provide=a.provide;var l=n(253);t.ResolvedReflectiveFactory=l.ResolvedReflectiveFactory;var c=n(252);t.ReflectiveKey=c.ReflectiveKey;var u=n(251);t.NoProviderError=u.NoProviderError,t.AbstractProviderError=u.AbstractProviderError,t.CyclicDependencyError=u.CyclicDependencyError,t.InstantiationError=u.InstantiationError,t.InvalidProviderError=u.InvalidProviderError,t.NoAnnotationError=u.NoAnnotationError,t.OutOfBoundsError=u.OutOfBoundsError;var p=n(374);t.OpaqueToken=p.OpaqueToken},[1104,32],function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){\"use strict\";var r=n(13);e.exports=function(e,t){return!!e&&r(function(){t?e.call(null,function(){},1):e.call(null)})}},function(e,t,n){var r=n(75);e.exports=function(e){return Object(r(e))}},function(e,t,n){\"use strict\";(function(e,n){var r={\"boolean\":!1,\"function\":!0,object:!0,number:!1,string:!1,undefined:!1};t.root=r[typeof self]&&self||r[typeof window]&&window;var i=(r[typeof t]&&t&&!t.nodeType&&t,r[typeof e]&&e&&!e.nodeType&&e,r[typeof n]&&n);!i||i.global!==i&&i.window!==i||(t.root=i)}).call(t,n(1100)(e),n(82))},function(e,t,n){\"use strict\";var r=n(0);t.NG_VALUE_ACCESSOR=new r.OpaqueToken(\"NgValueAccessor\")},52,function(e,t,n){\"use strict\";function _convertToPromise(e){return s.isPromise(e)?e:i.toPromise.call(e)}function _executeValidators(e,t){return t.map(function(t){return t(e)})}function _executeAsyncValidators(e,t){return t.map(function(t){return t(e)})}function _mergeErrors(e){var t=e.reduce(function(e,t){return s.isPresent(t)?o.StringMapWrapper.merge(e,t):e},{});return o.StringMapWrapper.isEmpty(t)?null:t}var r=n(0),i=n(313),o=n(47),s=n(32);t.NG_VALIDATORS=new r.OpaqueToken(\"NgValidators\"),t.NG_ASYNC_VALIDATORS=new r.OpaqueToken(\"NgAsyncValidators\");var a=function(){function Validators(){}return Validators.required=function(e){return s.isBlank(e.value)||s.isString(e.value)&&\"\"==e.value?{required:!0}:null},Validators.minLength=function(e){return function(t){if(s.isPresent(Validators.required(t)))return null;var n=t.value;return n.lengthe?{maxlength:{requiredLength:e,actualLength:n.length}}:null}},Validators.pattern=function(e){return function(t){if(s.isPresent(Validators.required(t)))return null;var n=new RegExp(\"^\"+e+\"$\"),r=t.value;return n.test(r)?null:{pattern:{requiredPattern:\"^\"+e+\"$\",actualValue:r}}}},Validators.nullValidator=function(e){return null},Validators.compose=function(e){if(s.isBlank(e))return null;var t=e.filter(s.isPresent);return 0==t.length?null:function(e){return _mergeErrors(_executeValidators(e,t))}},Validators.composeAsync=function(e){if(s.isBlank(e))return null;var t=e.filter(s.isPresent);return 0==t.length?null:function(e){var n=_executeAsyncValidators(e,t).map(_convertToPromise);return Promise.all(n).then(_mergeErrors)}},Validators}();t.Validators=a},function(e,t,n){\"use strict\";var r=n(0),i=n(123),o=n(72),s=n(16),a=n(126),l=n(278);t.PRIMITIVE=String;var c=function(){function Serializer(e){this._renderStore=e}return Serializer.prototype.serialize=function(e,n){var i=this;if(!s.isPresent(e))return null;if(s.isArray(e))return e.map(function(e){return i.serialize(e,n)});if(n==t.PRIMITIVE)return e;if(n==u)return this._renderStore.serialize(e);if(n===r.RenderComponentType)return this._serializeRenderComponentType(e);if(n===r.ViewEncapsulation)return s.serializeEnum(e);if(n===l.LocationType)return this._serializeLocation(e);throw new o.BaseException(\"No serializer for \"+n.toString())},Serializer.prototype.deserialize=function(e,n,a){var c=this;if(!s.isPresent(e))return null;if(s.isArray(e)){var p=[];return e.forEach(function(e){return p.push(c.deserialize(e,n,a))}),p}if(n==t.PRIMITIVE)return e;if(n==u)return this._renderStore.deserialize(e);if(n===r.RenderComponentType)return this._deserializeRenderComponentType(e);if(n===r.ViewEncapsulation)return i.VIEW_ENCAPSULATION_VALUES[e];if(n===l.LocationType)return this._deserializeLocation(e);throw new o.BaseException(\"No deserializer for \"+n.toString())},Serializer.prototype._serializeLocation=function(e){return{href:e.href,protocol:e.protocol,host:e.host,hostname:e.hostname,port:e.port,pathname:e.pathname,search:e.search,hash:e.hash,origin:e.origin}},Serializer.prototype._deserializeLocation=function(e){return new l.LocationType(e.href,e.protocol,e.host,e.hostname,e.port,e.pathname,e.search,e.hash,e.origin)},Serializer.prototype._serializeRenderComponentType=function(e){return{id:e.id,templateUrl:e.templateUrl,slotCount:e.slotCount,encapsulation:this.serialize(e.encapsulation,r.ViewEncapsulation),styles:this.serialize(e.styles,t.PRIMITIVE)}},Serializer.prototype._deserializeRenderComponentType=function(e){return new r.RenderComponentType(e.id,e.templateUrl,e.slotCount,this.deserialize(e.encapsulation,r.ViewEncapsulation),this.deserialize(e.styles,t.PRIMITIVE),{})},Serializer.decorators=[{type:r.Injectable}],Serializer.ctorParameters=[{type:a.RenderStore}],Serializer}();t.Serializer=c;var u=function(){function RenderStoreObject(){}return RenderStoreObject}();t.RenderStoreObject=u},function(e,t,n){var r=n(2),i=n(24),o=n(13);e.exports=function(e,t){var n=(i.Object||{})[e]||Object[e],s={};s[e]=t(n),r(r.S+r.F*o(function(){n(1)}),\"Object\",s)}},function(e,t,n){var r=n(133),i=n(75);e.exports=function(e){return r(i(e))}},function(e,t,n){\"use strict\";function _convertToPromise(e){return s.isPromise(e)?e:i.toPromise.call(e)}function _executeValidators(e,t){return t.map(function(t){return t(e)})}function _executeAsyncValidators(e,t){return t.map(function(t){return t(e)})}function _mergeErrors(e){var t=e.reduce(function(e,t){return s.isPresent(t)?o.StringMapWrapper.merge(e,t):e},{});return o.StringMapWrapper.isEmpty(t)?null:t}var r=n(0),i=n(313),o=n(34),s=n(7);t.NG_VALIDATORS=new r.OpaqueToken(\"NgValidators\"),t.NG_ASYNC_VALIDATORS=new r.OpaqueToken(\"NgAsyncValidators\");var a=function(){function Validators(){}return Validators.required=function(e){return s.isBlank(e.value)||s.isString(e.value)&&\"\"==e.value?{required:!0}:null},Validators.minLength=function(e){return function(t){if(s.isPresent(Validators.required(t)))return null;var n=t.value;return n.lengthe?{maxlength:{requiredLength:e,actualLength:n.length}}:null}},Validators.pattern=function(e){return function(t){if(s.isPresent(Validators.required(t)))return null;var n=new RegExp(\"^\"+e+\"$\"),r=t.value;return n.test(r)?null:{pattern:{requiredPattern:\"^\"+e+\"$\",actualValue:r}}}},Validators.nullValidator=function(e){return null},Validators.compose=function(e){if(s.isBlank(e))return null;var t=e.filter(s.isPresent);return 0==t.length?null:function(e){return _mergeErrors(_executeValidators(e,t))}},Validators.composeAsync=function(e){if(s.isBlank(e))return null;var t=e.filter(s.isPresent);return 0==t.length?null:function(e){var n=_executeAsyncValidators(e,t).map(_convertToPromise);return Promise.all(n).then(_mergeErrors)}},Validators}();t.Validators=a},function(e,t,n){\"use strict\";var r=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},i=n(83),o=n(7),s=function(e){function InvalidPipeArgumentException(t,n){e.call(this,\"Invalid argument '\"+n+\"' for pipe '\"+o.stringify(t)+\"'\")}return r(InvalidPipeArgumentException,e),InvalidPipeArgumentException}(i.BaseException);t.InvalidPipeArgumentException=s},function(e,t,n){\"use strict\";/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar r=n(5),i=function(){function ParseLocation(e,t,n,r){this.file=e,this.offset=t,this.line=n,this.col=r}return ParseLocation.prototype.toString=function(){return r.isPresent(this.offset)?this.file.url+\"@\"+this.line+\":\"+this.col:this.file.url},ParseLocation}();t.ParseLocation=i;var o=function(){function ParseSourceFile(e,t){this.content=e,this.url=t}return ParseSourceFile}();t.ParseSourceFile=o;var s=function(){function ParseSourceSpan(e,t,n){void 0===n&&(n=null),this.start=e,this.end=t,this.details=n}return ParseSourceSpan.prototype.toString=function(){return this.start.file.content.substring(this.start.offset,this.end.offset)},ParseSourceSpan}();t.ParseSourceSpan=s,function(e){e[e.WARNING=0]=\"WARNING\",e[e.FATAL=1]=\"FATAL\"}(t.ParseErrorLevel||(t.ParseErrorLevel={}));var a=t.ParseErrorLevel,l=function(){function ParseError(e,t,n){void 0===n&&(n=a.FATAL),this.span=e,this.msg=t,this.level=n}return ParseError.prototype.toString=function(){var e=this.span.start.file.content,t=this.span.start.offset,n=\"\",i=\"\";if(r.isPresent(t)){t>e.length-1&&(t=e.length-1);for(var o=t,s=0,a=0;s<100&&t>0&&(t--,s++,\"\\n\"!=e[t]||3!=++a););for(s=0,a=0;s<100&&o]\"+e.substring(this.span.start.offset,o+1);n=' (\"'+l+'\")'}return this.span.details&&(i=\", \"+this.span.details),\"\"+this.msg+n+\": \"+this.span.start+i},ParseError}();t.ParseError=l},function(e,t,n){\"use strict\";function templateVisitAll(e,t,n){void 0===n&&(n=null);var i=[];return t.forEach(function(t){var o=t.visit(e,n);r.isPresent(o)&&i.push(o)}),i}var r=n(5),i=function(){function TextAst(e,t,n){this.value=e,this.ngContentIndex=t,this.sourceSpan=n}return TextAst.prototype.visit=function(e,t){return e.visitText(this,t)},TextAst}();t.TextAst=i;var o=function(){function BoundTextAst(e,t,n){this.value=e,this.ngContentIndex=t,this.sourceSpan=n}return BoundTextAst.prototype.visit=function(e,t){return e.visitBoundText(this,t)},BoundTextAst}();t.BoundTextAst=o;var s=function(){function AttrAst(e,t,n){this.name=e,this.value=t,this.sourceSpan=n}return AttrAst.prototype.visit=function(e,t){return e.visitAttr(this,t)},AttrAst}();t.AttrAst=s;var a=function(){function BoundElementPropertyAst(e,t,n,r,i,o){this.name=e,this.type=t,this.securityContext=n,this.value=r,this.unit=i,this.sourceSpan=o}return BoundElementPropertyAst.prototype.visit=function(e,t){return e.visitElementProperty(this,t)},BoundElementPropertyAst}();t.BoundElementPropertyAst=a;var l=function(){function BoundEventAst(e,t,n,r){this.name=e,this.target=t,this.handler=n,this.sourceSpan=r}return BoundEventAst.prototype.visit=function(e,t){return e.visitEvent(this,t)},Object.defineProperty(BoundEventAst.prototype,\"fullName\",{get:function(){return r.isPresent(this.target)?this.target+\":\"+this.name:this.name},enumerable:!0,configurable:!0}),BoundEventAst}();t.BoundEventAst=l;var c=function(){function ReferenceAst(e,t,n){this.name=e,this.value=t,this.sourceSpan=n}return ReferenceAst.prototype.visit=function(e,t){return e.visitReference(this,t)},ReferenceAst}();t.ReferenceAst=c;var u=function(){function VariableAst(e,t,n){this.name=e,this.value=t,this.sourceSpan=n}return VariableAst.prototype.visit=function(e,t){return e.visitVariable(this,t)},VariableAst}();t.VariableAst=u;var p=function(){function ElementAst(e,t,n,r,i,o,s,a,l,c,u){this.name=e,this.attrs=t,this.inputs=n,this.outputs=r,this.references=i,this.directives=o,this.providers=s,this.hasViewContainer=a,this.children=l,this.ngContentIndex=c,this.sourceSpan=u}return ElementAst.prototype.visit=function(e,t){return e.visitElement(this,t)},ElementAst}();t.ElementAst=p;var d=function(){function EmbeddedTemplateAst(e,t,n,r,i,o,s,a,l,c){this.attrs=e,this.outputs=t,this.references=n,this.variables=r,this.directives=i,this.providers=o,this.hasViewContainer=s,this.children=a,this.ngContentIndex=l,this.sourceSpan=c}return EmbeddedTemplateAst.prototype.visit=function(e,t){return e.visitEmbeddedTemplate(this,t)},EmbeddedTemplateAst}();t.EmbeddedTemplateAst=d;var h=function(){function BoundDirectivePropertyAst(e,t,n,r){this.directiveName=e,this.templateName=t,this.value=n,this.sourceSpan=r}return BoundDirectivePropertyAst.prototype.visit=function(e,t){return e.visitDirectiveProperty(this,t)},BoundDirectivePropertyAst}();t.BoundDirectivePropertyAst=h;var f=function(){function DirectiveAst(e,t,n,r,i){this.directive=e,this.inputs=t,this.hostProperties=n,this.hostEvents=r,this.sourceSpan=i}return DirectiveAst.prototype.visit=function(e,t){return e.visitDirective(this,t)},DirectiveAst}();t.DirectiveAst=f;var m=function(){function ProviderAst(e,t,n,r,i,o,s){this.token=e,this.multiProvider=t,this.eager=n,this.providers=r,this.providerType=i,this.lifecycleHooks=o,this.sourceSpan=s}return ProviderAst.prototype.visit=function(e,t){return null},ProviderAst}();t.ProviderAst=m,function(e){e[e.PublicService=0]=\"PublicService\",e[e.PrivateService=1]=\"PrivateService\",e[e.Component=2]=\"Component\",e[e.Directive=3]=\"Directive\",e[e.Builtin=4]=\"Builtin\"}(t.ProviderAstType||(t.ProviderAstType={}));var g=(t.ProviderAstType,function(){function NgContentAst(e,t,n){this.index=e,this.ngContentIndex=t,this.sourceSpan=n}return NgContentAst.prototype.visit=function(e,t){return e.visitNgContent(this,t)},NgContentAst}());t.NgContentAst=g,function(e){e[e.Property=0]=\"Property\",e[e.Attribute=1]=\"Attribute\",e[e.Class=2]=\"Class\",e[e.Style=3]=\"Style\",e[e.Animation=4]=\"Animation\"}(t.PropertyBindingType||(t.PropertyBindingType={}));t.PropertyBindingType;t.templateVisitAll=templateVisitAll},function(e,t){\"use strict\";var n=function(){function MessageBus(){}return MessageBus}();t.MessageBus=n},function(e,t){\"use strict\";t.PRIMARY_OUTLET=\"primary\"},function(e,t,n){var r=n(106),i=n(133),o=n(50),s=n(44),a=n(676);e.exports=function(e,t){var n=1==e,l=2==e,c=3==e,u=4==e,p=6==e,d=5==e||p,h=t||a;return function(t,a,f){for(var m,g,y=o(t),v=i(y),b=r(a,f,3),_=s(v.length),w=0,S=n?h(t,_):l?h(t,0):void 0;_>w;w++)if((d||w in v)&&(m=v[w],g=b(m,w,y),e))if(n)S[w]=g;else if(g)switch(e){case 3:return!0;case 5:return m;case 6:return w;case 2:S.push(m)}else if(u)return!1;return p?-1:c||u?u:S}}},function(e,t,n){var r=n(30),i=n(109);e.exports=n(35)?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var r=n(472),i=n(2),o=n(199)(\"metadata\"),s=o.store||(o.store=new(n(798))),a=function(e,t,n){var i=s.get(e);if(!i){if(!n)return;s.set(e,i=new r)}var o=i.get(t);if(!o){if(!n)return;i.set(t,o=new r)}return o},l=function(e,t,n){var r=a(t,n,!1);return void 0!==r&&r.has(e)},c=function(e,t,n){var r=a(t,n,!1);return void 0===r?void 0:r.get(e)},u=function(e,t,n,r){a(n,r,!0).set(e,t)},p=function(e,t){var n=a(e,t,!1),r=[];return n&&n.forEach(function(e,t){r.push(t)}),r},d=function(e){return void 0===e||\"symbol\"==typeof e?e:String(e)},h=function(e){i(i.S,\"Reflect\",e)};e.exports={store:s,map:a,has:l,get:c,set:u,keys:p,key:d,exp:h}},function(e,t,n){var r=n(48),i=n(50),o=n(300)(\"IE_PROTO\"),s=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=i(e),r(e,o)?e[o]:\"function\"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?s:null}},function(e,t,n){\"use strict\";var r=n(347),i=function(){function InterpolationConfig(e,t){this.start=e,this.end=t}return InterpolationConfig.fromArray=function(e){return e?(r.assertInterpolationSymbols(\"interpolation\",e),new InterpolationConfig(e[0],e[1])):t.DEFAULT_INTERPOLATION_CONFIG},InterpolationConfig}();t.InterpolationConfig=i,t.DEFAULT_INTERPOLATION_CONFIG=new i(\"{{\",\"}}\")},[1107,263],function(e,t,n){\"use strict\";function controlPath(e,t){var n=r.ListWrapper.clone(t.path);return n.push(e),n}function setUpControl(e,t){o.isBlank(e)&&_throwError(t,\"Cannot find control with\"),o.isBlank(t.valueAccessor)&&_throwError(t,\"No value accessor for form control with\"),e.validator=s.Validators.compose([e.validator,t.validator]),e.asyncValidator=s.Validators.composeAsync([e.asyncValidator,t.asyncValidator]),t.valueAccessor.writeValue(e.value),t.valueAccessor.registerOnChange(function(n){t.viewToModelUpdate(n),e.markAsDirty(),e.setValue(n,{emitModelToViewChange:!1})}),e.registerOnChange(function(e,n){t.valueAccessor.writeValue(e),n&&t.viewToModelUpdate(e)}),t.valueAccessor.registerOnTouched(function(){return e.markAsTouched()})}function setUpFormContainer(e,t){o.isBlank(e)&&_throwError(t,\"Cannot find control with\"),e.validator=s.Validators.compose([e.validator,t.validator]),e.asyncValidator=s.Validators.composeAsync([e.asyncValidator,t.asyncValidator])}function _throwError(e,t){var n;throw n=e.path.length>1?\"path: '\"+e.path.join(\" -> \")+\"'\":e.path[0]?\"name: '\"+e.path+\"'\":\"unspecified name attribute\",new i.BaseException(t+\" \"+n)}function composeValidators(e){return o.isPresent(e)?s.Validators.compose(e.map(c.normalizeValidator)):null}function composeAsyncValidators(e){return o.isPresent(e)?s.Validators.composeAsync(e.map(c.normalizeAsyncValidator)):null}function isPropertyUpdated(e,t){if(!r.StringMapWrapper.contains(e,\"model\"))return!1;var n=e.model;return!!n.isFirstChange()||!o.looseIdentical(t,n.currentValue)}function selectValueAccessor(e,t){if(o.isBlank(t))return null;var n,r,i;return t.forEach(function(t){o.hasConstructor(t,l.DefaultValueAccessor)?n=t:o.hasConstructor(t,a.CheckboxControlValueAccessor)||o.hasConstructor(t,u.NumberValueAccessor)||o.hasConstructor(t,d.SelectControlValueAccessor)||o.hasConstructor(t,h.SelectMultipleControlValueAccessor)||o.hasConstructor(t,p.RadioControlValueAccessor)?(o.isPresent(r)&&_throwError(e,\"More than one built-in value accessor matches form control with\"),r=t):(o.isPresent(i)&&_throwError(e,\"More than one custom value accessor matches form control with\"),i=t)}),o.isPresent(i)?i:o.isPresent(r)?r:o.isPresent(n)?n:(_throwError(e,\"No valid value accessor for form control with\"),null)}var r=n(47),i=n(88),o=n(32),s=n(54),a=n(169),l=n(170),c=n(587),u=n(266),p=n(172),d=n(173),h=n(174);t.controlPath=controlPath,t.setUpControl=setUpControl,t.setUpFormContainer=setUpFormContainer,t.composeValidators=composeValidators,t.composeAsyncValidators=composeAsyncValidators,t.isPropertyUpdated=isPropertyUpdated,t.selectValueAccessor=selectValueAccessor},function(e,t){\"use strict\";!function(e){e[e.Get=0]=\"Get\",e[e.Post=1]=\"Post\",e[e.Put=2]=\"Put\",e[e.Delete=3]=\"Delete\",e[e.Options=4]=\"Options\",e[e.Head=5]=\"Head\",e[e.Patch=6]=\"Patch\"}(t.RequestMethod||(t.RequestMethod={}));t.RequestMethod;!function(e){e[e.Unsent=0]=\"Unsent\",e[e.Open=1]=\"Open\",e[e.HeadersReceived=2]=\"HeadersReceived\",e[e.Loading=3]=\"Loading\",e[e.Done=4]=\"Done\",e[e.Cancelled=5]=\"Cancelled\"}(t.ReadyState||(t.ReadyState={}));t.ReadyState;!function(e){e[e.Basic=0]=\"Basic\",e[e.Cors=1]=\"Cors\",e[e.Default=2]=\"Default\",e[e.Error=3]=\"Error\",e[e.Opaque=4]=\"Opaque\"}(t.ResponseType||(t.ResponseType={}));t.ResponseType;!function(e){e[e.NONE=0]=\"NONE\",e[e.JSON=1]=\"JSON\",e[e.FORM=2]=\"FORM\",e[e.FORM_DATA=3]=\"FORM_DATA\",e[e.TEXT=4]=\"TEXT\",e[e.BLOB=5]=\"BLOB\",e[e.ARRAY_BUFFER=6]=\"ARRAY_BUFFER\"}(t.ContentType||(t.ContentType={}));t.ContentType;!function(e){e[e.Text=0]=\"Text\",e[e.Json=1]=\"Json\",e[e.ArrayBuffer=2]=\"ArrayBuffer\",e[e.Blob=3]=\"Blob\"}(t.ResponseContentType||(t.ResponseContentType={}));t.ResponseContentType},[1106,418,419,419],function(e,t,n){\"use strict\";function createEmptyUrlTree(){return new o(new s([],{}),{},null)}function containsTree(e,t,n){return n?equalSegmentGroups(e.root,t.root):containsSegmentGroup(e.root,t.root)}function equalSegmentGroups(e,t){if(!equalPath(e.segments,t.segments))return!1;if(e.numberOfChildren!==t.numberOfChildren)return!1;for(var n in t.children){if(!e.children[n])return!1;if(!equalSegmentGroups(e.children[n],t.children[n]))return!1}return!0}function containsSegmentGroup(e,t){return containsSegmentGroupHelper(e,t,t.segments)}function containsSegmentGroupHelper(e,t,n){if(e.segments.length>n.length){var i=e.segments.slice(0,n.length);return!!equalPath(i,n)&&!t.hasChildren()}if(e.segments.length===n.length){if(!equalPath(e.segments,n))return!1;for(var o in t.children){if(!e.children[o])return!1;if(!containsSegmentGroup(e.children[o],t.children[o]))return!1}return!0}var i=n.slice(0,e.segments.length),s=n.slice(e.segments.length);return!!equalPath(e.segments,i)&&(!!e.children[r.PRIMARY_OUTLET]&&containsSegmentGroupHelper(e.children[r.PRIMARY_OUTLET],t,s))}function equalSegments(e,t){if(e.length!==t.length)return!1;for(var n=0;n0?n+\"(\"+o.join(\"//\")+\")\":\"\"+n}if(e.hasChildren()&&!t){var s=mapChildrenIntoArray(e,function(t,n){return n===r.PRIMARY_OUTLET?[serializeSegment(e.children[r.PRIMARY_OUTLET],!1)]:[n+\":\"+serializeSegment(t,!1)]});return serializePaths(e)+\"/(\"+s.join(\"//\")+\")\"}return serializePaths(e)}function encode(e){return encodeURIComponent(e)}function decode(e){return decodeURIComponent(e)}function serializePath(e){return\"\"+encode(e.path)+serializeParams(e.parameters)}function serializeParams(e){return pairs(e).map(function(e){return\";\"+encode(e.first)+\"=\"+encode(e.second)}).join(\"\")}function serializeQueryParams(e){var t=pairs(e).map(function(e){return encode(e.first)+\"=\"+encode(e.second)});return t.length>0?\"?\"+t.join(\"&\"):\"\"}function pairs(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(new u(n,e[n]));return t}function matchSegments(e){p.lastIndex=0;var t=e.match(p);return t?t[0]:\"\"}function matchQueryParams(e){d.lastIndex=0;var t=e.match(p);return t?t[0]:\"\"}function matchUrlQueryParamValue(e){h.lastIndex=0;var t=e.match(h);return t?t[0]:\"\"}var r=n(63),i=n(74);t.createEmptyUrlTree=createEmptyUrlTree,t.containsTree=containsTree;var o=function(){function UrlTree(e,t,n){this.root=e,this.queryParams=t,this.fragment=n}return UrlTree.prototype.toString=function(){return(new c).serialize(this)},UrlTree}();t.UrlTree=o;var s=function(){function UrlSegmentGroup(e,t){var n=this;this.segments=e,this.children=t,this.parent=null,i.forEach(t,function(e,t){return e.parent=n})}return UrlSegmentGroup.prototype.hasChildren=function(){return this.numberOfChildren>0},Object.defineProperty(UrlSegmentGroup.prototype,\"numberOfChildren\",{get:function(){return Object.keys(this.children).length},enumerable:!0,configurable:!0}),UrlSegmentGroup.prototype.toString=function(){return serializePaths(this)},UrlSegmentGroup}();t.UrlSegmentGroup=s;var a=function(){function UrlSegment(e,t){this.path=e,this.parameters=t}return UrlSegment.prototype.toString=function(){return serializePath(this)},UrlSegment}();t.UrlSegment=a,t.equalSegments=equalSegments,t.equalPath=equalPath,t.mapChildrenIntoArray=mapChildrenIntoArray;var l=function(){function UrlSerializer(){}return UrlSerializer}();t.UrlSerializer=l;var c=function(){function DefaultUrlSerializer(){}return DefaultUrlSerializer.prototype.parse=function(e){var t=new f(e);return new o(t.parseRootSegment(),t.parseQueryParams(),t.parseFragment())},DefaultUrlSerializer.prototype.serialize=function(e){var t=\"/\"+serializeSegment(e.root,!0),n=serializeQueryParams(e.queryParams),r=null!==e.fragment&&void 0!==e.fragment?\"#\"+encodeURIComponent(e.fragment):\"\";return\"\"+t+n+r},DefaultUrlSerializer}();t.DefaultUrlSerializer=c,t.serializePaths=serializePaths,t.encode=encode,t.decode=decode,t.serializePath=serializePath;var u=function(){function Pair(e,t){this.first=e,this.second=t}return Pair}(),p=/^[^\\/\\(\\)\\?;=&#]+/,d=/^[^=\\?&#]+/,h=/^[^\\?&#]+/,f=function(){function UrlParser(e){this.url=e,this.remaining=e}return UrlParser.prototype.peekStartsWith=function(e){return this.remaining.startsWith(e)},UrlParser.prototype.capture=function(e){if(!this.remaining.startsWith(e))throw new Error('Expected \"'+e+'\".');this.remaining=this.remaining.substring(e.length)},UrlParser.prototype.parseRootSegment=function(){return this.remaining.startsWith(\"/\")&&this.capture(\"/\"),\"\"===this.remaining||this.remaining.startsWith(\"?\")||this.remaining.startsWith(\"#\")?new s([],{}):new s([],this.parseChildren())},UrlParser.prototype.parseChildren=function(){if(0==this.remaining.length)return{};this.peekStartsWith(\"/\")&&this.capture(\"/\");var e=[];for(this.peekStartsWith(\"(\")||e.push(this.parseSegments());this.peekStartsWith(\"/\")&&!this.peekStartsWith(\"//\")&&!this.peekStartsWith(\"/(\");)this.capture(\"/\"),e.push(this.parseSegments());var t={};this.peekStartsWith(\"/(\")&&(this.capture(\"/\"),t=this.parseParens(!0));var n={};return this.peekStartsWith(\"(\")&&(n=this.parseParens(!1)),(e.length>0||Object.keys(t).length>0)&&(n[r.PRIMARY_OUTLET]=new s(e,t)),n},UrlParser.prototype.parseSegments=function(){var e=matchSegments(this.remaining);if(\"\"===e&&this.peekStartsWith(\";\"))throw new Error(\"Empty path url segment cannot have parameters: '\"+this.remaining+\"'.\");this.capture(e);var t={};return this.peekStartsWith(\";\")&&(t=this.parseMatrixParams()),new a(decode(e),t)},UrlParser.prototype.parseQueryParams=function(){var e={};if(this.peekStartsWith(\"?\"))for(this.capture(\"?\"),this.parseQueryParam(e);this.remaining.length>0&&this.peekStartsWith(\"&\");)this.capture(\"&\"),this.parseQueryParam(e);return e},UrlParser.prototype.parseFragment=function(){return this.peekStartsWith(\"#\")?decode(this.remaining.substring(1)):null},UrlParser.prototype.parseMatrixParams=function(){for(var e={};this.remaining.length>0&&this.peekStartsWith(\";\");)this.capture(\";\"),this.parseParam(e);return e},UrlParser.prototype.parseParam=function(e){var t=matchSegments(this.remaining);if(t){this.capture(t);var n=\"true\";if(this.peekStartsWith(\"=\")){this.capture(\"=\");var r=matchSegments(this.remaining);r&&(n=r,this.capture(n))}e[decode(t)]=decode(n)}},UrlParser.prototype.parseQueryParam=function(e){var t=matchQueryParams(this.remaining);if(t){this.capture(t);var n=\"\";if(this.peekStartsWith(\"=\")){this.capture(\"=\");var r=matchUrlQueryParamValue(this.remaining);r&&(n=r,this.capture(n))}e[decode(t)]=decode(n)}},UrlParser.prototype.parseParens=function(e){var t={};for(this.capture(\"(\");!this.peekStartsWith(\")\")&&this.remaining.length>0;){var n=matchSegments(this.remaining),i=this.remaining[n.length];if(\"/\"!==i&&\")\"!==i&&\";\"!==i)throw new Error(\"Cannot parse url '\"+this.url+\"'\");var o=void 0;n.indexOf(\":\")>-1?(o=n.substr(0,n.indexOf(\":\")),this.capture(o),this.capture(\":\")):e&&(o=r.PRIMARY_OUTLET);var a=this.parseChildren();t[o]=1===Object.keys(a).length?a[r.PRIMARY_OUTLET]:new s([],a),this.peekStartsWith(\"//\")&&this.capture(\"//\")}return this.capture(\")\"),t},UrlParser}()},function(e,t,n){\"use strict\";function shallowEqualArrays(e,t){if(e.length!==t.length)return!1;for(var n=0;n0?e[0]:null}function last(e){return e.length>0?e[e.length-1]:null}function and(e){return e.reduce(function(e,t){return e&&t},!0)}function merge(e,t){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]=e[r]);for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r]);return n}function forEach(e,t){for(var n in e)e.hasOwnProperty(n)&&t(e[n],n)}function waitForMap(e,t){var n=[],r={};return forEach(e,function(e,i){i===s.PRIMARY_OUTLET&&n.push(t(i,e).map(function(e){return r[i]=e,e}))}),forEach(e,function(e,i){i!==s.PRIMARY_OUTLET&&n.push(t(i,e).map(function(e){return r[i]=e,e}))}),n.length>0?o.of.apply(void 0,n).concatAll().last().map(function(e){return r}):o.of(r)}function andObservables(e){return e.mergeAll().every(function(e){return e===!0})}function wrapIntoObservable(e){return e instanceof r.Observable?e:e instanceof Promise?i.fromPromise(e):o.of(e)}n(304),n(497);var r=n(1),i=n(211),o=n(141),s=n(63);t.shallowEqualArrays=shallowEqualArrays,t.shallowEqual=shallowEqual,t.flatten=flatten,t.first=first,t.last=last,t.and=and,t.merge=merge,t.forEach=forEach,t.waitForMap=waitForMap,t.andObservables=andObservables,t.wrapIntoObservable=wrapIntoObservable},function(e,t){e.exports=function(e){if(void 0==e)throw TypeError(\"Can't call method on \"+e);return e}},function(e,t,n){var r=n(137)(\"meta\"),i=n(15),o=n(48),s=n(30).f,a=0,l=Object.isExtensible||function(){return!0},c=!n(13)(function(){return l(Object.preventExtensions({}))}),u=function(e){s(e,r,{value:{i:\"O\"+ ++a,w:{}}})},p=function(e,t){if(!i(e))return\"symbol\"==typeof e?e:(\"string\"==typeof e?\"S\":\"P\")+e;if(!o(e,r)){if(!l(e))return\"F\";if(!t)return\"E\";u(e)}return e[r].i},d=function(e,t){if(!o(e,r)){if(!l(e))return!0;if(!t)return!1;u(e)}return e[r].w},h=function(e){return c&&f.NEED&&l(e)&&!o(e,r)&&u(e),e},f=e.exports={KEY:r,NEED:!1,fastKey:p,getWeak:d,onFreeze:h}},function(e,t,n){var r=n(197),i=n(109),o=n(57),s=n(97),a=n(48),l=n(453),c=Object.getOwnPropertyDescriptor;t.f=n(35)?c:function(e,t){if(e=o(e),t=s(t,!0),l)try{return c(e,t)}catch(n){}if(a(e,t))return i(!r.f.call(e,t),e[t])}},function(e,t){e.exports=\".vt-row {\\n display: flex;\\n flex-wrap: wrap;\\n height: 100%;\\n width: 100%;\\n}\\n\\n.vt-card {\\n display: inline-table;\\n margin-left: 25px;\\n margin-bottom: 10px;\\n margin-top: 10px;\\n}\\n\\n.stats-container {\\n width: 100%;\\n}\\n\\n.vt-padding{\\n padding-left: 25px;\\n padding-right: 25px;\\n}\\n\\n>>> p-dialog .ui-dialog{\\n position: fixed !important;\\n top: 50% !important;\\n left: 50% !important;\\n transform: translate(-50%, -50%);\\n margin: 0;\\n width: auto !important;\\n}\\n\\n.vt-popUpContainer{\\n position: fixed;\\n padding: 0;\\n margin: 0;\\n z-index: 0;\\n bottom: 0;\\n right: 0;\\n top: 0;\\n left: 0;\\n min-height: 1000vh;\\n min-width: 1000vw;\\n height: 100%;\\n width: 100%;\\n background: rgba(0,0,0,0.6);\\n}\\n\\n.vt-dark-link:link {\\n text-decoration: none;\\n color: black;\\n}\\n\\n.vt-dark-link:visited {\\n text-decoration: none;\\n color: black;\\n}\\n\\n.vt-dark-link:hover {\\n text-decoration: none;\\n color: black;\\n}\\n\\n.vt-dark-link:active {\\n text-decoration: none;\\n color: black;\\n}\\n\\n/* Toolbar */\\n.vt-toolbar {\\n width: 100%;\\n text-align: center;\\n}\\n\\n>>> p-accordiontab a {\\n padding-left: 25px! important;\\n}\\n\\n>>> .ui-accordion-content button {\\n margin-top: 2px;\\n}\\n\\n>>> p-menu .ui-menu {\\n margin-top: 19px;\\n display: inline-block;\\n top: auto !important;\\n left: auto !important;\\n float: right;\\n \\n}\\n\\np-menu {\\n display: inline-block;\\n float: left;\\n}\\n\\n.vt-toolbar .vt-menu {\\n padding-top: 19px;\\n float: left;\\n}\\n\\n.vt-toolbar .vt-right-menu {\\n padding-top: 19px;\\n position: fixed;\\n right: 25px;\\n top: 19px;\\n}\\n\\n.vt-card-toolbar {\\n display: inline-block;\\n width: 100%;\\n}\\n\\n.vt-card-toolbar .vt-menu {\\n float: left;\\n}\\n.vt-card-toolbar .vt-title {\\n float: right;\\n margin: 0;\\n padding-left: 25px;\\n}\\n\\nmd-list:hover {\\n background: #E8E8E8\\n}\\n\"},function(e,t,n){\"use strict\";var r=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},i=n(1),o=n(308),s=n(80),a=n(98),l=function(e){function ArrayObservable(t,n){e.call(this),this.array=t,this.scheduler=n,n||1!==t.length||(this._isScalar=!0,this.value=t[0])}return r(ArrayObservable,e),ArrayObservable.create=function(e,t){return new ArrayObservable(e,t)},ArrayObservable.of=function(){for(var e=[],t=0;t1?new ArrayObservable(e,n):1===r?new o.ScalarObservable(e[0],n):new s.EmptyObservable(n)},ArrayObservable.dispatch=function(e){var t=e.array,n=e.index,r=e.count,i=e.subscriber;return n>=r?void i.complete():(i.next(t[n]),void(i.isUnsubscribed||(e.index=n+1,this.schedule(e))))},ArrayObservable.prototype._subscribe=function(e){var t=0,n=this.array,r=n.length,i=this.scheduler;if(i)return i.schedule(ArrayObservable.dispatch,0,{array:n,index:t,count:r,subscriber:e});for(var o=0;o0?\" { \"+e.children.map(serializeNode).join(\", \")+\" } \":\"\";return\"\"+e.value+t}function advanceActivatedRoute(e){e.snapshot?(a.shallowEqual(e.snapshot.queryParams,e._futureSnapshot.queryParams)||e.queryParams.next(e._futureSnapshot.queryParams),e.snapshot.fragment!==e._futureSnapshot.fragment&&e.fragment.next(e._futureSnapshot.fragment),a.shallowEqual(e.snapshot.params,e._futureSnapshot.params)||(e.params.next(e._futureSnapshot.params),e.data.next(e._futureSnapshot.data)),a.shallowEqualArrays(e.snapshot.url,e._futureSnapshot.url)||e.url.next(e._futureSnapshot.url),e.snapshot=e._futureSnapshot):(e.snapshot=e._futureSnapshot,e.data.next(e._futureSnapshot.data))}var r=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},i=n(207),o=n(63),s=n(73),a=n(74),l=n(281),c=function(e){function RouterState(t,n){e.call(this,t),this.snapshot=n,setRouterStateSnapshot(this,t)}return r(RouterState,e),Object.defineProperty(RouterState.prototype,\"queryParams\",{get:function(){return this.root.queryParams},enumerable:!0,configurable:!0}),Object.defineProperty(RouterState.prototype,\"fragment\",{get:function(){return this.root.fragment},enumerable:!0,configurable:!0}),RouterState.prototype.toString=function(){return this.snapshot.toString()},RouterState}(l.Tree);t.RouterState=c,t.createEmptyState=createEmptyState;var u=function(){function ActivatedRoute(e,t,n,r,i,o,s,a){this.url=e,this.params=t,this.queryParams=n,this.fragment=r,this.data=i,this.outlet=o,this.component=s,this._futureSnapshot=a}return Object.defineProperty(ActivatedRoute.prototype,\"routeConfig\",{get:function(){return this._futureSnapshot.routeConfig},enumerable:!0,configurable:!0}),Object.defineProperty(ActivatedRoute.prototype,\"root\",{get:function(){return this._routerState.root},enumerable:!0,configurable:!0}),Object.defineProperty(ActivatedRoute.prototype,\"parent\",{get:function(){return this._routerState.parent(this)},enumerable:!0,configurable:!0}),Object.defineProperty(ActivatedRoute.prototype,\"firstChild\",{get:function(){return this._routerState.firstChild(this)},enumerable:!0,configurable:!0}),Object.defineProperty(ActivatedRoute.prototype,\"children\",{get:function(){return this._routerState.children(this)},enumerable:!0,configurable:!0}),Object.defineProperty(ActivatedRoute.prototype,\"pathFromRoot\",{get:function(){return this._routerState.pathFromRoot(this)},enumerable:!0,configurable:!0}),ActivatedRoute.prototype.toString=function(){return this.snapshot?this.snapshot.toString():\"Future(\"+this._futureSnapshot+\")\"},ActivatedRoute}();t.ActivatedRoute=u;var p=function(){function InheritedResolve(e,t){this.parent=e,this.current=t,this.resolvedData={}}return Object.defineProperty(InheritedResolve.prototype,\"flattenedResolvedData\",{get:function(){return this.parent?a.merge(this.parent.flattenedResolvedData,this.resolvedData):this.resolvedData},enumerable:!0,configurable:!0}),Object.defineProperty(InheritedResolve,\"empty\",{get:function(){return new InheritedResolve(null,{})},enumerable:!0,configurable:!0}),InheritedResolve}();t.InheritedResolve=p;var d=function(){function ActivatedRouteSnapshot(e,t,n,r,i,o,s,a,l,c,u){this.url=e,this.params=t,this.queryParams=n,this.fragment=r,this.data=i,this.outlet=o,this.component=s,this._routeConfig=a,this._urlSegment=l,this._lastPathIndex=c,this._resolve=u}return Object.defineProperty(ActivatedRouteSnapshot.prototype,\"routeConfig\",{get:function(){return this._routeConfig},enumerable:!0,configurable:!0}),Object.defineProperty(ActivatedRouteSnapshot.prototype,\"root\",{get:function(){return this._routerState.root},enumerable:!0,configurable:!0}),Object.defineProperty(ActivatedRouteSnapshot.prototype,\"parent\",{get:function(){return this._routerState.parent(this)},enumerable:!0,configurable:!0}),Object.defineProperty(ActivatedRouteSnapshot.prototype,\"firstChild\",{get:function(){return this._routerState.firstChild(this)},enumerable:!0,configurable:!0}),Object.defineProperty(ActivatedRouteSnapshot.prototype,\"children\",{get:function(){return this._routerState.children(this)},enumerable:!0,configurable:!0}),Object.defineProperty(ActivatedRouteSnapshot.prototype,\"pathFromRoot\",{get:function(){return this._routerState.pathFromRoot(this)},enumerable:!0,configurable:!0}),ActivatedRouteSnapshot.prototype.toString=function(){var e=this.url.map(function(e){return e.toString()}).join(\"/\"),t=this._routeConfig?this._routeConfig.path:\"\";return\"Route(url:'\"+e+\"', path:'\"+t+\"')\"},ActivatedRouteSnapshot}();t.ActivatedRouteSnapshot=d;var h=function(e){function RouterStateSnapshot(t,n){e.call(this,n),this.url=t,setRouterStateSnapshot(this,n)}return r(RouterStateSnapshot,e),Object.defineProperty(RouterStateSnapshot.prototype,\"queryParams\",{get:function(){return this.root.queryParams},enumerable:!0,configurable:!0}),Object.defineProperty(RouterStateSnapshot.prototype,\"fragment\",{get:function(){return this.root.fragment},enumerable:!0,configurable:!0}),RouterStateSnapshot.prototype.toString=function(){return serializeNode(this._root)},RouterStateSnapshot}(l.Tree);t.RouterStateSnapshot=h,t.advanceActivatedRoute=advanceActivatedRoute},function(e,t,n){\"use strict\";var r=n(43),i=(n.n(r),n(0));n.n(i);n.d(t,\"a\",function(){return a});var o=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},s=this&&this.__metadata||function(e,t){if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=function(){function VtctlService(e){this.http=e,this.vtctlUrl=\"../api/vtctl/\"}return VtctlService.prototype.sendPostRequest=function(e,t){var n=new r.Headers({\"Content-Type\":\"application/json\"}),i=new r.RequestOptions({headers:n});return this.http.post(e,JSON.stringify(t),i).map(function(e){return e.json()})},VtctlService.prototype.runCommand=function(e){return this.sendPostRequest(this.vtctlUrl,e)},VtctlService=o([n.i(i.Injectable)(),s(\"design:paramtypes\",[\"function\"==typeof(e=\"undefined\"!=typeof r.Http&&r.Http)&&e||Object])],VtctlService);var e}()},function(e,t,n){\"use strict\";var r=n(192);n.d(t,\"a\",function(){return i});var i=function(){function DialogContent(e,t,n,r,i){void 0===e&&(e=\"\"),void 0===t&&(t={}),void 0===n&&(n={}),void 0===r&&(r=void 0),void 0===i&&(i=\"\"),this.nameId=e,this.flags=t,this.requiredFlags=n,this.prepareFunction=r,this.action=i}return DialogContent.prototype.getName=function(){return this.flags[this.nameId]?this.flags[this.nameId].getStrValue():\"\"},DialogContent.prototype.setName=function(e){this.flags[this.nameId]&&this.flags[this.nameId].setValue(e)},DialogContent.prototype.getPostBody=function(e){void 0===e&&(e=void 0),e||(e=this.getFlags());var t=[],n=[];t.push(this.action);for(var r=0,i=e;r1?\"path: '\"+e.path.join(\" -> \")+\"'\":e.path[0]?\"name: '\"+e.path+\"'\":\"unspecified name\",new i.BaseException(t+\" \"+n)}function composeValidators(e){return o.isPresent(e)?s.Validators.compose(e.map(c.normalizeValidator)):null}function composeAsyncValidators(e){return o.isPresent(e)?s.Validators.composeAsync(e.map(c.normalizeAsyncValidator)):null}function isPropertyUpdated(e,t){if(!r.StringMapWrapper.contains(e,\"model\"))return!1;var n=e.model;return!!n.isFirstChange()||!o.looseIdentical(t,n.currentValue)}function selectValueAccessor(e,t){if(o.isBlank(t))return null;var n,r,i;return t.forEach(function(t){o.hasConstructor(t,l.DefaultValueAccessor)?n=t:o.hasConstructor(t,a.CheckboxControlValueAccessor)||o.hasConstructor(t,u.NumberValueAccessor)||o.hasConstructor(t,d.SelectControlValueAccessor)||o.hasConstructor(t,h.SelectMultipleControlValueAccessor)||o.hasConstructor(t,p.RadioControlValueAccessor)?(o.isPresent(r)&&_throwError(e,\"More than one built-in value accessor matches form control with\"),r=t):(o.isPresent(i)&&_throwError(e,\"More than one custom value accessor matches form control with\"),i=t)}),o.isPresent(i)?i:o.isPresent(r)?r:o.isPresent(n)?n:(_throwError(e,\"No valid value accessor for form control with\"),null)}var r=n(34),i=n(83),o=n(7),s=n(58),a=n(144),l=n(145),c=n(526),u=n(227),p=n(146),d=n(147),h=n(228);t.controlPath=controlPath,t.setUpControl=setUpControl,t.setUpControlGroup=setUpControlGroup,t.composeValidators=composeValidators,t.composeAsyncValidators=composeAsyncValidators,t.isPropertyUpdated=isPropertyUpdated,t.selectValueAccessor=selectValueAccessor},function(e,t,n){\"use strict\";var r=n(0),i=n(18),o=n(28),s=function(){function CompilerConfig(e){var t=void 0===e?{}:e,n=t.renderTypes,i=void 0===n?new l:n,o=t.defaultEncapsulation,s=void 0===o?r.ViewEncapsulation.Emulated:o,a=t.genDebugInfo,c=t.logBindingUpdate,u=t.useJit,p=void 0===u||u,d=t.deprecatedPlatformDirectives,h=void 0===d?[]:d,f=t.deprecatedPlatformPipes,m=void 0===f?[]:f;this.renderTypes=i,this.defaultEncapsulation=s,this._genDebugInfo=a,this._logBindingUpdate=c,this.useJit=p,this.platformDirectives=h,this.platformPipes=m}return Object.defineProperty(CompilerConfig.prototype,\"genDebugInfo\",{get:function(){return void 0===this._genDebugInfo?r.isDevMode():this._genDebugInfo},enumerable:!0,configurable:!0}),Object.defineProperty(CompilerConfig.prototype,\"logBindingUpdate\",{get:function(){return void 0===this._logBindingUpdate?r.isDevMode():this._logBindingUpdate},enumerable:!0,configurable:!0}),CompilerConfig}();t.CompilerConfig=s;var a=function(){function RenderTypes(){}return Object.defineProperty(RenderTypes.prototype,\"renderer\",{get:function(){return i.unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(RenderTypes.prototype,\"renderText\",{get:function(){return i.unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(RenderTypes.prototype,\"renderElement\",{get:function(){return i.unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(RenderTypes.prototype,\"renderComment\",{get:function(){return i.unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(RenderTypes.prototype,\"renderNode\",{get:function(){return i.unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(RenderTypes.prototype,\"renderEvent\",{get:function(){return i.unimplemented()},enumerable:!0,configurable:!0}),RenderTypes}();t.RenderTypes=a;var l=function(){function DefaultRenderTypes(){this.renderer=o.Identifiers.Renderer,this.renderText=null,this.renderElement=null,this.renderComment=null,this.renderNode=null,this.renderEvent=null}return DefaultRenderTypes}();t.DefaultRenderTypes=l},function(e,t){\"use strict\";function splitNsName(e){if(\":\"!=e[0])return[null,e];var t=e.indexOf(\":\",1);if(t==-1)throw new Error('Unsupported format \"'+e+'\" expecting \":namespace:name\"');return[e.slice(1,t),e.slice(t+1)]}function getNsPrefix(e){return null===e?null:splitNsName(e)[0]}function mergeNsAndName(e,t){return e?\":\"+e+\":\"+t:t}!function(e){e[e.RAW_TEXT=0]=\"RAW_TEXT\",e[e.ESCAPABLE_RAW_TEXT=1]=\"ESCAPABLE_RAW_TEXT\",e[e.PARSABLE_DATA=2]=\"PARSABLE_DATA\"}(t.TagContentType||(t.TagContentType={}));t.TagContentType;t.splitNsName=splitNsName,t.getNsPrefix=getNsPrefix,t.mergeNsAndName=mergeNsAndName,t.NAMED_ENTITIES={Aacute:\"Á\",aacute:\"á\",Acirc:\"Â\",acirc:\"â\",acute:\"´\",AElig:\"Æ\",aelig:\"æ\",Agrave:\"À\",agrave:\"à\",alefsym:\"ℵ\",Alpha:\"Α\",alpha:\"α\",amp:\"&\",and:\"∧\",ang:\"∠\",apos:\"'\",Aring:\"Å\",aring:\"å\",asymp:\"≈\",Atilde:\"Ã\",atilde:\"ã\",Auml:\"Ä\",auml:\"ä\",bdquo:\"„\",Beta:\"Β\",beta:\"β\",brvbar:\"¦\",bull:\"•\",cap:\"∩\",Ccedil:\"Ç\",ccedil:\"ç\",cedil:\"¸\",cent:\"¢\",Chi:\"Χ\",chi:\"χ\",circ:\"ˆ\",clubs:\"♣\",cong:\"≅\",copy:\"©\",crarr:\"↵\",cup:\"∪\",curren:\"¤\",dagger:\"†\",Dagger:\"‡\",darr:\"↓\",dArr:\"⇓\",deg:\"°\",Delta:\"Δ\",delta:\"δ\",diams:\"♦\",divide:\"÷\",Eacute:\"É\",eacute:\"é\",Ecirc:\"Ê\",ecirc:\"ê\",Egrave:\"È\",egrave:\"è\",empty:\"∅\",emsp:\"\u2003\",ensp:\"\u2002\",Epsilon:\"Ε\",epsilon:\"ε\",equiv:\"≡\",Eta:\"Η\",eta:\"η\",ETH:\"Ð\",eth:\"ð\",Euml:\"Ë\",euml:\"ë\",euro:\"€\",exist:\"∃\",fnof:\"ƒ\",forall:\"∀\",frac12:\"½\",frac14:\"¼\",frac34:\"¾\",frasl:\"⁄\",Gamma:\"Γ\",gamma:\"γ\",ge:\"≥\",gt:\">\",harr:\"↔\",hArr:\"⇔\",hearts:\"♥\",hellip:\"…\",Iacute:\"Í\",iacute:\"í\",Icirc:\"Î\",icirc:\"î\",iexcl:\"¡\",Igrave:\"Ì\",igrave:\"ì\",image:\"ℑ\",infin:\"∞\",\"int\":\"∫\",Iota:\"Ι\",iota:\"ι\",iquest:\"¿\",isin:\"∈\",Iuml:\"Ï\",iuml:\"ï\",Kappa:\"Κ\",kappa:\"κ\",Lambda:\"Λ\",lambda:\"λ\",lang:\"⟨\",laquo:\"«\",larr:\"←\",lArr:\"⇐\",lceil:\"⌈\",ldquo:\"“\",le:\"≤\",lfloor:\"⌊\",lowast:\"∗\",loz:\"◊\",lrm:\"\u200e\",lsaquo:\"‹\",lsquo:\"‘\",lt:\"<\",macr:\"¯\",mdash:\"—\",micro:\"µ\",middot:\"·\",minus:\"−\",Mu:\"Μ\",mu:\"μ\",nabla:\"∇\",nbsp:\"\u00a0\",ndash:\"–\",ne:\"≠\",ni:\"∋\",not:\"¬\",notin:\"∉\",nsub:\"⊄\",Ntilde:\"Ñ\",ntilde:\"ñ\",Nu:\"Ν\",nu:\"ν\",Oacute:\"Ó\",oacute:\"ó\",Ocirc:\"Ô\",ocirc:\"ô\",OElig:\"Œ\",oelig:\"œ\",Ograve:\"Ò\",ograve:\"ò\",oline:\"‾\",Omega:\"Ω\",omega:\"ω\",Omicron:\"Ο\",omicron:\"ο\",oplus:\"⊕\",or:\"∨\",ordf:\"ª\",ordm:\"º\",Oslash:\"Ø\",oslash:\"ø\",Otilde:\"Õ\",otilde:\"õ\",otimes:\"⊗\",Ouml:\"Ö\",ouml:\"ö\",para:\"¶\",permil:\"‰\",perp:\"⊥\",Phi:\"Φ\",phi:\"φ\",Pi:\"Π\",pi:\"π\",piv:\"ϖ\",plusmn:\"±\",pound:\"£\",prime:\"′\",Prime:\"″\",prod:\"∏\",prop:\"∝\",Psi:\"Ψ\",psi:\"ψ\",quot:'\"',radic:\"√\",rang:\"⟩\",raquo:\"»\",rarr:\"→\",rArr:\"⇒\",rceil:\"⌉\",rdquo:\"”\",real:\"ℜ\",reg:\"®\",rfloor:\"⌋\",Rho:\"Ρ\",rho:\"ρ\",rlm:\"\u200f\",rsaquo:\"›\",rsquo:\"’\",sbquo:\"‚\",Scaron:\"Š\",scaron:\"š\",sdot:\"⋅\",sect:\"§\",shy:\"\u00ad\",Sigma:\"Σ\",sigma:\"σ\",sigmaf:\"ς\",sim:\"∼\",spades:\"♠\",sub:\"⊂\",sube:\"⊆\",sum:\"∑\",sup:\"⊃\",sup1:\"¹\",sup2:\"²\",sup3:\"³\",supe:\"⊇\",szlig:\"ß\",Tau:\"Τ\",tau:\"τ\",there4:\"∴\",Theta:\"Θ\",theta:\"θ\",thetasym:\"ϑ\",thinsp:\"\u2009\",THORN:\"Þ\",thorn:\"þ\",tilde:\"˜\",times:\"×\",trade:\"™\",Uacute:\"Ú\",uacute:\"ú\",uarr:\"↑\",uArr:\"⇑\",Ucirc:\"Û\",ucirc:\"û\",Ugrave:\"Ù\",ugrave:\"ù\",uml:\"¨\",upsih:\"ϒ\",Upsilon:\"Υ\",upsilon:\"υ\",Uuml:\"Ü\",uuml:\"ü\",weierp:\"℘\",Xi:\"Ξ\",xi:\"ξ\",Yacute:\"Ý\",yacute:\"ý\",yen:\"¥\",yuml:\"ÿ\",Yuml:\"Ÿ\",Zeta:\"Ζ\",zeta:\"ζ\",zwj:\"\u200d\",zwnj:\"\u200c\"}},function(e,t,n){\"use strict\";function createUrlResolverWithoutPackagePrefix(){return new s}function createOfflineCompileUrlResolver(){return new s(o)}function getUrlScheme(e){var t=_split(e);return t&&t[a.Scheme]||\"\"}function _buildFromEncodedParts(e,t,n,r,o,s,a){var l=[];return i.isPresent(e)&&l.push(e+\":\"),i.isPresent(n)&&(l.push(\"//\"),i.isPresent(t)&&l.push(t+\"@\"),l.push(n),i.isPresent(r)&&l.push(\":\"+r)),i.isPresent(o)&&l.push(o),i.isPresent(s)&&l.push(\"?\"+s),i.isPresent(a)&&l.push(\"#\"+a),l.join(\"\")}function _split(e){return e.match(l)}function _removeDotSegments(e){if(\"/\"==e)return\"/\";for(var t=\"/\"==e[0]?\"/\":\"\",n=\"/\"===e[e.length-1]?\"/\":\"\",r=e.split(\"/\"),i=[],o=0,s=0;s0?i.pop():o++;break;default:i.push(a)}}if(\"\"==t){for(;o-- >0;)i.unshift(\"..\");0===i.length&&i.push(\".\")}return t+i.join(\"/\")+n}function _joinAndCanonicalizePath(e){var t=e[a.Path];return t=i.isBlank(t)?\"\":_removeDotSegments(t),e[a.Path]=t,_buildFromEncodedParts(e[a.Scheme],e[a.UserInfo],e[a.Domain],e[a.Port],t,e[a.QueryData],e[a.Fragment])}function _resolveUrl(e,t){var n=_split(encodeURI(t)),r=_split(e);if(i.isPresent(n[a.Scheme]))return _joinAndCanonicalizePath(n);n[a.Scheme]=r[a.Scheme];for(var o=a.Scheme;o<=a.Port;o++)i.isBlank(n[o])&&(n[o]=r[o]);if(\"/\"==n[a.Path][0])return _joinAndCanonicalizePath(n);var s=r[a.Path];i.isBlank(s)&&(s=\"/\");var l=s.lastIndexOf(\"/\");return s=s.substring(0,l+1)+n[a.Path],n[a.Path]=s,_joinAndCanonicalizePath(n)}var r=n(0),i=n(5),o=\"asset:\";t.createUrlResolverWithoutPackagePrefix=createUrlResolverWithoutPackagePrefix,t.createOfflineCompileUrlResolver=createOfflineCompileUrlResolver,t.DEFAULT_PACKAGE_URL_PROVIDER={provide:r.PACKAGE_ROOT_URL,useValue:\"/\"};var s=function(){function UrlResolver(e){void 0===e&&(e=null),this._packagePrefix=e}return UrlResolver.prototype.resolve=function(e,t){var n=t;i.isPresent(e)&&e.length>0&&(n=_resolveUrl(e,n));var r=_split(n),s=this._packagePrefix;if(i.isPresent(s)&&i.isPresent(r)&&\"package\"==r[a.Scheme]){var l=r[a.Path];if(this._packagePrefix!==o)return s=i.StringWrapper.stripRight(s,\"/\"),l=i.StringWrapper.stripLeft(l,\"/\"),s+\"/\"+l;var c=l.split(/\\//);n=\"asset:\"+c[0]+\"/lib/\"+c.slice(1).join(\"/\")}return n},UrlResolver.decorators=[{type:r.Injectable}],UrlResolver.ctorParameters=[{type:void 0,decorators:[{type:r.Inject,args:[r.PACKAGE_ROOT_URL]}]}],UrlResolver}();t.UrlResolver=s,t.getUrlScheme=getUrlScheme;var a,l=new RegExp(\"^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([\\\\w\\\\d\\\\-\\\\u0100-\\\\uffff.%]*)(?::([0-9]+))?)?([^?#]+)?(?:\\\\?([^#]*))?(?:#(.*))?$\");!function(e){e[e.Scheme=1]=\"Scheme\",e[e.UserInfo=2]=\"UserInfo\",e[e.Domain=3]=\"Domain\",e[e.Port=4]=\"Port\",e[e.Path=5]=\"Path\",e[e.QueryData=6]=\"QueryData\",e[e.Fragment=7]=\"Fragment\"}(a||(a={}))},function(e,t,n){\"use strict\";function _enumExpression(e,t){if(s.isBlank(t))return l.NULL_EXPR;var n=s.resolveEnumToken(e.runtime,t);return l.importExpr(new o.CompileIdentifierMetadata({name:e.name+\".\"+n,moduleUrl:e.moduleUrl,runtime:t}))}var r=n(0),i=n(27),o=n(31),s=n(5),a=n(28),l=n(17),c=function(){function ViewTypeEnum(){}return ViewTypeEnum.fromValue=function(e){return _enumExpression(a.Identifiers.ViewType,e)},ViewTypeEnum.HOST=ViewTypeEnum.fromValue(i.ViewType.HOST),ViewTypeEnum.COMPONENT=ViewTypeEnum.fromValue(i.ViewType.COMPONENT),ViewTypeEnum.EMBEDDED=ViewTypeEnum.fromValue(i.ViewType.EMBEDDED),ViewTypeEnum}();t.ViewTypeEnum=c;var u=function(){function ViewEncapsulationEnum(){}return ViewEncapsulationEnum.fromValue=function(e){return _enumExpression(a.Identifiers.ViewEncapsulation,e)},ViewEncapsulationEnum.Emulated=ViewEncapsulationEnum.fromValue(r.ViewEncapsulation.Emulated),ViewEncapsulationEnum.Native=ViewEncapsulationEnum.fromValue(r.ViewEncapsulation.Native),ViewEncapsulationEnum.None=ViewEncapsulationEnum.fromValue(r.ViewEncapsulation.None),ViewEncapsulationEnum}();t.ViewEncapsulationEnum=u;var p=function(){function ChangeDetectionStrategyEnum(){}return ChangeDetectionStrategyEnum.fromValue=function(e){return _enumExpression(a.Identifiers.ChangeDetectionStrategy,e)},ChangeDetectionStrategyEnum.OnPush=ChangeDetectionStrategyEnum.fromValue(r.ChangeDetectionStrategy.OnPush),ChangeDetectionStrategyEnum.Default=ChangeDetectionStrategyEnum.fromValue(r.ChangeDetectionStrategy.Default),ChangeDetectionStrategyEnum}();t.ChangeDetectionStrategyEnum=p;var d=function(){function ChangeDetectorStatusEnum(){}return ChangeDetectorStatusEnum.fromValue=function(e){return _enumExpression(a.Identifiers.ChangeDetectorStatus,e)},ChangeDetectorStatusEnum.CheckOnce=ChangeDetectorStatusEnum.fromValue(i.ChangeDetectorStatus.CheckOnce),ChangeDetectorStatusEnum.Checked=ChangeDetectorStatusEnum.fromValue(i.ChangeDetectorStatus.Checked),ChangeDetectorStatusEnum.CheckAlways=ChangeDetectorStatusEnum.fromValue(i.ChangeDetectorStatus.CheckAlways),ChangeDetectorStatusEnum.Detached=ChangeDetectorStatusEnum.fromValue(i.ChangeDetectorStatus.Detached),ChangeDetectorStatusEnum.Errored=ChangeDetectorStatusEnum.fromValue(i.ChangeDetectorStatus.Errored),ChangeDetectorStatusEnum.Destroyed=ChangeDetectorStatusEnum.fromValue(i.ChangeDetectorStatus.Destroyed),ChangeDetectorStatusEnum}();t.ChangeDetectorStatusEnum=d;var h=function(){function ViewConstructorVars(){}return ViewConstructorVars.viewUtils=l.variable(\"viewUtils\"),ViewConstructorVars.parentInjector=l.variable(\"parentInjector\"),ViewConstructorVars.declarationEl=l.variable(\"declarationEl\"),ViewConstructorVars}();t.ViewConstructorVars=h;var f=function(){function ViewProperties(){}return ViewProperties.renderer=l.THIS_EXPR.prop(\"renderer\"),ViewProperties.projectableNodes=l.THIS_EXPR.prop(\"projectableNodes\"),ViewProperties.viewUtils=l.THIS_EXPR.prop(\"viewUtils\"),ViewProperties}();t.ViewProperties=f;var m=function(){function EventHandlerVars(){}return EventHandlerVars.event=l.variable(\"$event\"),EventHandlerVars}();t.EventHandlerVars=m;var g=function(){function InjectMethodVars(){}return InjectMethodVars.token=l.variable(\"token\"),InjectMethodVars.requestNodeIndex=l.variable(\"requestNodeIndex\"),InjectMethodVars.notFoundResult=l.variable(\"notFoundResult\"),InjectMethodVars}();t.InjectMethodVars=g;var y=function(){function DetectChangesVars(){}return DetectChangesVars.throwOnChange=l.variable(\"throwOnChange\"),DetectChangesVars.changes=l.variable(\"changes\"),DetectChangesVars.changed=l.variable(\"changed\"),DetectChangesVars.valUnwrapper=l.variable(\"valUnwrapper\"),DetectChangesVars}();t.DetectChangesVars=y},99,function(e,t,n){var r=n(95);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},function(e,t,n){var r=n(8),i=n(462),o=n(288),s=n(300)(\"IE_PROTO\"),a=function(){},l=\"prototype\",c=function(){var e,t=n(451)(\"iframe\"),r=o.length,i=\"<\",s=\">\";for(t.style.display=\"none\",n(452).appendChild(t),t.src=\"javascript:\",e=t.contentWindow.document,e.open(),e.write(i+\"script\"+s+\"document.F=Object\"+i+\"/script\"+s),e.close(),c=e.F;r--;)delete c[l][o[r]];return c()};e.exports=Object.create||function(e,t){var n;return null!==e?(a[l]=r(e),n=new a,a[l]=null,n[s]=e):n=c(),void 0===t?n:i(n,t)}},function(e,t,n){var r=n(464),i=n(288);e.exports=Object.keys||function(e){return r(e,i)}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t,n){\"use strict\";function multicast(e){var t;return t=\"function\"==typeof e?e:function(){return e},new r.ConnectableObservable(this,t)}var r=n(502);t.multicast=multicast},[1107,219],function(e,t){\"use strict\";var n=function(){function ElementSchemaRegistry(){}return ElementSchemaRegistry}();t.ElementSchemaRegistry=n},function(e,t,n){\"use strict\";function getPropertyInView(e,t,n){if(t===n)return e;for(var o=s.THIS_EXPR,a=t;a!==n&&i.isPresent(a.declarationElement.view);)a=a.declarationElement.view,o=o.prop(\"parent\");if(a!==n)throw new r.BaseException(\"Internal error: Could not calculate a property in a parent view: \"+e);if(e instanceof s.ReadPropExpr){var l=e;(n.fields.some(function(e){return e.name==l.name})||n.getters.some(function(e){return e.name==l.name}))&&(o=o.cast(n.classType))}return s.replaceVarInExpression(s.THIS_EXPR.name,o,e)}function injectFromViewParentInjector(e,t){var n=[a.createDiTokenExpression(e)];return t&&n.push(s.NULL_EXPR),s.THIS_EXPR.prop(\"parentInjector\").callMethod(\"get\",n)}function getViewFactoryName(e,t){return\"viewFactory_\"+e.type.name+t}function createFlatArray(e){for(var t=[],n=s.literalArr([]),r=0;r0&&(n=n.callMethod(s.BuiltinMethod.ConcatArray,[s.literalArr(t)]),t=[]),n=n.callMethod(s.BuiltinMethod.ConcatArray,[i])):t.push(i)}return t.length>0&&(n=n.callMethod(s.BuiltinMethod.ConcatArray,[s.literalArr(t)])),n}function createPureProxy(e,t,n,a){a.fields.push(new s.ClassField(n.name,null));var l=t0){var r=e.substring(0,n),i=e.substring(n+1).trim();t.set(r,i)}}),t},Headers.prototype.append=function(e,t){e=normalize(e);var n=this._headersMap.get(e),i=r.isListLikeIterable(n)?n:[];i.push(t),this._headersMap.set(e,i)},Headers.prototype.delete=function(e){this._headersMap.delete(normalize(e))},Headers.prototype.forEach=function(e){this._headersMap.forEach(e)},Headers.prototype.get=function(e){return r.ListWrapper.first(this._headersMap.get(normalize(e)))},Headers.prototype.has=function(e){return this._headersMap.has(normalize(e))},Headers.prototype.keys=function(){return r.MapWrapper.keys(this._headersMap)},Headers.prototype.set=function(e,t){var n=[];if(r.isListLikeIterable(t)){var i=t.join(\",\");n.push(i)}else n.push(t);this._headersMap.set(normalize(e),n)},Headers.prototype.values=function(){return r.MapWrapper.values(this._headersMap)},Headers.prototype.toJSON=function(){var e={};return this._headersMap.forEach(function(t,n){var i=[];r.iterateListLike(t,function(e){return i=r.ListWrapper.concat(i,e.split(\",\"))}),e[normalize(n)]=i}),e},Headers.prototype.getAll=function(e){var t=this._headersMap.get(normalize(e));return r.isListLikeIterable(t)?t:[]},Headers.prototype.entries=function(){throw new i.BaseException('\"entries\" method is not implemented on Headers class')},Headers}();t.Headers=s},function(e,t){\"use strict\";var n=function(){function ConnectionBackend(){}return ConnectionBackend}();t.ConnectionBackend=n;var r=function(){function Connection(){}return Connection}();t.Connection=r;var i=function(){function XSRFStrategy(){}return XSRFStrategy}();t.XSRFStrategy=i},function(e,t,n){\"use strict\";var r=n(0);t.RenderDebugInfo=r.__core_private__.RenderDebugInfo,t.wtfInit=r.__core_private__.wtfInit,t.ReflectionCapabilities=r.__core_private__.ReflectionCapabilities,t.VIEW_ENCAPSULATION_VALUES=r.__core_private__.VIEW_ENCAPSULATION_VALUES,t.DebugDomRootRenderer=r.__core_private__.DebugDomRootRenderer,t.reflector=r.__core_private__.reflector,t.NoOpAnimationPlayer=r.__core_private__.NoOpAnimationPlayer,t.AnimationPlayer=r.__core_private__.AnimationPlayer,t.AnimationSequencePlayer=r.__core_private__.AnimationSequencePlayer,t.AnimationGroupPlayer=r.__core_private__.AnimationGroupPlayer,t.AnimationKeyframe=r.__core_private__.AnimationKeyframe,t.AnimationStyles=r.__core_private__.AnimationStyles,t.prepareFinalAnimationStyles=r.__core_private__.prepareFinalAnimationStyles,t.balanceAnimationKeyframes=r.__core_private__.balanceAnimationKeyframes,t.flattenStyles=r.__core_private__.flattenStyles,t.clearStyles=r.__core_private__.clearStyles,t.collectAndResolveStyles=r.__core_private__.collectAndResolveStyles},function(e,t,n){\"use strict\";var r=n(0);t.DOCUMENT=new r.OpaqueToken(\"DocumentToken\")},function(e,t,n){\"use strict\";var r=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},i=n(0),o=n(33),s=n(16),a=n(62),l=n(55),c=function(){function ClientMessageBrokerFactory(){}return ClientMessageBrokerFactory}();t.ClientMessageBrokerFactory=c;var u=function(e){function ClientMessageBrokerFactory_(t,n){e.call(this),this._messageBus=t,this._serializer=n}return r(ClientMessageBrokerFactory_,e),ClientMessageBrokerFactory_.prototype.createMessageBroker=function(e,t){return void 0===t&&(t=!0),this._messageBus.initChannel(e,t),new d(this._messageBus,this._serializer,e)},ClientMessageBrokerFactory_.decorators=[{type:i.Injectable}],ClientMessageBrokerFactory_.ctorParameters=[{type:a.MessageBus},{type:l.Serializer}],ClientMessageBrokerFactory_}(c);t.ClientMessageBrokerFactory_=u;var p=function(){function ClientMessageBroker(){}return ClientMessageBroker}();t.ClientMessageBroker=p;var d=function(e){function ClientMessageBroker_(t,n,r){var i=this;e.call(this),this.channel=r,this._pending=new Map,this._sink=t.to(r),this._serializer=n;var o=t.from(r);o.subscribe({next:function(e){return i._handleMessage(e)}})}return r(ClientMessageBroker_,e),ClientMessageBroker_.prototype._generateMessageId=function(e){for(var t=s.stringify(s.DateWrapper.toMillis(s.DateWrapper.now())),n=0,r=e+t+s.stringify(n);s.isPresent(this._pending[r]);)r=\"\"+e+t+n,n++;return r},ClientMessageBroker_.prototype.runOnService=function(e,t){var n=this,r=[];s.isPresent(e.args)&&e.args.forEach(function(e){null!=e.type?r.push(n._serializer.serialize(e.value,e.type)):r.push(e.value)});var i,o=null;if(null!=t){var a;i=new Promise(function(e,t){a={resolve:e,reject:t}}),o=this._generateMessageId(e.method),this._pending.set(o,a),i.catch(function(e){s.print(e),a.reject(e)}),i=i.then(function(e){return null==n._serializer?e:n._serializer.deserialize(e,t)})}else i=null;var l={method:e.method,args:r};return null!=o&&(l.id=o),this._sink.emit(l),i},ClientMessageBroker_.prototype._handleMessage=function(e){var t=new h(e);if(s.StringWrapper.equals(t.type,\"result\")||s.StringWrapper.equals(t.type,\"error\")){var n=t.id;this._pending.has(n)&&(s.StringWrapper.equals(t.type,\"result\")?this._pending.get(n).resolve(t.value):this._pending.get(n).reject(t.value),this._pending.delete(n))}},ClientMessageBroker_}(p);t.ClientMessageBroker_=d;var h=function(){function MessageData(e){this.type=o.StringMapWrapper.get(e,\"type\"),this.id=this._getValueIfPresent(e,\"id\"),this.value=this._getValueIfPresent(e,\"value\")}return MessageData.prototype._getValueIfPresent=function(e,t){return o.StringMapWrapper.contains(e,t)?o.StringMapWrapper.get(e,t):null},MessageData}(),f=function(){function FnArg(e,t){this.value=e,this.type=t}return FnArg}();t.FnArg=f;var m=function(){function UiArguments(e,t){this.method=e,this.args=t}return UiArguments}();t.UiArguments=m},function(e,t,n){\"use strict\";var r=n(0),i=function(){function RenderStore(){this._nextIndex=0,this._lookupById=new Map,this._lookupByObject=new Map}return RenderStore.prototype.allocateId=function(){return this._nextIndex++},RenderStore.prototype.store=function(e,t){this._lookupById.set(t,e),this._lookupByObject.set(e,t)},RenderStore.prototype.remove=function(e){var t=this._lookupByObject.get(e);this._lookupByObject.delete(e),this._lookupById.delete(t)},RenderStore.prototype.deserialize=function(e){return null==e?null:this._lookupById.has(e)?this._lookupById.get(e):null},RenderStore.prototype.serialize=function(e){return null==e?null:this._lookupByObject.get(e)},RenderStore.decorators=[{type:r.Injectable}],RenderStore.ctorParameters=[],RenderStore}();t.RenderStore=i},function(e,t,n){\"use strict\";var r=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},i=n(0),o=n(33),s=n(16),a=n(62),l=n(55),c=function(){function ServiceMessageBrokerFactory(){}return ServiceMessageBrokerFactory}();t.ServiceMessageBrokerFactory=c;var u=function(e){function ServiceMessageBrokerFactory_(t,n){e.call(this),this._messageBus=t,this._serializer=n}return r(ServiceMessageBrokerFactory_,e),ServiceMessageBrokerFactory_.prototype.createMessageBroker=function(e,t){return void 0===t&&(t=!0),this._messageBus.initChannel(e,t),new d(this._messageBus,this._serializer,e)},ServiceMessageBrokerFactory_.decorators=[{type:i.Injectable}],ServiceMessageBrokerFactory_.ctorParameters=[{type:a.MessageBus},{type:l.Serializer}],ServiceMessageBrokerFactory_}(c);t.ServiceMessageBrokerFactory_=u;var p=function(){function ServiceMessageBroker(){}return ServiceMessageBroker}();t.ServiceMessageBroker=p;var d=function(e){function ServiceMessageBroker_(t,n,r){var i=this;e.call(this),this._serializer=n,this.channel=r,this._methods=new o.Map,this._sink=t.to(r);var s=t.from(r);s.subscribe({next:function(e){return i._handleMessage(e)}})}return r(ServiceMessageBroker_,e),ServiceMessageBroker_.prototype.registerMethod=function(e,t,n,r){var i=this;this._methods.set(e,function(e){for(var a=e.args,l=null===t?0:t.length,c=o.ListWrapper.createFixedSize(l),u=0;u0?n[n.length-1]._routeConfig._loadedConfig:null}function nodeChildrenAsMap(e){return e?e.children.reduce(function(e,t){return e[t.value.outlet]=t,e},{}):{}}function getOutlet(e,t){var n=e._outlets[t.outlet];if(!n){var r=t.component.name;throw t.outlet===g.PRIMARY_OUTLET?new Error(\"Cannot find primary outlet to load '\"+r+\"'\"):new Error(\"Cannot find the outlet \"+t.outlet+\" to load '\"+r+\"'\")}return n}n(140),n(499),n(305),n(500),n(493);var r=n(0),i=n(20),o=n(309),s=n(141),a=n(623),l=n(624),c=n(625),u=n(626),p=n(627),d=n(628),h=n(187),f=n(129),m=n(91),g=n(63),y=n(73),v=n(74),b=function(){function NavigationStart(e,t){this.id=e,this.url=t}return NavigationStart.prototype.toString=function(){return\"NavigationStart(id: \"+this.id+\", url: '\"+this.url+\"')\"},NavigationStart}();t.NavigationStart=b;var _=function(){function NavigationEnd(e,t,n){this.id=e,this.url=t,this.urlAfterRedirects=n}return NavigationEnd.prototype.toString=function(){return\"NavigationEnd(id: \"+this.id+\", url: '\"+this.url+\"', urlAfterRedirects: '\"+this.urlAfterRedirects+\"')\"},NavigationEnd}();t.NavigationEnd=_;var w=function(){function NavigationCancel(e,t){this.id=e,this.url=t}return NavigationCancel.prototype.toString=function(){return\"NavigationCancel(id: \"+this.id+\", url: '\"+this.url+\"')\"},NavigationCancel}();t.NavigationCancel=w;var S=function(){function NavigationError(e,t,n){this.id=e,this.url=t,this.error=n}return NavigationError.prototype.toString=function(){return\"NavigationError(id: \"+this.id+\", url: '\"+this.url+\"', error: \"+this.error+\")\"},NavigationError}();t.NavigationError=S;var C=function(){function RoutesRecognized(e,t,n,r){this.id=e,this.url=t,this.urlAfterRedirects=n,this.state=r}return RoutesRecognized.prototype.toString=function(){return\"RoutesRecognized(id: \"+this.id+\", url: '\"+this.url+\"', urlAfterRedirects: '\"+this.urlAfterRedirects+\"', state: \"+this.state+\")\"},RoutesRecognized}();t.RoutesRecognized=C;var E=function(){function Router(e,t,n,r,o,s,a,l){this.rootComponentType=e,this.resolver=t,this.urlSerializer=n,this.outletMap=r,this.location=o,this.injector=s,this.navigationId=0,this.navigated=!1,this.resetConfig(l),this.routerEvents=new i.Subject,this.currentUrlTree=y.createEmptyUrlTree(),this.configLoader=new h.RouterConfigLoader(a),this.currentRouterState=m.createEmptyState(this.currentUrlTree,this.rootComponentType)}return Router.prototype.initialNavigation=function(){this.setUpLocationChangeListener(),this.navigateByUrl(this.location.path(!0))},Object.defineProperty(Router.prototype,\"routerState\",{get:function(){return this.currentRouterState},enumerable:!0,configurable:!0}),Object.defineProperty(Router.prototype,\"url\",{get:function(){return this.serializeUrl(this.currentUrlTree)},enumerable:!0,configurable:!0}),Object.defineProperty(Router.prototype,\"events\",{get:function(){return this.routerEvents},enumerable:!0,configurable:!0}),Router.prototype.resetConfig=function(e){l.validateConfig(e),this.config=e},Router.prototype.ngOnDestroy=function(){this.dispose()},Router.prototype.dispose=function(){this.locationSubscription.unsubscribe()},Router.prototype.createUrlTree=function(e,t){var n=void 0===t?{}:t,r=n.relativeTo,i=n.queryParams,o=n.fragment,s=n.preserveQueryParams,a=n.preserveFragment,l=r?r:this.routerState.root,c=s?this.currentUrlTree.queryParams:i,p=a?this.currentUrlTree.fragment:o;return u.createUrlTree(l,this.currentUrlTree,e,c,p)},Router.prototype.navigateByUrl=function(e,t){if(void 0===t&&(t={skipLocationChange:!1}),e instanceof y.UrlTree)return this.scheduleNavigation(e,t);var n=this.urlSerializer.parse(e);return this.scheduleNavigation(n,t)},Router.prototype.navigate=function(e,t){return void 0===t&&(t={skipLocationChange:!1}),this.scheduleNavigation(this.createUrlTree(e,t),t)},Router.prototype.serializeUrl=function(e){return this.urlSerializer.serialize(e)},Router.prototype.parseUrl=function(e){return this.urlSerializer.parse(e)},Router.prototype.isActive=function(e,t){if(e instanceof y.UrlTree)return y.containsTree(this.currentUrlTree,e,t);var n=this.urlSerializer.parse(e);return y.containsTree(this.currentUrlTree,n,t)},Router.prototype.scheduleNavigation=function(e,t){var n=this,r=++this.navigationId;return this.routerEvents.next(new b(r,this.serializeUrl(e))),Promise.resolve().then(function(i){return n.runNavigate(e,t.skipLocationChange,r)})},Router.prototype.setUpLocationChangeListener=function(){var e=this;this.locationSubscription=this.location.subscribe(Zone.current.wrap(function(t){var n=e.urlSerializer.parse(t.url);return e.currentUrlTree.toString()!==n.toString()?e.scheduleNavigation(n,t.pop):null}))},Router.prototype.runNavigate=function(e,t,n){var r=this;return n!==this.navigationId?(this.location.go(this.urlSerializer.serialize(this.currentUrlTree)),this.routerEvents.next(new w(n,this.serializeUrl(e))),Promise.resolve(!1)):new Promise(function(i,o){var l,u,h,f,m=r.currentRouterState,g=r.currentUrlTree;a.applyRedirects(r.injector,r.configLoader,e,r.config).mergeMap(function(e){return f=e,p.recognize(r.rootComponentType,r.config,f,r.serializeUrl(f))}).mergeMap(function(t){return r.routerEvents.next(new C(n,r.serializeUrl(e),r.serializeUrl(f),t)),d.resolve(r.resolver,t)}).map(function(e){return c.createRouterState(e,r.currentRouterState)}).map(function(e){l=e,h=new P(l.snapshot,r.currentRouterState.snapshot,r.injector),h.traverse(r.outletMap)}).mergeMap(function(e){return h.checkGuards()}).mergeMap(function(e){return e?h.resolveData().map(function(){return e}):s.of(e)}).forEach(function(i){if(!i||n!==r.navigationId)return r.routerEvents.next(new w(n,r.serializeUrl(e))),void(u=!1);if(r.currentUrlTree=f,r.currentRouterState=l,new x(l,m).activate(r.outletMap),!t){var o=r.urlSerializer.serialize(f);r.location.isCurrentPathEqualTo(o)?r.location.replaceState(o):r.location.go(o)}u=!0}).then(function(){r.navigated=!0,r.routerEvents.next(new _(n,r.serializeUrl(e),r.serializeUrl(f))),i(u)},function(t){r.currentRouterState=m,r.currentUrlTree=g,r.routerEvents.next(new S(n,r.serializeUrl(e),t)),o(t)})})},Router}();t.Router=E;var R=function(){function CanActivate(e){this.path=e}return Object.defineProperty(CanActivate.prototype,\"route\",{get:function(){return this.path[this.path.length-1]},enumerable:!0,configurable:!0}),CanActivate}(),T=function(){function CanDeactivate(e,t){this.component=e,this.route=t}return CanDeactivate}(),P=function(){function PreActivation(e,t,n){this.future=e,this.curr=t,this.injector=n,this.checks=[]}return PreActivation.prototype.traverse=function(e){var t=this.future._root,n=this.curr?this.curr._root:null;this.traverseChildRoutes(t,n,e,[t.value])},PreActivation.prototype.checkGuards=function(){var e=this;return 0===this.checks.length?s.of(!0):o.from(this.checks).map(function(t){if(t instanceof R)return v.andObservables(o.from([e.runCanActivate(t.route),e.runCanActivateChild(t.path)]));if(t instanceof T){var n=t;return e.runCanDeactivate(n.component,n.route)}throw new Error(\"Cannot be reached\")}).mergeAll().every(function(e){return e===!0})},PreActivation.prototype.resolveData=function(){var e=this;return 0===this.checks.length?s.of(null):o.from(this.checks).mergeMap(function(t){return t instanceof R?e.runResolve(t.route):s.of(null)}).reduce(function(e,t){return e})},PreActivation.prototype.traverseChildRoutes=function(e,t,n,r){var i=this,o=nodeChildrenAsMap(t);e.children.forEach(function(e){i.traverseRoutes(e,o[e.value.outlet],n,r.concat([e.value])),delete o[e.value.outlet]}),v.forEach(o,function(e,t){return i.deactivateOutletAndItChildren(e,n._outlets[t])})},PreActivation.prototype.traverseRoutes=function(e,t,n,r){var i=e.value,o=t?t.value:null,s=n?n._outlets[e.value.outlet]:null;o&&i._routeConfig===o._routeConfig?(v.shallowEqual(i.params,o.params)||this.checks.push(new T(s.component,o),new R(r)),i.component?this.traverseChildRoutes(e,t,s?s.outletMap:null,r):this.traverseChildRoutes(e,t,n,r)):(o&&(o.component?this.deactivateOutletAndItChildren(o,s):this.deactivateOutletMap(n)),this.checks.push(new R(r)),i.component?this.traverseChildRoutes(e,null,s?s.outletMap:null,r):this.traverseChildRoutes(e,null,n,r))},PreActivation.prototype.deactivateOutletAndItChildren=function(e,t){t&&t.isActivated&&(this.deactivateOutletMap(t.outletMap),this.checks.push(new T(t.component,e)))},PreActivation.prototype.deactivateOutletMap=function(e){var t=this;v.forEach(e._outlets,function(e){e.isActivated&&t.deactivateOutletAndItChildren(e.activatedRoute.snapshot,e)})},PreActivation.prototype.runCanActivate=function(e){var t=this,n=e._routeConfig?e._routeConfig.canActivate:null;if(!n||0===n.length)return s.of(!0);var r=o.from(n).map(function(n){var r=t.getToken(n,e,t.future);return r.canActivate?v.wrapIntoObservable(r.canActivate(e,t.future)):v.wrapIntoObservable(r(e,t.future))});return v.andObservables(r)},PreActivation.prototype.runCanActivateChild=function(e){var t=this,n=e[e.length-1],r=e.slice(0,e.length-1).reverse().map(function(e){return t.extractCanActivateChild(e)}).filter(function(e){return null!==e});return v.andObservables(o.from(r).map(function(e){var r=o.from(e.guards).map(function(e){var r=t.getToken(e,e.node,t.future);return r.canActivateChild?v.wrapIntoObservable(r.canActivateChild(n,t.future)):v.wrapIntoObservable(r(n,t.future))});return v.andObservables(r)}))},PreActivation.prototype.extractCanActivateChild=function(e){var t=e._routeConfig?e._routeConfig.canActivateChild:null;return t&&0!==t.length?{node:e,guards:t}:null},PreActivation.prototype.runCanDeactivate=function(e,t){var n=this,r=t&&t._routeConfig?t._routeConfig.canDeactivate:null;return r&&0!==r.length?o.from(r).map(function(r){var i=n.getToken(r,t,n.curr);return i.canDeactivate?v.wrapIntoObservable(i.canDeactivate(e,t,n.curr)):v.wrapIntoObservable(i(e,t,n.curr))}).mergeAll().every(function(e){return e===!0}):s.of(!0)},PreActivation.prototype.runResolve=function(e){var t=e._resolve;return this.resolveNode(t.current,e).map(function(n){return t.resolvedData=n,e.data=v.merge(e.data,t.flattenedResolvedData),null})},PreActivation.prototype.resolveNode=function(e,t){var n=this;return v.waitForMap(e,function(e,r){var i=n.getToken(r,t,n.future);return i.resolve?v.wrapIntoObservable(i.resolve(t,n.future)):v.wrapIntoObservable(i(t,n.future))})},PreActivation.prototype.getToken=function(e,t,n){var r=closestLoadedConfig(n,t),i=r?r.injector:this.injector;return i.get(e)},PreActivation}(),x=function(){function ActivateRoutes(e,t){this.futureState=e,this.currState=t}return ActivateRoutes.prototype.activate=function(e){var t=this.futureState._root,n=this.currState?this.currState._root:null;m.advanceActivatedRoute(this.futureState.root),this.activateChildRoutes(t,n,e)},ActivateRoutes.prototype.activateChildRoutes=function(e,t,n){var r=this,i=nodeChildrenAsMap(t);e.children.forEach(function(e){r.activateRoutes(e,i[e.value.outlet],n),delete i[e.value.outlet]}),v.forEach(i,function(e,t){return r.deactivateOutletAndItChildren(n._outlets[t])})},ActivateRoutes.prototype.activateRoutes=function(e,t,n){\nvar r=e.value,i=t?t.value:null;if(r===i)if(m.advanceActivatedRoute(r),r.component){var o=getOutlet(n,e.value);this.activateChildRoutes(e,t,o.outletMap)}else this.activateChildRoutes(e,t,n);else{if(i)if(i.component){var o=getOutlet(n,e.value);this.deactivateOutletAndItChildren(o)}else this.deactivateOutletMap(n);if(r.component){m.advanceActivatedRoute(r);var o=getOutlet(n,e.value),s=new f.RouterOutletMap;this.placeComponentIntoOutlet(s,r,o),this.activateChildRoutes(e,null,s)}else m.advanceActivatedRoute(r),this.activateChildRoutes(e,null,n)}},ActivateRoutes.prototype.placeComponentIntoOutlet=function(e,t,n){var i=[{provide:m.ActivatedRoute,useValue:t},{provide:f.RouterOutletMap,useValue:e}],o=closestLoadedConfig(this.futureState.snapshot,t.snapshot),s=null,a=null;o&&(s=o.factoryResolver,a=o.injector,i.push({provide:r.ComponentFactoryResolver,useValue:s})),n.activate(t,s,a,r.ReflectiveInjector.resolve(i),e)},ActivateRoutes.prototype.deactivateOutletAndItChildren=function(e){e&&e.isActivated&&(this.deactivateOutletMap(e.outletMap),e.deactivate())},ActivateRoutes.prototype.deactivateOutletMap=function(e){var t=this;v.forEach(e._outlets,function(e){return t.deactivateOutletAndItChildren(e)})},ActivateRoutes}()},function(e,t){\"use strict\";var n=function(){function RouterOutletMap(){this._outlets={}}return RouterOutletMap.prototype.registerOutlet=function(e,t){this._outlets[e]=t},RouterOutletMap.prototype.removeOutlet=function(e){this._outlets[e]=void 0},RouterOutletMap}();t.RouterOutletMap=n},function(e,t,n){\"use strict\";var r=n(43),i=(n.n(r),n(0));n.n(i);n.d(t,\"a\",function(){return a});var o=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},s=this&&this.__metadata||function(e,t){if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=function(){function FeaturesService(e){var t=this;this.http=e,this.activeReparents=!1,this.showStatus=!1,this.showTopologyCRUD=!1,this.showWorkflows=!1,this.workflows=[],this.featuresUrl=\"../api/features\",this.getFeatures().subscribe(function(e){t.activeReparents=e.activeReparents,t.showStatus=e.showStatus,t.showTopologyCRUD=e.showTopologyCRUD,t.showWorkflows=e.showWorkflows,t.workflows=e.workflows})}return FeaturesService.prototype.getFeatures=function(){return this.http.get(this.featuresUrl).map(function(e){return e.json()})},FeaturesService=o([n.i(i.Injectable)(),s(\"design:paramtypes\",[\"function\"==typeof(e=\"undefined\"!=typeof r.Http&&r.Http)&&e||Object])],FeaturesService);var e}()},function(e,t,n){\"use strict\";var r=n(43),i=(n.n(r),n(0)),o=(n.n(i),n(484)),s=(n.n(o),n(283)),a=n(644),l=n(284);n.d(t,\"a\",function(){return p});var c=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},u=this&&this.__metadata||function(e,t){if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.metadata)return Reflect.metadata(e,t)},p=function(){function KeyspaceService(e,t){this.http=e,this.shardService=t,this.keyspacesUrl=\"../api/keyspaces/\",this.srvKeyspaceUrl=\"../api/srv_keyspace/local/\"}return KeyspaceService.prototype.getShards=function(e){return this.shardService.getShards(e)},KeyspaceService.prototype.getKeyspaceNames=function(){return this.http.get(this.keyspacesUrl).map(function(e){return e.json()})},KeyspaceService.prototype.getSrvKeyspaces=function(){return this.http.get(this.srvKeyspaceUrl).map(function(e){return e.json()})},KeyspaceService.prototype.SrvKeyspaceAndNamesObservable=function(){var e=this.getKeyspaceNames(),t=this.getSrvKeyspaces();return e.combineLatest(t)},KeyspaceService.prototype.getKeyspaceShardingData=function(e){return this.http.get(this.keyspacesUrl+e).map(function(e){return e.json()})},KeyspaceService.prototype.getShardsAndShardingData=function(e){var t=this.getShards(e),n=this.getKeyspaceShardingData(e);return t.combineLatest(n)},KeyspaceService.prototype.buildKeyspace=function(e,t){return this.getShardsAndShardingData(e).map(function(n){var r=n[0],i=n[1],o=new a.a(e);return t.forEach(function(e){return o.addServingShard(e)}),r.forEach(function(e){o.contains(e)||o.addNonservingShard(e)}),o.shardingColumnName=i.sharding_column_name||\"\",o.shardingColumnType=i.sharding_column_type||\"\",o})},KeyspaceService.prototype.getServingShards=function(e,t){if(t&&t[e]){var n=t[e].partitions;if(void 0===n)return[];for(var r=0;r=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.metadata)return Reflect.metadata(e,t)},o=n(0),s=n(9),a=n(3),l=function(){function Button(e,t){this.el=e,this.domHandler=t,this.iconPos=\"left\"}return Button.prototype.ngAfterViewInit=function(){if(this.domHandler.addMultipleClasses(this.el.nativeElement,this.getStyleClass()),this.icon){var e=document.createElement(\"span\"),t=\"right\"==this.iconPos?\"ui-button-icon-right\":\"ui-button-icon-left\";e.className=t+\" ui-c fa fa-fw \"+this.icon,this.el.nativeElement.appendChild(e)}var n=document.createElement(\"span\");n.className=\"ui-button-text ui-c\",n.appendChild(document.createTextNode(this.label||\"ui-button\")),this.el.nativeElement.appendChild(n),this.initialized=!0},Button.prototype.onMouseenter=function(e){this.hover=!0},Button.prototype.onMouseleave=function(e){this.hover=!1,this.active=!1},Button.prototype.onMouseDown=function(e){this.active=!0},Button.prototype.onMouseUp=function(e){this.active=!1},Button.prototype.onFocus=function(e){this.focus=!0},Button.prototype.onBlur=function(e){this.focus=!1},Button.prototype.isDisabled=function(){return this.el.nativeElement.disabled},Button.prototype.getStyleClass=function(){var e=\"ui-button ui-widget ui-state-default ui-corner-all\";return e+=this.icon?null!=this.label&&void 0!=this.label?\"left\"==this.iconPos?\" ui-button-text-icon-left\":\" ui-button-text-icon-right\":\" ui-button-icon-only\":\" ui-button-text-only\"},Object.defineProperty(Button.prototype,\"label\",{get:function(){return this._label},set:function(e){this._label=e,this.initialized&&(this.domHandler.findSingle(this.el.nativeElement,\".ui-button-text\").textContent=this._label)},enumerable:!0,configurable:!0}),Button.prototype.ngOnDestroy=function(){for(;this.el.nativeElement.hasChildNodes();)this.el.nativeElement.removeChild(this.el.nativeElement.lastChild);this.initialized=!1},r([o.Input(),i(\"design:type\",String)],Button.prototype,\"icon\",void 0),r([o.Input(),i(\"design:type\",String)],Button.prototype,\"iconPos\",void 0),r([o.HostListener(\"mouseenter\",[\"$event\"]),i(\"design:type\",Function),i(\"design:paramtypes\",[Object]),i(\"design:returntype\",void 0)],Button.prototype,\"onMouseenter\",null),r([o.HostListener(\"mouseleave\",[\"$event\"]),i(\"design:type\",Function),i(\"design:paramtypes\",[Object]),i(\"design:returntype\",void 0)],Button.prototype,\"onMouseleave\",null),r([o.HostListener(\"mousedown\",[\"$event\"]),i(\"design:type\",Function),i(\"design:paramtypes\",[Object]),i(\"design:returntype\",void 0)],Button.prototype,\"onMouseDown\",null),r([o.HostListener(\"mouseup\",[\"$event\"]),i(\"design:type\",Function),i(\"design:paramtypes\",[Object]),i(\"design:returntype\",void 0)],Button.prototype,\"onMouseUp\",null),r([o.HostListener(\"focus\",[\"$event\"]),i(\"design:type\",Function),i(\"design:paramtypes\",[Object]),i(\"design:returntype\",void 0)],Button.prototype,\"onFocus\",null),r([o.HostListener(\"blur\",[\"$event\"]),i(\"design:type\",Function),i(\"design:paramtypes\",[Object]),i(\"design:returntype\",void 0)],Button.prototype,\"onBlur\",null),r([o.Input(),i(\"design:type\",String)],Button.prototype,\"label\",null),Button=r([o.Directive({selector:\"[pButton]\",host:{\"[class.ui-state-hover]\":\"hover&&!isDisabled()\",\"[class.ui-state-focus]\":\"focus\",\"[class.ui-state-active]\":\"active\",\"[class.ui-state-disabled]\":\"isDisabled()\"},providers:[s.DomHandler]}),i(\"design:paramtypes\",[o.ElementRef,s.DomHandler])],Button)}();t.Button=l;var c=function(){function ButtonModule(){}return ButtonModule=r([o.NgModule({imports:[a.CommonModule],exports:[l],declarations:[l]}),i(\"design:paramtypes\",[])],ButtonModule)}();t.ButtonModule=c},function(e,t,n){\"use strict\";var r=n(1),i=n(505);r.Observable.prototype.map=i.map},function(e,t,n){\"use strict\";var r=n(79);t.of=r.ArrayObservable.of},function(e,t,n){\"use strict\";var r=n(51),i=r.root.Symbol;if(\"function\"==typeof i)i.iterator?t.$$iterator=i.iterator:\"function\"==typeof i.for&&(t.$$iterator=i.for(\"iterator\"));else if(r.root.Set&&\"function\"==typeof(new r.root.Set)[\"@@iterator\"])t.$$iterator=\"@@iterator\";else if(r.root.Map)for(var o=Object.getOwnPropertyNames(r.root.Map.prototype),s=0;s=this.length?i.$EOF:o.StringWrapper.charCodeAt(this.input,this.index)},_Scanner.prototype.scanToken=function(){for(var e=this.input,t=this.length,n=this.peek,r=this.index;n<=i.$SPACE;){if(++r>=t){n=i.$EOF;break}n=o.StringWrapper.charCodeAt(e,r)}if(this.peek=n,this.index=r,r>=t)return null;if(isIdentifierStart(n))return this.scanIdentifier();if(i.isDigit(n))return this.scanNumber(r);var s=r;switch(n){case i.$PERIOD:return this.advance(),i.isDigit(this.peek)?this.scanNumber(s):newCharacterToken(s,i.$PERIOD);case i.$LPAREN:case i.$RPAREN:case i.$LBRACE:case i.$RBRACE:case i.$LBRACKET:case i.$RBRACKET:case i.$COMMA:case i.$COLON:case i.$SEMICOLON:return this.scanCharacter(s,n);case i.$SQ:case i.$DQ:return this.scanString();case i.$HASH:case i.$PLUS:case i.$MINUS:case i.$STAR:case i.$SLASH:case i.$PERCENT:case i.$CARET:return this.scanOperator(s,o.StringWrapper.fromCharCode(n));case i.$QUESTION:return this.scanComplexOperator(s,\"?\",i.$PERIOD,\".\");case i.$LT:case i.$GT:return this.scanComplexOperator(s,o.StringWrapper.fromCharCode(n),i.$EQ,\"=\");case i.$BANG:case i.$EQ:return this.scanComplexOperator(s,o.StringWrapper.fromCharCode(n),i.$EQ,\"=\",i.$EQ,\"=\");case i.$AMPERSAND:return this.scanComplexOperator(s,\"&\",i.$AMPERSAND,\"&\");case i.$BAR:return this.scanComplexOperator(s,\"|\",i.$BAR,\"|\");case i.$NBSP:for(;i.isWhitespace(this.peek);)this.advance();return this.scanToken()}return this.advance(),this.error(\"Unexpected character [\"+o.StringWrapper.fromCharCode(n)+\"]\",0)},_Scanner.prototype.scanCharacter=function(e,t){return this.advance(),newCharacterToken(e,t)},_Scanner.prototype.scanOperator=function(e,t){return this.advance(),newOperatorToken(e,t)},_Scanner.prototype.scanComplexOperator=function(e,t,n,r,i,s){this.advance();var a=t;return this.peek==n&&(this.advance(),a+=r),o.isPresent(i)&&this.peek==i&&(this.advance(),a+=s),newOperatorToken(e,a)},_Scanner.prototype.scanIdentifier=function(){var e=this.index;for(this.advance();isIdentifierPart(this.peek);)this.advance();var t=this.input.substring(e,this.index);return a.indexOf(t)>-1?newKeywordToken(e,t):newIdentifierToken(e,t)},_Scanner.prototype.scanNumber=function(e){var t=this.index===e;for(this.advance();;){if(i.isDigit(this.peek));else if(this.peek==i.$PERIOD)t=!1;else{if(!isExponentStart(this.peek))break;if(this.advance(),isExponentSign(this.peek)&&this.advance(),!i.isDigit(this.peek))return this.error(\"Invalid exponent\",-1);t=!1}this.advance()}var n=this.input.substring(e,this.index),r=t?o.NumberWrapper.parseIntAutoRadix(n):o.NumberWrapper.parseFloat(n);return newNumberToken(e,r)},_Scanner.prototype.scanString=function(){var e=this.index,t=this.peek;this.advance();for(var n,r=this.index,s=this.input;this.peek!=t;)if(this.peek==i.$BACKSLASH){null==n&&(n=new o.StringJoiner),n.add(s.substring(r,this.index)),this.advance();var a;if(this.peek==i.$u){var l=s.substring(this.index+1,this.index+5);try{a=o.NumberWrapper.parseInt(l,16)}catch(c){return this.error(\"Invalid unicode escape [\\\\u\"+l+\"]\",0)}for(var u=0;u<5;u++)this.advance()}else a=unescape(this.peek),this.advance();n.add(o.StringWrapper.fromCharCode(a)),r=this.index}else{if(this.peek==i.$EOF)return this.error(\"Unterminated quote\",0);this.advance()}var p=s.substring(r,this.index);this.advance();var d=p;return null!=n&&(n.add(p),d=n.toString()),newStringToken(e,d)},_Scanner.prototype.error=function(e,t){var n=this.index+t;return newErrorToken(n,\"Lexer Error: \"+e+\" at column \"+n+\" in expression [\"+this.input+\"]\")},_Scanner}();t.isIdentifier=isIdentifier,t.isQuote=isQuote},function(e,t,n){\"use strict\";function _createInterpolateRegExp(e){var t=o.escapeRegExp(e.start)+\"([\\\\s\\\\S]*?)\"+o.escapeRegExp(e.end);return new RegExp(t,\"g\")}var r=n(0),i=n(233),o=n(5),s=n(68),a=n(236),l=n(151),c=function(){function SplitInterpolation(e,t){this.strings=e,this.expressions=t}return SplitInterpolation}();t.SplitInterpolation=c;var u=function(){function TemplateBindingParseResult(e,t,n){this.templateBindings=e,this.warnings=t,this.errors=n}return TemplateBindingParseResult}();t.TemplateBindingParseResult=u;var p=function(){function Parser(e){this._lexer=e,this.errors=[]}return Parser.prototype.parseAction=function(e,t,n){void 0===n&&(n=s.DEFAULT_INTERPOLATION_CONFIG),this._checkNoInterpolation(e,t,n);var r=this._lexer.tokenize(this._stripComments(e)),i=new d(e,t,r,(!0),this.errors).parseChain();return new a.ASTWithSource(i,e,t,this.errors)},Parser.prototype.parseBinding=function(e,t,n){void 0===n&&(n=s.DEFAULT_INTERPOLATION_CONFIG);var r=this._parseBindingAst(e,t,n);return new a.ASTWithSource(r,e,t,this.errors)},Parser.prototype.parseSimpleBinding=function(e,t,n){void 0===n&&(n=s.DEFAULT_INTERPOLATION_CONFIG);var r=this._parseBindingAst(e,t,n);return h.check(r)||this._reportError(\"Host binding expression can only contain field access and constants\",e,t),new a.ASTWithSource(r,e,t,this.errors)},Parser.prototype._reportError=function(e,t,n,r){this.errors.push(new a.ParserError(e,t,n,r))},Parser.prototype._parseBindingAst=function(e,t,n){var r=this._parseQuote(e,t);if(o.isPresent(r))return r;this._checkNoInterpolation(e,t,n);var i=this._lexer.tokenize(this._stripComments(e));return new d(e,t,i,(!1),this.errors).parseChain()},Parser.prototype._parseQuote=function(e,t){if(o.isBlank(e))return null;var n=e.indexOf(\":\");if(n==-1)return null;var r=e.substring(0,n).trim();if(!l.isIdentifier(r))return null;var i=e.substring(n+1);return new a.Quote(new a.ParseSpan(0,e.length),r,i,t)},Parser.prototype.parseTemplateBindings=function(e,t){var n=this._lexer.tokenize(e);return new d(e,t,n,(!1),this.errors).parseTemplateBindings()},Parser.prototype.parseInterpolation=function(e,t,n){void 0===n&&(n=s.DEFAULT_INTERPOLATION_CONFIG);var r=this.splitInterpolation(e,t,n);if(null==r)return null;for(var i=[],l=0;l0?l.push(p):this._reportError(\"Blank expressions are not allowed in interpolated strings\",e,\"at column \"+this._findInterpolationErrorColumn(i,u,n)+\" in\",t)}return new c(a,l)},Parser.prototype.wrapLiteralPrimitive=function(e,t){return new a.ASTWithSource(new a.LiteralPrimitive(new a.ParseSpan(0,o.isBlank(e)?0:e.length),e),e,t,this.errors)},Parser.prototype._stripComments=function(e){var t=this._commentStart(e);return o.isPresent(t)?e.substring(0,t).trim():e},Parser.prototype._commentStart=function(e){for(var t=null,n=0;n1&&this._reportError(\"Got interpolation (\"+n.start+n.end+\") where expression was expected\",e,\"at column \"+this._findInterpolationErrorColumn(i,1,n)+\" in\",t)},Parser.prototype._findInterpolationErrorColumn=function(e,t,n){for(var r=\"\",i=0;i\":case\"<=\":case\">=\":this.advance();var n=this.parseAdditive();e=new a.Binary(this.span(e.span.start),t,e,n);continue}break}return e},_ParseAST.prototype.parseAdditive=function(){for(var e=this.parseMultiplicative();this.next.type==l.TokenType.Operator;){var t=this.next.strValue;switch(t){case\"+\":case\"-\":this.advance();var n=this.parseMultiplicative();e=new a.Binary(this.span(e.span.start),t,e,n);continue}break}return e},_ParseAST.prototype.parseMultiplicative=function(){for(var e=this.parsePrefix();this.next.type==l.TokenType.Operator;){var t=this.next.strValue;switch(t){case\"*\":case\"%\":case\"/\":this.advance();var n=this.parsePrefix();e=new a.Binary(this.span(e.span.start),t,e,n);continue}break}return e},_ParseAST.prototype.parsePrefix=function(){if(this.next.type==l.TokenType.Operator){var e=this.inputIndex,t=this.next.strValue,n=void 0;switch(t){case\"+\":return this.advance(),this.parsePrefix();case\"-\":return this.advance(),n=this.parsePrefix(),new a.Binary(this.span(e),t,new a.LiteralPrimitive(new a.ParseSpan(e,e),0),n);case\"!\":return this.advance(),n=this.parsePrefix(),new a.PrefixNot(this.span(e),n)}}return this.parseCallChain()},_ParseAST.prototype.parseCallChain=function(){for(var e=this.parsePrimary();;)if(this.optionalCharacter(i.$PERIOD))e=this.parseAccessMemberOrMethodCall(e,!1);else if(this.optionalOperator(\"?.\"))e=this.parseAccessMemberOrMethodCall(e,!0);else if(this.optionalCharacter(i.$LBRACKET)){this.rbracketsExpected++;var t=this.parsePipe();if(this.rbracketsExpected--,this.expectCharacter(i.$RBRACKET),this.optionalOperator(\"=\")){var n=this.parseConditional();e=new a.KeyedWrite(this.span(e.span.start),e,t,n)}else e=new a.KeyedRead(this.span(e.span.start),e,t)}else{if(!this.optionalCharacter(i.$LPAREN))return e;this.rparensExpected++;var r=this.parseCallArguments();this.rparensExpected--,this.expectCharacter(i.$RPAREN),e=new a.FunctionCall(this.span(e.span.start),e,r)}},_ParseAST.prototype.parsePrimary=function(){var e=this.inputIndex;if(this.optionalCharacter(i.$LPAREN)){this.rparensExpected++;var t=this.parsePipe();return this.rparensExpected--,this.expectCharacter(i.$RPAREN),t}if(this.next.isKeywordNull())return this.advance(),new a.LiteralPrimitive(this.span(e),null);if(this.next.isKeywordUndefined())return this.advance(),new a.LiteralPrimitive(this.span(e),(void 0));if(this.next.isKeywordTrue())return this.advance(),new a.LiteralPrimitive(this.span(e),(!0));if(this.next.isKeywordFalse())return this.advance(),new a.LiteralPrimitive(this.span(e),(!1));if(this.next.isKeywordThis())return this.advance(),new a.ImplicitReceiver(this.span(e));if(this.optionalCharacter(i.$LBRACKET)){this.rbracketsExpected++;var n=this.parseExpressionList(i.$RBRACKET);return this.rbracketsExpected--,this.expectCharacter(i.$RBRACKET),new a.LiteralArray(this.span(e),n)}if(this.next.isCharacter(i.$LBRACE))return this.parseLiteralMap();if(this.next.isIdentifier())return this.parseAccessMemberOrMethodCall(new a.ImplicitReceiver(this.span(e)),!1);if(this.next.isNumber()){var r=this.next.toNumber();return this.advance(),new a.LiteralPrimitive(this.span(e),r)}if(this.next.isString()){var o=this.next.toString();return this.advance(),new a.LiteralPrimitive(this.span(e),o)}return this.index>=this.tokens.length?(this.error(\"Unexpected end of expression: \"+this.input),new a.EmptyExpr(this.span(e))):(this.error(\"Unexpected token \"+this.next),new a.EmptyExpr(this.span(e)))},_ParseAST.prototype.parseExpressionList=function(e){var t=[];if(!this.next.isCharacter(e))do t.push(this.parsePipe());while(this.optionalCharacter(i.$COMMA));return t},_ParseAST.prototype.parseLiteralMap=function(){var e=[],t=[],n=this.inputIndex;if(this.expectCharacter(i.$LBRACE),!this.optionalCharacter(i.$RBRACE)){this.rbracesExpected++;do{var r=this.expectIdentifierOrKeywordOrString();e.push(r),this.expectCharacter(i.$COLON),t.push(this.parsePipe())}while(this.optionalCharacter(i.$COMMA));this.rbracesExpected--,this.expectCharacter(i.$RBRACE)}return new a.LiteralMap(this.span(n),e,t)},_ParseAST.prototype.parseAccessMemberOrMethodCall=function(e,t){void 0===t&&(t=!1);var n=e.span.start,r=this.expectIdentifierOrKeyword();if(this.optionalCharacter(i.$LPAREN)){this.rparensExpected++;var o=this.parseCallArguments();this.expectCharacter(i.$RPAREN),this.rparensExpected--;var s=this.span(n);return t?new a.SafeMethodCall(s,e,r,o):new a.MethodCall(s,e,r,o)}if(t)return this.optionalOperator(\"=\")?(this.error(\"The '?.' operator cannot be used in the assignment\"),new a.EmptyExpr(this.span(n))):new a.SafePropertyRead(this.span(n),e,r);if(this.optionalOperator(\"=\")){if(!this.parseAction)return this.error(\"Bindings cannot contain assignments\"),new a.EmptyExpr(this.span(n));var l=this.parseConditional();return new a.PropertyWrite(this.span(n),e,r,l)}return new a.PropertyRead(this.span(n),e,r)},_ParseAST.prototype.parseCallArguments=function(){if(this.next.isCharacter(i.$RPAREN))return[];var e=[];do e.push(this.parsePipe());while(this.optionalCharacter(i.$COMMA));return e},_ParseAST.prototype.expectTemplateBindingKey=function(){var e=\"\",t=!1;do e+=this.expectIdentifierOrKeywordOrString(),t=this.optionalOperator(\"-\"),t&&(e+=\"-\");while(t);return e.toString()},_ParseAST.prototype.parseTemplateBindings=function(){for(var e=[],t=null,n=[];this.index0&&e[e.length-1]===t}var r=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},i=n(10),o=n(5),s=n(60),a=n(85),l=n(68),c=n(546),u=n(102),p=function(e){function TreeError(t,n,r){e.call(this,n,r),this.elementName=t}return r(TreeError,e),TreeError.create=function(e,t,n){return new TreeError(e,t,n)},TreeError}(s.ParseError);t.TreeError=p;var d=function(){function ParseTreeResult(e,t){this.rootNodes=e,this.errors=t}return ParseTreeResult}();t.ParseTreeResult=d;var h=function(){function Parser(e){this._getTagDefinition=e}return Parser.prototype.parse=function(e,t,n,r){void 0===n&&(n=!1),void 0===r&&(r=l.DEFAULT_INTERPOLATION_CONFIG);var i=c.tokenize(e,t,this._getTagDefinition,n,r),o=new f(i.tokens,this._getTagDefinition).build();return new d(o.rootNodes,i.errors.concat(o.errors))},Parser}();t.Parser=h;var f=function(){function _TreeBuilder(e,t){this.tokens=e,this.getTagDefinition=t,this._index=-1,this._rootNodes=[],this._errors=[],this._elementStack=[],this._advance()}return _TreeBuilder.prototype.build=function(){for(;this._peek.type!==c.TokenType.EOF;)this._peek.type===c.TokenType.TAG_OPEN_START?this._consumeStartTag(this._advance()):this._peek.type===c.TokenType.TAG_CLOSE?this._consumeEndTag(this._advance()):this._peek.type===c.TokenType.CDATA_START?(this._closeVoidElement(),this._consumeCdata(this._advance())):this._peek.type===c.TokenType.COMMENT_START?(this._closeVoidElement(),this._consumeComment(this._advance())):this._peek.type===c.TokenType.TEXT||this._peek.type===c.TokenType.RAW_TEXT||this._peek.type===c.TokenType.ESCAPABLE_RAW_TEXT?(this._closeVoidElement(),this._consumeText(this._advance())):this._peek.type===c.TokenType.EXPANSION_FORM_START?this._consumeExpansion(this._advance()):this._advance();return new d(this._rootNodes,this._errors)},_TreeBuilder.prototype._advance=function(){var e=this._peek;return this._index0)return this._errors=this._errors.concat(i.errors),null;var l=new s.ParseSourceSpan(e.sourceSpan.start,r.sourceSpan.end),u=new s.ParseSourceSpan(t.sourceSpan.start,r.sourceSpan.end);return new a.ExpansionCase(e.parts[0],i.rootNodes,l,e.sourceSpan,u)},_TreeBuilder.prototype._collectExpansionExpTokens=function(e){for(var t=[],n=[c.TokenType.EXPANSION_CASE_EXP_START];;){if(this._peek.type!==c.TokenType.EXPANSION_FORM_START&&this._peek.type!==c.TokenType.EXPANSION_CASE_EXP_START||n.push(this._peek.type),this._peek.type===c.TokenType.EXPANSION_CASE_EXP_END){if(!lastOnStack(n,c.TokenType.EXPANSION_CASE_EXP_START))return this._errors.push(p.create(null,e.sourceSpan,\"Invalid ICU message. Missing '}'.\")),null;if(n.pop(),0==n.length)return t}if(this._peek.type===c.TokenType.EXPANSION_FORM_END){if(!lastOnStack(n,c.TokenType.EXPANSION_FORM_START))return this._errors.push(p.create(null,e.sourceSpan,\"Invalid ICU message. Missing '}'.\")),null;n.pop()}if(this._peek.type===c.TokenType.EOF)return this._errors.push(p.create(null,e.sourceSpan,\"Invalid ICU message. Missing '}'.\")),null;t.push(this._advance())}},_TreeBuilder.prototype._consumeText=function(e){var t=e.parts[0];if(t.length>0&&\"\\n\"==t[0]){var n=this._getParentElement();o.isPresent(n)&&0==n.children.length&&this.getTagDefinition(n.name).ignoreFirstLf&&(t=t.substring(1))}t.length>0&&this._addToParent(new a.Text(t,e.sourceSpan))},_TreeBuilder.prototype._closeVoidElement=function(){if(this._elementStack.length>0){var e=i.ListWrapper.last(this._elementStack);this.getTagDefinition(e.name).isVoid&&this._elementStack.pop()}},_TreeBuilder.prototype._consumeStartTag=function(e){for(var t=e.parts[0],n=e.parts[1],r=[];this._peek.type===c.TokenType.ATTR_NAME;)r.push(this._consumeAttr(this._advance()));var i=this._getElementFullName(t,n,this._getParentElement()),o=!1;if(this._peek.type===c.TokenType.TAG_OPEN_END_VOID){this._advance(),o=!0;var l=this.getTagDefinition(i);l.canSelfClose||null!==u.getNsPrefix(i)||l.isVoid||this._errors.push(p.create(i,e.sourceSpan,'Only void and foreign elements can be self closed \"'+e.parts[1]+'\"'))}else this._peek.type===c.TokenType.TAG_OPEN_END&&(this._advance(),o=!1);var d=this._peek.sourceSpan.start,h=new s.ParseSourceSpan(e.sourceSpan.start,d),f=new a.Element(i,r,[],h,h,null);this._pushElement(f),o&&(this._popElement(i),f.endSourceSpan=h)},_TreeBuilder.prototype._pushElement=function(e){if(this._elementStack.length>0){var t=i.ListWrapper.last(this._elementStack);this.getTagDefinition(t.name).isClosedByChild(e.name)&&this._elementStack.pop()}var n=this.getTagDefinition(e.name),r=this._getParentElementSkippingContainers(),s=r.parent,l=r.container;if(o.isPresent(s)&&n.requireExtraParent(s.name)){var c=new a.Element(n.parentToAdd,[],[],e.sourceSpan,e.startSourceSpan,e.endSourceSpan);this._insertBeforeContainer(s,l,c)}this._addToParent(e),this._elementStack.push(e)},_TreeBuilder.prototype._consumeEndTag=function(e){var t=this._getElementFullName(e.parts[0],e.parts[1],this._getParentElement());this._getParentElement()&&(this._getParentElement().endSourceSpan=e.sourceSpan),this.getTagDefinition(t).isVoid?this._errors.push(p.create(t,e.sourceSpan,'Void elements do not have end tags \"'+e.parts[1]+'\"')):this._popElement(t)||this._errors.push(p.create(t,e.sourceSpan,'Unexpected closing tag \"'+e.parts[1]+'\"'))},_TreeBuilder.prototype._popElement=function(e){for(var t=this._elementStack.length-1;t>=0;t--){var n=this._elementStack[t];if(n.name==e)return i.ListWrapper.splice(this._elementStack,t,this._elementStack.length-t),!0;if(!this.getTagDefinition(n.name).closedByParent)return!1}return!1},_TreeBuilder.prototype._consumeAttr=function(e){var t=u.mergeNsAndName(e.parts[0],e.parts[1]),n=e.sourceSpan.end,r=\"\";if(this._peek.type===c.TokenType.ATTR_VALUE){var i=this._advance();r=i.parts[0],n=i.sourceSpan.end}return new a.Attribute(t,r,new s.ParseSourceSpan(e.sourceSpan.start,n))},_TreeBuilder.prototype._getParentElement=function(){return this._elementStack.length>0?i.ListWrapper.last(this._elementStack):null},_TreeBuilder.prototype._getParentElementSkippingContainers=function(){for(var e=null,t=this._elementStack.length-1;t>=0;t--){if(\"ng-container\"!==this._elementStack[t].name)return{parent:this._elementStack[t],container:e};e=this._elementStack[t]}return{parent:i.ListWrapper.last(this._elementStack),container:e}},_TreeBuilder.prototype._addToParent=function(e){var t=this._getParentElement();o.isPresent(t)?t.children.push(e):this._rootNodes.push(e)},_TreeBuilder.prototype._insertBeforeContainer=function(e,t,n){if(t){if(e){var r=e.children.indexOf(t);e.children[r]=n}else this._rootNodes.push(n);n.children.push(t),this._elementStack.splice(this._elementStack.indexOf(t),0,n)}else this._addToParent(n),this._elementStack.push(n)},_TreeBuilder.prototype._getElementFullName=function(e,t,n){return o.isBlank(e)&&(e=this.getTagDefinition(t).implicitNamespacePrefix,o.isBlank(e)&&o.isPresent(n)&&(e=u.getNsPrefix(n.name))),u.mergeNsAndName(e,t)},_TreeBuilder}()},function(e,t,n){\"use strict\";function splitClasses(e){return e.trim().split(/\\s+/g)}function createElementCssSelector(e,t){var n=new w.CssSelector,r=y.splitNsName(e)[1];n.setElement(r);for(var i=0;i0&&this._console.warn(\"Template parse warnings:\\n\"+a.join(\"\\n\")),l.length>0){var c=l.join(\"\\n\");throw new u.BaseException(\"Template parse errors:\\n\"+c)}return s.templateAst},TemplateParser.prototype.tryParse=function(e,t,n,r,i,o){var a;e.template&&(a=g.InterpolationConfig.fromArray(e.template.interpolation));var l,c=this._htmlParser.parse(t,o,!0,a),u=c.errors;if(0==u.length){var d=m.expandNodes(c.rootNodes);u.push.apply(u,d.errors),c=new f.ParseTreeResult(d.nodes,u)}if(c.rootNodes.length>0){var y=s.removeIdentifierDuplicates(n),v=s.removeIdentifierDuplicates(r),_=new b.ProviderViewContext(e,c.rootNodes[0].sourceSpan),w=new j(_,y,v,i,this._exprParser,this._schemaRegistry);l=h.visitAll(w,c.rootNodes,z),u.push.apply(u,w.errors.concat(_.errors))}else l=[];return this._assertNoReferenceDuplicationOnTemplate(l,u),u.length>0?new L(l,u):(p.isPresent(this.transforms)&&this.transforms.forEach(function(e){l=E.templateVisitAll(e,l)}),new L(l,u))},TemplateParser.prototype._assertNoReferenceDuplicationOnTemplate=function(e,t){var n=[];e.filter(function(e){return!!e.references}).forEach(function(e){return e.references.forEach(function(e){var r=e.name;if(n.indexOf(r)<0)n.push(r);else{var i=new V('Reference \"#'+r+'\" is defined several times',e.sourceSpan,v.ParseErrorLevel.FATAL);t.push(i)}})})},TemplateParser.decorators=[{type:i.Injectable}],TemplateParser.ctorParameters=[{type:l.Parser},{type:_.ElementSchemaRegistry},{type:f.HtmlParser},{type:o.Console},{type:Array,decorators:[{type:i.Optional},{type:i.Inject,args:[t.TEMPLATE_TRANSFORMS]}]}],TemplateParser}();t.TemplateParser=F;var j=function(){function TemplateParseVisitor(e,t,n,r,i,o){var s=this;this.providerViewContext=e,this._schemas=r,this._exprParser=i,this._schemaRegistry=o,this.errors=[],this.directivesIndex=new Map,this.ngContentCount=0,this.selectorMatcher=new w.SelectorMatcher;var a=e.component.template;p.isPresent(a)&&p.isPresent(a.interpolation)&&(this._interpolationConfig={start:a.interpolation[0],end:a.interpolation[1]}),c.ListWrapper.forEachWithIndex(t,function(e,t){var n=w.CssSelector.parse(e.selector);s.selectorMatcher.addSelectables(n,e),s.directivesIndex.set(e,t)}),this.pipesByName=new Map,n.forEach(function(e){return s.pipesByName.set(e.name,e)})}return TemplateParseVisitor.prototype._reportError=function(e,t,n){void 0===n&&(n=v.ParseErrorLevel.FATAL),this.errors.push(new V(e,t,n))},TemplateParseVisitor.prototype._reportParserErors=function(e,t){for(var n=0,r=e;no.MAX_INTERPOLATION_VALUES)throw new u.BaseException(\"Only support at most \"+o.MAX_INTERPOLATION_VALUES+\" interpolation values!\");return r}catch(i){return this._reportError(\"\"+i,t),this._exprParser.wrapLiteralPrimitive(\"ERROR\",n)}},TemplateParseVisitor.prototype._parseAction=function(e,t){var n=t.start.toString();try{var r=this._exprParser.parseAction(e,n,this._interpolationConfig);return r&&this._reportParserErors(r.errors,t),!r||r.ast instanceof a.EmptyExpr?(this._reportError(\"Empty expressions are not allowed\",t),this._exprParser.wrapLiteralPrimitive(\"ERROR\",n)):(this._checkPipes(r,t),r)}catch(i){return this._reportError(\"\"+i,t),this._exprParser.wrapLiteralPrimitive(\"ERROR\",n)}},TemplateParseVisitor.prototype._parseBinding=function(e,t){var n=t.start.toString();try{var r=this._exprParser.parseBinding(e,n,this._interpolationConfig);return r&&this._reportParserErors(r.errors,t),this._checkPipes(r,t),r}catch(i){return this._reportError(\"\"+i,t),this._exprParser.wrapLiteralPrimitive(\"ERROR\",n)}},TemplateParseVisitor.prototype._parseTemplateBindings=function(e,t){var n=this,r=t.start.toString();try{var i=this._exprParser.parseTemplateBindings(e,r);return this._reportParserErors(i.errors,t),i.templateBindings.forEach(function(e){p.isPresent(e.expression)&&n._checkPipes(e.expression,t)}),i.warnings.forEach(function(e){n._reportError(e,t,v.ParseErrorLevel.WARNING)}),i.templateBindings}catch(o){return this._reportError(\"\"+o,t),[]}},TemplateParseVisitor.prototype._checkPipes=function(e,t){var n=this;if(p.isPresent(e)){var r=new q;e.visit(r),r.pipes.forEach(function(e){n.pipesByName.has(e)||n._reportError(\"The pipe '\"+e+\"' could not be found\",t)})}},TemplateParseVisitor.prototype.visitExpansion=function(e,t){return null},TemplateParseVisitor.prototype.visitExpansionCase=function(e,t){return null},TemplateParseVisitor.prototype.visitText=function(e,t){var n=t.findNgContentIndex(N),r=this._parseInterpolation(e.value,e.sourceSpan);return p.isPresent(r)?new E.BoundTextAst(r,n,e.sourceSpan):new E.TextAst(e.value,n,e.sourceSpan)},TemplateParseVisitor.prototype.visitAttribute=function(e,t){return new E.AttrAst(e.name,e.value,e.sourceSpan)},TemplateParseVisitor.prototype.visitComment=function(e,t){return null},TemplateParseVisitor.prototype.visitElement=function(e,t){var n=this,r=e.name,i=R.preparseElement(e);if(i.type===R.PreparsedElementType.SCRIPT||i.type===R.PreparsedElementType.STYLE)return null;if(i.type===R.PreparsedElementType.STYLESHEET&&S.isStyleUrlResolvable(i.hrefAttr))return null;var o=[],s=[],a=[],l=[],c=[],u=[],d=[],f=[],m=[],g=!1,v=[],_=y.splitNsName(r.toLowerCase())[1],C=_==P;e.attrs.forEach(function(e){var t=n._parseAttr(C,e,o,s,c,u,a,l),r=n._parseInlineTemplateBinding(e,f,d,m);r&&g&&n._reportError(\"Can't have multiple template bindings on one element. Use only one attribute named 'template' or prefixed with *\",e.sourceSpan),t||r||(v.push(n.visitAttribute(e,null)),o.push([e.name,e.value])),r&&(g=!0)});var T=createElementCssSelector(r,o),x=this._parseDirectives(this.selectorMatcher,T),M=[],k=this._createDirectiveAsts(C,e.name,x,s,a,e.sourceSpan,M),I=this._createElementPropertyAsts(e.name,s,k).concat(c),A=t.isTemplateElement||g,O=new b.ProviderElementContext(this.providerViewContext,t.providerContext,A,k,v,M,e.sourceSpan),D=h.visitAll(i.nonBindable?G:this,e.children,U.create(C,k,C?t.providerContext:O));O.afterElement();var N,V=p.isPresent(i.projectAs)?w.CssSelector.parse(i.projectAs)[0]:T,L=t.findNgContentIndex(V);if(i.type===R.PreparsedElementType.NG_CONTENT)p.isPresent(e.children)&&e.children.length>0&&this._reportError(\" element cannot have content. must be immediately followed by \",e.sourceSpan),N=new E.NgContentAst((this.ngContentCount++),g?null:L,e.sourceSpan);else if(C)this._assertAllEventsPublishedByDirectives(k,u),this._assertNoComponentsNorElementBindingsOnTemplate(k,I,e.sourceSpan),N=new E.EmbeddedTemplateAst(v,u,M,l,O.transformedDirectiveAsts,O.transformProviders,O.transformedHasViewContainer,D,g?null:L,e.sourceSpan);else{this._assertOnlyOneComponent(k,e.sourceSpan);var F=g?null:t.findNgContentIndex(V);N=new E.ElementAst(r,v,I,u,M,O.transformedDirectiveAsts,O.transformProviders,O.transformedHasViewContainer,D,g?null:F,e.sourceSpan)}if(g){var j=createElementCssSelector(P,f),B=this._parseDirectives(this.selectorMatcher,j),W=this._createDirectiveAsts(!0,e.name,B,d,[],e.sourceSpan,[]),H=this._createElementPropertyAsts(e.name,d,W);this._assertNoComponentsNorElementBindingsOnTemplate(W,H,e.sourceSpan);var z=new b.ProviderElementContext(this.providerViewContext,t.providerContext,t.isTemplateElement,W,[],[],e.sourceSpan);z.afterElement(),N=new E.EmbeddedTemplateAst([],[],[],m,z.transformedDirectiveAsts,z.transformProviders,z.transformedHasViewContainer,[N],L,e.sourceSpan)}return N},TemplateParseVisitor.prototype._parseInlineTemplateBinding=function(e,t,n,r){var i=null;if(this._normalizeAttributeName(e.name)==x)i=e.value;else if(e.name.startsWith(M)){var o=e.name.substring(M.length);i=0==e.value.length?o:o+\" \"+e.value}if(p.isPresent(i)){for(var s=this._parseTemplateBindings(i,e.sourceSpan),a=0;a elements is deprecated. Use \"let-\" instead!',t.sourceSpan,v.ParseErrorLevel.WARNING),this._parseVariable(h,c,t.sourceSpan,a)):(this._reportError('\"var-\" on non