Spaces:
Running
Running
Upload 22 files
Browse files
flare-ui/src/app/components/projects/projects.component.ts
CHANGED
|
@@ -64,7 +64,7 @@ import { ApiService, Project } from '../../services/api.service';
|
|
| 64 |
<h3>{{ project.name }}</h3>
|
| 65 |
<p>{{ project.caption || 'No description' }}</p>
|
| 66 |
<div class="project-meta">
|
| 67 |
-
<span>Versions: {{ project.versions
|
| 68 |
<span>Status: {{ project.enabled ? 'β Enabled' : 'β Disabled' }}</span>
|
| 69 |
<span>Last update: {{ getRelativeTime(project.last_update_date) }}</span>
|
| 70 |
</div>
|
|
@@ -97,7 +97,7 @@ import { ApiService, Project } from '../../services/api.service';
|
|
| 97 |
<tr [class.deleted]="project.deleted">
|
| 98 |
<td>{{ project.name }}</td>
|
| 99 |
<td>{{ project.caption || '-' }}</td>
|
| 100 |
-
<td>{{ project.versions
|
| 101 |
<td>
|
| 102 |
@if (project.enabled) {
|
| 103 |
<span class="status-badge enabled">β</span>
|
|
@@ -337,7 +337,7 @@ export class ProjectsComponent implements OnInit {
|
|
| 337 |
}
|
| 338 |
|
| 339 |
getPublishedCount(project: Project): number {
|
| 340 |
-
return project.versions
|
| 341 |
}
|
| 342 |
|
| 343 |
getRelativeTime(timestamp: string): string {
|
|
|
|
| 64 |
<h3>{{ project.name }}</h3>
|
| 65 |
<p>{{ project.caption || 'No description' }}</p>
|
| 66 |
<div class="project-meta">
|
| 67 |
+
<span>Versions: {{ project.versions.length || 0 }} ({{ getPublishedCount(project) }} published)</span>
|
| 68 |
<span>Status: {{ project.enabled ? 'β Enabled' : 'β Disabled' }}</span>
|
| 69 |
<span>Last update: {{ getRelativeTime(project.last_update_date) }}</span>
|
| 70 |
</div>
|
|
|
|
| 97 |
<tr [class.deleted]="project.deleted">
|
| 98 |
<td>{{ project.name }}</td>
|
| 99 |
<td>{{ project.caption || '-' }}</td>
|
| 100 |
+
<td>{{ project.versions.length || 0 }} ({{ getPublishedCount(project) }} published)</td>
|
| 101 |
<td>
|
| 102 |
@if (project.enabled) {
|
| 103 |
<span class="status-badge enabled">β</span>
|
|
|
|
| 337 |
}
|
| 338 |
|
| 339 |
getPublishedCount(project: Project): number {
|
| 340 |
+
return project.versions.filter(v => v.published).length || 0;
|
| 341 |
}
|
| 342 |
|
| 343 |
getRelativeTime(timestamp: string): string {
|
flare-ui/src/app/components/test/test.component.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
| 1 |
import { Component, inject } from '@angular/core';
|
| 2 |
import { CommonModule } from '@angular/common';
|
|
|
|
| 3 |
import { ApiService } from '../../services/api.service';
|
| 4 |
|
| 5 |
interface TestResult {
|
|
@@ -24,7 +25,7 @@ interface TestRun {
|
|
| 24 |
@Component({
|
| 25 |
selector: 'app-test',
|
| 26 |
standalone: true,
|
| 27 |
-
imports: [CommonModule],
|
| 28 |
template: `
|
| 29 |
<div class="test-container">
|
| 30 |
<h2>System Tests</h2>
|
|
|
|
| 1 |
import { Component, inject } from '@angular/core';
|
| 2 |
import { CommonModule } from '@angular/common';
|
| 3 |
+
import { FormsModule } from '@angular/forms';
|
| 4 |
import { ApiService } from '../../services/api.service';
|
| 5 |
|
| 6 |
interface TestResult {
|
|
|
|
| 25 |
@Component({
|
| 26 |
selector: 'app-test',
|
| 27 |
standalone: true,
|
| 28 |
+
imports: [CommonModule, FormsModule],
|
| 29 |
template: `
|
| 30 |
<div class="test-container">
|
| 31 |
<h2>System Tests</h2>
|