summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
61ca475)
Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
}
// Update XDS Agent tarball url
}
// Update XDS Agent tarball url
+ this.confStore.xdsAgentZipUrl = "";
this.xdsServerSvr.getXdsAgentInfo().subscribe(nfo => {
let os = this.utils.getOSName(true);
let zurl = nfo.tarballs.filter(elem => elem.os === os);
this.xdsServerSvr.getXdsAgentInfo().subscribe(nfo => {
let os = this.utils.getOSName(true);
let zurl = nfo.tarballs.filter(elem => elem.os === os);
- this.confStore.xdsAgentZipUrl = zurl && zurl[0].fileUrl;
+ if (zurl && zurl.length) {
+ this.confStore.xdsAgentZipUrl = zurl[0].fileUrl;
+ this.confSubject.next(Object.assign({}, this.confStore));
+ }
this.confSubject.next(Object.assign({}, this.confStore));
// Don't save projects in cookies (too big!)
this.confSubject.next(Object.assign({}, this.confStore));
// Don't save projects in cookies (too big!)
- let cfg = this.confStore;
+ let cfg = Object.assign({}, this.confStore);
delete (cfg.projects);
this.cookie.putObject("xds-config", cfg);
}
delete (cfg.projects);
this.cookie.putObject("xds-config", cfg);
}
let cfg = this.confStore.xdsAgent;
this.AgentConnectObs = this.xdsAgentSvr.connect(cfg.retry, cfg.URL)
.subscribe((sts) => {
let cfg = this.confStore.xdsAgent;
this.AgentConnectObs = this.xdsAgentSvr.connect(cfg.retry, cfg.URL)
.subscribe((sts) => {
- console.log("Agent sts", sts);
+ //console.log("Agent sts", sts);
}, error => this.alert.error(error)
);
}, error => this.alert.error(error)
);
if (error.indexOf("Syncthing local daemon not responding") !== -1) {
let msg = "<span><strong>" + error + "<br></strong>";
msg += "You may need to download and execute XDS-Agent.<br>";
if (error.indexOf("Syncthing local daemon not responding") !== -1) {
let msg = "<span><strong>" + error + "<br></strong>";
msg += "You may need to download and execute XDS-Agent.<br>";
- msg += "<a class=\"fa fa-download\" href=\"" + this.confStore.xdsAgentZipUrl + "\" target=\"_blank\"></a>";
- msg += " Download XDS-Agent tarball.";
+ if (this.confStore.xdsAgentZipUrl !== "") {
+ msg += "<a class=\"fa fa-download\" href=\"" + this.confStore.xdsAgentZipUrl + "\" target=\"_blank\"></a>";
+ msg += " Download XDS-Agent tarball.";
+ }
msg += "</span>";
this.alert.error(msg);
} else {
msg += "</span>";
this.alert.error(msg);
} else {
<button class="btn btn-link" (click)="xdsAgentRestartConn()"><span class="fa fa-refresh fa-size-x2"></span></button>
<!-- FIXME [XDS-Agent]
<button *ngIf="!(agentStatus$ | async)?.connected" -->
<button class="btn btn-link" (click)="xdsAgentRestartConn()"><span class="fa fa-refresh fa-size-x2"></span></button>
<!-- FIXME [XDS-Agent]
<button *ngIf="!(agentStatus$ | async)?.connected" -->
- <button *ngIf="!(localSTStatus$ | async)?.connected" class="btn btn-link"><a class="fa fa-download fa-size-x2" [href]="xdsAgentZipUrl" target="_blank"></a></button>
+ <button *ngIf="!(localSTStatus$ | async)?.connected" [disabled]="xdsAgentZipUrl==''" class="btn btn-link">
+ <a *ngIf="xdsAgentZipUrl!=''" class="fa fa-download fa-size-x2" [href]="xdsAgentZipUrl" target="_blank"></a>
+ <a *ngIf="xdsAgentZipUrl==''" class="fa fa-download fa-size-x2" href="javascript:void(0);" target="_blank"></a>
+ </button>
</td>
</tr>
<tr class="info">
</td>
</tr>
<tr class="info">