connect tailscale node status through platform gateway
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
@@ -25,10 +25,13 @@ const commitRangeLabels: Record<CommitRange, string> = {
|
||||
|
||||
const commitPageSize = 5;
|
||||
const branchOptions = ['develop', 'release', 'main'];
|
||||
const defaultCicdBaseUrl = 'http://192.168.0.20:8010';
|
||||
|
||||
function repoFullName(repo: GiteaRepo) {
|
||||
return (repo as GiteaRepo & { fullName?: string }).fullName ?? repo.full_name ?? repo.name;
|
||||
return repo.fullName ?? repo.full_name ?? repo.name;
|
||||
}
|
||||
|
||||
function repoHtmlUrl(repo?: GiteaRepo) {
|
||||
return repo?.htmlUrl ?? repo?.html_url ?? '';
|
||||
}
|
||||
|
||||
function splitRepository(repository: string) {
|
||||
@@ -39,13 +42,7 @@ function splitRepository(repository: string) {
|
||||
|
||||
function cicdLabel(pipeline?: CommonAppPipeline) {
|
||||
if (!pipeline) return '-';
|
||||
try {
|
||||
const origin = pipeline.url ? new URL(pipeline.url).origin : '';
|
||||
const baseUrl = origin && !origin.includes(':3000') ? origin : defaultCicdBaseUrl;
|
||||
return `Woodpecker / ${baseUrl}`;
|
||||
} catch {
|
||||
return `Woodpecker / ${defaultCicdBaseUrl}`;
|
||||
}
|
||||
return pipeline.ciUrl ? `Woodpecker / ${pipeline.ciUrl}` : 'Woodpecker';
|
||||
}
|
||||
|
||||
function commitAuthor(commit: GiteaCommit) {
|
||||
@@ -258,7 +255,10 @@ export function CommonAppSourcePage() {
|
||||
<button
|
||||
key={fullName}
|
||||
type="button"
|
||||
className={cn('block w-full px-5 py-4 text-left transition-colors hover:bg-muted/20', selected && 'bg-muted/30')}
|
||||
className={cn(
|
||||
'block w-full px-5 py-4 text-left transition-colors hover:bg-muted/20',
|
||||
selected && 'bg-primary/20 shadow-[inset_4px_0_0_var(--color-primary)] hover:bg-primary/25'
|
||||
)}
|
||||
onClick={() => setSelectedRepository(fullName)}
|
||||
>
|
||||
<div className="flex items-start justify-between gap-3">
|
||||
@@ -300,7 +300,7 @@ export function CommonAppSourcePage() {
|
||||
<div>
|
||||
<p className="text-xs text-muted-foreground">Gitea URL</p>
|
||||
<div className="mt-2 flex h-9 items-center gap-2 rounded-md border border-border bg-background px-3">
|
||||
<p className="min-w-0 flex-1 truncate text-xs text-muted-foreground">{selectedRepo?.html_url ?? '-'}</p>
|
||||
<p className="min-w-0 flex-1 truncate text-xs text-muted-foreground">{repoHtmlUrl(selectedRepo) || '-'}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user