3 * Copyright (C) 2017-2018 "IoT.bzh"
4 * Author Sebastien Douheret <sebastien@iot.bzh>
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
19 import { Component, OnInit } from '@angular/core';
20 import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
22 import { XDSAgentService, IXDSVersions, IXDSVer } from '../../../@core-xds/services/xdsagent.service';
26 selector: 'xds-about-modal',
28 <div class="modal-header">
29 <span>About <b>X</b>(cross) Development System</span>
30 <button class="close" aria-label="Close" (click)="closeModal()">
31 <span aria-hidden="true">×</span>
35 <div class="modal-body row">
37 <label class="col-sm-4">Developed by IoT.bzh</label>
38 <span class="col-sm-8"><a href="http://iot.bzh/en/author" target="_blank">http://iot.bzh</a></span>
41 <label class="col-sm-4">Powered by</label>
42 <span class="col-sm-8"><a href="https://github.com/akveo/ngx-admin" target="_blank">akveo/ngx-admin</a></span>
48 <label class="col-sm-4">XDS Agent ID</label>
49 <span class="col-sm-8">{{agent?.id}}</span>
52 <label class="col-sm-4">XDS Agent Version</label>
53 <span class="col-sm-8">{{agent?.version}}</span>
56 <label class="col-sm-4">XDS Agent Sub-Version</label>
57 <span class="col-sm-8">{{agent?.gitTag}}</span>
61 <label class="col-sm-4">XDS Server ID</label>
62 <span class="col-sm-8">{{server?.id}}</span>
65 <label class="col-sm-4">XDS Server Version</label>
66 <span class="col-sm-8">{{server?.version}}</span>
69 <label class="col-sm-4">XDS Server Sub-Version</label>
70 <span class="col-sm-8">{{server?.gitTag}}</span>
77 export class AboutModalComponent implements OnInit {
83 private activeModal: NgbActiveModal,
84 private xdsSvr: XDSAgentService,
88 this.xdsSvr.getVersion().subscribe(v => {
89 this.agent = v.client;
90 if (v && v.servers.length > 0 && !v.servers[0].version.startsWith('Cannot retrieve')) {
91 this.server = v.servers[0];
97 this.activeModal.close();