File tree Expand file tree Collapse file tree 4 files changed +8
-4
lines changed
java/com/marklogic/quickstart/service Expand file tree Collapse file tree 4 files changed +8
-4
lines changed Original file line number Diff line number Diff 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 ) {
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 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() "
Original file line number Diff line number Diff 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 ( ) {
You can’t perform that action at this time.
0 commit comments