Skip to content

Commit

Permalink
Update to v1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Ball committed Sep 29, 2020
1 parent 92b1cae commit 3dced55
Show file tree
Hide file tree
Showing 52 changed files with 2,132 additions and 16,628 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,17 @@ All notable changes to this project are documented in this file.
Based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.0.1] - 2020-09-29

- Added 'Save Template' option when importing new accounts and Regions. This removes the need to enable public access objects in the AmplifyStorageBucket
- Altered wording around visibility levels when saving architecture diagrams. 'You' and 'All users' is now used instead of 'public' and 'private'.
- Fixed bug that was causing import configurations to become corrupt when an account or Region was deleted by the UI if a discovery was in progress.
- Fixed bug leading to invalid JSON being generated in CloudFormation templates for importing accounts and Regions.
- Fixed Dependabot issues raised by GitHub
- Fixed bug leading to RestApi icons not being displayed in Firefox.
- Added support for Amazon QLDB Ledgers.
- Updated README.

## [1.0.0] - 2020-09-21

- Initial release
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,11 +157,11 @@ fi
cd deployment
./build-s3-dist.sh $DIST_OUTPUT_BUCKET $SOLUTION_NAME $VERSION $IMAGE_TAG
aws cloudformation package --template-file "global-s3-assets/perspective-setup.template" --s3-bucket "$DIST_OUTPUT_BUCKET" --s3-prefix "${SOLUTION_NAME}/${VERSION}" --output-template-file packaged.template
aws s3 cp packaged.template "s3://${DIST_OUTPUT_BUCKET}-${AWS_REGION}/${SOLUTION_NAME}/${VERSION}/aws-perspective.template"
aws s3 cp packaged.template "s3://${DIST_OUTPUT_BUCKET}/${SOLUTION_NAME}/${VERSION}/aws-perspective.template"
aws s3 cp global-s3-assets s3://${DIST_OUTPUT_BUCKET}-${AWS_REGION}/${SOLUTION_NAME}/${VERSION}/ --recursive --acl bucket-owner-full-control
aws s3 cp regional-s3-assets s3://${DIST_OUTPUT_BUCKET}-${AWS_REGION}/${SOLUTION_NAME}/${VERSION}/ --recursive --acl bucket-owner-full-control
echo "You can now deploy using this template URL https://${DIST_OUTPUT_BUCKET}-${AWS_REGION}.s3.${AWS_REGION}.amazonaws.com/${SOLUTION_NAME}/${VERSION}/aws-perspective.template"
echo "You can now deploy using this template URL https://${DIST_OUTPUT_BUCKET}.s3.${AWS_REGION}.amazonaws.com/${SOLUTION_NAME}/${VERSION}/aws-perspective.template"
```
Expand Down
76 changes: 76 additions & 0 deletions deployment/build-open-source-dist.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
#!/bin/bash
#
# This assumes all of the OS-level configuration has been completed and git repo has already been cloned
#
# This script should be run from the repo's deployment directory
# cd deployment
# ./build-s3-dist.sh solution-name
#
# Paramenters:
# - solution-name: name of the solution for consistency

# Check to see if input has been provided:
if [ -z "$1" ]; then
echo "Please provide the trademark approved solution name for the open source package."
echo "For example: ./build-s3-dist.sh trademarked-solution-name"
exit 1
fi

# Get reference for all important folders
source_template_dir="$PWD"
dist_dir="$source_template_dir/open-source"
dist_template_dir="$dist_dir/deployment"
source_dir="$source_template_dir/../source"

echo "------------------------------------------------------------------------------"
echo "[Init] Clean old open-source folder"
echo "------------------------------------------------------------------------------"
echo "rm -rf $dist_dir"
rm -rf $dist_dir
echo "mkdir -p $dist_dir"
mkdir -p $dist_dir
echo "mkdir -p $dist_template_dir"
mkdir -p $dist_template_dir

# echo "------------------------------------------------------------------------------"
# echo "[Packing] Templates"
# echo "------------------------------------------------------------------------------"
# echo "cp $source_template_dir/cfn/templates/*.yaml $dist_template_dir/"
# cp $source_template_dir/*.yaml $dist_template_dir/
# echo "copy yaml templates and rename"
# cp $source_template_dir/*.yaml $dist_template_dir/
# cd $dist_template_dir
# # aws cloudformation package --template-file "$template" --s3-bucket "$BUCKET" --s3-prefix "${project}/${version}" --output-template-file packaged.template

# # Rename all *.yaml to *.template
# for f in *.yaml; do
# mv -- "$f" "${f%.yaml}.template"
# done

# echo "------------------------------------------------------------------------------"
# echo "[Packing] Build Script"
# echo "------------------------------------------------------------------------------"
# echo "cp $source_template_dir/build-s3-dist.sh $dist_template_dir"
# cp $source_template_dir/build-s3-dist.sh $dist_template_dir
# echo "cp $source_template_dir/run-unit-tests.sh $dist_template_dir"
# cp $source_template_dir/run-unit-tests.sh $dist_template_dir

# echo "------------------------------------------------------------------------------"
# echo "[Packing] Create GitHub (open-source) zip file"
# echo "------------------------------------------------------------------------------"
# echo "cd $dist_dir"
# cd $dist_dir
# echo "zip -q -r9 ../$1.zip *"
# zip -q -r9 ../$1.zip *
# echo "Clean up open-source folder"
# echo "rm -rf *"
# rm -rf *
# echo "mv ../$1.zip ."
# mv ../$1.zip .
# echo "Completed building $1.zip dist"
echo "installing handy little lib called gitzip to create a zip based on our .gitignore"
npm i -g gitzip
echo "moving to root to generate zip file"
cd ../
echo "generating the zip using gitzip and ensuring exclusions are ignored as they do not need to be in GitHub"
gitzip -d $dist_dir/$1.zip -x .taskcat.yml buildspec.yml .viperlight* aws-perspective-params.json taskcat-bucket-management.sh taskcat-buildspec.yaml
File renamed without changes.
2 changes: 0 additions & 2 deletions source/backend/discovery/combined.log

This file was deleted.

3 changes: 2 additions & 1 deletion source/backend/discovery/src/discovery/discovery-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ class DiscoveryService {
"AWS::KMS::Key",
"AWS::CodeBuild::Project",
"AWS::CodePipeline::Pipeline",
"AWS::SQS::Queue"
"AWS::SQS::Queue",
"AWS::QLDB::Ledger"
];

// Scan in all resources in parallel
Expand Down
6 changes: 3 additions & 3 deletions source/backend/functions/api/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,11 @@ Resources:
}
},
{
"Sid": "HttpsOnly"
"Action": "*"
"Sid": "HttpsOnly",
"Action": "*",
"Effect": "Deny",
"Resource": "arn:aws:s3:::${ConfigBucket}/*",
"Principal": '*'
"Principal": "*",
"Condition": {
"Bool": {
"aws:SecureTransport": "false"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,11 @@ Resources:
}
},
{
"Sid": "HttpsOnly"
"Action": "*"
"Sid": "HttpsOnly",
"Action": "*",
"Effect": "Deny",
"Resource": "arn:aws:s3:::${ConfigBucket}/*",
"Principal": '*'
"Principal": "*",
"Condition": {
"Bool": {
"aws:SecureTransport": "false"
Expand Down
10 changes: 5 additions & 5 deletions source/backend/functions/cost-parser/costParser.js
Original file line number Diff line number Diff line change
Expand Up @@ -251,12 +251,12 @@ const getDateThreshold = (lineItems) => {
const mergeRecord = (newRecord, oldRecord) => {
let modified = false;

let dateThreshold = getDateThreshold(oldRecord.lineItems);
//console.log(dateThreshold)
let dateTheshold = getDateThreshold(oldRecord.lineItems);
//console.log(dateTheshold)

newRecord.lineItems.forEach(newElement => {

if (new Date(newElement.startBillingInterval) > dateThreshold) {
if (new Date(newElement.startBillingInterval) > dateTheshold) {
//console.log("adding record");
//console.log(util.inspect(newElement, { depth: 10 }));
oldRecord.lineItems.push(newElement);
Expand All @@ -277,7 +277,7 @@ const handleLineData = (line) => {

addKeyToObject(data, "lineItemId", columns[0]);

let timeInterval = separateDates(columns[1]);
let timeInterval = seperateDates(columns[1]);

addKeyToObject(data, "startBillingInterval", timeInterval[0]);
addKeyToObject(data, "endBillingInterval", timeInterval[1]);
Expand Down Expand Up @@ -332,7 +332,7 @@ const getDayOfYear = (inputDate) => {
return day;
}

const separateDates = (dateString) => {
const seperateDates = (dateString) => {
return dateString.split("/");
}

Expand Down
Loading

0 comments on commit 3dced55

Please sign in to comment.