Skip to content

SER-329 Add view certificate logs option - #2318

Merged
ItzNotABug merged 8 commits into
mainfrom
feat-add-view-certiicate-logs
Sep 11, 2025
Merged

SER-329 Add view certificate logs option#2318
ItzNotABug merged 8 commits into
mainfrom
feat-add-view-certiicate-logs

Conversation

@vermakhushboo

@vermakhushboo vermakhushboo commented Sep 3, 2025

Copy link
Copy Markdown
Contributor

What does this PR do?

Add View logs if certificate logs are present. Add new modal for view logs.

Screenshot 2025-09-03 at 1 07 30 PM Screenshot 2025-09-03 at 12 08 51 PM

Test Plan

(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work.)

Related PRs and Issues

(If this PR is related to any other PR or resolves any issue or related to any issue link all related PR and issues here.)

Have you read the Contributing Guidelines on issues?

(Write your answer here.)

Summary by CodeRabbit

  • New Features

    • Added a “View logs” action for domain proxy rules in Sites → Domains when logs exist and the rule is unverified/verifying.
    • Opens a "Certificate logs" modal showing the selected rule’s logs; modal respects app theme, includes a scroll button, has fixed viewer height, and is compact (medium) with no footer.
    • Added a divider in the action menu to separate the log action.
  • Style

    • Changed menu anchor text from "DNS Records" to "DNS records".

@appwrite

appwrite Bot commented Sep 3, 2025

Copy link
Copy Markdown

Console

Project ID: 688b7bf400350cbd60e9

Sites (2)
Site Status Logs Preview QR
 console-qa
688b7cf6003b1842c9dc
Ready Ready View Logs Preview URL QR Code
 console-cloud
688b7c18002b9b871a8f
Ready Ready View Logs Preview URL QR Code

Note

Cursor pagination performs better than offset pagination when loading further pages.

@coderabbitai

coderabbitai Bot commented Sep 3, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

Adds a “View logs” action for domain proxy rules in the sites domains table and a new ViewLogsModal component. The domains table imports IconTerminal, Divider, and ViewLogsModal; adds internal state (showLogs, selectedProxyRule); conditionally shows a “View logs” action and inserts a divider when rule.logs exists and rule.status is 'unverified' or 'verifying'; clicking the action sets selectedProxyRule, opens the modal, and closes the menu. ViewLogsModal exposes props show and selectedProxyRule, mounts when showLogs is true, and displays a themed Logs viewer (height 250px, modal size "m", footer hidden). Also changes anchor text "DNS Records" → "DNS records". No public APIs were changed.

Possibly related PRs

Suggested reviewers

  • HarshMN2345

Pre-merge checks (3 passed)

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title "SER-329 Add view certificate logs option" succinctly and accurately summarizes the PR's primary change (adding a "View logs" action and modal for certificate logs) and directly reflects the files and objectives in the changeset.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a0f16de and 3f959cb.

📒 Files selected for processing (1)
  • src/routes/(console)/project-[region]-[project]/sites/site-[site]/domains/viewLogsModal.svelte (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/routes/(console)/project-[region]-[project]/sites/site-[site]/domains/viewLogsModal.svelte
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat-add-view-certiicate-logs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (2)
src/routes/(console)/project-[region]-[project]/sites/site-[site]/domains/table.svelte (2)

102-113: Guard against empty logs to avoid a no-op action.

If logs can be an empty string/array, the button will still appear. Prefer checking length when available.

-                                {#if rule.logs}
+                                {#if rule.logs?.length}
                                     <ActionMenu.Item.Button
                                         leadingIcon={IconTerminal}
                                         on:click={(e) => {
                                             selectedProxyRule = rule;
                                             showLogs = true;
                                             toggle(e);
                                         }}>
                                         View logs
                                     </ActionMenu.Item.Button>
-                                {/if}
+                                {/if}

Optionally, emit an analytics event on click for observability (mirroring Delete).


124-131: Avoid bespoke spacing for dividers (if a native divider exists).

If Pink Svelte exposes an ActionMenu-specific divider, prefer it to inline styles for consistency. Otherwise, consider replacing inline styles with design tokens/util classes used elsewhere.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 8d60e38 and 49f08b6.

📒 Files selected for processing (2)
  • src/routes/(console)/project-[region]-[project]/sites/site-[site]/domains/table.svelte (5 hunks)
  • src/routes/(console)/project-[region]-[project]/sites/site-[site]/domains/viewLogsModal.svelte (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: e2e
  • GitHub Check: build
🔇 Additional comments (4)
src/routes/(console)/project-[region]-[project]/sites/site-[site]/domains/table.svelte (3)

6-12: Imports LGTM.

IconTerminal, Divider, and ViewLogsModal imports align with usage; no dead imports spotted.

Also applies to: 19-21, 24-24


36-36: State wiring for logs modal looks correct.

showLogs is properly initialized and later bound to the modal.


162-164: Modal integration LGTM.

Conditional mount and prop binding are correct; lifecycle ordering (set selectedProxyRule before opening) is safe.

src/routes/(console)/project-[region]-[project]/sites/site-[site]/domains/viewLogsModal.svelte (1)

7-13: Please provide the Logs component’s source (e.g. Logs.svelte) or the package’s type definitions/package.json from @appwrite.io/pink-svelte so I can confirm the exact logs prop type.

{#if rule.logs || (rule.status !== 'verified' && rule.status !== 'verifying')}
<div
style:margin-inline="-1rem"
style:padding-block-start="0.25rem"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we wrap this in a class (action-menu-divider) instead of using inline styles?
.action-menu-divider { margin-inline: -1rem; padding-block-start: 0.25rem; padding-block-end: 0.25rem; }

@vermakhushboo vermakhushboo changed the title Add view certificate logs option SER-329 Add view certificate logs option Sep 11, 2025
@ItzNotABug
ItzNotABug merged commit ec56f18 into main Sep 11, 2025
3 checks passed
@ItzNotABug
ItzNotABug deleted the feat-add-view-certiicate-logs branch September 11, 2025 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants