Skip to content

Commit

Permalink
Add last crawled time to app details
Browse files Browse the repository at this point in the history
  • Loading branch information
ddxv committed Dec 13, 2024
1 parent 6f8441c commit ce9d29d
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 31 deletions.
1 change: 1 addition & 0 deletions backend/dbcon/queries.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,7 @@ def clean_app_df(df: pd.DataFrame) -> pd.DataFrame:
"updated_at",
"adstxt_last_crawled",
"sdk_last_crawled",
"sdk_successful_last_crawled",
]
for x in date_cols:
if x not in df.columns:
Expand Down
3 changes: 2 additions & 1 deletion backend/dbcon/sql/query_single_app.sql
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ SELECT
adstxt_crawl_result,
version_code,
sdk_last_crawled,
sdk_crawl_result
sdk_crawl_result,
sdk_successful_last_crawled
FROM
store_apps_overview
WHERE
Expand Down
72 changes: 42 additions & 30 deletions frontend/src/routes/apps/[id]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,22 @@
<!-- Developer Information Section -->
<WhiteCard>
{#snippet title()}
Developer Details
App Details
{/snippet}
<div class="space-y-2">
<div class="space-y-2 p-2">
<div class="flex items-center gap-2">
<span class="font-medium">Store ID:</span>
<span>{myapp.store_id}</span>
</div>
<div class="flex items-center gap-2">
<span class="font-medium">First Released:</span>
<span>{myapp.release_date}</span>
</div>
<div class="flex items-center gap-2">
<span class="font-medium">Store Last Updated:</span>
<span>{myapp.store_last_updated}</span>
</div>

{#if myapp.developer_id}
<div class="flex items-center gap-2">
<span class="font-medium">Developer:</span>
Expand Down Expand Up @@ -168,46 +181,34 @@
<!-- App Information Section -->
<WhiteCard>
{#snippet title()}
App Details
App Tracking Status
{/snippet}
<div class="space-y-2">
<div class="space-y-2 p-2">
<div class="flex items-center gap-2">
<span class="font-medium">Store ID:</span>
<span>{myapp.store_id}</span>
<span class="font-medium">Crawl Status:</span>
<span
class={myapp.crawl_result == 1 ? 'text-success-900-100' : 'text-error-900-100'}
>
{myapp.crawl_result == 1 ? 'Success' : 'Failed'}
</span>
</div>
<div class="flex items-center gap-2">
<span class="font-medium">First Released:</span>
<span>{myapp.release_date}</span>
<span class="font-medium">Store First Crawled:</span>
<span>{myapp.created_at}</span>
</div>
<div class="flex items-center gap-2">
<span class="font-medium">Store Last Updated:</span>
<span>{myapp.store_last_updated}</span>
<span class="font-medium">Store Last Crawled:</span>
<span>{myapp.updated_at}</span>
</div>
</div>
</WhiteCard>

<!-- Tracking Information Section -->
<WhiteCard>
{#snippet title()}
Tracking Status
App-Ads.txt Status
{/snippet}
<div class="space-y-2">
<div class="flex items-center gap-2">
<span class="font-medium">Last Crawled:</span>
<span>{myapp.updated_at}</span>
</div>
<div class="flex items-center gap-2">
<span class="font-medium">First Crawled:</span>
<span>{myapp.created_at}</span>
</div>
<div class="flex items-center gap-2">
<span class="font-medium">Crawl Status:</span>
<span
class={myapp.crawl_result == 1 ? 'text-success-900-100' : 'text-error-900-100'}
>
{myapp.crawl_result == 1 ? 'Success' : 'Failed'}
</span>
</div>
<div class="space-y-2 p-2">
<div class="flex items-center gap-2">
<span class="font-medium">Ads.txt Last Crawled:</span>
<span>{myapp.adstxt_last_crawled}</span>
Expand All @@ -222,12 +223,23 @@
{myapp.adstxt_crawl_result == 1 ? 'Success' : 'Failed'}
</span>
</div>
</div>
</WhiteCard>
<WhiteCard>
{#snippet title()}
SDK Tracking Status
{/snippet}
<div class="space-y-2 p-2">
<div class="flex items-center gap-2">
<span class="font-medium">SDK Last Crawled:</span>
<span class="font-medium">Successful Last Crawled:</span>
<span>{myapp.sdk_successful_last_crawled}</span>
</div>
<div class="flex items-center gap-2">
<span class="font-medium">Last Crawled:</span>
<span>{myapp.sdk_last_crawled}</span>
</div>
<div class="flex items-center gap-2">
<span class="font-medium">SDK Crawl Status:</span>
<span class="font-medium">Last Crawl Status:</span>
<span
class={myapp.sdk_crawl_result == 1
? 'text-success-900-100'
Expand Down
1 change: 1 addition & 0 deletions frontend/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,7 @@ export interface AppFullDetail {
version_code: string;
sdk_last_crawled: string;
sdk_crawl_result: number;
sdk_successful_last_crawled: string;
}

export type CategoryRanks = {
Expand Down

0 comments on commit ce9d29d

Please sign in to comment.