-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Display local ci status in client after simulation
- Loading branch information
1 parent
eae4bcc
commit 8f4b3a8
Showing
21 changed files
with
156 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 9 additions & 1 deletion
10
src/main/java/de/tum/cit/ase/repository/LocalCIStatusRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,16 @@ | ||
package de.tum.cit.ase.repository; | ||
|
||
import de.tum.cit.ase.domain.LocalCIStatus; | ||
import jakarta.transaction.Transactional; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import org.springframework.data.jpa.repository.Modifying; | ||
import org.springframework.data.jpa.repository.Query; | ||
import org.springframework.stereotype.Repository; | ||
|
||
@Repository | ||
public interface LocalCIStatusRepository extends JpaRepository<LocalCIStatus, Long> {} | ||
public interface LocalCIStatusRepository extends JpaRepository<LocalCIStatus, Long> { | ||
@Modifying | ||
@Transactional | ||
@Query(value = "delete from LocalCIStatus status where status.isFinished = false") | ||
void deleteAllNotFinished(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
src/main/webapp/app/layouts/local-ci-status-card/local-ci-status-card.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<div class="card h-100"> | ||
<div class="card-body"> | ||
@if (localCIStatus.finished) { | ||
<strong>All jobs finished.</strong> | ||
<div class="mt-1"> | ||
<p class="mb-0">Total jobs: {{ localCIStatus.totalJobs }}</p> | ||
<p class="mb-0">Executing jobs took {{ localCIStatus.timeInMinutes }} minutes</p> | ||
</div> | ||
} @else { | ||
<strong>Jobs running...</strong> | ||
<div class="mt-1"> | ||
<p class="mb-0">Finished: {{ localCIStatus.totalJobs - localCIStatus.queuedJobs }} / {{ localCIStatus.totalJobs }}</p> | ||
<p class="mb-0">Queued: {{ localCIStatus.queuedJobs }}</p> | ||
<p class="mb-0">Running for {{ localCIStatus.timeInMinutes }} minutes</p> | ||
</div> | ||
} | ||
<p class="mb-0">Average jobs per minute: {{ localCIStatus.avgJobsPerMinute | number: '1.0-1' }}</p> | ||
</div> | ||
</div> |
Empty file.
14 changes: 14 additions & 0 deletions
14
src/main/webapp/app/layouts/local-ci-status-card/local-ci-status-card.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { Component, Input } from '@angular/core'; | ||
import { LocalCIStatus } from '../../entities/simulation/localCIStatus'; | ||
import { DecimalPipe } from '@angular/common'; | ||
|
||
@Component({ | ||
selector: 'jhi-local-ci-status-card', | ||
standalone: true, | ||
imports: [DecimalPipe], | ||
templateUrl: './local-ci-status-card.component.html', | ||
styleUrl: './local-ci-status-card.component.scss', | ||
}) | ||
export class LocalCiStatusCardComponent { | ||
@Input() localCIStatus!: LocalCIStatus; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
.accordion-wrapper { | ||
@media (min-width: 1200px) { | ||
display: flex; | ||
.log-accordion { | ||
width: 75%; | ||
margin-right: 10px; | ||
} | ||
.status-accordion { | ||
width: 25%; | ||
} | ||
} | ||
} |
Oops, something went wrong.