diff --git a/NOTICE.txt b/NOTICE.txt
index 981113a3..974e4d85 100644
--- a/NOTICE.txt
+++ b/NOTICE.txt
@@ -1,5 +1,5 @@
Media Services Application Mapper
-Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
+Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
Licensed under the Apache License Version 2.0 (the "License"). You may not use this file except
in compliance with the License. A copy of the License is located at http://www.apache.org/licenses/
or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS,
diff --git a/deployment/deploy.sh b/deployment/deploy.sh
index 5e499ff5..727dca0e 100755
--- a/deployment/deploy.sh
+++ b/deployment/deploy.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-# 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
set -euo pipefail
diff --git a/deployment/requirements.txt b/deployment/requirements.txt
index edebace1..5271d5e0 100644
--- a/deployment/requirements.txt
+++ b/deployment/requirements.txt
@@ -1,8 +1,8 @@
+chalice
networkx
boto3
botocore
cfn-lint
-chalice
crhelper
defusedxml
fuzzywuzzy
diff --git a/source/events/cloudwatch_alarm.py b/source/events/cloudwatch_alarm.py
index 02279281..e12b57c1 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.
@@ -38,7 +38,6 @@ def lambda_handler(event, _):
region_alarm_name = f"{region}:{alarm_name}"
state = alarm.state_value
- # namespace = alarm.namespace
state_updated = int(alarm.state_updated_timestamp.timestamp())
subscribers = subscribers_to_alarm(region_alarm_name)
diff --git a/source/events/media_events.py b/source/events/media_events.py
index 795d6507..1031a84c 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
@@ -47,17 +47,13 @@ def lambda_handler(event, _):
# remove arn that is for userIdentity or inputSecurityGroup
# note: can't remove an item from a list that's being iterated over so doing it this way
for arn in original_arns:
- if "user" in arn or "role" in arn or "inputSecurityGroup" in arn:
- pass
- else:
+ if not ("user" in arn or "role" in arn or "inputSecurityGroup" in arn):
arns.append(arn)
if arns:
event["resource_arn"] = unquote(arns[0])
# for certain events, the ARN is not labeled as an ARN but instead put in the resources list
- if not arns and event["resources"]:
- if "vod" not in event["resources"][0]:
- event["resource_arn"] = event["resources"][0]
-
+ if not arns and event["resources"] and "vod" not in event["resources"][0]:
+ event["resource_arn"] = event["resources"][0]
# handle alerts
if "Alert" in event["detail-type"]:
# medialive alerts
@@ -110,12 +106,11 @@ def lambda_handler(event, _):
event["resource_arn"] = response["Arn"]
else:
print("Skipping this event. Origin ID not present in the HarvestJob event." + event["type"])
- elif event["source"] == "aws.mediastore":
+ elif event["source"] == "aws.mediastore" and "MediaStore Object State Change" in event["type"]:
# for object state change the resource is the object, not the container
# so the captured arn needs to be fixed
- if "MediaStore Object State Change" in event["type"]:
- temp_arn = event["resource_arn"].split('/')
- event["resource_arn"] = temp_arn[0] + "/" + temp_arn[1]
+ temp_arn = event["resource_arn"].split('/')
+ event["resource_arn"] = temp_arn[0] + "/" + temp_arn[1]
# if item has no resource arn, don't save in DB
if "resource_arn" in event:
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..75a7e8c8 100644
--- a/source/html/index.html
+++ b/source/html/index.html
@@ -19,10 +19,10 @@
+
-
@@ -30,7 +30,11 @@
-
+
+
+
+
+