From 5c53955c732f4d7507d1568b13553865ec006e94 Mon Sep 17 00:00:00 2001 From: Mauricio Araujo Date: Thu, 9 May 2024 10:09:55 -0400 Subject: [PATCH 1/4] Add missing import for billing modal (#4628) --- dashboard/src/main/home/Home.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/dashboard/src/main/home/Home.tsx b/dashboard/src/main/home/Home.tsx index cdf21c3fb0..f9c5ca098e 100644 --- a/dashboard/src/main/home/Home.tsx +++ b/dashboard/src/main/home/Home.tsx @@ -64,6 +64,7 @@ import CreateClusterForm from "./infrastructure-dashboard/forms/CreateClusterFor import Integrations from "./integrations/Integrations"; import LaunchWrapper from "./launch/LaunchWrapper"; import ModalHandler from "./ModalHandler"; +import BillingModal from "./modals/BillingModal"; import Navbar from "./navbar/Navbar"; import { NewProjectFC } from "./new-project/NewProject"; import Onboarding from "./onboarding/Onboarding"; From f42fe3885bfed26fa0d7a4dbfe51a7920d2b9e8d Mon Sep 17 00:00:00 2001 From: Mauricio Araujo Date: Thu, 9 May 2024 14:25:47 -0400 Subject: [PATCH 2/4] Disable usage tab (#4630) --- .../src/main/home/modals/BillingModal.tsx | 63 ++++++++++--------- .../home/project-settings/ProjectSettings.tsx | 18 +++--- 2 files changed, 42 insertions(+), 39 deletions(-) diff --git a/dashboard/src/main/home/modals/BillingModal.tsx b/dashboard/src/main/home/modals/BillingModal.tsx index dd391de3c0..0b7826942b 100644 --- a/dashboard/src/main/home/modals/BillingModal.tsx +++ b/dashboard/src/main/home/modals/BillingModal.tsx @@ -6,8 +6,8 @@ import Link from "components/porter/Link"; import Modal from "components/porter/Modal"; import Spacer from "components/porter/Spacer"; import Text from "components/porter/Text"; -import { usePublishableKey } from "lib/hooks/useStripe"; import { useIntercom } from "lib/hooks/useIntercom"; +import { usePublishableKey } from "lib/hooks/useStripe"; import { Context } from "shared/Context"; @@ -76,23 +76,28 @@ const BillingModal = ({ ) : ( - {trialExpired - ? ( -
- Your applications will continue to run but you will not be able to access your project until you link a payment method. - {" "} - showIntercomWithMessage({ - message: "I have already redeemed my startup deal.", - delaySeconds: 0, - })}> - Already redeemed your startup deal? - - - {"For more details on the current costs and usage of this project, visit the "} - billing page. -
- ) - : "Link a payment method to your Porter project."} + {trialExpired ? ( +
+ Your applications will continue to run but you will not be able + to access your project until you link a payment method.{" "} + + showIntercomWithMessage({ + message: "I have already redeemed my startup deal.", + delaySeconds: 0, + }) + } + > + Already redeemed your startup deal? + + {/* */} + {/* {"For more details on the current costs and usage of this project, visit the "} + billing page. */} +
+ ) : ( + "Link a payment method to your Porter project." + )} {`You can learn more about our pricing under "For Businesses" `} @@ -101,19 +106,17 @@ const BillingModal = ({
)} - { - publishableKey ? ( - - - - ) : null - } + {publishableKey ? ( + + + + ) : null} - + ); }; diff --git a/dashboard/src/main/home/project-settings/ProjectSettings.tsx b/dashboard/src/main/home/project-settings/ProjectSettings.tsx index 3c73f0fc93..7b20c3391b 100644 --- a/dashboard/src/main/home/project-settings/ProjectSettings.tsx +++ b/dashboard/src/main/home/project-settings/ProjectSettings.tsx @@ -96,15 +96,15 @@ function ProjectSettings(props: any) { }); } - if ( - currentProject?.billing_enabled && - currentProject?.metronome_enabled - ) { - tabOpts.push({ - value: "usage", - label: "Usage", - }); - } + // if ( + // currentProject?.billing_enabled && + // currentProject?.metronome_enabled + // ) { + // tabOpts.push({ + // value: "usage", + // label: "Usage", + // }); + // } tabOpts.push({ value: "additional-settings", From 61ab42b26a236c38853b8d55969ab8f0d78ed412 Mon Sep 17 00:00:00 2001 From: "porter-internal[bot]" <108749831+porter-internal[bot]@users.noreply.github.com> Date: Thu, 9 May 2024 19:06:20 +0000 Subject: [PATCH 3/4] Enable Porter Application install-script (#4631) Co-authored-by: porter-internal[bot] <108749831+porter-internal[bot]@users.noreply.github.com> Co-authored-by: Stefan McShane --- .github/workflows/install_script.yml | 42 +++++++++++++++------------- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/.github/workflows/install_script.yml b/.github/workflows/install_script.yml index 2a7a3c0bb2..00619bfa02 100644 --- a/.github/workflows/install_script.yml +++ b/.github/workflows/install_script.yml @@ -1,25 +1,29 @@ -"on": +name: Deploy to install-script +on: push: tags: - - production -name: Deploy Install Script to Production + - production jobs: porter-deploy: runs-on: ubuntu-latest steps: - - name: Checkout code - uses: actions/checkout@v3 - - name: Set Github tag - id: vars - run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT - - name: Update Porter App - timeout-minutes: 20 - uses: porter-dev/porter-update-action@v0.1.0 - with: - app: install-script - cluster: "9" - host: https://dashboard.internal-tools.porter.run - namespace: default - project: "5" - tag: ${{ steps.vars.outputs.sha_short }} - token: ${{ secrets.PORTER_TOKEN_5 }} + - name: Checkout code + uses: actions/checkout@v3 + - name: Set Github tag + id: vars + run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT + - name: Setup porter + uses: porter-dev/setup-porter@v0.1.0 + - name: Deploy stack + timeout-minutes: 30 + run: exec porter apply + env: + PORTER_CLUSTER: "9" + PORTER_DEPLOYMENT_TARGET_ID: b0fec389-99d5-4ca5-9012-002b410248b3 + PORTER_HOST: https://dashboard.internal-tools.porter.run + PORTER_PR_NUMBER: ${{ github.event.number }} + PORTER_PROJECT: "5" + PORTER_REPO_NAME: ${{ github.event.repository.name }} + PORTER_STACK_NAME: install-script + PORTER_TAG: ${{ steps.vars.outputs.sha_short }} + PORTER_TOKEN: ${{ secrets.PORTER_STACK_5_9 }} From 9b28b8b9fcf71b4bb9f281da81e85a7d62aeef92 Mon Sep 17 00:00:00 2001 From: Feroze Mohideen Date: Thu, 9 May 2024 15:17:05 -0400 Subject: [PATCH 4/4] temp remove newrelic addon (#4632) --- dashboard/src/lib/addons/template.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dashboard/src/lib/addons/template.ts b/dashboard/src/lib/addons/template.ts index ad43a7b624..e77083e335 100644 --- a/dashboard/src/lib/addons/template.ts +++ b/dashboard/src/lib/addons/template.ts @@ -284,6 +284,6 @@ export const SUPPORTED_ADDON_TEMPLATES: Array> = ADDON_TEMPLATE_DATADOG, ADDON_TEMPLATE_MEZMO, ADDON_TEMPLATE_METABASE, - ADDON_TEMPLATE_NEWRELIC, + // ADDON_TEMPLATE_NEWRELIC, ADDON_TEMPLATE_TAILSCALE, ];