diff options
Diffstat (limited to 'webapp/src/app/projects/projectCard.component.ts')
-rw-r--r-- | webapp/src/app/projects/projectCard.component.ts | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/webapp/src/app/projects/projectCard.component.ts b/webapp/src/app/projects/projectCard.component.ts index 1b89fe7..a7ca9a3 100644 --- a/webapp/src/app/projects/projectCard.component.ts +++ b/webapp/src/app/projects/projectCard.component.ts @@ -8,7 +8,9 @@ import { AlertService } from "../services/alert.service"; <div class="row"> <div class="col-xs-12"> <div class="text-right" role="group"> - <button class="btn btn-link" (click)="delete(project)"><span class="fa fa-trash fa-size-x2"></span></button> + <button class="btn btn-link" (click)="delete(project)"> + <span class="fa fa-trash fa-size-x2"></span> + </button> </div> </div> </div> @@ -27,16 +29,18 @@ import { AlertService } from "../services/alert.service"; <th><span class="fa fa-fw fa-folder-open-o"></span> <span>Local path</span></th> <td>{{ project.pathClient }}</td> </tr> - <tr *ngIf="project.pathServer != ''"> + <tr *ngIf="project.pathServer && project.pathServer != ''"> <th><span class="fa fa-fw fa-folder-open-o"></span> <span>Server path</span></th> <td>{{ project.pathServer }}</td> </tr> - <!-- <tr> - <th><span class="fa fa-fw fa-status"></span> <span>Status</span></th> - <td>{{ project.remotePrjDef.status }}</td> + <th><span class="fa fa-fw fa-flag"></span> <span>Status</span></th> + <td>{{ project.status }} - {{ project.isInSync ? "Up to Date" : "Out of Sync"}} + <button *ngIf="!project.isInSync" class="btn btn-link" (click)="sync(project)"> + <span class="fa fa-refresh fa-size-x2"></span> + </button> + </td> </tr> - --> </tbody> </table > `, @@ -53,7 +57,6 @@ export class ProjectCardComponent { ) { } - delete(prj: IProject) { this.configSvr.deleteProject(prj) .subscribe(res => { @@ -62,6 +65,14 @@ export class ProjectCardComponent { }); } + sync(prj: IProject) { + this.configSvr.syncProject(prj) + .subscribe(res => { + }, err => { + this.alert.error("ERROR: " + err); + }); + } + } // Remove APPS. prefix if translate has failed |