Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Feat/template cron column - #4106

Open
hungz wants to merge 4 commits into
semaphoreui:developfrom
hungz:feat/template-cron-column
Open

Feat/template cron column#4106
hungz wants to merge 4 commits into
semaphoreui:developfrom
hungz:feat/template-cron-column

Conversation

@hungz

@hungz hungz commented Jul 30, 2026

Copy link
Copy Markdown

fix issue #1794

Summary by CodeRabbit

  • New Features

    • Added a Cron column to project templates, displaying scheduled run times in the configured timezone.
    • Added graceful handling for missing or invalid schedule times.
  • Chores

    • Updated the documentation subproject reference.

@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 962ad868-e2cf-4cb7-ada6-37d9fd30502c

📥 Commits

Reviewing files that changed from the base of the PR and between 3c25d57 and 05a71e5.

📒 Files selected for processing (1)
  • web/src/views/project/Templates.vue
🚧 Files skipped from review as they are similar to previous changes (1)
  • web/src/views/project/Templates.vue

📝 Walkthrough

Walkthrough

Templates.vue now loads project schedules and displays per-template cron information, formatting run_at timestamps with the configured timezone. The docs subproject pointer is also updated.

Changes

Template schedule display

Layer / File(s) Summary
Schedule loading and timezone formatting
web/src/views/project/Templates.vue
Schedules are loaded with project resources, tracked in component state, included in readiness checks, grouped by template, and formatted with Day.js using the configured timezone.
Cron table rendering
web/src/views/project/Templates.vue
A non-sortable cron column displays formatted run times, cron expressions, inactive styling, or when no schedules exist.

Docs subproject update

Layer / File(s) Summary
Docs subproject reference
docs
The docs subproject pointer is updated to a newer commit.

Estimated code review effort: 2 (Simple) | ~10 minutes

Sequence Diagram(s)

sequenceDiagram
  participant TemplatesView
  participant SchedulesResource
  participant TemplatesTable
  TemplatesView->>SchedulesResource: fetch project schedules
  SchedulesResource-->>TemplatesView: return schedule records
  TemplatesView->>TemplatesTable: render timezone-aware cron values
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main change: adding a cron column to templates.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
web/src/views/project/Templates.vue (1)

284-301: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Run and address the frontend lint failures.

web && npm run lint exits with lint errors, including dependency/import errors in web/gulp-gpt-translate.js and web/vue.config.js; ignoring known console/asset-size warnings is not applicable here.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@web/src/views/project/Templates.vue` around lines 284 - 301, Run the frontend
lint command and resolve every reported error, prioritizing dependency/import
failures in gulp-gpt-translate.js and vue.config.js. Correct invalid or missing
imports and any related dependency configuration, then address remaining lint
errors such as unused or misordered imports in Templates.vue. Do not suppress
errors or treat console/asset-size warnings as acceptable.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@web/src/views/project/Templates.vue`:
- Around line 284-301: Run the frontend lint command and resolve every reported
error, prioritizing dependency/import failures in gulp-gpt-translate.js and
vue.config.js. Correct invalid or missing imports and any related dependency
configuration, then address remaining lint errors such as unused or misordered
imports in Templates.vue. Do not suppress errors or treat console/asset-size
warnings as acceptable.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: da2152b0-1daa-4973-8802-a1ef1554e1cf

📥 Commits

Reviewing files that changed from the base of the PR and between 0bd3589 and 3c25d57.

📒 Files selected for processing (2)
  • docs
  • web/src/views/project/Templates.vue

Copilot AI 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.

Pull request overview

Adds a new “Cron” column on the Project → Templates table so users can quickly see each template’s schedule(s), including “run once” (run_at) schedules formatted in the configured system timezone (issue #1794).

Changes:

  • Add a cron table column with per-template schedule rendering (cron format or formatted run_at).
  • Load project schedules alongside inventory/environment/repositories and gate page readiness on it.
  • Add Day.js timezone formatting support and use systemInfo.schedule_timezone when formatting run_at.

Comment on lines +411 to +413
getTemplateSchedules(item) {
return (this.schedules || []).filter((s) => s.template_id === item.id);
},
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