Skip to content

Commit

Permalink
[#674] Displaying the flavor in Web info
Browse files Browse the repository at this point in the history
- pass the Flavor through HTTP
- update the html to display the flavor
- adapt structs and tests
  • Loading branch information
philou committed Aug 13, 2024
1 parent b7c96a4 commit d9d2249
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/http/api/session_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ type sessionInfo struct {
VCSName string `json:"vcsName"`
VCSSessionSummary string `json:"vcsSession"`
CommitOnFail bool `json:"commitOnFail"`
Flavor string `json:"flavor"`
GitAutoPush bool `json:"gitAutoPush"`
MessageSuffix string `json:"messageSuffix"`
}
Expand All @@ -51,6 +52,7 @@ func SessionInfoGetHandler(c *gin.Context) {
VCSName: info.VCSName,
VCSSessionSummary: info.VCSSessionSummary,
CommitOnFail: info.CommitOnFail,
Flavor: info.Flavor,
GitAutoPush: info.GitAutoPush,
MessageSuffix: info.MessageSuffix,
}
Expand Down
1 change: 1 addition & 0 deletions src/http/api/session_info_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ func Test_session_info_get_handler(t *testing.T) {
VCSName: info.VCSName,
VCSSessionSummary: info.VCSSessionSummary,
CommitOnFail: info.CommitOnFail,
Flavor: info.Flavor,
GitAutoPush: info.GitAutoPush,
MessageSuffix: info.MessageSuffix,
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ <h3 class="mbr-fonts-style mbr-bold mbr-section-title4 display-6">VCS Commit Mes
</ul>
<h3 class="mbr-fonts-style mbr-bold mbr-section-title4 display-6">VCS
Commit-On-Fail {{ sessionInfo.commitOnFail | onOff }}</h3>
<h3 class="mbr-fonts-style mbr-bold mbr-section-title4 display-6">
Flavor {{ sessionInfo.flavor | showEmpty }}</h3>
<h3 class="mbr-fonts-style mbr-bold mbr-section-title4 display-6">Git
Auto-Push {{ sessionInfo.gitAutoPush | onOff }}</h3>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import {TcrSessionInfoComponent} from "./tcr-session-info.component";
const sample: TcrSessionInfo = {
baseDir: "/my/base/dir",
commitOnFail: false,
flavor: "nice",
gitAutoPush: false,
language: "java",
messageSuffix: "my-suffix",
Expand Down
1 change: 1 addition & 0 deletions webapp/src/app/interfaces/tcr-session-info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export interface TcrSessionInfo {
vcsName: string;
vcsSession: string;
commitOnFail: boolean;
flavor: string;
gitAutoPush: boolean;
messageSuffix: string;
}
1 change: 1 addition & 0 deletions webapp/src/app/services/tcr-session-info.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ describe('TcrSessionInfoService', () => {
const sample: TcrSessionInfo = {
baseDir: "/my/base/dir",
commitOnFail: false,
flavor: "nice",
gitAutoPush: false,
language: "java",
messageSuffix: "my-suffix",
Expand Down

0 comments on commit d9d2249

Please sign in to comment.