Skip to content
This repository has been archived by the owner on Dec 6, 2024. It is now read-only.

Commit

Permalink
Merge 5e3218c into mainline
Browse files Browse the repository at this point in the history
  • Loading branch information
rsmayda authored Mar 13, 2021
2 parents 8367e49 + 5e3218c commit 4b5928e
Show file tree
Hide file tree
Showing 315 changed files with 33,434 additions and 2,637 deletions.
3 changes: 2 additions & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ Checklist:
- [ ] Have you successfully deployed to an AWS account with your changes?
- [ ] Have you written new tests for your core changes, as applicable?
- [ ] Have you successfully tested with your changes locally?
- [ ] Have you updated openapi.yaml if you made updates to API definition (including add, delete or update parameter and request data schema)?
- [ ] If you had to run manual tests, have you considered automating those tests by adding them to [end-to-end tests](../main/end-to-end-tests/README.md)?

<!-- For major releases please provide internal ticket id -->

AS review ticket id:

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 change: 1 addition & 0 deletions .github/workflows/unit-test-code-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
pull_request:
branches:
- develop
- 'feat-*'
jobs:
static-code-analysis-and-unit-test:
name: Unit Tests & Code Analysis
Expand Down
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,22 @@

All notable changes to this project will be documented in this file.

## [2.1.0] - 2021-03-12

### Added
- fix: Upgraded react-dev-utils yarn dependency version
- feat: Added Bring Your Own Bucket(BYOB) functionality
- feat: Added integration testing for all APIs
- feat: Added OpenAPI documentation
- feat: Removed unused APIs- listWorkflowInstancesByStatus and createAuthenticationProviderConfig

## [2.0.3] - 2021-03-12
- chore(deps): bump websocket-extensions from 0.1.3 to 0.1.4
- test: fix flaky integ tests
- fix: emr workspace image. Lock jupyterlab to version 2.2.6
- test: Implemented integration tests for service catalog workspaces
- feat: verbose integ test log

## [2.0.2] - 2021-03-03

### Added
Expand Down
63 changes: 60 additions & 3 deletions addons/addon-base-raas-ui/packages/base-raas-ui/src/helpers/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ function getAwsAccountBudget(accountUUID) {
}

function createAwsAccountBudget(budgetConfiguration) {
return httpApiPut(`api/budgets/aws-account`, { data: budgetConfiguration });
return httpApiPost(`api/budgets/aws-account`, { data: budgetConfiguration });
}

function updateAwsAccountBudget(budgetConfiguration) {
return httpApiPost(`api/budgets/aws-account`, { data: budgetConfiguration });
return httpApiPut(`api/budgets/aws-account`, { data: budgetConfiguration });
}

function addUsers(users) {
Expand Down Expand Up @@ -288,7 +288,55 @@ function getWindowsRpInfo(envId, connectionId) {
return httpApiGet(`api/workspaces/service-catalog/${envId}/connections/${connectionId}/windows-rdp-info`);
}

// API Functions Insertion Point (do not change this text, it is being used by hygen cli)
function getDataSourceAccounts() {
return httpApiGet(`api/data-sources/accounts/`);
}

function getDataSourceStudies(accountId) {
return httpApiGet(`api/data-sources/accounts/${accountId}/studies`);
}

function checkAccountReachability(accountId) {
return httpApiPost('api/data-sources/accounts/ops/reachability', {
data: { id: accountId, type: 'dsAccount' },
});
}

function checkStudyReachability(studyId) {
return httpApiPost('api/data-sources/accounts/ops/reachability', {
data: { id: studyId, type: 'study' },
});
}

function registerAccount(account) {
return httpApiPost('api/data-sources/accounts', {
data: account,
});
}

function registerBucket(accountId, bucket) {
return httpApiPost(`api/data-sources/accounts/${accountId}/buckets`, {
data: bucket,
});
}

function registerStudy(accountId, bucketName, study) {
return httpApiPost(`api/data-sources/accounts/${accountId}/buckets/${bucketName}/studies`, {
data: study,
});
}

function generateAccountCfnTemplate(accountId) {
return httpApiPost(`api/data-sources/accounts/${accountId}/cfn`, {
data: {},
});
}

function updateRegisteredAccount(accountId, data) {
return httpApiPut(`api/data-sources/accounts/${accountId}`, {
data,
});
}

export {
addIndex,
Expand Down Expand Up @@ -351,4 +399,13 @@ export {
updateScEnvironmentCidrs,
sendSshKey,
getWindowsRpInfo,
getDataSourceAccounts,
getDataSourceStudies,
checkStudyReachability,
checkAccountReachability,
registerAccount,
registerBucket,
registerStudy,
generateAccountCfnTemplate,
updateRegisteredAccount,
};
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,8 @@ const isForbidden = error => {
return _.get(error, 'code') === 'forbidden';
};

export { boom, isNotFound, isTokenExpired, isForbidden };
const isAlreadyExists = error => {
return _.get(error, 'code') === 'alreadyExists';
};

export { boom, isNotFound, isTokenExpired, isForbidden, isAlreadyExists };
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
/*
* 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://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/

/* eslint-disable import/prefer-default-export */
import _ from 'lodash';

const regionNames = [
'us-east-1',
'us-east-2',
'us-west-1',
'us-west-2',
'af-south-1',
'ap-east-1',
'ap-south-1',
'ap-northeast-1',
'ap-northeast-2',
'ap-northeast-3',
'ap-southeast-1',
'ap-southeast-2',
'ca-central-1',
'eu-central-1',
'eu-north-1',
'eu-south-1',
'eu-west-1',
'eu-west-2',
'eu-west-3',
'me-south-1',
'sa-east-1',
];

const regionOptions = _.map(regionNames, name => ({
key: name,
value: name,
text: name,
}));

export { regionNames, regionOptions };
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
* 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://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/

/* eslint-disable import/prefer-default-export */

const encryptionOptions = [
{
text: 'AWS Key Management Service key (SSE-KMS)',
value: 'kms',
},
{
text: 'Amazon S3 key (SSE-S3)',
value: 's3',
},
{
text: 'Disabled',
value: 'none',
},
];

export { encryptionOptions };
Loading

0 comments on commit 4b5928e

Please sign in to comment.