-
Notifications
You must be signed in to change notification settings - Fork 296
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/newjitsu' into newjitsu
- Loading branch information
Showing
17 changed files
with
222 additions
and
357 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Close inactive issues | ||
on: | ||
schedule: | ||
- cron: "30 1 * * *" #once a day at 1:30am | ||
|
||
jobs: | ||
close-issues: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
issues: write | ||
pull-requests: write | ||
steps: | ||
- uses: actions/stale@v5 | ||
with: | ||
days-before-issue-stale: 15 | ||
days-before-issue-close: 15 | ||
stale-issue-label: "🕰️Stale" | ||
exempt-issue-labels: "⏳Postpone" | ||
stale-issue-message: "This issue is stale because it has been open for 30 days with no activity." | ||
close-issue-message: "This issue was closed because it has been inactive for 14 days since being marked as stale." | ||
days-before-pr-stale: -1 | ||
days-before-pr-close: -1 | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { z } from "zod"; | ||
import { Simplify } from "type-fest"; | ||
|
||
export const DomainCheckResponse = z.union([ | ||
z.object({ | ||
ok: z.literal(true), | ||
reason: z.never().optional(), | ||
}), | ||
z.object({ | ||
ok: z.literal(false), | ||
reason: z.union([z.literal("used_by_other_workspace"), z.literal("invalid_domain_name")]), | ||
cnameValue: z.never().optional(), | ||
}), | ||
z.object({ | ||
ok: z.literal(false), | ||
reason: z.literal("requires_cname_configuration"), | ||
cnameValue: z.string().optional(), | ||
}), | ||
]); | ||
|
||
export type DomainCheckResponse = Simplify<z.infer<typeof DomainCheckResponse>>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,6 @@ import { getEeClient } from "../../lib/ee-client"; | |
import { assertDefined, requireDefined } from "juava"; | ||
import { ReloadOutlined } from "@ant-design/icons"; | ||
import { confirmOp, feedbackError } from "../../lib/ui"; | ||
import type { DomainStatus } from "../../lib/server/ee"; | ||
import { getAntdModal, useAntdModal } from "../../lib/modal"; | ||
import { get } from "../../lib/useApi"; | ||
import { Activity, AlertTriangle, Check, Globe, Wrench, Zap } from "lucide-react"; | ||
|
@@ -27,6 +26,7 @@ import { useLinksQuery } from "../../lib/queries"; | |
import { toURL } from "../../lib/shared/url"; | ||
import JSON5 from "json5"; | ||
import { EditorToolbar } from "../../components/EditorToolbar/EditorToolbar"; | ||
import { DomainCheckResponse } from "../../lib/shared/domain-check-response"; | ||
|
||
const Streams: React.FC<any> = () => { | ||
return ( | ||
|
@@ -77,10 +77,10 @@ const CustomDomain: React.FC<{ domain: string; deleteDomain: () => Promise<void> | |
); | ||
const [reloadTrigger, setReloadTrigger] = useState(0); | ||
const [deleting, setDeleting] = useState(false); | ||
const { data, isLoading, error, refetch } = useQuery<DomainStatus>( | ||
const { data, isLoading, error, refetch } = useQuery<DomainCheckResponse>( | ||
["domain-status", domain.toLowerCase(), reloadTrigger], | ||
async () => { | ||
return await eeClient.attachDomain(domain); | ||
return await get(`/api/${workspace.id}/domain-check?domain=${domain.toLowerCase()}`); | ||
}, | ||
{ cacheTime: 0 } | ||
); | ||
|
@@ -94,9 +94,7 @@ const CustomDomain: React.FC<{ domain: string; deleteDomain: () => Promise<void> | |
{/*</div>*/} | ||
<div className={"text-blue-600 w-4 h-4 mr-1.5"}> | ||
<Globe | ||
className={`w-full h-full ${ | ||
error || data?.error ? "text-red-600" : data?.needsConfiguration ? "text-yellow-600" : "text-blue-600" | ||
}`} | ||
className={`w-full h-full ${error ? "text-red-600" : data?.ok ? "text-blue-600" : "text-yellow-600"}`} | ||
/> | ||
</div> | ||
<div className="font-bold text-lg">{domain}</div> | ||
|
@@ -113,14 +111,14 @@ const CustomDomain: React.FC<{ domain: string; deleteDomain: () => Promise<void> | |
<FaExternalLinkAlt /> | ||
</Button> | ||
</Tooltip> | ||
{data?.needsConfiguration && ( | ||
{!data?.ok && ( | ||
<Tooltip title="See configuration instructions"> | ||
<Button | ||
type="text" | ||
danger | ||
disabled={isLoading || deleting} | ||
onClick={() => { | ||
DomainConfigurationInstructions.show({ domain, status: data }); | ||
DomainConfigurationInstructions.show({ domain, status: data! }); | ||
}} | ||
className="border-0" | ||
> | ||
|
@@ -174,29 +172,29 @@ const CustomDomain: React.FC<{ domain: string; deleteDomain: () => Promise<void> | |
</span> | ||
</StatusBadge> | ||
); | ||
} else if (error || data?.error) { | ||
} else if (error) { | ||
return <StatusBadge status="error">ERROR</StatusBadge>; | ||
} else if (data?.needsConfiguration) { | ||
} else if (!data?.ok) { | ||
return <StatusBadge status="warning">Configuration Required</StatusBadge>; | ||
} else { | ||
return <StatusBadge status="success">OK</StatusBadge>; | ||
} | ||
})()} | ||
</div> | ||
{(error || data?.error) && ( | ||
{error && ( | ||
<div className="flex items-start mt-1"> | ||
<div className={"mr-2"}>Description:</div> | ||
<div className="">{`${data?.error || "Internal error"}`}</div> | ||
<div className="">{`${"Internal error"}`}</div> | ||
</div> | ||
)} | ||
{data?.needsConfiguration && ( | ||
{!data?.ok && ( | ||
<div className="flex items-start mt-1"> | ||
<div className={"mr-2"}>Description:</div> | ||
<div className=""> | ||
See{" "} | ||
<a | ||
className={"cursor-pointer"} | ||
onClick={() => DomainConfigurationInstructions.show({ domain, status: data })} | ||
onClick={() => DomainConfigurationInstructions.show({ domain, status: data! })} | ||
> | ||
<u>configuration instructions</u> | ||
</a> | ||
|
@@ -234,25 +232,16 @@ export const DNSRecordTable: React.FC<DNSRecordTableProps> = ({ records }) => { | |
); | ||
}; | ||
|
||
export type DomainInstructionsProps = { domain: string; status: DomainStatus }; | ||
export type DomainInstructionsProps = { domain: string; status: DomainCheckResponse }; | ||
const DomainConfigurationInstructions: React.FC<DomainInstructionsProps> & { | ||
show: (p: DomainInstructionsProps) => void; | ||
} = ({ domain, status }) => { | ||
if (status.needsConfiguration && status.configurationType === "cname") { | ||
if (status.reason === "requires_cname_configuration") { | ||
return ( | ||
<div> | ||
<h3>Set the following record on your DNS provider to continue</h3> | ||
<p className="bg-bgLight py-2 my-4"> | ||
<DNSRecordTable records={[{ type: "CNAME", domain, value: status.cnameValue }]} /> | ||
</p> | ||
</div> | ||
); | ||
} else if (status.needsConfiguration && status.configurationType == "verification") { | ||
return ( | ||
<div> | ||
<h3>Set the following record on your DNS provider to continue</h3> | ||
<p className="bg-bgLight py-2 my-4"> | ||
<DNSRecordTable records={status.verification} /> | ||
<DNSRecordTable records={[{ type: "CNAME", domain, value: status.cnameValue! }]} /> | ||
</p> | ||
</div> | ||
); | ||
|
@@ -282,10 +271,24 @@ const DomainsEditor: React.FC<CustomWidgetProps<string[]>> = props => { | |
const add = async () => { | ||
setAddPending(true); | ||
try { | ||
const { available } = await get(`/api/${workspace.id}/domain-check?domain=${addValue}`); | ||
if (!available) { | ||
feedbackError(`Domain ${addValue} is not available. It is used by other workspace`); | ||
return; | ||
const available: DomainCheckResponse = await get(`/api/${workspace.id}/domain-check?domain=${addValue}`); | ||
if (!available.ok) { | ||
if (available.reason === "used_by_other_workspace") { | ||
feedbackError( | ||
<> | ||
Domain <code>{addValue}</code> is not available. It is used by other workspace. Contact{" "} | ||
<code>[email protected]</code> if you think this is a mistake | ||
</> | ||
); | ||
return; | ||
} else if (available.reason === "invalid_domain_name") { | ||
feedbackError( | ||
<> | ||
Invalid domain name <code>{addValue}</code> | ||
</> | ||
); | ||
return; | ||
} | ||
} | ||
const newVal = [...domains, addValue as string]; | ||
setDomains(newVal); | ||
|
@@ -544,7 +547,7 @@ const StreamsList: React.FC<{}> = () => { | |
}, | ||
domains: { | ||
editor: DomainsEditor, | ||
hidden: !appConfig.ee.available, | ||
hidden: !appConfig.customDomainsEnabled, | ||
displayName: "Custom Tracking Domains", | ||
documentation: ( | ||
<> | ||
|
Oops, something went wrong.
3d57a1b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
new-jitsu – ./webapps/console
ag.ru
logu.au
ozon.ru
sse.ere
erxes.io
baidu.dom
ilmiya.io
sambla.se
bobsec.com
sambla.com
agro4u.life
bluetick.ai
myilmiya.io
protontv.eu
t.quenti.io
alicesec.com
d.askloan.tw
dev.aclis.io
docs.dh19.de
docs.dh19.eu
hunterbi.com
joseviso.com
mydomain.dom
t.thequack.ai
thinkr.com.br
use.jitsu.com
usepolygon.io
www.sambla.se
ajewellers.com
data.uselog.io
gpt.whatfa.com
sidetrekai.com
t.papermark.io
t.saasmonk.app
use2.jitsu.com
w.d2.jitsu.com
www.kellen.top
*.dataspecc.com
app.bluetick.ai
caddy.jitsu.com
data.askloan.tw
enterticket.com
events.mitzu.io
ildar.jitsu.com
jitsu.efeer.com
jitsu.ivve.tech
krestomatio.com
sevenbillion.co
w2.d2.jitsu.com
xrt.webxr.tools
app.jotverse.com
caddy2.jitsu.com
cname2.jitsu.com
data.mysitee.com
data.toptere.com
dev-t.democo.dev
events.quenti.io
utils.doogma.com
worthsystems.com
data.music2me.com
data.timeplus.com
event-gateway.com
test.bigfootproof.com
teste.fazcomex.com.br
analytics.dev.knekt.io
loraboutiquedental.com
notion.twelftree.co.uk
dev-portal.zoopsign.com
event.tradejobsnz.co.nz
investing-poc.jitsu.dev
savvy-replay.jitsu.tech
data.analytics-smart.com
data.handelsregister.app
event.clickncruise.co.uk
jt.fairhopeweb.github.io
savvy-replay2.jitsu.tech
savvy-replay3.jitsu.tech
savvy-replay4.jitsu.tech
track.alquimiaweb.com.br
track.pressance-group.jp
track.uniquecafes.com.br
colectha.agenciavoolu.com
kolectha.agenciavoolu.com
lp.loraboutiquedental.com
stage-portal.zoopsign.com
new-jitsu-jitsu.vercel.app
lodercom-colectha.voolu.shop
warehouse1.trendstyle.com.au
d0.livingdesignsfurniture.com
ingest-load-testing.jitsu.dev
jitsu.precisaosistemas.com.br
analytics.inspiresolutions.app
betteruptime-monitoring.jitsu.dev
canvas.livingdesignsfurniture.com
analytics.dev.inspiresolutions.app
cl9vt45z50001znkunc6v8fmm.d.jitsu.com
clm2jikrm00002v6r5l6niws3.d.jitsu.com
new-jitsu-git-newjitsu-jitsu.vercel.app
3000-rajaraodv-customerdemo-nmpsqwflswt.ws-us102.gitpod.io
new.jitsu.dev