mirror of
https://github.com/rowyio/rowy.git
synced 2025-12-29 00:16:39 +01:00
Merge branch 'rc' into develop
* rc: fix hardcoded project id update copy fix hardcoded project id remove firestore requirement
This commit is contained in:
@@ -22,18 +22,25 @@ import BuildLogs from "./BuildLogs";
|
||||
import EmptyState from "@src/components/EmptyState";
|
||||
|
||||
import { useProjectContext } from "@src/contexts/ProjectContext";
|
||||
import { useAppContext } from "@src/contexts/AppContext";
|
||||
import { cloudLogFiltersAtom, cloudLogFetcher } from "./utils";
|
||||
|
||||
export default function CloudLogsModal(props: IModalProps) {
|
||||
const { rowyRun, tableState, table, compatibleRowyRunVersion } =
|
||||
useProjectContext();
|
||||
|
||||
const { projectId } = useAppContext();
|
||||
const [cloudLogFilters, setCloudLogFilters] = useAtom(cloudLogFiltersAtom);
|
||||
|
||||
const { data, mutate, isValidating } = useSWR(
|
||||
cloudLogFilters.type === "build"
|
||||
? null
|
||||
: ["/logs", rowyRun, cloudLogFilters, tableState?.tablePath || ""],
|
||||
: [
|
||||
"/logs",
|
||||
rowyRun,
|
||||
projectId,
|
||||
cloudLogFilters,
|
||||
tableState?.tablePath || "",
|
||||
],
|
||||
cloudLogFetcher,
|
||||
{
|
||||
fallbackData: [],
|
||||
|
||||
@@ -26,6 +26,7 @@ export const cloudLogFiltersAtom = atomWithHash<CloudLogFilters>(
|
||||
export const cloudLogFetcher = (
|
||||
endpointRoot: string,
|
||||
rowyRun: IProjectContext["rowyRun"],
|
||||
projectId: string,
|
||||
cloudLogFilters: CloudLogFilters,
|
||||
tablePath: string
|
||||
) => {
|
||||
@@ -34,7 +35,9 @@ export const cloudLogFetcher = (
|
||||
|
||||
switch (cloudLogFilters.type) {
|
||||
case "webhook":
|
||||
logQuery.push(`logName = "projects/rowyio/logs/rowy-webhook-events"`);
|
||||
logQuery.push(
|
||||
`logName = "projects/${projectId}/logs/rowy-webhook-events"`
|
||||
);
|
||||
logQuery.push(`jsonPayload.url : "${tablePath}"`);
|
||||
if (
|
||||
Array.isArray(cloudLogFilters.webhook) &&
|
||||
@@ -48,7 +51,7 @@ export const cloudLogFetcher = (
|
||||
break;
|
||||
|
||||
case "audit":
|
||||
logQuery.push(`logName = "projects/rowyio/logs/rowy-audit"`);
|
||||
logQuery.push(`logName = "projects/${projectId}/logs/rowy-audit"`);
|
||||
logQuery.push(`jsonPayload.ref.collectionPath = "${tablePath}"`);
|
||||
if (cloudLogFilters.auditRowId)
|
||||
logQuery.push(
|
||||
|
||||
@@ -66,7 +66,9 @@ export const webhookBasic = {
|
||||
return (
|
||||
<Typography color="text.disabled">
|
||||
<WarningIcon aria-label="Warning" style={{ verticalAlign: "bottom" }} />
|
||||
Verification is not currently available for basic webhooks
|
||||
Specialized verification is not currently available for basic
|
||||
webhooks, you can add your own verification logic in the conditions
|
||||
section bellow.
|
||||
</Typography>
|
||||
);
|
||||
},
|
||||
|
||||
@@ -36,6 +36,7 @@ import FormFieldSnippets from "./FormFieldSnippets";
|
||||
|
||||
import { useProjectContext } from "@src/contexts/ProjectContext";
|
||||
import { WIKI_LINKS } from "@src/constants/externalLinks";
|
||||
import { useAppContext } from "@src/contexts/AppContext";
|
||||
|
||||
const CodeEditor = lazy(
|
||||
() =>
|
||||
@@ -44,7 +45,7 @@ const CodeEditor = lazy(
|
||||
|
||||
const Settings = ({ config, onChange }) => {
|
||||
const { tableState, roles } = useProjectContext();
|
||||
|
||||
const { projectId } = useAppContext();
|
||||
const [activeStep, setActiveStep] = useState<
|
||||
"requirements" | "friction" | "action" | "undo" | "customization"
|
||||
>("requirements");
|
||||
@@ -325,7 +326,7 @@ const Settings = ({ config, onChange }) => {
|
||||
Write the name of the callable function you’ve deployed to
|
||||
your project.{" "}
|
||||
<Link
|
||||
href={`https://console.firebase.google.com/project/rowyio/functions/list`}
|
||||
href={`https://console.firebase.google.com/project/${projectId}/functions/list`}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
|
||||
@@ -37,7 +37,6 @@ export default function DeployPage() {
|
||||
|
||||
const [continued, setContinued] = useState(false);
|
||||
const [confirmProject, setConfirmProject] = useState(false);
|
||||
const [confirmFirestore, setConfirmFirestore] = useState(false);
|
||||
const [confirmAuth, setConfirmAuth] = useState(false);
|
||||
|
||||
return (
|
||||
@@ -94,17 +93,6 @@ export default function DeployPage() {
|
||||
}
|
||||
label="A Google Cloud or Firebase project"
|
||||
/>
|
||||
<FormControlLabel
|
||||
control={
|
||||
<Checkbox
|
||||
checked={confirmFirestore}
|
||||
onChange={(e) =>
|
||||
setConfirmFirestore(e.target.checked)
|
||||
}
|
||||
/>
|
||||
}
|
||||
label="Firestore enabled"
|
||||
/>
|
||||
<FormControlLabel
|
||||
control={
|
||||
<Checkbox
|
||||
@@ -129,7 +117,7 @@ export default function DeployPage() {
|
||||
</Typography>
|
||||
|
||||
<div style={{ margin: "1rem 0", textAlign: "center" }}>
|
||||
{confirmProject && confirmFirestore && confirmAuth ? (
|
||||
{confirmProject && confirmAuth ? (
|
||||
<a
|
||||
href={EXTERNAL_LINKS.rowyRunDeploy}
|
||||
target="_blank"
|
||||
|
||||
Reference in New Issue
Block a user