From 2344c1701d7a53a28fafe2e9ba7ce5dc2e75855e Mon Sep 17 00:00:00 2001 From: Jim Thario Date: Tue, 15 Mar 2022 13:48:52 -0700 Subject: [PATCH 01/10] Update to JavaScript dependencies file --- source/html/package-lock.json | 1 - 1 file changed, 1 deletion(-) diff --git a/source/html/package-lock.json b/source/html/package-lock.json index 7223e918..b1cecaa3 100644 --- a/source/html/package-lock.json +++ b/source/html/package-lock.json @@ -4,7 +4,6 @@ "requires": true, "packages": { "": { - "name": "html", "dependencies": { "@fortawesome/fontawesome-free": "^5.15.4", "bootstrap": "^4.6.1", From 8d30f3a2bb08f306be24a1ab031582977054003d Mon Sep 17 00:00:00 2001 From: Jim Thario Date: Mon, 21 Mar 2022 11:16:21 -0700 Subject: [PATCH 02/10] Rework from RequireJS modules to native JavaScript modules #267 --- source/events/cloudwatch_alarm.py | 2 +- source/events/media_events.py | 2 +- source/html/.eslintrc.json | 26 + source/html/.jshintrc | 4 +- source/html/index.html | 11 +- source/html/js/app.js | 18 - source/html/js/app/alarms.js | 442 ++-- source/html/js/app/api_check.js | 18 +- source/html/js/app/build-tmp.js | 16 +- source/html/js/app/build.js | 16 +- source/html/js/app/channels.js | 302 +-- source/html/js/app/cloudwatch_events.js | 44 +- source/html/js/app/connections.js | 167 +- source/html/js/app/events.js | 237 +- source/html/js/app/main.js | 26 +- .../connections/cloudfront_medialive_input.js | 64 +- .../link_device_medialive_input.js | 64 +- .../mediaconnect_flow_mediaconnect_flow.js | 67 +- .../mediaconnect_flow_medialive_input.js | 69 +- .../connections/medialive_channel_input.js | 62 +- .../medialive_channel_mediaconnect_flow.js | 63 +- .../medialive_channel_mediapackage_channel.js | 112 +- .../medialive_channel_mediastore_container.js | 66 +- .../medialive_channel_multiplex.js | 103 +- .../medialive_channel_s3_bucket.js | 66 +- .../connections/medialive_input_channel.js | 105 +- .../mediapackage_channel_endpoint.js | 72 +- .../mediapackage_endpoint_cloudfront.js | 63 +- ...kage_endpoint_mediatailor_configuration.js | 65 +- .../mediastore_container_cloudfront.js | 62 +- .../mediastore_container_medialive_input.js | 62 +- ...ore_container_mediatailor_configuration.js | 62 +- .../multiplex_mediaconnect_flow.js | 63 +- .../connections/s3_bucket_cloudfront.js | 62 +- .../connections/s3_bucket_medialive_input.js | 62 +- .../s3_bucket_mediatailor_configuration.js | 69 +- .../html/js/app/mappers/connections/speke.js | 62 +- .../connections/user_defined_connection.js | 164 +- source/html/js/app/mappers/mappers.js | 68 + .../html/js/app/mappers/nodes/cloudfront.js | 212 +- source/html/js/app/mappers/nodes/ec2.js | 225 +- .../html/js/app/mappers/nodes/mediaconnect.js | 210 +- source/html/js/app/mappers/nodes/medialive.js | 640 +++--- .../html/js/app/mappers/nodes/mediapackage.js | 392 ++-- .../html/js/app/mappers/nodes/mediastore.js | 197 +- .../html/js/app/mappers/nodes/mediatailor.js | 205 +- source/html/js/app/mappers/nodes/s3.js | 199 +- source/html/js/app/mappers/nodes/speke.js | 199 +- .../app/mappers/nodes/ssm_managed_instance.js | 225 +- .../js/app/mappers/nodes/user_defined_node.js | 197 +- source/html/js/app/model.js | 177 +- source/html/js/app/plugins.js | 51 - source/html/js/app/regions.js | 77 +- source/html/js/app/search.js | 244 +-- source/html/js/app/server.js | 206 +- source/html/js/app/settings.js | 118 +- source/html/js/app/statemachine.js | 512 +++-- source/html/js/app/tools/build_numbers.js | 70 +- source/html/js/app/tools/clear_http.js | 34 +- source/html/js/app/tools/cross_region.js | 71 - source/html/js/app/tools/duplicate_names.js | 36 +- source/html/js/app/ui/alarm_indicators.js | 124 +- source/html/js/app/ui/alarms_menu.js | 451 ++-- source/html/js/app/ui/alert.js | 27 +- source/html/js/app/ui/channels_menu.js | 330 +-- source/html/js/app/ui/confirmation.js | 33 +- source/html/js/app/ui/diagram_factory.js | 993 ++++----- source/html/js/app/ui/diagram_menu.js | 539 ++--- .../js/app/ui/diagram_statemachine_factory.js | 439 ++-- source/html/js/app/ui/diagrams.js | 446 ++-- source/html/js/app/ui/dragdrop.js | 466 ++-- .../html/js/app/ui/event_alert_indicators.js | 469 ++-- source/html/js/app/ui/help_menu.js | 34 +- .../html/js/app/ui/information_compartment.js | 108 +- .../html/js/app/ui/informational_overlays.js | 118 +- source/html/js/app/ui/layout.js | 134 +- source/html/js/app/ui/monitor_view.js | 775 ++++--- source/html/js/app/ui/nodes_menu.js | 177 +- source/html/js/app/ui/overlays/alarms_only.js | 35 +- .../html/js/app/ui/overlays/ec2_instance.js | 69 +- .../js/app/ui/overlays/mediaconnect_flow.js | 93 +- .../js/app/ui/overlays/medialive_channel.js | 78 +- .../js/app/ui/overlays/medialive_multiplex.js | 72 +- .../html/js/app/ui/overlays/overlay_tools.js | 100 +- source/html/js/app/ui/overlays/overlays.js | 16 + .../app/ui/overlays/ssm_managed_instance.js | 68 +- source/html/js/app/ui/search_view.js | 443 ++-- source/html/js/app/ui/selected_item_view.js | 424 ++-- source/html/js/app/ui/settings_menu.js | 679 +++--- source/html/js/app/ui/status_view.js | 90 +- source/html/js/app/ui/svg_node.js | 142 +- source/html/js/app/ui/tile_view.js | 1011 ++++----- source/html/js/app/ui/tools_menu.js | 34 - source/html/js/app/ui/user_defined.js | 423 ++-- source/html/js/app/ui/util.js | 86 +- source/html/js/app/ui/vis_options.js | 287 +-- source/html/js/app/window.js | 6 - source/html/js/lib/jquery.js | 6 - source/html/package-lock.json | 1923 ++++++++++++++++- source/html/package.json | 5 +- source/msam/app.py | 2 +- source/msam/chalicelib/cache.py | 2 +- source/msam/chalicelib/channels.py | 2 +- source/msam/chalicelib/cloudwatch.py | 2 +- source/msam/chalicelib/connections.py | 2 +- source/msam/chalicelib/content.py | 2 +- source/msam/chalicelib/layout.py | 2 +- source/msam/chalicelib/nodes.py | 2 +- source/msam/chalicelib/periodic.py | 2 +- source/msam/chalicelib/settings.py | 2 +- source/msam/chalicelib/tags.py | 2 +- source/msam/db/lambda_function.py | 2 +- source/msam/db/makezip.sh | 2 +- source/tools/autopep8.sh | 2 +- source/tools/delete_disconnected.py | 2 +- source/tools/js-beautify.sh | 2 +- source/tools/jslint-report.sh | 2 +- .../web-cloudformation/cfn_bucket_loader.py | 2 +- source/web-cloudformation/makezip.sh | 2 +- 119 files changed, 10504 insertions(+), 8892 deletions(-) create mode 100644 source/html/.eslintrc.json delete mode 100644 source/html/js/app.js create mode 100644 source/html/js/app/mappers/mappers.js delete mode 100644 source/html/js/app/plugins.js delete mode 100644 source/html/js/app/tools/cross_region.js create mode 100644 source/html/js/app/ui/overlays/overlays.js delete mode 100644 source/html/js/app/ui/tools_menu.js delete mode 100644 source/html/js/app/window.js delete mode 100644 source/html/js/lib/jquery.js diff --git a/source/events/cloudwatch_alarm.py b/source/events/cloudwatch_alarm.py index 02279281..01d7fef7 100644 --- a/source/events/cloudwatch_alarm.py +++ b/source/events/cloudwatch_alarm.py @@ -1,4 +1,4 @@ -# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 """ This Lambda is responsible for receiving and storing CloudWatch alarm events. diff --git a/source/events/media_events.py b/source/events/media_events.py index 795d6507..7e079b0c 100644 --- a/source/events/media_events.py +++ b/source/events/media_events.py @@ -1,4 +1,4 @@ -# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 """ This Lambda is responsible for receiving and storing CloudWatch events diff --git a/source/html/.eslintrc.json b/source/html/.eslintrc.json new file mode 100644 index 00000000..19edaa16 --- /dev/null +++ b/source/html/.eslintrc.json @@ -0,0 +1,26 @@ +{ + "env": { + "browser": true, + "es2021": true, + "jquery": true + }, + "extends": "eslint:recommended", + "parserOptions": { + "ecmaVersion": "latest", + "sourceType": "module" + }, + "rules": {}, + "globals": { + "_": true, + "Cookies": true, + "Fuse": true, + "machina": true, + "moment": true, + "objectHash": true, + "renderjson": true, + "SVG": true, + "Tabulator": true, + "URI": true, + "vis": true + } +} \ No newline at end of file diff --git a/source/html/.jshintrc b/source/html/.jshintrc index 5a909d61..0402be4a 100644 --- a/source/html/.jshintrc +++ b/source/html/.jshintrc @@ -1,7 +1,7 @@ { - "esversion": 8, + "esversion": 11, "browser": true, - "loopfunc": false, + "loopfunc": true, "globals": { "console": true, "define": true, diff --git a/source/html/index.html b/source/html/index.html index 7ea71d5b..74e03f60 100644 --- a/source/html/index.html +++ b/source/html/index.html @@ -19,6 +19,7 @@ + @@ -30,7 +31,11 @@ - + + + + +