Skip to content

Commit

Permalink
Merge pull request #1368 from tailwarden/develop
Browse files Browse the repository at this point in the history
v3.1.11 release 🚀
  • Loading branch information
Azanul authored Mar 8, 2024
2 parents 125ec22 + 3fdd340 commit 406b189
Show file tree
Hide file tree
Showing 20 changed files with 1,029 additions and 382 deletions.
8 changes: 4 additions & 4 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
* @mlabouardy @ShubhamPalriwala @AvineshTripathi @greghub @Traxmaxx @Kolawole99 @Azanul @jakepage91
docs @jakepage91
README.md @jakepage91
CONTRIBUTING.md @jakepage91
* @mlabouardy @AvineshTripathi @greghub @Azanul
docs @mlabouardy
README.md @mlabouardy
CONTRIBUTING.md @mlabouardy
749 changes: 430 additions & 319 deletions dashboard/package-lock.json

Large diffs are not rendered by default.

19 changes: 11 additions & 8 deletions dashboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
"name": "komiser-dashboard",
"version": "3.1.0",
"private": true,
"engines": {
"node": ">=14.21.3"
},
"scripts": {
"dev": "next dev -p 3002",
"build": "next build",
Expand All @@ -21,7 +24,7 @@
"@tippyjs/react": "^4.2.6",
"chart.js": "^4.2.1",
"classnames": "^2.3.2",
"cytoscape": "^3.26.0",
"cytoscape": "^3.28.1",
"cytoscape-cose-bilkent": "^4.1.0",
"cytoscape-node-html-label": "^1.2.2",
"cytoscape-popper": "^2.0.0",
Expand All @@ -41,34 +44,34 @@
"@commitlint/config-conventional": "^17.2.0",
"@jest/globals": "^29.5.0",
"@storybook/addon-essentials": "^7.4.6",
"@storybook/addon-interactions": "^7.5.3",
"@storybook/addon-interactions": "^7.6.17",
"@storybook/addon-links": "^7.6.17",
"@storybook/addons": "^7.4.6",
"@storybook/blocks": "^7.6.4",
"@storybook/nextjs": "^7.5.2",
"@storybook/preview-api": "^7.4.6",
"@storybook/preview-api": "^7.6.17",
"@storybook/react": "^7.4.6",
"@storybook/testing-library": "^0.2.2",
"@storybook/theming": "^7.5.3",
"@testing-library/jest-dom": "^6.4.2",
"@testing-library/react": "^14.1.2",
"@types/cytoscape": "^3.19.11",
"@types/cytoscape": "^3.19.16",
"@types/cytoscape-popper": "^2.0.3",
"@types/jest": "^29.5.6",
"@types/node": "20.9.0",
"@types/jest": "^29.5.12",
"@types/node": "20.11.21",
"@types/react": "18.2.22",
"@types/react-cytoscapejs": "^1.2.5",
"@types/react-dom": "18.2.18",
"@types/react-simple-maps": "^3.0.2",
"autoprefixer": "^10.4.16",
"eslint": "^8.49.0",
"eslint": "^8.57.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-next": "14.0.4",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-jest": "^27.6.0",
"eslint-plugin-prettier": "^5.0.1",
"eslint-plugin-storybook": "^0.6.15",
"husky": "^8.0.0",
"husky": "^9.0.11",
"jest": "^29.5.0",
"jest-environment-jsdom": "^29.6.4",
"postcss": "^8.4.31",
Expand Down
4 changes: 2 additions & 2 deletions dashboard/pages/onboarding/choose-database.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,14 @@ export default function ChooseDatabase() {
<DatabaseLeftItem
imageUrl="/assets/img/database/postgresql.svg"
label="PostgreSQL"
value="postgres"
value={allDBProviders.POSTGRES}
selected={database}
handleClick={handleClick}
/>
<DatabaseLeftItem
imageUrl="/assets/img/database/sqlite.svg"
label="SQLite"
value="sqlite"
value={allDBProviders.SQLITE}
selected={database}
handleClick={handleClick}
/>
Expand Down
9 changes: 4 additions & 5 deletions dashboard/utils/providerHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,11 @@ export const allProviders: { [key in ProviderKey]: Provider } = {
};

export type DBProvider = 'postgres' | 'sqlite';
type DBProviderKey = 'POSTGRES' | 'SQLITE';

export const allDBProviders: { [key in DBProviderKey]: DBProvider } = {
POSTGRES: 'postgres',
SQLITE: 'sqlite'
};
export enum allDBProviders {
POSTGRES = 'postgres',
SQLITE = 'sqlite'
}

export enum IntegrationProvider {
SLACK = 'slack',
Expand Down
12 changes: 8 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@ require (
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql v1.0.0
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.2.0
github.com/BurntSushi/toml v1.2.1
github.com/aws/aws-sdk-go-v2 v1.25.1
github.com/aws/aws-sdk-go-v2 v1.25.2
github.com/aws/aws-sdk-go-v2/config v1.25.3
github.com/aws/aws-sdk-go-v2/service/apigateway v1.20.2
github.com/aws/aws-sdk-go-v2/service/autoscaling v1.35.1
github.com/aws/aws-sdk-go-v2/service/cloudfront v1.30.2
github.com/aws/aws-sdk-go-v2/service/cloudtrail v1.38.0
github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.30.2
github.com/aws/aws-sdk-go-v2/service/codecommit v1.18.2
github.com/aws/aws-sdk-go-v2/service/codedeploy v1.20.3
Expand All @@ -36,8 +37,11 @@ require (
github.com/aws/aws-sdk-go-v2/service/eks v1.33.1
github.com/aws/aws-sdk-go-v2/service/elasticache v1.32.2
github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.24.2
github.com/aws/aws-sdk-go-v2/service/firehose v1.28.1
github.com/aws/aws-sdk-go-v2/service/iam v1.27.2
github.com/aws/aws-sdk-go-v2/service/kafka v1.30.1
github.com/aws/aws-sdk-go-v2/service/kinesis v1.22.2
github.com/aws/aws-sdk-go-v2/service/kinesisanalyticsv2 v1.23.1
github.com/aws/aws-sdk-go-v2/service/kms v1.26.2
github.com/aws/aws-sdk-go-v2/service/lambda v1.48.0
github.com/aws/aws-sdk-go-v2/service/pricing v1.23.2
Expand All @@ -47,6 +51,7 @@ require (
github.com/aws/aws-sdk-go-v2/service/sns v1.25.2
github.com/aws/aws-sdk-go-v2/service/sqs v1.28.1
github.com/aws/aws-sdk-go-v2/service/sts v1.25.3
github.com/aws/aws-sdk-go-v2/service/wafv2 v1.47.0
github.com/civo/civogo v0.3.24
github.com/digitalocean/godo v1.97.0
github.com/elazarl/go-bindata-assetfs v1.0.1
Expand Down Expand Up @@ -86,7 +91,6 @@ require (
require (
cloud.google.com/go/longrunning v0.4.1 // indirect
github.com/apache/arrow/go/v11 v11.0.0 // indirect
github.com/aws/aws-sdk-go-v2/service/cloudtrail v1.38.0 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.20.0 // indirect
github.com/gabriel-vasile/mimetype v1.4.2 // indirect
github.com/google/s2a-go v0.1.4 // indirect
Expand All @@ -106,8 +110,8 @@ require (
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.1 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.16.2 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.4 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.1 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.1 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.2 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.2 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.7.1 // indirect
github.com/aws/aws-sdk-go-v2/internal/v4a v1.2.3 // indirect
github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.27.1
Expand Down
40 changes: 14 additions & 26 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,8 @@ github.com/apache/arrow/go/v11 v11.0.0 h1:hqauxvFQxww+0mEU/2XHG6LT7eZternCZq+A5Y
github.com/apache/arrow/go/v11 v11.0.0/go.mod h1:Eg5OsL5H+e299f7u5ssuXsuHQVEGC4xei5aX110hRiI=
github.com/apache/thrift v0.16.0 h1:qEy6UW60iVOlUy+b9ZR0d5WzUWYGOo4HfopoyBaNmoY=
github.com/apache/thrift v0.16.0/go.mod h1:PHK3hniurgQaNMZYaCLEqXKsYK8upmhPbmdP2FXSqgU=
github.com/aws/aws-sdk-go-v2 v1.23.1 h1:qXaFsOOMA+HsZtX8WoCa+gJnbyW7qyFFBlPqvTSzbaI=
github.com/aws/aws-sdk-go-v2 v1.23.1/go.mod h1:i1XDttT4rnf6vxc9AuskLc6s7XBee8rlLilKlc03uAA=
github.com/aws/aws-sdk-go-v2 v1.25.0 h1:sv7+1JVJxOu/dD/sz/csHX7jFqmP001TIY7aytBWDSQ=
github.com/aws/aws-sdk-go-v2 v1.25.0/go.mod h1:G104G1Aho5WqF+SR3mDIobTABQzpYV0WxMsKxlMggOA=
github.com/aws/aws-sdk-go-v2 v1.25.1 h1:P7hU6A5qEdmajGwvae/zDkOq+ULLC9tQBTwqqiwFGpI=
github.com/aws/aws-sdk-go-v2 v1.25.1/go.mod h1:Evoc5AsmtveRt1komDwIsjHFyrP5tDuF1D1U+6z6pNo=
github.com/aws/aws-sdk-go-v2 v1.25.2 h1:/uiG1avJRgLGiQM9X3qJM8+Qa6KRGK5rRPuXE0HUM+w=
github.com/aws/aws-sdk-go-v2 v1.25.2/go.mod h1:Evoc5AsmtveRt1komDwIsjHFyrP5tDuF1D1U+6z6pNo=
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.1 h1:ZY3108YtBNq96jNZTICHxN1gSBSbnvIdYwwqnvCV4Mc=
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.1/go.mod h1:t8PYl/6LzdAqsU4/9tz28V/kU+asFePvpOMkdul0gEQ=
github.com/aws/aws-sdk-go-v2/config v1.25.3 h1:E4m9LbwJOoncDNt3e9MPLbz/saxWcGUlZVBydydD6+8=
Expand All @@ -76,18 +72,10 @@ github.com/aws/aws-sdk-go-v2/credentials v1.16.2 h1:0sdZ5cwfOAipTzZ7eOL0gw4LAhk/
github.com/aws/aws-sdk-go-v2/credentials v1.16.2/go.mod h1:sDdvGhXrSVT5yzBDR7qXz+rhbpiMpUYfF3vJ01QSdrc=
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.4 h1:9wKDWEjwSnXZre0/O3+ZwbBl1SmlgWYBbrTV10X/H1s=
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.4/go.mod h1:t4i+yGHMCcUNIX1x7YVYa6bH/Do7civ5I6cG/6PMfyA=
github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.4 h1:LAm3Ycm9HJfbSCd5I+wqC2S9Ej7FPrgr5CQoOljJZcE=
github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.4/go.mod h1:xEhvbJcyUf/31yfGSQBe01fukXwXJ0gxDp7rLfymWE0=
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.0 h1:NPs/EqVO+ajwOoq56EfcGKa3L3ruWuazkIw1BqxwOPw=
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.0/go.mod h1:D+duLy2ylgatV+yTlQ8JTuLfDD0BnFvnQRc+o6tbZ4M=
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.1 h1:evvi7FbTAoFxdP/mixmP7LIYzQWAmzBcwNB/es9XPNc=
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.1/go.mod h1:rH61DT6FDdikhPghymripNUCsf+uVF4Cnk4c4DBKH64=
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.4 h1:4GV0kKZzUxiWxSVpn/9gwR0g21NF1Jsyduzo9rHgC/Q=
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.4/go.mod h1:dYvTNAggxDZy6y1AF7YDwXsPuHFy/VNEpEI/2dWK9IU=
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.0 h1:ks7KGMVUMoDzcxNWUlEdI+/lokMFD136EL6DWmUOV80=
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.0/go.mod h1:hL6BWM/d/qz113fVitZjbXR0E+RCTU1+x+1Idyn5NgE=
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.1 h1:RAnaIrbxPtlXNVI/OIlh1sidTQ3e1qM6LRjs7N0bE0I=
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.1/go.mod h1:nbgAGkH5lk0RZRMh6A4K/oG6Xj11eC/1CyDow+DUAFI=
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.2 h1:bNo4LagzUKbjdxE0tIcR9pMzLR2U/Tgie1Hq1HQ3iH8=
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.2/go.mod h1:wRQv0nN6v9wDXuWThpovGQjqF1HFdcgWjporw14lS8k=
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.2 h1:EtOU5jsPdIQNP+6Q2C5e3d65NKT1PeCiQk+9OdzO12Q=
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.2/go.mod h1:tyF5sKccmDz0Bv4NrstEr+/9YkSPJHrcO7UsUKf7pWM=
github.com/aws/aws-sdk-go-v2/internal/ini v1.7.1 h1:uR9lXYjdPX0xY+NhvaJ4dD8rpSRz5VY81ccIIoNG+lw=
github.com/aws/aws-sdk-go-v2/internal/ini v1.7.1/go.mod h1:6fQQgfuGmw8Al/3M2IgIllycxV7ZW7WCdVSqfBeUiCY=
github.com/aws/aws-sdk-go-v2/internal/v4a v1.2.3 h1:lMwCXiWJlrtZot0NJTjbC8G9zl+V3i68gBTBBvDeEXA=
Expand Down Expand Up @@ -132,24 +120,26 @@ github.com/aws/aws-sdk-go-v2/service/elasticache v1.32.2 h1:3V4GHH05PtNsDjXlKXVb
github.com/aws/aws-sdk-go-v2/service/elasticache v1.32.2/go.mod h1:p5/Vq+5NiyqnyQyH5JVK3lrHDygbiQiqdCNaDT018I8=
github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.24.2 h1:4pOJ+1slB9s36rDsHvnbUd93SZZ4+Z/FdX5f1TKOiQk=
github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.24.2/go.mod h1:NatT0jYQo0MfgZnIX8ReNWnbsl4rbQjuS+uci1KNkck=
github.com/aws/aws-sdk-go-v2/service/firehose v1.28.1 h1:MUpdcOKpTyPt6F3rgHZVs2o9sqpfMW1KEFsSeRw7srs=
github.com/aws/aws-sdk-go-v2/service/firehose v1.28.1/go.mod h1:Y4zm0U9Yl0wt9JOhgt97YeQe/st7UHDbSjvLd1j3Bp8=
github.com/aws/aws-sdk-go-v2/service/iam v1.27.2 h1:Z3a5I5kKGsuVW4kbrtHVnLGUHpEpo19zFyo6dzP2WCM=
github.com/aws/aws-sdk-go-v2/service/iam v1.27.2/go.mod h1:CYRyr95Q57xVvrcKJu3vw4jVVCZhmY1SyugM+EWXlzI=
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.1 h1:rpkF4n0CyFcrJUG/rNNohoTmhtWlFTRI4BsZOh9PvLs=
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.1/go.mod h1:l9ymW25HOqymeU2m1gbUQ3rUIsTwKs8gYHXkqDQUhiI=
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.0 h1:a33HuFlO0KsveiP90IUJh8Xr/cx9US2PqkSroaLc+o8=
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.0/go.mod h1:SxIkWpByiGbhbHYTo9CMTUnx2G4p4ZQMrDPcRRy//1c=
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.3 h1:xbwRyCy7kXrOj89iIKLB6NfE2WCpP9HoKyk8dMDvnIQ=
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.3/go.mod h1:R+/S1O4TYpcktbVwddeOYg+uwUfLhADP2S/x4QwsCTM=
github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.8.3 h1:AakYQhCXteXSRHebRAGDKf/P+3kmEWwiyE3Um/d0ecg=
github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.8.3/go.mod h1:wt1Ib9UX0A8fxifnkYLrv7RAlg+ziPR8Fo0NqzuJkHI=
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.3 h1:kJOolE8xBAD13xTCgOakByZkyP4D/owNmvEiioeUNAg=
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.3/go.mod h1:Owv1I59vaghv1Ax8zz8ELY8DN7/Y0rGS+WWAmjgi950=
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.0 h1:SHN/umDLTmFTmYfI+gkanz6da3vK8Kvj/5wkqnTHbuA=
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.0/go.mod h1:l8gPU5RYGOFHJqWEpPMoRTP0VoaWQSkJdKo+hwWnnDA=
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.3 h1:KV0z2RDc7euMtg8aUT1czv5p29zcLlXALNFsd3jkkEc=
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.3/go.mod h1:KZgs2ny8HsxRIRbDwgvJcHHBZPOzQr/+NtGwnP+w2ec=
github.com/aws/aws-sdk-go-v2/service/kafka v1.30.1 h1:oxzvFQDz9+IG6x8ONYdE5bSU+GnTJaUEcH6gBbyiz2Q=
github.com/aws/aws-sdk-go-v2/service/kafka v1.30.1/go.mod h1:sMIuF773eHxQ/sGAHTWG01xPqpyBD77gNlc0QabBvPk=
github.com/aws/aws-sdk-go-v2/service/kinesis v1.22.2 h1:kav618UT9BH3kNhEXWo5YPphWBzcxLHp/VKmgXXqM34=
github.com/aws/aws-sdk-go-v2/service/kinesis v1.22.2/go.mod h1:pDjJUf6yTIRPsSLDdVI2oR6A9Iv12P1NOL5KaJ9AeRI=
github.com/aws/aws-sdk-go-v2/service/kinesisanalyticsv2 v1.23.1 h1:WRCH3UutBCpD7aZpLM6kqOz8eGBwF1nRDkWSGxphROI=
github.com/aws/aws-sdk-go-v2/service/kinesisanalyticsv2 v1.23.1/go.mod h1:7g00ITXbKeUZE5G7HUcQ1u33bWPvVl+Q0V16kB/zK9E=
github.com/aws/aws-sdk-go-v2/service/kms v1.26.2 h1:cd6qixgKwsu4i1oT14brIYx9qZaXX/9CFrBncxYr7OY=
github.com/aws/aws-sdk-go-v2/service/kms v1.26.2/go.mod h1:SBBCPcfsuNkvXnW4sDzoPNeow6xOaU6g2xTfj1dfxo4=
github.com/aws/aws-sdk-go-v2/service/lambda v1.48.0 h1:Q1ajPX+B64b/OyxuaSDBjqOMmVrpNLhPfTFghpU783k=
Expand Down Expand Up @@ -186,10 +176,8 @@ github.com/aws/aws-sdk-go-v2/service/ssooidc v1.20.0 h1:/XiEU7VIFcVWRDQLabyrSjBo
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.20.0/go.mod h1:dWqm5G767qwKPuayKfzm4rjzFmVjiBFbOJrpSPnAMDs=
github.com/aws/aws-sdk-go-v2/service/sts v1.25.3 h1:M2w4kiMGJCCM6Ljmmx/l6mmpfa3gPJVpBencfnsgvqs=
github.com/aws/aws-sdk-go-v2/service/sts v1.25.3/go.mod h1:4EqRHDCKP78hq3zOnmFXu5k0j4bXbRFfCh/zQ6KnEfQ=
github.com/aws/smithy-go v1.17.0 h1:wWJD7LX6PBV6etBUwO0zElG0nWN9rUhp0WdYeHSHAaI=
github.com/aws/smithy-go v1.17.0/go.mod h1:NukqUGpCZIILqqiV0NIjeFh24kd/FAa4beRb6nbIUPE=
github.com/aws/smithy-go v1.20.0 h1:6+kZsCXZwKxZS9RfISnPc4EXlHoyAkm2hPuM8X2BrrQ=
github.com/aws/smithy-go v1.20.0/go.mod h1:uo5RKksAl4PzhqaAbjd4rLgFoq5koTsQKYuGe7dklGc=
github.com/aws/aws-sdk-go-v2/service/wafv2 v1.47.0 h1:mazKH8eHoNR8qYgu2dcwff3e/GsNTQ5ZPL5os3Rv7wg=
github.com/aws/aws-sdk-go-v2/service/wafv2 v1.47.0/go.mod h1:UUrkvVfyLEVsyo5qQxBfb047u+3owYtxGzOxNIrwpPo=
github.com/aws/smithy-go v1.20.1 h1:4SZlSlMr36UEqC7XOyRVb27XMeZubNcBNN+9IgEPIQw=
github.com/aws/smithy-go v1.20.1/go.mod h1:krry+ya/rV9RDcV/Q16kpu6ypI4K2czasz0NC3qS14E=
github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 h1:DDGfHa7BWjL4YnC6+E63dPcxHo2sUxDIu8g3QgEJdRY=
Expand Down
8 changes: 6 additions & 2 deletions handlers/csv_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ func respondWithCSVDownload(resources []models.Resource, c *gin.Context) {
fw := bufio.NewWriter(file)
csvWriter := csv.NewWriter(fw)

header := []string{"id", "provider", "account", "name", "region", "tags", "cost"}
header := []string{"id", "provider", "account", "name", "service", "region", "tags", "cost", "metadata"}
if err := csvWriter.Write(header); err != nil {
c.JSON(http.StatusInternalServerError, gin.H{"error": "could not write csv"})
return
Expand All @@ -256,9 +256,13 @@ func respondWithCSVDownload(resources []models.Resource, c *gin.Context) {
if err != nil {
log.Fatalf("Could not marshal tags")
}
metadata, err := json.Marshal(record.Metadata)
if err != nil {
log.Fatalf("Could not marshal metadata")
}

row := []string{
record.ResourceId, record.Provider, record.Account, record.Name, record.Region, string(tags), fmt.Sprintf("%2.f", record.Cost),
record.ResourceId, record.Provider, record.Account, record.Name, record.Service, record.Region, string(tags), fmt.Sprintf("%2.f", record.Cost), string(metadata),
}
if err := csvWriter.Write(row); err != nil {
c.JSON(http.StatusInternalServerError, gin.H{"error": "could not write csv"})
Expand Down
1 change: 1 addition & 0 deletions internal/internal.go
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@ func fetchResources(ctx context.Context, clients []providers.ProviderClient, reg
} else if client.OVHClient != nil {
workflowTrigger(client, "OVH")
}
log.Println("Workflow triggered for client:", client.Name)
}

wwg.Wait()
Expand Down
8 changes: 8 additions & 0 deletions policy.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"ec2:DescribeSnapshots",
"ec2:DescribeSpotInstanceRequests",
"ec2:DescribeSubnets",
"ec2:DescribeTransitGatewayVpcAttachments",
"ec2:DescribeVolumes",
"ec2:DescribeVpcEndpoints",
"ec2:DescribeVpcPeeringConnections",
Expand All @@ -52,6 +53,13 @@
"elasticloadbalancing:DescribeTags",
"elasticloadbalancing:DescribeListeners",
"elasticloadbalancing:DescribeTargetGroups",
"kafka:ListClustersV2",
"kinesisanalytics:ListApplication",
"firehose:ListDeliveryStreams",
"ec2:DescribeNatGateways",
"ec2:DescribeTransitGatewayPeeringAttachments",
"WAFV2:ListWebACLs",
"sns:ListSubscriptions",
"iam:ListGroups",
"iam:ListInstanceProfiles",
"iam:ListOpenIDConnectProviders",
Expand Down
13 changes: 13 additions & 0 deletions providers/aws/aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
log "github.com/sirupsen/logrus"
"github.com/tailwarden/komiser/models"
"github.com/tailwarden/komiser/providers"

"github.com/tailwarden/komiser/providers/aws/apigateway"
"github.com/tailwarden/komiser/providers/aws/cloudfront"
"github.com/tailwarden/komiser/providers/aws/cloudtrail"
Expand All @@ -27,8 +28,11 @@ import (
"github.com/tailwarden/komiser/providers/aws/eks"
"github.com/tailwarden/komiser/providers/aws/elasticache"
"github.com/tailwarden/komiser/providers/aws/elb"
"github.com/tailwarden/komiser/providers/aws/firehose"
"github.com/tailwarden/komiser/providers/aws/iam"
"github.com/tailwarden/komiser/providers/aws/kafka"
"github.com/tailwarden/komiser/providers/aws/kinesis"
"github.com/tailwarden/komiser/providers/aws/kinesisanalytics"
"github.com/tailwarden/komiser/providers/aws/kms"
"github.com/tailwarden/komiser/providers/aws/lambda"
"github.com/tailwarden/komiser/providers/aws/lightsail"
Expand All @@ -44,6 +48,7 @@ import (
"github.com/tailwarden/komiser/providers/aws/sqs"
"github.com/tailwarden/komiser/providers/aws/systemsmanager"
awsUtils "github.com/tailwarden/komiser/providers/aws/utils"
"github.com/tailwarden/komiser/providers/aws/wafv2"
"github.com/tailwarden/komiser/utils"

"github.com/uptrace/bun"
Expand Down Expand Up @@ -123,6 +128,14 @@ func listOfSupportedServices() []providers.FetchDataFunction {
cloudtrail.Trails,
datasync.Agents,
secretsmanager.Secrets,
ec2.TransitGatewayPeeringAttachments,
ec2.TransitGatewayVpcAttachments,
firehose.DeliveryStreams,
kinesisanalytics.KinesisAnalytics,
kafka.Kafka,
ec2.NatGateways,
sns.Subscriptions,
wafv2.WebAcls,
}
}

Expand Down
Loading

0 comments on commit 406b189

Please sign in to comment.