Skip to content
This repository was archived by the owner on May 14, 2025. It is now read-only.

Commit 349bb74

Browse files
committed
UI now supports checksum for data flow components
resolves #556
1 parent 771c449 commit 349bb74

File tree

6 files changed

+114
-27
lines changed

6 files changed

+114
-27
lines changed

ui/src/app/about/about-details.component.html

Lines changed: 49 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,24 @@
11
<h1 [ngBusy]="busy">About Details</h1>
22
<h2>Data Flow Server Implementation</h2>
33

4-
<h2 *ngIf="!dataflowVersionInfo" class="text-warning" id="serverWarningError">Error occurred when attempting to obtain about info from server.</h2>
4+
<h2 *ngIf="!dataflowVersionInfo" class="text-warning" id="serverWarningError">Obtaining about info from server.</h2>
55

66
<div *ngIf="dataflowVersionInfo">
77
<table class="table table-hover" id="dataFlowVersionTable">
88
<tbody>
99
<tr>
10-
<td class="col-xs-6">Name</td><td>{{dataflowVersionInfo.versionInfo.implementation.name}}</td>
10+
<td class="col-xs-6">Name</td><td>{{dataflowVersionInfo.versionInfo.implementationDependency.name}}</td>
1111
</tr>
1212
<tr>
13-
<td class="col-xs-6">Version</td><td>{{dataflowVersionInfo.versionInfo.implementation.version}}</td>
13+
<td class="col-xs-6">Version</td><td>{{dataflowVersionInfo.versionInfo.implementationDependency.version}}</td>
1414
</tr>
15+
<tr>
16+
<td class="col-xs-6">Checksum Sha1</td><td>{{dataflowVersionInfo ? dataflowVersionInfo.versionInfo.implementationDependency.checksumSha1 ? dataflowVersionInfo.versionInfo.implementationDependency.checksumSha1 : 'N/A' : 'N/A'}}</td>
17+
</tr>
18+
<tr>
19+
<td class="col-xs-6">Checksum Sha256</td><td>{{dataflowVersionInfo ? dataflowVersionInfo.versionInfo.implementationDependency.checksumSha256 ? dataflowVersionInfo.versionInfo.implementationDependency.checksumSha256 : 'N/A' : 'N/A'}}</td>
20+
</tr>
21+
1522
</tbody>
1623
</table>
1724

@@ -91,13 +98,49 @@ <h2>Version Information</h2>
9198
<table class="table table-hover" id="versionInformationTable">
9299
<tbody>
93100
<tr>
94-
<td class="col-xs-6">Implementation</td><td>{{dataflowVersionInfo.versionInfo.implementation.version}} ({{dataflowVersionInfo.versionInfo.implementation.name}})</td>
101+
<td class="col-xs-6">Implementation Version</td>
102+
<td>{{dataflowVersionInfo.versionInfo.implementationDependency.version}} ({{dataflowVersionInfo.versionInfo.implementationDependency.name}})</td>
103+
</tr>
104+
<tr>
105+
<td class="col-xs-6">Implementation Checksum Sha1</td>
106+
<td>{{dataflowVersionInfo.versionInfo.implementationDependency.checksumSha1 ? dataflowVersionInfo.versionInfo.implementationDependency.checksumSha1 : 'N/A'}}</td>
107+
</tr>
108+
<tr>
109+
<td class="col-xs-6">Implementation Checksum Sha256</td>
110+
<td>{{dataflowVersionInfo.versionInfo.implementationDependency.checksumSha256 ? dataflowVersionInfo.versionInfo.implementationDependency.checksumSha256 : 'N/A'}}</td>
111+
</tr>
112+
<tr>
113+
<td class="col-xs-6">Core</td><td>{{dataflowVersionInfo.versionInfo.coreDependency.version}} ({{dataflowVersionInfo.versionInfo.coreDependency.name}})</td>
114+
</tr>
115+
<tr>
116+
<td class="col-xs-6">Core Checksum Sha1</td>
117+
<td>{{dataflowVersionInfo.versionInfo.coreDependency.checksumSha1 ? dataflowVersionInfo.versionInfo.coreDependency.checksumSha1 : 'N/A'}}</td>
118+
</tr>
119+
<tr>
120+
<td class="col-xs-6">Core Checksum Sha256</td>
121+
<td>{{dataflowVersionInfo.versionInfo.coreDependency.checksumSha256 ? dataflowVersionInfo.versionInfo.coreDependency.checksumSha256 : 'N/A'}}</td>
122+
</tr>
123+
<tr>
124+
<td class="col-xs-6">Dashboard</td><td>{{dataflowVersionInfo.versionInfo.dashboardDependency.version}} ({{dataflowVersionInfo.versionInfo.dashboardDependency.name}})</td>
125+
</tr>
126+
<tr>
127+
<td class="col-xs-6">Dashboard Checksum Sha1</td>
128+
<td>{{dataflowVersionInfo.versionInfo.dashboardDependency.checksumSha1 ? dataflowVersionInfo.versionInfo.dashboardDependency.checksumSha1 : 'N/A'}}</td>
129+
</tr>
130+
<tr>
131+
<td class="col-xs-6">Dashboard Checksum Sha256</td>
132+
<td>{{dataflowVersionInfo.versionInfo.dashboardDependency.checksumSha256 ? dataflowVersionInfo.versionInfo.dashboardDependency.checksumSha256 : 'N/A'}}</td>
133+
</tr>
134+
<tr>
135+
<td class="col-xs-6">Shell</td><td>{{dataflowVersionInfo.versionInfo.shellDependency.version}} ({{dataflowVersionInfo.versionInfo.shellDependency.name}})</td>
95136
</tr>
96137
<tr>
97-
<td class="col-xs-6">Core</td><td>{{dataflowVersionInfo.versionInfo.core.version}} ({{dataflowVersionInfo.versionInfo.core.name}})</td>
138+
<td class="col-xs-6">Shell Checksum Sha1</td>
139+
<td>{{dataflowVersionInfo.versionInfo.shellDependency.checksumSha1 ? dataflowVersionInfo.versionInfo.shellDependency.checksumSha1 : 'N/A'}}</td>
98140
</tr>
99141
<tr>
100-
<td class="col-xs-6">Dashboard</td><td>{{dataflowVersionInfo.versionInfo.dashboard.version}} ({{dataflowVersionInfo.versionInfo.dashboard.name}})</td>
142+
<td class="col-xs-6">Shell Checksum Sha256</td>
143+
<td>{{dataflowVersionInfo.versionInfo.shellDependency.checksumSha256 ? dataflowVersionInfo.versionInfo.shellDependency.checksumSha256 : 'N/A'}}</td>
101144
</tr>
102145
</tbody>
103146
</table>

ui/src/app/about/about-details.component.spec.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ describe('AboutDetailsComponent', () => {
5454
expect(component).toBeTruthy();
5555

5656
// verify Data Flow Server Implementation
57-
validateColumnValues('dataFlowVersionTable', ['Name', 'Version'], 0);
58-
validateColumnValues('dataFlowVersionTable', ['FOO', 'BAR'], 1);
57+
validateColumnValues('dataFlowVersionTable', ['Name', 'Version', 'Checksum Sha1', 'Checksum Sha256'], 0);
58+
validateColumnValues('dataFlowVersionTable', ['FOO', 'BAR', '', '' ], 1);
5959

6060
// Verify Enabled Features
6161
validateColumnValues('enabledFeaturesTable', ['Analytics', 'Streams', 'Tasks'], 0);
@@ -69,8 +69,12 @@ describe('AboutDetailsComponent', () => {
6969
validateTdValue('roles', 'base_role');
7070

7171
// Starting Version
72-
validateColumnValues('versionInformationTable', ['Implementation', 'Core', 'Dashboard'], 0);
73-
validateColumnValues('versionInformationTable', ['BAR (FOO)', 'BOO (BAZ)', 'QIX (QUE)'], 1);
72+
validateColumnValues('versionInformationTable', ['Implementation', 'Implementation Checksum Sha1',
73+
'Implementation Checksum Sha256', 'Core', 'Core Checksum Sha1', 'Core Checksum Sha256', 'Dashboard',
74+
'Dashboard Checksum Sha1', 'Dashboard Checksum Sha256', 'Shell', 'Shell Checksum Sha1', 'Shell Checksum Sha256'], 0);
75+
validateColumnValues('versionInformationTable', ['BAR (FOO)', 'checksumSample1',
76+
'checksumSample256', 'BOO (BAZ)', 'checksumSample1', 'checksumSample256', 'QIX (QUE)', 'checksumSample1',
77+
'checksumSample256', 'QUUX (QUX)', 'checksumSample1', 'checksumSample256'], 1);
7478

7579
// App Deployer Table
7680
validateColumnValues('appDeployerTable', ['Implementation Version', 'Name', 'Spi Version',

ui/src/app/about/about-info.model.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
export class AboutInfo {
22
constructor(
33
public id: number,
4-
public name: string) { }
4+
public name: string,
5+
public checksumSha1: string,
6+
public checksumSha256: string,
7+
public url: string) { }
58
}

ui/src/app/about/about.component.html

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,21 @@ <h1 [ngBusy]="busy">About</h1>
77

88
<h2 *ngIf="dataflowVersionInfo">Data Flow Server Implementation</h2>
99

10-
<h2 *ngIf="!dataflowVersionInfo" class="text-warning" id="serverWarningError">Error occurred when attempting to obtain about info from server.</h2>
10+
<h2 *ngIf="!dataflowVersionInfo" class="text-warning" id="serverWarningError">Obtaining about info from server.</h2>
1111

1212
<table id="dataFlowVersionTable" class="table table-hover" *ngIf="dataflowVersionInfo">
1313
<tbody>
1414
<tr>
15-
<td>Name</td><td>{{dataflowVersionInfo ? dataflowVersionInfo.versionInfo.implementation.name : 'N/A'}}</td>
15+
<td>Name</td><td>{{dataflowVersionInfo ? dataflowVersionInfo.versionInfo.implementationDependency.name : 'N/A'}}</td>
1616
</tr>
1717
<tr>
18-
<td>Version</td><td>{{dataflowVersionInfo ? dataflowVersionInfo.versionInfo.implementation.version : 'N/A'}}</td>
18+
<td>Version</td><td>{{dataflowVersionInfo ? dataflowVersionInfo.versionInfo.implementationDependency.version : 'N/A'}}</td>
19+
</tr>
20+
<tr>
21+
<td>Checksum Sha1</td><td>{{dataflowVersionInfo ? dataflowVersionInfo.versionInfo.implementationDependency.checksumSha1 ? dataflowVersionInfo.versionInfo.implementationDependency.checksumSha1 : 'N/A' : 'N/A'}}</td>
22+
</tr>
23+
<tr>
24+
<td>Checksum Sha256</td><td>{{dataflowVersionInfo ? dataflowVersionInfo.versionInfo.implementationDependency.checksumSha256 ? dataflowVersionInfo.versionInfo.implementationDependency.checksumSha256 : 'N/A' : 'N/A'}}</td>
1925
</tr>
2026
</tbody>
2127
</table>
@@ -29,8 +35,8 @@ <h2 *ngIf="!dataflowVersionInfo" class="text-warning" id="serverWarningError">Er
2935
<h2 style="margin-top: 1em;" *ngIf="dataflowVersionInfo">Get the Spring Cloud Data Flow Shell</h2>
3036

3137
<p *ngIf="dataflowVersionInfo" class="index-page--subtitle">As an alternative to the Dashboard UI, you can also
32-
<a href="https://repo.spring.io/libs-snapshot/org/springframework/cloud/spring-cloud-dataflow-shell/{{dataflowVersionInfo.versionInfo.core.version}}/spring-cloud-dataflow-shell-{{dataflowVersionInfo.versionInfo.core.version}}.jar"
33-
target="_blank">download the compatible version of the Shell</a> ({{dataflowVersionInfo.versionInfo.core.version}}).</p>
38+
<a href="{{dataflowVersionInfo.versionInfo.shellDependency.url}}"
39+
target="_blank">download the compatible version of the Shell</a> ({{dataflowVersionInfo.versionInfo.shellDependency.version}}).</p>
3440

3541
<h2 *ngIf="dataflowVersionInfo">Need Help or Found an Issue?</h2>
3642

@@ -43,10 +49,10 @@ <h2 *ngIf="dataflowVersionInfo">Need Help or Found an Issue?</h2>
4349
<td>Sources</td><td><a target="_blank" href="https://github.com/spring-cloud/spring-cloud-dataflow">https://github.com/spring-cloud/spring-cloud-dataflow</a></td>
4450
</tr>
4551
<tr>
46-
<td>Documentation</td><td><a target="_blank" href="http://docs.spring.io/spring-cloud-dataflow/docs/{{dataflowVersionInfo.versionInfo.core.version}}/reference/htmlsingle/">http://docs.spring.io/spring-cloud-dataflow/docs/{{dataflowVersionInfo.versionInfo.core.version}}/reference/htmlsingle/</a></td>
52+
<td>Documentation</td><td><a target="_blank" href="http://docs.spring.io/spring-cloud-dataflow/docs/{{dataflowVersionInfo.versionInfo.coreDependency.version}}/reference/htmlsingle/">http://docs.spring.io/spring-cloud-dataflow/docs/{{dataflowVersionInfo.versionInfo.coreDependency.version}}/reference/htmlsingle/</a></td>
4753
</tr>
4854
<tr>
49-
<td>API Docs</td><td><a target="_blank" href="http://docs.spring.io/spring-cloud-dataflow/docs/{{dataflowVersionInfo.versionInfo.core.version}}/api/">http://docs.spring.io/spring-cloud-dataflow/docs/{{dataflowVersionInfo.versionInfo.core.version}}/api/</a></td>
55+
<td>API Docs</td><td><a target="_blank" href="http://docs.spring.io/spring-cloud-dataflow/docs/{{dataflowVersionInfo.versionInfo.coreDependency.version}}/api/">http://docs.spring.io/spring-cloud-dataflow/docs/{{dataflowVersionInfo.versionInfo.coreDependency.version}}/api/</a></td>
5056
</tr>
5157
<tr>
5258
<td>Support Forum</td><td><a target="_blank" href="http://stackoverflow.com/questions/tagged/spring-cloud-dataflow">http://stackoverflow.com/questions/tagged/spring-cloud-dataflow</a></td>

ui/src/app/about/about.service.spec.ts

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,33 @@ describe('AboutService', () => {
1414
},
1515
'versionInfo':
1616
{
17-
'implementation':
17+
'implementationDependency':
1818
{
1919
'name': 'spring-cloud-dataflow-server-local',
20-
'version': '1.2.3.BUILD-SNAPSHOT'
20+
'version': '1.2.3.BUILD-SNAPSHOT',
21+
'checksumSha1': 'checksumSample1',
22+
'checksumSha256': 'checksumSample256'
2123
},
22-
'core':
24+
'coreDependency':
2325
{
2426
'name': 'Spring Cloud Data Flow Core',
25-
'version': '1.2.3.BUILD-SNAPSHOT'
27+
'version': '1.2.3.BUILD-SNAPSHOT',
28+
'checksumSha1': 'checksumSample1',
29+
'checksumSha256': 'checksumSample256'
2630
},
27-
'dashboard':
31+
'dashboardDependency':
2832
{
2933
'name': 'Spring Cloud Dataflow UI',
30-
'version': '1.2.1.RELEASE'
34+
'version': '1.2.3.RELEASE',
35+
'checksumSha1': 'checksumSample1',
36+
'checksumSha256': 'checksumSample256'
37+
},
38+
'shellDependency':
39+
{
40+
'name': 'Spring Cloud Dataflow Shell',
41+
'version': '1.2.3.RELEASE',
42+
'checksumSha1': 'checksumSample1',
43+
'checksumSha256': 'checksumSample256'
3144
}
3245
},
3346
'securityInfo':

ui/src/app/tests/mocks/about.ts

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,22 +37,40 @@ export class SecurityInfo {
3737
export class Dashboard {
3838
public name = 'QUE';
3939
public version = 'QIX';
40+
public checksumSha1 = 'checksumSample1';
41+
public checksumSha256 = 'checksumSample256';
42+
public url = '';
43+
}
44+
45+
export class Shell {
46+
public name = 'QUX';
47+
public version = 'QUUX';
48+
public checksumSha1 = 'checksumSample1';
49+
public checksumSha256 = 'checksumSample256';
50+
public url = '';
4051
}
4152

4253
export class Implementation {
4354
public name = 'FOO';
4455
public version = 'BAR';
56+
public checksumSha1 = 'checksumSample1';
57+
public checksumSha256 = 'checksumSample256';
58+
public url = '';
4559
}
4660

4761
export class Core {
4862
public name = 'BAZ';
4963
public version = 'BOO';
64+
public checksumSha1 = 'checksumSample1';
65+
public checksumSha256 = 'checksumSample256';
66+
public url = '';
5067
}
5168

5269
export class VersionInfo {
53-
public implementation: Implementation = new Implementation();
54-
public core = new Core;
55-
public dashboard = new Dashboard();
70+
public implementationDependency: Implementation = new Implementation();
71+
public coreDependency = new Core;
72+
public dashboardDependency = new Dashboard();
73+
public shellDependency = new Shell();
5674
}
5775

5876
export class AppDeployer {

0 commit comments

Comments
 (0)