added TSLint for TypeScript code style checking, fixed associated errors
This commit is contained in:
parent
6a7722cadb
commit
41e7e559a6
43 changed files with 253 additions and 730 deletions
|
@ -17,7 +17,9 @@ export class ManageTriggerComponent implements OnChanges {
|
|||
@Input('<') public githost: string = 'custom-git';
|
||||
@Input('<') public repository: Repository;
|
||||
@Input('<') public trigger: Trigger;
|
||||
|
||||
@Output() public activateTrigger: EventEmitter<{config: TriggerConfig, pull_robot?: any}> = new EventEmitter();
|
||||
|
||||
public config: TriggerConfig;
|
||||
public local: Local = {
|
||||
selectedRepository: {name: ''},
|
||||
|
@ -28,6 +30,7 @@ export class ManageTriggerComponent implements OnChanges {
|
|||
repositoryOptions: {filter: '', predicate: 'score', reverse: false, page: 0, hideStale: true},
|
||||
robotOptions: {filter: '', predicate: 'score', reverse: false, page: 0},
|
||||
};
|
||||
|
||||
private namespacesPerPage: number = 10;
|
||||
private repositoriesPerPage: number = 10;
|
||||
private robotsPerPage: number = 10;
|
||||
|
@ -174,7 +177,7 @@ export class ManageTriggerComponent implements OnChanges {
|
|||
}
|
||||
|
||||
private setPossibleContexts(path: string) {
|
||||
if (this.local.dockerfileLocations.contextMap){
|
||||
if (this.local.dockerfileLocations.contextMap) {
|
||||
this.local.contexts = this.local.dockerfileLocations.contextMap[path] || [];
|
||||
} else {
|
||||
this.local.contexts = [path.split('/').slice(0, -1).join('/').concat('/')];
|
||||
|
@ -288,7 +291,7 @@ export class ManageTriggerComponent implements OnChanges {
|
|||
const kind = ref.kind == 'branch' ? 'heads' : 'tags';
|
||||
const icon = ref.kind == 'branch' ? 'fa-code-fork' : 'fa-tag';
|
||||
return {
|
||||
'value': kind + '/' + ref.name,
|
||||
'value': `${kind}/${ref.name}`,
|
||||
'icon': icon,
|
||||
'title': ref.name
|
||||
};
|
||||
|
|
Reference in a new issue