@lowcodeunit/applications-flow-common 1.33.216-lets-get-social-ish → 1.33.219-lets-get-social-ish
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/elements/main-feed-card/main-feed-card.component.mjs +44 -12
- package/fesm2015/lowcodeunit-applications-flow-common.mjs +770 -737
- package/fesm2015/lowcodeunit-applications-flow-common.mjs.map +1 -1
- package/fesm2020/lowcodeunit-applications-flow-common.mjs +726 -696
- package/fesm2020/lowcodeunit-applications-flow-common.mjs.map +1 -1
- package/lib/elements/main-feed-card/main-feed-card.component.d.ts +11 -2
- package/package.json +1 -1
|
@@ -3905,190 +3905,645 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImpor
|
|
|
3905
3905
|
args: [{ selector: 'lcu-gh-control', template: "<mat-card class=\"social-card\">\n <div class=\"gh-card-container\" fxLayout=\"row\" fxLayoutAlign=\"center center\">\n <mat-icon fxFlex=\"15%\" class=\"gh-icon\">error_outline</mat-icon>\n <div fxFlex=\"70%\"class=\"gh-card-main-content\">\n <mat-form-field appearance=\"fill\" class=\"gh-input\">\n <mat-label>{{InputLabel}}</mat-label>\n <input matInput type=\"text\" [(ngModel)]=\"value\">\n <!-- <button *ngIf=\"value\" matSuffix mat-icon-button aria-label=\"Clear\" (click)=\"value=''\">\n <mat-icon>close</mat-icon>\n </button> -->\n </mat-form-field>\n </div>\n <button fxFlex=\"15%\" mat-button (click)=\"Submit()\" id=\"submit-btn\">Submit</button>\n </div>\n\n <mat-card-actions fxLayout=\"row\" fxLayoutAlign=\"space-around center\">\n <button mat-button (click)=\"CreatePullRequest()\" id=\"pr-btn\">Pull Request</button>\n <button mat-button (click)=\"OpenIssue()\" id=\"oi-btn\">Open Issue</button>\n <button mat-button (click)=\"CreateFeatureBranch()\" id=\"fb-btn\">Feature Branch</button>\n <button mat-icon-button (click)=\"OpenMoreInfo()\">\n <mat-icon>more_horiz</mat-icon>\n </button>\n </mat-card-actions>\n </mat-card>", styles: [":host ::ng-deep .social-card{margin:20px;padding:15px 5px}:host ::ng-deep mat-card-actions{margin-bottom:-1px!important;margin-left:0!important;margin-right:-.5px!important}:host ::ng-deep .main-slot-container{padding:10px}:host ::ng-deep .slot-header{align-items:center}:host ::ng-deep .slot-content{width:100%}:host ::ng-deep .slot-name{font-size:13px;font-weight:600}:host ::ng-deep .slot-description{font-size:12px;margin-right:10px}:host ::ng-deep .slot-action-anchor{font-size:10px;text-decoration:none;color:#000}:host ::ng-deep .action-icon{height:25px;width:25px;font-size:25px;cursor:pointer}.gh-icon{width:60px;height:60px;font-size:60px;text-align:center}.gh-input{width:90%}.selected{border:1px solid green}::ng-deep .mat-form-field-flex{border:1px solid;border-radius:30px!important}::ng-deep .mat-form-field-wrapper{padding-bottom:0!important}\n"] }]
|
|
3906
3906
|
}], ctorParameters: function () { return []; } });
|
|
3907
3907
|
|
|
3908
|
-
class
|
|
3909
|
-
|
|
3908
|
+
class DevopsSourceControlFormComponent {
|
|
3909
|
+
// Constructors
|
|
3910
|
+
constructor(appsFlowSvc, eacSvc, formBuilder) {
|
|
3911
|
+
this.appsFlowSvc = appsFlowSvc;
|
|
3910
3912
|
this.eacSvc = eacSvc;
|
|
3913
|
+
this.formBuilder = formBuilder;
|
|
3914
|
+
this.SeparatorKeysCodes = [ENTER, COMMA];
|
|
3915
|
+
this.SaveStatusEvent = new EventEmitter;
|
|
3916
|
+
this.BuildPath = null;
|
|
3917
|
+
this.HostingDetails = new ProjectHostingDetails();
|
|
3918
|
+
this.SelectedBranches = [];
|
|
3919
|
+
this.SourceControlRoot = '';
|
|
3920
|
+
this.UseBranches = true;
|
|
3921
|
+
this.UseBuildPath = false;
|
|
3911
3922
|
}
|
|
3912
|
-
|
|
3913
|
-
|
|
3914
|
-
|
|
3915
|
-
|
|
3916
|
-
else if (this.FeedItem.Status.Code === 1) {
|
|
3917
|
-
return 'cancel';
|
|
3918
|
-
}
|
|
3919
|
-
else if (this.FeedItem.Status.Code === 2) {
|
|
3920
|
-
return 'sync';
|
|
3921
|
-
}
|
|
3922
|
-
else {
|
|
3923
|
-
return 'help_outline';
|
|
3924
|
-
}
|
|
3923
|
+
// Properties
|
|
3924
|
+
get ArtifactLookups() {
|
|
3925
|
+
var _a;
|
|
3926
|
+
return (_a = this.DevOpsAction) === null || _a === void 0 ? void 0 : _a.ArtifactLookups;
|
|
3925
3927
|
}
|
|
3926
|
-
get
|
|
3927
|
-
|
|
3928
|
-
|
|
3929
|
-
|
|
3930
|
-
|
|
3931
|
-
|
|
3928
|
+
get ArtifactLookup() {
|
|
3929
|
+
var _a, _b;
|
|
3930
|
+
const artLookup = ((_a = this.DevOpsAction) === null || _a === void 0 ? void 0 : _a.ArtifactLookups)
|
|
3931
|
+
? (_b = this.DevOpsAction) === null || _b === void 0 ? void 0 : _b.ArtifactLookups[0]
|
|
3932
|
+
: null;
|
|
3933
|
+
return artLookup;
|
|
3934
|
+
}
|
|
3935
|
+
get Artifact() {
|
|
3936
|
+
var _a, _b;
|
|
3937
|
+
return ((_a = this.Environment) === null || _a === void 0 ? void 0 : _a.Artifacts) && this.ArtifactLookup
|
|
3938
|
+
? ((_b = this.Environment) === null || _b === void 0 ? void 0 : _b.Artifacts[this.ArtifactLookup]) || {}
|
|
3939
|
+
: {};
|
|
3940
|
+
}
|
|
3941
|
+
get BranchesFormControl() {
|
|
3942
|
+
return this.DevOpsSourceControlFormGroup.get(this.SourceControlRoot + 'branches');
|
|
3943
|
+
}
|
|
3944
|
+
get BuildPathFormControl() {
|
|
3945
|
+
return this.DevOpsSourceControlFormGroup.get(this.SourceControlRoot + 'buildPath');
|
|
3946
|
+
}
|
|
3947
|
+
get DevOpsActionLookups() {
|
|
3948
|
+
// console.log(this.DevOpsActions);
|
|
3949
|
+
return Object.keys(this.DevOpsActions || {});
|
|
3950
|
+
}
|
|
3951
|
+
get DevOpsAction() {
|
|
3952
|
+
return this.Environment.DevOpsActions && this.DevOpsActionLookup
|
|
3953
|
+
? this.Environment.DevOpsActions[this.DevOpsActionLookup] || {}
|
|
3954
|
+
: {};
|
|
3955
|
+
}
|
|
3956
|
+
get DevOpsActionLookup() {
|
|
3957
|
+
var _a, _b, _c;
|
|
3958
|
+
if (!!((_a = this.DevOpsActionLookupFormControl) === null || _a === void 0 ? void 0 : _a.value)) {
|
|
3959
|
+
return this.DevOpsActionLookupFormControl.value;
|
|
3932
3960
|
}
|
|
3933
|
-
|
|
3934
|
-
return
|
|
3961
|
+
if (!!((_b = this.EditingSourceControl) === null || _b === void 0 ? void 0 : _b.DevOpsActionTriggerLookups)) {
|
|
3962
|
+
return (_c = this.EditingSourceControl) === null || _c === void 0 ? void 0 : _c.DevOpsActionTriggerLookups[0];
|
|
3935
3963
|
}
|
|
3936
3964
|
else {
|
|
3937
|
-
return
|
|
3965
|
+
return null;
|
|
3938
3966
|
}
|
|
3939
3967
|
}
|
|
3940
|
-
|
|
3941
|
-
|
|
3942
|
-
this.handleRefresh();
|
|
3968
|
+
get DevOpsActionLookupFormControl() {
|
|
3969
|
+
return this.DevOpsSourceControlFormGroup.get('devOpsActionLookup');
|
|
3943
3970
|
}
|
|
3944
|
-
|
|
3945
|
-
|
|
3946
|
-
return moment(timestamp).fromNow();
|
|
3971
|
+
get DevOpsActions() {
|
|
3972
|
+
return this.Environment.DevOpsActions || {};
|
|
3947
3973
|
}
|
|
3948
|
-
|
|
3949
|
-
|
|
3950
|
-
|
|
3951
|
-
|
|
3952
|
-
|
|
3953
|
-
|
|
3954
|
-
|
|
3955
|
-
}
|
|
3956
|
-
}
|
|
3957
|
-
else if (action.ActionType == 'Modal') {
|
|
3958
|
-
if (action.Action == 'AddSourceControl') {
|
|
3959
|
-
// TODO: George launch source control modal
|
|
3960
|
-
alert('AddSourceControl modaled');
|
|
3961
|
-
}
|
|
3962
|
-
else {
|
|
3963
|
-
alert('other modaled ' + action.Action);
|
|
3964
|
-
}
|
|
3974
|
+
get EditingSourceControl() {
|
|
3975
|
+
var _a, _b;
|
|
3976
|
+
let sc = ((_a = this.Environment) === null || _a === void 0 ? void 0 : _a.Sources)
|
|
3977
|
+
? (_b = this.Environment) === null || _b === void 0 ? void 0 : _b.Sources[this.EditingSourceControlLookup]
|
|
3978
|
+
: null;
|
|
3979
|
+
if (sc == null && this.EditingSourceControlLookup) {
|
|
3980
|
+
sc = {};
|
|
3965
3981
|
}
|
|
3982
|
+
return sc;
|
|
3966
3983
|
}
|
|
3967
|
-
|
|
3968
|
-
|
|
3969
|
-
if ((_a = this.FeedItem) === null || _a === void 0 ? void 0 : _a.RefreshLink) {
|
|
3970
|
-
setTimeout(() => {
|
|
3971
|
-
this.eacSvc.CheckUserFeedItem(this.FeedItem).subscribe((response) => __awaiter(this, void 0, void 0, function* () {
|
|
3972
|
-
if (response.Status.Code === 0) {
|
|
3973
|
-
this.FeedItem = response.Model;
|
|
3974
|
-
this.handleRefresh();
|
|
3975
|
-
}
|
|
3976
|
-
else {
|
|
3977
|
-
console.log(response);
|
|
3978
|
-
}
|
|
3979
|
-
}), (err) => {
|
|
3980
|
-
console.log(err);
|
|
3981
|
-
});
|
|
3982
|
-
}, 5000);
|
|
3983
|
-
}
|
|
3984
|
+
get MainBranchFormControl() {
|
|
3985
|
+
return this.DevOpsSourceControlFormGroup.get(this.SourceControlRoot + 'mainBranch');
|
|
3984
3986
|
}
|
|
3985
|
-
|
|
3986
|
-
|
|
3987
|
-
MainFeedCardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: MainFeedCardComponent, selector: "lcu-main-feed-card", inputs: { FeedItem: ["feed-item", "FeedItem"] }, ngImport: i0, template: "<mat-card class=\"social-card\">\n <mat-card-header>\n <img\n mat-card-avatar\n class=\"example-header-image\"\n [src]=\"FeedItem.Avatar\"\n *ngIf=\"FeedItem.Avatar\"\n />\n\n <mat-card-title *ngIf=\"FeedItem.Title\">{{ FeedItem.Title }}</mat-card-title>\n\n <mat-card-subtitle>\n <div *ngIf=\"FeedItem.Subtitle\">{{ FeedItem.Subtitle }}</div>\n <div *ngIf=\"FeedItem.Status\">\n <mat-icon\n *ngIf=\"Icon\"\n [style.color]=\"IconColor\"\n [class.spin]=\"FeedItem.Status?.Code == 2\"\n >\n {{ Icon }}\n </mat-icon>\n\n <span *ngIf=\"FeedItem.Timestamp\">\n {{ CalculateTimelapse(FeedItem.Timestamp) }}\n </span>\n </div>\n </mat-card-subtitle>\n </mat-card-header>\n\n <div *ngIf=\"!FeedItem.IsShortForm\">\n <!-- <div class=\"feed-card-container\">\n <div class=\"feed-card-main-content\">\n The tab content (only 1 'tab' for now)... So really we don't need to worry about tabs until a future iteration\n\n The tabs property will contain a data structure that will vary by the FeedItem.Type... That structure can be used to render the content\n </div>\n </div> -->\n </div>\n\n <mat-card-actions fxLayout=\"row\" fxLayoutAlign=\"space-around center\">\n <div fxFlex></div>\n\n <ng-container *ngFor=\"let action of FeedItem.Actions\">\n <button mat-button [color]=\"action.Color\" (click)=\"HandleAction(action)\">\n <mat-icon *ngIf=\"action.Icon\">{{ action.Icon }}</mat-icon>\n\n {{ action.Text }}\n </button>\n </ng-container>\n </mat-card-actions>\n</mat-card>\n", styles: [":host :host ::ng-deep .social-card{margin:20px;padding:15px 5px}:host :host ::ng-deep mat-card-actions{margin-bottom:-1px!important;margin-left:0!important;margin-right:-.5px!important}:host :host ::ng-deep .main-slot-container{padding:10px}:host :host ::ng-deep .slot-header{align-items:center}:host :host ::ng-deep .slot-content{width:100%}:host :host ::ng-deep .slot-name{font-size:13px;font-weight:600}:host :host ::ng-deep .slot-description{font-size:12px;margin-right:10px}:host :host ::ng-deep .slot-action-anchor{font-size:10px;text-decoration:none;color:#000}:host :host ::ng-deep .action-icon{height:25px;width:25px;font-size:25px;cursor:pointer}:host .example-header-image{background-size:cover}:host .mat-icon{display:inline-flex;vertical-align:middle}:host .mat-icon.spin{animation:rotate 1s ease-in-out infinite}@keyframes rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}\n"], components: [{ type: i4.MatCard, selector: "mat-card", exportAs: ["matCard"] }, { type: i4.MatCardHeader, selector: "mat-card-header" }, { type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i2$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.MatCardAvatar, selector: "[mat-card-avatar], [matCardAvatar]" }, { type: i4.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { type: i4.MatCardSubtitle, selector: "mat-card-subtitle, [mat-card-subtitle], [matCardSubtitle]" }, { type: i4.MatCardActions, selector: "mat-card-actions", inputs: ["align"], exportAs: ["matCardActions"] }, { type: i5$1.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i5$1.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { type: i5$1.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { type: i4$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
3988
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: MainFeedCardComponent, decorators: [{
|
|
3989
|
-
type: Component,
|
|
3990
|
-
args: [{ selector: 'lcu-main-feed-card', template: "<mat-card class=\"social-card\">\n <mat-card-header>\n <img\n mat-card-avatar\n class=\"example-header-image\"\n [src]=\"FeedItem.Avatar\"\n *ngIf=\"FeedItem.Avatar\"\n />\n\n <mat-card-title *ngIf=\"FeedItem.Title\">{{ FeedItem.Title }}</mat-card-title>\n\n <mat-card-subtitle>\n <div *ngIf=\"FeedItem.Subtitle\">{{ FeedItem.Subtitle }}</div>\n <div *ngIf=\"FeedItem.Status\">\n <mat-icon\n *ngIf=\"Icon\"\n [style.color]=\"IconColor\"\n [class.spin]=\"FeedItem.Status?.Code == 2\"\n >\n {{ Icon }}\n </mat-icon>\n\n <span *ngIf=\"FeedItem.Timestamp\">\n {{ CalculateTimelapse(FeedItem.Timestamp) }}\n </span>\n </div>\n </mat-card-subtitle>\n </mat-card-header>\n\n <div *ngIf=\"!FeedItem.IsShortForm\">\n <!-- <div class=\"feed-card-container\">\n <div class=\"feed-card-main-content\">\n The tab content (only 1 'tab' for now)... So really we don't need to worry about tabs until a future iteration\n\n The tabs property will contain a data structure that will vary by the FeedItem.Type... That structure can be used to render the content\n </div>\n </div> -->\n </div>\n\n <mat-card-actions fxLayout=\"row\" fxLayoutAlign=\"space-around center\">\n <div fxFlex></div>\n\n <ng-container *ngFor=\"let action of FeedItem.Actions\">\n <button mat-button [color]=\"action.Color\" (click)=\"HandleAction(action)\">\n <mat-icon *ngIf=\"action.Icon\">{{ action.Icon }}</mat-icon>\n\n {{ action.Text }}\n </button>\n </ng-container>\n </mat-card-actions>\n</mat-card>\n", styles: [":host :host ::ng-deep .social-card{margin:20px;padding:15px 5px}:host :host ::ng-deep mat-card-actions{margin-bottom:-1px!important;margin-left:0!important;margin-right:-.5px!important}:host :host ::ng-deep .main-slot-container{padding:10px}:host :host ::ng-deep .slot-header{align-items:center}:host :host ::ng-deep .slot-content{width:100%}:host :host ::ng-deep .slot-name{font-size:13px;font-weight:600}:host :host ::ng-deep .slot-description{font-size:12px;margin-right:10px}:host :host ::ng-deep .slot-action-anchor{font-size:10px;text-decoration:none;color:#000}:host :host ::ng-deep .action-icon{height:25px;width:25px;font-size:25px;cursor:pointer}:host .example-header-image{background-size:cover}:host .mat-icon{display:inline-flex;vertical-align:middle}:host .mat-icon.spin{animation:rotate 1s ease-in-out infinite}@keyframes rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}\n"] }]
|
|
3991
|
-
}], ctorParameters: function () { return [{ type: EaCService }]; }, propDecorators: { FeedItem: [{
|
|
3992
|
-
type: Input,
|
|
3993
|
-
args: ['feed-item']
|
|
3994
|
-
}] } });
|
|
3995
|
-
|
|
3996
|
-
class TwoColumnHeaderComponent {
|
|
3997
|
-
constructor() { }
|
|
3998
|
-
ngOnInit() {
|
|
3987
|
+
get OrganizationFormControl() {
|
|
3988
|
+
return this.DevOpsSourceControlFormGroup.get(this.SourceControlRoot + 'organization');
|
|
3999
3989
|
}
|
|
4000
|
-
|
|
4001
|
-
|
|
4002
|
-
TwoColumnHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: TwoColumnHeaderComponent, selector: "lcu-two-column-header", ngImport: i0, template: "<div class=\"col-container\" fxLayout=\"row\">\n\n <div class=\"col-left\" fxFlex=\"15%\" >\n <ng-content select=\"[left]\"></ng-content>\n </div>\n\n <div class=\"col-center\" fxFlex=\"85%\">\n <ng-content></ng-content>\n </div>\n\n</div>\n", styles: [".col-container{background-color:#ebecf0}.col-left{min-width:210px}\n"], directives: [{ type: i5$1.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i5$1.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }] });
|
|
4003
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: TwoColumnHeaderComponent, decorators: [{
|
|
4004
|
-
type: Component,
|
|
4005
|
-
args: [{ selector: 'lcu-two-column-header', template: "<div class=\"col-container\" fxLayout=\"row\">\n\n <div class=\"col-left\" fxFlex=\"15%\" >\n <ng-content select=\"[left]\"></ng-content>\n </div>\n\n <div class=\"col-center\" fxFlex=\"85%\">\n <ng-content></ng-content>\n </div>\n\n</div>\n", styles: [".col-container{background-color:#ebecf0}.col-left{min-width:210px}\n"] }]
|
|
4006
|
-
}], ctorParameters: function () { return []; } });
|
|
4007
|
-
|
|
4008
|
-
class CardCarouselComponent {
|
|
4009
|
-
constructor() {
|
|
4010
|
-
this.carouselIndex = 0;
|
|
3990
|
+
get RepositoryFormControl() {
|
|
3991
|
+
return this.DevOpsSourceControlFormGroup.get(this.SourceControlRoot + 'repository');
|
|
4011
3992
|
}
|
|
4012
|
-
|
|
3993
|
+
get State() {
|
|
3994
|
+
return this.eacSvc.State;
|
|
4013
3995
|
}
|
|
4014
|
-
|
|
4015
|
-
|
|
3996
|
+
// Life Cycle
|
|
3997
|
+
ngAfterViewInit() { }
|
|
3998
|
+
ngOnDestroy() {
|
|
3999
|
+
this.destroyFormControls();
|
|
4016
4000
|
}
|
|
4017
|
-
|
|
4018
|
-
this.
|
|
4019
|
-
|
|
4020
|
-
this.carouselIndex = this.Stats.length - 1;
|
|
4001
|
+
ngOnInit() {
|
|
4002
|
+
if (this.EditingSourceControlLookup === null) {
|
|
4003
|
+
this.CreateNewSourceControl();
|
|
4021
4004
|
}
|
|
4022
|
-
|
|
4023
|
-
this.
|
|
4005
|
+
if (this.EditingSourceControl != null) {
|
|
4006
|
+
this.DevOpsSourceControlFormGroup = this.formBuilder.group({});
|
|
4007
|
+
this.setupFormControls();
|
|
4024
4008
|
}
|
|
4025
|
-
this.
|
|
4009
|
+
this.RefreshOrganizations();
|
|
4026
4010
|
}
|
|
4027
|
-
|
|
4028
|
-
|
|
4011
|
+
// API Methods
|
|
4012
|
+
AddBranchOption(event) {
|
|
4013
|
+
this.addBranchOption(event.value);
|
|
4014
|
+
event.input.value = '';
|
|
4029
4015
|
}
|
|
4030
|
-
|
|
4031
|
-
this.
|
|
4032
|
-
if (this.carouselIndex === this.Stats.length - 1) {
|
|
4033
|
-
this.carouselIndex = 0;
|
|
4034
|
-
}
|
|
4035
|
-
else {
|
|
4036
|
-
this.carouselIndex++;
|
|
4037
|
-
}
|
|
4038
|
-
this.assignCarouselClass();
|
|
4016
|
+
BranchOptionSelected(event) {
|
|
4017
|
+
this.addBranchOption(event.option.value);
|
|
4039
4018
|
}
|
|
4040
|
-
|
|
4041
|
-
|
|
4042
|
-
for (let i = 0; i < this.Stats.length; i++) {
|
|
4043
|
-
if (i === this.carouselIndex) {
|
|
4044
|
-
document.getElementById("carousel-" + this.carouselIndex).classList.remove('active');
|
|
4045
|
-
}
|
|
4046
|
-
else {
|
|
4047
|
-
document.getElementById("carousel-" + i).classList.remove('hidden');
|
|
4048
|
-
}
|
|
4049
|
-
}
|
|
4019
|
+
BranchesChanged(branches) {
|
|
4020
|
+
this.loadProjectHostingDetails();
|
|
4050
4021
|
}
|
|
4051
|
-
|
|
4052
|
-
|
|
4053
|
-
if (i === this.carouselIndex) {
|
|
4054
|
-
document.getElementById("carousel-" + this.carouselIndex).classList.add('active');
|
|
4055
|
-
}
|
|
4056
|
-
else {
|
|
4057
|
-
document.getElementById("carousel-" + i).classList.add('hidden');
|
|
4058
|
-
}
|
|
4059
|
-
}
|
|
4022
|
+
BuildPathChanged(event) {
|
|
4023
|
+
//do something??
|
|
4060
4024
|
}
|
|
4061
|
-
|
|
4062
|
-
|
|
4063
|
-
CardCarouselComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: CardCarouselComponent, selector: "lcu-card-carousel", inputs: { Stats: ["stats", "Stats"] }, ngImport: i0, template: "<div stats class=\"carousel-container\">\n <div class=\"chevron-container\" fxLayout=\"row\">\n <button mat-icon-button class=\"chevron-button\" id=\"left-chevron\" (click)=\"LeftChevronClicked()\">\n <mat-icon>chevron_left</mat-icon>\n </button>\n <button mat-icon-button class=\"chevron-button\" id=\"right-chevron\" (click)=\"RightChevronClicked()\">\n <mat-icon>chevron_right</mat-icon>\n </button>\n </div>\n <ng-container *ngFor=\"let stat of Stats; let i = index\">\n <div class=\"carousel-item\" [id]=\"'carousel-'+i\">\n <div class=\"carousel-title\">{{stat.Name}}</div>\n <div class=\"carousel-stat\">{{stat.Stat}}</div>\n </div>\n </ng-container>\n <div (click)=\"MoreDetailsClicked()\">More details</div>\n</div>\n", styles: [".carousel-container{text-align:center;height:75px;padding-top:20px}.carousel-item.hidden{display:none}.carousel-item.active{visibility:visible}.chevron-button{position:absolute}#right-chevron{right:5px}#left-chevron{left:5px}\n"], components: [{ type: i2$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i5$1.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i4$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
4064
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: CardCarouselComponent, decorators: [{
|
|
4065
|
-
type: Component,
|
|
4066
|
-
args: [{ selector: 'lcu-card-carousel', template: "<div stats class=\"carousel-container\">\n <div class=\"chevron-container\" fxLayout=\"row\">\n <button mat-icon-button class=\"chevron-button\" id=\"left-chevron\" (click)=\"LeftChevronClicked()\">\n <mat-icon>chevron_left</mat-icon>\n </button>\n <button mat-icon-button class=\"chevron-button\" id=\"right-chevron\" (click)=\"RightChevronClicked()\">\n <mat-icon>chevron_right</mat-icon>\n </button>\n </div>\n <ng-container *ngFor=\"let stat of Stats; let i = index\">\n <div class=\"carousel-item\" [id]=\"'carousel-'+i\">\n <div class=\"carousel-title\">{{stat.Name}}</div>\n <div class=\"carousel-stat\">{{stat.Stat}}</div>\n </div>\n </ng-container>\n <div (click)=\"MoreDetailsClicked()\">More details</div>\n</div>\n", styles: [".carousel-container{text-align:center;height:75px;padding-top:20px}.carousel-item.hidden{display:none}.carousel-item.active{visibility:visible}.chevron-button{position:absolute}#right-chevron{right:5px}#left-chevron{left:5px}\n"] }]
|
|
4067
|
-
}], ctorParameters: function () { return []; }, propDecorators: { Stats: [{
|
|
4068
|
-
type: Input,
|
|
4069
|
-
args: ['stats']
|
|
4070
|
-
}] } });
|
|
4071
|
-
|
|
4072
|
-
class SecurityToggleComponent {
|
|
4073
|
-
constructor(eacSvc, formBldr) {
|
|
4074
|
-
this.eacSvc = eacSvc;
|
|
4075
|
-
this.formBldr = formBldr;
|
|
4076
|
-
this.SaveFormEvent = new EventEmitter;
|
|
4077
|
-
this.SkeletonEffect = 'wave';
|
|
4025
|
+
CreateNewSourceControl() {
|
|
4026
|
+
this.SetEditingSourceControl(Guid.CreateRaw());
|
|
4078
4027
|
}
|
|
4079
|
-
|
|
4080
|
-
|
|
4081
|
-
|
|
4028
|
+
CreateRepository() {
|
|
4029
|
+
this.CreatingRepository = true;
|
|
4030
|
+
this.RepositoryFormControl.reset();
|
|
4082
4031
|
}
|
|
4083
|
-
|
|
4084
|
-
|
|
4085
|
-
return (_a = this.SecurityFormGroup) === null || _a === void 0 ? void 0 : _a.controls.isTriggerSignIn;
|
|
4032
|
+
CancelCreateRepository() {
|
|
4033
|
+
this.CreatingRepository = false;
|
|
4086
4034
|
}
|
|
4087
|
-
|
|
4088
|
-
|
|
4035
|
+
DevOpsActionLookupChanged(event) {
|
|
4036
|
+
this.configureDevOpsAction();
|
|
4089
4037
|
}
|
|
4090
|
-
|
|
4091
|
-
this.
|
|
4038
|
+
MainBranchChanged(event) {
|
|
4039
|
+
this.emitBranchesChanged();
|
|
4040
|
+
}
|
|
4041
|
+
OrganizationChanged(event) {
|
|
4042
|
+
const org = this.OrganizationFormControl;
|
|
4043
|
+
this.RepositoryFormControl.reset();
|
|
4044
|
+
if (this.UseBranches) {
|
|
4045
|
+
this.BranchesFormControl.reset();
|
|
4046
|
+
this.SelectedBranches = [];
|
|
4047
|
+
}
|
|
4048
|
+
this.listRepositories();
|
|
4049
|
+
}
|
|
4050
|
+
RefreshOrganizations() {
|
|
4051
|
+
var _a, _b, _c;
|
|
4052
|
+
// this.Loading = true;
|
|
4053
|
+
this.listOrganizations();
|
|
4054
|
+
(_a = this.OrganizationFormControl) === null || _a === void 0 ? void 0 : _a.reset();
|
|
4055
|
+
(_b = this.RepositoryFormControl) === null || _b === void 0 ? void 0 : _b.reset();
|
|
4056
|
+
if (this.UseBranches) {
|
|
4057
|
+
(_c = this.BranchesFormControl) === null || _c === void 0 ? void 0 : _c.reset();
|
|
4058
|
+
}
|
|
4059
|
+
}
|
|
4060
|
+
RemoveBranchOption(option) {
|
|
4061
|
+
const index = this.SelectedBranches.indexOf(option);
|
|
4062
|
+
if (index >= 0) {
|
|
4063
|
+
this.SelectedBranches.splice(index, 1);
|
|
4064
|
+
}
|
|
4065
|
+
this.emitBranchesChanged();
|
|
4066
|
+
}
|
|
4067
|
+
RepositoryChanged(event) {
|
|
4068
|
+
const repo = this.RepositoryFormControl;
|
|
4069
|
+
if (this.UseBranches) {
|
|
4070
|
+
this.BranchesFormControl.reset();
|
|
4071
|
+
this.SelectedBranches = [];
|
|
4072
|
+
this.listBranches();
|
|
4073
|
+
}
|
|
4074
|
+
if (!this.UseBranches) {
|
|
4075
|
+
this.listBuildPaths();
|
|
4076
|
+
}
|
|
4077
|
+
}
|
|
4078
|
+
SaveRepository() {
|
|
4079
|
+
this.Loading = true;
|
|
4080
|
+
const org = this.OrganizationFormControl.value;
|
|
4081
|
+
const repoName = this.RepositoryFormControl.value;
|
|
4082
|
+
this.appsFlowSvc
|
|
4083
|
+
.CreateRepository(org, repoName)
|
|
4084
|
+
.subscribe((response) => {
|
|
4085
|
+
if (response.Status.Code === 0) {
|
|
4086
|
+
this.listRepositories(repoName);
|
|
4087
|
+
this.CreatingRepository = false;
|
|
4088
|
+
}
|
|
4089
|
+
else {
|
|
4090
|
+
// TODO: Need to surface an error to the user...
|
|
4091
|
+
this.Loading = false;
|
|
4092
|
+
}
|
|
4093
|
+
});
|
|
4094
|
+
}
|
|
4095
|
+
SetEditingSourceControl(scLookup) {
|
|
4096
|
+
this.EditingSourceControlLookup = scLookup;
|
|
4097
|
+
}
|
|
4098
|
+
SubmitSourceControl() {
|
|
4099
|
+
console.log("source control submitted: ", this.DevOpsSourceControlFormGroup.value);
|
|
4100
|
+
this.SaveSourceControl();
|
|
4101
|
+
}
|
|
4102
|
+
SaveSourceControl() {
|
|
4103
|
+
const saveEnvReq = {
|
|
4104
|
+
Environment: Object.assign(Object.assign({}, this.Environment), { Artifacts: this.Environment.Artifacts || {}, DevOpsActions: this.Environment.DevOpsActions || {}, Secrets: this.Environment.Secrets || {}, Sources: this.Environment.Sources || {} }),
|
|
4105
|
+
EnvironmentLookup: this.EnvironmentLookup,
|
|
4106
|
+
EnterpriseDataTokens: {},
|
|
4107
|
+
};
|
|
4108
|
+
let artifactLookup;
|
|
4109
|
+
let artifact = this.Artifact;
|
|
4110
|
+
if (!this.ArtifactLookup) {
|
|
4111
|
+
artifactLookup = Guid.CreateRaw();
|
|
4112
|
+
artifact = Object.assign(Object.assign({}, artifact), {
|
|
4113
|
+
// Type: this.HostingDetailsFormControls.SelectedHostingOption
|
|
4114
|
+
// .ArtifactType,
|
|
4115
|
+
// Name: this.HostingDetailsFormControls.SelectedHostingOption.Name,
|
|
4116
|
+
NPMRegistry: 'https://registry.npmjs.org/' });
|
|
4117
|
+
}
|
|
4118
|
+
else {
|
|
4119
|
+
artifactLookup = this.ArtifactLookup;
|
|
4120
|
+
}
|
|
4121
|
+
saveEnvReq.Environment.Artifacts[artifactLookup] = artifact;
|
|
4122
|
+
let devOpsActionLookup;
|
|
4123
|
+
if (!this.DevOpsActionLookup) {
|
|
4124
|
+
devOpsActionLookup = Guid.CreateRaw();
|
|
4125
|
+
const doa = Object.assign(Object.assign({}, this.DevOpsAction), { ArtifactLookups: [artifactLookup] });
|
|
4126
|
+
saveEnvReq.Environment.DevOpsActions[devOpsActionLookup] = this.DevOpsAction;
|
|
4127
|
+
}
|
|
4128
|
+
else {
|
|
4129
|
+
devOpsActionLookup = this.DevOpsActionLookupFormControl.value;
|
|
4130
|
+
const doa = Object.assign({}, this.DevOpsAction);
|
|
4131
|
+
// saveEnvReq.Environment.DevOpsActions[devOpsActionLookup] = doa;
|
|
4132
|
+
saveEnvReq.Environment.DevOpsActions[devOpsActionLookup] = this.DevOpsAction;
|
|
4133
|
+
}
|
|
4134
|
+
let source = Object.assign(Object.assign({}, this.EditingSourceControl), { Branches: this.SelectedBranches, MainBranch: this.MainBranchFormControl.value });
|
|
4135
|
+
source = Object.assign(Object.assign({}, source), { Type: 'GitHub', Name: this.EditingSourceControlLookup, DevOpsActionTriggerLookups: [devOpsActionLookup], Organization: this.OrganizationFormControl.value, Repository: this.RepositoryFormControl.value });
|
|
4136
|
+
const scLookup = `github://${source.Organization}/${source.Repository}`;
|
|
4137
|
+
saveEnvReq.Environment.Sources[scLookup] = source;
|
|
4138
|
+
let resp = this.eacSvc.SaveEnvironmentAsCode(saveEnvReq);
|
|
4139
|
+
resp.then(res => {
|
|
4140
|
+
this.SaveStatusEvent.emit(res);
|
|
4141
|
+
});
|
|
4142
|
+
}
|
|
4143
|
+
// Helpers
|
|
4144
|
+
addBranchOption(value) {
|
|
4145
|
+
value = (value || '').trim();
|
|
4146
|
+
if (value && this.SelectedBranches.indexOf(value) < 0) {
|
|
4147
|
+
this.SelectedBranches.push(value);
|
|
4148
|
+
}
|
|
4149
|
+
this.BranchesInput.nativeElement.blur();
|
|
4150
|
+
this.emitBranchesChanged();
|
|
4151
|
+
}
|
|
4152
|
+
configureDevOpsAction() {
|
|
4153
|
+
setTimeout(() => {
|
|
4154
|
+
this.DevOpsActionLookupFormControl.setValue(this.DevOpsActionLookup);
|
|
4155
|
+
}, 0);
|
|
4156
|
+
}
|
|
4157
|
+
destroyFormControls() {
|
|
4158
|
+
var _a, _b, _c, _d;
|
|
4159
|
+
this.DevOpsSourceControlFormGroup.removeControl([this.SourceControlRoot, 'mainBranch'].join(''));
|
|
4160
|
+
(_a = this.DevOpsSourceControlFormGroup) === null || _a === void 0 ? void 0 : _a.removeControl([this.SourceControlRoot, 'branches'].join(''));
|
|
4161
|
+
(_b = this.DevOpsSourceControlFormGroup) === null || _b === void 0 ? void 0 : _b.removeControl([this.SourceControlRoot, 'buildPath'].join(''));
|
|
4162
|
+
this.SelectedBranches = [];
|
|
4163
|
+
(_c = this.DevOpsSourceControlFormGroup) === null || _c === void 0 ? void 0 : _c.removeControl([this.SourceControlRoot, 'organization'].join(''));
|
|
4164
|
+
(_d = this.DevOpsSourceControlFormGroup) === null || _d === void 0 ? void 0 : _d.removeControl([this.SourceControlRoot, 'repository'].join(''));
|
|
4165
|
+
}
|
|
4166
|
+
emitBranchesChanged() {
|
|
4167
|
+
var _a, _b;
|
|
4168
|
+
if (((_a = this.SelectedBranches) === null || _a === void 0 ? void 0 : _a.length) > 0 &&
|
|
4169
|
+
(!this.MainBranchFormControl.value ||
|
|
4170
|
+
this.SelectedBranches.indexOf(this.MainBranchFormControl.value) < 0)) {
|
|
4171
|
+
this.MainBranchFormControl.setValue(this.SelectedBranches.find((branch) => branch === 'main' || branch === 'master') || this.SelectedBranches[0]);
|
|
4172
|
+
}
|
|
4173
|
+
else if (((_b = this.SelectedBranches) === null || _b === void 0 ? void 0 : _b.length) <= 0) {
|
|
4174
|
+
this.MainBranchFormControl.reset();
|
|
4175
|
+
}
|
|
4176
|
+
this.BranchesFormControl.setValue(this.SelectedBranches.join(','));
|
|
4177
|
+
this.BranchesChanged(this.SelectedBranches || []);
|
|
4178
|
+
}
|
|
4179
|
+
listBranches() {
|
|
4180
|
+
if (this.UseBranches) {
|
|
4181
|
+
this.Loading = true;
|
|
4182
|
+
this.appsFlowSvc
|
|
4183
|
+
.ListBranches(this.OrganizationFormControl.value, this.RepositoryFormControl.value)
|
|
4184
|
+
.subscribe((response) => {
|
|
4185
|
+
var _a, _b, _c;
|
|
4186
|
+
this.BranchOptions = response.Model;
|
|
4187
|
+
this.Loading = false;
|
|
4188
|
+
if (((_b = (_a = this.EditingSourceControl) === null || _a === void 0 ? void 0 : _a.Branches) === null || _b === void 0 ? void 0 : _b.length) > 0) {
|
|
4189
|
+
this.SelectedBranches = this.EditingSourceControl.Branches;
|
|
4190
|
+
}
|
|
4191
|
+
else if (((_c = this.BranchOptions) === null || _c === void 0 ? void 0 : _c.length) === 1) {
|
|
4192
|
+
this.BranchesFormControl.setValue(this.BranchOptions[0].Name);
|
|
4193
|
+
this.SelectedBranches = [this.BranchOptions[0].Name];
|
|
4194
|
+
}
|
|
4195
|
+
this.emitBranchesChanged();
|
|
4196
|
+
this.listBuildPaths();
|
|
4197
|
+
});
|
|
4198
|
+
}
|
|
4199
|
+
}
|
|
4200
|
+
listBuildPaths() {
|
|
4201
|
+
if (this.UseBuildPath) {
|
|
4202
|
+
this.Loading = true;
|
|
4203
|
+
this.appsFlowSvc
|
|
4204
|
+
.ListBuildPaths(this.OrganizationFormControl.value, this.RepositoryFormControl.value)
|
|
4205
|
+
.subscribe((response) => {
|
|
4206
|
+
var _a;
|
|
4207
|
+
this.BuildPathOptions = response.Model;
|
|
4208
|
+
this.Loading = false;
|
|
4209
|
+
if (((_a = this.BuildPathOptions) === null || _a === void 0 ? void 0 : _a.length) === 1) {
|
|
4210
|
+
this.BuildPathFormControl.setValue(this.BuildPathOptions[0]);
|
|
4211
|
+
}
|
|
4212
|
+
});
|
|
4213
|
+
}
|
|
4214
|
+
}
|
|
4215
|
+
listOrganizations() {
|
|
4216
|
+
this.Loading = true;
|
|
4217
|
+
this.appsFlowSvc
|
|
4218
|
+
.ListOrganizations()
|
|
4219
|
+
.subscribe((response) => {
|
|
4220
|
+
var _a;
|
|
4221
|
+
this.OrganizationOptions = response.Model;
|
|
4222
|
+
this.Loading = false;
|
|
4223
|
+
if ((_a = this.EditingSourceControl) === null || _a === void 0 ? void 0 : _a.Organization) {
|
|
4224
|
+
setTimeout(() => {
|
|
4225
|
+
var _a;
|
|
4226
|
+
this.OrganizationFormControl.setValue(this.EditingSourceControl.Organization);
|
|
4227
|
+
this.listRepositories((_a = this.EditingSourceControl) === null || _a === void 0 ? void 0 : _a.Repository);
|
|
4228
|
+
}, 0);
|
|
4229
|
+
}
|
|
4230
|
+
});
|
|
4231
|
+
}
|
|
4232
|
+
listRepositories(activeRepo = null) {
|
|
4233
|
+
this.Loading = true;
|
|
4234
|
+
this.appsFlowSvc
|
|
4235
|
+
.ListRepositories(this.OrganizationFormControl.value)
|
|
4236
|
+
.subscribe((response) => {
|
|
4237
|
+
var _a;
|
|
4238
|
+
this.RepositoryOptions = response.Model;
|
|
4239
|
+
this.Loading = false;
|
|
4240
|
+
if (activeRepo) {
|
|
4241
|
+
setTimeout(() => {
|
|
4242
|
+
this.RepositoryFormControl.setValue(activeRepo);
|
|
4243
|
+
this.listBranches();
|
|
4244
|
+
if (!this.UseBranches) {
|
|
4245
|
+
this.listBuildPaths();
|
|
4246
|
+
}
|
|
4247
|
+
}, 0);
|
|
4248
|
+
}
|
|
4249
|
+
else if (((_a = this.RepositoryOptions) === null || _a === void 0 ? void 0 : _a.length) <= 0) {
|
|
4250
|
+
this.CreatingRepository = true;
|
|
4251
|
+
}
|
|
4252
|
+
});
|
|
4253
|
+
}
|
|
4254
|
+
loadProjectHostingDetails() {
|
|
4255
|
+
var _a, _b, _c, _d;
|
|
4256
|
+
if (((_a = this.SelectedBranches) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
4257
|
+
this.HostingDetails.Loading = true;
|
|
4258
|
+
this.appsFlowSvc
|
|
4259
|
+
.LoadProjectHostingDetails((_b = this.OrganizationFormControl) === null || _b === void 0 ? void 0 : _b.value, (_c = this.RepositoryFormControl) === null || _c === void 0 ? void 0 : _c.value, (_d = this.MainBranchFormControl) === null || _d === void 0 ? void 0 : _d.value)
|
|
4260
|
+
.subscribe((response) => {
|
|
4261
|
+
this.HostingDetails = response.Model;
|
|
4262
|
+
this.HostingDetails.Loading = false;
|
|
4263
|
+
this.configureDevOpsAction();
|
|
4264
|
+
}, (err) => {
|
|
4265
|
+
this.HostingDetails.Loading = false;
|
|
4266
|
+
});
|
|
4267
|
+
}
|
|
4268
|
+
}
|
|
4269
|
+
setupFormControls() {
|
|
4270
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
4271
|
+
// this.destroyFormControls();
|
|
4272
|
+
this.DevOpsSourceControlFormGroup.addControl('devOpsActionLookup', new FormControl(this.DevOpsActionLookup || '', []));
|
|
4273
|
+
this.DevOpsSourceControlFormGroup.addControl([this.SourceControlRoot, 'organization'].join(''), new FormControl((_a = this.EditingSourceControl.Organization) !== null && _a !== void 0 ? _a : '', Validators.required));
|
|
4274
|
+
this.DevOpsSourceControlFormGroup.addControl([this.SourceControlRoot, 'repository'].join(''), new FormControl((_b = this.EditingSourceControl.Repository) !== null && _b !== void 0 ? _b : '', Validators.required));
|
|
4275
|
+
if (this.UseBranches) {
|
|
4276
|
+
this.DevOpsSourceControlFormGroup.addControl([this.SourceControlRoot, 'branches'].join(''), new FormControl((_d = (_c = this.EditingSourceControl) === null || _c === void 0 ? void 0 : _c.Branches) !== null && _d !== void 0 ? _d : '', Validators.required));
|
|
4277
|
+
this.SelectedBranches = (_e = this.EditingSourceControl) === null || _e === void 0 ? void 0 : _e.Branches;
|
|
4278
|
+
this.DevOpsSourceControlFormGroup.addControl([this.SourceControlRoot, 'mainBranch'].join(''), new FormControl((_f = this.EditingSourceControl.MainBranch) !== null && _f !== void 0 ? _f : '', Validators.required));
|
|
4279
|
+
}
|
|
4280
|
+
if (this.UseBuildPath) {
|
|
4281
|
+
this.DevOpsSourceControlFormGroup.addControl([this.SourceControlRoot, 'buildPath'].join(''), new FormControl((_g = this.BuildPath) !== null && _g !== void 0 ? _g : '', Validators.required));
|
|
4282
|
+
}
|
|
4283
|
+
}
|
|
4284
|
+
}
|
|
4285
|
+
DevopsSourceControlFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: DevopsSourceControlFormComponent, deps: [{ token: ApplicationsFlowService }, { token: EaCService }, { token: i1$1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
|
|
4286
|
+
DevopsSourceControlFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: DevopsSourceControlFormComponent, selector: "lcu-devops-source-control-form", inputs: { EditingSourceControlLookup: ["editing-source-control-lookup", "EditingSourceControlLookup"], Environment: ["environment", "Environment"], EnvironmentLookup: ["environment-lookup", "EnvironmentLookup"] }, outputs: { SaveStatusEvent: "save-status-event" }, viewQueries: [{ propertyName: "BranchesInput", first: true, predicate: ["branches"], descendants: true }], ngImport: i0, template: "<form class=\"form-card\" [formGroup]=\"DevOpsSourceControlFormGroup\" (ngSubmit)=\"SubmitSourceControl()\">\n\n <mat-card class=\"spread\" class=\"sc-card\">\n <mat-card-header>\n <mat-card-title> Source Control </mat-card-title>\n\n <div fxFlex></div>\n\n <mat-icon matSuffix matTooltip=\"Configure source control, DevOps CI/CD, and artifacts.\">\n info_outline\n </mat-icon>\n </mat-card-header>\n\n <mat-card-content>\n <div class=\"card\">\n <mat-form-field class=\"mat-full-width\">\n <mat-select formControlName=\"devOpsActionLookup\" placeholder=\"DevOps Action\"\n [disabled]=\"HostingDetails?.Loading\" (selectionChange)=\"DevOpsActionLookupChanged($event)\">\n <ng-container *ngFor=\"let devOpsActionLookup of DevOpsActionLookups\">\n <mat-option [value]=\"devOpsActionLookup\" *ngIf=\"DevOpsActions[devOpsActionLookup]; let devOpsAction\">\n {{ devOpsAction.Name }}\n </mat-option>\n </ng-container>\n\n <mat-option value=\"\">-- Create New --</mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n <div class=\"card\" *ngIf=\"OrganizationFormControl?.valid || !Loading\">\n <mat-form-field class=\"mat-full-width with-hint margin-bottom\" *ngIf=\"OrganizationOptions?.length > 0\">\n <mat-icon class=\"org-icon\" matPrefix>corporate_fare</mat-icon>\n\n <mat-select [formControlName]=\"SourceControlRoot + 'organization'\" placeholder=\"Organization\"\n (selectionChange)=\"OrganizationChanged($event)\" [disabled]=\"Loading || HostingDetails?.Loading\" required>\n <ng-container *ngFor=\"let orgOpt of OrganizationOptions\">\n <mat-option [value]=\"orgOpt.Name\">\n {{ orgOpt.Name }}\n </mat-option>\n </ng-container>\n </mat-select>\n\n <mat-icon matSuffix (click)=\"RefreshOrganizations()\" matTooltip=\"Refresh Organization\"> refresh </mat-icon>\n\n <a matSuffix href=\"/.oauth/github?oauth-force-edit=true\" target=\"_blank\" color=\"accent\">\n <mat-icon color=\"accent\" matTooltip=\"Re-authorize Organizations\"> launch </mat-icon>\n </a>\n\n <mat-hint>\n If you don't have an organization or would like to create a new one,\n <a href=\"https://github.com/account/organizations/new\" target=\"_blank\">\n start here\n </a>\n </mat-hint>\n </mat-form-field>\n </div>\n\n <div class=\"card\" *ngIf=\"\n RepositoryFormControl?.valid ||\n (OrganizationFormControl?.valid && !Loading)\n \">\n <mat-form-field class=\"mat-full-width\">\n <mat-icon class=\"org-icon\" matPrefix>description</mat-icon>\n\n <mat-select [formControlName]=\"SourceControlRoot + 'repository'\" [placeholder]=\"\n OrganizationFormControl?.valid\n ? 'Repository'\n : 'Repository (select organization first)'\n \" [disabled]=\"\n !OrganizationFormControl?.valid || Loading || HostingDetails?.Loading\n \" (selectionChange)=\"RepositoryChanged($event)\" *ngIf=\"!CreatingRepository\" required>\n <ng-container *ngFor=\"let repoOpt of RepositoryOptions\">\n <mat-option [value]=\"repoOpt.Name\">\n {{ repoOpt.Name }}\n </mat-option>\n </ng-container>\n </mat-select>\n\n <input matInput placeholder=\"Repository (creates new if does not exist)\"\n [formControlName]=\"SourceControlRoot + 'repository'\" *ngIf=\"CreatingRepository\"\n [fxHide]=\"Loading || HostingDetails?.Loading\" required />\n\n <mat-icon matSuffix (click)=\"CreateRepository()\" [fxHide]=\"Loading || HostingDetails?.Loading\"\n *ngIf=\"!CreatingRepository && OrganizationFormControl?.valid\">\n add_circle\n </mat-icon>\n\n <button mat-button type=\"button\" (click)=\"SaveRepository()\"\n *ngIf=\"CreatingRepository && RepositoryFormControl?.valid\">\n\n <mat-icon matSuffix color=\"primary\">\n save\n </mat-icon>\n </button>\n\n <button mat-button type=\"button\" (click)=\"CancelCreateRepository()\" *ngIf=\"CreatingRepository\">\n\n <mat-icon matSuffix>\n cancel\n </mat-icon>\n </button>\n </mat-form-field>\n </div>\n\n <div class=\"card\" *ngIf=\"\n (BranchesFormControl?.valid ||\n (OrganizationFormControl?.valid &&\n RepositoryFormControl?.valid &&\n !Loading)) &&\n !CreatingRepository &&\n UseBranches\n \">\n <mat-form-field class=\"mat-full-width\">\n <mat-icon class=\"org-icon\" matPrefix>account_tree</mat-icon>\n\n <mat-label>Selected Branches</mat-label>\n\n <mat-autocomplete (optionSelected)=\"BranchOptionSelected($event)\" #branchOptions=\"matAutocomplete\">\n <ng-container *ngFor=\"let branchOpt of BranchOptions\">\n <mat-option [value]=\"branchOpt.Name\">\n {{ branchOpt.Name }}\n </mat-option>\n </ng-container>\n </mat-autocomplete>\n\n <mat-chip-list #selectedBranches>\n <mat-chip [removable]=\"true\" (removed)=\"RemoveBranchOption(selBranch)\"\n *ngFor=\"let selBranch of SelectedBranches\">\n {{ selBranch }}\n <mat-icon matChipRemove>cancel</mat-icon>\n </mat-chip>\n\n <input matInput placeholder=\"New Branch...\" [formControlName]=\"SourceControlRoot + 'branches'\" #branches\n [matAutocomplete]=\"branchOptions\" [matChipInputFor]=\"selectedBranches\"\n [matChipInputSeparatorKeyCodes]=\"SeparatorKeysCodes\" [matChipInputAddOnBlur]=\"true\"\n (matChipInputTokenEnd)=\"AddBranchOption($event)\" [disabled]=\"Loading || HostingDetails?.Loading\"\n required />\n </mat-chip-list>\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width with-hint\" [fxShow]=\"SelectedBranches?.length > 1\">\n <mat-icon class=\"org-icon\" matPrefix>account_tree</mat-icon>\n\n <mat-select [formControlName]=\"SourceControlRoot + 'mainBranch'\" placeholder=\"Main Branch\"\n [disabled]=\"Loading || HostingDetails?.Loading\" (selectionChange)=\"MainBranchChanged($event)\" required>\n <ng-container *ngFor=\"let branch of SelectedBranches\">\n <mat-option [value]=\"branch\">\n {{ branch }}\n </mat-option>\n </ng-container>\n </mat-select>\n\n <mat-icon matSuffix (click)=\"RefreshOrganizations()\"> refresh </mat-icon>\n\n <a matSuffix mat-icon-button href=\"/.oauth/github?oauth-force-edit=true\" target=\"_blank\" color=\"accent\">\n <mat-icon matTooltip=\"Re-authorize Organizations\" color=\"accent\"> launch </mat-icon>\n </a>\n\n <mat-hint>\n If you don't have an organization or would like to create a new one,\n <a href=\"https://github.com/account/organizations/new\" target=\"_blank\">\n start here\n </a>\n </mat-hint>\n </mat-form-field>\n </div>\n\n <div class=\"card\" *ngIf=\"\n (BuildPathFormControl?.valid ||\n (OrganizationFormControl?.valid &&\n RepositoryFormControl?.valid &&\n !Loading)) &&\n !CreatingRepository &&\n UseBuildPath\n \">\n <mat-form-field class=\"mat-full-width with-hint\">\n <mat-icon class=\"org-icon\" matPrefix>build</mat-icon>\n\n <mat-select [formControlName]=\"SourceControlRoot + 'buildPath'\" placeholder=\"Build Path\"\n [disabled]=\"Loading || BuildPathDisabled\" (selectionChange)=\"BuildPathChanged($event)\" required>\n <ng-container *ngFor=\"let buildPath of BuildPathOptions\">\n <mat-option [value]=\"buildPath\">\n {{ buildPath }}\n </mat-option>\n </ng-container>\n </mat-select>\n\n <mat-hint>\n The build path identifies which build action to use for your\n configuration.\n </mat-hint>\n </mat-form-field>\n </div>\n\n <div *ngIf=\"Loading\">\n <div class=\"spread\">\n <lcu-loader style=\"margin: auto\" [loading]=\"true\"></lcu-loader>\n\n <div class=\"margin-3\">\n <h4 class=\"mat-title\" *ngIf=\"!OrganizationFormControl?.valid\">\n Loading organizations\n </h4>\n\n <h4 class=\"mat-title\" *ngIf=\"\n OrganizationFormControl?.valid && !RepositoryFormControl?.valid\n \">\n Loading repositories\n </h4>\n\n <h4 class=\"mat-title\" *ngIf=\"RepositoryFormControl?.valid && !BranchesFormControl?.valid\">\n Loading branches\n </h4>\n\n <h4 class=\"mat-title\" *ngIf=\"\n (RepositoryFormControl?.valid || BranchesFormControl?.valid) &&\n !BuildPathFormControl?.valid\n \">\n Loading build paths\n </h4>\n </div>\n </div>\n </div>\n <!-- </div> -->\n\n </mat-card-content>\n <mat-card-actions fxLayoutAlign=\"center center\">\n\n <button \n mat-raised-button \n *ngIf=\"!State?.Loading\"\n type=\"submit\" \n fxFlex=\"100%\" \n color=\"primary\" \n [disabled]=\"!DevOpsSourceControlFormGroup.valid || !DevOpsSourceControlFormGroup.dirty\">\n <mat-icon>save</mat-icon>\n Save Source Control\n </button>\n <lcu-loader [loading]=\"State?.Loading\"></lcu-loader>\n \n </mat-card-actions>\n </mat-card>\n</form>", styles: [".form-card,.sc-card{width:100%}.margin-bottom{margin-bottom:15px}\n"], components: [{ type: i4.MatCard, selector: "mat-card", exportAs: ["matCard"] }, { type: i4.MatCardHeader, selector: "mat-card-header" }, { type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i4$2.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { type: i7.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i8.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { type: i2$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i8$1.MatAutocomplete, selector: "mat-autocomplete", inputs: ["disableRipple"], exportAs: ["matAutocomplete"] }, { type: i9$1.MatChipList, selector: "mat-chip-list", inputs: ["errorStateMatcher", "multiple", "compareWith", "value", "required", "placeholder", "disabled", "aria-orientation", "selectable", "tabIndex"], outputs: ["change", "valueChange"], exportAs: ["matChipList"] }, { type: i2$1.MatAnchor, selector: "a[mat-button], a[mat-raised-button], a[mat-icon-button], a[mat-fab], a[mat-mini-fab], a[mat-stroked-button], a[mat-flat-button]", inputs: ["disabled", "disableRipple", "color", "tabIndex"], exportAs: ["matButton", "matAnchor"] }, { type: i3.LoaderComponent, selector: "lcu-loader", inputs: ["diameter", "hide-inner", "loading"] }], directives: [{ type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i4.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { type: i5$1.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { type: i4$2.MatSuffix, selector: "[matSuffix]" }, { type: i12.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { type: i4.MatCardContent, selector: "mat-card-content, [mat-card-content], [matCardContent]" }, { type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { type: i4$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4$2.MatPrefix, selector: "[matPrefix]" }, { type: i1$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i4$2.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { type: i11.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i9.DefaultShowHideDirective, selector: " [fxShow], [fxShow.print], [fxShow.xs], [fxShow.sm], [fxShow.md], [fxShow.lg], [fxShow.xl], [fxShow.lt-sm], [fxShow.lt-md], [fxShow.lt-lg], [fxShow.lt-xl], [fxShow.gt-xs], [fxShow.gt-sm], [fxShow.gt-md], [fxShow.gt-lg], [fxHide], [fxHide.print], [fxHide.xs], [fxHide.sm], [fxHide.md], [fxHide.lg], [fxHide.xl], [fxHide.lt-sm], [fxHide.lt-md], [fxHide.lt-lg], [fxHide.lt-xl], [fxHide.gt-xs], [fxHide.gt-sm], [fxHide.gt-md], [fxHide.gt-lg]", inputs: ["fxShow", "fxShow.print", "fxShow.xs", "fxShow.sm", "fxShow.md", "fxShow.lg", "fxShow.xl", "fxShow.lt-sm", "fxShow.lt-md", "fxShow.lt-lg", "fxShow.lt-xl", "fxShow.gt-xs", "fxShow.gt-sm", "fxShow.gt-md", "fxShow.gt-lg", "fxHide", "fxHide.print", "fxHide.xs", "fxHide.sm", "fxHide.md", "fxHide.lg", "fxHide.xl", "fxHide.lt-sm", "fxHide.lt-md", "fxHide.lt-lg", "fxHide.lt-xl", "fxHide.gt-xs", "fxHide.gt-sm", "fxHide.gt-md", "fxHide.gt-lg"] }, { type: i4$2.MatLabel, selector: "mat-label" }, { type: i9$1.MatChip, selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", inputs: ["color", "disableRipple", "tabIndex", "selected", "value", "selectable", "disabled", "removable"], outputs: ["selectionChange", "destroyed", "removed"], exportAs: ["matChip"] }, { type: i9$1.MatChipRemove, selector: "[matChipRemove]" }, { type: i8$1.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", exportAs: ["matAutocompleteTrigger"] }, { type: i9$1.MatChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputFor", "matChipInputAddOnBlur", "matChipInputSeparatorKeyCodes", "placeholder", "id", "disabled"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }, { type: i4.MatCardActions, selector: "mat-card-actions", inputs: ["align"], exportAs: ["matCardActions"] }, { type: i5$1.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }] });
|
|
4287
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: DevopsSourceControlFormComponent, decorators: [{
|
|
4288
|
+
type: Component,
|
|
4289
|
+
args: [{ selector: 'lcu-devops-source-control-form', template: "<form class=\"form-card\" [formGroup]=\"DevOpsSourceControlFormGroup\" (ngSubmit)=\"SubmitSourceControl()\">\n\n <mat-card class=\"spread\" class=\"sc-card\">\n <mat-card-header>\n <mat-card-title> Source Control </mat-card-title>\n\n <div fxFlex></div>\n\n <mat-icon matSuffix matTooltip=\"Configure source control, DevOps CI/CD, and artifacts.\">\n info_outline\n </mat-icon>\n </mat-card-header>\n\n <mat-card-content>\n <div class=\"card\">\n <mat-form-field class=\"mat-full-width\">\n <mat-select formControlName=\"devOpsActionLookup\" placeholder=\"DevOps Action\"\n [disabled]=\"HostingDetails?.Loading\" (selectionChange)=\"DevOpsActionLookupChanged($event)\">\n <ng-container *ngFor=\"let devOpsActionLookup of DevOpsActionLookups\">\n <mat-option [value]=\"devOpsActionLookup\" *ngIf=\"DevOpsActions[devOpsActionLookup]; let devOpsAction\">\n {{ devOpsAction.Name }}\n </mat-option>\n </ng-container>\n\n <mat-option value=\"\">-- Create New --</mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n <div class=\"card\" *ngIf=\"OrganizationFormControl?.valid || !Loading\">\n <mat-form-field class=\"mat-full-width with-hint margin-bottom\" *ngIf=\"OrganizationOptions?.length > 0\">\n <mat-icon class=\"org-icon\" matPrefix>corporate_fare</mat-icon>\n\n <mat-select [formControlName]=\"SourceControlRoot + 'organization'\" placeholder=\"Organization\"\n (selectionChange)=\"OrganizationChanged($event)\" [disabled]=\"Loading || HostingDetails?.Loading\" required>\n <ng-container *ngFor=\"let orgOpt of OrganizationOptions\">\n <mat-option [value]=\"orgOpt.Name\">\n {{ orgOpt.Name }}\n </mat-option>\n </ng-container>\n </mat-select>\n\n <mat-icon matSuffix (click)=\"RefreshOrganizations()\" matTooltip=\"Refresh Organization\"> refresh </mat-icon>\n\n <a matSuffix href=\"/.oauth/github?oauth-force-edit=true\" target=\"_blank\" color=\"accent\">\n <mat-icon color=\"accent\" matTooltip=\"Re-authorize Organizations\"> launch </mat-icon>\n </a>\n\n <mat-hint>\n If you don't have an organization or would like to create a new one,\n <a href=\"https://github.com/account/organizations/new\" target=\"_blank\">\n start here\n </a>\n </mat-hint>\n </mat-form-field>\n </div>\n\n <div class=\"card\" *ngIf=\"\n RepositoryFormControl?.valid ||\n (OrganizationFormControl?.valid && !Loading)\n \">\n <mat-form-field class=\"mat-full-width\">\n <mat-icon class=\"org-icon\" matPrefix>description</mat-icon>\n\n <mat-select [formControlName]=\"SourceControlRoot + 'repository'\" [placeholder]=\"\n OrganizationFormControl?.valid\n ? 'Repository'\n : 'Repository (select organization first)'\n \" [disabled]=\"\n !OrganizationFormControl?.valid || Loading || HostingDetails?.Loading\n \" (selectionChange)=\"RepositoryChanged($event)\" *ngIf=\"!CreatingRepository\" required>\n <ng-container *ngFor=\"let repoOpt of RepositoryOptions\">\n <mat-option [value]=\"repoOpt.Name\">\n {{ repoOpt.Name }}\n </mat-option>\n </ng-container>\n </mat-select>\n\n <input matInput placeholder=\"Repository (creates new if does not exist)\"\n [formControlName]=\"SourceControlRoot + 'repository'\" *ngIf=\"CreatingRepository\"\n [fxHide]=\"Loading || HostingDetails?.Loading\" required />\n\n <mat-icon matSuffix (click)=\"CreateRepository()\" [fxHide]=\"Loading || HostingDetails?.Loading\"\n *ngIf=\"!CreatingRepository && OrganizationFormControl?.valid\">\n add_circle\n </mat-icon>\n\n <button mat-button type=\"button\" (click)=\"SaveRepository()\"\n *ngIf=\"CreatingRepository && RepositoryFormControl?.valid\">\n\n <mat-icon matSuffix color=\"primary\">\n save\n </mat-icon>\n </button>\n\n <button mat-button type=\"button\" (click)=\"CancelCreateRepository()\" *ngIf=\"CreatingRepository\">\n\n <mat-icon matSuffix>\n cancel\n </mat-icon>\n </button>\n </mat-form-field>\n </div>\n\n <div class=\"card\" *ngIf=\"\n (BranchesFormControl?.valid ||\n (OrganizationFormControl?.valid &&\n RepositoryFormControl?.valid &&\n !Loading)) &&\n !CreatingRepository &&\n UseBranches\n \">\n <mat-form-field class=\"mat-full-width\">\n <mat-icon class=\"org-icon\" matPrefix>account_tree</mat-icon>\n\n <mat-label>Selected Branches</mat-label>\n\n <mat-autocomplete (optionSelected)=\"BranchOptionSelected($event)\" #branchOptions=\"matAutocomplete\">\n <ng-container *ngFor=\"let branchOpt of BranchOptions\">\n <mat-option [value]=\"branchOpt.Name\">\n {{ branchOpt.Name }}\n </mat-option>\n </ng-container>\n </mat-autocomplete>\n\n <mat-chip-list #selectedBranches>\n <mat-chip [removable]=\"true\" (removed)=\"RemoveBranchOption(selBranch)\"\n *ngFor=\"let selBranch of SelectedBranches\">\n {{ selBranch }}\n <mat-icon matChipRemove>cancel</mat-icon>\n </mat-chip>\n\n <input matInput placeholder=\"New Branch...\" [formControlName]=\"SourceControlRoot + 'branches'\" #branches\n [matAutocomplete]=\"branchOptions\" [matChipInputFor]=\"selectedBranches\"\n [matChipInputSeparatorKeyCodes]=\"SeparatorKeysCodes\" [matChipInputAddOnBlur]=\"true\"\n (matChipInputTokenEnd)=\"AddBranchOption($event)\" [disabled]=\"Loading || HostingDetails?.Loading\"\n required />\n </mat-chip-list>\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width with-hint\" [fxShow]=\"SelectedBranches?.length > 1\">\n <mat-icon class=\"org-icon\" matPrefix>account_tree</mat-icon>\n\n <mat-select [formControlName]=\"SourceControlRoot + 'mainBranch'\" placeholder=\"Main Branch\"\n [disabled]=\"Loading || HostingDetails?.Loading\" (selectionChange)=\"MainBranchChanged($event)\" required>\n <ng-container *ngFor=\"let branch of SelectedBranches\">\n <mat-option [value]=\"branch\">\n {{ branch }}\n </mat-option>\n </ng-container>\n </mat-select>\n\n <mat-icon matSuffix (click)=\"RefreshOrganizations()\"> refresh </mat-icon>\n\n <a matSuffix mat-icon-button href=\"/.oauth/github?oauth-force-edit=true\" target=\"_blank\" color=\"accent\">\n <mat-icon matTooltip=\"Re-authorize Organizations\" color=\"accent\"> launch </mat-icon>\n </a>\n\n <mat-hint>\n If you don't have an organization or would like to create a new one,\n <a href=\"https://github.com/account/organizations/new\" target=\"_blank\">\n start here\n </a>\n </mat-hint>\n </mat-form-field>\n </div>\n\n <div class=\"card\" *ngIf=\"\n (BuildPathFormControl?.valid ||\n (OrganizationFormControl?.valid &&\n RepositoryFormControl?.valid &&\n !Loading)) &&\n !CreatingRepository &&\n UseBuildPath\n \">\n <mat-form-field class=\"mat-full-width with-hint\">\n <mat-icon class=\"org-icon\" matPrefix>build</mat-icon>\n\n <mat-select [formControlName]=\"SourceControlRoot + 'buildPath'\" placeholder=\"Build Path\"\n [disabled]=\"Loading || BuildPathDisabled\" (selectionChange)=\"BuildPathChanged($event)\" required>\n <ng-container *ngFor=\"let buildPath of BuildPathOptions\">\n <mat-option [value]=\"buildPath\">\n {{ buildPath }}\n </mat-option>\n </ng-container>\n </mat-select>\n\n <mat-hint>\n The build path identifies which build action to use for your\n configuration.\n </mat-hint>\n </mat-form-field>\n </div>\n\n <div *ngIf=\"Loading\">\n <div class=\"spread\">\n <lcu-loader style=\"margin: auto\" [loading]=\"true\"></lcu-loader>\n\n <div class=\"margin-3\">\n <h4 class=\"mat-title\" *ngIf=\"!OrganizationFormControl?.valid\">\n Loading organizations\n </h4>\n\n <h4 class=\"mat-title\" *ngIf=\"\n OrganizationFormControl?.valid && !RepositoryFormControl?.valid\n \">\n Loading repositories\n </h4>\n\n <h4 class=\"mat-title\" *ngIf=\"RepositoryFormControl?.valid && !BranchesFormControl?.valid\">\n Loading branches\n </h4>\n\n <h4 class=\"mat-title\" *ngIf=\"\n (RepositoryFormControl?.valid || BranchesFormControl?.valid) &&\n !BuildPathFormControl?.valid\n \">\n Loading build paths\n </h4>\n </div>\n </div>\n </div>\n <!-- </div> -->\n\n </mat-card-content>\n <mat-card-actions fxLayoutAlign=\"center center\">\n\n <button \n mat-raised-button \n *ngIf=\"!State?.Loading\"\n type=\"submit\" \n fxFlex=\"100%\" \n color=\"primary\" \n [disabled]=\"!DevOpsSourceControlFormGroup.valid || !DevOpsSourceControlFormGroup.dirty\">\n <mat-icon>save</mat-icon>\n Save Source Control\n </button>\n <lcu-loader [loading]=\"State?.Loading\"></lcu-loader>\n \n </mat-card-actions>\n </mat-card>\n</form>", styles: [".form-card,.sc-card{width:100%}.margin-bottom{margin-bottom:15px}\n"] }]
|
|
4290
|
+
}], ctorParameters: function () { return [{ type: ApplicationsFlowService }, { type: EaCService }, { type: i1$1.FormBuilder }]; }, propDecorators: { EditingSourceControlLookup: [{
|
|
4291
|
+
type: Input,
|
|
4292
|
+
args: ['editing-source-control-lookup']
|
|
4293
|
+
}], Environment: [{
|
|
4294
|
+
type: Input,
|
|
4295
|
+
args: ['environment']
|
|
4296
|
+
}], EnvironmentLookup: [{
|
|
4297
|
+
type: Input,
|
|
4298
|
+
args: ['environment-lookup']
|
|
4299
|
+
}], SaveStatusEvent: [{
|
|
4300
|
+
type: Output,
|
|
4301
|
+
args: ['save-status-event']
|
|
4302
|
+
}], BranchesInput: [{
|
|
4303
|
+
type: ViewChild,
|
|
4304
|
+
args: ['branches']
|
|
4305
|
+
}] } });
|
|
4306
|
+
|
|
4307
|
+
class SourceControlDialogComponent {
|
|
4308
|
+
constructor(dialogRef, data) {
|
|
4309
|
+
this.dialogRef = dialogRef;
|
|
4310
|
+
this.data = data;
|
|
4311
|
+
}
|
|
4312
|
+
ngOnInit() {
|
|
4313
|
+
}
|
|
4314
|
+
CloseDialog() {
|
|
4315
|
+
this.dialogRef.close();
|
|
4316
|
+
}
|
|
4317
|
+
}
|
|
4318
|
+
SourceControlDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: SourceControlDialogComponent, deps: [{ token: i1$4.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
|
|
4319
|
+
SourceControlDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: SourceControlDialogComponent, selector: "lcu-source-control-dialog", ngImport: i0, template: "\n<div class=\"dialog-header\" fxLayoutAlign=\"end center\">\n <button mat-icon-button (click)=\"CloseDialog()\">\n <mat-icon>cancel</mat-icon>\n </button>\n</div>\n\n<div fxLayoutAlign=\"center center\">\n <lcu-devops-source-control-form\n [environment]=\"data.environment\"\n [environment-lookup]=\"data.environmentLookup\"\n [editing-source-control-lookup]=\"data.scLookup\">\n </lcu-devops-source-control-form>\n</div>", styles: [".dialog-header{width:100%}\n"], components: [{ type: i2$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: DevopsSourceControlFormComponent, selector: "lcu-devops-source-control-form", inputs: ["editing-source-control-lookup", "environment", "environment-lookup"], outputs: ["save-status-event"] }], directives: [{ type: i5$1.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }] });
|
|
4320
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: SourceControlDialogComponent, decorators: [{
|
|
4321
|
+
type: Component,
|
|
4322
|
+
args: [{ selector: 'lcu-source-control-dialog', template: "\n<div class=\"dialog-header\" fxLayoutAlign=\"end center\">\n <button mat-icon-button (click)=\"CloseDialog()\">\n <mat-icon>cancel</mat-icon>\n </button>\n</div>\n\n<div fxLayoutAlign=\"center center\">\n <lcu-devops-source-control-form\n [environment]=\"data.environment\"\n [environment-lookup]=\"data.environmentLookup\"\n [editing-source-control-lookup]=\"data.scLookup\">\n </lcu-devops-source-control-form>\n</div>", styles: [".dialog-header{width:100%}\n"] }]
|
|
4323
|
+
}], ctorParameters: function () {
|
|
4324
|
+
return [{ type: i1$4.MatDialogRef }, { type: undefined, decorators: [{
|
|
4325
|
+
type: Inject,
|
|
4326
|
+
args: [MAT_DIALOG_DATA]
|
|
4327
|
+
}] }];
|
|
4328
|
+
} });
|
|
4329
|
+
|
|
4330
|
+
class MainFeedCardComponent {
|
|
4331
|
+
constructor(eacSvc, dialog) {
|
|
4332
|
+
this.eacSvc = eacSvc;
|
|
4333
|
+
this.dialog = dialog;
|
|
4334
|
+
}
|
|
4335
|
+
get ActiveEnvironment() {
|
|
4336
|
+
var _a, _b;
|
|
4337
|
+
return (_b = (_a = this.State) === null || _a === void 0 ? void 0 : _a.EaC) === null || _b === void 0 ? void 0 : _b.Environments[this.ActiveEnvironmentLookup];
|
|
4338
|
+
}
|
|
4339
|
+
get ActiveEnvironmentLookup() {
|
|
4340
|
+
var _a, _b;
|
|
4341
|
+
// TODO: Eventually support multiple environments
|
|
4342
|
+
const envLookups = Object.keys(((_b = (_a = this.State) === null || _a === void 0 ? void 0 : _a.EaC) === null || _b === void 0 ? void 0 : _b.Environments) || {});
|
|
4343
|
+
return envLookups[0];
|
|
4344
|
+
}
|
|
4345
|
+
get Environment() {
|
|
4346
|
+
var _a, _b, _c, _d, _e;
|
|
4347
|
+
// console.log("Ent Environment var: ", this.State?.EaC?.Environments[this.State?.EaC?.Enterprise?.PrimaryEnvironment]);
|
|
4348
|
+
return (_b = (_a = this.State) === null || _a === void 0 ? void 0 : _a.EaC) === null || _b === void 0 ? void 0 : _b.Environments[(_e = (_d = (_c = this.State) === null || _c === void 0 ? void 0 : _c.EaC) === null || _d === void 0 ? void 0 : _d.Enterprise) === null || _e === void 0 ? void 0 : _e.PrimaryEnvironment];
|
|
4349
|
+
}
|
|
4350
|
+
get Icon() {
|
|
4351
|
+
if (this.FeedItem.Status.Code === 0) {
|
|
4352
|
+
return 'check_circle';
|
|
4353
|
+
}
|
|
4354
|
+
else if (this.FeedItem.Status.Code === 1) {
|
|
4355
|
+
return 'cancel';
|
|
4356
|
+
}
|
|
4357
|
+
else if (this.FeedItem.Status.Code === 2) {
|
|
4358
|
+
return 'sync';
|
|
4359
|
+
}
|
|
4360
|
+
else {
|
|
4361
|
+
return 'help_outline';
|
|
4362
|
+
}
|
|
4363
|
+
}
|
|
4364
|
+
get IconColor() {
|
|
4365
|
+
if (this.FeedItem.Status.Code === 0) {
|
|
4366
|
+
return 'green';
|
|
4367
|
+
}
|
|
4368
|
+
else if (this.FeedItem.Status.Code === 1) {
|
|
4369
|
+
return 'red';
|
|
4370
|
+
}
|
|
4371
|
+
else if (this.FeedItem.Status.Code === 2) {
|
|
4372
|
+
return 'blue';
|
|
4373
|
+
}
|
|
4374
|
+
else {
|
|
4375
|
+
return 'gray';
|
|
4376
|
+
}
|
|
4377
|
+
}
|
|
4378
|
+
get State() {
|
|
4379
|
+
return this.eacSvc.State;
|
|
4380
|
+
}
|
|
4381
|
+
// Life Cycle
|
|
4382
|
+
ngOnInit() {
|
|
4383
|
+
this.handleRefresh();
|
|
4384
|
+
}
|
|
4385
|
+
// API Methods
|
|
4386
|
+
CalculateTimelapse(timestamp) {
|
|
4387
|
+
return moment(timestamp).fromNow();
|
|
4388
|
+
}
|
|
4389
|
+
HandleAction(action) {
|
|
4390
|
+
if (action.ActionType == 'Link') {
|
|
4391
|
+
if (action.Action.startsWith('http')) {
|
|
4392
|
+
window.open(action.Action, '_blank');
|
|
4393
|
+
}
|
|
4394
|
+
else {
|
|
4395
|
+
window.location.href = action.Action;
|
|
4396
|
+
}
|
|
4397
|
+
}
|
|
4398
|
+
else if (action.ActionType == 'Modal') {
|
|
4399
|
+
if (action.Action == 'AddSourceControl') {
|
|
4400
|
+
this.OpenSourceControlDialog('');
|
|
4401
|
+
}
|
|
4402
|
+
else {
|
|
4403
|
+
alert('other modaled ' + action.Action);
|
|
4404
|
+
}
|
|
4405
|
+
}
|
|
4406
|
+
}
|
|
4407
|
+
OpenSourceControlDialog(scLookup) {
|
|
4408
|
+
const dialogRef = this.dialog.open(SourceControlDialogComponent, {
|
|
4409
|
+
width: '550px',
|
|
4410
|
+
data: {
|
|
4411
|
+
environment: this.Environment,
|
|
4412
|
+
environmentLookup: this.ActiveEnvironmentLookup,
|
|
4413
|
+
scLookup: scLookup,
|
|
4414
|
+
},
|
|
4415
|
+
});
|
|
4416
|
+
dialogRef.afterClosed().subscribe((result) => {
|
|
4417
|
+
// console.log('The dialog was closed');
|
|
4418
|
+
// console.log("result:", result)
|
|
4419
|
+
});
|
|
4420
|
+
}
|
|
4421
|
+
// Helpers
|
|
4422
|
+
handleRefresh() {
|
|
4423
|
+
var _a;
|
|
4424
|
+
if ((_a = this.FeedItem) === null || _a === void 0 ? void 0 : _a.RefreshLink) {
|
|
4425
|
+
setTimeout(() => {
|
|
4426
|
+
this.eacSvc.CheckUserFeedItem(this.FeedItem).subscribe((response) => __awaiter(this, void 0, void 0, function* () {
|
|
4427
|
+
if (response.Status.Code === 0) {
|
|
4428
|
+
this.FeedItem = response.Model;
|
|
4429
|
+
this.handleRefresh();
|
|
4430
|
+
}
|
|
4431
|
+
else {
|
|
4432
|
+
console.log(response);
|
|
4433
|
+
}
|
|
4434
|
+
}), (err) => {
|
|
4435
|
+
console.log(err);
|
|
4436
|
+
});
|
|
4437
|
+
}, 5000);
|
|
4438
|
+
}
|
|
4439
|
+
}
|
|
4440
|
+
}
|
|
4441
|
+
MainFeedCardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: MainFeedCardComponent, deps: [{ token: EaCService }, { token: i1$4.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
|
|
4442
|
+
MainFeedCardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: MainFeedCardComponent, selector: "lcu-main-feed-card", inputs: { FeedItem: ["feed-item", "FeedItem"] }, ngImport: i0, template: "<mat-card class=\"social-card\">\n <mat-card-header>\n <img\n mat-card-avatar\n class=\"example-header-image\"\n [src]=\"FeedItem.Avatar\"\n *ngIf=\"FeedItem.Avatar\"\n />\n\n <mat-card-title *ngIf=\"FeedItem.Title\">{{ FeedItem.Title }}</mat-card-title>\n\n <mat-card-subtitle>\n <div *ngIf=\"FeedItem.Subtitle\">{{ FeedItem.Subtitle }}</div>\n <div *ngIf=\"FeedItem.Status\">\n <mat-icon\n *ngIf=\"Icon\"\n [style.color]=\"IconColor\"\n [class.spin]=\"FeedItem.Status?.Code == 2\"\n >\n {{ Icon }}\n </mat-icon>\n\n <span *ngIf=\"FeedItem.Timestamp\">\n {{ CalculateTimelapse(FeedItem.Timestamp) }}\n </span>\n </div>\n </mat-card-subtitle>\n </mat-card-header>\n\n <div *ngIf=\"!FeedItem.IsShortForm\">\n <!-- <div class=\"feed-card-container\">\n <div class=\"feed-card-main-content\">\n The tab content (only 1 'tab' for now)... So really we don't need to worry about tabs until a future iteration\n\n The tabs property will contain a data structure that will vary by the FeedItem.Type... That structure can be used to render the content\n </div>\n </div> -->\n </div>\n\n <mat-card-actions fxLayout=\"row\" fxLayoutAlign=\"space-around center\">\n <div fxFlex></div>\n\n <ng-container *ngFor=\"let action of FeedItem.Actions\">\n <button mat-button [color]=\"action.Color\" (click)=\"HandleAction(action)\">\n <mat-icon *ngIf=\"action.Icon\">{{ action.Icon }}</mat-icon>\n\n {{ action.Text }}\n </button>\n </ng-container>\n </mat-card-actions>\n</mat-card>\n", styles: [":host :host ::ng-deep .social-card{margin:20px;padding:15px 5px}:host :host ::ng-deep mat-card-actions{margin-bottom:-1px!important;margin-left:0!important;margin-right:-.5px!important}:host :host ::ng-deep .main-slot-container{padding:10px}:host :host ::ng-deep .slot-header{align-items:center}:host :host ::ng-deep .slot-content{width:100%}:host :host ::ng-deep .slot-name{font-size:13px;font-weight:600}:host :host ::ng-deep .slot-description{font-size:12px;margin-right:10px}:host :host ::ng-deep .slot-action-anchor{font-size:10px;text-decoration:none;color:#000}:host :host ::ng-deep .action-icon{height:25px;width:25px;font-size:25px;cursor:pointer}:host .example-header-image{background-size:cover}:host .mat-icon{display:inline-flex;vertical-align:middle}:host .mat-icon.spin{animation:rotate 1s ease-in-out infinite}@keyframes rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}\n"], components: [{ type: i4.MatCard, selector: "mat-card", exportAs: ["matCard"] }, { type: i4.MatCardHeader, selector: "mat-card-header" }, { type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i2$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.MatCardAvatar, selector: "[mat-card-avatar], [matCardAvatar]" }, { type: i4.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { type: i4.MatCardSubtitle, selector: "mat-card-subtitle, [mat-card-subtitle], [matCardSubtitle]" }, { type: i4.MatCardActions, selector: "mat-card-actions", inputs: ["align"], exportAs: ["matCardActions"] }, { type: i5$1.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i5$1.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { type: i5$1.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { type: i4$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
4443
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: MainFeedCardComponent, decorators: [{
|
|
4444
|
+
type: Component,
|
|
4445
|
+
args: [{ selector: 'lcu-main-feed-card', template: "<mat-card class=\"social-card\">\n <mat-card-header>\n <img\n mat-card-avatar\n class=\"example-header-image\"\n [src]=\"FeedItem.Avatar\"\n *ngIf=\"FeedItem.Avatar\"\n />\n\n <mat-card-title *ngIf=\"FeedItem.Title\">{{ FeedItem.Title }}</mat-card-title>\n\n <mat-card-subtitle>\n <div *ngIf=\"FeedItem.Subtitle\">{{ FeedItem.Subtitle }}</div>\n <div *ngIf=\"FeedItem.Status\">\n <mat-icon\n *ngIf=\"Icon\"\n [style.color]=\"IconColor\"\n [class.spin]=\"FeedItem.Status?.Code == 2\"\n >\n {{ Icon }}\n </mat-icon>\n\n <span *ngIf=\"FeedItem.Timestamp\">\n {{ CalculateTimelapse(FeedItem.Timestamp) }}\n </span>\n </div>\n </mat-card-subtitle>\n </mat-card-header>\n\n <div *ngIf=\"!FeedItem.IsShortForm\">\n <!-- <div class=\"feed-card-container\">\n <div class=\"feed-card-main-content\">\n The tab content (only 1 'tab' for now)... So really we don't need to worry about tabs until a future iteration\n\n The tabs property will contain a data structure that will vary by the FeedItem.Type... That structure can be used to render the content\n </div>\n </div> -->\n </div>\n\n <mat-card-actions fxLayout=\"row\" fxLayoutAlign=\"space-around center\">\n <div fxFlex></div>\n\n <ng-container *ngFor=\"let action of FeedItem.Actions\">\n <button mat-button [color]=\"action.Color\" (click)=\"HandleAction(action)\">\n <mat-icon *ngIf=\"action.Icon\">{{ action.Icon }}</mat-icon>\n\n {{ action.Text }}\n </button>\n </ng-container>\n </mat-card-actions>\n</mat-card>\n", styles: [":host :host ::ng-deep .social-card{margin:20px;padding:15px 5px}:host :host ::ng-deep mat-card-actions{margin-bottom:-1px!important;margin-left:0!important;margin-right:-.5px!important}:host :host ::ng-deep .main-slot-container{padding:10px}:host :host ::ng-deep .slot-header{align-items:center}:host :host ::ng-deep .slot-content{width:100%}:host :host ::ng-deep .slot-name{font-size:13px;font-weight:600}:host :host ::ng-deep .slot-description{font-size:12px;margin-right:10px}:host :host ::ng-deep .slot-action-anchor{font-size:10px;text-decoration:none;color:#000}:host :host ::ng-deep .action-icon{height:25px;width:25px;font-size:25px;cursor:pointer}:host .example-header-image{background-size:cover}:host .mat-icon{display:inline-flex;vertical-align:middle}:host .mat-icon.spin{animation:rotate 1s ease-in-out infinite}@keyframes rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}\n"] }]
|
|
4446
|
+
}], ctorParameters: function () { return [{ type: EaCService }, { type: i1$4.MatDialog }]; }, propDecorators: { FeedItem: [{
|
|
4447
|
+
type: Input,
|
|
4448
|
+
args: ['feed-item']
|
|
4449
|
+
}] } });
|
|
4450
|
+
|
|
4451
|
+
class TwoColumnHeaderComponent {
|
|
4452
|
+
constructor() { }
|
|
4453
|
+
ngOnInit() {
|
|
4454
|
+
}
|
|
4455
|
+
}
|
|
4456
|
+
TwoColumnHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: TwoColumnHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4457
|
+
TwoColumnHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: TwoColumnHeaderComponent, selector: "lcu-two-column-header", ngImport: i0, template: "<div class=\"col-container\" fxLayout=\"row\">\n\n <div class=\"col-left\" fxFlex=\"15%\" >\n <ng-content select=\"[left]\"></ng-content>\n </div>\n\n <div class=\"col-center\" fxFlex=\"85%\">\n <ng-content></ng-content>\n </div>\n\n</div>\n", styles: [".col-container{background-color:#ebecf0}.col-left{min-width:210px}\n"], directives: [{ type: i5$1.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i5$1.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }] });
|
|
4458
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: TwoColumnHeaderComponent, decorators: [{
|
|
4459
|
+
type: Component,
|
|
4460
|
+
args: [{ selector: 'lcu-two-column-header', template: "<div class=\"col-container\" fxLayout=\"row\">\n\n <div class=\"col-left\" fxFlex=\"15%\" >\n <ng-content select=\"[left]\"></ng-content>\n </div>\n\n <div class=\"col-center\" fxFlex=\"85%\">\n <ng-content></ng-content>\n </div>\n\n</div>\n", styles: [".col-container{background-color:#ebecf0}.col-left{min-width:210px}\n"] }]
|
|
4461
|
+
}], ctorParameters: function () { return []; } });
|
|
4462
|
+
|
|
4463
|
+
class CardCarouselComponent {
|
|
4464
|
+
constructor() {
|
|
4465
|
+
this.carouselIndex = 0;
|
|
4466
|
+
}
|
|
4467
|
+
ngOnInit() {
|
|
4468
|
+
}
|
|
4469
|
+
ngAfterViewInit() {
|
|
4470
|
+
this.assignCarouselClass();
|
|
4471
|
+
}
|
|
4472
|
+
LeftChevronClicked() {
|
|
4473
|
+
this.removeCarouselClasses();
|
|
4474
|
+
if (this.carouselIndex === 0) {
|
|
4475
|
+
this.carouselIndex = this.Stats.length - 1;
|
|
4476
|
+
}
|
|
4477
|
+
else {
|
|
4478
|
+
this.carouselIndex--;
|
|
4479
|
+
}
|
|
4480
|
+
this.assignCarouselClass();
|
|
4481
|
+
}
|
|
4482
|
+
MoreDetailsClicked() {
|
|
4483
|
+
console.log("More details clicked on carousel item", this.Stats[this.carouselIndex]);
|
|
4484
|
+
}
|
|
4485
|
+
RightChevronClicked() {
|
|
4486
|
+
this.removeCarouselClasses();
|
|
4487
|
+
if (this.carouselIndex === this.Stats.length - 1) {
|
|
4488
|
+
this.carouselIndex = 0;
|
|
4489
|
+
}
|
|
4490
|
+
else {
|
|
4491
|
+
this.carouselIndex++;
|
|
4492
|
+
}
|
|
4493
|
+
this.assignCarouselClass();
|
|
4494
|
+
}
|
|
4495
|
+
//HELPERS
|
|
4496
|
+
removeCarouselClasses() {
|
|
4497
|
+
for (let i = 0; i < this.Stats.length; i++) {
|
|
4498
|
+
if (i === this.carouselIndex) {
|
|
4499
|
+
document.getElementById("carousel-" + this.carouselIndex).classList.remove('active');
|
|
4500
|
+
}
|
|
4501
|
+
else {
|
|
4502
|
+
document.getElementById("carousel-" + i).classList.remove('hidden');
|
|
4503
|
+
}
|
|
4504
|
+
}
|
|
4505
|
+
}
|
|
4506
|
+
assignCarouselClass() {
|
|
4507
|
+
for (let i = 0; i < this.Stats.length; i++) {
|
|
4508
|
+
if (i === this.carouselIndex) {
|
|
4509
|
+
document.getElementById("carousel-" + this.carouselIndex).classList.add('active');
|
|
4510
|
+
}
|
|
4511
|
+
else {
|
|
4512
|
+
document.getElementById("carousel-" + i).classList.add('hidden');
|
|
4513
|
+
}
|
|
4514
|
+
}
|
|
4515
|
+
}
|
|
4516
|
+
}
|
|
4517
|
+
CardCarouselComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: CardCarouselComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4518
|
+
CardCarouselComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: CardCarouselComponent, selector: "lcu-card-carousel", inputs: { Stats: ["stats", "Stats"] }, ngImport: i0, template: "<div stats class=\"carousel-container\">\n <div class=\"chevron-container\" fxLayout=\"row\">\n <button mat-icon-button class=\"chevron-button\" id=\"left-chevron\" (click)=\"LeftChevronClicked()\">\n <mat-icon>chevron_left</mat-icon>\n </button>\n <button mat-icon-button class=\"chevron-button\" id=\"right-chevron\" (click)=\"RightChevronClicked()\">\n <mat-icon>chevron_right</mat-icon>\n </button>\n </div>\n <ng-container *ngFor=\"let stat of Stats; let i = index\">\n <div class=\"carousel-item\" [id]=\"'carousel-'+i\">\n <div class=\"carousel-title\">{{stat.Name}}</div>\n <div class=\"carousel-stat\">{{stat.Stat}}</div>\n </div>\n </ng-container>\n <div (click)=\"MoreDetailsClicked()\">More details</div>\n</div>\n", styles: [".carousel-container{text-align:center;height:75px;padding-top:20px}.carousel-item.hidden{display:none}.carousel-item.active{visibility:visible}.chevron-button{position:absolute}#right-chevron{right:5px}#left-chevron{left:5px}\n"], components: [{ type: i2$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i5$1.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i4$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
4519
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: CardCarouselComponent, decorators: [{
|
|
4520
|
+
type: Component,
|
|
4521
|
+
args: [{ selector: 'lcu-card-carousel', template: "<div stats class=\"carousel-container\">\n <div class=\"chevron-container\" fxLayout=\"row\">\n <button mat-icon-button class=\"chevron-button\" id=\"left-chevron\" (click)=\"LeftChevronClicked()\">\n <mat-icon>chevron_left</mat-icon>\n </button>\n <button mat-icon-button class=\"chevron-button\" id=\"right-chevron\" (click)=\"RightChevronClicked()\">\n <mat-icon>chevron_right</mat-icon>\n </button>\n </div>\n <ng-container *ngFor=\"let stat of Stats; let i = index\">\n <div class=\"carousel-item\" [id]=\"'carousel-'+i\">\n <div class=\"carousel-title\">{{stat.Name}}</div>\n <div class=\"carousel-stat\">{{stat.Stat}}</div>\n </div>\n </ng-container>\n <div (click)=\"MoreDetailsClicked()\">More details</div>\n</div>\n", styles: [".carousel-container{text-align:center;height:75px;padding-top:20px}.carousel-item.hidden{display:none}.carousel-item.active{visibility:visible}.chevron-button{position:absolute}#right-chevron{right:5px}#left-chevron{left:5px}\n"] }]
|
|
4522
|
+
}], ctorParameters: function () { return []; }, propDecorators: { Stats: [{
|
|
4523
|
+
type: Input,
|
|
4524
|
+
args: ['stats']
|
|
4525
|
+
}] } });
|
|
4526
|
+
|
|
4527
|
+
class SecurityToggleComponent {
|
|
4528
|
+
constructor(eacSvc, formBldr) {
|
|
4529
|
+
this.eacSvc = eacSvc;
|
|
4530
|
+
this.formBldr = formBldr;
|
|
4531
|
+
this.SaveFormEvent = new EventEmitter;
|
|
4532
|
+
this.SkeletonEffect = 'wave';
|
|
4533
|
+
}
|
|
4534
|
+
get IsPrivateFormControl() {
|
|
4535
|
+
var _a;
|
|
4536
|
+
return (_a = this.SecurityFormGroup) === null || _a === void 0 ? void 0 : _a.controls.isPrivate;
|
|
4537
|
+
}
|
|
4538
|
+
get IsTriggerSignInFormControl() {
|
|
4539
|
+
var _a;
|
|
4540
|
+
return (_a = this.SecurityFormGroup) === null || _a === void 0 ? void 0 : _a.controls.isTriggerSignIn;
|
|
4541
|
+
}
|
|
4542
|
+
get State() {
|
|
4543
|
+
return this.eacSvc.State;
|
|
4544
|
+
}
|
|
4545
|
+
ngOnInit() {
|
|
4546
|
+
this.setupSecurityFormGroup();
|
|
4092
4547
|
}
|
|
4093
4548
|
SecuritySubmit() {
|
|
4094
4549
|
//save the security settings
|
|
@@ -4628,239 +5083,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImpor
|
|
|
4628
5083
|
class BuildPipelineFormComponent {
|
|
4629
5084
|
constructor(eacSvc, formBuilder, appsFlowSvc) {
|
|
4630
5085
|
this.eacSvc = eacSvc;
|
|
4631
|
-
this.formBuilder = formBuilder;
|
|
4632
|
-
this.appsFlowSvc = appsFlowSvc;
|
|
4633
|
-
this.HostingDetails = new ProjectHostingDetails();
|
|
4634
|
-
this.ResponseEvent = new EventEmitter;
|
|
4635
|
-
}
|
|
4636
|
-
get Artifact() {
|
|
4637
|
-
var _a, _b;
|
|
4638
|
-
// console.log("ARTIFACT: ", this.Environment?.Artifacts[this.ArtifactLookup]);
|
|
4639
|
-
return ((_a = this.Environment) === null || _a === void 0 ? void 0 : _a.Artifacts) && this.ArtifactLookup
|
|
4640
|
-
? ((_b = this.Environment) === null || _b === void 0 ? void 0 : _b.Artifacts[this.ArtifactLookup]) || {}
|
|
4641
|
-
: {};
|
|
4642
|
-
}
|
|
4643
|
-
get ArtifactLookup() {
|
|
4644
|
-
var _a, _b;
|
|
4645
|
-
const artLookup = ((_a = this.DevOpsAction) === null || _a === void 0 ? void 0 : _a.ArtifactLookups)
|
|
4646
|
-
? (_b = this.DevOpsAction) === null || _b === void 0 ? void 0 : _b.ArtifactLookups[0]
|
|
4647
|
-
: null;
|
|
4648
|
-
return artLookup;
|
|
4649
|
-
}
|
|
4650
|
-
get BuildPipelineFormControl() {
|
|
4651
|
-
var _a;
|
|
4652
|
-
return (_a = this.BuildPipelineFormGroup) === null || _a === void 0 ? void 0 : _a.get('buildPipeline');
|
|
4653
|
-
}
|
|
4654
|
-
get DevOpsAction() {
|
|
4655
|
-
return this.Environment.DevOpsActions && this.DevOpsActionLookup
|
|
4656
|
-
? this.Environment.DevOpsActions[this.DevOpsActionLookup] || {}
|
|
4657
|
-
: {};
|
|
4658
|
-
}
|
|
4659
|
-
get DevOpsActions() {
|
|
4660
|
-
return this.Environment.DevOpsActions || {};
|
|
4661
|
-
}
|
|
4662
|
-
get DevOpsActionNameFormControl() {
|
|
4663
|
-
return this.BuildPipelineFormGroup.get('devOpsActionName');
|
|
4664
|
-
}
|
|
4665
|
-
get NPMTokenFormControl() {
|
|
4666
|
-
return this.BuildPipelineFormGroup.get('npmToken');
|
|
4667
|
-
}
|
|
4668
|
-
// (ho) => ho.Lookup === this.BuildPipeline
|
|
4669
|
-
get SelectedHostingOption() {
|
|
4670
|
-
var _a, _b;
|
|
4671
|
-
return (_b = (_a = this.HostingDetails) === null || _a === void 0 ? void 0 : _a.HostingOptions) === null || _b === void 0 ? void 0 : _b.find((ho) => ho.Lookup === this.BuildPipeline);
|
|
4672
|
-
}
|
|
4673
|
-
get SelectedHostingOptionInputControlValues() {
|
|
4674
|
-
var _a, _b;
|
|
4675
|
-
return (_b = (_a = this.SelectedHostingOption) === null || _a === void 0 ? void 0 : _a.Inputs) === null || _b === void 0 ? void 0 : _b.reduce((prev, cur) => {
|
|
4676
|
-
const res = Object.assign({}, prev);
|
|
4677
|
-
res[cur.Lookup] = this.BuildPipelineFormGroup.controls[cur.Lookup].value;
|
|
4678
|
-
return res;
|
|
4679
|
-
}, {});
|
|
4680
|
-
}
|
|
4681
|
-
get SourceControlLookups() {
|
|
4682
|
-
return Object.keys(this.SourceControls || {});
|
|
4683
|
-
}
|
|
4684
|
-
get SourceControls() {
|
|
4685
|
-
return this.Environment.Sources || {};
|
|
4686
|
-
}
|
|
4687
|
-
get State() {
|
|
4688
|
-
return this.eacSvc.State;
|
|
4689
|
-
}
|
|
4690
|
-
ngOnInit() {
|
|
4691
|
-
// console.log('BuildPipeline = ', this.BuildPipeline)
|
|
4692
|
-
// this.BuildPipelineFormGroup = this.formBuilder.group({});
|
|
4693
|
-
// if (this.BuildPipelineFormGroup != null) {
|
|
4694
|
-
// this.BuildPipelineFormGroup.removeControl('hostingDetails');
|
|
4695
|
-
// }
|
|
4696
|
-
// this.BuildPipelineFormGroup.addControl(
|
|
4697
|
-
// 'hostingDetails',
|
|
4698
|
-
this.BuildPipelineFormGroup = this.formBuilder.group({
|
|
4699
|
-
buildPipeline: [this.BuildPipeline, [Validators.required]],
|
|
4700
|
-
});
|
|
4701
|
-
// );
|
|
4702
|
-
this.loadProjectHostingDetails();
|
|
4703
|
-
// this.setupControlsForForm();
|
|
4704
|
-
}
|
|
4705
|
-
//API METHODS
|
|
4706
|
-
BuildPipelineChanged() {
|
|
4707
|
-
var _a;
|
|
4708
|
-
//for some reason this value is coming back undefined
|
|
4709
|
-
// console.log("build pipeline value: ", this.BuildPipelineFormControl?.value)
|
|
4710
|
-
this.BuildPipeline = (_a = this.BuildPipelineFormControl) === null || _a === void 0 ? void 0 : _a.value;
|
|
4711
|
-
this.setupControlsForForm();
|
|
4712
|
-
}
|
|
4713
|
-
SubmitBuildPipeline() {
|
|
4714
|
-
// console.log("submitting build pipeline: ", this.BuildPipelineFormGroup.value);
|
|
4715
|
-
this.SaveEnvironment();
|
|
4716
|
-
}
|
|
4717
|
-
SaveEnvironment() {
|
|
4718
|
-
var _a;
|
|
4719
|
-
const saveEnvReq = {
|
|
4720
|
-
Environment: Object.assign(Object.assign({}, this.Environment), { Artifacts: this.Environment.Artifacts || {}, DevOpsActions: this.Environment.DevOpsActions || {}, Secrets: this.Environment.Secrets || {}, Sources: this.Environment.Sources || {} }),
|
|
4721
|
-
EnvironmentLookup: this.EnvironmentLookup,
|
|
4722
|
-
EnterpriseDataTokens: {},
|
|
4723
|
-
};
|
|
4724
|
-
let artifactLookup;
|
|
4725
|
-
let artifact = Object.assign(Object.assign({}, this.Artifact), this.SelectedHostingOptionInputControlValues);
|
|
4726
|
-
if (!this.ArtifactLookup) {
|
|
4727
|
-
artifactLookup = Guid.CreateRaw();
|
|
4728
|
-
artifact = Object.assign(Object.assign({}, artifact), { Type: this.SelectedHostingOption.ArtifactType, Name: this.SelectedHostingOption.Name, NPMRegistry: 'https://registry.npmjs.org/' });
|
|
4729
|
-
}
|
|
4730
|
-
else {
|
|
4731
|
-
artifactLookup = this.ArtifactLookup;
|
|
4732
|
-
}
|
|
4733
|
-
saveEnvReq.Environment.Artifacts[artifactLookup] = artifact;
|
|
4734
|
-
let devOpsActionLookup;
|
|
4735
|
-
if (!this.DevOpsActionLookup) {
|
|
4736
|
-
devOpsActionLookup = Guid.CreateRaw();
|
|
4737
|
-
const doa = Object.assign(Object.assign({}, this.DevOpsAction), { ArtifactLookups: [artifactLookup], Name: this.DevOpsActionNameFormControl.value, Path: this.SelectedHostingOption.Path, Templates: this.SelectedHostingOption.Templates });
|
|
4738
|
-
if ((_a = this.NPMTokenFormControl) === null || _a === void 0 ? void 0 : _a.value) {
|
|
4739
|
-
const secretLookup = 'npm-access-token';
|
|
4740
|
-
doa.SecretLookups = [secretLookup];
|
|
4741
|
-
saveEnvReq.Environment.Secrets[secretLookup] = {
|
|
4742
|
-
Name: 'NPM Access Token',
|
|
4743
|
-
DataTokenLookup: secretLookup,
|
|
4744
|
-
KnownAs: 'NPM_TOKEN',
|
|
4745
|
-
};
|
|
4746
|
-
saveEnvReq.EnterpriseDataTokens[secretLookup] = {
|
|
4747
|
-
Name: saveEnvReq.Environment.Secrets[secretLookup].Name,
|
|
4748
|
-
Description: saveEnvReq.Environment.Secrets[secretLookup].Name,
|
|
4749
|
-
Value: this.NPMTokenFormControl.value,
|
|
4750
|
-
};
|
|
4751
|
-
}
|
|
4752
|
-
saveEnvReq.Environment.DevOpsActions[devOpsActionLookup] = doa;
|
|
4753
|
-
}
|
|
4754
|
-
else {
|
|
4755
|
-
devOpsActionLookup = this.DevOpsActionLookup;
|
|
4756
|
-
const doa = Object.assign(Object.assign({}, this.DevOpsAction), { Name: this.DevOpsActionNameFormControl.value });
|
|
4757
|
-
saveEnvReq.Environment.DevOpsActions[devOpsActionLookup] = doa;
|
|
4758
|
-
}
|
|
4759
|
-
this.eacSvc.SaveEnvironmentAsCode(saveEnvReq).then(res => {
|
|
4760
|
-
this.ResponseEvent.emit(res);
|
|
4761
|
-
});
|
|
4762
|
-
}
|
|
4763
|
-
// Helpers
|
|
4764
|
-
setupControlsForForm() {
|
|
4765
|
-
var _a, _b, _c, _d, _e, _f;
|
|
4766
|
-
// this.BuildPipeline =
|
|
4767
|
-
// this.BuildPipeline || this.HostingDetails?.HostingOptions
|
|
4768
|
-
// ? this.HostingDetails?.HostingOptions[0]?.Lookup
|
|
4769
|
-
// : '';
|
|
4770
|
-
// console.log("hosting details: ", this.HostingDetails)
|
|
4771
|
-
for (const ctrlName in this.BuildPipelineFormGroup.controls) {
|
|
4772
|
-
//devOpsAction doesn't exist
|
|
4773
|
-
//removes hosting details
|
|
4774
|
-
if (ctrlName !== 'buildPipeline' && ctrlName !== 'devOpsAction') {
|
|
4775
|
-
// console.log("removing control: ", ctrlName)
|
|
4776
|
-
this.BuildPipelineFormGroup.removeControl(ctrlName);
|
|
4777
|
-
}
|
|
4778
|
-
}
|
|
4779
|
-
this.BuildPipelineFormGroup.addControl('devOpsActionName', this.formBuilder.control(((_a = this.DevOpsAction) === null || _a === void 0 ? void 0 : _a.Name) || ((_b = this.SelectedHostingOption) === null || _b === void 0 ? void 0 : _b.Name) || '', [Validators.required]));
|
|
4780
|
-
// console.log("selected hosting options: ", this.SelectedHostingOption.Inputs);
|
|
4781
|
-
(_d = (_c = this.SelectedHostingOption) === null || _c === void 0 ? void 0 : _c.Inputs) === null || _d === void 0 ? void 0 : _d.forEach((input) => {
|
|
4782
|
-
const validators = input.Required ? [Validators.required] : [];
|
|
4783
|
-
this.BuildPipelineFormGroup.addControl(input.Lookup, this.formBuilder.control(this.Artifact[input.Lookup] || input.DefaultValue || '', validators));
|
|
4784
|
-
// if (this.Disabled) {
|
|
4785
|
-
// this.FormGroup.controls[input.Lookup].disable();
|
|
4786
|
-
// }
|
|
4787
|
-
});
|
|
4788
|
-
if (((_e = this.BuildPipelineFormControl) === null || _e === void 0 ? void 0 : _e.value) === 'npm-release') {
|
|
4789
|
-
if (!this.BuildPipelineFormGroup.controls.npmToken) {
|
|
4790
|
-
this.BuildPipelineFormGroup.addControl('npmToken', this.formBuilder.control('', this.Disabled ? [] : [Validators.required]));
|
|
4791
|
-
if (this.Disabled) {
|
|
4792
|
-
this.BuildPipelineFormGroup.controls.npmToken.disable();
|
|
4793
|
-
}
|
|
4794
|
-
}
|
|
4795
|
-
}
|
|
4796
|
-
else if (((_f = this.BuildPipelineFormControl) === null || _f === void 0 ? void 0 : _f.value) === 'github-artifacts-release') {
|
|
4797
|
-
if (this.BuildPipelineFormGroup.controls.npmToken) {
|
|
4798
|
-
this.BuildPipelineFormGroup.removeControl('npmToken');
|
|
4799
|
-
}
|
|
4800
|
-
}
|
|
4801
|
-
}
|
|
4802
|
-
loadProjectHostingDetails() {
|
|
4803
|
-
this.HostingDetails.Loading = true;
|
|
4804
|
-
this.appsFlowSvc.NewLoadProjectHostingDetails().subscribe((response) => {
|
|
4805
|
-
var _a, _b;
|
|
4806
|
-
this.HostingDetails = response.Model;
|
|
4807
|
-
// console.log("response: ", response);
|
|
4808
|
-
this.HostingDetails.Loading = false;
|
|
4809
|
-
const hostOption = (_b = (_a = this.HostingDetails) === null || _a === void 0 ? void 0 : _a.HostingOptions) === null || _b === void 0 ? void 0 : _b.find((ho) => ho.Path === this.DevOpsAction.Path);
|
|
4810
|
-
this.BuildPipeline = hostOption.Lookup;
|
|
4811
|
-
// console.log("Build Pipeline HERE= ", this.BuildPipeline);
|
|
4812
|
-
this.setupControlsForForm();
|
|
4813
|
-
}, (err) => {
|
|
4814
|
-
console.log('ERR: ', err);
|
|
4815
|
-
this.HostingDetails.Loading = false;
|
|
4816
|
-
});
|
|
4817
|
-
console.log('HOSTING DETAILS: ', this.HostingDetails);
|
|
4818
|
-
}
|
|
4819
|
-
}
|
|
4820
|
-
BuildPipelineFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: BuildPipelineFormComponent, deps: [{ token: EaCService }, { token: i1$1.FormBuilder }, { token: ApplicationsFlowService }], target: i0.ɵɵFactoryTarget.Component });
|
|
4821
|
-
BuildPipelineFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: BuildPipelineFormComponent, selector: "lcu-build-pipeline-form", inputs: { DevOpsActionLookup: ["devops-action-lookup", "DevOpsActionLookup"], Disabled: ["disabled", "Disabled"], Environment: ["environment", "Environment"], EnvironmentLookup: ["environment-lookup", "EnvironmentLookup"], HostingDetails: ["hosting-details", "HostingDetails"] }, outputs: { ResponseEvent: "response-event" }, ngImport: i0, template: "<form class=\"form-card\" [formGroup]=\"BuildPipelineFormGroup\" (ngSubmit)=\"SubmitBuildPipeline()\">\n <mat-card\n class=\"spread\" \n >\n <mat-card-header>\n <mat-card-title> Build Pipeline </mat-card-title>\n\n <mat-hint>\n Changes made here are reflected for all sources using this\n DevOpsAction\n </mat-hint>\n </mat-card-header>\n\n <mat-card-content>\n\n\n <div *ngIf=\"!HostingDetails?.Loading\">\n <mat-form-field class=\"mat-full-width\">\n <mat-select\n formControlName=\"buildPipeline\"\n placeholder=\"Build Pipeline\"\n [disabled]=\"Disabled\"\n (selectionChange)=\"BuildPipelineChanged()\"\n required\n >\n <ng-container\n *ngFor=\"let hostOption of HostingDetails?.HostingOptions; let i = index\"\n >\n <mat-option [value]=\"hostOption.Lookup\">\n {{ hostOption.Name }}\n </mat-option>\n </ng-container>\n </mat-select>\n \n <mat-hint>\n <ng-container *ngFor=\"let hostOption of HostingDetails?.HostingOptions\">\n <span *ngIf=\"BuildPipeline == hostOption?.Lookup\">\n {{ hostOption.Description }}\n </span>\n </ng-container>\n </mat-hint>\n </mat-form-field>\n \n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n formControlName=\"devOpsActionName\"\n placeholder=\"Name of DevOps Action\"\n required=\"true\"\n />\n </mat-form-field>\n \n <ng-container *ngFor=\"let input of SelectedHostingOption?.Inputs\">\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n [formControlName]=\"input.Lookup\"\n [placeholder]=\"input.Placeholder\"\n [required]=\"input.Required\"\n />\n \n <mat-hint>{{ input.Hint }}</mat-hint>\n </mat-form-field>\n </ng-container>\n \n <div *ngIf=\"BuildPipeline == 'npm-release'\">\n <mat-form-field class=\"mat-full-width with-hint padding-bottom-4\">\n <mat-icon matPrefix>security</mat-icon>\n \n <input\n id=\"npm-token\"\n matInput\n type=\"text\"\n formControlName=\"npmToken\"\n placeholder=\"NPM token\"\n [required]=\"!Disabled\"\n style=\"-webkit-text-security: disc;\"\n />\n <mat-hint>\n Securely publish to NPM, provide an NPM Personal Access Token (PAT) with publish access to the organization used for your NPM packages. \n Learn how to create and view access tokens \n <a\n href=\"https://docs.npmjs.com/creating-and-viewing-access-tokens\"\n target=\"_blank\"\n >\n here.\n </a>\n </mat-hint>\n </mat-form-field>\n </div>\n </div>\n \n <div *ngIf=\"HostingDetails?.Loading\">\n <div class=\"spread\">\n <lcu-loader style=\"margin: auto\" [loading]=\"true\"></lcu-loader>\n \n <div class=\"margin-3\">\n <h4 class=\"mat-title\">Loading hosting details</h4>\n </div>\n </div>\n </div>\n </mat-card-content>\n <mat-card-actions fxLayoutAlign=\"center center\">\n\n <button \n *ngIf=\"!State?.Loading\"\n mat-raised-button \n type=\"submit\" \n fxFlex=\"100%\" \n color=\"primary\" \n [disabled]=\"!BuildPipelineFormGroup.valid || !BuildPipelineFormGroup.dirty\">\n <mat-icon>save</mat-icon>\n Save Build Pipeline\n </button>\n <lcu-loader [loading]=\"State?.Loading\"></lcu-loader> \n \n </mat-card-actions>\n </mat-card>\n</form>\n", styles: [""], components: [{ type: i4.MatCard, selector: "mat-card", exportAs: ["matCard"] }, { type: i4.MatCardHeader, selector: "mat-card-header" }, { type: i4$2.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { type: i7.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i8.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i3.LoaderComponent, selector: "lcu-loader", inputs: ["diameter", "hide-inner", "loading"] }, { type: i2$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i4.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { type: i4$2.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { type: i4.MatCardContent, selector: "mat-card-content, [mat-card-content], [matCardContent]" }, { type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { type: i1$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i4$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i11.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i4$2.MatPrefix, selector: "[matPrefix]" }, { type: i4.MatCardActions, selector: "mat-card-actions", inputs: ["align"], exportAs: ["matCardActions"] }, { type: i5$1.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { type: i5$1.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }] });
|
|
4822
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: BuildPipelineFormComponent, decorators: [{
|
|
4823
|
-
type: Component,
|
|
4824
|
-
args: [{ selector: 'lcu-build-pipeline-form', template: "<form class=\"form-card\" [formGroup]=\"BuildPipelineFormGroup\" (ngSubmit)=\"SubmitBuildPipeline()\">\n <mat-card\n class=\"spread\" \n >\n <mat-card-header>\n <mat-card-title> Build Pipeline </mat-card-title>\n\n <mat-hint>\n Changes made here are reflected for all sources using this\n DevOpsAction\n </mat-hint>\n </mat-card-header>\n\n <mat-card-content>\n\n\n <div *ngIf=\"!HostingDetails?.Loading\">\n <mat-form-field class=\"mat-full-width\">\n <mat-select\n formControlName=\"buildPipeline\"\n placeholder=\"Build Pipeline\"\n [disabled]=\"Disabled\"\n (selectionChange)=\"BuildPipelineChanged()\"\n required\n >\n <ng-container\n *ngFor=\"let hostOption of HostingDetails?.HostingOptions; let i = index\"\n >\n <mat-option [value]=\"hostOption.Lookup\">\n {{ hostOption.Name }}\n </mat-option>\n </ng-container>\n </mat-select>\n \n <mat-hint>\n <ng-container *ngFor=\"let hostOption of HostingDetails?.HostingOptions\">\n <span *ngIf=\"BuildPipeline == hostOption?.Lookup\">\n {{ hostOption.Description }}\n </span>\n </ng-container>\n </mat-hint>\n </mat-form-field>\n \n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n formControlName=\"devOpsActionName\"\n placeholder=\"Name of DevOps Action\"\n required=\"true\"\n />\n </mat-form-field>\n \n <ng-container *ngFor=\"let input of SelectedHostingOption?.Inputs\">\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n [formControlName]=\"input.Lookup\"\n [placeholder]=\"input.Placeholder\"\n [required]=\"input.Required\"\n />\n \n <mat-hint>{{ input.Hint }}</mat-hint>\n </mat-form-field>\n </ng-container>\n \n <div *ngIf=\"BuildPipeline == 'npm-release'\">\n <mat-form-field class=\"mat-full-width with-hint padding-bottom-4\">\n <mat-icon matPrefix>security</mat-icon>\n \n <input\n id=\"npm-token\"\n matInput\n type=\"text\"\n formControlName=\"npmToken\"\n placeholder=\"NPM token\"\n [required]=\"!Disabled\"\n style=\"-webkit-text-security: disc;\"\n />\n <mat-hint>\n Securely publish to NPM, provide an NPM Personal Access Token (PAT) with publish access to the organization used for your NPM packages. \n Learn how to create and view access tokens \n <a\n href=\"https://docs.npmjs.com/creating-and-viewing-access-tokens\"\n target=\"_blank\"\n >\n here.\n </a>\n </mat-hint>\n </mat-form-field>\n </div>\n </div>\n \n <div *ngIf=\"HostingDetails?.Loading\">\n <div class=\"spread\">\n <lcu-loader style=\"margin: auto\" [loading]=\"true\"></lcu-loader>\n \n <div class=\"margin-3\">\n <h4 class=\"mat-title\">Loading hosting details</h4>\n </div>\n </div>\n </div>\n </mat-card-content>\n <mat-card-actions fxLayoutAlign=\"center center\">\n\n <button \n *ngIf=\"!State?.Loading\"\n mat-raised-button \n type=\"submit\" \n fxFlex=\"100%\" \n color=\"primary\" \n [disabled]=\"!BuildPipelineFormGroup.valid || !BuildPipelineFormGroup.dirty\">\n <mat-icon>save</mat-icon>\n Save Build Pipeline\n </button>\n <lcu-loader [loading]=\"State?.Loading\"></lcu-loader> \n \n </mat-card-actions>\n </mat-card>\n</form>\n", styles: [""] }]
|
|
4825
|
-
}], ctorParameters: function () { return [{ type: EaCService }, { type: i1$1.FormBuilder }, { type: ApplicationsFlowService }]; }, propDecorators: { DevOpsActionLookup: [{
|
|
4826
|
-
type: Input,
|
|
4827
|
-
args: ['devops-action-lookup']
|
|
4828
|
-
}], Disabled: [{
|
|
4829
|
-
type: Input,
|
|
4830
|
-
args: ['disabled']
|
|
4831
|
-
}], Environment: [{
|
|
4832
|
-
type: Input,
|
|
4833
|
-
args: ['environment']
|
|
4834
|
-
}], EnvironmentLookup: [{
|
|
4835
|
-
type: Input,
|
|
4836
|
-
args: ['environment-lookup']
|
|
4837
|
-
}], HostingDetails: [{
|
|
4838
|
-
type: Input,
|
|
4839
|
-
args: ['hosting-details']
|
|
4840
|
-
}], ResponseEvent: [{
|
|
4841
|
-
type: Output,
|
|
4842
|
-
args: ['response-event']
|
|
4843
|
-
}] } });
|
|
4844
|
-
|
|
4845
|
-
class DevopsSourceControlFormComponent {
|
|
4846
|
-
// Constructors
|
|
4847
|
-
constructor(appsFlowSvc, eacSvc, formBuilder) {
|
|
4848
|
-
this.appsFlowSvc = appsFlowSvc;
|
|
4849
|
-
this.eacSvc = eacSvc;
|
|
4850
|
-
this.formBuilder = formBuilder;
|
|
4851
|
-
this.SeparatorKeysCodes = [ENTER, COMMA];
|
|
4852
|
-
this.SaveStatusEvent = new EventEmitter;
|
|
4853
|
-
this.BuildPath = null;
|
|
4854
|
-
this.HostingDetails = new ProjectHostingDetails();
|
|
4855
|
-
this.SelectedBranches = [];
|
|
4856
|
-
this.SourceControlRoot = '';
|
|
4857
|
-
this.UseBranches = true;
|
|
4858
|
-
this.UseBuildPath = false;
|
|
5086
|
+
this.formBuilder = formBuilder;
|
|
5087
|
+
this.appsFlowSvc = appsFlowSvc;
|
|
5088
|
+
this.HostingDetails = new ProjectHostingDetails();
|
|
5089
|
+
this.ResponseEvent = new EventEmitter;
|
|
4859
5090
|
}
|
|
4860
|
-
|
|
4861
|
-
|
|
4862
|
-
|
|
4863
|
-
return (_a = this.
|
|
5091
|
+
get Artifact() {
|
|
5092
|
+
var _a, _b;
|
|
5093
|
+
// console.log("ARTIFACT: ", this.Environment?.Artifacts[this.ArtifactLookup]);
|
|
5094
|
+
return ((_a = this.Environment) === null || _a === void 0 ? void 0 : _a.Artifacts) && this.ArtifactLookup
|
|
5095
|
+
? ((_b = this.Environment) === null || _b === void 0 ? void 0 : _b.Artifacts[this.ArtifactLookup]) || {}
|
|
5096
|
+
: {};
|
|
4864
5097
|
}
|
|
4865
5098
|
get ArtifactLookup() {
|
|
4866
5099
|
var _a, _b;
|
|
@@ -4869,401 +5102,201 @@ class DevopsSourceControlFormComponent {
|
|
|
4869
5102
|
: null;
|
|
4870
5103
|
return artLookup;
|
|
4871
5104
|
}
|
|
4872
|
-
get
|
|
4873
|
-
var _a
|
|
4874
|
-
return (
|
|
4875
|
-
? ((_b = this.Environment) === null || _b === void 0 ? void 0 : _b.Artifacts[this.ArtifactLookup]) || {}
|
|
4876
|
-
: {};
|
|
4877
|
-
}
|
|
4878
|
-
get BranchesFormControl() {
|
|
4879
|
-
return this.DevOpsSourceControlFormGroup.get(this.SourceControlRoot + 'branches');
|
|
4880
|
-
}
|
|
4881
|
-
get BuildPathFormControl() {
|
|
4882
|
-
return this.DevOpsSourceControlFormGroup.get(this.SourceControlRoot + 'buildPath');
|
|
4883
|
-
}
|
|
4884
|
-
get DevOpsActionLookups() {
|
|
4885
|
-
// console.log(this.DevOpsActions);
|
|
4886
|
-
return Object.keys(this.DevOpsActions || {});
|
|
5105
|
+
get BuildPipelineFormControl() {
|
|
5106
|
+
var _a;
|
|
5107
|
+
return (_a = this.BuildPipelineFormGroup) === null || _a === void 0 ? void 0 : _a.get('buildPipeline');
|
|
4887
5108
|
}
|
|
4888
5109
|
get DevOpsAction() {
|
|
4889
5110
|
return this.Environment.DevOpsActions && this.DevOpsActionLookup
|
|
4890
5111
|
? this.Environment.DevOpsActions[this.DevOpsActionLookup] || {}
|
|
4891
5112
|
: {};
|
|
4892
5113
|
}
|
|
4893
|
-
get DevOpsActionLookup() {
|
|
4894
|
-
var _a, _b, _c;
|
|
4895
|
-
if (!!((_a = this.DevOpsActionLookupFormControl) === null || _a === void 0 ? void 0 : _a.value)) {
|
|
4896
|
-
return this.DevOpsActionLookupFormControl.value;
|
|
4897
|
-
}
|
|
4898
|
-
if (!!((_b = this.EditingSourceControl) === null || _b === void 0 ? void 0 : _b.DevOpsActionTriggerLookups)) {
|
|
4899
|
-
return (_c = this.EditingSourceControl) === null || _c === void 0 ? void 0 : _c.DevOpsActionTriggerLookups[0];
|
|
4900
|
-
}
|
|
4901
|
-
else {
|
|
4902
|
-
return null;
|
|
4903
|
-
}
|
|
4904
|
-
}
|
|
4905
|
-
get DevOpsActionLookupFormControl() {
|
|
4906
|
-
return this.DevOpsSourceControlFormGroup.get('devOpsActionLookup');
|
|
4907
|
-
}
|
|
4908
5114
|
get DevOpsActions() {
|
|
4909
5115
|
return this.Environment.DevOpsActions || {};
|
|
4910
5116
|
}
|
|
4911
|
-
get
|
|
5117
|
+
get DevOpsActionNameFormControl() {
|
|
5118
|
+
return this.BuildPipelineFormGroup.get('devOpsActionName');
|
|
5119
|
+
}
|
|
5120
|
+
get NPMTokenFormControl() {
|
|
5121
|
+
return this.BuildPipelineFormGroup.get('npmToken');
|
|
5122
|
+
}
|
|
5123
|
+
// (ho) => ho.Lookup === this.BuildPipeline
|
|
5124
|
+
get SelectedHostingOption() {
|
|
4912
5125
|
var _a, _b;
|
|
4913
|
-
|
|
4914
|
-
? (_b = this.Environment) === null || _b === void 0 ? void 0 : _b.Sources[this.EditingSourceControlLookup]
|
|
4915
|
-
: null;
|
|
4916
|
-
if (sc == null && this.EditingSourceControlLookup) {
|
|
4917
|
-
sc = {};
|
|
4918
|
-
}
|
|
4919
|
-
return sc;
|
|
5126
|
+
return (_b = (_a = this.HostingDetails) === null || _a === void 0 ? void 0 : _a.HostingOptions) === null || _b === void 0 ? void 0 : _b.find((ho) => ho.Lookup === this.BuildPipeline);
|
|
4920
5127
|
}
|
|
4921
|
-
get
|
|
4922
|
-
|
|
5128
|
+
get SelectedHostingOptionInputControlValues() {
|
|
5129
|
+
var _a, _b;
|
|
5130
|
+
return (_b = (_a = this.SelectedHostingOption) === null || _a === void 0 ? void 0 : _a.Inputs) === null || _b === void 0 ? void 0 : _b.reduce((prev, cur) => {
|
|
5131
|
+
const res = Object.assign({}, prev);
|
|
5132
|
+
res[cur.Lookup] = this.BuildPipelineFormGroup.controls[cur.Lookup].value;
|
|
5133
|
+
return res;
|
|
5134
|
+
}, {});
|
|
4923
5135
|
}
|
|
4924
|
-
get
|
|
4925
|
-
return
|
|
5136
|
+
get SourceControlLookups() {
|
|
5137
|
+
return Object.keys(this.SourceControls || {});
|
|
4926
5138
|
}
|
|
4927
|
-
get
|
|
4928
|
-
return this.
|
|
5139
|
+
get SourceControls() {
|
|
5140
|
+
return this.Environment.Sources || {};
|
|
4929
5141
|
}
|
|
4930
5142
|
get State() {
|
|
4931
5143
|
return this.eacSvc.State;
|
|
4932
5144
|
}
|
|
4933
|
-
// Life Cycle
|
|
4934
|
-
ngAfterViewInit() { }
|
|
4935
|
-
ngOnDestroy() {
|
|
4936
|
-
this.destroyFormControls();
|
|
4937
|
-
}
|
|
4938
5145
|
ngOnInit() {
|
|
4939
|
-
|
|
4940
|
-
|
|
4941
|
-
|
|
4942
|
-
|
|
4943
|
-
|
|
4944
|
-
|
|
4945
|
-
|
|
4946
|
-
this.
|
|
4947
|
-
|
|
4948
|
-
// API Methods
|
|
4949
|
-
AddBranchOption(event) {
|
|
4950
|
-
this.addBranchOption(event.value);
|
|
4951
|
-
event.input.value = '';
|
|
4952
|
-
}
|
|
4953
|
-
BranchOptionSelected(event) {
|
|
4954
|
-
this.addBranchOption(event.option.value);
|
|
4955
|
-
}
|
|
4956
|
-
BranchesChanged(branches) {
|
|
4957
|
-
this.loadProjectHostingDetails();
|
|
4958
|
-
}
|
|
4959
|
-
BuildPathChanged(event) {
|
|
4960
|
-
//do something??
|
|
4961
|
-
}
|
|
4962
|
-
CreateNewSourceControl() {
|
|
4963
|
-
this.SetEditingSourceControl(Guid.CreateRaw());
|
|
4964
|
-
}
|
|
4965
|
-
CreateRepository() {
|
|
4966
|
-
this.CreatingRepository = true;
|
|
4967
|
-
this.RepositoryFormControl.reset();
|
|
4968
|
-
}
|
|
4969
|
-
CancelCreateRepository() {
|
|
4970
|
-
this.CreatingRepository = false;
|
|
4971
|
-
}
|
|
4972
|
-
DevOpsActionLookupChanged(event) {
|
|
4973
|
-
this.configureDevOpsAction();
|
|
4974
|
-
}
|
|
4975
|
-
MainBranchChanged(event) {
|
|
4976
|
-
this.emitBranchesChanged();
|
|
4977
|
-
}
|
|
4978
|
-
OrganizationChanged(event) {
|
|
4979
|
-
const org = this.OrganizationFormControl;
|
|
4980
|
-
this.RepositoryFormControl.reset();
|
|
4981
|
-
if (this.UseBranches) {
|
|
4982
|
-
this.BranchesFormControl.reset();
|
|
4983
|
-
this.SelectedBranches = [];
|
|
4984
|
-
}
|
|
4985
|
-
this.listRepositories();
|
|
4986
|
-
}
|
|
4987
|
-
RefreshOrganizations() {
|
|
4988
|
-
var _a, _b, _c;
|
|
4989
|
-
// this.Loading = true;
|
|
4990
|
-
this.listOrganizations();
|
|
4991
|
-
(_a = this.OrganizationFormControl) === null || _a === void 0 ? void 0 : _a.reset();
|
|
4992
|
-
(_b = this.RepositoryFormControl) === null || _b === void 0 ? void 0 : _b.reset();
|
|
4993
|
-
if (this.UseBranches) {
|
|
4994
|
-
(_c = this.BranchesFormControl) === null || _c === void 0 ? void 0 : _c.reset();
|
|
4995
|
-
}
|
|
4996
|
-
}
|
|
4997
|
-
RemoveBranchOption(option) {
|
|
4998
|
-
const index = this.SelectedBranches.indexOf(option);
|
|
4999
|
-
if (index >= 0) {
|
|
5000
|
-
this.SelectedBranches.splice(index, 1);
|
|
5001
|
-
}
|
|
5002
|
-
this.emitBranchesChanged();
|
|
5003
|
-
}
|
|
5004
|
-
RepositoryChanged(event) {
|
|
5005
|
-
const repo = this.RepositoryFormControl;
|
|
5006
|
-
if (this.UseBranches) {
|
|
5007
|
-
this.BranchesFormControl.reset();
|
|
5008
|
-
this.SelectedBranches = [];
|
|
5009
|
-
this.listBranches();
|
|
5010
|
-
}
|
|
5011
|
-
if (!this.UseBranches) {
|
|
5012
|
-
this.listBuildPaths();
|
|
5013
|
-
}
|
|
5014
|
-
}
|
|
5015
|
-
SaveRepository() {
|
|
5016
|
-
this.Loading = true;
|
|
5017
|
-
const org = this.OrganizationFormControl.value;
|
|
5018
|
-
const repoName = this.RepositoryFormControl.value;
|
|
5019
|
-
this.appsFlowSvc
|
|
5020
|
-
.CreateRepository(org, repoName)
|
|
5021
|
-
.subscribe((response) => {
|
|
5022
|
-
if (response.Status.Code === 0) {
|
|
5023
|
-
this.listRepositories(repoName);
|
|
5024
|
-
this.CreatingRepository = false;
|
|
5025
|
-
}
|
|
5026
|
-
else {
|
|
5027
|
-
// TODO: Need to surface an error to the user...
|
|
5028
|
-
this.Loading = false;
|
|
5029
|
-
}
|
|
5030
|
-
});
|
|
5031
|
-
}
|
|
5032
|
-
SetEditingSourceControl(scLookup) {
|
|
5033
|
-
this.EditingSourceControlLookup = scLookup;
|
|
5034
|
-
}
|
|
5035
|
-
SubmitSourceControl() {
|
|
5036
|
-
console.log("source control submitted: ", this.DevOpsSourceControlFormGroup.value);
|
|
5037
|
-
this.SaveSourceControl();
|
|
5038
|
-
}
|
|
5039
|
-
SaveSourceControl() {
|
|
5040
|
-
const saveEnvReq = {
|
|
5041
|
-
Environment: Object.assign(Object.assign({}, this.Environment), { Artifacts: this.Environment.Artifacts || {}, DevOpsActions: this.Environment.DevOpsActions || {}, Secrets: this.Environment.Secrets || {}, Sources: this.Environment.Sources || {} }),
|
|
5042
|
-
EnvironmentLookup: this.EnvironmentLookup,
|
|
5043
|
-
EnterpriseDataTokens: {},
|
|
5044
|
-
};
|
|
5045
|
-
let artifactLookup;
|
|
5046
|
-
let artifact = this.Artifact;
|
|
5047
|
-
if (!this.ArtifactLookup) {
|
|
5048
|
-
artifactLookup = Guid.CreateRaw();
|
|
5049
|
-
artifact = Object.assign(Object.assign({}, artifact), {
|
|
5050
|
-
// Type: this.HostingDetailsFormControls.SelectedHostingOption
|
|
5051
|
-
// .ArtifactType,
|
|
5052
|
-
// Name: this.HostingDetailsFormControls.SelectedHostingOption.Name,
|
|
5053
|
-
NPMRegistry: 'https://registry.npmjs.org/' });
|
|
5054
|
-
}
|
|
5055
|
-
else {
|
|
5056
|
-
artifactLookup = this.ArtifactLookup;
|
|
5057
|
-
}
|
|
5058
|
-
saveEnvReq.Environment.Artifacts[artifactLookup] = artifact;
|
|
5059
|
-
let devOpsActionLookup;
|
|
5060
|
-
if (!this.DevOpsActionLookup) {
|
|
5061
|
-
devOpsActionLookup = Guid.CreateRaw();
|
|
5062
|
-
const doa = Object.assign(Object.assign({}, this.DevOpsAction), { ArtifactLookups: [artifactLookup] });
|
|
5063
|
-
saveEnvReq.Environment.DevOpsActions[devOpsActionLookup] = this.DevOpsAction;
|
|
5064
|
-
}
|
|
5065
|
-
else {
|
|
5066
|
-
devOpsActionLookup = this.DevOpsActionLookupFormControl.value;
|
|
5067
|
-
const doa = Object.assign({}, this.DevOpsAction);
|
|
5068
|
-
// saveEnvReq.Environment.DevOpsActions[devOpsActionLookup] = doa;
|
|
5069
|
-
saveEnvReq.Environment.DevOpsActions[devOpsActionLookup] = this.DevOpsAction;
|
|
5070
|
-
}
|
|
5071
|
-
let source = Object.assign(Object.assign({}, this.EditingSourceControl), { Branches: this.SelectedBranches, MainBranch: this.MainBranchFormControl.value });
|
|
5072
|
-
source = Object.assign(Object.assign({}, source), { Type: 'GitHub', Name: this.EditingSourceControlLookup, DevOpsActionTriggerLookups: [devOpsActionLookup], Organization: this.OrganizationFormControl.value, Repository: this.RepositoryFormControl.value });
|
|
5073
|
-
const scLookup = `github://${source.Organization}/${source.Repository}`;
|
|
5074
|
-
saveEnvReq.Environment.Sources[scLookup] = source;
|
|
5075
|
-
let resp = this.eacSvc.SaveEnvironmentAsCode(saveEnvReq);
|
|
5076
|
-
resp.then(res => {
|
|
5077
|
-
this.SaveStatusEvent.emit(res);
|
|
5146
|
+
// console.log('BuildPipeline = ', this.BuildPipeline)
|
|
5147
|
+
// this.BuildPipelineFormGroup = this.formBuilder.group({});
|
|
5148
|
+
// if (this.BuildPipelineFormGroup != null) {
|
|
5149
|
+
// this.BuildPipelineFormGroup.removeControl('hostingDetails');
|
|
5150
|
+
// }
|
|
5151
|
+
// this.BuildPipelineFormGroup.addControl(
|
|
5152
|
+
// 'hostingDetails',
|
|
5153
|
+
this.BuildPipelineFormGroup = this.formBuilder.group({
|
|
5154
|
+
buildPipeline: [this.BuildPipeline, [Validators.required]],
|
|
5078
5155
|
});
|
|
5156
|
+
// );
|
|
5157
|
+
this.loadProjectHostingDetails();
|
|
5158
|
+
// this.setupControlsForForm();
|
|
5079
5159
|
}
|
|
5080
|
-
//
|
|
5081
|
-
|
|
5082
|
-
|
|
5083
|
-
|
|
5084
|
-
|
|
5085
|
-
|
|
5086
|
-
this.
|
|
5087
|
-
this.emitBranchesChanged();
|
|
5088
|
-
}
|
|
5089
|
-
configureDevOpsAction() {
|
|
5090
|
-
setTimeout(() => {
|
|
5091
|
-
this.DevOpsActionLookupFormControl.setValue(this.DevOpsActionLookup);
|
|
5092
|
-
}, 0);
|
|
5160
|
+
//API METHODS
|
|
5161
|
+
BuildPipelineChanged() {
|
|
5162
|
+
var _a;
|
|
5163
|
+
//for some reason this value is coming back undefined
|
|
5164
|
+
// console.log("build pipeline value: ", this.BuildPipelineFormControl?.value)
|
|
5165
|
+
this.BuildPipeline = (_a = this.BuildPipelineFormControl) === null || _a === void 0 ? void 0 : _a.value;
|
|
5166
|
+
this.setupControlsForForm();
|
|
5093
5167
|
}
|
|
5094
|
-
|
|
5095
|
-
|
|
5096
|
-
this.
|
|
5097
|
-
(_a = this.DevOpsSourceControlFormGroup) === null || _a === void 0 ? void 0 : _a.removeControl([this.SourceControlRoot, 'branches'].join(''));
|
|
5098
|
-
(_b = this.DevOpsSourceControlFormGroup) === null || _b === void 0 ? void 0 : _b.removeControl([this.SourceControlRoot, 'buildPath'].join(''));
|
|
5099
|
-
this.SelectedBranches = [];
|
|
5100
|
-
(_c = this.DevOpsSourceControlFormGroup) === null || _c === void 0 ? void 0 : _c.removeControl([this.SourceControlRoot, 'organization'].join(''));
|
|
5101
|
-
(_d = this.DevOpsSourceControlFormGroup) === null || _d === void 0 ? void 0 : _d.removeControl([this.SourceControlRoot, 'repository'].join(''));
|
|
5168
|
+
SubmitBuildPipeline() {
|
|
5169
|
+
// console.log("submitting build pipeline: ", this.BuildPipelineFormGroup.value);
|
|
5170
|
+
this.SaveEnvironment();
|
|
5102
5171
|
}
|
|
5103
|
-
|
|
5104
|
-
var _a
|
|
5105
|
-
|
|
5106
|
-
(
|
|
5107
|
-
|
|
5108
|
-
|
|
5172
|
+
SaveEnvironment() {
|
|
5173
|
+
var _a;
|
|
5174
|
+
const saveEnvReq = {
|
|
5175
|
+
Environment: Object.assign(Object.assign({}, this.Environment), { Artifacts: this.Environment.Artifacts || {}, DevOpsActions: this.Environment.DevOpsActions || {}, Secrets: this.Environment.Secrets || {}, Sources: this.Environment.Sources || {} }),
|
|
5176
|
+
EnvironmentLookup: this.EnvironmentLookup,
|
|
5177
|
+
EnterpriseDataTokens: {},
|
|
5178
|
+
};
|
|
5179
|
+
let artifactLookup;
|
|
5180
|
+
let artifact = Object.assign(Object.assign({}, this.Artifact), this.SelectedHostingOptionInputControlValues);
|
|
5181
|
+
if (!this.ArtifactLookup) {
|
|
5182
|
+
artifactLookup = Guid.CreateRaw();
|
|
5183
|
+
artifact = Object.assign(Object.assign({}, artifact), { Type: this.SelectedHostingOption.ArtifactType, Name: this.SelectedHostingOption.Name, NPMRegistry: 'https://registry.npmjs.org/' });
|
|
5109
5184
|
}
|
|
5110
|
-
else
|
|
5111
|
-
this.
|
|
5185
|
+
else {
|
|
5186
|
+
artifactLookup = this.ArtifactLookup;
|
|
5112
5187
|
}
|
|
5113
|
-
|
|
5114
|
-
|
|
5115
|
-
|
|
5116
|
-
|
|
5117
|
-
|
|
5118
|
-
this.
|
|
5119
|
-
|
|
5120
|
-
.
|
|
5121
|
-
.
|
|
5122
|
-
|
|
5123
|
-
|
|
5124
|
-
|
|
5125
|
-
|
|
5126
|
-
|
|
5127
|
-
|
|
5128
|
-
|
|
5129
|
-
this.
|
|
5130
|
-
|
|
5131
|
-
|
|
5132
|
-
|
|
5133
|
-
this.listBuildPaths();
|
|
5134
|
-
});
|
|
5188
|
+
saveEnvReq.Environment.Artifacts[artifactLookup] = artifact;
|
|
5189
|
+
let devOpsActionLookup;
|
|
5190
|
+
if (!this.DevOpsActionLookup) {
|
|
5191
|
+
devOpsActionLookup = Guid.CreateRaw();
|
|
5192
|
+
const doa = Object.assign(Object.assign({}, this.DevOpsAction), { ArtifactLookups: [artifactLookup], Name: this.DevOpsActionNameFormControl.value, Path: this.SelectedHostingOption.Path, Templates: this.SelectedHostingOption.Templates });
|
|
5193
|
+
if ((_a = this.NPMTokenFormControl) === null || _a === void 0 ? void 0 : _a.value) {
|
|
5194
|
+
const secretLookup = 'npm-access-token';
|
|
5195
|
+
doa.SecretLookups = [secretLookup];
|
|
5196
|
+
saveEnvReq.Environment.Secrets[secretLookup] = {
|
|
5197
|
+
Name: 'NPM Access Token',
|
|
5198
|
+
DataTokenLookup: secretLookup,
|
|
5199
|
+
KnownAs: 'NPM_TOKEN',
|
|
5200
|
+
};
|
|
5201
|
+
saveEnvReq.EnterpriseDataTokens[secretLookup] = {
|
|
5202
|
+
Name: saveEnvReq.Environment.Secrets[secretLookup].Name,
|
|
5203
|
+
Description: saveEnvReq.Environment.Secrets[secretLookup].Name,
|
|
5204
|
+
Value: this.NPMTokenFormControl.value,
|
|
5205
|
+
};
|
|
5206
|
+
}
|
|
5207
|
+
saveEnvReq.Environment.DevOpsActions[devOpsActionLookup] = doa;
|
|
5135
5208
|
}
|
|
5136
|
-
|
|
5137
|
-
|
|
5138
|
-
|
|
5139
|
-
|
|
5140
|
-
this.appsFlowSvc
|
|
5141
|
-
.ListBuildPaths(this.OrganizationFormControl.value, this.RepositoryFormControl.value)
|
|
5142
|
-
.subscribe((response) => {
|
|
5143
|
-
var _a;
|
|
5144
|
-
this.BuildPathOptions = response.Model;
|
|
5145
|
-
this.Loading = false;
|
|
5146
|
-
if (((_a = this.BuildPathOptions) === null || _a === void 0 ? void 0 : _a.length) === 1) {
|
|
5147
|
-
this.BuildPathFormControl.setValue(this.BuildPathOptions[0]);
|
|
5148
|
-
}
|
|
5149
|
-
});
|
|
5209
|
+
else {
|
|
5210
|
+
devOpsActionLookup = this.DevOpsActionLookup;
|
|
5211
|
+
const doa = Object.assign(Object.assign({}, this.DevOpsAction), { Name: this.DevOpsActionNameFormControl.value });
|
|
5212
|
+
saveEnvReq.Environment.DevOpsActions[devOpsActionLookup] = doa;
|
|
5150
5213
|
}
|
|
5214
|
+
this.eacSvc.SaveEnvironmentAsCode(saveEnvReq).then(res => {
|
|
5215
|
+
this.ResponseEvent.emit(res);
|
|
5216
|
+
});
|
|
5151
5217
|
}
|
|
5152
|
-
|
|
5153
|
-
|
|
5154
|
-
|
|
5155
|
-
|
|
5156
|
-
|
|
5157
|
-
|
|
5158
|
-
|
|
5159
|
-
|
|
5160
|
-
|
|
5161
|
-
|
|
5162
|
-
|
|
5163
|
-
|
|
5164
|
-
|
|
5165
|
-
|
|
5218
|
+
// Helpers
|
|
5219
|
+
setupControlsForForm() {
|
|
5220
|
+
var _a, _b, _c, _d, _e, _f;
|
|
5221
|
+
// this.BuildPipeline =
|
|
5222
|
+
// this.BuildPipeline || this.HostingDetails?.HostingOptions
|
|
5223
|
+
// ? this.HostingDetails?.HostingOptions[0]?.Lookup
|
|
5224
|
+
// : '';
|
|
5225
|
+
// console.log("hosting details: ", this.HostingDetails)
|
|
5226
|
+
for (const ctrlName in this.BuildPipelineFormGroup.controls) {
|
|
5227
|
+
//devOpsAction doesn't exist
|
|
5228
|
+
//removes hosting details
|
|
5229
|
+
if (ctrlName !== 'buildPipeline' && ctrlName !== 'devOpsAction') {
|
|
5230
|
+
// console.log("removing control: ", ctrlName)
|
|
5231
|
+
this.BuildPipelineFormGroup.removeControl(ctrlName);
|
|
5166
5232
|
}
|
|
5233
|
+
}
|
|
5234
|
+
this.BuildPipelineFormGroup.addControl('devOpsActionName', this.formBuilder.control(((_a = this.DevOpsAction) === null || _a === void 0 ? void 0 : _a.Name) || ((_b = this.SelectedHostingOption) === null || _b === void 0 ? void 0 : _b.Name) || '', [Validators.required]));
|
|
5235
|
+
// console.log("selected hosting options: ", this.SelectedHostingOption.Inputs);
|
|
5236
|
+
(_d = (_c = this.SelectedHostingOption) === null || _c === void 0 ? void 0 : _c.Inputs) === null || _d === void 0 ? void 0 : _d.forEach((input) => {
|
|
5237
|
+
const validators = input.Required ? [Validators.required] : [];
|
|
5238
|
+
this.BuildPipelineFormGroup.addControl(input.Lookup, this.formBuilder.control(this.Artifact[input.Lookup] || input.DefaultValue || '', validators));
|
|
5239
|
+
// if (this.Disabled) {
|
|
5240
|
+
// this.FormGroup.controls[input.Lookup].disable();
|
|
5241
|
+
// }
|
|
5167
5242
|
});
|
|
5168
|
-
|
|
5169
|
-
|
|
5170
|
-
|
|
5171
|
-
|
|
5172
|
-
|
|
5173
|
-
|
|
5174
|
-
var _a;
|
|
5175
|
-
this.RepositoryOptions = response.Model;
|
|
5176
|
-
this.Loading = false;
|
|
5177
|
-
if (activeRepo) {
|
|
5178
|
-
setTimeout(() => {
|
|
5179
|
-
this.RepositoryFormControl.setValue(activeRepo);
|
|
5180
|
-
this.listBranches();
|
|
5181
|
-
if (!this.UseBranches) {
|
|
5182
|
-
this.listBuildPaths();
|
|
5183
|
-
}
|
|
5184
|
-
}, 0);
|
|
5243
|
+
if (((_e = this.BuildPipelineFormControl) === null || _e === void 0 ? void 0 : _e.value) === 'npm-release') {
|
|
5244
|
+
if (!this.BuildPipelineFormGroup.controls.npmToken) {
|
|
5245
|
+
this.BuildPipelineFormGroup.addControl('npmToken', this.formBuilder.control('', this.Disabled ? [] : [Validators.required]));
|
|
5246
|
+
if (this.Disabled) {
|
|
5247
|
+
this.BuildPipelineFormGroup.controls.npmToken.disable();
|
|
5248
|
+
}
|
|
5185
5249
|
}
|
|
5186
|
-
|
|
5187
|
-
|
|
5250
|
+
}
|
|
5251
|
+
else if (((_f = this.BuildPipelineFormControl) === null || _f === void 0 ? void 0 : _f.value) === 'github-artifacts-release') {
|
|
5252
|
+
if (this.BuildPipelineFormGroup.controls.npmToken) {
|
|
5253
|
+
this.BuildPipelineFormGroup.removeControl('npmToken');
|
|
5188
5254
|
}
|
|
5189
|
-
});
|
|
5190
|
-
}
|
|
5191
|
-
loadProjectHostingDetails() {
|
|
5192
|
-
var _a, _b, _c, _d;
|
|
5193
|
-
if (((_a = this.SelectedBranches) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
5194
|
-
this.HostingDetails.Loading = true;
|
|
5195
|
-
this.appsFlowSvc
|
|
5196
|
-
.LoadProjectHostingDetails((_b = this.OrganizationFormControl) === null || _b === void 0 ? void 0 : _b.value, (_c = this.RepositoryFormControl) === null || _c === void 0 ? void 0 : _c.value, (_d = this.MainBranchFormControl) === null || _d === void 0 ? void 0 : _d.value)
|
|
5197
|
-
.subscribe((response) => {
|
|
5198
|
-
this.HostingDetails = response.Model;
|
|
5199
|
-
this.HostingDetails.Loading = false;
|
|
5200
|
-
this.configureDevOpsAction();
|
|
5201
|
-
}, (err) => {
|
|
5202
|
-
this.HostingDetails.Loading = false;
|
|
5203
|
-
});
|
|
5204
5255
|
}
|
|
5205
5256
|
}
|
|
5206
|
-
|
|
5207
|
-
|
|
5208
|
-
|
|
5209
|
-
|
|
5210
|
-
|
|
5211
|
-
|
|
5212
|
-
|
|
5213
|
-
|
|
5214
|
-
this.
|
|
5215
|
-
|
|
5216
|
-
|
|
5217
|
-
|
|
5218
|
-
|
|
5219
|
-
|
|
5257
|
+
loadProjectHostingDetails() {
|
|
5258
|
+
this.HostingDetails.Loading = true;
|
|
5259
|
+
this.appsFlowSvc.NewLoadProjectHostingDetails().subscribe((response) => {
|
|
5260
|
+
var _a, _b;
|
|
5261
|
+
this.HostingDetails = response.Model;
|
|
5262
|
+
// console.log("response: ", response);
|
|
5263
|
+
this.HostingDetails.Loading = false;
|
|
5264
|
+
const hostOption = (_b = (_a = this.HostingDetails) === null || _a === void 0 ? void 0 : _a.HostingOptions) === null || _b === void 0 ? void 0 : _b.find((ho) => ho.Path === this.DevOpsAction.Path);
|
|
5265
|
+
this.BuildPipeline = hostOption.Lookup;
|
|
5266
|
+
// console.log("Build Pipeline HERE= ", this.BuildPipeline);
|
|
5267
|
+
this.setupControlsForForm();
|
|
5268
|
+
}, (err) => {
|
|
5269
|
+
console.log('ERR: ', err);
|
|
5270
|
+
this.HostingDetails.Loading = false;
|
|
5271
|
+
});
|
|
5272
|
+
console.log('HOSTING DETAILS: ', this.HostingDetails);
|
|
5220
5273
|
}
|
|
5221
5274
|
}
|
|
5222
|
-
|
|
5223
|
-
DevopsSourceControlFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: DevopsSourceControlFormComponent, selector: "lcu-devops-source-control-form", inputs: { EditingSourceControlLookup: ["editing-source-control-lookup", "EditingSourceControlLookup"], Environment: ["environment", "Environment"], EnvironmentLookup: ["environment-lookup", "EnvironmentLookup"] }, outputs: { SaveStatusEvent: "save-status-event" }, viewQueries: [{ propertyName: "BranchesInput", first: true, predicate: ["branches"], descendants: true }], ngImport: i0, template: "<form class=\"form-card\" [formGroup]=\"DevOpsSourceControlFormGroup\" (ngSubmit)=\"SubmitSourceControl()\">\n\n <mat-card class=\"spread\" class=\"sc-card\">\n <mat-card-header>\n <mat-card-title> Source Control </mat-card-title>\n\n <div fxFlex></div>\n\n <mat-icon matSuffix matTooltip=\"Configure source control, DevOps CI/CD, and artifacts.\">\n info_outline\n </mat-icon>\n </mat-card-header>\n\n <mat-card-content>\n <div class=\"card\">\n <mat-form-field class=\"mat-full-width\">\n <mat-select formControlName=\"devOpsActionLookup\" placeholder=\"DevOps Action\"\n [disabled]=\"HostingDetails?.Loading\" (selectionChange)=\"DevOpsActionLookupChanged($event)\">\n <ng-container *ngFor=\"let devOpsActionLookup of DevOpsActionLookups\">\n <mat-option [value]=\"devOpsActionLookup\" *ngIf=\"DevOpsActions[devOpsActionLookup]; let devOpsAction\">\n {{ devOpsAction.Name }}\n </mat-option>\n </ng-container>\n\n <mat-option value=\"\">-- Create New --</mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n <div class=\"card\" *ngIf=\"OrganizationFormControl?.valid || !Loading\">\n <mat-form-field class=\"mat-full-width with-hint margin-bottom\" *ngIf=\"OrganizationOptions?.length > 0\">\n <mat-icon class=\"org-icon\" matPrefix>corporate_fare</mat-icon>\n\n <mat-select [formControlName]=\"SourceControlRoot + 'organization'\" placeholder=\"Organization\"\n (selectionChange)=\"OrganizationChanged($event)\" [disabled]=\"Loading || HostingDetails?.Loading\" required>\n <ng-container *ngFor=\"let orgOpt of OrganizationOptions\">\n <mat-option [value]=\"orgOpt.Name\">\n {{ orgOpt.Name }}\n </mat-option>\n </ng-container>\n </mat-select>\n\n <mat-icon matSuffix (click)=\"RefreshOrganizations()\" matTooltip=\"Refresh Organization\"> refresh </mat-icon>\n\n <a matSuffix href=\"/.oauth/github?oauth-force-edit=true\" target=\"_blank\" color=\"accent\">\n <mat-icon color=\"accent\" matTooltip=\"Re-authorize Organizations\"> launch </mat-icon>\n </a>\n\n <mat-hint>\n If you don't have an organization or would like to create a new one,\n <a href=\"https://github.com/account/organizations/new\" target=\"_blank\">\n start here\n </a>\n </mat-hint>\n </mat-form-field>\n </div>\n\n <div class=\"card\" *ngIf=\"\n RepositoryFormControl?.valid ||\n (OrganizationFormControl?.valid && !Loading)\n \">\n <mat-form-field class=\"mat-full-width\">\n <mat-icon class=\"org-icon\" matPrefix>description</mat-icon>\n\n <mat-select [formControlName]=\"SourceControlRoot + 'repository'\" [placeholder]=\"\n OrganizationFormControl?.valid\n ? 'Repository'\n : 'Repository (select organization first)'\n \" [disabled]=\"\n !OrganizationFormControl?.valid || Loading || HostingDetails?.Loading\n \" (selectionChange)=\"RepositoryChanged($event)\" *ngIf=\"!CreatingRepository\" required>\n <ng-container *ngFor=\"let repoOpt of RepositoryOptions\">\n <mat-option [value]=\"repoOpt.Name\">\n {{ repoOpt.Name }}\n </mat-option>\n </ng-container>\n </mat-select>\n\n <input matInput placeholder=\"Repository (creates new if does not exist)\"\n [formControlName]=\"SourceControlRoot + 'repository'\" *ngIf=\"CreatingRepository\"\n [fxHide]=\"Loading || HostingDetails?.Loading\" required />\n\n <mat-icon matSuffix (click)=\"CreateRepository()\" [fxHide]=\"Loading || HostingDetails?.Loading\"\n *ngIf=\"!CreatingRepository && OrganizationFormControl?.valid\">\n add_circle\n </mat-icon>\n\n <button mat-button type=\"button\" (click)=\"SaveRepository()\"\n *ngIf=\"CreatingRepository && RepositoryFormControl?.valid\">\n\n <mat-icon matSuffix color=\"primary\">\n save\n </mat-icon>\n </button>\n\n <button mat-button type=\"button\" (click)=\"CancelCreateRepository()\" *ngIf=\"CreatingRepository\">\n\n <mat-icon matSuffix>\n cancel\n </mat-icon>\n </button>\n </mat-form-field>\n </div>\n\n <div class=\"card\" *ngIf=\"\n (BranchesFormControl?.valid ||\n (OrganizationFormControl?.valid &&\n RepositoryFormControl?.valid &&\n !Loading)) &&\n !CreatingRepository &&\n UseBranches\n \">\n <mat-form-field class=\"mat-full-width\">\n <mat-icon class=\"org-icon\" matPrefix>account_tree</mat-icon>\n\n <mat-label>Selected Branches</mat-label>\n\n <mat-autocomplete (optionSelected)=\"BranchOptionSelected($event)\" #branchOptions=\"matAutocomplete\">\n <ng-container *ngFor=\"let branchOpt of BranchOptions\">\n <mat-option [value]=\"branchOpt.Name\">\n {{ branchOpt.Name }}\n </mat-option>\n </ng-container>\n </mat-autocomplete>\n\n <mat-chip-list #selectedBranches>\n <mat-chip [removable]=\"true\" (removed)=\"RemoveBranchOption(selBranch)\"\n *ngFor=\"let selBranch of SelectedBranches\">\n {{ selBranch }}\n <mat-icon matChipRemove>cancel</mat-icon>\n </mat-chip>\n\n <input matInput placeholder=\"New Branch...\" [formControlName]=\"SourceControlRoot + 'branches'\" #branches\n [matAutocomplete]=\"branchOptions\" [matChipInputFor]=\"selectedBranches\"\n [matChipInputSeparatorKeyCodes]=\"SeparatorKeysCodes\" [matChipInputAddOnBlur]=\"true\"\n (matChipInputTokenEnd)=\"AddBranchOption($event)\" [disabled]=\"Loading || HostingDetails?.Loading\"\n required />\n </mat-chip-list>\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width with-hint\" [fxShow]=\"SelectedBranches?.length > 1\">\n <mat-icon class=\"org-icon\" matPrefix>account_tree</mat-icon>\n\n <mat-select [formControlName]=\"SourceControlRoot + 'mainBranch'\" placeholder=\"Main Branch\"\n [disabled]=\"Loading || HostingDetails?.Loading\" (selectionChange)=\"MainBranchChanged($event)\" required>\n <ng-container *ngFor=\"let branch of SelectedBranches\">\n <mat-option [value]=\"branch\">\n {{ branch }}\n </mat-option>\n </ng-container>\n </mat-select>\n\n <mat-icon matSuffix (click)=\"RefreshOrganizations()\"> refresh </mat-icon>\n\n <a matSuffix mat-icon-button href=\"/.oauth/github?oauth-force-edit=true\" target=\"_blank\" color=\"accent\">\n <mat-icon matTooltip=\"Re-authorize Organizations\" color=\"accent\"> launch </mat-icon>\n </a>\n\n <mat-hint>\n If you don't have an organization or would like to create a new one,\n <a href=\"https://github.com/account/organizations/new\" target=\"_blank\">\n start here\n </a>\n </mat-hint>\n </mat-form-field>\n </div>\n\n <div class=\"card\" *ngIf=\"\n (BuildPathFormControl?.valid ||\n (OrganizationFormControl?.valid &&\n RepositoryFormControl?.valid &&\n !Loading)) &&\n !CreatingRepository &&\n UseBuildPath\n \">\n <mat-form-field class=\"mat-full-width with-hint\">\n <mat-icon class=\"org-icon\" matPrefix>build</mat-icon>\n\n <mat-select [formControlName]=\"SourceControlRoot + 'buildPath'\" placeholder=\"Build Path\"\n [disabled]=\"Loading || BuildPathDisabled\" (selectionChange)=\"BuildPathChanged($event)\" required>\n <ng-container *ngFor=\"let buildPath of BuildPathOptions\">\n <mat-option [value]=\"buildPath\">\n {{ buildPath }}\n </mat-option>\n </ng-container>\n </mat-select>\n\n <mat-hint>\n The build path identifies which build action to use for your\n configuration.\n </mat-hint>\n </mat-form-field>\n </div>\n\n <div *ngIf=\"Loading\">\n <div class=\"spread\">\n <lcu-loader style=\"margin: auto\" [loading]=\"true\"></lcu-loader>\n\n <div class=\"margin-3\">\n <h4 class=\"mat-title\" *ngIf=\"!OrganizationFormControl?.valid\">\n Loading organizations\n </h4>\n\n <h4 class=\"mat-title\" *ngIf=\"\n OrganizationFormControl?.valid && !RepositoryFormControl?.valid\n \">\n Loading repositories\n </h4>\n\n <h4 class=\"mat-title\" *ngIf=\"RepositoryFormControl?.valid && !BranchesFormControl?.valid\">\n Loading branches\n </h4>\n\n <h4 class=\"mat-title\" *ngIf=\"\n (RepositoryFormControl?.valid || BranchesFormControl?.valid) &&\n !BuildPathFormControl?.valid\n \">\n Loading build paths\n </h4>\n </div>\n </div>\n </div>\n <!-- </div> -->\n\n </mat-card-content>\n <mat-card-actions fxLayoutAlign=\"center center\">\n\n <button \n mat-raised-button \n *ngIf=\"!State?.Loading\"\n type=\"submit\" \n fxFlex=\"100%\" \n color=\"primary\" \n [disabled]=\"!DevOpsSourceControlFormGroup.valid || !DevOpsSourceControlFormGroup.dirty\">\n <mat-icon>save</mat-icon>\n Save Source Control\n </button>\n <lcu-loader [loading]=\"State?.Loading\"></lcu-loader>\n \n </mat-card-actions>\n </mat-card>\n</form>", styles: [".form-card,.sc-card{width:100%}.margin-bottom{margin-bottom:15px}\n"], components: [{ type: i4.MatCard, selector: "mat-card", exportAs: ["matCard"] }, { type: i4.MatCardHeader, selector: "mat-card-header" }, { type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i4$2.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { type: i7.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i8.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { type: i2$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i8$1.MatAutocomplete, selector: "mat-autocomplete", inputs: ["disableRipple"], exportAs: ["matAutocomplete"] }, { type: i9$1.MatChipList, selector: "mat-chip-list", inputs: ["errorStateMatcher", "multiple", "compareWith", "value", "required", "placeholder", "disabled", "aria-orientation", "selectable", "tabIndex"], outputs: ["change", "valueChange"], exportAs: ["matChipList"] }, { type: i2$1.MatAnchor, selector: "a[mat-button], a[mat-raised-button], a[mat-icon-button], a[mat-fab], a[mat-mini-fab], a[mat-stroked-button], a[mat-flat-button]", inputs: ["disabled", "disableRipple", "color", "tabIndex"], exportAs: ["matButton", "matAnchor"] }, { type: i3.LoaderComponent, selector: "lcu-loader", inputs: ["diameter", "hide-inner", "loading"] }], directives: [{ type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i4.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { type: i5$1.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { type: i4$2.MatSuffix, selector: "[matSuffix]" }, { type: i12.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { type: i4.MatCardContent, selector: "mat-card-content, [mat-card-content], [matCardContent]" }, { type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { type: i4$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4$2.MatPrefix, selector: "[matPrefix]" }, { type: i1$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i4$2.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { type: i11.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i9.DefaultShowHideDirective, selector: " [fxShow], [fxShow.print], [fxShow.xs], [fxShow.sm], [fxShow.md], [fxShow.lg], [fxShow.xl], [fxShow.lt-sm], [fxShow.lt-md], [fxShow.lt-lg], [fxShow.lt-xl], [fxShow.gt-xs], [fxShow.gt-sm], [fxShow.gt-md], [fxShow.gt-lg], [fxHide], [fxHide.print], [fxHide.xs], [fxHide.sm], [fxHide.md], [fxHide.lg], [fxHide.xl], [fxHide.lt-sm], [fxHide.lt-md], [fxHide.lt-lg], [fxHide.lt-xl], [fxHide.gt-xs], [fxHide.gt-sm], [fxHide.gt-md], [fxHide.gt-lg]", inputs: ["fxShow", "fxShow.print", "fxShow.xs", "fxShow.sm", "fxShow.md", "fxShow.lg", "fxShow.xl", "fxShow.lt-sm", "fxShow.lt-md", "fxShow.lt-lg", "fxShow.lt-xl", "fxShow.gt-xs", "fxShow.gt-sm", "fxShow.gt-md", "fxShow.gt-lg", "fxHide", "fxHide.print", "fxHide.xs", "fxHide.sm", "fxHide.md", "fxHide.lg", "fxHide.xl", "fxHide.lt-sm", "fxHide.lt-md", "fxHide.lt-lg", "fxHide.lt-xl", "fxHide.gt-xs", "fxHide.gt-sm", "fxHide.gt-md", "fxHide.gt-lg"] }, { type: i4$2.MatLabel, selector: "mat-label" }, { type: i9$1.MatChip, selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", inputs: ["color", "disableRipple", "tabIndex", "selected", "value", "selectable", "disabled", "removable"], outputs: ["selectionChange", "destroyed", "removed"], exportAs: ["matChip"] }, { type: i9$1.MatChipRemove, selector: "[matChipRemove]" }, { type: i8$1.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", exportAs: ["matAutocompleteTrigger"] }, { type: i9$1.MatChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputFor", "matChipInputAddOnBlur", "matChipInputSeparatorKeyCodes", "placeholder", "id", "disabled"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }, { type: i4.MatCardActions, selector: "mat-card-actions", inputs: ["align"], exportAs: ["matCardActions"] }, { type: i5$1.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }] });
|
|
5224
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type:
|
|
5275
|
+
BuildPipelineFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: BuildPipelineFormComponent, deps: [{ token: EaCService }, { token: i1$1.FormBuilder }, { token: ApplicationsFlowService }], target: i0.ɵɵFactoryTarget.Component });
|
|
5276
|
+
BuildPipelineFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: BuildPipelineFormComponent, selector: "lcu-build-pipeline-form", inputs: { DevOpsActionLookup: ["devops-action-lookup", "DevOpsActionLookup"], Disabled: ["disabled", "Disabled"], Environment: ["environment", "Environment"], EnvironmentLookup: ["environment-lookup", "EnvironmentLookup"], HostingDetails: ["hosting-details", "HostingDetails"] }, outputs: { ResponseEvent: "response-event" }, ngImport: i0, template: "<form class=\"form-card\" [formGroup]=\"BuildPipelineFormGroup\" (ngSubmit)=\"SubmitBuildPipeline()\">\n <mat-card\n class=\"spread\" \n >\n <mat-card-header>\n <mat-card-title> Build Pipeline </mat-card-title>\n\n <mat-hint>\n Changes made here are reflected for all sources using this\n DevOpsAction\n </mat-hint>\n </mat-card-header>\n\n <mat-card-content>\n\n\n <div *ngIf=\"!HostingDetails?.Loading\">\n <mat-form-field class=\"mat-full-width\">\n <mat-select\n formControlName=\"buildPipeline\"\n placeholder=\"Build Pipeline\"\n [disabled]=\"Disabled\"\n (selectionChange)=\"BuildPipelineChanged()\"\n required\n >\n <ng-container\n *ngFor=\"let hostOption of HostingDetails?.HostingOptions; let i = index\"\n >\n <mat-option [value]=\"hostOption.Lookup\">\n {{ hostOption.Name }}\n </mat-option>\n </ng-container>\n </mat-select>\n \n <mat-hint>\n <ng-container *ngFor=\"let hostOption of HostingDetails?.HostingOptions\">\n <span *ngIf=\"BuildPipeline == hostOption?.Lookup\">\n {{ hostOption.Description }}\n </span>\n </ng-container>\n </mat-hint>\n </mat-form-field>\n \n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n formControlName=\"devOpsActionName\"\n placeholder=\"Name of DevOps Action\"\n required=\"true\"\n />\n </mat-form-field>\n \n <ng-container *ngFor=\"let input of SelectedHostingOption?.Inputs\">\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n [formControlName]=\"input.Lookup\"\n [placeholder]=\"input.Placeholder\"\n [required]=\"input.Required\"\n />\n \n <mat-hint>{{ input.Hint }}</mat-hint>\n </mat-form-field>\n </ng-container>\n \n <div *ngIf=\"BuildPipeline == 'npm-release'\">\n <mat-form-field class=\"mat-full-width with-hint padding-bottom-4\">\n <mat-icon matPrefix>security</mat-icon>\n \n <input\n id=\"npm-token\"\n matInput\n type=\"text\"\n formControlName=\"npmToken\"\n placeholder=\"NPM token\"\n [required]=\"!Disabled\"\n style=\"-webkit-text-security: disc;\"\n />\n <mat-hint>\n Securely publish to NPM, provide an NPM Personal Access Token (PAT) with publish access to the organization used for your NPM packages. \n Learn how to create and view access tokens \n <a\n href=\"https://docs.npmjs.com/creating-and-viewing-access-tokens\"\n target=\"_blank\"\n >\n here.\n </a>\n </mat-hint>\n </mat-form-field>\n </div>\n </div>\n \n <div *ngIf=\"HostingDetails?.Loading\">\n <div class=\"spread\">\n <lcu-loader style=\"margin: auto\" [loading]=\"true\"></lcu-loader>\n \n <div class=\"margin-3\">\n <h4 class=\"mat-title\">Loading hosting details</h4>\n </div>\n </div>\n </div>\n </mat-card-content>\n <mat-card-actions fxLayoutAlign=\"center center\">\n\n <button \n *ngIf=\"!State?.Loading\"\n mat-raised-button \n type=\"submit\" \n fxFlex=\"100%\" \n color=\"primary\" \n [disabled]=\"!BuildPipelineFormGroup.valid || !BuildPipelineFormGroup.dirty\">\n <mat-icon>save</mat-icon>\n Save Build Pipeline\n </button>\n <lcu-loader [loading]=\"State?.Loading\"></lcu-loader> \n \n </mat-card-actions>\n </mat-card>\n</form>\n", styles: [""], components: [{ type: i4.MatCard, selector: "mat-card", exportAs: ["matCard"] }, { type: i4.MatCardHeader, selector: "mat-card-header" }, { type: i4$2.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { type: i7.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i8.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i3.LoaderComponent, selector: "lcu-loader", inputs: ["diameter", "hide-inner", "loading"] }, { type: i2$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i4.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { type: i4$2.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { type: i4.MatCardContent, selector: "mat-card-content, [mat-card-content], [matCardContent]" }, { type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { type: i1$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i4$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i11.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i4$2.MatPrefix, selector: "[matPrefix]" }, { type: i4.MatCardActions, selector: "mat-card-actions", inputs: ["align"], exportAs: ["matCardActions"] }, { type: i5$1.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { type: i5$1.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }] });
|
|
5277
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: BuildPipelineFormComponent, decorators: [{
|
|
5225
5278
|
type: Component,
|
|
5226
|
-
args: [{ selector: 'lcu-devops-source-control-form', template: "<form class=\"form-card\" [formGroup]=\"DevOpsSourceControlFormGroup\" (ngSubmit)=\"SubmitSourceControl()\">\n\n <mat-card class=\"spread\" class=\"sc-card\">\n <mat-card-header>\n <mat-card-title> Source Control </mat-card-title>\n\n <div fxFlex></div>\n\n <mat-icon matSuffix matTooltip=\"Configure source control, DevOps CI/CD, and artifacts.\">\n info_outline\n </mat-icon>\n </mat-card-header>\n\n <mat-card-content>\n <div class=\"card\">\n <mat-form-field class=\"mat-full-width\">\n <mat-select formControlName=\"devOpsActionLookup\" placeholder=\"DevOps Action\"\n [disabled]=\"HostingDetails?.Loading\" (selectionChange)=\"DevOpsActionLookupChanged($event)\">\n <ng-container *ngFor=\"let devOpsActionLookup of DevOpsActionLookups\">\n <mat-option [value]=\"devOpsActionLookup\" *ngIf=\"DevOpsActions[devOpsActionLookup]; let devOpsAction\">\n {{ devOpsAction.Name }}\n </mat-option>\n </ng-container>\n\n <mat-option value=\"\">-- Create New --</mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n <div class=\"card\" *ngIf=\"OrganizationFormControl?.valid || !Loading\">\n <mat-form-field class=\"mat-full-width with-hint margin-bottom\" *ngIf=\"OrganizationOptions?.length > 0\">\n <mat-icon class=\"org-icon\" matPrefix>corporate_fare</mat-icon>\n\n <mat-select [formControlName]=\"SourceControlRoot + 'organization'\" placeholder=\"Organization\"\n (selectionChange)=\"OrganizationChanged($event)\" [disabled]=\"Loading || HostingDetails?.Loading\" required>\n <ng-container *ngFor=\"let orgOpt of OrganizationOptions\">\n <mat-option [value]=\"orgOpt.Name\">\n {{ orgOpt.Name }}\n </mat-option>\n </ng-container>\n </mat-select>\n\n <mat-icon matSuffix (click)=\"RefreshOrganizations()\" matTooltip=\"Refresh Organization\"> refresh </mat-icon>\n\n <a matSuffix href=\"/.oauth/github?oauth-force-edit=true\" target=\"_blank\" color=\"accent\">\n <mat-icon color=\"accent\" matTooltip=\"Re-authorize Organizations\"> launch </mat-icon>\n </a>\n\n <mat-hint>\n If you don't have an organization or would like to create a new one,\n <a href=\"https://github.com/account/organizations/new\" target=\"_blank\">\n start here\n </a>\n </mat-hint>\n </mat-form-field>\n </div>\n\n <div class=\"card\" *ngIf=\"\n RepositoryFormControl?.valid ||\n (OrganizationFormControl?.valid && !Loading)\n \">\n <mat-form-field class=\"mat-full-width\">\n <mat-icon class=\"org-icon\" matPrefix>description</mat-icon>\n\n <mat-select [formControlName]=\"SourceControlRoot + 'repository'\" [placeholder]=\"\n OrganizationFormControl?.valid\n ? 'Repository'\n : 'Repository (select organization first)'\n \" [disabled]=\"\n !OrganizationFormControl?.valid || Loading || HostingDetails?.Loading\n \" (selectionChange)=\"RepositoryChanged($event)\" *ngIf=\"!CreatingRepository\" required>\n <ng-container *ngFor=\"let repoOpt of RepositoryOptions\">\n <mat-option [value]=\"repoOpt.Name\">\n {{ repoOpt.Name }}\n </mat-option>\n </ng-container>\n </mat-select>\n\n <input matInput placeholder=\"Repository (creates new if does not exist)\"\n [formControlName]=\"SourceControlRoot + 'repository'\" *ngIf=\"CreatingRepository\"\n [fxHide]=\"Loading || HostingDetails?.Loading\" required />\n\n <mat-icon matSuffix (click)=\"CreateRepository()\" [fxHide]=\"Loading || HostingDetails?.Loading\"\n *ngIf=\"!CreatingRepository && OrganizationFormControl?.valid\">\n add_circle\n </mat-icon>\n\n <button mat-button type=\"button\" (click)=\"SaveRepository()\"\n *ngIf=\"CreatingRepository && RepositoryFormControl?.valid\">\n\n <mat-icon matSuffix color=\"primary\">\n save\n </mat-icon>\n </button>\n\n <button mat-button type=\"button\" (click)=\"CancelCreateRepository()\" *ngIf=\"CreatingRepository\">\n\n <mat-icon matSuffix>\n cancel\n </mat-icon>\n </button>\n </mat-form-field>\n </div>\n\n <div class=\"card\" *ngIf=\"\n (BranchesFormControl?.valid ||\n (OrganizationFormControl?.valid &&\n RepositoryFormControl?.valid &&\n !Loading)) &&\n !CreatingRepository &&\n UseBranches\n \">\n <mat-form-field class=\"mat-full-width\">\n <mat-icon class=\"org-icon\" matPrefix>account_tree</mat-icon>\n\n <mat-label>Selected Branches</mat-label>\n\n <mat-autocomplete (optionSelected)=\"BranchOptionSelected($event)\" #branchOptions=\"matAutocomplete\">\n <ng-container *ngFor=\"let branchOpt of BranchOptions\">\n <mat-option [value]=\"branchOpt.Name\">\n {{ branchOpt.Name }}\n </mat-option>\n </ng-container>\n </mat-autocomplete>\n\n <mat-chip-list #selectedBranches>\n <mat-chip [removable]=\"true\" (removed)=\"RemoveBranchOption(selBranch)\"\n *ngFor=\"let selBranch of SelectedBranches\">\n {{ selBranch }}\n <mat-icon matChipRemove>cancel</mat-icon>\n </mat-chip>\n\n <input matInput placeholder=\"New Branch...\" [formControlName]=\"SourceControlRoot + 'branches'\" #branches\n [matAutocomplete]=\"branchOptions\" [matChipInputFor]=\"selectedBranches\"\n [matChipInputSeparatorKeyCodes]=\"SeparatorKeysCodes\" [matChipInputAddOnBlur]=\"true\"\n (matChipInputTokenEnd)=\"AddBranchOption($event)\" [disabled]=\"Loading || HostingDetails?.Loading\"\n required />\n </mat-chip-list>\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width with-hint\" [fxShow]=\"SelectedBranches?.length > 1\">\n <mat-icon class=\"org-icon\" matPrefix>account_tree</mat-icon>\n\n <mat-select [formControlName]=\"SourceControlRoot + 'mainBranch'\" placeholder=\"Main Branch\"\n [disabled]=\"Loading || HostingDetails?.Loading\" (selectionChange)=\"MainBranchChanged($event)\" required>\n <ng-container *ngFor=\"let branch of SelectedBranches\">\n <mat-option [value]=\"branch\">\n {{ branch }}\n </mat-option>\n </ng-container>\n </mat-select>\n\n <mat-icon matSuffix (click)=\"RefreshOrganizations()\"> refresh </mat-icon>\n\n <a matSuffix mat-icon-button href=\"/.oauth/github?oauth-force-edit=true\" target=\"_blank\" color=\"accent\">\n <mat-icon matTooltip=\"Re-authorize Organizations\" color=\"accent\"> launch </mat-icon>\n </a>\n\n <mat-hint>\n If you don't have an organization or would like to create a new one,\n <a href=\"https://github.com/account/organizations/new\" target=\"_blank\">\n start here\n </a>\n </mat-hint>\n </mat-form-field>\n </div>\n\n <div class=\"card\" *ngIf=\"\n (BuildPathFormControl?.valid ||\n (OrganizationFormControl?.valid &&\n RepositoryFormControl?.valid &&\n !Loading)) &&\n !CreatingRepository &&\n UseBuildPath\n \">\n <mat-form-field class=\"mat-full-width with-hint\">\n <mat-icon class=\"org-icon\" matPrefix>build</mat-icon>\n\n <mat-select [formControlName]=\"SourceControlRoot + 'buildPath'\" placeholder=\"Build Path\"\n [disabled]=\"Loading || BuildPathDisabled\" (selectionChange)=\"BuildPathChanged($event)\" required>\n <ng-container *ngFor=\"let buildPath of BuildPathOptions\">\n <mat-option [value]=\"buildPath\">\n {{ buildPath }}\n </mat-option>\n </ng-container>\n </mat-select>\n\n <mat-hint>\n The build path identifies which build action to use for your\n configuration.\n </mat-hint>\n </mat-form-field>\n </div>\n\n <div *ngIf=\"Loading\">\n <div class=\"spread\">\n <lcu-loader style=\"margin: auto\" [loading]=\"true\"></lcu-loader>\n\n <div class=\"margin-3\">\n <h4 class=\"mat-title\" *ngIf=\"!OrganizationFormControl?.valid\">\n Loading organizations\n </h4>\n\n <h4 class=\"mat-title\" *ngIf=\"\n OrganizationFormControl?.valid && !RepositoryFormControl?.valid\n \">\n Loading repositories\n </h4>\n\n <h4 class=\"mat-title\" *ngIf=\"RepositoryFormControl?.valid && !BranchesFormControl?.valid\">\n Loading branches\n </h4>\n\n <h4 class=\"mat-title\" *ngIf=\"\n (RepositoryFormControl?.valid || BranchesFormControl?.valid) &&\n !BuildPathFormControl?.valid\n \">\n Loading build paths\n </h4>\n </div>\n </div>\n </div>\n <!-- </div> -->\n\n </mat-card-content>\n <mat-card-actions fxLayoutAlign=\"center center\">\n\n <button \n mat-raised-button \n *ngIf=\"!State?.Loading\"\n type=\"submit\" \n fxFlex=\"100%\" \n color=\"primary\" \n [disabled]=\"!DevOpsSourceControlFormGroup.valid || !DevOpsSourceControlFormGroup.dirty\">\n <mat-icon>save</mat-icon>\n Save Source Control\n </button>\n <lcu-loader [loading]=\"State?.Loading\"></lcu-loader>\n \n </mat-card-actions>\n </mat-card>\n</form>", styles: [".form-card,.sc-card{width:100%}.margin-bottom{margin-bottom:15px}\n"] }]
|
|
5227
|
-
}], ctorParameters: function () { return [{ type:
|
|
5279
|
+
args: [{ selector: 'lcu-build-pipeline-form', template: "<form class=\"form-card\" [formGroup]=\"BuildPipelineFormGroup\" (ngSubmit)=\"SubmitBuildPipeline()\">\n <mat-card\n class=\"spread\" \n >\n <mat-card-header>\n <mat-card-title> Build Pipeline </mat-card-title>\n\n <mat-hint>\n Changes made here are reflected for all sources using this\n DevOpsAction\n </mat-hint>\n </mat-card-header>\n\n <mat-card-content>\n\n\n <div *ngIf=\"!HostingDetails?.Loading\">\n <mat-form-field class=\"mat-full-width\">\n <mat-select\n formControlName=\"buildPipeline\"\n placeholder=\"Build Pipeline\"\n [disabled]=\"Disabled\"\n (selectionChange)=\"BuildPipelineChanged()\"\n required\n >\n <ng-container\n *ngFor=\"let hostOption of HostingDetails?.HostingOptions; let i = index\"\n >\n <mat-option [value]=\"hostOption.Lookup\">\n {{ hostOption.Name }}\n </mat-option>\n </ng-container>\n </mat-select>\n \n <mat-hint>\n <ng-container *ngFor=\"let hostOption of HostingDetails?.HostingOptions\">\n <span *ngIf=\"BuildPipeline == hostOption?.Lookup\">\n {{ hostOption.Description }}\n </span>\n </ng-container>\n </mat-hint>\n </mat-form-field>\n \n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n formControlName=\"devOpsActionName\"\n placeholder=\"Name of DevOps Action\"\n required=\"true\"\n />\n </mat-form-field>\n \n <ng-container *ngFor=\"let input of SelectedHostingOption?.Inputs\">\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n [formControlName]=\"input.Lookup\"\n [placeholder]=\"input.Placeholder\"\n [required]=\"input.Required\"\n />\n \n <mat-hint>{{ input.Hint }}</mat-hint>\n </mat-form-field>\n </ng-container>\n \n <div *ngIf=\"BuildPipeline == 'npm-release'\">\n <mat-form-field class=\"mat-full-width with-hint padding-bottom-4\">\n <mat-icon matPrefix>security</mat-icon>\n \n <input\n id=\"npm-token\"\n matInput\n type=\"text\"\n formControlName=\"npmToken\"\n placeholder=\"NPM token\"\n [required]=\"!Disabled\"\n style=\"-webkit-text-security: disc;\"\n />\n <mat-hint>\n Securely publish to NPM, provide an NPM Personal Access Token (PAT) with publish access to the organization used for your NPM packages. \n Learn how to create and view access tokens \n <a\n href=\"https://docs.npmjs.com/creating-and-viewing-access-tokens\"\n target=\"_blank\"\n >\n here.\n </a>\n </mat-hint>\n </mat-form-field>\n </div>\n </div>\n \n <div *ngIf=\"HostingDetails?.Loading\">\n <div class=\"spread\">\n <lcu-loader style=\"margin: auto\" [loading]=\"true\"></lcu-loader>\n \n <div class=\"margin-3\">\n <h4 class=\"mat-title\">Loading hosting details</h4>\n </div>\n </div>\n </div>\n </mat-card-content>\n <mat-card-actions fxLayoutAlign=\"center center\">\n\n <button \n *ngIf=\"!State?.Loading\"\n mat-raised-button \n type=\"submit\" \n fxFlex=\"100%\" \n color=\"primary\" \n [disabled]=\"!BuildPipelineFormGroup.valid || !BuildPipelineFormGroup.dirty\">\n <mat-icon>save</mat-icon>\n Save Build Pipeline\n </button>\n <lcu-loader [loading]=\"State?.Loading\"></lcu-loader> \n \n </mat-card-actions>\n </mat-card>\n</form>\n", styles: [""] }]
|
|
5280
|
+
}], ctorParameters: function () { return [{ type: EaCService }, { type: i1$1.FormBuilder }, { type: ApplicationsFlowService }]; }, propDecorators: { DevOpsActionLookup: [{
|
|
5228
5281
|
type: Input,
|
|
5229
|
-
args: ['
|
|
5282
|
+
args: ['devops-action-lookup']
|
|
5283
|
+
}], Disabled: [{
|
|
5284
|
+
type: Input,
|
|
5285
|
+
args: ['disabled']
|
|
5230
5286
|
}], Environment: [{
|
|
5231
5287
|
type: Input,
|
|
5232
5288
|
args: ['environment']
|
|
5233
5289
|
}], EnvironmentLookup: [{
|
|
5234
5290
|
type: Input,
|
|
5235
5291
|
args: ['environment-lookup']
|
|
5236
|
-
}],
|
|
5292
|
+
}], HostingDetails: [{
|
|
5293
|
+
type: Input,
|
|
5294
|
+
args: ['hosting-details']
|
|
5295
|
+
}], ResponseEvent: [{
|
|
5237
5296
|
type: Output,
|
|
5238
|
-
args: ['
|
|
5239
|
-
}], BranchesInput: [{
|
|
5240
|
-
type: ViewChild,
|
|
5241
|
-
args: ['branches']
|
|
5297
|
+
args: ['response-event']
|
|
5242
5298
|
}] } });
|
|
5243
5299
|
|
|
5244
|
-
class SourceControlDialogComponent {
|
|
5245
|
-
constructor(dialogRef, data) {
|
|
5246
|
-
this.dialogRef = dialogRef;
|
|
5247
|
-
this.data = data;
|
|
5248
|
-
}
|
|
5249
|
-
ngOnInit() {
|
|
5250
|
-
}
|
|
5251
|
-
CloseDialog() {
|
|
5252
|
-
this.dialogRef.close();
|
|
5253
|
-
}
|
|
5254
|
-
}
|
|
5255
|
-
SourceControlDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: SourceControlDialogComponent, deps: [{ token: i1$4.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
|
|
5256
|
-
SourceControlDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: SourceControlDialogComponent, selector: "lcu-source-control-dialog", ngImport: i0, template: "\n<div class=\"dialog-header\" fxLayoutAlign=\"end center\">\n <button mat-icon-button (click)=\"CloseDialog()\">\n <mat-icon>cancel</mat-icon>\n </button>\n</div>\n\n<div fxLayoutAlign=\"center center\">\n <lcu-devops-source-control-form\n [environment]=\"data.environment\"\n [environment-lookup]=\"data.environmentLookup\"\n [editing-source-control-lookup]=\"data.scLookup\">\n </lcu-devops-source-control-form>\n</div>", styles: [".dialog-header{width:100%}\n"], components: [{ type: i2$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: DevopsSourceControlFormComponent, selector: "lcu-devops-source-control-form", inputs: ["editing-source-control-lookup", "environment", "environment-lookup"], outputs: ["save-status-event"] }], directives: [{ type: i5$1.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }] });
|
|
5257
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: SourceControlDialogComponent, decorators: [{
|
|
5258
|
-
type: Component,
|
|
5259
|
-
args: [{ selector: 'lcu-source-control-dialog', template: "\n<div class=\"dialog-header\" fxLayoutAlign=\"end center\">\n <button mat-icon-button (click)=\"CloseDialog()\">\n <mat-icon>cancel</mat-icon>\n </button>\n</div>\n\n<div fxLayoutAlign=\"center center\">\n <lcu-devops-source-control-form\n [environment]=\"data.environment\"\n [environment-lookup]=\"data.environmentLookup\"\n [editing-source-control-lookup]=\"data.scLookup\">\n </lcu-devops-source-control-form>\n</div>", styles: [".dialog-header{width:100%}\n"] }]
|
|
5260
|
-
}], ctorParameters: function () {
|
|
5261
|
-
return [{ type: i1$4.MatDialogRef }, { type: undefined, decorators: [{
|
|
5262
|
-
type: Inject,
|
|
5263
|
-
args: [MAT_DIALOG_DATA]
|
|
5264
|
-
}] }];
|
|
5265
|
-
} });
|
|
5266
|
-
|
|
5267
5300
|
class BuildPipelineDialogComponent {
|
|
5268
5301
|
constructor(dialogRef, data) {
|
|
5269
5302
|
this.dialogRef = dialogRef;
|