Skip to content

Commit 263ab95

Browse files
committed
fixed #303
1 parent 457ebcb commit 263ab95

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

quick-start/src/main/java/com/marklogic/quickstart/service/DataHubService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ public String getLastDeployed(HubConfig config) {
122122
DateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm'Z'");
123123
df.setTimeZone(tz);
124124

125-
return "{\"deployed\":true, \"lastModified\":\"" + df.format(lastModified) + "\"}";
125+
return "{\"deployed\":" + tsFile.exists() + ", \"lastModified\":\"" + df.format(lastModified) + "\"}";
126126
}
127127

128128
public void clearContent(HubConfig config, String database) {

quick-start/src/main/ui/app/deploy/deploy.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export class DeployService {
4040
private updateLastDeployed() {
4141
const url = `/api/projects/${this.projectService.projectId}/${this.projectService.environment}/last-deployed`;
4242
this.http.get(url).map((res: Response) => { return res.json(); }).subscribe((resp: any) => {
43-
this._lastDeployed = moment(resp.lastModified);
43+
this._lastDeployed = (resp.deployed) ? moment(resp.lastModified) : null;
4444
});
4545
}
4646

quick-start/src/main/ui/app/entities/entities.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
</li>
7373
</ul>
7474
<div class="footer" layout="column" layout-align="center center">
75-
<p>Last Deployed: {{getLastDeployed() | amTimeAgo}}</p>
75+
<p>Last Deployed: {{getLastDeployed()}}</p>
7676
<mdl-button
7777
mdl-button-type="raised" mdl-colored="primary" mdl-ripple
7878
(click)="redeployModules()"

quick-start/src/main/ui/app/entities/entities.component.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,11 @@ export class EntitiesComponent {
5454
}
5555

5656
getLastDeployed() {
57-
return this.deployService.getLastDeployed();
57+
const lastDeployed = this.deployService.getLastDeployed();
58+
if (lastDeployed) {
59+
return lastDeployed.fromNow();
60+
}
61+
return 'Not Yet Deployed';
5862
}
5963

6064
getErrors() {

0 commit comments

Comments
 (0)