Skip to content

Beta#7

Merged
tayyebi merged 4 commits intomainfrom
beta
Jan 7, 2026
Merged

Beta#7
tayyebi merged 4 commits intomainfrom
beta

Conversation

@tayyebi
Copy link
Copy Markdown
Contributor

@tayyebi tayyebi commented Jan 7, 2026

No description provided.

- Introduced a new utility function `format_status` to standardize status display across the application.
- Updated the `InstanceView` model to include a `status_display` field for formatted status representation.
- Modified API handlers and templates to utilize the new `status_display` for improved user experience and consistency in status presentation.
- Adjusted CSS styles for status badges to reflect the new status formatting.
- Refactored `load_instances_for_user` to implement pagination using bookmarks, improving data retrieval efficiency.
- Updated `InstanceView` model to include `main_ipv6` alongside `main_ip` for better network information representation.
- Introduced `load_ssh_keys_paginated` function to support client-side pagination for SSH keys, enhancing user experience.
- Modified SSH keys handler and templates to accommodate pagination, including controls for navigating through pages.
- Adjusted instance templates to display both IPv4 and IPv6 addresses, improving clarity in network information.
…plates

- Replaced the existing list filters with a new per-page selector for improved layout and usability.
- Enhanced pagination controls to include ellipsis for better navigation between pages.
- Updated CSS styles for pagination elements to ensure consistent design across templates.
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR implements pagination for SSH keys and instances, adds IPv6 network display, and introduces a status formatter utility to improve status display consistency across the application.

Key Changes:

  • Added pagination controls with ellipsis support for SSH keys and instances pages
  • Introduced a status formatter utility to convert raw status values (e.g., "preparing_disk") to human-readable formats (e.g., "Preparing Disk")
  • Added IPv6 address display in the instances table's Network column
  • Refactored instances API to use bookmark-based pagination for retrieving all instances

Reviewed changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
templates/ssh_keys.html Added pagination UI with per-page selector and page navigation
templates/instances.html Moved per-page selector into pagination container, added Network column with IPv4/IPv6 display, updated pagination with ellipsis support
templates/instance_detail.html Added status badge styling to the detail page status field
static/styles.css Updated status badge classes to match new status values, added pagination ellipsis styling, removed unused list-filters styles
src/utils/status_formatter.rs New utility to format raw status strings into display-friendly format
src/utils/mod.rs Exported the new status_formatter module
src/models/instance_view.rs Added status_display and main_ipv6 fields to InstanceView struct
src/templates/ssh_keys_page_template.rs Added pagination fields to template struct
src/templates/instance_detail_template.rs Added status field for badge rendering
src/handlers/ssh_keys.rs Implemented pagination using new query struct and paginated API wrapper
src/handlers/instances.rs Updated handlers to use status_display and populate IPv6 addresses
src/handlers/access.rs Updated to populate status_display and network fields for instances
src/handlers/helpers.rs Added load_ssh_keys_paginated_wrapper function
src/api/ssh_keys.rs Implemented client-side pagination for SSH keys, changed API limit parameter
src/api/instances.rs Refactored to use bookmark-based pagination for fetching all instances
src/api/mod.rs Exported PaginatedSshKeys struct
src/services/instance_service.rs Updated get_instance_for_action to populate new fields
Comments suppressed due to low confidence (1)

src/services/instance_service.rs:73

  • This default InstanceView initialization is duplicated across multiple files and functions. Consider extracting this into a helper function like InstanceView::default_with_id(instance_id) or a method on InstanceView to improve maintainability and reduce code duplication.
    let mut instance = InstanceView {
        id: instance_id.to_string(),
        hostname: "(no hostname)".into(),
        region: "".into(),
        main_ip: None,
        main_ipv6: None,
        status: "".into(),
        status_display: "".into(),
        vcpu_count_display: "—".into(),
        ram_display: "—".into(),
        disk_display: "—".into(),
        os: None,
    };

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/api/ssh_keys.rs
Comment thread src/handlers/instances.rs
Comment thread src/handlers/instances.rs
Comment thread src/handlers/instances.rs
Comment thread src/handlers/instances.rs
Comment thread src/utils/status_formatter.rs
- Introduced a new route for upcoming features in the application, allowing users to access a dedicated page for features under development.
- Created a 'Coming Soon' template to display feature information, including a user-friendly message and a link back to the instances page.
- Updated the main application router to include the new route and modified the base template to link to various upcoming features.
- Added CSS styles for the new button and adjusted existing styles for better layout consistency.
@tayyebi tayyebi merged commit c891e35 into main Jan 7, 2026
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.

3 participants