blob: 7135d36fa4667da27d630b8259ede0c77758cdb6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
import { Component, Input, Pipe, PipeTransform } from '@angular/core';
import { SdkService, ISdk } from '../../../@core-xds/services/sdk.service';
import { AlertService } from '../../../@core-xds/services/alert.service';
@Component({
selector: 'xds-sdk-card',
styleUrls: ['./sdk-card.component.scss'],
templateUrl: './sdk-card.component.html',
})
export class SdkCardComponent {
// FIXME workaround of https://github.com/angular/angular-cli/issues/2034
// should be removed with angular 5
// @Input() sdk: ISdk;
@Input() sdk = <ISdk>null;
constructor(
private alert: AlertService,
private sdkSvr: SdkService,
) {
}
labelGet(sdk: ISdk) {
return sdk.profile + '-' + sdk.arch + '-' + sdk.version;
}
delete(sdk: ISdk) {
this.sdkSvr.delete(sdk).subscribe(
res => { },
err => this.alert.error('ERROR delete: ' + err),
);
}
}
|