diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000..93c0e783b --- /dev/null +++ b/.gitattributes @@ -0,0 +1,6 @@ +# Set the default behavior, in case people don't have core.autocrlf set. +* text eol=lf + +# Denote all files that are truly binary and should not be modified. +*.png binary +*.jpg binary \ No newline at end of file diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 242a3ee9a..9ef48c933 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,3 +1,4 @@ -* @mlabouardy @ShubhamPalriwala +* @mlabouardy @ShubhamPalriwala @AvineshTripathi @greghub @Traxmaxx +docs @jakepage91 README.md @jakepage91 CONTRIBUTING.md @jakepage91 diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..53f93894f --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,12 @@ +version: 2 +updates: + - package-ecosystem: "npm" + directory: "/dashboard" + schedule: + interval: "weekly" + labels: + - "npm dependencies" + reviewers: + - "mlabouardy" + - "ShubhamPalriwala" + - "AvineshTripathi" diff --git a/.github/workflows/build_test_pr.yml b/.github/workflows/build_test_pr.yml index b00470cca..e17d73ae1 100644 --- a/.github/workflows/build_test_pr.yml +++ b/.github/workflows/build_test_pr.yml @@ -5,7 +5,7 @@ jobs: build_test_dashboard: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-node@v3 with: @@ -28,14 +28,14 @@ jobs: build_test_cli: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Go uses: actions/setup-go@v4 with: cache: true cache-dependency-path: go.sum - go-version: 1.20.2 + go-version: 1.21 # FIXME: https://github.com/golangci/golangci-lint-action/issues/677 # - name: golangci-lint diff --git a/README.md b/README.md index e4895ab66..3848e9fba 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,7 @@
+[![Build and Test komiser](https://github.com/tailwarden/komiser/actions/workflows/build_test.yml/badge.svg)](https://github.com/tailwarden/komiser/actions/workflows/build_test.yml) [![Price](https://img.shields.io/badge/price-FREE-0098f7.svg)](https://github.com/tailwarden/komiser/blob/master/LICENSE) [![Docker Stars](https://img.shields.io/docker/pulls/mlabouardy/komiser.svg)](https://hub.docker.com/r/mlabouardy/komiser) [![ELv2 License](https://img.shields.io/badge/license-ELv2-green)](LICENSE) [![Docker Stars](https://img.shields.io/github/issues/tailwarden/komiser.svg)](https://github.com/tailwarden/komiser/issues) [![Discord](https://badgen.net/badge/icon/discord?icon=discord&label)](https://discord.tailwarden.com/) @@ -162,16 +163,16 @@ We are very excited about what is in store in the coming weeks and months, take Komiser is written in `Golang` and is `Elv2 licensed` - contributions are always welcome whether that means providing feedback, be it through GitHub, through the `#feedback` channel on our [Discord server](https://discord.tailwarden.com) or testing existing and new features. Feel free to check out our [contributor guidelines](./CONTRIBUTING.md) and consider becoming a **contributor** today. -Learn how to contribute with this walkthrough videos: +Learn how to contribute with these walkthrough videos: -- [How to contributor to Komiser engine](https://www.youtube.com/watch?v=Vn5uc2elcVg) -- [How to contributor to Komiser dashboard](https://www.youtube.com/watch?v=uwxj11-eRt8) +- [How to contribute to Komiser engine](https://www.youtube.com/watch?v=Vn5uc2elcVg) +- [How to contribute to Komiser dashboard](https://www.youtube.com/watch?v=uwxj11-eRt8) # Users 🧑🤝🧑 If you'd like to have your company represented and are using `Komiser` please give formal written permission below via email to contact@tailwarden.com. -We will need a URL to a svg or png logo, a text title and a company URL. +We will need a URL to an SVG or png logo, a text title, and a company URL. # Versioning 🧮 diff --git a/dashboard/.eslintrc.json b/dashboard/.eslintrc.json index 4eb5b9478..f512edd6f 100644 --- a/dashboard/.eslintrc.json +++ b/dashboard/.eslintrc.json @@ -10,6 +10,14 @@ "jest/globals": true }, "plugins": ["jest", "prettier"], + "settings": { + "import/resolver": { + "node": { + "paths": ["src"], + "extensions": [".js", ".jsx", ".ts", ".tsx"] + } + } + }, "rules": { "react-hooks/exhaustive-deps": "off", "prettier/prettier": [ diff --git a/dashboard/.gitignore b/dashboard/.gitignore index ac1d86afd..c87c9b392 100644 --- a/dashboard/.gitignore +++ b/dashboard/.gitignore @@ -4,7 +4,6 @@ /node_modules /.pnp .pnp.js -/package-lock.json # testing /coverage diff --git a/dashboard/.tool-versions b/dashboard/.tool-versions new file mode 100644 index 000000000..70d0ba4ea --- /dev/null +++ b/dashboard/.tool-versions @@ -0,0 +1 @@ +nodejs 18.16.1 diff --git a/dashboard/components/account-details/AwsAccountDetails.tsx b/dashboard/components/account-details/AwsAccountDetails.tsx new file mode 100644 index 000000000..b64bcecc5 --- /dev/null +++ b/dashboard/components/account-details/AwsAccountDetails.tsx @@ -0,0 +1,192 @@ +import { ChangeEvent, ReactNode, useRef, useState } from 'react'; +import classNames from 'classnames'; +import { AWSCredentials } from '@utils/cloudAccountHelpers'; +import Folder2Icon from '../icons/Folder2Icon'; +import SelectInput from '../onboarding-wizard/SelectInput'; +import LabelledInput from '../onboarding-wizard/LabelledInput'; +import InputFileSelect from '../onboarding-wizard/InputFileSelect'; +import KeyIcon from '../icons/KeyIcon'; +import VariableIcon from '../icons/VariableIcon'; +import DocumentTextIcon from '../icons/DocumentTextIcon'; +import ShieldSecurityIcon from '../icons/ShieldSecurityIcon'; +import { CloudAccountPayload } from '../cloud-account/hooks/useCloudAccounts/useCloudAccount'; + +interface SelectOptions { + icon: ReactNode; + label: string; + value: string; +} + +interface AwsAccountDetailsProps { + cloudAccountData?: CloudAccountPayload{name}
+{providers.providerLabel(provider)}
++ Your Cloud Accounts +
+ > + )} ++ {cloudAccount.name} +
++ {cloudAccount.resources} resources in this cloud account +
+${templateData.label || ' '}
+${templateData.service || ' '}
+ Dependency Graph +
+ ++ Analyze account resource associations +
++ Cannot fetch Relationships +
++ Resources Explorer +
+{getField('label')}
+ {data.tagKey &&: {data.tagKey}
} + {data.operator && ( + <> + : + {getOperator(data.operator)} + > + )} + {data.values && + data.values.length > 0 && + data.values.map((value, idx) => ( ++ {idx === 0 && :} + + {data.field === 'cost' && '$'} + {value} + + {data.values.length > 1 && idx < data.values.length - 1 && ( + + {data.field === 'cost' && data.operator === 'BETWEEN' + ? 'and' + : 'or'} + + )} +
+ ))} +