LogstashUI 0.5.5.dev0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- AI/__init__.py +0 -0
- AI/integration_factory.py +1392 -0
- AI/migrations/0001_initial.py +58 -0
- AI/migrations/0002_draftdefinition_normalizers.py +23 -0
- AI/migrations/0003_delete_aisettings_delete_draftdefinition.py +19 -0
- AI/migrations/__init__.py +0 -0
- AI/models.py +5 -0
- AI/static/js/integration_factory.js +1102 -0
- AI/system_prompts/dashboard_generator.md +367 -0
- AI/system_prompts/grok_patterns.txt +95 -0
- AI/system_prompts/ingest_pipeline_generator.md +331 -0
- AI/system_prompts/ingest_pipeline_processors.json +2851 -0
- AI/system_prompts/ingest_verifier.md +84 -0
- AI/system_prompts/integrations_list.json +2690 -0
- AI/system_prompts/log_classifier.md +134 -0
- AI/system_prompts/template_creator.md +123 -0
- AI/templates/integration_factory.html +200 -0
- AI/urls.py +16 -0
- AI/views.py +20 -0
- API/__init__.py +0 -0
- API/admin.py +7 -0
- API/api.http +784 -0
- API/apps.py +9 -0
- API/auth.py +101 -0
- API/connections_views.py +312 -0
- API/guides.py +88 -0
- API/mcp/__init__.py +5 -0
- API/mcp/dispatch.py +179 -0
- API/mcp/tools.py +890 -0
- API/mcp/views.py +215 -0
- API/migrations/__init__.py +0 -0
- API/models.py +7 -0
- API/pipelines_views.py +1224 -0
- API/policies_views.py +1015 -0
- API/security_views.py +488 -0
- API/simulation_detail.py +219 -0
- API/snmp_views.py +1539 -0
- API/urls.py +81 -0
- Common/__init__.py +0 -0
- Common/ai/agent_builder.py +690 -0
- Common/context_processors.py +49 -0
- Common/decorators.py +68 -0
- Common/elastic_utils.py +1154 -0
- Common/encryption.py +271 -0
- Common/error_handlers.py +65 -0
- Common/formatters.py +106 -0
- Common/logstash_config_parse.py +1469 -0
- Common/logstash_utils.py +34 -0
- Common/middleware.py +216 -0
- Common/product_ca.py +1124 -0
- Common/validators.py +66 -0
- Documentation/__init__.py +0 -0
- Documentation/admin.py +7 -0
- Documentation/apps.py +9 -0
- Documentation/content/CHANGELOG.md +890 -0
- Documentation/content/docs/getting_started.md +92 -0
- Documentation/content/docs/index.md +124 -0
- Documentation/content/docs/logstashagent/configuration/index.md +60 -0
- Documentation/content/docs/logstashagent/configuration/logstashagent.yml.md +141 -0
- Documentation/content/docs/logstashagent/general/build.md +217 -0
- Documentation/content/docs/logstashagent/general/index.md +38 -0
- Documentation/content/docs/logstashagent/general/roles.md +267 -0
- Documentation/content/docs/logstashagent/index.md +264 -0
- Documentation/content/docs/logstashui/SNMP/Quickstart.md +94 -0
- Documentation/content/docs/logstashui/SNMP/architecture.md +64 -0
- Documentation/content/docs/logstashui/SNMP/configuration.md +147 -0
- Documentation/content/docs/logstashui/SNMP/data_overview.md +59 -0
- Documentation/content/docs/logstashui/SNMP/deploying_changes.md +71 -0
- Documentation/content/docs/logstashui/SNMP/device_support.md +39 -0
- Documentation/content/docs/logstashui/SNMP/discovery.md +48 -0
- Documentation/content/docs/logstashui/SNMP/index.md +58 -0
- Documentation/content/docs/logstashui/SNMP/pipeline_generation.md +63 -0
- Documentation/content/docs/logstashui/SNMP/schema.md +595 -0
- Documentation/content/docs/logstashui/SNMP/testing.md +47 -0
- Documentation/content/docs/logstashui/SNMP/traps.md +45 -0
- Documentation/content/docs/logstashui/SNMP/tsds_implementation.md +82 -0
- Documentation/content/docs/logstashui/agent_guides/concepts.md +25 -0
- Documentation/content/docs/logstashui/agent_guides/deploy.md +30 -0
- Documentation/content/docs/logstashui/agent_guides/pipeline-review.md +24 -0
- Documentation/content/docs/logstashui/agent_guides/simulation.md +55 -0
- Documentation/content/docs/logstashui/agent_guides/snmp.md +57 -0
- Documentation/content/docs/logstashui/agent_guides/troubleshooting.md +21 -0
- Documentation/content/docs/logstashui/architecture.md +11 -0
- Documentation/content/docs/logstashui/compatibility.md +58 -0
- Documentation/content/docs/logstashui/configuration/environment.md +193 -0
- Documentation/content/docs/logstashui/configuration/host_mode.md +94 -0
- Documentation/content/docs/logstashui/configuration/index.md +72 -0
- Documentation/content/docs/logstashui/configuration/logstash_proxy.md +138 -0
- Documentation/content/docs/logstashui/configuration/logstashui.yml.md +16 -0
- Documentation/content/docs/logstashui/configuration/simulation.md +84 -0
- Documentation/content/docs/logstashui/database/examples/README.md +15 -0
- Documentation/content/docs/logstashui/database/examples/create-mariadb.sql +13 -0
- Documentation/content/docs/logstashui/database/examples/create-mysql.sql +12 -0
- Documentation/content/docs/logstashui/database/examples/create-postgresql.sql +13 -0
- Documentation/content/docs/logstashui/database/examples/schema-mysql.sql +502 -0
- Documentation/content/docs/logstashui/database/examples/schema-postgresql.sql +1709 -0
- Documentation/content/docs/logstashui/database/index.md +79 -0
- Documentation/content/docs/logstashui/database/migration.md +75 -0
- Documentation/content/docs/logstashui/general/build.md +154 -0
- Documentation/content/docs/logstashui/general/deploy.md +122 -0
- Documentation/content/docs/logstashui/general/deployment-recs.md +32 -0
- Documentation/content/docs/logstashui/general/index.md +62 -0
- Documentation/content/docs/logstashui/general/offline.md +68 -0
- Documentation/content/docs/logstashui/general/updating.md +50 -0
- Documentation/content/docs/logstashui/index.md +90 -0
- Documentation/content/docs/logstashui/kubernetes/cnpg.md +98 -0
- Documentation/content/docs/logstashui/kubernetes/envoy-gateway.md +112 -0
- Documentation/content/docs/logstashui/kubernetes/examples/README.md +46 -0
- Documentation/content/docs/logstashui/kubernetes/examples/embedded-agent.yaml +122 -0
- Documentation/content/docs/logstashui/kubernetes/examples/mysql/configmap.yaml +41 -0
- Documentation/content/docs/logstashui/kubernetes/examples/mysql/ingress.yaml +31 -0
- Documentation/content/docs/logstashui/kubernetes/examples/mysql/namespace.yaml +8 -0
- Documentation/content/docs/logstashui/kubernetes/examples/mysql/secret.yaml +19 -0
- Documentation/content/docs/logstashui/kubernetes/examples/mysql/statefulset.yaml +106 -0
- Documentation/content/docs/logstashui/kubernetes/examples/postgresql/cnpg.yaml +25 -0
- Documentation/content/docs/logstashui/kubernetes/examples/postgresql/configmap.yaml +42 -0
- Documentation/content/docs/logstashui/kubernetes/examples/postgresql/ingress.yaml +31 -0
- Documentation/content/docs/logstashui/kubernetes/examples/postgresql/namespace.yaml +8 -0
- Documentation/content/docs/logstashui/kubernetes/examples/postgresql/secret.yaml +19 -0
- Documentation/content/docs/logstashui/kubernetes/examples/postgresql/statefulset.yaml +106 -0
- Documentation/content/docs/logstashui/kubernetes/examples/sqlite/configmap.yaml +35 -0
- Documentation/content/docs/logstashui/kubernetes/examples/sqlite/ingress.yaml +31 -0
- Documentation/content/docs/logstashui/kubernetes/examples/sqlite/namespace.yaml +8 -0
- Documentation/content/docs/logstashui/kubernetes/examples/sqlite/secret.yaml +18 -0
- Documentation/content/docs/logstashui/kubernetes/examples/sqlite/statefulset.yaml +106 -0
- Documentation/content/docs/logstashui/kubernetes/index.md +121 -0
- Documentation/content/docs/logstashui/mcp.md +224 -0
- Documentation/content/docs/logstashui/mcp_scenarios.md +234 -0
- Documentation/content/docs/logstashui/rest_api.md +2783 -0
- Documentation/content/docs/logstashui/utilities/dissect_debugger.md +89 -0
- Documentation/content/docs/logstashui/utilities/grok_debugger.md +114 -0
- Documentation/content/docs/logstashui/utilities/index.md +40 -0
- Documentation/content/images/LogstashIcon.png +0 -0
- Documentation/content/images/architecture.png +0 -0
- Documentation/content/images/connection_manager.png +0 -0
- Documentation/content/images/control_plane.png +0 -0
- Documentation/content/images/graph.gif +0 -0
- Documentation/content/images/login.png +0 -0
- Documentation/content/images/monitoring.png +0 -0
- Documentation/content/images/new_connection.gif +0 -0
- Documentation/content/images/simulate.gif +0 -0
- Documentation/content/images/simulate.png +0 -0
- Documentation/content/images/snmp.gif +0 -0
- Documentation/content/images/snmp.png +0 -0
- Documentation/content/images/snmp_architecture.png +0 -0
- Documentation/migrations/__init__.py +0 -0
- Documentation/models.py +9 -0
- Documentation/static/css/markdown.css +250 -0
- Documentation/templates/documentation.html +225 -0
- Documentation/templates/nav_item.html +41 -0
- Documentation/urls.py +11 -0
- Documentation/views.py +442 -0
- LogstashUI/__init__.py +0 -0
- LogstashUI/__main__.py +10 -0
- LogstashUI/asgi.py +16 -0
- LogstashUI/cli.py +626 -0
- LogstashUI/config.py +116 -0
- LogstashUI/database.py +263 -0
- LogstashUI/insecure_http.py +117 -0
- LogstashUI/logging_config.py +99 -0
- LogstashUI/migrate_engine.py +282 -0
- LogstashUI/packaging/__init__.py +3 -0
- LogstashUI/packaging/logstashui.default +68 -0
- LogstashUI/packaging/logstashui.service.in +22 -0
- LogstashUI/paths.py +181 -0
- LogstashUI/settings.py +437 -0
- LogstashUI/telemetry.py +159 -0
- LogstashUI/urls.py +56 -0
- LogstashUI/wsgi.py +77 -0
- Management/__init__.py +0 -0
- Management/apps.py +10 -0
- Management/migrations/0001_initial.py +29 -0
- Management/migrations/0002_settings.py +25 -0
- Management/migrations/0003_settings_agent_ui_url.py +29 -0
- Management/migrations/0004_settings_logstash_artifact_base_url.py +29 -0
- Management/migrations/__init__.py +0 -0
- Management/models.py +92 -0
- Management/templates/api_tokens.html +214 -0
- Management/templates/components/api_token_created.html +38 -0
- Management/templates/components/api_token_row.html +84 -0
- Management/templates/components/logstash_artifact_row.html +100 -0
- Management/templates/components/logstash_artifact_tbody.html +26 -0
- Management/templates/components/user_row.html +67 -0
- Management/templates/logs.html +98 -0
- Management/templates/logstash_artifacts.html +172 -0
- Management/templates/management.html +80 -0
- Management/templates/management_settings.html +320 -0
- Management/templates/registration/login.html +404 -0
- Management/templates/users.html +304 -0
- Management/urls.py +23 -0
- Management/views.py +804 -0
- Monitoring/__init__.py +0 -0
- Monitoring/apps.py +9 -0
- Monitoring/migrations/__init__.py +0 -0
- Monitoring/static/js/monitoring.js +463 -0
- Monitoring/templates/components/node_metrics.html +161 -0
- Monitoring/templates/components/pipeline_metrics.html +189 -0
- Monitoring/templates/monitoring.html +271 -0
- Monitoring/urls.py +16 -0
- Monitoring/views.py +724 -0
- PipelineManager/__init__.py +0 -0
- PipelineManager/agent_api.py +1173 -0
- PipelineManager/agent_client.py +59 -0
- PipelineManager/agent_modes.py +880 -0
- PipelineManager/agent_policies.py +689 -0
- PipelineManager/agent_versions.py +151 -0
- PipelineManager/apps.py +10 -0
- PipelineManager/artifact_metrics.py +171 -0
- PipelineManager/artifacts.py +820 -0
- PipelineManager/connections_crud.py +722 -0
- PipelineManager/data/default_jvm.options +76 -0
- PipelineManager/data/default_log4j2.properties +165 -0
- PipelineManager/data/default_logstash.yml +405 -0
- PipelineManager/data/plugins.json +29109 -0
- PipelineManager/editor_views.py +608 -0
- PipelineManager/forms.py +284 -0
- PipelineManager/manager_views.py +490 -0
- PipelineManager/migrations/0001_initial.py +38 -0
- PipelineManager/migrations/0002_alter_connection_connection_type_and_more.py +38 -0
- PipelineManager/migrations/0003_policy_connection_policy.py +38 -0
- PipelineManager/migrations/0004_policy_current_revision_number_and_more.py +75 -0
- PipelineManager/migrations/0005_apikey_enrollmenttoken.py +38 -0
- PipelineManager/migrations/0006_enrollmenttoken_name.py +18 -0
- PipelineManager/migrations/0007_alter_enrollmenttoken_options_and_more.py +21 -0
- PipelineManager/migrations/0008_connection_agent_id.py +18 -0
- PipelineManager/migrations/0009_connection_last_check_in_policy_jvm_options_hash_and_more.py +33 -0
- PipelineManager/migrations/0010_keystore_revision_number_pipeline_revision_number.py +23 -0
- PipelineManager/migrations/0011_keystore_kv_hash.py +18 -0
- PipelineManager/migrations/0012_policy_binary_path.py +18 -0
- PipelineManager/migrations/0013_connection_status_blob.py +18 -0
- PipelineManager/migrations/0014_pipeline_pipeline_batch_delay_and_more.py +43 -0
- PipelineManager/migrations/0015_add_pipeline_hash.py +18 -0
- PipelineManager/migrations/0016_backfill_pipeline_hash.py +32 -0
- PipelineManager/migrations/0017_policy_keystore_password.py +31 -0
- PipelineManager/migrations/0018_policy_last_deployed_at.py +18 -0
- PipelineManager/migrations/0019_connection_restart_on_next_checkin.py +18 -0
- PipelineManager/migrations/0020_pipeline_no_input_pipeline_non_reloadable.py +23 -0
- PipelineManager/migrations/0021_connection_desired_agent_version.py +18 -0
- PipelineManager/migrations/0022_keystore_managed_by_pipeline_managed_by.py +23 -0
- PipelineManager/migrations/0023_agent_modes_policy_connection.py +89 -0
- PipelineManager/migrations/0024_seed_system_policies.py +173 -0
- PipelineManager/migrations/0025_packaged_managed_policy_types.py +166 -0
- PipelineManager/migrations/0026_normalize_opt_logstash_agent_paths.py +63 -0
- PipelineManager/migrations/0027_packaged_managed_default_ports.py +49 -0
- PipelineManager/migrations/0028_apikey_admin_tokens.py +80 -0
- PipelineManager/migrations/0029_logstash_artifacts.py +45 -0
- PipelineManager/migrations/0030_connection_allow_self_signed_certs.py +33 -0
- PipelineManager/migrations/0031_deploy_system_policies.py +93 -0
- PipelineManager/migrations/0032_connection_agent_inbound_key.py +30 -0
- PipelineManager/migrations/0033_simulation_result.py +26 -0
- PipelineManager/migrations/__init__.py +0 -0
- PipelineManager/models.py +1300 -0
- PipelineManager/pipelines_crud.py +738 -0
- PipelineManager/policies_crud.py +772 -0
- PipelineManager/sim_keystore.py +319 -0
- PipelineManager/simulation.py +1581 -0
- PipelineManager/static/css/codemirror.min.css +1 -0
- PipelineManager/static/css/graph_move.css +79 -0
- PipelineManager/static/css/monokai.min.css +1 -0
- PipelineManager/static/css/move_mode.css +144 -0
- PipelineManager/static/css/show-hint.min.css +1 -0
- PipelineManager/static/images/age.png +0 -0
- PipelineManager/static/images/aggregate.png +0 -0
- PipelineManager/static/images/alter.png +0 -0
- PipelineManager/static/images/azure_event_hubs.png +0 -0
- PipelineManager/static/images/beats.png +0 -0
- PipelineManager/static/images/boundary.png +0 -0
- PipelineManager/static/images/bytes.png +0 -0
- PipelineManager/static/images/cidr.png +0 -0
- PipelineManager/static/images/cipher.png +0 -0
- PipelineManager/static/images/circonus.png +0 -0
- PipelineManager/static/images/clone.png +0 -0
- PipelineManager/static/images/cloudwatch.png +0 -0
- PipelineManager/static/images/comment.png +0 -0
- PipelineManager/static/images/continue.png +0 -0
- PipelineManager/static/images/couchdb_changes.png +0 -0
- PipelineManager/static/images/csv.png +0 -0
- PipelineManager/static/images/datadog.png +0 -0
- PipelineManager/static/images/datadog_metrics.png +0 -0
- PipelineManager/static/images/date.png +0 -0
- PipelineManager/static/images/de_dot.png +0 -0
- PipelineManager/static/images/dead_letter_queue.png +0 -0
- PipelineManager/static/images/dissect.png +0 -0
- PipelineManager/static/images/dns.png +0 -0
- PipelineManager/static/images/drop.png +0 -0
- PipelineManager/static/images/dynatrace.png +0 -0
- PipelineManager/static/images/elapsed.png +0 -0
- PipelineManager/static/images/elastic_agent.png +0 -0
- PipelineManager/static/images/elastic_integration.png +0 -0
- PipelineManager/static/images/elastic_serverless_forwarder.png +0 -0
- PipelineManager/static/images/elastic_workplace_search.png +0 -0
- PipelineManager/static/images/elasticsearch.png +0 -0
- PipelineManager/static/images/else.png +0 -0
- PipelineManager/static/images/else_if.png +0 -0
- PipelineManager/static/images/email.png +0 -0
- PipelineManager/static/images/environment.png +0 -0
- PipelineManager/static/images/exec.png +0 -0
- PipelineManager/static/images/extractnumbers.png +0 -0
- PipelineManager/static/images/file.png +0 -0
- PipelineManager/static/images/fingerprint.png +0 -0
- PipelineManager/static/images/ganglia.png +0 -0
- PipelineManager/static/images/gelf.png +0 -0
- PipelineManager/static/images/generator.png +0 -0
- PipelineManager/static/images/geoip.png +0 -0
- PipelineManager/static/images/github.png +0 -0
- PipelineManager/static/images/google_bigquery.png +0 -0
- PipelineManager/static/images/google_cloud_storage.png +0 -0
- PipelineManager/static/images/google_pubsub.png +0 -0
- PipelineManager/static/images/graphite.png +0 -0
- PipelineManager/static/images/graphtastic.png +0 -0
- PipelineManager/static/images/grok.png +0 -0
- PipelineManager/static/images/heartbeat.png +0 -0
- PipelineManager/static/images/http.png +0 -0
- PipelineManager/static/images/http_poller.png +0 -0
- PipelineManager/static/images/i18n.png +0 -0
- PipelineManager/static/images/if.png +0 -0
- PipelineManager/static/images/imap.png +0 -0
- PipelineManager/static/images/influxdb.png +0 -0
- PipelineManager/static/images/irc.png +0 -0
- PipelineManager/static/images/java_generator.png +0 -0
- PipelineManager/static/images/java_stdin.png +0 -0
- PipelineManager/static/images/java_stdout.png +0 -0
- PipelineManager/static/images/java_uuid.png +0 -0
- PipelineManager/static/images/jdbc.png +0 -0
- PipelineManager/static/images/jdbc_static.png +0 -0
- PipelineManager/static/images/jdbc_streaming.png +0 -0
- PipelineManager/static/images/jms.png +0 -0
- PipelineManager/static/images/jmx.png +0 -0
- PipelineManager/static/images/json.png +0 -0
- PipelineManager/static/images/json_encode.png +0 -0
- PipelineManager/static/images/juggernaut.png +0 -0
- PipelineManager/static/images/kafka.png +0 -0
- PipelineManager/static/images/kinesis.png +0 -0
- PipelineManager/static/images/kv.png +0 -0
- PipelineManager/static/images/librato.png +0 -0
- PipelineManager/static/images/log4j.png +0 -0
- PipelineManager/static/images/loggly.png +0 -0
- PipelineManager/static/images/logstash.png +0 -0
- PipelineManager/static/images/lumberjack.png +0 -0
- PipelineManager/static/images/meetup.png +0 -0
- PipelineManager/static/images/memcached.png +0 -0
- PipelineManager/static/images/metriccatcher.png +0 -0
- PipelineManager/static/images/metricize.png +0 -0
- PipelineManager/static/images/metrics.png +0 -0
- PipelineManager/static/images/mongodb.png +0 -0
- PipelineManager/static/images/mutate.png +0 -0
- PipelineManager/static/images/nagios.png +0 -0
- PipelineManager/static/images/nagios_nsca.png +0 -0
- PipelineManager/static/images/opentsdb.png +0 -0
- PipelineManager/static/images/pagerduty.png +0 -0
- PipelineManager/static/images/pipe.png +0 -0
- PipelineManager/static/images/pipeline.png +0 -0
- PipelineManager/static/images/prune.png +0 -0
- PipelineManager/static/images/puppet_facter.png +0 -0
- PipelineManager/static/images/rabbitmq.png +0 -0
- PipelineManager/static/images/range.png +0 -0
- PipelineManager/static/images/redis.png +0 -0
- PipelineManager/static/images/redmine.png +0 -0
- PipelineManager/static/images/relp.png +0 -0
- PipelineManager/static/images/riak.png +0 -0
- PipelineManager/static/images/riemann.png +0 -0
- PipelineManager/static/images/rss.png +0 -0
- PipelineManager/static/images/ruby.png +0 -0
- PipelineManager/static/images/s3-sns-sqs.png +0 -0
- PipelineManager/static/images/s3.png +0 -0
- PipelineManager/static/images/salesforce.png +0 -0
- PipelineManager/static/images/sink.png +0 -0
- PipelineManager/static/images/sleep.png +0 -0
- PipelineManager/static/images/snmp.png +0 -0
- PipelineManager/static/images/snmptrap.png +0 -0
- PipelineManager/static/images/sns.png +0 -0
- PipelineManager/static/images/solr_http.png +0 -0
- PipelineManager/static/images/split.png +0 -0
- PipelineManager/static/images/sqlite.png +0 -0
- PipelineManager/static/images/sqs.png +0 -0
- PipelineManager/static/images/statsd.png +0 -0
- PipelineManager/static/images/stdin.png +0 -0
- PipelineManager/static/images/stdout.png +0 -0
- PipelineManager/static/images/stomp.png +0 -0
- PipelineManager/static/images/syslog.png +0 -0
- PipelineManager/static/images/syslog_pri.png +0 -0
- PipelineManager/static/images/tcp.png +0 -0
- PipelineManager/static/images/threats_classifier.png +0 -0
- PipelineManager/static/images/throttle.png +0 -0
- PipelineManager/static/images/timber.png +0 -0
- PipelineManager/static/images/tld.png +0 -0
- PipelineManager/static/images/translate.png +0 -0
- PipelineManager/static/images/truncate.png +0 -0
- PipelineManager/static/images/twitter.png +0 -0
- PipelineManager/static/images/udp.png +0 -0
- PipelineManager/static/images/unix.png +0 -0
- PipelineManager/static/images/urldecode.png +0 -0
- PipelineManager/static/images/useragent.png +0 -0
- PipelineManager/static/images/uuid.png +0 -0
- PipelineManager/static/images/varnishlog.png +0 -0
- PipelineManager/static/images/webhdfs.png +0 -0
- PipelineManager/static/images/websocket.png +0 -0
- PipelineManager/static/images/wmi.png +0 -0
- PipelineManager/static/images/wurfl_device_detection.png +0 -0
- PipelineManager/static/images/xml.png +0 -0
- PipelineManager/static/images/xmpp.png +0 -0
- PipelineManager/static/images/zabbix.png +0 -0
- PipelineManager/static/js/agent_inspect_modal.js +141 -0
- PipelineManager/static/js/agent_policies.js +3746 -0
- PipelineManager/static/js/agent_status_sse.js +166 -0
- PipelineManager/static/js/codemirror.min.js +1 -0
- PipelineManager/static/js/connections_table.js +551 -0
- PipelineManager/static/js/d3.v7.js +20625 -0
- PipelineManager/static/js/diff_modal.js +995 -0
- PipelineManager/static/js/expression_editor.js +291 -0
- PipelineManager/static/js/js-yaml.min.js +1 -0
- PipelineManager/static/js/logstashyml_guides.js +1063 -0
- PipelineManager/static/js/move_graph.js +577 -0
- PipelineManager/static/js/move_mode.js +559 -0
- PipelineManager/static/js/pipeline_editor.js +4102 -0
- PipelineManager/static/js/pipeline_graph_editor.js +3542 -0
- PipelineManager/static/js/pipeline_list.js +274 -0
- PipelineManager/static/js/pipeline_settings.js +121 -0
- PipelineManager/static/js/pipeline_text_editor.js +2088 -0
- PipelineManager/static/js/plugin_config_modal.js +2827 -0
- PipelineManager/static/js/policy_deploy_modal.js +1066 -0
- PipelineManager/static/js/show-hint.min.js +1 -0
- PipelineManager/static/js/sim_targets.js +380 -0
- PipelineManager/static/js/simple-comment-mode.js +56 -0
- PipelineManager/static/js/simulation_modal.js +1135 -0
- PipelineManager/static/js/simulation_results.js +2778 -0
- PipelineManager/static/js/stats_strip.js +231 -0
- PipelineManager/static/js/yaml.js +120 -0
- PipelineManager/system_policy_defaults.py +279 -0
- PipelineManager/templates/components/pipeline_editor/diff_modal.html +127 -0
- PipelineManager/templates/components/pipeline_editor/expression_editor.html +160 -0
- PipelineManager/templates/components/pipeline_editor/plugin_config_modal.html +119 -0
- PipelineManager/templates/components/pipeline_editor/plugin_modal.html +1016 -0
- PipelineManager/templates/components/pipeline_editor/simulation_modal.html +394 -0
- PipelineManager/templates/components/pipeline_editor/simulation_results.html +123 -0
- PipelineManager/templates/components/pipeline_editor/stats_strip.html +123 -0
- PipelineManager/templates/components/pipeline_editor/view_code_modal.html +133 -0
- PipelineManager/templates/components/pipeline_manager/agent_inspect_content.html +805 -0
- PipelineManager/templates/components/pipeline_manager/agent_inspect_modal.html +40 -0
- PipelineManager/templates/components/pipeline_manager/agent_policies.html +2421 -0
- PipelineManager/templates/components/pipeline_manager/change_policy_modal.html +210 -0
- PipelineManager/templates/components/pipeline_manager/collapsible_row.html +11 -0
- PipelineManager/templates/components/pipeline_manager/connection_modal.html +1361 -0
- PipelineManager/templates/components/pipeline_manager/keystore_modal.html +269 -0
- PipelineManager/templates/components/pipeline_manager/logstashyml_guides/centralized_pipeline_management.html +291 -0
- PipelineManager/templates/components/pipeline_manager/logstashyml_guides/default.html +166 -0
- PipelineManager/templates/components/pipeline_manager/mcp_modal.html +241 -0
- PipelineManager/templates/components/pipeline_manager/pipeline_list_content.html +586 -0
- PipelineManager/templates/components/pipeline_manager/policy_deploy_modal.html +238 -0
- PipelineManager/templates/pipeline_editor.html +1738 -0
- PipelineManager/templates/pipeline_graph_editor.html +99 -0
- PipelineManager/templates/pipeline_manager.html +584 -0
- PipelineManager/templates/pipeline_text_editor.html +350 -0
- PipelineManager/urls.py +99 -0
- SNMP/__init__.py +0 -0
- SNMP/ai_template_generation.py +232 -0
- SNMP/apps.py +9 -0
- SNMP/assets/device_template_generation/agents/snmp-profile-author.json +15 -0
- SNMP/assets/device_template_generation/skills/snmp-catalog.json +9 -0
- SNMP/data/authoring_instructions.md +65 -0
- SNMP/data/grounding/.gitignore +4 -0
- SNMP/data/grounding/build_grounding.py +35 -0
- SNMP/data/grounding/grounding.json +1 -0
- SNMP/data/grounding/sample_agent_payload.cisco2960x.json +2184 -0
- SNMP/data/mib_reference/std_bgp4_mib.json +43 -0
- SNMP/data/mib_reference/std_entity_sensors.json +28 -0
- SNMP/data/mib_reference/std_host_resources.json +32 -0
- SNMP/data/mib_reference/std_ospf_mib.json +55 -0
- SNMP/data/mib_reference/std_ucd_linux.json +27 -0
- SNMP/data/normalizers.json +103 -0
- SNMP/data/official_device_templates/arista_eos.json +24 -0
- SNMP/data/official_device_templates/aruba_wireless_controller.json +23 -0
- SNMP/data/official_device_templates/brocade_fc_switch.json +20 -0
- SNMP/data/official_device_templates/cisco_ios.json +21 -0
- SNMP/data/official_device_templates/default.json +13 -0
- SNMP/data/official_device_templates/dell_idrac.json +22 -0
- SNMP/data/official_device_templates/dell_x1026.json +16 -0
- SNMP/data/official_device_templates/dlink_dgs1210_switch.json +19 -0
- SNMP/data/official_device_templates/eastpower_ups.json +20 -0
- SNMP/data/official_device_templates/eaton_ups.json +22 -0
- SNMP/data/official_device_templates/epson_printer.json +18 -0
- SNMP/data/official_device_templates/geist_watchdog.json +20 -0
- SNMP/data/official_device_templates/generic_linux.json +18 -0
- SNMP/data/official_device_templates/generic_ont.json +18 -0
- SNMP/data/official_device_templates/generic_ups.json +16 -0
- SNMP/data/official_device_templates/hp_laserjet_mfp_m281cdw.json +18 -0
- SNMP/data/official_device_templates/hpe_nimble.json +17 -0
- SNMP/data/official_device_templates/huawei_ups.json +19 -0
- SNMP/data/official_device_templates/ingrasys_ups.json +19 -0
- SNMP/data/official_device_templates/isilon_onefs.json +22 -0
- SNMP/data/official_device_templates/mellanox_sx6036.json +20 -0
- SNMP/data/official_device_templates/netapp_7mode.json +22 -0
- SNMP/data/official_device_templates/palo_alto_firewall.json +21 -0
- SNMP/data/official_device_templates/phoenixtec_ups.json +18 -0
- SNMP/data/official_device_templates/ubiquiti_unifi_ap.json +19 -0
- SNMP/data/official_device_templates/ubiquiti_unifi_switch.json +18 -0
- SNMP/data/official_device_templates/ubiquiti_unifi_udm.json +19 -0
- SNMP/data/official_device_templates/versa_flexvnf_appliance.json +19 -0
- SNMP/data/official_profiles/arista_eos.json +16 -0
- SNMP/data/official_profiles/aruba_wireless_controller.json +145 -0
- SNMP/data/official_profiles/brocade_fibre_channel_switch_fibre_channel_ports.json +35 -0
- SNMP/data/official_profiles/brocade_fibre_channel_switch_name_server.json +23 -0
- SNMP/data/official_profiles/brocade_fibre_channel_switch_system_metrics.json +36 -0
- SNMP/data/official_profiles/cisco_cdp.json +26 -0
- SNMP/data/official_profiles/cisco_fans.json +18 -0
- SNMP/data/official_profiles/cisco_sensors.json +21 -0
- SNMP/data/official_profiles/cisco_system_metrics.json +40 -0
- SNMP/data/official_profiles/dell_idrac_cpu.json +19 -0
- SNMP/data/official_profiles/dell_idrac_fans.json +20 -0
- SNMP/data/official_profiles/dell_idrac_global_status.json +13 -0
- SNMP/data/official_profiles/dell_idrac_memory.json +20 -0
- SNMP/data/official_profiles/dell_idrac_power_supply.json +19 -0
- SNMP/data/official_profiles/dell_idrac_raid_controller.json +19 -0
- SNMP/data/official_profiles/dlink_dgs1210.json +15 -0
- SNMP/data/official_profiles/dlink_dgs1210_system_metrics.json +38 -0
- SNMP/data/official_profiles/eaton_ups.json +40 -0
- SNMP/data/official_profiles/geist_environment.json +50 -0
- SNMP/data/official_profiles/generic_arp.json +19 -0
- SNMP/data/official_profiles/generic_bgp.json +24 -0
- SNMP/data/official_profiles/generic_entity_psu.json +26 -0
- SNMP/data/official_profiles/generic_entity_sensor.json +22 -0
- SNMP/data/official_profiles/generic_host_system_metrics.json +68 -0
- SNMP/data/official_profiles/generic_interfaces.json +86 -0
- SNMP/data/official_profiles/generic_ip_addr.json +19 -0
- SNMP/data/official_profiles/generic_lldp.json +54 -0
- SNMP/data/official_profiles/generic_lm_sensors.json +37 -0
- SNMP/data/official_profiles/generic_mac_table.json +19 -0
- SNMP/data/official_profiles/generic_ont.json +88 -0
- SNMP/data/official_profiles/generic_ospf.json +21 -0
- SNMP/data/official_profiles/generic_printer_mib.json +48 -0
- SNMP/data/official_profiles/generic_rmon.json +38 -0
- SNMP/data/official_profiles/generic_system.json +17 -0
- SNMP/data/official_profiles/generic_ucd_system_metrics.json +63 -0
- SNMP/data/official_profiles/generic_ups_mib.json +154 -0
- SNMP/data/official_profiles/hpe_nimble_volumes.json +59 -0
- SNMP/data/official_profiles/huawei_ups.json +111 -0
- SNMP/data/official_profiles/isilon_performance.json +92 -0
- SNMP/data/official_profiles/isilon_protocols.json +77 -0
- SNMP/data/official_profiles/isilon_system.json +86 -0
- SNMP/data/official_profiles/mellanox_mlnx_os.json +15 -0
- SNMP/data/official_profiles/netapp_7mode_data_protection.json +106 -0
- SNMP/data/official_profiles/netapp_7mode_disks.json +51 -0
- SNMP/data/official_profiles/netapp_7mode_protocols.json +66 -0
- SNMP/data/official_profiles/netapp_7mode_system.json +92 -0
- SNMP/data/official_profiles/netapp_7mode_volumes.json +166 -0
- SNMP/data/official_profiles/paloalto_components.json +36 -0
- SNMP/data/official_profiles/paloalto_system.json +15 -0
- SNMP/data/official_profiles/traps.json +16 -0
- SNMP/data/official_profiles/ubiquiti_unifi_switch.json +18 -0
- SNMP/data/official_profiles/ubiquiti_unifi_switch_system.json +14 -0
- SNMP/data/official_profiles/ubiquiti_unifi_wireless.json +60 -0
- SNMP/data/official_profiles/versa_flexvnf.json +14 -0
- SNMP/data/schema.md +650 -0
- SNMP/data/schema_reference/snmp_field_schema.md +747 -0
- SNMP/data/snmp_template.json +629 -0
- SNMP/data/template_profile_context.md +3986 -0
- SNMP/inline_grounding.py +77 -0
- SNMP/management/__init__.py +1 -0
- SNMP/management/commands/__init__.py +1 -0
- SNMP/management/commands/generate_template_profile_context.py +272 -0
- SNMP/management/commands/load_test_snmp_data.py +240 -0
- SNMP/management/commands/sync_snmp_official_data.py +263 -0
- SNMP/management/commands/unload_test_snmp_data.py +77 -0
- SNMP/migrations/0001_initial.py +101 -0
- SNMP/migrations/0002_devicetemplate.py +34 -0
- SNMP/migrations/0003_remove_devicetemplate_type_remove_profile_type_and_more.py +31 -0
- SNMP/migrations/0004_device_device_template.py +19 -0
- SNMP/migrations/0005_devicetemplate_product_profile_product.py +23 -0
- SNMP/migrations/0006_alter_devicetemplate_model_and_more.py +28 -0
- SNMP/migrations/0007_remove_device_profiles.py +17 -0
- SNMP/migrations/0008_devicetemplate_type.py +18 -0
- SNMP/migrations/0009_alter_device_device_template.py +19 -0
- SNMP/migrations/0010_alter_device_device_template.py +19 -0
- SNMP/migrations/0011_network_namespace.py +18 -0
- SNMP/migrations/0012_profile_normalizers.py +18 -0
- SNMP/migrations/0013_snmpdeploymentstate.py +26 -0
- SNMP/migrations/0014_alter_snmpdeploymentstate_last_config_change.py +18 -0
- SNMP/migrations/0015_alter_snmpdeploymentstate_last_config_change.py +20 -0
- SNMP/migrations/0016_alter_snmpdeploymentstate_last_config_change.py +18 -0
- SNMP/migrations/0017_remove_network_logstash_name.py +17 -0
- SNMP/migrations/0018_add_official_key.py +39 -0
- SNMP/migrations/0019_network_namespace_from_device_template.py +18 -0
- SNMP/migrations/0020_device_hostname_alter_device_ip_address_and_more.py +27 -0
- SNMP/migrations/0021_device_building_device_latitude_device_longitude_and_more.py +43 -0
- SNMP/migrations/0022_alter_device_latitude_alter_device_longitude.py +23 -0
- SNMP/migrations/0023_network_agent_connection_network_deployment_mode_and_more.py +30 -0
- SNMP/migrations/0024_network_credential_mode.py +18 -0
- SNMP/migrations/0025_network_ssl_certificate_authorities.py +18 -0
- SNMP/migrations/__init__.py +0 -0
- SNMP/models.py +892 -0
- SNMP/network_map.py +660 -0
- SNMP/overview.py +394 -0
- SNMP/snmp_crud.py +6082 -0
- SNMP/snmp_grounding.py +146 -0
- SNMP/snmp_normalizers.py +594 -0
- SNMP/snmp_pipeline_generator.py +1658 -0
- SNMP/snmp_test.py +962 -0
- SNMP/static/css/snmp.css +33 -0
- SNMP/static/images/apc.png +0 -0
- SNMP/static/images/arista.png +0 -0
- SNMP/static/images/aruba.png +0 -0
- SNMP/static/images/brocade.png +0 -0
- SNMP/static/images/cisco.png +0 -0
- SNMP/static/images/dell.png +0 -0
- SNMP/static/images/dlink.png +0 -0
- SNMP/static/images/east.png +0 -0
- SNMP/static/images/eaton.png +0 -0
- SNMP/static/images/epson.png +0 -0
- SNMP/static/images/hauwei.png +0 -0
- SNMP/static/images/hp.png +0 -0
- SNMP/static/images/hpe.png +0 -0
- SNMP/static/images/ingrasys.png +0 -0
- SNMP/static/images/linux.png +0 -0
- SNMP/static/images/mellanox.png +0 -0
- SNMP/static/images/netapp.png +0 -0
- SNMP/static/images/paloalto.png +0 -0
- SNMP/static/images/phoenixtec.png +0 -0
- SNMP/static/images/ubiquiti.png +0 -0
- SNMP/static/images/unknown.png +0 -0
- SNMP/static/images/versa.png +0 -0
- SNMP/static/images/vertiv.png +0 -0
- SNMP/static/js/ai_device_template_modal.js +1116 -0
- SNMP/static/js/credentials_table.js +291 -0
- SNMP/static/js/devices_table.js +588 -0
- SNMP/static/js/discovered_devices.js +291 -0
- SNMP/static/js/network_map.js +1657 -0
- SNMP/static/js/networks_table.js +360 -0
- SNMP/static/js/onboarding.js +866 -0
- SNMP/static/js/overview.js +416 -0
- SNMP/static/js/snmp_changes_indicator.js +76 -0
- SNMP/static/js/snmp_commit_modal.js +39 -0
- SNMP/static/js/snmp_credentials_modal.js +217 -0
- SNMP/static/js/snmp_device_template_modal.js +669 -0
- SNMP/static/js/snmp_device_visual_preview.js +1707 -0
- SNMP/static/js/snmp_devices_modal.js +912 -0
- SNMP/static/js/snmp_diff_modal.js +1559 -0
- SNMP/static/js/snmp_network_modal.js +940 -0
- SNMP/static/js/snmp_profile_modal.js +1212 -0
- SNMP/static/js/snmp_profile_modal_helpers.js +17 -0
- SNMP/static/js/snmp_test.js +538 -0
- SNMP/templates/Credentials.html +325 -0
- SNMP/templates/DeviceTemplates.html +1059 -0
- SNMP/templates/Devices.html +274 -0
- SNMP/templates/Networks.html +469 -0
- SNMP/templates/Onboarding.html +521 -0
- SNMP/templates/Overview.html +227 -0
- SNMP/templates/components/ai_device_template_modal.html +46 -0
- SNMP/templates/components/ai_generate_template_content.html +224 -0
- SNMP/templates/components/device_template_profile_modal.html +60 -0
- SNMP/templates/components/discovered_devices_content.html +86 -0
- SNMP/templates/components/discovered_devices_modal.html +43 -0
- SNMP/templates/components/gmaps_latlon_modal.html +93 -0
- SNMP/templates/components/network_map.html +110 -0
- SNMP/templates/components/snmp_commit_modal.html +53 -0
- SNMP/templates/components/snmp_credentials_modal.html +189 -0
- SNMP/templates/components/snmp_device_modal.html +6 -0
- SNMP/templates/components/snmp_device_template_modal.html +129 -0
- SNMP/templates/components/snmp_device_visual_preview.html +347 -0
- SNMP/templates/components/snmp_devices_modal.html +330 -0
- SNMP/templates/components/snmp_diff_modal.html +148 -0
- SNMP/templates/components/snmp_network_modal.html +380 -0
- SNMP/templates/components/snmp_profile_modal.html +147 -0
- SNMP/templates/components/snmp_test_modal.html +398 -0
- SNMP/templatetags/__init__.py +0 -0
- SNMP/templatetags/snmp_extras.py +17 -0
- SNMP/urls.py +94 -0
- SNMP/views.py +913 -0
- Site/__init__.py +0 -0
- Site/apps.py +9 -0
- Site/migrations/__init__.py +0 -0
- Site/product_ca_views.py +41 -0
- Site/static/images/ElasticIcon.png +0 -0
- Site/static/images/LoggyIcon.png +0 -0
- Site/static/images/LoggyWizardIcon.png +0 -0
- Site/static/images/LogstashAgentIcon.png +0 -0
- Site/static/images/LogstashIcon.png +0 -0
- Site/static/js/base.js +192 -0
- Site/static/js/marked.min.js +69 -0
- Site/templates/base.html +52 -0
- Site/templates/error.html +65 -0
- Site/templates/home.html +148 -0
- Site/templates/navigation.html +530 -0
- Site/templates/popup.html +251 -0
- Site/templatetags/__init__.py +0 -0
- Site/templatetags/custom_filters.py +36 -0
- Site/urls.py +21 -0
- Site/views.py +200 -0
- Utilities/__init__.py +0 -0
- Utilities/apps.py +9 -0
- Utilities/data/grok-patterns/LICENSE +202 -0
- Utilities/data/grok-patterns/ecs-v1/aws +33 -0
- Utilities/data/grok-patterns/ecs-v1/bacula +53 -0
- Utilities/data/grok-patterns/ecs-v1/bind +13 -0
- Utilities/data/grok-patterns/ecs-v1/bro +30 -0
- Utilities/data/grok-patterns/ecs-v1/exim +26 -0
- Utilities/data/grok-patterns/ecs-v1/firewalls +111 -0
- Utilities/data/grok-patterns/ecs-v1/grok-patterns +95 -0
- Utilities/data/grok-patterns/ecs-v1/haproxy +40 -0
- Utilities/data/grok-patterns/ecs-v1/httpd +17 -0
- Utilities/data/grok-patterns/ecs-v1/java +34 -0
- Utilities/data/grok-patterns/ecs-v1/junos +13 -0
- Utilities/data/grok-patterns/ecs-v1/linux-syslog +16 -0
- Utilities/data/grok-patterns/ecs-v1/maven +1 -0
- Utilities/data/grok-patterns/ecs-v1/mcollective +4 -0
- Utilities/data/grok-patterns/ecs-v1/mongodb +7 -0
- Utilities/data/grok-patterns/ecs-v1/nagios +124 -0
- Utilities/data/grok-patterns/ecs-v1/postgresql +2 -0
- Utilities/data/grok-patterns/ecs-v1/rails +13 -0
- Utilities/data/grok-patterns/ecs-v1/redis +3 -0
- Utilities/data/grok-patterns/ecs-v1/ruby +2 -0
- Utilities/data/grok-patterns/ecs-v1/squid +6 -0
- Utilities/data/grok-patterns/ecs-v1/zeek +33 -0
- Utilities/data/grok-patterns/legacy/aws +14 -0
- Utilities/data/grok-patterns/legacy/bacula +50 -0
- Utilities/data/grok-patterns/legacy/bind +3 -0
- Utilities/data/grok-patterns/legacy/bro +13 -0
- Utilities/data/grok-patterns/legacy/exim +19 -0
- Utilities/data/grok-patterns/legacy/firewalls +91 -0
- Utilities/data/grok-patterns/legacy/grok-patterns +95 -0
- Utilities/data/grok-patterns/legacy/haproxy +39 -0
- Utilities/data/grok-patterns/legacy/httpd +15 -0
- Utilities/data/grok-patterns/legacy/java +17 -0
- Utilities/data/grok-patterns/legacy/junos +9 -0
- Utilities/data/grok-patterns/legacy/linux-syslog +16 -0
- Utilities/data/grok-patterns/legacy/maven +1 -0
- Utilities/data/grok-patterns/legacy/mcollective +1 -0
- Utilities/data/grok-patterns/legacy/mcollective-patterns +4 -0
- Utilities/data/grok-patterns/legacy/mongodb +7 -0
- Utilities/data/grok-patterns/legacy/nagios +124 -0
- Utilities/data/grok-patterns/legacy/postgresql +3 -0
- Utilities/data/grok-patterns/legacy/rails +13 -0
- Utilities/data/grok-patterns/legacy/redis +3 -0
- Utilities/data/grok-patterns/legacy/ruby +2 -0
- Utilities/data/grok-patterns/legacy/squid +4 -0
- Utilities/dissect.py +302 -0
- Utilities/grok.py +412 -0
- Utilities/migrations/__init__.py +0 -0
- Utilities/static/css/debugger_editor.css +88 -0
- Utilities/static/js/debugger_editor.js +93 -0
- Utilities/static/js/grok_debugger.js +131 -0
- Utilities/templates/dissect_debugger.html +95 -0
- Utilities/templates/grok_debugger.html +99 -0
- Utilities/urls.py +14 -0
- Utilities/views.py +363 -0
- logstashui-0.5.5.dev0.dist-info/METADATA +333 -0
- logstashui-0.5.5.dev0.dist-info/RECORD +762 -0
- logstashui-0.5.5.dev0.dist-info/WHEEL +4 -0
- logstashui-0.5.5.dev0.dist-info/entry_points.txt +2 -0
- logstashui-0.5.5.dev0.dist-info/licenses/LICENSE.txt +93 -0
- logstashui-0.5.5.dev0.dist-info/licenses/NOTICE.txt +2772 -0
- theme/__init__.py +0 -0
- theme/apps.py +9 -0
- theme/package-lock.json +6 -0
- theme/static/css/dist/styles.css +2 -0
- theme/static/images/favicon.ico +0 -0
- theme/static_src/.gitignore +1 -0
- theme/static_src/package-lock.json +1930 -0
- theme/static_src/package.json +26 -0
- theme/static_src/postcss.config.js +7 -0
- theme/static_src/src/styles.css +38 -0
- theme/static_src/tailwind.config.js +43 -0
- theme/templates/base.html +32 -0
|
@@ -0,0 +1,1738 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
3
|
+
* or more contributor license agreements. Licensed under the Elastic License;
|
|
4
|
+
* you may not use this file except in compliance with the Elastic License.
|
|
5
|
+
-->
|
|
6
|
+
|
|
7
|
+
<!DOCTYPE html>
|
|
8
|
+
{% extends "base.html" %}
|
|
9
|
+
|
|
10
|
+
{% block content %}
|
|
11
|
+
|
|
12
|
+
{% load static %}
|
|
13
|
+
<script src="{% static 'js/d3.v7.js' %}"></script>
|
|
14
|
+
<script src="{% static 'js/codemirror.min.js' %}"></script>
|
|
15
|
+
<script src="{% static 'js/show-hint.min.js' %}"></script>
|
|
16
|
+
|
|
17
|
+
<script src="{% static 'js/sim_targets.js' %}"></script>
|
|
18
|
+
<script src="{% static 'js/pipeline_editor.js' %}"></script>
|
|
19
|
+
<script src="{% static 'js/pipeline_settings.js' %}"></script>
|
|
20
|
+
<script src="{% static 'js/move_mode.js' %}"></script>
|
|
21
|
+
<script src="{% static 'js/simulation_results.js' %}"></script>
|
|
22
|
+
<script src="{% static 'js/pipeline_text_editor.js' %}"></script>
|
|
23
|
+
<script src="{% static 'js/pipeline_graph_editor.js' %}"></script>
|
|
24
|
+
<script src="{% static 'js/move_graph.js' %}"></script>
|
|
25
|
+
<script src="{% static 'js/expression_editor.js' %}"></script>
|
|
26
|
+
<script src="{% static 'js/stats_strip.js' %}"></script>
|
|
27
|
+
|
|
28
|
+
<link rel="stylesheet" href="{% static 'css/move_mode.css' %}">
|
|
29
|
+
<link rel="stylesheet" href="{% static 'css/graph_move.css' %}">
|
|
30
|
+
<link rel="stylesheet" href="{% static 'css/codemirror.min.css' %}">
|
|
31
|
+
<link rel="stylesheet" href="{% static 'css/monokai.min.css' %}">
|
|
32
|
+
<link rel="stylesheet" href="{% static 'css/show-hint.min.css' %}">
|
|
33
|
+
{{ component_data|json_script:"component-data" }}
|
|
34
|
+
{{ plugin_data|json_script:"plugin-data" }}
|
|
35
|
+
{{ keystore_keys|default:"[]"|json_script:"keystore-keys" }}
|
|
36
|
+
<script>
|
|
37
|
+
// Define components and pluginData early so HTMX hx-vals can reference them
|
|
38
|
+
const components = JSON.parse(document.getElementById('component-data').textContent);
|
|
39
|
+
const pluginData = JSON.parse(document.getElementById('plugin-data').textContent);
|
|
40
|
+
window.pluginData = pluginData; // Make globally accessible for text editor autocomplete
|
|
41
|
+
|
|
42
|
+
// Global variable to store current slot ID for logs viewer
|
|
43
|
+
let currentSlotId = null;
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* View logs for the current pipeline slot
|
|
49
|
+
*/
|
|
50
|
+
async function viewPipelineLogs() {
|
|
51
|
+
if (!currentSlotId) {
|
|
52
|
+
console.error('No slot ID available for logs');
|
|
53
|
+
await ConfirmationModal.show(
|
|
54
|
+
'Unable to fetch logs - slot information not available',
|
|
55
|
+
'Pipeline Logs',
|
|
56
|
+
'OK',
|
|
57
|
+
null,
|
|
58
|
+
true
|
|
59
|
+
);
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// Create modal
|
|
64
|
+
const modal = document.createElement('div');
|
|
65
|
+
modal.id = 'pipeline-logs-modal';
|
|
66
|
+
modal.className = 'fixed inset-0 flex items-center justify-center z-[60] p-4';
|
|
67
|
+
modal.innerHTML = `
|
|
68
|
+
<div class="absolute inset-0 bg-black/50 backdrop-blur-sm" onclick="document.getElementById('pipeline-logs-modal').remove()"></div>
|
|
69
|
+
<div class="bg-gray-800 rounded-lg w-full max-w-6xl max-h-[90vh] flex flex-col relative z-10 border border-gray-700">
|
|
70
|
+
<div class="p-4 border-b border-gray-700 flex justify-between items-center">
|
|
71
|
+
<h3 class="text-lg font-semibold text-white">Pipeline Logs - slot${currentSlotId}-filter1</h3>
|
|
72
|
+
<button onclick="document.getElementById('pipeline-logs-modal').remove()" class="text-gray-400 hover:text-white">
|
|
73
|
+
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
74
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path>
|
|
75
|
+
</svg>
|
|
76
|
+
</button>
|
|
77
|
+
</div>
|
|
78
|
+
<div class="p-6 overflow-y-auto flex-grow">
|
|
79
|
+
<div id="pipeline-logs-content" class="bg-gray-900 rounded-lg p-4 font-mono text-sm text-gray-300">
|
|
80
|
+
<div class="flex items-center justify-center py-8">
|
|
81
|
+
<div class="animate-spin rounded-full h-8 w-8 border-b-2 border-blue-400"></div>
|
|
82
|
+
<span class="ml-3">Loading logs...</span>
|
|
83
|
+
</div>
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
</div>
|
|
87
|
+
`;
|
|
88
|
+
|
|
89
|
+
document.body.appendChild(modal);
|
|
90
|
+
|
|
91
|
+
// Fetch logs from API (include sim target for multi-agent routing)
|
|
92
|
+
try {
|
|
93
|
+
let logsUrl = `/ConnectionManager/GetRelatedLogs/?slot_id=${currentSlotId}&max_entries=100&min_level=INFO`;
|
|
94
|
+
if (typeof window.getSimConnectionId === 'function' && window.getSimConnectionId()) {
|
|
95
|
+
logsUrl += `&sim_connection_id=${encodeURIComponent(window.getSimConnectionId())}`;
|
|
96
|
+
}
|
|
97
|
+
const response = await fetch(logsUrl);
|
|
98
|
+
const data = await response.json();
|
|
99
|
+
|
|
100
|
+
const logsContent = document.getElementById('pipeline-logs-content');
|
|
101
|
+
|
|
102
|
+
if (data.error) {
|
|
103
|
+
logsContent.innerHTML = `<div class="text-red-400">Error fetching logs: ${data.error}</div>`;
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
if (!data.logs || data.logs.length === 0) {
|
|
108
|
+
logsContent.innerHTML = '<div class="text-yellow-400">No logs found for this pipeline. Clean runs often have no INFO-level entries.</div>';
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
let html = `<div class="text-green-400 mb-4">Found ${data.log_count} log entries - Time shown in UTC</div>`;
|
|
113
|
+
|
|
114
|
+
data.logs.forEach((log, idx) => {
|
|
115
|
+
const level = log.level || 'INFO';
|
|
116
|
+
const levelColor = {
|
|
117
|
+
'ERROR': 'text-red-400',
|
|
118
|
+
'WARN': 'text-yellow-400',
|
|
119
|
+
'INFO': 'text-blue-400',
|
|
120
|
+
'DEBUG': 'text-gray-400'
|
|
121
|
+
}[level] || 'text-gray-400';
|
|
122
|
+
|
|
123
|
+
const timestamp = log.timeMillis ? new Date(log.timeMillis).toISOString() : 'N/A';
|
|
124
|
+
const logEvent = log.logEvent || {};
|
|
125
|
+
const message = logEvent.message || log.message || 'No message';
|
|
126
|
+
const logger = log.loggerName || 'unknown';
|
|
127
|
+
|
|
128
|
+
html += `
|
|
129
|
+
<div class="mb-4 pb-4 border-b border-gray-700">
|
|
130
|
+
<div class="flex items-center gap-3 mb-2">
|
|
131
|
+
<span class="${levelColor} font-bold">[${level}]</span>
|
|
132
|
+
<span class="text-gray-500 text-xs">${timestamp}</span>
|
|
133
|
+
<span class="text-gray-400 text-xs">${logger}</span>
|
|
134
|
+
</div>
|
|
135
|
+
<div class="text-gray-200 mb-2">${escapeHtml(message)}</div>
|
|
136
|
+
<details class="text-xs">
|
|
137
|
+
<summary class="cursor-pointer text-blue-400 hover:text-blue-300">View full log entry</summary>
|
|
138
|
+
<pre class="mt-2 p-2 bg-gray-950 rounded overflow-x-auto">${JSON.stringify(log, null, 2)}</pre>
|
|
139
|
+
</details>
|
|
140
|
+
</div>
|
|
141
|
+
`;
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
logsContent.innerHTML = html;
|
|
145
|
+
} catch (error) {
|
|
146
|
+
const logsContent = document.getElementById('pipeline-logs-content');
|
|
147
|
+
logsContent.innerHTML = `<div class="text-red-400">Error fetching logs: ${error.message}</div>`;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* Compact labelled simulation status; full message is mirrored into its detail popover.
|
|
153
|
+
* @param {'ok'|'warn'|'err'|'busy'} kind
|
|
154
|
+
*/
|
|
155
|
+
function setSimStatusLight(containerId, iconId, messageId, kind, title) {
|
|
156
|
+
const el = document.getElementById(containerId);
|
|
157
|
+
const msg = document.getElementById(messageId);
|
|
158
|
+
if (!el) return;
|
|
159
|
+
const base =
|
|
160
|
+
'sim-status-light inline-flex items-center gap-1 px-1.5 h-7 rounded-md border';
|
|
161
|
+
const styles = {
|
|
162
|
+
ok: `${base} border-green-600 bg-green-900/40`,
|
|
163
|
+
warn: `${base} border-yellow-600 bg-yellow-900/40`,
|
|
164
|
+
err: `${base} border-red-600 bg-red-900/40`,
|
|
165
|
+
busy: `${base} border-gray-600 bg-gray-700/50`,
|
|
166
|
+
};
|
|
167
|
+
el.className = styles[kind] || styles.busy;
|
|
168
|
+
el.title = title || '';
|
|
169
|
+
el.setAttribute('aria-label', title || '');
|
|
170
|
+
|
|
171
|
+
const icons = {
|
|
172
|
+
ok: `<svg id="${iconId}" class="w-4 h-4 text-green-400" fill="none" stroke="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2.5" d="M5 12l4 4L19 6"></path></svg>`,
|
|
173
|
+
warn: `<svg id="${iconId}" class="w-4 h-4 text-yellow-400 animate-spin" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle><path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path></svg>`,
|
|
174
|
+
err: `<svg id="${iconId}" class="w-4 h-4 text-red-400" fill="none" stroke="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2.5" d="M18.364 5.636L5.636 18.364M5.636 5.636l12.728 12.728"></path></svg>`,
|
|
175
|
+
busy: `<svg id="${iconId}" class="w-4 h-4 animate-spin text-gray-300" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle><path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path></svg>`,
|
|
176
|
+
};
|
|
177
|
+
const icon = document.getElementById(iconId);
|
|
178
|
+
if (icon) {
|
|
179
|
+
icon.outerHTML = icons[kind] || icons.busy;
|
|
180
|
+
}
|
|
181
|
+
if (msg) {
|
|
182
|
+
msg.className = 'sr-only';
|
|
183
|
+
msg.textContent = title || '';
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Check Logstash state (healthy, restarting, queued requests)
|
|
189
|
+
*/
|
|
190
|
+
async function checkLogstashState() {
|
|
191
|
+
try {
|
|
192
|
+
const simId = (typeof window.getSimConnectionId === 'function')
|
|
193
|
+
? window.getSimConnectionId()
|
|
194
|
+
: null;
|
|
195
|
+
const healthUrl = simId
|
|
196
|
+
? `/ConnectionManager/GetSimulationNodeHealth/?sim_connection_id=${encodeURIComponent(simId)}`
|
|
197
|
+
: '/ConnectionManager/GetSimulationNodeHealth/';
|
|
198
|
+
const response = await fetch(healthUrl);
|
|
199
|
+
const data = await response.json();
|
|
200
|
+
|
|
201
|
+
if (data.healthy) {
|
|
202
|
+
setSimStatusLight(
|
|
203
|
+
'logstashState',
|
|
204
|
+
'logstashStateIcon',
|
|
205
|
+
'logstashStateMessage',
|
|
206
|
+
'ok',
|
|
207
|
+
'Logstash healthy'
|
|
208
|
+
);
|
|
209
|
+
} else if (data.restarting) {
|
|
210
|
+
const queuedCount = data.queued_requests || 0;
|
|
211
|
+
const title =
|
|
212
|
+
queuedCount > 0
|
|
213
|
+
? `Logstash restarting (${queuedCount} queued)`
|
|
214
|
+
: 'Logstash restarting';
|
|
215
|
+
setSimStatusLight(
|
|
216
|
+
'logstashState',
|
|
217
|
+
'logstashStateIcon',
|
|
218
|
+
'logstashStateMessage',
|
|
219
|
+
'warn',
|
|
220
|
+
title
|
|
221
|
+
);
|
|
222
|
+
} else {
|
|
223
|
+
// Explicit unhealthy (not transient silence)
|
|
224
|
+
setSimStatusLight(
|
|
225
|
+
'logstashState',
|
|
226
|
+
'logstashStateIcon',
|
|
227
|
+
'logstashStateMessage',
|
|
228
|
+
'err',
|
|
229
|
+
data.message || data.error || 'Logstash not healthy'
|
|
230
|
+
);
|
|
231
|
+
}
|
|
232
|
+
} catch (error) {
|
|
233
|
+
console.error('Error checking Logstash state:', error);
|
|
234
|
+
// Keep last known state on network blips
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* Check logstashagent health status
|
|
240
|
+
*/
|
|
241
|
+
async function checkAgentStatus() {
|
|
242
|
+
try {
|
|
243
|
+
const simId = (typeof window.getSimConnectionId === 'function')
|
|
244
|
+
? window.getSimConnectionId()
|
|
245
|
+
: null;
|
|
246
|
+
const statusUrl = simId
|
|
247
|
+
? `/ConnectionManager/GetSimulationNodeStatus/?sim_connection_id=${encodeURIComponent(simId)}`
|
|
248
|
+
: '/ConnectionManager/GetSimulationNodeStatus/';
|
|
249
|
+
const response = await fetch(statusUrl);
|
|
250
|
+
const data = await response.json();
|
|
251
|
+
|
|
252
|
+
if (data.status === 'running') {
|
|
253
|
+
setSimStatusLight(
|
|
254
|
+
'agentStatus',
|
|
255
|
+
'agentStatusIcon',
|
|
256
|
+
'agentStatusMessage',
|
|
257
|
+
'ok',
|
|
258
|
+
data.message || 'Agent running'
|
|
259
|
+
);
|
|
260
|
+
} else {
|
|
261
|
+
setSimStatusLight(
|
|
262
|
+
'agentStatus',
|
|
263
|
+
'agentStatusIcon',
|
|
264
|
+
'agentStatusMessage',
|
|
265
|
+
'err',
|
|
266
|
+
data.message || data.error || 'Agent offline'
|
|
267
|
+
);
|
|
268
|
+
}
|
|
269
|
+
} catch (error) {
|
|
270
|
+
console.error('Error checking agent status:', error);
|
|
271
|
+
setSimStatusLight(
|
|
272
|
+
'agentStatus',
|
|
273
|
+
'agentStatusIcon',
|
|
274
|
+
'agentStatusMessage',
|
|
275
|
+
'err',
|
|
276
|
+
'Agent offline (unreachable)'
|
|
277
|
+
);
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
/**
|
|
282
|
+
* Validate pipeline configuration
|
|
283
|
+
*/
|
|
284
|
+
async function validatePipelineConfig() {
|
|
285
|
+
const validateBtn = document.getElementById('validateConfigBtn');
|
|
286
|
+
const validateIcon = document.getElementById('validateIcon');
|
|
287
|
+
const validateStatus = document.getElementById('validateStatus');
|
|
288
|
+
const validationContent = document.getElementById('validationContent');
|
|
289
|
+
const validationTooltip = document.getElementById('validationTooltip');
|
|
290
|
+
|
|
291
|
+
// Show loading state
|
|
292
|
+
validateIcon.outerHTML = `
|
|
293
|
+
<svg id="validateIcon" class="w-5 h-5 text-purple-400 animate-spin" fill="currentColor" viewBox="0 0 24 24">
|
|
294
|
+
<circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle>
|
|
295
|
+
<path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path>
|
|
296
|
+
</svg>
|
|
297
|
+
`;
|
|
298
|
+
validateStatus.textContent = 'Validating...';
|
|
299
|
+
validationContent.innerHTML = 'Validating your pipeline configuration...';
|
|
300
|
+
|
|
301
|
+
try {
|
|
302
|
+
const urlParams = new URLSearchParams(window.location.search);
|
|
303
|
+
const pipelineName = urlParams.get('pipeline') || 'pipeline';
|
|
304
|
+
|
|
305
|
+
const formData = new FormData();
|
|
306
|
+
formData.append('components', JSON.stringify(components));
|
|
307
|
+
formData.append('pipeline_name', pipelineName);
|
|
308
|
+
|
|
309
|
+
const response = await fetch('/ConnectionManager/ValidateLogstashConfig/', {
|
|
310
|
+
method: 'POST',
|
|
311
|
+
body: formData,
|
|
312
|
+
headers: {
|
|
313
|
+
'X-CSRFToken': document.querySelector('[name=csrfmiddlewaretoken]').value
|
|
314
|
+
}
|
|
315
|
+
});
|
|
316
|
+
|
|
317
|
+
const data = await response.json();
|
|
318
|
+
const notifications = data.notifications || {};
|
|
319
|
+
|
|
320
|
+
// Determine severity based on log levels present
|
|
321
|
+
const hasFatal = 'FATAL' in notifications;
|
|
322
|
+
const hasError = 'ERROR' in notifications;
|
|
323
|
+
const hasWarn = 'WARN' in notifications;
|
|
324
|
+
const hasInfo = 'INFO' in notifications;
|
|
325
|
+
|
|
326
|
+
let borderColor = 'border-purple-500';
|
|
327
|
+
let statusIcon = '';
|
|
328
|
+
let statusText = '';
|
|
329
|
+
let statusClass = '';
|
|
330
|
+
let contentHtml = '';
|
|
331
|
+
|
|
332
|
+
if (hasFatal || hasError || data.status === 'ERROR') {
|
|
333
|
+
// FATAL or ERROR - show red X with "Invalid"
|
|
334
|
+
borderColor = 'border-red-500';
|
|
335
|
+
statusIcon = `
|
|
336
|
+
<svg id="validateIcon" class="w-5 h-5 text-red-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
337
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" />
|
|
338
|
+
</svg>
|
|
339
|
+
`;
|
|
340
|
+
statusText = 'Invalid';
|
|
341
|
+
statusClass = 'text-xl font-bold text-red-400';
|
|
342
|
+
contentHtml = '<div class="text-red-400 font-semibold mb-2">✗ Configuration has errors</div>';
|
|
343
|
+
} else if (hasWarn) {
|
|
344
|
+
// WARN - show yellow caution symbol
|
|
345
|
+
borderColor = 'border-yellow-500';
|
|
346
|
+
statusIcon = `
|
|
347
|
+
<svg id="validateIcon" class="w-5 h-5 text-yellow-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
348
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z" />
|
|
349
|
+
</svg>
|
|
350
|
+
`;
|
|
351
|
+
statusText = 'Valid';
|
|
352
|
+
statusClass = 'text-xl font-bold text-yellow-400';
|
|
353
|
+
contentHtml = '<div class="text-yellow-400 font-semibold mb-2">⚠ Configuration is valid with warnings</div>';
|
|
354
|
+
} else {
|
|
355
|
+
// INFO only or no issues - show green checkmark with "Valid"
|
|
356
|
+
borderColor = 'border-green-500';
|
|
357
|
+
statusIcon = `
|
|
358
|
+
<svg id="validateIcon" class="w-5 h-5 text-green-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
359
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z" />
|
|
360
|
+
</svg>
|
|
361
|
+
`;
|
|
362
|
+
statusText = 'Valid';
|
|
363
|
+
statusClass = 'text-xl font-bold text-green-400';
|
|
364
|
+
contentHtml = '<div class="text-green-400 font-semibold mb-2">✓ Configuration is valid with no warnings</div>';
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
// Build notification details by log level
|
|
368
|
+
const logLevelOrder = ['FATAL', 'ERROR', 'WARN', 'INFO'];
|
|
369
|
+
for (const level of logLevelOrder) {
|
|
370
|
+
if (level in notifications && notifications[level].length > 0) {
|
|
371
|
+
const levelColor = {
|
|
372
|
+
'FATAL': 'text-red-400',
|
|
373
|
+
'ERROR': 'text-red-400',
|
|
374
|
+
'WARN': 'text-yellow-400',
|
|
375
|
+
'INFO': 'text-blue-400'
|
|
376
|
+
}[level];
|
|
377
|
+
|
|
378
|
+
contentHtml += `<div class="${levelColor} font-semibold mt-2 mb-1">${level} (${notifications[level].length}):</div>`;
|
|
379
|
+
notifications[level].forEach(entry => {
|
|
380
|
+
contentHtml += `<div class="text-gray-300 text-xs mb-1">
|
|
381
|
+
<span class="text-gray-400">[${entry.plugin}]</span> ${entry.message}
|
|
382
|
+
</div>`;
|
|
383
|
+
});
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
// Update UI
|
|
388
|
+
document.getElementById('validateIcon').outerHTML = statusIcon;
|
|
389
|
+
validateStatus.textContent = statusText;
|
|
390
|
+
validateStatus.className = statusClass;
|
|
391
|
+
validationContent.innerHTML = contentHtml;
|
|
392
|
+
|
|
393
|
+
// Update tooltip border color
|
|
394
|
+
validationTooltip.className = validationTooltip.className.replace(/border-\w+-500/, borderColor);
|
|
395
|
+
|
|
396
|
+
// Show tooltip - user can close it manually or by hovering away
|
|
397
|
+
validationTooltip.classList.remove('hidden');
|
|
398
|
+
|
|
399
|
+
} catch (error) {
|
|
400
|
+
console.error('Error validating config:', error);
|
|
401
|
+
document.getElementById('validateIcon').outerHTML = `
|
|
402
|
+
<svg id="validateIcon" class="w-5 h-5 text-red-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
403
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z" />
|
|
404
|
+
</svg>
|
|
405
|
+
`;
|
|
406
|
+
validateStatus.textContent = 'Error';
|
|
407
|
+
validateStatus.className = 'text-xl font-bold text-red-400';
|
|
408
|
+
validationContent.innerHTML = `<div class="text-red-400">Error: ${error.message}</div>`;
|
|
409
|
+
validationTooltip.className = validationTooltip.className.replace('border-purple-500', 'border-red-500');
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
// Register htmx:afterSwap listener EARLY to catch the initial page load preallocation
|
|
414
|
+
// This must be done before the slotPreallocation element is parsed
|
|
415
|
+
document.addEventListener('DOMContentLoaded', function() {
|
|
416
|
+
const preallocationResult = document.getElementById('slotPreallocationResult');
|
|
417
|
+
const slotPreallocation = document.getElementById('slotPreallocation');
|
|
418
|
+
|
|
419
|
+
if (preallocationResult) {
|
|
420
|
+
preallocationResult.addEventListener('htmx:afterSwap', function(event) {
|
|
421
|
+
// Small delay to ensure DOM is fully updated
|
|
422
|
+
setTimeout(checkPipelineLoadStatus, 100);
|
|
423
|
+
});
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
// Background prealloc: keep chip as "Unallocated" (no spinner). Ready only after success.
|
|
427
|
+
// Track HTMX-driven load prealloc so the JS backup does not double-allocate.
|
|
428
|
+
if (slotPreallocation) {
|
|
429
|
+
slotPreallocation.addEventListener('htmx:beforeRequest', function() {
|
|
430
|
+
window.__slotPreallocInFlight = true;
|
|
431
|
+
});
|
|
432
|
+
slotPreallocation.addEventListener('htmx:afterRequest', function() {
|
|
433
|
+
window.__slotPreallocInFlight = false;
|
|
434
|
+
});
|
|
435
|
+
slotPreallocation.addEventListener('htmx:sendError', function() {
|
|
436
|
+
window.__slotPreallocInFlight = false;
|
|
437
|
+
});
|
|
438
|
+
slotPreallocation.addEventListener('htmx:timeout', function() {
|
|
439
|
+
window.__slotPreallocInFlight = false;
|
|
440
|
+
console.warn('[Slot Prealloc] HTMX request timed out');
|
|
441
|
+
});
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
// Explicit page-open warm backup if hx-trigger=load did not fire / failed early.
|
|
445
|
+
// Soft: skips when a slot is already warm or a prealloc is in flight.
|
|
446
|
+
{% if sim_prealloc_on_load %}
|
|
447
|
+
setTimeout(function() {
|
|
448
|
+
if (window.__slotPreallocInFlight) return;
|
|
449
|
+
if (window.simulationSessionSlotId || window.currentSlotId) return;
|
|
450
|
+
if (typeof triggerPipelineWarmingAndChecking === 'function') {
|
|
451
|
+
triggerPipelineWarmingAndChecking({ fromPageLoad: true, soft: true });
|
|
452
|
+
}
|
|
453
|
+
}, 400);
|
|
454
|
+
{% endif %}
|
|
455
|
+
|
|
456
|
+
// Check agent status once on page load
|
|
457
|
+
checkAgentStatus();
|
|
458
|
+
|
|
459
|
+
// Check Logstash state once on page load
|
|
460
|
+
checkLogstashState();
|
|
461
|
+
|
|
462
|
+
// Poll Logstash state every 5 seconds
|
|
463
|
+
setInterval(checkLogstashState, 5000);
|
|
464
|
+
});
|
|
465
|
+
</script>
|
|
466
|
+
<style>
|
|
467
|
+
.insertion-point {
|
|
468
|
+
position: relative;
|
|
469
|
+
height: 16px;
|
|
470
|
+
margin: 1px 0;
|
|
471
|
+
display: flex;
|
|
472
|
+
align-items: center;
|
|
473
|
+
justify-content: center;
|
|
474
|
+
opacity: 0;
|
|
475
|
+
transition: opacity 0.15s ease;
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
.component-container:hover > .insertion-point,
|
|
479
|
+
.insertion-point:hover {
|
|
480
|
+
opacity: 1;
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
.insertion-buttons {
|
|
484
|
+
display: flex;
|
|
485
|
+
position: absolute;
|
|
486
|
+
z-index: 10;
|
|
487
|
+
background: #374151;
|
|
488
|
+
border-radius: 3px;
|
|
489
|
+
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
|
|
490
|
+
padding: 2px;
|
|
491
|
+
gap: 2px;
|
|
492
|
+
opacity: 0;
|
|
493
|
+
transform: translateY(-2px);
|
|
494
|
+
transition: all 0.15s ease;
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
.insertion-point:hover .insertion-buttons {
|
|
498
|
+
opacity: 1;
|
|
499
|
+
transform: translateY(0);
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
.insertion-point:hover .insertion-buttons {
|
|
503
|
+
display: flex;
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
.insertion-button {
|
|
507
|
+
padding: 2px 6px;
|
|
508
|
+
border: none;
|
|
509
|
+
border-radius: 3px;
|
|
510
|
+
font-size: 11px;
|
|
511
|
+
cursor: pointer;
|
|
512
|
+
display: flex;
|
|
513
|
+
align-items: center;
|
|
514
|
+
white-space: nowrap;
|
|
515
|
+
height: 20px;
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
.insertion-button.add-plugin {
|
|
519
|
+
background-color: #3b82f6;
|
|
520
|
+
color: white;
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
.insertion-button.add-condition {
|
|
524
|
+
background-color: #f59e0b;
|
|
525
|
+
color: white;
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
.insertion-button:hover {
|
|
529
|
+
opacity: 0.9;
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
.component-container {
|
|
533
|
+
position: relative;
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
.pipeline-section-header {
|
|
537
|
+
cursor: pointer;
|
|
538
|
+
border-radius: 0.375rem;
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
.pipeline-section-header:focus-visible {
|
|
542
|
+
outline: 2px solid #60a5fa;
|
|
543
|
+
outline-offset: 4px;
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
.pipeline-section-chevron {
|
|
547
|
+
flex-shrink: 0;
|
|
548
|
+
transition: transform 0.2s ease, color 0.2s ease;
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
.pipeline-section-header:hover .pipeline-section-chevron {
|
|
552
|
+
color: #fff;
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
.pipeline-section-header[aria-expanded="false"] {
|
|
556
|
+
margin-bottom: 0;
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
.pipeline-section-header[aria-expanded="false"] .pipeline-section-chevron {
|
|
560
|
+
transform: rotate(-90deg);
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
.component-container:hover .insertion-point {
|
|
564
|
+
display: flex;
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
.empty-section .insertion-point {
|
|
568
|
+
display: flex !important;
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
.empty-section .insertion-buttons {
|
|
572
|
+
position: static;
|
|
573
|
+
display: flex !important;
|
|
574
|
+
box-shadow: none;
|
|
575
|
+
background: transparent;
|
|
576
|
+
padding: 0;
|
|
577
|
+
margin-top: 8px;
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
/* Always visible insertion points (for end of sections and empty blocks) */
|
|
581
|
+
.insertion-point.always-visible {
|
|
582
|
+
opacity: 1;
|
|
583
|
+
display: flex !important;
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
.insertion-point.always-visible .insertion-buttons {
|
|
587
|
+
position: static;
|
|
588
|
+
opacity: 1;
|
|
589
|
+
transform: translateY(0);
|
|
590
|
+
display: flex;
|
|
591
|
+
margin-top: 4px;
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
/* Newly added plugin animation */
|
|
595
|
+
@keyframes glowPulse {
|
|
596
|
+
0% {
|
|
597
|
+
box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7), 0 0 20px rgba(59, 130, 246, 0.5);
|
|
598
|
+
border-color: rgba(59, 130, 246, 0.8);
|
|
599
|
+
}
|
|
600
|
+
50% {
|
|
601
|
+
box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.3), 0 0 30px rgba(59, 130, 246, 0.3);
|
|
602
|
+
border-color: rgba(59, 130, 246, 1);
|
|
603
|
+
}
|
|
604
|
+
100% {
|
|
605
|
+
box-shadow: 0 0 0 0 rgba(59, 130, 246, 0), 0 0 0 rgba(59, 130, 246, 0);
|
|
606
|
+
border-color: transparent;
|
|
607
|
+
}
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
.newly-added {
|
|
611
|
+
animation: glowPulse 2s ease-out;
|
|
612
|
+
border: 2px solid rgba(59, 130, 246, 0.8);
|
|
613
|
+
scroll-margin-top: 100px;
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
.newly-added::before {
|
|
617
|
+
content: '';
|
|
618
|
+
position: absolute;
|
|
619
|
+
inset: -2px;
|
|
620
|
+
border-radius: inherit;
|
|
621
|
+
background: linear-gradient(45deg, rgba(59, 130, 246, 0.1), rgba(147, 51, 234, 0.1));
|
|
622
|
+
z-index: -1;
|
|
623
|
+
opacity: 0;
|
|
624
|
+
animation: fadeOut 2s ease-out;
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
@keyframes fadeOut {
|
|
628
|
+
0% {
|
|
629
|
+
opacity: 1;
|
|
630
|
+
}
|
|
631
|
+
100% {
|
|
632
|
+
opacity: 0;
|
|
633
|
+
}
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
/* Simulation badge pop animation */
|
|
637
|
+
@keyframes badgePop {
|
|
638
|
+
0% {
|
|
639
|
+
transform: scale(0);
|
|
640
|
+
opacity: 0;
|
|
641
|
+
}
|
|
642
|
+
50% {
|
|
643
|
+
transform: scale(1.2);
|
|
644
|
+
}
|
|
645
|
+
100% {
|
|
646
|
+
transform: scale(1);
|
|
647
|
+
opacity: 1;
|
|
648
|
+
}
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
/* Green glow animation for mode toggle */
|
|
652
|
+
.mode-toggle-active {
|
|
653
|
+
animation: pulse-glow-green 2s ease-in-out forwards;
|
|
654
|
+
border-radius: 0.375rem;
|
|
655
|
+
box-shadow: 0 0 6px 1px rgba(34, 197, 94, 0.3);
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
@keyframes pulse-glow-green {
|
|
659
|
+
0% {
|
|
660
|
+
box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
|
|
661
|
+
}
|
|
662
|
+
50% {
|
|
663
|
+
box-shadow: 0 0 12px 3px rgba(34, 197, 94, 0.6);
|
|
664
|
+
}
|
|
665
|
+
100% {
|
|
666
|
+
box-shadow: 0 0 6px 1px rgba(34, 197, 94, 0.3);
|
|
667
|
+
}
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
/* Failure pulse animation for parsing failure badges */
|
|
671
|
+
@keyframes failurePulse {
|
|
672
|
+
0%, 100% {
|
|
673
|
+
box-shadow: 0 0 20px rgba(220, 38, 38, 0.8), 0 2px 4px rgba(0, 0, 0, 0.3);
|
|
674
|
+
transform: scale(1);
|
|
675
|
+
}
|
|
676
|
+
50% {
|
|
677
|
+
box-shadow: 0 0 30px rgba(220, 38, 38, 1), 0 0 40px rgba(220, 38, 38, 0.6), 0 2px 4px rgba(0, 0, 0, 0.3);
|
|
678
|
+
transform: scale(1.05);
|
|
679
|
+
}
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
/* Dim non-executed plugins during simulation */
|
|
683
|
+
.simulation-dimmed {
|
|
684
|
+
opacity: 0.3;
|
|
685
|
+
filter: blur(1px) grayscale(50%);
|
|
686
|
+
transition: opacity 0.3s ease, filter 0.3s ease;
|
|
687
|
+
pointer-events: none;
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
/* Collapsible conditional blocks */
|
|
691
|
+
.conditional-content {
|
|
692
|
+
max-height: none;
|
|
693
|
+
overflow: visible;
|
|
694
|
+
transition: opacity 0.3s ease-out;
|
|
695
|
+
opacity: 1;
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
.conditional-content.collapsed {
|
|
699
|
+
max-height: 0;
|
|
700
|
+
opacity: 0;
|
|
701
|
+
transition: max-height 0.3s ease-in, opacity 0.3s ease-in;
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
.collapse-toggle svg {
|
|
705
|
+
transition: transform 0.3s ease;
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
/* Simulation selection styles */
|
|
709
|
+
.simulation-selected {
|
|
710
|
+
border: 2px solid #10b981 !important;
|
|
711
|
+
box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
.simulation-selected-checkbox {
|
|
715
|
+
display: inline-flex !important;
|
|
716
|
+
align-items: center;
|
|
717
|
+
justify-content: center;
|
|
718
|
+
width: 20px;
|
|
719
|
+
height: 20px;
|
|
720
|
+
border: 2px solid #10b981;
|
|
721
|
+
border-radius: 4px;
|
|
722
|
+
background-color: #10b981;
|
|
723
|
+
}
|
|
724
|
+
|
|
725
|
+
.simulation-selected-checkbox svg {
|
|
726
|
+
width: 14px;
|
|
727
|
+
height: 14px;
|
|
728
|
+
color: white;
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
/* Floating Simulate Subset button container */
|
|
732
|
+
#simulateSubsetContainer {
|
|
733
|
+
position: fixed;
|
|
734
|
+
bottom: 30px;
|
|
735
|
+
right: 30px;
|
|
736
|
+
z-index: 40;
|
|
737
|
+
transition: all 0.3s ease;
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
#simulateSubsetContainer.hidden {
|
|
741
|
+
opacity: 0;
|
|
742
|
+
pointer-events: none;
|
|
743
|
+
transform: translateY(20px);
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
#simulateSubsetBtn {
|
|
747
|
+
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), 0 0 0 4px rgba(139, 92, 246, 0.2);
|
|
748
|
+
transition: all 0.3s ease;
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
#simulateSubsetBtn:hover {
|
|
752
|
+
transform: translateY(-2px);
|
|
753
|
+
box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4), 0 0 0 4px rgba(139, 92, 246, 0.3);
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
#clearSelectionsBtn {
|
|
757
|
+
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
|
|
758
|
+
transition: all 0.3s ease;
|
|
759
|
+
}
|
|
760
|
+
|
|
761
|
+
#clearSelectionsBtn:hover {
|
|
762
|
+
transform: translateY(-2px);
|
|
763
|
+
box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4);
|
|
764
|
+
}
|
|
765
|
+
|
|
766
|
+
/* Comment plugin special styling */
|
|
767
|
+
.comment-plugin {
|
|
768
|
+
border: 2px solid #4b5563 !important;
|
|
769
|
+
border-left: 4px solid #6b7280 !important;
|
|
770
|
+
background: linear-gradient(135deg, #1f2937 0%, #111827 100%) !important;
|
|
771
|
+
box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3), 0 1px 3px rgba(0, 0, 0, 0.2);
|
|
772
|
+
font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
|
|
773
|
+
font-style: italic;
|
|
774
|
+
opacity: 0.85;
|
|
775
|
+
transition: all 0.2s ease;
|
|
776
|
+
}
|
|
777
|
+
|
|
778
|
+
.comment-plugin:hover {
|
|
779
|
+
opacity: 1;
|
|
780
|
+
border-color: #6b7280 !important;
|
|
781
|
+
box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3), 0 2px 6px rgba(0, 0, 0, 0.3);
|
|
782
|
+
}
|
|
783
|
+
|
|
784
|
+
.comment-plugin .font-medium {
|
|
785
|
+
color: #9ca3af !important;
|
|
786
|
+
font-weight: 400 !important;
|
|
787
|
+
}
|
|
788
|
+
|
|
789
|
+
.comment-plugin .text-gray-400 {
|
|
790
|
+
color: #6b7280 !important;
|
|
791
|
+
}
|
|
792
|
+
|
|
793
|
+
/* Toggle button flash animation */
|
|
794
|
+
@keyframes flash-sweep {
|
|
795
|
+
0% {
|
|
796
|
+
left: -100%;
|
|
797
|
+
opacity: 0;
|
|
798
|
+
}
|
|
799
|
+
50% {
|
|
800
|
+
opacity: 1;
|
|
801
|
+
}
|
|
802
|
+
100% {
|
|
803
|
+
left: 100%;
|
|
804
|
+
opacity: 0;
|
|
805
|
+
}
|
|
806
|
+
}
|
|
807
|
+
|
|
808
|
+
.toggle-flash::before {
|
|
809
|
+
content: '';
|
|
810
|
+
position: absolute;
|
|
811
|
+
top: 0;
|
|
812
|
+
left: -100%;
|
|
813
|
+
width: 100%;
|
|
814
|
+
height: 100%;
|
|
815
|
+
background: linear-gradient(90deg, transparent, rgba(34, 197, 94, 0.6), transparent);
|
|
816
|
+
animation: flash-sweep 0.6s ease-out;
|
|
817
|
+
z-index: 5;
|
|
818
|
+
pointer-events: none;
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
</style>
|
|
822
|
+
<!--- Pipeline Component Layout-->
|
|
823
|
+
<div class="p-6">
|
|
824
|
+
|
|
825
|
+
<!-- Parsing Error Alert -->
|
|
826
|
+
{% if parsing_error %}
|
|
827
|
+
<div class="mb-6 p-6 bg-yellow-900/30 border-2 border-yellow-600 rounded-lg" id="parsingErrorBanner">
|
|
828
|
+
<div class="flex items-start">
|
|
829
|
+
<div class="flex-shrink-0">
|
|
830
|
+
<svg class="h-6 w-6 text-yellow-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
831
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z" />
|
|
832
|
+
</svg>
|
|
833
|
+
</div>
|
|
834
|
+
<div class="ml-4 flex-1">
|
|
835
|
+
<h3 class="text-lg font-semibold text-yellow-400 mb-2">
|
|
836
|
+
⚠️ Your pipeline failed to be converted to UI components
|
|
837
|
+
</h3>
|
|
838
|
+
<p class="text-yellow-200 mb-3">
|
|
839
|
+
LogstashUI couldn't parse your pipeline configuration. The pipeline is still saved in Elasticsearch, but you won't be able to edit it visually until the syntax is fixed.
|
|
840
|
+
</p>
|
|
841
|
+
<details class="mb-4">
|
|
842
|
+
<summary class="cursor-pointer text-yellow-300 hover:text-yellow-200 font-medium mb-2">
|
|
843
|
+
📋 View Error Details
|
|
844
|
+
</summary>
|
|
845
|
+
<div class="mt-3 p-4 bg-gray-900/50 border border-yellow-700/50 rounded">
|
|
846
|
+
<pre class="text-xs text-gray-300 whitespace-pre-wrap font-mono overflow-auto max-h-64">{{ parsing_error }}</pre>
|
|
847
|
+
</div>
|
|
848
|
+
</details>
|
|
849
|
+
<div class="flex items-center gap-4">
|
|
850
|
+
<a href="https://github.com/elastic/LogstashUI/issues/new?template=issue.md"
|
|
851
|
+
target="_blank"
|
|
852
|
+
class="inline-flex items-center px-4 py-2 bg-yellow-600 hover:bg-yellow-700 text-white rounded-md font-medium transition-colors">
|
|
853
|
+
<svg class="w-5 h-5 mr-2" fill="currentColor" viewBox="0 0 24 24">
|
|
854
|
+
<path d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"/>
|
|
855
|
+
</svg>
|
|
856
|
+
Report Issue on GitHub
|
|
857
|
+
</a>
|
|
858
|
+
<p class="text-sm text-yellow-300">
|
|
859
|
+
Please help us improve by reporting this error!
|
|
860
|
+
</p>
|
|
861
|
+
</div>
|
|
862
|
+
</div>
|
|
863
|
+
</div>
|
|
864
|
+
</div>
|
|
865
|
+
{% endif %}
|
|
866
|
+
|
|
867
|
+
<div class="mb-6 pt-5 pb-0">
|
|
868
|
+
<!-- Row 1: Pipeline Name -->
|
|
869
|
+
<div class="flex items-center mb-4 gap-3">
|
|
870
|
+
{% if ls_id %}
|
|
871
|
+
<img src="{% static 'images/LogstashIcon.png' %}" alt="Logstash" class="w-8 h-8">
|
|
872
|
+
{% elif es_id %}
|
|
873
|
+
<img src="{% static 'images/ElasticIcon.png' %}" alt="Elastic" class="w-8 h-8">
|
|
874
|
+
{% endif %}
|
|
875
|
+
<h1 class="text-3xl font-semibold text-white leading-none">{{ pipeline_name }}</h1>
|
|
876
|
+
{% if ls_id and policy_name %}
|
|
877
|
+
<span class="text-gray-500 text-2xl font-thin select-none">/</span>
|
|
878
|
+
<a href="/ConnectionManager/AgentPolicies?policy_id={{ ls_id }}"
|
|
879
|
+
class="inline-flex items-center gap-1.5 px-3 py-1 rounded-full bg-purple-900/40 border border-purple-500/50 hover:bg-purple-900/70 hover:border-purple-400 transition-colors group">
|
|
880
|
+
<svg class="w-3.5 h-3.5 text-purple-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
881
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"/>
|
|
882
|
+
</svg>
|
|
883
|
+
<span class="text-xs text-purple-300 font-medium uppercase tracking-wide">Policy</span>
|
|
884
|
+
<span class="text-sm text-purple-100 font-semibold group-hover:text-white transition-colors">{{ policy_name }}</span>
|
|
885
|
+
</a>
|
|
886
|
+
{% elif es_id and connection_name %}
|
|
887
|
+
<span class="text-gray-500 text-2xl font-thin select-none">/</span>
|
|
888
|
+
<span class="inline-flex items-center gap-1 px-2.5 py-0.5 rounded-full bg-blue-900/40 border border-blue-500/50">
|
|
889
|
+
<svg class="w-3 h-3 text-blue-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
890
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 12h14M12 5l7 7-7 7"/>
|
|
891
|
+
</svg>
|
|
892
|
+
<span class="text-[11px] text-blue-300 font-medium uppercase tracking-wide">Connection</span>
|
|
893
|
+
<span class="text-[13px] text-blue-100 font-semibold">{{ connection_name }}</span>
|
|
894
|
+
</span>
|
|
895
|
+
{% endif %}
|
|
896
|
+
</div>
|
|
897
|
+
|
|
898
|
+
<!-- Unified editor toolbar: simulation | mode | actions -->
|
|
899
|
+
<div class="editor-toolbar grid grid-cols-1 xl:grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)] items-center">
|
|
900
|
+
<!-- Compact simulation panel -->
|
|
901
|
+
<section class="simulation-panel" aria-label="Simulation">
|
|
902
|
+
<!-- Simulation target: terse closed label; detail via title / option list -->
|
|
903
|
+
<div id="simTargetSelectWrap" class="simulation-target-wrap shrink-0">
|
|
904
|
+
<span class="simulation-target-icon" aria-hidden="true">
|
|
905
|
+
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
906
|
+
<rect x="3" y="4" width="18" height="13" rx="2" stroke-width="1.8"/>
|
|
907
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="m10 8 5 2.5-5 2.5V8ZM8 21h8M12 17v4"/>
|
|
908
|
+
</svg>
|
|
909
|
+
</span>
|
|
910
|
+
<div class="simulation-target-fields">
|
|
911
|
+
<label for="simTargetSelect">Simulation target</label>
|
|
912
|
+
<select id="simTargetSelect"
|
|
913
|
+
class="text-xs bg-gray-800 border border-gray-600 text-gray-200 rounded-md w-auto focus:outline-none focus:ring-1 focus:ring-purple-500"
|
|
914
|
+
title="Simulation agent (hover options for host / Logstash version)">
|
|
915
|
+
{% if sim_targets %}
|
|
916
|
+
{% for t in sim_targets %}
|
|
917
|
+
<option value="{{ t.connection_id }}"
|
|
918
|
+
title="{{ t.detail|default:t.label }}"
|
|
919
|
+
data-detail="{{ t.detail|default:t.label }}"
|
|
920
|
+
data-policy-type="{{ t.policy_type }}"
|
|
921
|
+
{% if selected_sim_connection_id == t.connection_id %}selected{% endif %}>
|
|
922
|
+
{{ t.label }}
|
|
923
|
+
</option>
|
|
924
|
+
{% endfor %}
|
|
925
|
+
{% else %}
|
|
926
|
+
<option value="">…</option>
|
|
927
|
+
{% endif %}
|
|
928
|
+
</select>
|
|
929
|
+
</div>
|
|
930
|
+
</div>
|
|
931
|
+
|
|
932
|
+
<!-- Agent reachability with full details on hover or focus -->
|
|
933
|
+
<div class="simulation-status-detail" tabindex="0" aria-label="Agent status" aria-describedby="agentStatusDetail">
|
|
934
|
+
<div id="agentStatus"
|
|
935
|
+
class="sim-status-light inline-flex items-center gap-1 px-1.5 h-7 rounded-md border border-gray-600 bg-gray-700/50"
|
|
936
|
+
title="Checking agent…"
|
|
937
|
+
role="status"
|
|
938
|
+
aria-live="polite">
|
|
939
|
+
<svg id="agentStatusIcon" class="w-4 h-4 animate-spin text-gray-300" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true">
|
|
940
|
+
<circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle>
|
|
941
|
+
<path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path>
|
|
942
|
+
</svg>
|
|
943
|
+
<span class="simulation-status-label text-xs text-gray-200">Agent</span>
|
|
944
|
+
<span id="agentStatusMessage" class="sr-only">Checking agent…</span>
|
|
945
|
+
</div>
|
|
946
|
+
<span id="agentStatusDetail" class="simulation-status-tooltip" role="tooltip"></span>
|
|
947
|
+
</div>
|
|
948
|
+
|
|
949
|
+
<!-- Logstash health with full details on hover or focus -->
|
|
950
|
+
<div class="simulation-status-detail" tabindex="0" aria-label="Logstash status" aria-describedby="logstashStateDetail">
|
|
951
|
+
<div id="logstashState"
|
|
952
|
+
class="sim-status-light inline-flex items-center gap-1 px-1.5 h-7 rounded-md border border-gray-600 bg-gray-700/50"
|
|
953
|
+
title="Checking Logstash health…"
|
|
954
|
+
role="status"
|
|
955
|
+
aria-live="polite">
|
|
956
|
+
<svg id="logstashStateIcon" class="w-4 h-4 animate-spin text-gray-300" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true">
|
|
957
|
+
<circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle>
|
|
958
|
+
<path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path>
|
|
959
|
+
</svg>
|
|
960
|
+
<span class="simulation-status-label text-xs text-gray-200">Logstash</span>
|
|
961
|
+
<span id="logstashStateMessage" class="sr-only">Checking Logstash health…</span>
|
|
962
|
+
</div>
|
|
963
|
+
<span id="logstashStateDetail" class="simulation-status-tooltip" role="tooltip"></span>
|
|
964
|
+
</div>
|
|
965
|
+
|
|
966
|
+
<!-- Pipeline slot: quiet "Unallocated" until a slot is actually ready (no spin on page load) -->
|
|
967
|
+
<div class="simulation-status-detail" tabindex="0" aria-label="Simulation slot status" aria-describedby="pipelineLoadStatusDetail">
|
|
968
|
+
<div id="pipelineLoadStatus"
|
|
969
|
+
class="inline-flex items-center gap-1.5 px-2 py-1 rounded-full border border-gray-600 bg-gray-700/50 max-w-[11rem]"
|
|
970
|
+
title="No simulation slot yet">
|
|
971
|
+
<svg id="pipelineStatusIcon" class="w-3.5 h-3.5 text-gray-400 shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" aria-hidden="true">
|
|
972
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M20 13V6a2 2 0 00-2-2H6a2 2 0 00-2 2v7m16 0v5a2 2 0 01-2 2H6a2 2 0 01-2-2v-5m16 0h-2.586a1 1 0 00-.707.293l-2.414 2.414a1 1 0 01-.707.293h-3.172a1 1 0 01-.707-.293l-2.414-2.414A1 1 0 006.586 13H4"></path>
|
|
973
|
+
</svg>
|
|
974
|
+
<span id="pipelineStatusMessage" class="text-xs font-medium text-gray-400 truncate">Unallocated</span>
|
|
975
|
+
</div>
|
|
976
|
+
<span id="pipelineLoadStatusDetail" class="simulation-status-tooltip" role="tooltip"></span>
|
|
977
|
+
</div>
|
|
978
|
+
|
|
979
|
+
<!-- Simulation Logs Button -->
|
|
980
|
+
<button id="viewPipelineLogsBtn" onclick="viewPipelineLogs()"
|
|
981
|
+
class="simulation-logs text-xs px-1 py-1.5 rounded-md hover:bg-gray-700 transition-colors text-gray-300 hover:text-white whitespace-nowrap">
|
|
982
|
+
<svg width="14" height="14" fill="none" stroke="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8zM14 2v6h6M8 13h8M8 17h6"/></svg>
|
|
983
|
+
Logs
|
|
984
|
+
</button>
|
|
985
|
+
</section>
|
|
986
|
+
|
|
987
|
+
<!-- Center: Presentation Mode Toggle (no absolute positioning) -->
|
|
988
|
+
<div class="editor-mode-switcher flex items-center justify-center gap-1 bg-gray-700 rounded-lg p-1 w-fit mx-auto xl:mx-0">
|
|
989
|
+
<button id="uiModeBtn" class="w-16 py-2 rounded-md font-medium transition-all bg-green-600 text-white mode-toggle-active" onclick="switchToUIMode()" aria-label="UI mode" title="UI mode">
|
|
990
|
+
<svg class="editor-mode-icon" fill="none" stroke="currentColor" viewBox="0 0 24 24" aria-hidden="true">
|
|
991
|
+
<rect x="4" y="4" width="16" height="16" rx="2" stroke-width="1.8"/>
|
|
992
|
+
<path stroke-linecap="round" stroke-width="1.8" d="M8 9h8M8 15h5"/>
|
|
993
|
+
<circle cx="16.5" cy="15" r="1.5" stroke-width="1.5"/>
|
|
994
|
+
</svg>
|
|
995
|
+
<span class="editor-mode-label">UI</span>
|
|
996
|
+
</button>
|
|
997
|
+
<button id="textModeBtn" class="w-16 py-2 rounded-md font-medium transition-all text-gray-300 hover:bg-gray-600" onclick="switchToTextMode()" aria-label="Text mode" title="Text mode">
|
|
998
|
+
<svg class="editor-mode-icon" fill="none" stroke="currentColor" viewBox="0 0 24 24" aria-hidden="true">
|
|
999
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="m9 7-5 5 5 5M15 7l5 5-5 5M13 5l-2 14"/>
|
|
1000
|
+
</svg>
|
|
1001
|
+
<span class="editor-mode-label">Text</span>
|
|
1002
|
+
</button>
|
|
1003
|
+
<button id="graphModeBtn" class="w-16 py-2 rounded-md font-medium transition-all text-gray-300 hover:bg-gray-600" onclick="switchToGraphMode()" aria-label="Graph mode" title="Graph mode">
|
|
1004
|
+
<svg class="editor-mode-icon" fill="none" stroke="currentColor" viewBox="0 0 24 24" aria-hidden="true">
|
|
1005
|
+
<circle cx="12" cy="5" r="2.25" stroke-width="1.8"/>
|
|
1006
|
+
<circle cx="5" cy="18" r="2.25" stroke-width="1.8"/>
|
|
1007
|
+
<circle cx="19" cy="18" r="2.25" stroke-width="1.8"/>
|
|
1008
|
+
<path stroke-width="1.8" d="m10.9 7-4.8 8.9M13.1 7l4.8 8.9M7.25 18h9.5"/>
|
|
1009
|
+
</svg>
|
|
1010
|
+
<span class="editor-mode-label">Graph</span>
|
|
1011
|
+
</button>
|
|
1012
|
+
</div>
|
|
1013
|
+
|
|
1014
|
+
<!-- Right: Action Buttons -->
|
|
1015
|
+
<div class="editor-actions flex items-center gap-3 flex-wrap xl:justify-end">
|
|
1016
|
+
<form onsubmit="return false;" class="editor-action-form flex items-center gap-2">
|
|
1017
|
+
{% csrf_token %}
|
|
1018
|
+
|
|
1019
|
+
<!-- Utility Button: View Code -->
|
|
1020
|
+
<button type="button"
|
|
1021
|
+
id="viewCode"
|
|
1022
|
+
class="w-36 py-2 inline-flex items-center justify-center gap-2 bg-gray-700 text-gray-200 rounded-md hover:bg-gray-600 transition-colors text-sm font-medium"
|
|
1023
|
+
aria-label="View code" title="View code"
|
|
1024
|
+
onclick="viewGeneratedCode()">
|
|
1025
|
+
<svg class="w-4 h-4 shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" aria-hidden="true">
|
|
1026
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9l-6-6Z"/>
|
|
1027
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="M14 3v6h6M9 13l-2 2 2 2M15 13l2 2-2 2M13 12l-2 6"/>
|
|
1028
|
+
</svg>
|
|
1029
|
+
<span class="editor-action-label">View Code</span>
|
|
1030
|
+
</button>
|
|
1031
|
+
|
|
1032
|
+
<!-- Secondary Button: Simulate -->
|
|
1033
|
+
<button type="button"
|
|
1034
|
+
id="simulatePipeline"
|
|
1035
|
+
class="w-36 py-2 inline-flex items-center justify-center gap-2 bg-purple-600 text-white rounded-md hover:bg-purple-700 transition-colors text-sm font-medium"
|
|
1036
|
+
aria-label="Simulate pipeline" title="Simulate pipeline"
|
|
1037
|
+
onclick="openSimulateModal()">
|
|
1038
|
+
<svg class="w-4 h-4 shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" aria-hidden="true">
|
|
1039
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="m8 5 11 7-11 7V5Z"/>
|
|
1040
|
+
</svg>
|
|
1041
|
+
<span class="editor-action-label">Simulate</span>
|
|
1042
|
+
</button>
|
|
1043
|
+
|
|
1044
|
+
<!-- Primary Button: Save -->
|
|
1045
|
+
<button type="button"
|
|
1046
|
+
id="savePipeline"
|
|
1047
|
+
class="w-36 py-2 inline-flex items-center justify-center gap-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors text-sm font-medium shadow-sm"
|
|
1048
|
+
aria-label="Save pipeline" title="Save pipeline"
|
|
1049
|
+
hx-post="/ConnectionManager/SavePipeline/"
|
|
1050
|
+
hx-include="#pipelineForm"
|
|
1051
|
+
hx-trigger="none"
|
|
1052
|
+
hx-target="#saveStatus"
|
|
1053
|
+
hx-vals='js:{"save_pipeline": "true", "es_id": new URLSearchParams(window.location.search).get("es_id"), "ls_id": new URLSearchParams(window.location.search).get("ls_id"), "pipeline": new URLSearchParams(window.location.search).get("pipeline"), "components": components}'
|
|
1054
|
+
onclick="prepareDiffModal()">
|
|
1055
|
+
<svg class="w-4 h-4 shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" aria-hidden="true">
|
|
1056
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="M5 3h12l3 3v15H4V4a1 1 0 0 1 1-1Z"/>
|
|
1057
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="M8 3v6h8V3M8 21v-7h8v7"/>
|
|
1058
|
+
</svg>
|
|
1059
|
+
<span class="editor-action-label">Save Pipeline</span>
|
|
1060
|
+
</button>
|
|
1061
|
+
</form>
|
|
1062
|
+
</div>
|
|
1063
|
+
</div>
|
|
1064
|
+
|
|
1065
|
+
<div class="mt-4 border-b border-gray-700/50" aria-hidden="true"></div>
|
|
1066
|
+
|
|
1067
|
+
</div>
|
|
1068
|
+
|
|
1069
|
+
<!-- Stats Strip -->
|
|
1070
|
+
<div class="py-3">
|
|
1071
|
+
{% include 'components/pipeline_editor/stats_strip.html' %}
|
|
1072
|
+
</div>
|
|
1073
|
+
|
|
1074
|
+
<!-- Pipeline Settings Collapsible Section -->
|
|
1075
|
+
<div class="mb-6">
|
|
1076
|
+
<div class="bg-gray-800 rounded-lg overflow-hidden">
|
|
1077
|
+
<!-- Collapsible Header -->
|
|
1078
|
+
<button
|
|
1079
|
+
id="pipelineSettingsToggle"
|
|
1080
|
+
class="w-full flex items-center justify-between p-4 text-white hover:bg-gray-700 transition-colors"
|
|
1081
|
+
onclick="togglePipelineSettings()">
|
|
1082
|
+
<div class="flex items-center">
|
|
1083
|
+
<svg id="toggleIcon" class="w-5 h-5 mr-2 transform transition-transform" fill="none"
|
|
1084
|
+
stroke="currentColor" viewBox="0 0 24 24">
|
|
1085
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7"/>
|
|
1086
|
+
</svg>
|
|
1087
|
+
<h2 class="text-lg font-semibold">Pipeline Settings</h2>
|
|
1088
|
+
</div>
|
|
1089
|
+
<span class="text-sm text-gray-400">Configure pipeline parameters</span>
|
|
1090
|
+
</button>
|
|
1091
|
+
|
|
1092
|
+
<!-- Collapsible Content -->
|
|
1093
|
+
<div id="pipelineSettingsContent" class="hidden border-t border-gray-700">
|
|
1094
|
+
<form id="pipelineSettingsForm" class="p-6 space-y-6">
|
|
1095
|
+
{% csrf_token %}
|
|
1096
|
+
<input type="hidden" name="es_id" id="hiddenEsId" value="">
|
|
1097
|
+
<input type="hidden" name="ls_id" id="hiddenLsId" value="">
|
|
1098
|
+
<input type="hidden" name="pipeline" id="hiddenPipelineName" value="">
|
|
1099
|
+
<!-- Description -->
|
|
1100
|
+
<div>
|
|
1101
|
+
<label for="pipelineDescription" class="block text-sm font-medium text-gray-300 mb-2">
|
|
1102
|
+
Description
|
|
1103
|
+
</label>
|
|
1104
|
+
<input
|
|
1105
|
+
type="text"
|
|
1106
|
+
id="pipelineDescription"
|
|
1107
|
+
name="description"
|
|
1108
|
+
class="w-full px-4 py-2 bg-gray-700 border border-gray-600 rounded-lg text-white placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"
|
|
1109
|
+
placeholder="Enter pipeline description"
|
|
1110
|
+
value="{{ pipeline_settings.description|default:'' }}">
|
|
1111
|
+
</div>
|
|
1112
|
+
|
|
1113
|
+
<!-- Grid Layout for Settings -->
|
|
1114
|
+
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6 pb-4">
|
|
1115
|
+
<!-- Pipeline Workers -->
|
|
1116
|
+
<div class="pb-2">
|
|
1117
|
+
<label for="pipelineWorkers" class="block text-sm font-medium text-gray-300 mb-2">
|
|
1118
|
+
Pipeline Workers
|
|
1119
|
+
</label>
|
|
1120
|
+
<input
|
|
1121
|
+
type="number"
|
|
1122
|
+
id="pipelineWorkers"
|
|
1123
|
+
name="pipeline_workers"
|
|
1124
|
+
min="1"
|
|
1125
|
+
class="w-full px-4 py-2 bg-gray-700 border border-gray-600 rounded-lg text-white placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"
|
|
1126
|
+
placeholder="Number of workers"
|
|
1127
|
+
value="{{ pipeline_settings.pipeline_workers|default:1 }}">
|
|
1128
|
+
</div>
|
|
1129
|
+
|
|
1130
|
+
<!-- Pipeline Batch Size -->
|
|
1131
|
+
<div class="pb-2">
|
|
1132
|
+
<label for="pipelineBatchSize" class="block text-sm font-medium text-gray-300 mb-2">
|
|
1133
|
+
Pipeline Batch Size
|
|
1134
|
+
</label>
|
|
1135
|
+
<input
|
|
1136
|
+
type="number"
|
|
1137
|
+
id="pipelineBatchSize"
|
|
1138
|
+
name="pipeline_batch_size"
|
|
1139
|
+
min="1"
|
|
1140
|
+
class="w-full px-4 py-2 bg-gray-700 border border-gray-600 rounded-lg text-white placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"
|
|
1141
|
+
placeholder="Batch size"
|
|
1142
|
+
value="{{ pipeline_settings.pipeline_batch_size|default:128 }}">
|
|
1143
|
+
</div>
|
|
1144
|
+
|
|
1145
|
+
<!-- Pipeline Batch Delay -->
|
|
1146
|
+
<div class="pb-2">
|
|
1147
|
+
<label for="pipelineBatchDelay" class="block text-sm font-medium text-gray-300 mb-2">
|
|
1148
|
+
Pipeline Batch Delay (ms)
|
|
1149
|
+
</label>
|
|
1150
|
+
<input
|
|
1151
|
+
type="number"
|
|
1152
|
+
id="pipelineBatchDelay"
|
|
1153
|
+
name="pipeline_batch_delay"
|
|
1154
|
+
min="0"
|
|
1155
|
+
class="w-full px-4 py-2 bg-gray-700 border border-gray-600 rounded-lg text-white placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"
|
|
1156
|
+
placeholder="Delay in milliseconds"
|
|
1157
|
+
value="{{ pipeline_settings.pipeline_batch_delay|default:50 }}">
|
|
1158
|
+
</div>
|
|
1159
|
+
|
|
1160
|
+
<!-- Queue Type -->
|
|
1161
|
+
<div class="pb-2">
|
|
1162
|
+
<label for="queueType" class="block text-sm font-medium text-gray-300 mb-2">
|
|
1163
|
+
Queue Type
|
|
1164
|
+
</label>
|
|
1165
|
+
<select
|
|
1166
|
+
id="queueType"
|
|
1167
|
+
name="queue_type"
|
|
1168
|
+
class="w-full px-4 py-2 bg-gray-700 border border-gray-600 rounded-lg text-white focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent">
|
|
1169
|
+
<option value="">Select queue type</option>
|
|
1170
|
+
<option value="memory" {% if pipeline_settings.queue_type == 'memory' %}selected{% endif %}>Memory</option>
|
|
1171
|
+
<option value="persisted" {% if pipeline_settings.queue_type == 'persisted' %}selected{% endif %}>Persisted</option>
|
|
1172
|
+
</select>
|
|
1173
|
+
</div>
|
|
1174
|
+
|
|
1175
|
+
<!-- Queue Max Bytes -->
|
|
1176
|
+
<div class="pb-2">
|
|
1177
|
+
<label for="queueMaxBytes" class="block text-sm font-medium text-gray-300 mb-2">
|
|
1178
|
+
Queue Max Bytes
|
|
1179
|
+
</label>
|
|
1180
|
+
<div class="flex gap-2">
|
|
1181
|
+
<input
|
|
1182
|
+
type="number"
|
|
1183
|
+
id="queueMaxBytes"
|
|
1184
|
+
name="queue_max_bytes"
|
|
1185
|
+
min="0"
|
|
1186
|
+
class="flex-1 px-4 py-2 bg-gray-700 border border-gray-600 rounded-lg text-white placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"
|
|
1187
|
+
placeholder="Max bytes"
|
|
1188
|
+
value="{{ pipeline_settings.queue_max_bytes_value|default:1 }}">
|
|
1189
|
+
<select
|
|
1190
|
+
id="queueMaxBytesUnit"
|
|
1191
|
+
name="queue_max_bytes_unit"
|
|
1192
|
+
class="px-3 py-2 bg-gray-700 border border-gray-600 rounded-lg text-white focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent">
|
|
1193
|
+
<option value="b" {% if pipeline_settings.queue_max_bytes_unit == 'b' %}selected{% endif %}>Bytes</option>
|
|
1194
|
+
<option value="kb" {% if pipeline_settings.queue_max_bytes_unit == 'kb' %}selected{% endif %}>KB</option>
|
|
1195
|
+
<option value="mb" {% if pipeline_settings.queue_max_bytes_unit == 'mb' %}selected{% endif %}>MB</option>
|
|
1196
|
+
<option value="gb" {% if pipeline_settings.queue_max_bytes_unit == 'gb' %}selected{% endif %}>GB</option>
|
|
1197
|
+
<option value="tb" {% if pipeline_settings.queue_max_bytes_unit == 'tb' %}selected{% endif %}>TB</option>
|
|
1198
|
+
<option value="pb" {% if pipeline_settings.queue_max_bytes_unit == 'pb' %}selected{% endif %}>PB</option>
|
|
1199
|
+
</select>
|
|
1200
|
+
</div>
|
|
1201
|
+
</div>
|
|
1202
|
+
|
|
1203
|
+
<!-- Queue Checkpoint Writes -->
|
|
1204
|
+
<div class="pb-2">
|
|
1205
|
+
<label for="queueCheckpointWrites" class="block text-sm font-medium text-gray-300 mb-2">
|
|
1206
|
+
Queue Checkpoint Writes
|
|
1207
|
+
</label>
|
|
1208
|
+
<input
|
|
1209
|
+
type="number"
|
|
1210
|
+
id="queueCheckpointWrites"
|
|
1211
|
+
name="queue_checkpoint_writes"
|
|
1212
|
+
min="1"
|
|
1213
|
+
class="w-full px-4 py-2 bg-gray-700 border border-gray-600 rounded-lg text-white placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"
|
|
1214
|
+
placeholder="Checkpoint writes"
|
|
1215
|
+
value="{{ pipeline_settings.queue_checkpoint_writes|default:1024 }}">
|
|
1216
|
+
</div>
|
|
1217
|
+
</div>
|
|
1218
|
+
|
|
1219
|
+
<!-- Action Buttons -->
|
|
1220
|
+
<div class="flex justify-end pt-4 border-t border-gray-700">
|
|
1221
|
+
<button
|
|
1222
|
+
type="submit"
|
|
1223
|
+
id="applySettingsBtn"
|
|
1224
|
+
class="px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors">
|
|
1225
|
+
Apply Settings
|
|
1226
|
+
</button>
|
|
1227
|
+
</div>
|
|
1228
|
+
</form>
|
|
1229
|
+
</div>
|
|
1230
|
+
</div>
|
|
1231
|
+
</div>
|
|
1232
|
+
|
|
1233
|
+
<div class="flex h-[calc(100vh-180px)] gap-4">
|
|
1234
|
+
<!-- Main Content Area -->
|
|
1235
|
+
<div class="flex-1">
|
|
1236
|
+
<!-- UI Mode Container -->
|
|
1237
|
+
<div id="uiModeContainer" class="flex-1 bg-gray-800 rounded-lg p-6 overflow-y-auto">
|
|
1238
|
+
<div id="pipelineCanvas" class="min-h-full space-y-8">
|
|
1239
|
+
<!-- Input Section -->
|
|
1240
|
+
<div id="inputSection" class="p-4 bg-gray-700 rounded-lg border-l-4 border-blue-500">
|
|
1241
|
+
<button type="button"
|
|
1242
|
+
class="pipeline-section-header flex items-center w-full mb-4 text-left"
|
|
1243
|
+
aria-expanded="true" aria-controls="inputComponents"
|
|
1244
|
+
onclick="togglePipelineSection('inputSection')">
|
|
1245
|
+
<span class="flex items-center justify-center w-10 h-10 bg-blue-600 rounded-lg">
|
|
1246
|
+
<svg class="w-6 h-6 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
1247
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
|
1248
|
+
d="M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"/>
|
|
1249
|
+
</svg>
|
|
1250
|
+
</span>
|
|
1251
|
+
<span class="ml-6" style="margin-left:10px;">
|
|
1252
|
+
<span class="block text-xl font-bold text-white">Input</span>
|
|
1253
|
+
<span class="block text-xs text-gray-400">Define data sources and how data enters the
|
|
1254
|
+
pipeline</span>
|
|
1255
|
+
</span>
|
|
1256
|
+
<svg class="pipeline-section-chevron w-5 h-5 ml-auto text-gray-300" fill="none" stroke="currentColor" viewBox="0 0 24 24" aria-hidden="true">
|
|
1257
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m5 9 7 7 7-7"/>
|
|
1258
|
+
</svg>
|
|
1259
|
+
</button>
|
|
1260
|
+
<div id="inputComponents"
|
|
1261
|
+
class="component-container min-h-32 p-4 bg-gray-800 rounded border-2 border-dashed border-gray-600 empty-section"
|
|
1262
|
+
data-type="input">
|
|
1263
|
+
<div class="insertion-point">
|
|
1264
|
+
<div class="insertion-buttons">
|
|
1265
|
+
<button class="insertion-button add-plugin" data-type="input">
|
|
1266
|
+
<svg class="w-3 h-3 mr-1" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
1267
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
|
1268
|
+
d="M12 6v6m0 0v6m0-6h6m-6 0H6"/>
|
|
1269
|
+
</svg>
|
|
1270
|
+
Add Plugin
|
|
1271
|
+
</button>
|
|
1272
|
+
</div>
|
|
1273
|
+
</div>
|
|
1274
|
+
<p class="text-gray-400 text-center py-8">No input components added</p>
|
|
1275
|
+
</div>
|
|
1276
|
+
</div>
|
|
1277
|
+
|
|
1278
|
+
<!-- Filter Section -->
|
|
1279
|
+
<div id="filterSection" class="p-4 bg-gray-700 rounded-lg border-l-4 border-purple-600">
|
|
1280
|
+
<button type="button"
|
|
1281
|
+
class="pipeline-section-header flex items-center w-full mb-4 text-left"
|
|
1282
|
+
aria-expanded="true" aria-controls="filterComponents"
|
|
1283
|
+
onclick="togglePipelineSection('filterSection')">
|
|
1284
|
+
<span class="flex items-center justify-center w-10 h-10 bg-purple-600 rounded-lg">
|
|
1285
|
+
<svg class="w-6 h-6 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
1286
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
|
1287
|
+
d="M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"/>
|
|
1288
|
+
</svg>
|
|
1289
|
+
</span>
|
|
1290
|
+
<span class="ml-6">
|
|
1291
|
+
<span class="block text-xl font-bold text-white">Filter</span>
|
|
1292
|
+
<span class="block text-xs text-gray-400">Transform, enrich, and process data with conditions</span>
|
|
1293
|
+
</span>
|
|
1294
|
+
<svg class="pipeline-section-chevron w-5 h-5 ml-auto text-gray-300" fill="none" stroke="currentColor" viewBox="0 0 24 24" aria-hidden="true">
|
|
1295
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m5 9 7 7 7-7"/>
|
|
1296
|
+
</svg>
|
|
1297
|
+
</button>
|
|
1298
|
+
<div id="filterComponents"
|
|
1299
|
+
class="component-container min-h-32 p-4 bg-gray-800 rounded border-2 border-dashed border-gray-600 empty-section"
|
|
1300
|
+
data-type="filter">
|
|
1301
|
+
<div class="insertion-point">
|
|
1302
|
+
<div class="insertion-buttons">
|
|
1303
|
+
<button class="insertion-button add-plugin" data-type="filter">
|
|
1304
|
+
<svg class="w-3 h-3 mr-1" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
1305
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
|
1306
|
+
d="M12 6v6m0 0v6m0-6h6m-6 0H6"/>
|
|
1307
|
+
</svg>
|
|
1308
|
+
Add Plugin
|
|
1309
|
+
</button>
|
|
1310
|
+
<button class="insertion-button add-condition" data-type="filter">
|
|
1311
|
+
<svg class="w-3 h-3 mr-1" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
1312
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
|
1313
|
+
d="M19 9l-7 7-7-7"/>
|
|
1314
|
+
</svg>
|
|
1315
|
+
Add Condition
|
|
1316
|
+
</button>
|
|
1317
|
+
</div>
|
|
1318
|
+
</div>
|
|
1319
|
+
<p class="text-gray-400 text-center py-8">No filter components added</p>
|
|
1320
|
+
</div>
|
|
1321
|
+
</div>
|
|
1322
|
+
|
|
1323
|
+
<!-- Output Section -->
|
|
1324
|
+
<div id="outputSection" class="p-4 bg-gray-700 rounded-lg border-l-4 border-green-500">
|
|
1325
|
+
<button type="button"
|
|
1326
|
+
class="pipeline-section-header flex items-center w-full mb-4 text-left"
|
|
1327
|
+
aria-expanded="true" aria-controls="outputComponents"
|
|
1328
|
+
onclick="togglePipelineSection('outputSection')">
|
|
1329
|
+
<span class="flex items-center justify-center w-10 h-10 bg-green-600 rounded-lg">
|
|
1330
|
+
<svg class="w-6 h-6 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
1331
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
|
1332
|
+
d="M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M9 19l3 3m0 0l3-3m-3 3V10"/>
|
|
1333
|
+
</svg>
|
|
1334
|
+
</span>
|
|
1335
|
+
<span class="ml-6" style="margin-left:10px;">
|
|
1336
|
+
<span class="block text-xl font-bold text-white">Output</span>
|
|
1337
|
+
<span class="block text-xs text-gray-400">Send processed data to destinations</span>
|
|
1338
|
+
</span>
|
|
1339
|
+
<svg class="pipeline-section-chevron w-5 h-5 ml-auto text-gray-300" fill="none" stroke="currentColor" viewBox="0 0 24 24" aria-hidden="true">
|
|
1340
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m5 9 7 7 7-7"/>
|
|
1341
|
+
</svg>
|
|
1342
|
+
</button>
|
|
1343
|
+
<div id="outputComponents"
|
|
1344
|
+
class="component-container min-h-32 p-4 bg-gray-800 rounded border-2 border-dashed border-gray-600 empty-section"
|
|
1345
|
+
data-type="output">
|
|
1346
|
+
<div class="insertion-point">
|
|
1347
|
+
<div class="insertion-buttons">
|
|
1348
|
+
<button class="insertion-button add-plugin" data-type="output">
|
|
1349
|
+
<svg class="w-3 h-3 mr-1" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
1350
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
|
1351
|
+
d="M12 6v6m0 0v6m0-6h6m-6 0H6"/>
|
|
1352
|
+
</svg>
|
|
1353
|
+
Add Plugin
|
|
1354
|
+
</button>
|
|
1355
|
+
<button class="insertion-button add-condition" data-type="output">
|
|
1356
|
+
<svg class="w-3 h-3 mr-1" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
1357
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
|
1358
|
+
d="M19 9l-7 7-7-7"/>
|
|
1359
|
+
</svg>
|
|
1360
|
+
Add Condition
|
|
1361
|
+
</button>
|
|
1362
|
+
</div>
|
|
1363
|
+
</div>
|
|
1364
|
+
<p class="text-gray-400 text-center py-8">No output components added</p>
|
|
1365
|
+
</div>
|
|
1366
|
+
</div>
|
|
1367
|
+
</div>
|
|
1368
|
+
</div>
|
|
1369
|
+
|
|
1370
|
+
<!-- Text Mode Container (hidden by default) -->
|
|
1371
|
+
<div id="textModeContainer" class="hidden flex-1 bg-gray-800 rounded-lg overflow-hidden">
|
|
1372
|
+
{% include 'pipeline_text_editor.html' %}
|
|
1373
|
+
</div>
|
|
1374
|
+
|
|
1375
|
+
<!-- Graph Mode Container (hidden by default) -->
|
|
1376
|
+
<div id="graphModeContainer" class="hidden flex-1 bg-gray-800 rounded-lg overflow-hidden">
|
|
1377
|
+
{% include 'pipeline_graph_editor.html' %}
|
|
1378
|
+
</div>
|
|
1379
|
+
</div>
|
|
1380
|
+
</div>
|
|
1381
|
+
</div>
|
|
1382
|
+
|
|
1383
|
+
<!-- Floating Simulate Subset and Clear Buttons -->
|
|
1384
|
+
<div id="simulateSubsetContainer" class="hidden fixed bottom-30px right-30px z-40 flex gap-3">
|
|
1385
|
+
<button id="clearSelectionsBtn"
|
|
1386
|
+
class="px-6 py-3 bg-gray-600 text-white rounded-lg hover:bg-gray-700 flex items-center gap-2 font-semibold"
|
|
1387
|
+
onclick="clearAllSelections()">
|
|
1388
|
+
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
1389
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" />
|
|
1390
|
+
</svg>
|
|
1391
|
+
<span>Clear</span>
|
|
1392
|
+
</button>
|
|
1393
|
+
<button id="simulateSubsetBtn"
|
|
1394
|
+
class="px-6 py-3 bg-purple-600 text-white rounded-lg hover:bg-purple-700 flex items-center gap-3 font-semibold"
|
|
1395
|
+
onclick="openSimulateSubsetModal()">
|
|
1396
|
+
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
1397
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z" />
|
|
1398
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
|
|
1399
|
+
</svg>
|
|
1400
|
+
<span>Simulate Subset</span>
|
|
1401
|
+
<span id="selectedCount" class="px-2 py-0.5 bg-purple-800 rounded-full text-xs">0</span>
|
|
1402
|
+
</button>
|
|
1403
|
+
</div>
|
|
1404
|
+
|
|
1405
|
+
<!--- Simulation modal -->
|
|
1406
|
+
{% include 'components/pipeline_editor/simulation_modal.html' %}
|
|
1407
|
+
|
|
1408
|
+
<!-- Add Plugin Modal -->
|
|
1409
|
+
{% include 'components/pipeline_editor/plugin_modal.html' %}
|
|
1410
|
+
|
|
1411
|
+
<!-- Add Plugin Config Modal -->
|
|
1412
|
+
{% include 'components/pipeline_editor/plugin_config_modal.html' %}
|
|
1413
|
+
|
|
1414
|
+
<!-- Expression Editor Modal -->
|
|
1415
|
+
{% include 'components/pipeline_editor/expression_editor.html' %}
|
|
1416
|
+
|
|
1417
|
+
<!--- Diff modal -->
|
|
1418
|
+
{% include 'components/pipeline_editor/diff_modal.html' %}
|
|
1419
|
+
|
|
1420
|
+
<!-- Confirmation Modal -->
|
|
1421
|
+
{% include 'popup.html' %}
|
|
1422
|
+
|
|
1423
|
+
<!-- Slot preallocation - warm up a slot when page loads so simulations are fast -->
|
|
1424
|
+
<!-- Empty log_text means only allocate slot, don't run simulation -->
|
|
1425
|
+
<!-- Prealloc on load whenever any sim target exists (see sim_prealloc_on_load) -->
|
|
1426
|
+
<div id="slotPreallocation"
|
|
1427
|
+
hx-post="/ConnectionManager/SimulatePipeline/"
|
|
1428
|
+
hx-target="#slotPreallocationResult"
|
|
1429
|
+
hx-swap="innerHTML"
|
|
1430
|
+
hx-vals="js:simConnectionHtmxValues({components: components, log_text: ''})"
|
|
1431
|
+
hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'
|
|
1432
|
+
hx-timeout="130000"
|
|
1433
|
+
hx-trigger="{% if sim_prealloc_on_load %}load, pipelineChanged{% else %}none{% endif %}"
|
|
1434
|
+
class="hidden">
|
|
1435
|
+
</div>
|
|
1436
|
+
<div id="slotPreallocationResult" class="hidden"></div>
|
|
1437
|
+
|
|
1438
|
+
<style>
|
|
1439
|
+
.simulation-panel {
|
|
1440
|
+
position: relative; display: flex; align-items: center; gap: 6px;
|
|
1441
|
+
min-width: 0; width: fit-content; max-width: 100%; height: 44px;
|
|
1442
|
+
padding: 4px 10px 4px 4px;
|
|
1443
|
+
}
|
|
1444
|
+
.simulation-target-wrap {
|
|
1445
|
+
display: flex; align-items: center; gap: 7px; height: 34px;
|
|
1446
|
+
padding-right: 9px; border-right: 1px solid #52606f;
|
|
1447
|
+
}
|
|
1448
|
+
.simulation-target-icon {
|
|
1449
|
+
display: inline-flex; align-items: center; justify-content: center;
|
|
1450
|
+
width: 30px; height: 30px; flex-shrink: 0; border-radius: 7px;
|
|
1451
|
+
color: #60a5fa; background: #193a5c;
|
|
1452
|
+
}
|
|
1453
|
+
.simulation-target-fields {
|
|
1454
|
+
display: flex; flex-direction: column; align-items: stretch; gap: 1px;
|
|
1455
|
+
}
|
|
1456
|
+
.simulation-target-fields label {
|
|
1457
|
+
color: #a9bacb; font-size: 9px; font-weight: 500; line-height: 10px; white-space: nowrap;
|
|
1458
|
+
}
|
|
1459
|
+
#simTargetSelect { width: 10.5rem; min-width: 0; max-width: 10.5rem; height: 23px; padding: 1px 5px; }
|
|
1460
|
+
.simulation-status-detail { position: relative; min-width: 0; border-radius: 5px; }
|
|
1461
|
+
.simulation-status-detail:focus-visible { outline: 2px solid #60a5fa; outline-offset: 2px; }
|
|
1462
|
+
#pipelineLoadStatus { border-radius: 5px; max-width: 100%; height: 28px; padding: 3px 5px; }
|
|
1463
|
+
.simulation-status-tooltip {
|
|
1464
|
+
display: none; position: absolute; top: 100%; left: 0; z-index: 60;
|
|
1465
|
+
width: max-content; max-width: min(340px, 80vw); padding: 10px 12px;
|
|
1466
|
+
border: 1px solid #526174; border-radius: 7px; background: #18222e;
|
|
1467
|
+
box-shadow: 0 8px 24px #0006; color: #e2e8f0; font-size: 12px; line-height: 1.5;
|
|
1468
|
+
white-space: pre-wrap; overflow-wrap: anywhere;
|
|
1469
|
+
}
|
|
1470
|
+
.simulation-status-detail:hover .simulation-status-tooltip,
|
|
1471
|
+
.simulation-status-detail:focus-within .simulation-status-tooltip { display: block; }
|
|
1472
|
+
.simulation-status-detail.sim-detail-dismissed .simulation-status-tooltip { display: none; }
|
|
1473
|
+
.simulation-logs { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; }
|
|
1474
|
+
.editor-toolbar {
|
|
1475
|
+
container: editor-toolbar / inline-size;
|
|
1476
|
+
column-gap: 24px; row-gap: 8px; width: 100%; padding: 6px 0;
|
|
1477
|
+
}
|
|
1478
|
+
.editor-mode-switcher { height: 44px; }
|
|
1479
|
+
.editor-actions { min-width: 0; height: 44px; }
|
|
1480
|
+
.editor-action-form { height: 44px; }
|
|
1481
|
+
#viewCode,
|
|
1482
|
+
#simulatePipeline,
|
|
1483
|
+
#savePipeline {
|
|
1484
|
+
height: 36px; padding-top: 0; padding-bottom: 0;
|
|
1485
|
+
font-size: 13px; font-weight: 500;
|
|
1486
|
+
}
|
|
1487
|
+
#viewCode,
|
|
1488
|
+
#simulatePipeline { width: 120px; }
|
|
1489
|
+
#savePipeline { width: 136px; }
|
|
1490
|
+
#uiModeBtn,
|
|
1491
|
+
#textModeBtn,
|
|
1492
|
+
#graphModeBtn {
|
|
1493
|
+
display: inline-flex; align-items: center; justify-content: center;
|
|
1494
|
+
gap: 6px; width: 68px; height: 36px; padding: 4px 7px; border: 1px solid transparent;
|
|
1495
|
+
font-size: 11px; line-height: 13px;
|
|
1496
|
+
}
|
|
1497
|
+
.editor-mode-icon { width: 16px; height: 16px; flex-shrink: 0; }
|
|
1498
|
+
.editor-mode-switcher .mode-toggle-active {
|
|
1499
|
+
animation: none; background: #16a34a;
|
|
1500
|
+
border: 1px solid rgba(74, 222, 128, 0.6);
|
|
1501
|
+
box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.18), 0 3px 10px rgba(0, 0, 0, 0.28);
|
|
1502
|
+
}
|
|
1503
|
+
@container editor-toolbar (max-width: 1050px) {
|
|
1504
|
+
.simulation-status-label,
|
|
1505
|
+
#pipelineStatusMessage,
|
|
1506
|
+
.editor-mode-label,
|
|
1507
|
+
.editor-action-label { display: none; }
|
|
1508
|
+
#agentStatus,
|
|
1509
|
+
#logstashState,
|
|
1510
|
+
#pipelineLoadStatus {
|
|
1511
|
+
justify-content: center; width: 28px; min-width: 28px; padding-left: 0; padding-right: 0; gap: 0;
|
|
1512
|
+
}
|
|
1513
|
+
#uiModeBtn,
|
|
1514
|
+
#textModeBtn,
|
|
1515
|
+
#graphModeBtn,
|
|
1516
|
+
#viewCode,
|
|
1517
|
+
#simulatePipeline,
|
|
1518
|
+
#savePipeline { width: 36px; padding-left: 0; padding-right: 0; gap: 0; }
|
|
1519
|
+
.editor-mode-switcher,
|
|
1520
|
+
.editor-action-form { gap: 4px; }
|
|
1521
|
+
}
|
|
1522
|
+
@media (max-width: 1279px) {
|
|
1523
|
+
.editor-toolbar {
|
|
1524
|
+
grid-template-columns: minmax(0, 1fr) auto auto;
|
|
1525
|
+
}
|
|
1526
|
+
}
|
|
1527
|
+
@media (max-width: 760px) {
|
|
1528
|
+
.editor-toolbar { grid-template-columns: 1fr; justify-items: center; padding: 10px 0; }
|
|
1529
|
+
.editor-actions { height: auto; }
|
|
1530
|
+
}
|
|
1531
|
+
@media (max-width: 480px) {
|
|
1532
|
+
.simulation-panel { gap: 3px; padding-inline: 4px; }
|
|
1533
|
+
.simulation-target-wrap { gap: 4px; padding-right: 4px; }
|
|
1534
|
+
.simulation-target-icon { width: 26px; height: 26px; }
|
|
1535
|
+
#simTargetSelect { width: 8.5rem; max-width: 8.5rem; }
|
|
1536
|
+
}
|
|
1537
|
+
/* Screen-reader-only status text (icon lights use title tooltips) */
|
|
1538
|
+
.sr-only {
|
|
1539
|
+
position: absolute;
|
|
1540
|
+
width: 1px;
|
|
1541
|
+
height: 1px;
|
|
1542
|
+
padding: 0;
|
|
1543
|
+
margin: -1px;
|
|
1544
|
+
overflow: hidden;
|
|
1545
|
+
clip: rect(0, 0, 0, 0);
|
|
1546
|
+
white-space: nowrap;
|
|
1547
|
+
border: 0;
|
|
1548
|
+
}
|
|
1549
|
+
.sim-status-light { flex-shrink: 0; cursor: default; }
|
|
1550
|
+
</style>
|
|
1551
|
+
|
|
1552
|
+
<script>
|
|
1553
|
+
// Mirror existing messages, including slot updates from all simulation paths.
|
|
1554
|
+
document.querySelectorAll('.simulation-status-detail').forEach(wrapper => {
|
|
1555
|
+
const status = wrapper.querySelector('[title]');
|
|
1556
|
+
const tooltip = wrapper.querySelector('[role="tooltip"]');
|
|
1557
|
+
const syncDetail = () => { tooltip.textContent = status.title; };
|
|
1558
|
+
syncDetail();
|
|
1559
|
+
new MutationObserver(syncDetail).observe(status, { attributes: true, attributeFilter: ['title'] });
|
|
1560
|
+
wrapper.addEventListener('keydown', event => {
|
|
1561
|
+
if (event.key === 'Escape') wrapper.classList.add('sim-detail-dismissed');
|
|
1562
|
+
});
|
|
1563
|
+
['mouseenter', 'focusin', 'click'].forEach(type => {
|
|
1564
|
+
wrapper.addEventListener(type, () => wrapper.classList.remove('sim-detail-dismissed'));
|
|
1565
|
+
});
|
|
1566
|
+
});
|
|
1567
|
+
const pipelineName = "{{ pipeline_name }}";
|
|
1568
|
+
// Mutable so Sim target picker can switch embedded ↔ simulate without reload
|
|
1569
|
+
var simulationMode = "{{ simulation_mode }}";
|
|
1570
|
+
window.simulationMode = simulationMode;
|
|
1571
|
+
window.__simConnectionId = {% if selected_sim_connection_id %}{{ selected_sim_connection_id }}{% else %}null{% endif %};
|
|
1572
|
+
// currentSlotId is declared in the early script block above
|
|
1573
|
+
|
|
1574
|
+
// Store original pipeline text for Text mode
|
|
1575
|
+
originalPipelineText = "{{ pipeline_text|escapejs }}";
|
|
1576
|
+
|
|
1577
|
+
// Set up change tracking for UI mode
|
|
1578
|
+
// Track when components are added, modified, or deleted
|
|
1579
|
+
function markUIAsChanged() {
|
|
1580
|
+
if (!uiHasChanges) {
|
|
1581
|
+
uiHasChanges = true;
|
|
1582
|
+
}
|
|
1583
|
+
}
|
|
1584
|
+
|
|
1585
|
+
// Listen for component changes via HTMX events
|
|
1586
|
+
document.body.addEventListener('htmx:afterSwap', function(event) {
|
|
1587
|
+
// Check if the swap was related to component modifications
|
|
1588
|
+
if (event.detail.target && (
|
|
1589
|
+
event.detail.target.id === 'uiModeContainer' ||
|
|
1590
|
+
event.detail.target.closest('#uiModeContainer')
|
|
1591
|
+
)) {
|
|
1592
|
+
markUIAsChanged();
|
|
1593
|
+
}
|
|
1594
|
+
});
|
|
1595
|
+
|
|
1596
|
+
// Listen for component additions/deletions
|
|
1597
|
+
document.body.addEventListener('componentAdded', markUIAsChanged);
|
|
1598
|
+
document.body.addEventListener('componentDeleted', markUIAsChanged);
|
|
1599
|
+
document.body.addEventListener('componentModified', markUIAsChanged);
|
|
1600
|
+
|
|
1601
|
+
// Auto-switch to Text mode if parsing error is present
|
|
1602
|
+
// Wait for all scripts to load before attempting to switch modes
|
|
1603
|
+
window.addEventListener('load', function() {
|
|
1604
|
+
const parsingErrorBanner = document.getElementById('parsingErrorBanner');
|
|
1605
|
+
if (parsingErrorBanner) {
|
|
1606
|
+
// Parsing error detected - automatically switch to Text mode
|
|
1607
|
+
if (typeof switchToTextMode === 'function') {
|
|
1608
|
+
switchToTextMode();
|
|
1609
|
+
} else {
|
|
1610
|
+
console.error('switchToTextMode function not available');
|
|
1611
|
+
}
|
|
1612
|
+
}
|
|
1613
|
+
});
|
|
1614
|
+
|
|
1615
|
+
// Check if there are any filter components
|
|
1616
|
+
const hasFilters = components && components.filter && components.filter.length > 0;
|
|
1617
|
+
|
|
1618
|
+
// Hide status banner and skip preallocation if no filters
|
|
1619
|
+
if (!hasFilters) {
|
|
1620
|
+
const statusBanner = document.getElementById('pipelineLoadStatus');
|
|
1621
|
+
if (statusBanner) {
|
|
1622
|
+
statusBanner.style.display = 'none';
|
|
1623
|
+
}
|
|
1624
|
+
|
|
1625
|
+
// Prevent slot preallocation by removing the hx-trigger
|
|
1626
|
+
const slotPreallocation = document.getElementById('slotPreallocation');
|
|
1627
|
+
if (slotPreallocation) {
|
|
1628
|
+
slotPreallocation.removeAttribute('hx-trigger');
|
|
1629
|
+
}
|
|
1630
|
+
}
|
|
1631
|
+
|
|
1632
|
+
/**
|
|
1633
|
+
* View logs for the current pipeline slot
|
|
1634
|
+
*/
|
|
1635
|
+
async function viewPipelineLogs() {
|
|
1636
|
+
if (!currentSlotId) {
|
|
1637
|
+
console.error('No slot ID available for logs');
|
|
1638
|
+
await ConfirmationModal.show(
|
|
1639
|
+
'Unable to fetch logs - slot information not available',
|
|
1640
|
+
'Pipeline Logs',
|
|
1641
|
+
'OK',
|
|
1642
|
+
null,
|
|
1643
|
+
true
|
|
1644
|
+
);
|
|
1645
|
+
return;
|
|
1646
|
+
}
|
|
1647
|
+
|
|
1648
|
+
// Create modal
|
|
1649
|
+
const modal = document.createElement('div');
|
|
1650
|
+
modal.id = 'pipeline-logs-modal';
|
|
1651
|
+
modal.className = 'fixed inset-0 flex items-center justify-center z-[60] p-4';
|
|
1652
|
+
modal.innerHTML = `
|
|
1653
|
+
<div class="absolute inset-0 bg-black/50 backdrop-blur-sm" onclick="document.getElementById('pipeline-logs-modal').remove()"></div>
|
|
1654
|
+
<div class="bg-gray-800 rounded-lg w-full max-w-6xl max-h-[90vh] flex flex-col relative z-10 border border-gray-700">
|
|
1655
|
+
<div class="p-4 border-b border-gray-700 flex justify-between items-center">
|
|
1656
|
+
<h3 class="text-lg font-semibold text-white">Pipeline Logs - slot${currentSlotId}-filter1</h3>
|
|
1657
|
+
<button onclick="document.getElementById('pipeline-logs-modal').remove()" class="text-gray-400 hover:text-white">
|
|
1658
|
+
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
1659
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path>
|
|
1660
|
+
</svg>
|
|
1661
|
+
</button>
|
|
1662
|
+
</div>
|
|
1663
|
+
<div class="p-6 overflow-y-auto flex-grow">
|
|
1664
|
+
<div id="pipeline-logs-content" class="bg-gray-900 rounded-lg p-4 font-mono text-sm text-gray-300">
|
|
1665
|
+
<div class="flex items-center justify-center py-8">
|
|
1666
|
+
<div class="animate-spin rounded-full h-8 w-8 border-b-2 border-blue-400"></div>
|
|
1667
|
+
<span class="ml-3">Loading logs...</span>
|
|
1668
|
+
</div>
|
|
1669
|
+
</div>
|
|
1670
|
+
</div>
|
|
1671
|
+
</div>
|
|
1672
|
+
`;
|
|
1673
|
+
|
|
1674
|
+
document.body.appendChild(modal);
|
|
1675
|
+
|
|
1676
|
+
// Fetch logs from API (include sim target for multi-agent routing)
|
|
1677
|
+
try {
|
|
1678
|
+
let logsUrl = `/ConnectionManager/GetRelatedLogs/?slot_id=${currentSlotId}&max_entries=100&min_level=INFO`;
|
|
1679
|
+
if (typeof window.getSimConnectionId === 'function' && window.getSimConnectionId()) {
|
|
1680
|
+
logsUrl += `&sim_connection_id=${encodeURIComponent(window.getSimConnectionId())}`;
|
|
1681
|
+
}
|
|
1682
|
+
const response = await fetch(logsUrl);
|
|
1683
|
+
const data = await response.json();
|
|
1684
|
+
|
|
1685
|
+
const logsContent = document.getElementById('pipeline-logs-content');
|
|
1686
|
+
|
|
1687
|
+
if (data.error) {
|
|
1688
|
+
logsContent.innerHTML = `<div class="text-red-400">Error fetching logs: ${data.error}</div>`;
|
|
1689
|
+
return;
|
|
1690
|
+
}
|
|
1691
|
+
|
|
1692
|
+
if (!data.logs || data.logs.length === 0) {
|
|
1693
|
+
logsContent.innerHTML = '<div class="text-yellow-400">No logs found for this pipeline. Clean runs often have no INFO-level entries.</div>';
|
|
1694
|
+
return;
|
|
1695
|
+
}
|
|
1696
|
+
|
|
1697
|
+
let html = `<div class="text-green-400 mb-4">Found ${data.log_count} log entries - Time shown in UTC</div>`;
|
|
1698
|
+
|
|
1699
|
+
data.logs.forEach((log, idx) => {
|
|
1700
|
+
const level = log.level || 'INFO';
|
|
1701
|
+
const levelColor = {
|
|
1702
|
+
'ERROR': 'text-red-400',
|
|
1703
|
+
'WARN': 'text-yellow-400',
|
|
1704
|
+
'INFO': 'text-blue-400',
|
|
1705
|
+
'DEBUG': 'text-gray-400'
|
|
1706
|
+
}[level] || 'text-gray-400';
|
|
1707
|
+
|
|
1708
|
+
const timestamp = log.timeMillis ? new Date(log.timeMillis).toISOString() : 'N/A';
|
|
1709
|
+
const logEvent = log.logEvent || {};
|
|
1710
|
+
const message = logEvent.message || log.message || 'No message';
|
|
1711
|
+
const logger = log.loggerName || 'unknown';
|
|
1712
|
+
|
|
1713
|
+
html += `
|
|
1714
|
+
<div class="mb-4 pb-4 border-b border-gray-700">
|
|
1715
|
+
<div class="flex items-center gap-3 mb-2">
|
|
1716
|
+
<span class="${levelColor} font-bold">[${level}]</span>
|
|
1717
|
+
<span class="text-gray-500 text-xs">${timestamp}</span>
|
|
1718
|
+
<span class="text-gray-400 text-xs">${logger}</span>
|
|
1719
|
+
</div>
|
|
1720
|
+
<div class="text-gray-200 mb-2">${escapeHtml(message)}</div>
|
|
1721
|
+
<details class="text-xs">
|
|
1722
|
+
<summary class="cursor-pointer text-blue-400 hover:text-blue-300">View full log entry</summary>
|
|
1723
|
+
<pre class="mt-2 p-2 bg-gray-950 rounded overflow-x-auto">${JSON.stringify(log, null, 2)}</pre>
|
|
1724
|
+
</details>
|
|
1725
|
+
</div>
|
|
1726
|
+
`;
|
|
1727
|
+
});
|
|
1728
|
+
|
|
1729
|
+
logsContent.innerHTML = html;
|
|
1730
|
+
} catch (error) {
|
|
1731
|
+
const logsContent = document.getElementById('pipeline-logs-content');
|
|
1732
|
+
logsContent.innerHTML = `<div class="text-red-400">Error fetching logs: ${error.message}</div>`;
|
|
1733
|
+
}
|
|
1734
|
+
}
|
|
1735
|
+
|
|
1736
|
+
</script>
|
|
1737
|
+
|
|
1738
|
+
{% endblock %}
|