Skip to content

Commit

Permalink
Merge branch 'master' into unblock-neon-sandbox
Browse files Browse the repository at this point in the history
  • Loading branch information
Feroze Mohideen authored May 9, 2024
2 parents 568d912 + 9b28b8b commit 1b879f3
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 59 deletions.
42 changes: 23 additions & 19 deletions .github/workflows/install_script.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
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/[email protected]
- 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 }}
2 changes: 1 addition & 1 deletion dashboard/src/lib/addons/template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,6 @@ export const SUPPORTED_ADDON_TEMPLATES: Array<AddonTemplate<ClientAddonType>> =
ADDON_TEMPLATE_DATADOG,
ADDON_TEMPLATE_MEZMO,
ADDON_TEMPLATE_METABASE,
ADDON_TEMPLATE_NEWRELIC,
// ADDON_TEMPLATE_NEWRELIC,
ADDON_TEMPLATE_TAILSCALE,
];
1 change: 1 addition & 0 deletions dashboard/src/main/home/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
63 changes: 33 additions & 30 deletions dashboard/src/main/home/modals/BillingModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down Expand Up @@ -76,23 +76,28 @@ const BillingModal = ({
</Text>
) : (
<Text color="helper">
{trialExpired
? (
<div>
Your applications will continue to run but you will not be able to access your project until you link a payment method.
{" "}
<Text style={{ cursor: "pointer" }} onClick={() => showIntercomWithMessage({
message: "I have already redeemed my startup deal.",
delaySeconds: 0,
})}>
Already redeemed your startup deal?
</Text>
<Spacer y={0.5} />
{"For more details on the current costs and usage of this project, visit the "}
<Link to="/project-settings?selected_tab=billing">billing page.</Link>
</div>
)
: "Link a payment method to your Porter project."}
{trialExpired ? (
<div>
Your applications will continue to run but you will not be able
to access your project until you link a payment method.{" "}
<Text
style={{ cursor: "pointer" }}
onClick={() =>
showIntercomWithMessage({
message: "I have already redeemed my startup deal.",
delaySeconds: 0,
})
}
>
Already redeemed your startup deal?
</Text>
{/* <Spacer y={0.5} /> */}
{/* {"For more details on the current costs and usage of this project, visit the "}
<Link to="/project-settings?selected_tab=billing">billing page.</Link> */}
</div>
) : (
"Link a payment method to your Porter project."
)}
<Spacer y={0.5} />
{`You can learn more about our pricing under "For Businesses" `}
<Link target="_blank" to="https://porter.run/pricing">
Expand All @@ -101,19 +106,17 @@ const BillingModal = ({
</Text>
)}
<Spacer y={1} />
{
publishableKey ? (
<Elements
stripe={stripePromise || null}
options={options}
appearance={appearance}
>
<PaymentSetupForm onCreate={onCreate}></PaymentSetupForm>
</Elements>
) : null
}
{publishableKey ? (
<Elements
stripe={stripePromise || null}
options={options}
appearance={appearance}
>
<PaymentSetupForm onCreate={onCreate}></PaymentSetupForm>
</Elements>
) : null}
</div>
</Modal >
</Modal>
);
};

Expand Down
18 changes: 9 additions & 9 deletions dashboard/src/main/home/project-settings/ProjectSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 1b879f3

Please sign in to comment.