Skip to content

Commit

Permalink
Merge remote-tracking branch 'internal/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
jvallexm committed Aug 23, 2024
2 parents 94f5f77 + 1864f67 commit 969fd9f
Show file tree
Hide file tree
Showing 47 changed files with 2,708 additions and 4,372 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,20 @@

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

## 1.16.4

### Features

- Power VS Workspace connections are no longer removed from Transit Gateways when updating the Workspace's region
- Users can now create Secrets Groups from the Secrets Manager page
- Users can now add authorizations for Kubernetes and CIS to Secrets Manager from the Secrets Manager Page
- Users can now attach Power VS Volumes to FalconStor VTL instances
- Users can now enable Cloud Logs from the Cloud Logs page /forms/logs. Please note that enabling this feature will prevent Activity Tracker and LogDNA code from being generated. Cloud Logs will replace these services

### Fixes

- Fixed an issue causing generate-env.sh to incorrectly set values for Power VS regions

## 1.16.3

### Upgrade Notes
Expand Down
4,956 changes: 664 additions & 4,292 deletions client/package-lock.json

Large diffs are not rendered by default.

19 changes: 15 additions & 4 deletions client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "craig",
"version": "1.16.2",
"version": "1.16.4",
"private": true,
"license": "Apache-2.0",
"scripts": {
Expand All @@ -27,10 +27,10 @@
"json-to-tf": "^0.3.1",
"jszip": "^3.10.1",
"lazy-z": "1.12.1",
"react": "^18.0.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-router-dom": "^6.23.1",
"react-chartjs-2": "^5.2.0",
"react-dom": "^18.0.0",
"react-router-dom": "^6.3.0",
"regex-but-with-words": "^1.5.0",
"sass": "1.51.0",
"stream-browserify": "^3.0.0"
Expand All @@ -45,10 +45,21 @@
"@testing-library/user-event": "^14.4.3",
"husky": "1.3.1",
"lint-staged": "^13.0.3",
"postcss": "^8.4.38",
"prettier": "^1.17.0",
"react-scripts": "^5.0.1",
"wait-for-expect": "3.0.2"
},
"overrides": {
"react-scripts": {
"@svgr/webpack": "8.1.0",
"typescript": "5.0.2",
"postcss": "8.4.38"
}
},
"peerDependencies": {
"postcss": "^8.4.38"
},
"browserslist": [
">0.2%",
"not dead",
Expand Down
2 changes: 2 additions & 0 deletions client/src/components/page-template/PageTemplate.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ import {
IbmCloudBareMetalServer,
GroupObjects,
ScreenMapSet,
IbmCloudLogging,
} from "@carbon/icons-react";
import f5 from "../../images/f5.png";
import {
Expand All @@ -73,6 +74,7 @@ function F5Icon() {
const releaseNotes = require("../../lib/docs/release-notes.json");
const navCategories = require("../../lib/nav-catagories");
const navIcons = {
IbmCloudLogging: IbmCloudLogging,
ScreenMapSet: ScreenMapSet,
GroupObjects: GroupObjects,
IbmCloudKeyProtect: IbmCloudKeyProtect,
Expand Down
36 changes: 36 additions & 0 deletions client/src/components/pages/CraigForms.js
Original file line number Diff line number Diff line change
Expand Up @@ -885,6 +885,24 @@ function craigForms(craig) {
},
],
},
cloud_logs: {
groups: [
{
enabled: craig.cloud_logs.enabled,
},
{
name: craig.cloud_logs.name,
resource_group: craig.cloud_logs.resource_group,
},
{
cos: craig.cloud_logs.cos,
},
{
logs_bucket: craig.cloud_logs.logs_bucket,
metrics_bucket: craig.cloud_logs.metrics_bucket,
},
],
},
logdna: {
groups: [
{
Expand Down Expand Up @@ -1330,6 +1348,24 @@ function craigForms(craig) {
plan: craig.secrets_manager.plan,
encryption_key: craig.secrets_manager.encryption_key,
},
{
add_k8s_authorization: craig.secrets_manager.add_k8s_authorization,
add_cis_authorization: craig.secrets_manager.add_cis_authorization,
},
],
subForms: [
{
name: "Secrets Groups",
addText: "Add a Secrets Group",
jsonField: "secrets_groups",
form: {
groups: [
{
name: craig.secrets_manager.secrets_groups.name,
},
],
},
},
],
},
scc_v2: {
Expand Down
47 changes: 47 additions & 0 deletions client/src/components/pages/FormPages.js
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,51 @@ const CloudDatabasePage = (craig) => {
});
};

const CloudLogs = (craig) => {
console.log(craig.store.json);
return (
<CraigToggleForm
craig={craig}
about={RenderDocs("cloud_logs", craig.store.json._options.template)()}
name="Cloud Logs"
hideName
noDeleteButton={true}
useAddButton={false}
tabPanel={{
name: "Cloud Logs",
}}
onShowToggle={() => {}}
submissionFieldName="cloud_logs"
onSave={craig.cloud_logs.save}
innerFormProps={{
craig: craig,
data: craig.store.json.cloud_logs,
disableSave: disableSave,
form: {
jsonField: "cloud_logs",
disableSave: disableSave,
groups: [
{
enabled: craig.cloud_logs.enabled,
},
{
name: craig.cloud_logs.name,
resource_group: craig.cloud_logs.resource_group,
},
{
cos: craig.cloud_logs.cos,
},
{
logs_bucket: craig.cloud_logs.logs_bucket,
metrics_bucket: craig.cloud_logs.metrics_bucket,
},
],
},
}}
/>
);
};

const ClusterPage = (craig) => {
return formPageTemplate(craig, {
name: "Clusters",
Expand Down Expand Up @@ -1412,6 +1457,8 @@ export const NewFormPage = (props) => {
return ClassicVlanPage(craig);
} else if (form === "icd") {
return CloudDatabasePage(craig);
} else if (form === "logs") {
return CloudLogs(craig);
} else if (form === "clusters") {
return ClusterPage(craig);
} else if (form === "dns") {
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/pages/diagrams/ScrollForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class ScrollForm extends React.Component {
hide={false}
name={
contains(
["logdna", "sysdig", "atracker", "scc_v2"],
["logdna", "sysdig", "atracker", "scc_v2", "cloud_logs"],
this.props.selectedItem
)
? this.props.craig.store.json[this.props.selectedItem].name
Expand Down
8 changes: 8 additions & 0 deletions client/src/lib/docs/docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -2609,5 +2609,13 @@
]
],
"last_updated": "05/31/2024"
},
"cloud_logs": {
"content": [
{
"text": "NYI"
}
],
"relatedLinks": []
}
}
14 changes: 14 additions & 0 deletions client/src/lib/docs/release-notes.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
[
{
"version": "1.16.4",
"features": [
"Power VS Workspace connections are no longer removed from Transit Gateways when updating the Workspace's region",
"Users can now create Secrets Groups from the Secrets Manager page",
"Users can now add authorizations for Kubernetes and CIS to Secrets Manager from the Secrets Manager Page",
"Users can now attach Power VS Volumes to FalconStor VTL instances",
"Users can now enable Cloud Logs from the Cloud Logs page /forms/logs. Please note that enabling this feature will prevent Activity Tracker and LogDNA code from being generated. Cloud Logs will replace these services"
],
"fixes": [
"Fixed an issue causing generate-env.sh to incorrectly set values for Power VS regions"
],
"upgrade_notes": []
},
{
"version": "1.16.3",
"features": [
Expand Down
5 changes: 4 additions & 1 deletion client/src/lib/docs/templates/vpn-as-a-service.json
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,10 @@
"kms": "kms",
"secrets": [],
"use_data": false,
"plan": "trial"
"plan": "trial",
"add_k8s_authorization": false,
"add_cis_authorization": false,
"secrets_groups": []
}
],
"security_groups": [
Expand Down
6 changes: 5 additions & 1 deletion client/src/lib/forms/disable-save.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ function disableSave(field, stateData, componentProps, craig) {
"classic_bare_metal",
"power_placement_groups",
"power_shared_processor_pools",
"secrets_groups",
"cloud_logs",
];
let isPowerSshKey = field === "ssh_keys" && componentProps.arrayParentName;
if (contains(stateDisableSaveComponents, field) || isPowerSshKey) {
Expand Down Expand Up @@ -164,6 +166,8 @@ function disableSave(field, stateData, componentProps, craig) {
? componentProps.craig.vpn_gateways.connections
: field === "classic_sg_rules"
? componentProps.craig.classic_security_groups.classic_sg_rules
: field === "secrets_groups"
? componentProps.craig.secrets_manager.secrets_groups
: componentProps.craig[field]
).shouldDisableSave(stateData, componentProps);
} else return false;
Expand All @@ -187,7 +191,7 @@ function invalidCidrBlock(value) {
*/
function forceShowForm(stateData, componentProps) {
let openForm = false;
if (componentProps.innerFormProps?.data.enable === false) {
if (componentProps.innerFormProps?.data?.enable === false) {
return openForm;
}

Expand Down
6 changes: 6 additions & 0 deletions client/src/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,9 @@ const {
classicSecurityGroupTf,
classicVsiTf,
classicBareMetalTf,
formatCloudLogs,
formatCosToCloudLogsAuth,
cloudLogsTf,
} = require("./json-to-iac");
const releaseNotes = require("./docs/release-notes.json");
const docs = require("./docs/docs.json");
Expand All @@ -154,6 +157,9 @@ const {
} = require("./components");

module.exports = {
cloudLogsTf,
formatCosToCloudLogsAuth,
formatCloudLogs,
dynamicPasswordInputProps,
dynamicToolTipWrapperProps,
dynamicCraigFormGroupsProps,
Expand Down
4 changes: 3 additions & 1 deletion client/src/lib/json-to-iac/atracker.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,9 @@ function atrackerTf(config) {
if (config.atracker.add_route) {
str += formatAtrackerRoute(config);
}
return config.atracker.enabled ? tfBlock("Atracker Resources", str) : "";
return config.atracker.enabled && !config?.cloud_logs?.enabled
? tfBlock("Atracker Resources", str)
: "";
}

module.exports = {
Expand Down
Loading

0 comments on commit 969fd9f

Please sign in to comment.