@lowcodeunit/applications-flow-common 1.33.100-lets-get-social-ish → 1.33.104-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/bundles/lowcodeunit-applications-flow-common.umd.js +367 -138
- package/bundles/lowcodeunit-applications-flow-common.umd.js.map +1 -1
- package/bundles/lowcodeunit-applications-flow-common.umd.min.js +2 -2
- package/bundles/lowcodeunit-applications-flow-common.umd.min.js.map +1 -1
- package/esm2015/lib/applications-flow.module.js +8 -4
- package/esm2015/lib/controls/build-pipeline-form/build-pipeline-form.component.js +107 -30
- package/esm2015/lib/controls/devops-source-control-form/devops-source-control-form.component.js +27 -31
- package/esm2015/lib/controls/edit-application-form/edit-application-form.component.js +60 -0
- package/esm2015/lib/controls/processor-details-form/processor-details-form.component.js +89 -46
- package/esm2015/lib/controls/security-toggle/security-toggle.component.js +14 -24
- package/esm2015/lib/controls/source-control-form/source-control-form.component.js +8 -6
- package/esm2015/lib/dialogs/build-pipeline-dialog/build-pipeline-dialog.component.js +2 -2
- package/esm2015/lib/dialogs/source-control-dialog/source-control-dialog.component.js +2 -2
- package/esm2015/lib/elements/slotted-card/slotted-card.component.js +6 -6
- package/esm2015/lib/services/applications-flow.service.js +6 -1
- package/esm2015/lowcodeunit-applications-flow-common.js +2 -1
- package/fesm2015/lowcodeunit-applications-flow-common.js +309 -139
- package/fesm2015/lowcodeunit-applications-flow-common.js.map +1 -1
- package/lib/applications-flow.module.d.ts.map +1 -1
- package/lib/controls/build-pipeline-form/build-pipeline-form.component.d.ts +12 -2
- package/lib/controls/build-pipeline-form/build-pipeline-form.component.d.ts.map +1 -1
- package/lib/controls/devops-source-control-form/devops-source-control-form.component.d.ts +9 -9
- package/lib/controls/devops-source-control-form/devops-source-control-form.component.d.ts.map +1 -1
- package/lib/controls/edit-application-form/edit-application-form.component.d.ts +17 -0
- package/lib/controls/edit-application-form/edit-application-form.component.d.ts.map +1 -0
- package/lib/controls/processor-details-form/processor-details-form.component.d.ts +23 -8
- package/lib/controls/processor-details-form/processor-details-form.component.d.ts.map +1 -1
- package/lib/controls/security-toggle/security-toggle.component.d.ts +3 -1
- package/lib/controls/security-toggle/security-toggle.component.d.ts.map +1 -1
- package/lib/controls/source-control-form/source-control-form.component.d.ts +4 -5
- package/lib/controls/source-control-form/source-control-form.component.d.ts.map +1 -1
- package/lib/dialogs/build-pipeline-dialog/build-pipeline-dialog.component.d.ts +1 -0
- package/lib/dialogs/build-pipeline-dialog/build-pipeline-dialog.component.d.ts.map +1 -1
- package/lib/dialogs/source-control-dialog/source-control-dialog.component.d.ts.map +1 -1
- package/lib/elements/slotted-card/slotted-card.component.d.ts +3 -3
- package/lib/elements/slotted-card/slotted-card.component.d.ts.map +1 -1
- package/lib/services/applications-flow.service.d.ts +1 -0
- package/lib/services/applications-flow.service.d.ts.map +1 -1
- package/lowcodeunit-applications-flow-common.d.ts +1 -0
- package/lowcodeunit-applications-flow-common.d.ts.map +1 -1
- package/lowcodeunit-applications-flow-common.metadata.json +1 -1
- package/package.json +1 -1
|
@@ -248,6 +248,11 @@ class ApplicationsFlowService {
|
|
|
248
248
|
headers: this.loadHeaders(),
|
|
249
249
|
});
|
|
250
250
|
}
|
|
251
|
+
NewLoadProjectHostingDetails() {
|
|
252
|
+
return this.http.get(`${this.apiRoot}/api/lowcodeunit/manage/projects/hosting/details`, {
|
|
253
|
+
headers: this.loadHeaders(),
|
|
254
|
+
});
|
|
255
|
+
}
|
|
251
256
|
SaveEnterpriseAsCode(eac) {
|
|
252
257
|
return this.http.post(`${this.apiRoot}/api/lowcodeunit/manage/eac`, eac, {
|
|
253
258
|
headers: this.loadHeaders(),
|
|
@@ -3567,18 +3572,18 @@ class SlottedCardComponent {
|
|
|
3567
3572
|
SlottedCardComponent.decorators = [
|
|
3568
3573
|
{ type: Component, args: [{
|
|
3569
3574
|
selector: 'lcu-slotted-card',
|
|
3570
|
-
template: "<mat-card class=\"col-info-card\">\n <mat-card-header fxLayoutAlign=\"space-between center\">\n <mat-card-title class=\"card-title\">{{ Title }}</mat-card-title>\n <mat-icon class=\"header-icon\">{{ Icon }}</mat-icon>\n </mat-card-header>\n \n <mat-card-content>\n\n <div class=\"slot-main-container\">\n\n <div class=\"header-description\">{{ MainSlotDescription }}</div>\n\n <div class=\"slot-main\">\n <ng-content></ng-content>\n </div>\n \n </div>\n\n <div *ngIf=\"SecondarySlotDescription\" class=\"slot-secondary-container\">\n\n <div class=\"header-description\">{{ SecondarySlotDescription }}</div>\n\n <div class=\"slot-secondary\">\n <ng-content select=\"[secondary]\"></ng-content>\n </div>\n \n </div>\n \n </mat-card-content>\n\n <mat-card-actions *ngIf=\"ActionText\" fxLayoutAlign=\"center\">\n
|
|
3571
|
-
styles: [".col-info-card{border:2px solid #d3d3d3;margin:20px;padding:0}.header-icon{margin-right:10px}.card-title{font-size:30px;margin-bottom:0}.header-description{background-color:#d3d3d3;margin-left:-2px;padding:10px}mat-card-actions{margin-bottom:0!important;margin-left:-1px!important;margin-right:0!important}.slotted-card-action-btn{
|
|
3575
|
+
template: "<mat-card class=\"col-info-card\">\n <mat-card-header fxLayoutAlign=\"space-between center\">\n <mat-card-title class=\"card-title\">{{ Title }}</mat-card-title>\n <mat-icon class=\"header-icon\">{{ Icon }}</mat-icon>\n </mat-card-header>\n \n <mat-card-content>\n\n <div class=\"slot-main-container\">\n\n <div class=\"header-description\">{{ MainSlotDescription }}</div>\n\n <div class=\"slot-main\">\n <ng-content></ng-content>\n </div>\n \n </div>\n\n <div *ngIf=\"SecondarySlotDescription\" class=\"slot-secondary-container\">\n\n <div class=\"header-description\">{{ SecondarySlotDescription }}</div>\n\n <div class=\"slot-secondary\">\n <ng-content select=\"[secondary]\"></ng-content>\n </div>\n \n </div>\n \n </mat-card-content>\n\n <mat-card-actions *ngIf=\"ActionText\" fxLayoutAlign=\"center\">\n <a mat-button \n *ngIf=\"ActionPath\" \n class=\"slotted-card-action-btn\" \n [href]=\"ActionPath\" \n color=\"primary\">{{ ActionText }}\n </a>\n\n <a mat-button \n *ngIf=\"!ActionPath\" \n class=\"slotted-card-action-btn\" \n (click)=\"MainActionClickEvent()\" \n color=\"primary\">\n {{ ActionText }}\n </a>\n\n </mat-card-actions>\n\n </mat-card>\n\n\n",
|
|
3576
|
+
styles: [".col-info-card{border:2px solid #d3d3d3;margin:20px;padding:0}.header-icon{margin-right:10px}.card-title{font-size:30px;margin-bottom:0}.header-description{background-color:#d3d3d3;margin-left:-2px;padding:10px}mat-card-actions{margin-bottom:0!important;margin-left:-1px!important;margin-right:0!important}.slotted-card-action-btn{width:100%}"]
|
|
3572
3577
|
},] }
|
|
3573
3578
|
];
|
|
3574
3579
|
SlottedCardComponent.ctorParameters = () => [];
|
|
3575
3580
|
SlottedCardComponent.propDecorators = {
|
|
3576
|
-
|
|
3581
|
+
ActionText: [{ type: Input, args: ['action-text',] }],
|
|
3582
|
+
ActionPath: [{ type: Input, args: ['action-path',] }],
|
|
3577
3583
|
Icon: [{ type: Input, args: ['icon',] }],
|
|
3578
3584
|
MainSlotDescription: [{ type: Input, args: ['main-slot-description',] }],
|
|
3585
|
+
Title: [{ type: Input, args: ['title',] }],
|
|
3579
3586
|
SecondarySlotDescription: [{ type: Input, args: ['secondary-slot-description',] }],
|
|
3580
|
-
ActionText: [{ type: Input, args: ['action-text',] }],
|
|
3581
|
-
ActionPath: [{ type: Input, args: ['action-path',] }],
|
|
3582
3587
|
MainActionClicked: [{ type: Output, args: ['main-action-clicked',] }]
|
|
3583
3588
|
};
|
|
3584
3589
|
|
|
@@ -3840,39 +3845,28 @@ CardCarouselComponent.propDecorators = {
|
|
|
3840
3845
|
class SecurityToggleComponent {
|
|
3841
3846
|
constructor(formBldr) {
|
|
3842
3847
|
this.formBldr = formBldr;
|
|
3848
|
+
this.SaveFormEvent = new EventEmitter;
|
|
3843
3849
|
}
|
|
3844
3850
|
get IsPrivateFormControl() {
|
|
3845
3851
|
var _a;
|
|
3846
3852
|
return (_a = this.SecurityFormGroup) === null || _a === void 0 ? void 0 : _a.controls.isPrivate;
|
|
3847
3853
|
}
|
|
3854
|
+
get IsTriggerSignInFormControl() {
|
|
3855
|
+
var _a;
|
|
3856
|
+
return (_a = this.SecurityFormGroup) === null || _a === void 0 ? void 0 : _a.controls.isTriggerSignIn;
|
|
3857
|
+
}
|
|
3848
3858
|
ngOnInit() {
|
|
3849
3859
|
this.setupSecurityFormGroup();
|
|
3850
3860
|
}
|
|
3851
3861
|
SecuritySubmit() {
|
|
3852
|
-
|
|
3862
|
+
//save the security settings
|
|
3863
|
+
console.log("submitting security values: ", this.SecurityFormGroup.value);
|
|
3864
|
+
this.SaveFormEvent.emit(this.SecurityFormGroup.value);
|
|
3853
3865
|
}
|
|
3854
3866
|
setupSecurityFormGroup() {
|
|
3855
3867
|
var _a, _b;
|
|
3856
3868
|
this.ProcessorType = ((_b = (_a = this.EditingApplication) === null || _a === void 0 ? void 0 : _a.Processor) === null || _b === void 0 ? void 0 : _b.Type) || '';
|
|
3857
|
-
|
|
3858
|
-
// this.SecurityFormGroup = this.formBldr.group({
|
|
3859
|
-
// name: [this.EditingApplication.Application?.Name, Validators.required],
|
|
3860
|
-
// description: [
|
|
3861
|
-
// this.EditingApplication.Application?.Description,
|
|
3862
|
-
// Validators.required,
|
|
3863
|
-
// ],
|
|
3864
|
-
// route: [
|
|
3865
|
-
// this.EditingApplication.LookupConfig?.PathRegex.replace('.*', '') ||
|
|
3866
|
-
// '/',
|
|
3867
|
-
// Validators.required,
|
|
3868
|
-
// ],
|
|
3869
|
-
// // priority: [
|
|
3870
|
-
// // this.EditingApplication.Application?.Priority || 10000,
|
|
3871
|
-
// // Validators.required,
|
|
3872
|
-
// // ],
|
|
3873
|
-
// procType: [this.ProcessorType, [Validators.required]],
|
|
3874
|
-
// });
|
|
3875
|
-
}
|
|
3869
|
+
this.SecurityFormGroup = this.formBldr.group({});
|
|
3876
3870
|
this.setupSecurityForm();
|
|
3877
3871
|
}
|
|
3878
3872
|
setupSecurityForm() {
|
|
@@ -3884,7 +3878,7 @@ class SecurityToggleComponent {
|
|
|
3884
3878
|
SecurityToggleComponent.decorators = [
|
|
3885
3879
|
{ type: Component, args: [{
|
|
3886
3880
|
selector: 'lcu-security-toggle',
|
|
3887
|
-
template: "<form class=\"security-form\" [formGroup]=\"SecurityFormGroup\" (ngSubmit)=\"SecuritySubmit()\">\n <mat-card class=\"spread flow-card\">\n <mat-card-header>\n <mat-card-title> Security Settings </mat-card-title>\n\n <div fxFlex></div>\n\n <mat-slide-toggle\n formControlName=\"isPrivate\"\n matTooltip=\"Is Secure Application?\"\n >\n </mat-slide-toggle>\n\n <mat-icon\n matSuffix\n matTooltip=\"A Secured Application is one that requires the user to be authenticated to use the application. The application is hosted behind an identity wall.\"\n >\n info_outline\n </mat-icon>\n </mat-card-header>\n\n <mat-card-content>\n <div>\n <div *ngIf=\"IsPrivateFormControl.value\">\n <div>\n <mat-slide-toggle formControlName=\"isTriggerSignIn\">\n Is Trigger Sign In Application?\n </mat-slide-toggle>\n\n <mat-icon\n matSuffix\n matTooltip=\"A Trigger Sign In Application will direct the user to sign in if they are not already.\"\n >\n info_outline\n </mat-icon>\n </div>\n </div>\n </div>\n </mat-card-content>\n
|
|
3881
|
+
template: "<form class=\"security-form\" [formGroup]=\"SecurityFormGroup\" (ngSubmit)=\"SecuritySubmit()\">\n <mat-card class=\"spread flow-card\">\n <mat-card-header>\n <mat-card-title> Security Settings </mat-card-title>\n\n <div fxFlex></div>\n\n <mat-slide-toggle\n formControlName=\"isPrivate\"\n matTooltip=\"Is Secure Application?\"\n >\n </mat-slide-toggle>\n\n <mat-icon\n matSuffix\n matTooltip=\"A Secured Application is one that requires the user to be authenticated to use the application. The application is hosted behind an identity wall.\"\n >\n info_outline\n </mat-icon>\n </mat-card-header>\n\n <mat-card-content>\n <div>\n <div *ngIf=\"IsPrivateFormControl.value\">\n <div>\n <mat-slide-toggle formControlName=\"isTriggerSignIn\">\n Is Trigger Sign In Application?\n </mat-slide-toggle>\n\n <mat-icon\n matSuffix\n matTooltip=\"A Trigger Sign In Application will direct the user to sign in if they are not already.\"\n >\n info_outline\n </mat-icon>\n </div>\n </div>\n </div>\n </mat-card-content>\n\n <mat-card-actions fxLayoutAlign=\"center center\">\n\n <button \n mat-raised-button \n type=\"submit\" \n fxFlex=\"100%\" \n color=\"primary\" \n [disabled]=\"!SecurityFormGroup.valid || !SecurityFormGroup.dirty\">\n <mat-icon>save</mat-icon>\n Save Settings\n </button>\n\n </mat-card-actions>\n \n </mat-card>\n</form>\n",
|
|
3888
3882
|
styles: ["::ng-deep .mat-tooltip{color:#000!important}"]
|
|
3889
3883
|
},] }
|
|
3890
3884
|
];
|
|
@@ -3892,14 +3886,20 @@ SecurityToggleComponent.ctorParameters = () => [
|
|
|
3892
3886
|
{ type: FormBuilder }
|
|
3893
3887
|
];
|
|
3894
3888
|
SecurityToggleComponent.propDecorators = {
|
|
3895
|
-
EditingApplication: [{ type: Input, args: ['editing-application',] }]
|
|
3889
|
+
EditingApplication: [{ type: Input, args: ['editing-application',] }],
|
|
3890
|
+
SaveFormEvent: [{ type: Output, args: ['save-form-event',] }]
|
|
3896
3891
|
};
|
|
3897
3892
|
|
|
3898
3893
|
class ProcessorDetailsFormComponent {
|
|
3899
|
-
constructor(formBldr) {
|
|
3894
|
+
constructor(formBldr, eacSvc) {
|
|
3900
3895
|
this.formBldr = formBldr;
|
|
3901
|
-
|
|
3896
|
+
this.eacSvc = eacSvc;
|
|
3902
3897
|
this.redirectTooltip = '';
|
|
3898
|
+
this.SaveFormEvent = new EventEmitter;
|
|
3899
|
+
}
|
|
3900
|
+
get APIRootFormControl() {
|
|
3901
|
+
var _a;
|
|
3902
|
+
return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.apiRoot;
|
|
3903
3903
|
}
|
|
3904
3904
|
get BuildFormControl() {
|
|
3905
3905
|
var _a;
|
|
@@ -3909,17 +3909,40 @@ class ProcessorDetailsFormComponent {
|
|
|
3909
3909
|
var _a;
|
|
3910
3910
|
return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.clientId;
|
|
3911
3911
|
}
|
|
3912
|
+
get ClientSecretFormControl() {
|
|
3913
|
+
var _a;
|
|
3914
|
+
return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.clientSecret;
|
|
3915
|
+
}
|
|
3912
3916
|
get DefaultFileFormControl() {
|
|
3913
3917
|
var _a;
|
|
3914
3918
|
return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.defaultFile;
|
|
3915
3919
|
}
|
|
3920
|
+
get DefaultSourceControl() {
|
|
3921
|
+
var _a, _b, _c, _d;
|
|
3922
|
+
return {
|
|
3923
|
+
Organization: (_b = (_a = this.EditingApplication) === null || _a === void 0 ? void 0 : _a.LowCodeUnit) === null || _b === void 0 ? void 0 : _b.Organization,
|
|
3924
|
+
Repository: (_d = (_c = this.EditingApplication) === null || _c === void 0 ? void 0 : _c.LowCodeUnit) === null || _d === void 0 ? void 0 : _d.Repository,
|
|
3925
|
+
};
|
|
3926
|
+
}
|
|
3916
3927
|
get InboundPathFormControl() {
|
|
3917
3928
|
var _a;
|
|
3918
3929
|
return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.inboundPath;
|
|
3919
3930
|
}
|
|
3920
|
-
get
|
|
3931
|
+
get MethodsFormControl() {
|
|
3921
3932
|
var _a;
|
|
3922
|
-
return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.
|
|
3933
|
+
return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.methods;
|
|
3934
|
+
}
|
|
3935
|
+
get PackageFormControl() {
|
|
3936
|
+
var _a;
|
|
3937
|
+
return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.package;
|
|
3938
|
+
}
|
|
3939
|
+
get PermanentFormControl() {
|
|
3940
|
+
var _a;
|
|
3941
|
+
return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.permanent;
|
|
3942
|
+
}
|
|
3943
|
+
get PreserveMethodFormControl() {
|
|
3944
|
+
var _a;
|
|
3945
|
+
return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.preserveMethod;
|
|
3923
3946
|
}
|
|
3924
3947
|
get RedirectFormControl() {
|
|
3925
3948
|
var _a;
|
|
@@ -3937,16 +3960,28 @@ class ProcessorDetailsFormComponent {
|
|
|
3937
3960
|
var _a;
|
|
3938
3961
|
return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.spaRoot;
|
|
3939
3962
|
}
|
|
3940
|
-
get
|
|
3963
|
+
get TokenLookupFormControl() {
|
|
3941
3964
|
var _a;
|
|
3942
|
-
return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.
|
|
3965
|
+
return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.tokenLookup;
|
|
3943
3966
|
}
|
|
3944
|
-
get
|
|
3967
|
+
get VersionFormControl() {
|
|
3945
3968
|
var _a;
|
|
3946
|
-
return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.
|
|
3969
|
+
return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.version;
|
|
3970
|
+
}
|
|
3971
|
+
get ZipFileFormControl() {
|
|
3972
|
+
var _a;
|
|
3973
|
+
return (_a = this.ProcessorDetailsFormGroup) === null || _a === void 0 ? void 0 : _a.controls.zipFile;
|
|
3947
3974
|
}
|
|
3948
3975
|
ngOnInit() {
|
|
3949
|
-
this.
|
|
3976
|
+
if (!this.EditingApplication) {
|
|
3977
|
+
this.CreateNewApplication();
|
|
3978
|
+
}
|
|
3979
|
+
else {
|
|
3980
|
+
this.setupProcessorDetailsForm();
|
|
3981
|
+
}
|
|
3982
|
+
}
|
|
3983
|
+
CreateNewApplication() {
|
|
3984
|
+
this.SetEditingApplication(Guid.CreateRaw());
|
|
3950
3985
|
}
|
|
3951
3986
|
DetermineTooltipText() {
|
|
3952
3987
|
let permanentValue = this.PermanentFormControl.value;
|
|
@@ -3964,7 +3999,13 @@ class ProcessorDetailsFormComponent {
|
|
|
3964
3999
|
this.redirectTooltip = '308 – Permanent and Preserve';
|
|
3965
4000
|
}
|
|
3966
4001
|
}
|
|
4002
|
+
SetEditingApplication(appLookup) {
|
|
4003
|
+
this.EditingApplicationLookup = appLookup;
|
|
4004
|
+
this.setupProcessorDetailsForm();
|
|
4005
|
+
}
|
|
3967
4006
|
SubmitProcessorDetails() {
|
|
4007
|
+
console.log("submitting proc details: ", this.ProcessorDetailsFormGroup.value);
|
|
4008
|
+
this.SaveFormEvent.emit(this.ProcessorDetailsFormGroup.value);
|
|
3968
4009
|
}
|
|
3969
4010
|
ProcessorTypeChanged(event) {
|
|
3970
4011
|
this.ProcessorType = event.value;
|
|
@@ -4030,26 +4071,15 @@ class ProcessorDetailsFormComponent {
|
|
|
4030
4071
|
}
|
|
4031
4072
|
}
|
|
4032
4073
|
setupProcessorDetailsForm() {
|
|
4033
|
-
var _a, _b
|
|
4074
|
+
var _a, _b;
|
|
4034
4075
|
this.ProcessorType = ((_b = (_a = this.EditingApplication) === null || _a === void 0 ? void 0 : _a.Processor) === null || _b === void 0 ? void 0 : _b.Type) || '';
|
|
4076
|
+
console.log("EDITING APP = ", this.EditingApplication);
|
|
4035
4077
|
if (this.EditingApplication != null) {
|
|
4036
4078
|
this.ProcessorDetailsFormGroup = this.formBldr.group({
|
|
4037
|
-
|
|
4038
|
-
description: [
|
|
4039
|
-
(_d = this.EditingApplication.Application) === null || _d === void 0 ? void 0 : _d.Description,
|
|
4040
|
-
Validators.required,
|
|
4041
|
-
],
|
|
4042
|
-
route: [
|
|
4043
|
-
((_e = this.EditingApplication.LookupConfig) === null || _e === void 0 ? void 0 : _e.PathRegex.replace('.*', '')) ||
|
|
4044
|
-
'/',
|
|
4045
|
-
Validators.required,
|
|
4046
|
-
],
|
|
4047
|
-
// priority: [
|
|
4048
|
-
// this.EditingApplication.Application?.Priority || 10000,
|
|
4049
|
-
// Validators.required,
|
|
4050
|
-
// ],
|
|
4051
|
-
procType: [this.ProcessorType, [Validators.required]],
|
|
4079
|
+
procType: [this.ProcessorType, [Validators.required]]
|
|
4052
4080
|
});
|
|
4081
|
+
this.setupDfsForm();
|
|
4082
|
+
this.setupLcuTypeSubForm();
|
|
4053
4083
|
}
|
|
4054
4084
|
}
|
|
4055
4085
|
setupLCUGitHubForm() {
|
|
@@ -4060,22 +4090,22 @@ class ProcessorDetailsFormComponent {
|
|
|
4060
4090
|
var _a;
|
|
4061
4091
|
this.ProcessorDetailsFormGroup.addControl('applicationId', this.formBldr.control(((_a = this.EditingApplication.LowCodeUnit) === null || _a === void 0 ? void 0 : _a.ApplicationID) || '', [Validators.required]));
|
|
4062
4092
|
}
|
|
4063
|
-
setupLCUNPMForm() {
|
|
4064
|
-
|
|
4065
|
-
|
|
4066
|
-
|
|
4067
|
-
|
|
4068
|
-
|
|
4069
|
-
|
|
4070
|
-
|
|
4071
|
-
|
|
4072
|
-
|
|
4073
|
-
|
|
4074
|
-
|
|
4075
|
-
|
|
4076
|
-
|
|
4077
|
-
|
|
4078
|
-
}
|
|
4093
|
+
// protected setupLCUNPMForm(): void {
|
|
4094
|
+
// this.ApplicationFormGroup.addControl(
|
|
4095
|
+
// 'package',
|
|
4096
|
+
// this.formBldr.control(
|
|
4097
|
+
// this.EditingApplication.LowCodeUnit?.Package || '',
|
|
4098
|
+
// [Validators.required]
|
|
4099
|
+
// )
|
|
4100
|
+
// );
|
|
4101
|
+
// this.ApplicationFormGroup.addControl(
|
|
4102
|
+
// 'version',
|
|
4103
|
+
// this.formBldr.control(
|
|
4104
|
+
// this.EditingApplication.LowCodeUnit?.Version || '',
|
|
4105
|
+
// [Validators.required]
|
|
4106
|
+
// )
|
|
4107
|
+
// );
|
|
4108
|
+
// }
|
|
4079
4109
|
setupLCUSPAForm() {
|
|
4080
4110
|
var _a;
|
|
4081
4111
|
this.ProcessorDetailsFormGroup.addControl('spaRoot', this.formBldr.control(((_a = this.EditingApplication.LowCodeUnit) === null || _a === void 0 ? void 0 : _a.SPARoot) || '', [Validators.required]));
|
|
@@ -4147,20 +4177,26 @@ class ProcessorDetailsFormComponent {
|
|
|
4147
4177
|
ProcessorDetailsFormComponent.decorators = [
|
|
4148
4178
|
{ type: Component, args: [{
|
|
4149
4179
|
selector: 'lcu-processor-details-form',
|
|
4150
|
-
template: "<form class=\"processor-details-form\" [formGroup]=\"ProcessorDetailsFormGroup\" (ngSubmit)=\"SubmitProcessorDetails()\">\n<mat-card class=\"spread flow-card\">\n <mat-card-header>\n <mat-card-title> Processor Details </mat-card-title>\n </mat-card-header>\n\n <mat-card-content>\n <mat-form-field class=\"mat-full-width\">\n <mat-select\n placeholder=\"Type\"\n formControlName=\"procType\"\n (selectionChange)=\"ProcessorTypeChanged($event)\"\n required\n >\n <mat-option value=\"DFS\">View Package</mat-option>\n\n <mat-option value=\"Redirect\">Redirect</mat-option>\n\n <mat-option value=\"Proxy\">Proxy</mat-option>\n\n <mat-option value=\"OAuth\">OAuth</mat-option>\n </mat-select>\n </mat-form-field>\n\n <div [ngSwitch]=\"ProcessorType\">\n <div *ngSwitchCase=\"'DFS'\">\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Default File\"\n formControlName=\"defaultFile\"\n required\n />\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width\">\n <mat-select\n placeholder=\"Type\"\n formControlName=\"lcuType\"\n (selectionChange)=\"LCUTypeChanged($event)\"\n required\n >\n <mat-option value=\"NPM\">NPM</mat-option>\n\n <mat-option value=\"GitHub\">GitHub</mat-option>\n\n <!-- <mat-option value=\"Zip\">Zip</mat-option> -->\n </mat-select>\n </mat-form-field>\n\n <div [ngSwitch]=\"LCUType\">\n <div *ngSwitchCase=\"'GitHub'\">\n <lcu-source-control-form-controls\n [build-path]=\"EditingApplication?.LowCodeUnit?.Path\"\n [form-group]=\"ProcessorDetailsFormGroup\"\n [source-control]=\"DefaultSourceControl\"\n [use-branches]=\"false\"\n [use-build-path]=\"true\"\n ></lcu-source-control-form-controls>\n\n <mat-form-field\n class=\"mat-full-width\"\n *ngIf=\"\n SourceControlFormControls?.RepositoryFormControl?.valid\n \"\n >\n <input\n matInput\n placeholder=\"Build\"\n formControlName=\"build\"\n required\n />\n\n <mat-hint>\n Current Build:\n {{ EditingApplication?.LowCodeUnit?.CurrentBuild }}\n </mat-hint>\n </mat-form-field>\n </div>\n\n <div *ngSwitchCase=\"'NPM'\">\n <lcu-npm-package-select\n [npm-package]=\"EditingApplication?.LowCodeUnit?.Package\"\n [npm-package-version]=\"\n EditingApplication?.LowCodeUnit?.Version\n \"\n [form-group]=\"ProcessorDetailsFormGroup\"\n ></lcu-npm-package-select>\n\n <mat-hint>\n Current Version:\n {{ EditingApplication?.LowCodeUnit?.CurrentVersion }}\n </mat-hint>\n </div>\n </div>\n </div>\n\n <div *ngSwitchCase=\"'OAuth'\">\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Scopes (space separated)\"\n formControlName=\"scopes\"\n required\n />\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Token Lookup\"\n formControlName=\"tokenLookup\"\n required\n />\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width\">\n <mat-select\n placeholder=\"Type\"\n formControlName=\"lcuType\"\n (selectionChange)=\"LCUTypeChanged($event)\"\n required\n >\n <mat-option value=\"GitHubOAuth\">GitHub</mat-option>\n </mat-select>\n </mat-form-field>\n\n <div [ngSwitch]=\"LCUType\">\n <div *ngSwitchCase=\"'GitHubOAuth'\">\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Client ID\"\n formControlName=\"clientId\"\n required\n />\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Client Secret\"\n formControlName=\"clientSecret\"\n required\n />\n </mat-form-field>\n </div>\n </div>\n </div>\n\n <div *ngSwitchCase=\"'Proxy'\">\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Inbound Path\"\n formControlName=\"inboundPath\"\n required\n />\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width\">\n <mat-select\n placeholder=\"Type\"\n formControlName=\"lcuType\"\n (selectionChange)=\"LCUTypeChanged($event)\"\n required\n >\n <mat-option value=\"API\">API</mat-option>\n\n <mat-option value=\"SPA\">Single Page Application</mat-option>\n </mat-select>\n </mat-form-field>\n\n <div [ngSwitch]=\"LCUType\">\n <div *ngSwitchCase=\"'API'\">\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"API Root\"\n formControlName=\"apiRoot\"\n required\n />\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Allowed Methods (separate with spaces)\"\n formControlName=\"methods\"\n />\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Security ({header}~{value})\"\n formControlName=\"security\"\n required\n />\n </mat-form-field>\n </div>\n\n <div *ngSwitchCase=\"'SPA'\">\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"SPA Root\"\n formControlName=\"spaRoot\"\n required\n />\n </mat-form-field>\n </div>\n </div>\n </div>\n\n <div *ngSwitchCase=\"'Redirect'\">\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Redirect URL\"\n formControlName=\"redirect\"\n required\n />\n </mat-form-field>\n\n <div>\n <mat-slide-toggle \n class=\"spread\" \n formControlName=\"permanent\">\n Is Permanent?\n </mat-slide-toggle>\n\n <mat-slide-toggle\n class=\"spread\"\n formControlName=\"preserveMethod\"\n >\n Preserve Method?\n </mat-slide-toggle>\n\n <mat-icon\n class=\"spread\"\n matSuffix\n (mouseenter)=\"DetermineTooltipText()\"\n matTooltip={{redirectTooltip}}\n >\n info_outline\n </mat-icon>\n\n <!-- <mat-icon\n *ngIf=\"!IsPermanent && !IsPreserve\"\n\n class=\"spread\"\n matSuffix\n matTooltip=\"302 \u2013 Not Permanent and Not Preserve\"\n >\n info_outline\n </mat-icon> -->\n\n <!-- <mat-icon\n *ngIf=\"!IsPermanent && IsPreserve\"\n class=\"spread\"\n matSuffix\n matTooltip=\"307 \u2013 Not Permanent and Preserve\"\n >\n info_outline\n </mat-icon> -->\n\n <!-- <mat-icon\n *ngIf=\"IsPermanent && IsPreserve\"\n class=\"spread\"\n matSuffix\n matTooltip=\"308 \u2013 Permanent and Preserve\"\n >\n info_outline\n </mat-icon> -->\n\n \n\n <!-- <mat-icon\n class=\"spread\"\n matSuffix\n matTooltip=\"Values used to control the redirect type. Permanent and Not Preserve = 301; Not Permanent and Not Preserve = 302; Permanent and Preserve = 308; Not Permanent and Not Preserve = 307;\"\n >\n info_outline\n </mat-icon> -->\n </div>\n </div>\n </div>\n </mat-card-content>\n <mat-card-actions>\n
|
|
4180
|
+
template: "<form class=\"processor-details-form\" [formGroup]=\"ProcessorDetailsFormGroup\" (ngSubmit)=\"SubmitProcessorDetails()\">\n<mat-card class=\"spread flow-card\">\n <mat-card-header>\n <mat-card-title> Processor Details </mat-card-title>\n </mat-card-header>\n\n <mat-card-content>\n <mat-form-field class=\"mat-full-width\">\n <mat-select\n placeholder=\"Type\"\n formControlName=\"procType\"\n (selectionChange)=\"ProcessorTypeChanged($event)\"\n required\n >\n <mat-option value=\"DFS\">View Package</mat-option>\n\n <mat-option value=\"Redirect\">Redirect</mat-option>\n\n <mat-option value=\"Proxy\">Proxy</mat-option>\n\n <mat-option value=\"OAuth\">OAuth</mat-option>\n </mat-select>\n </mat-form-field>\n\n <div [ngSwitch]=\"ProcessorType\">\n <div *ngSwitchCase=\"'DFS'\">\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Default File\"\n formControlName=\"defaultFile\"\n required\n />\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width\">\n <mat-select\n placeholder=\"Type\"\n formControlName=\"lcuType\"\n (selectionChange)=\"LCUTypeChanged($event)\"\n required\n >\n <mat-option value=\"NPM\">NPM</mat-option>\n\n <mat-option value=\"GitHub\">GitHub</mat-option>\n\n <!-- <mat-option value=\"Zip\">Zip</mat-option> -->\n </mat-select>\n </mat-form-field>\n\n <div [ngSwitch]=\"LCUType\">\n <div *ngSwitchCase=\"'GitHub'\">\n <lcu-source-control-form-controls\n [build-path]=\"EditingApplication?.LowCodeUnit?.Path\"\n [form-group]=\"ProcessorDetailsFormGroup\"\n [source-control]=\"DefaultSourceControl\"\n [use-branches]=\"false\"\n [use-build-path]=\"true\"\n ></lcu-source-control-form-controls>\n\n <mat-form-field\n class=\"mat-full-width\"\n *ngIf=\"\n SourceControlFormControls?.RepositoryFormControl?.valid\n \"\n >\n <input\n matInput\n placeholder=\"Build\"\n formControlName=\"build\"\n required\n />\n\n <mat-hint>\n Current Build:\n {{ EditingApplication?.LowCodeUnit?.CurrentBuild }}\n </mat-hint>\n </mat-form-field>\n </div>\n\n <div *ngSwitchCase=\"'NPM'\">\n <lcu-npm-package-select\n [npm-package]=\"EditingApplication?.LowCodeUnit?.Package\"\n [npm-package-version]=\"\n EditingApplication?.LowCodeUnit?.Version\n \"\n [form-group]=\"ProcessorDetailsFormGroup\"\n ></lcu-npm-package-select>\n\n <mat-hint>\n Current Version:\n {{ EditingApplication?.LowCodeUnit?.CurrentVersion }}\n </mat-hint>\n </div>\n </div>\n </div>\n\n <div *ngSwitchCase=\"'OAuth'\">\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Scopes (space separated)\"\n formControlName=\"scopes\"\n required\n />\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Token Lookup\"\n formControlName=\"tokenLookup\"\n required\n />\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width\">\n <mat-select\n placeholder=\"Type\"\n formControlName=\"lcuType\"\n (selectionChange)=\"LCUTypeChanged($event)\"\n required\n >\n <mat-option value=\"GitHubOAuth\">GitHub</mat-option>\n </mat-select>\n </mat-form-field>\n\n <div [ngSwitch]=\"LCUType\">\n <div *ngSwitchCase=\"'GitHubOAuth'\">\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Client ID\"\n formControlName=\"clientId\"\n required\n />\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Client Secret\"\n formControlName=\"clientSecret\"\n required\n />\n </mat-form-field>\n </div>\n </div>\n </div>\n\n <div *ngSwitchCase=\"'Proxy'\">\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Inbound Path\"\n formControlName=\"inboundPath\"\n required\n />\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width\">\n <mat-select\n placeholder=\"Type\"\n formControlName=\"lcuType\"\n (selectionChange)=\"LCUTypeChanged($event)\"\n required\n >\n <mat-option value=\"API\">API</mat-option>\n\n <mat-option value=\"SPA\">Single Page Application</mat-option>\n </mat-select>\n </mat-form-field>\n\n <div [ngSwitch]=\"LCUType\">\n <div *ngSwitchCase=\"'API'\">\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"API Root\"\n formControlName=\"apiRoot\"\n required\n />\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Allowed Methods (separate with spaces)\"\n formControlName=\"methods\"\n />\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Security ({header}~{value})\"\n formControlName=\"security\"\n required\n />\n </mat-form-field>\n </div>\n\n <div *ngSwitchCase=\"'SPA'\">\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"SPA Root\"\n formControlName=\"spaRoot\"\n required\n />\n </mat-form-field>\n </div>\n </div>\n </div>\n\n <div *ngSwitchCase=\"'Redirect'\">\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Redirect URL\"\n formControlName=\"redirect\"\n required\n />\n </mat-form-field>\n\n <div>\n <mat-slide-toggle \n class=\"spread\" \n formControlName=\"permanent\">\n Is Permanent?\n </mat-slide-toggle>\n\n <mat-slide-toggle\n class=\"spread\"\n formControlName=\"preserveMethod\"\n >\n Preserve Method?\n </mat-slide-toggle>\n\n <mat-icon\n class=\"spread\"\n matSuffix\n (mouseenter)=\"DetermineTooltipText()\"\n matTooltip={{redirectTooltip}}\n >\n info_outline\n </mat-icon>\n\n <!-- <mat-icon\n *ngIf=\"!IsPermanent && !IsPreserve\"\n\n class=\"spread\"\n matSuffix\n matTooltip=\"302 \u2013 Not Permanent and Not Preserve\"\n >\n info_outline\n </mat-icon> -->\n\n <!-- <mat-icon\n *ngIf=\"!IsPermanent && IsPreserve\"\n class=\"spread\"\n matSuffix\n matTooltip=\"307 \u2013 Not Permanent and Preserve\"\n >\n info_outline\n </mat-icon> -->\n\n <!-- <mat-icon\n *ngIf=\"IsPermanent && IsPreserve\"\n class=\"spread\"\n matSuffix\n matTooltip=\"308 \u2013 Permanent and Preserve\"\n >\n info_outline\n </mat-icon> -->\n\n \n\n <!-- <mat-icon\n class=\"spread\"\n matSuffix\n matTooltip=\"Values used to control the redirect type. Permanent and Not Preserve = 301; Not Permanent and Not Preserve = 302; Permanent and Preserve = 308; Not Permanent and Not Preserve = 307;\"\n >\n info_outline\n </mat-icon> -->\n </div>\n </div>\n </div>\n </mat-card-content>\n <mat-card-actions fxLayoutAlign=\"center center\">\n\n <button \n mat-raised-button \n type=\"submit\" \n fxFlex=\"100%\" \n color=\"primary\" \n [disabled]=\"!ProcessorDetailsFormGroup.valid || !ProcessorDetailsFormGroup.dirty\">\n <mat-icon>save</mat-icon>\n Save Processor Details\n </button>\n\n </mat-card-actions>\n</mat-card>\n</form>\n \n",
|
|
4151
4181
|
styles: [""]
|
|
4152
4182
|
},] }
|
|
4153
4183
|
];
|
|
4154
4184
|
ProcessorDetailsFormComponent.ctorParameters = () => [
|
|
4155
|
-
{ type: FormBuilder }
|
|
4185
|
+
{ type: FormBuilder },
|
|
4186
|
+
{ type: EaCService }
|
|
4156
4187
|
];
|
|
4157
4188
|
ProcessorDetailsFormComponent.propDecorators = {
|
|
4158
|
-
EditingApplication: [{ type: Input, args: ['editing-application',] }]
|
|
4189
|
+
EditingApplication: [{ type: Input, args: ['editing-application',] }],
|
|
4190
|
+
EditingApplicationLookup: [{ type: Input, args: ['editing-application-lookup',] }],
|
|
4191
|
+
ProjectLookup: [{ type: Input, args: ['project-lookup',] }],
|
|
4192
|
+
SaveFormEvent: [{ type: Output, args: ['save-form-event',] }],
|
|
4193
|
+
SourceControlFormControls: [{ type: ViewChild, args: [SourceControlFormControlsComponent,] }]
|
|
4159
4194
|
};
|
|
4160
4195
|
|
|
4161
4196
|
class SourceControlFormComponent {
|
|
4162
4197
|
constructor(formBldr) {
|
|
4163
4198
|
this.formBldr = formBldr;
|
|
4199
|
+
this.SaveFormEvent = new EventEmitter;
|
|
4164
4200
|
}
|
|
4165
4201
|
get HasBuildFormControl() {
|
|
4166
4202
|
var _a;
|
|
@@ -4174,7 +4210,6 @@ class SourceControlFormComponent {
|
|
|
4174
4210
|
return Object.keys(this.SourceControls || {});
|
|
4175
4211
|
}
|
|
4176
4212
|
get SourceControls() {
|
|
4177
|
-
console.log("Environment: ", this.Environment);
|
|
4178
4213
|
return this.Environment.Sources || {};
|
|
4179
4214
|
}
|
|
4180
4215
|
ngOnInit() {
|
|
@@ -4185,11 +4220,14 @@ class SourceControlFormComponent {
|
|
|
4185
4220
|
console.log("sourceControlLookupChanged: ", event);
|
|
4186
4221
|
}
|
|
4187
4222
|
SubmitSourceControl() {
|
|
4223
|
+
console.log("submitting source control: ", this.SourceControlFormGroup.value);
|
|
4224
|
+
this.SaveFormEvent.emit(this.SourceControlFormGroup.value);
|
|
4188
4225
|
}
|
|
4189
4226
|
//HELPER
|
|
4190
4227
|
setupSourceControlForm() {
|
|
4191
4228
|
var _a, _b;
|
|
4192
4229
|
this.ProcessorType = ((_b = (_a = this.EditingApplication) === null || _a === void 0 ? void 0 : _a.Processor) === null || _b === void 0 ? void 0 : _b.Type) || '';
|
|
4230
|
+
this.SourceControlFormGroup = this.formBldr.group({});
|
|
4193
4231
|
this.setupBuildForm();
|
|
4194
4232
|
}
|
|
4195
4233
|
setupBuildForm() {
|
|
@@ -4201,7 +4239,7 @@ class SourceControlFormComponent {
|
|
|
4201
4239
|
SourceControlFormComponent.decorators = [
|
|
4202
4240
|
{ type: Component, args: [{
|
|
4203
4241
|
selector: 'lcu-source-control-form',
|
|
4204
|
-
template: "<form class=\"source-control-form\" [formGroup]=\"SourceControlFormGroup\" (ngSubmit)=\"SubmitSourceControl()\">\n\n<mat-card class=\"spread flow-card\" *ngIf=\"ProcessorType != 'Redirect'\">\n <mat-card-header>\n <mat-card-title *ngIf=\"!HasBuildFormControl.value\">\n Build & Source\n </mat-card-title>\n\n <mat-card-title *ngIf=\"HasBuildFormControl.value\">\n Source Control\n </mat-card-title>\n\n <div fxFlex></div>\n\n <mat-slide-toggle\n formControlName=\"hasBuild\"\n matTooltip=\"Has Build?\"\n >\n </mat-slide-toggle>\n\n <mat-icon\n matSuffix\n matTooltip=\"Configure source control, DevOps CI/CD, and artifacts.\"\n >\n info_outline\n </mat-icon>\n </mat-card-header>\n\n <mat-card-content>\n <mat-form-field\n class=\"mat-full-width\"\n *ngIf=\"\n HasBuildFormControl.value && SourceControlLookups?.length > 0\n \"\n >\n <mat-select\n formControlName=\"sourceControlLookup\"\n placeholder=\"Source Control\"\n (selectionChange)=\"SourceControlLookupChanged($event)\"\n [disabled]=\"\n SourceControlFormControls?.Loading || HostingDetails?.Loading\n \"\n >\n <ng-container\n *ngFor=\"let srcCtrlLookup of SourceControlLookups\"\n >\n <mat-option\n [value]=\"srcCtrlLookup\"\n *ngIf=\"SourceControls[srcCtrlLookup]; let srcCtrl\"\n >\n {{ srcCtrl.Name }}\n </mat-option>\n </ng-container>\n </mat-select>\n\n <div *ngIf=\"HasBuildFormControl?.value\">\n <h3>\n @{{\n SourceControlFormControls?.OrganizationFormControl?.value ||\n SourceControl?.Organization\n }}/{{\n SourceControlFormControls?.RepositoryFormControl?.value ||\n SourceControl?.Repository\n }}\n </h3>\n\n <p>Organization and Repository pulled from build settings</p>\n\n <mat-hint>\n CurrentBuild:\n {{ EditingApplication?.LowCodeUnit?.CurrentBuild }}\n </mat-hint>\n </div>\n </mat-form-field>\n\n <div *ngIf=\"SourceControlLookups?.length < 0\">\n <h3>\n Create source control locations under the DevOps tab above.\n </h3>\n </div>\n </mat-card-content>\n <mat-card-actions>\n
|
|
4242
|
+
template: "<form class=\"source-control-form\" [formGroup]=\"SourceControlFormGroup\" (ngSubmit)=\"SubmitSourceControl()\">\n\n<mat-card class=\"spread flow-card\" *ngIf=\"ProcessorType != 'Redirect'\">\n <mat-card-header>\n <mat-card-title *ngIf=\"!HasBuildFormControl.value\">\n Build & Source\n </mat-card-title>\n\n <mat-card-title *ngIf=\"HasBuildFormControl.value\">\n Source Control\n </mat-card-title>\n\n <div fxFlex></div>\n\n <mat-slide-toggle\n formControlName=\"hasBuild\"\n matTooltip=\"Has Build?\"\n >\n </mat-slide-toggle>\n\n <mat-icon\n matSuffix\n matTooltip=\"Configure source control, DevOps CI/CD, and artifacts.\"\n >\n info_outline\n </mat-icon>\n </mat-card-header>\n\n <mat-card-content>\n <mat-form-field\n class=\"mat-full-width\"\n *ngIf=\"\n HasBuildFormControl.value && SourceControlLookups?.length > 0\n \"\n >\n <mat-select\n formControlName=\"sourceControlLookup\"\n placeholder=\"Source Control\"\n (selectionChange)=\"SourceControlLookupChanged($event)\"\n [disabled]=\"\n SourceControlFormControls?.Loading || HostingDetails?.Loading\n \"\n >\n <ng-container\n *ngFor=\"let srcCtrlLookup of SourceControlLookups\"\n >\n <mat-option\n [value]=\"srcCtrlLookup\"\n *ngIf=\"SourceControls[srcCtrlLookup]; let srcCtrl\"\n >\n {{ srcCtrl.Name }}\n </mat-option>\n </ng-container>\n </mat-select>\n\n <div *ngIf=\"HasBuildFormControl?.value\">\n <h3>\n @{{\n SourceControlFormControls?.OrganizationFormControl?.value ||\n SourceControl?.Organization\n }}/{{\n SourceControlFormControls?.RepositoryFormControl?.value ||\n SourceControl?.Repository\n }}\n </h3>\n\n <p>Organization and Repository pulled from build settings</p>\n\n <mat-hint>\n CurrentBuild:\n {{ EditingApplication?.LowCodeUnit?.CurrentBuild }}\n </mat-hint>\n </div>\n </mat-form-field>\n\n <div *ngIf=\"SourceControlLookups?.length < 0\">\n <h3>\n Create source control locations under the DevOps tab above.\n </h3>\n </div>\n </mat-card-content>\n <mat-card-actions fxLayoutAlign=\"center center\">\n\n <button \n mat-raised-button \n type=\"submit\" \n fxFlex=\"100%\" \n color=\"primary\" \n [disabled]=\"!SourceControlFormGroup.valid || !SourceControlFormGroup.dirty\">\n <mat-icon>save</mat-icon>\n Save\n </button>\n \n </mat-card-actions>\n </mat-card>\n</form>\n",
|
|
4205
4243
|
styles: [""]
|
|
4206
4244
|
},] }
|
|
4207
4245
|
];
|
|
@@ -4211,11 +4249,12 @@ SourceControlFormComponent.ctorParameters = () => [
|
|
|
4211
4249
|
SourceControlFormComponent.propDecorators = {
|
|
4212
4250
|
EditingApplication: [{ type: Input, args: ['editing-application',] }],
|
|
4213
4251
|
Environment: [{ type: Input, args: ['environment',] }],
|
|
4214
|
-
|
|
4252
|
+
SaveFormEvent: [{ type: Output, args: ['save-form-event',] }]
|
|
4215
4253
|
};
|
|
4216
4254
|
|
|
4217
4255
|
class BuildPipelineFormComponent {
|
|
4218
|
-
constructor(formBuilder, appsFlowSvc) {
|
|
4256
|
+
constructor(eacSvc, formBuilder, appsFlowSvc) {
|
|
4257
|
+
this.eacSvc = eacSvc;
|
|
4219
4258
|
this.formBuilder = formBuilder;
|
|
4220
4259
|
this.appsFlowSvc = appsFlowSvc;
|
|
4221
4260
|
this.HostingDetails = new ProjectHostingDetails();
|
|
@@ -4250,6 +4289,9 @@ class BuildPipelineFormComponent {
|
|
|
4250
4289
|
get DevOpsActions() {
|
|
4251
4290
|
return this.Environment.DevOpsActions || {};
|
|
4252
4291
|
}
|
|
4292
|
+
get DevOpsActionNameFormControl() {
|
|
4293
|
+
return this.BuildPipelineFormGroup.get('devOpsActionName');
|
|
4294
|
+
}
|
|
4253
4295
|
get EditingSourceControl() {
|
|
4254
4296
|
var _a, _b;
|
|
4255
4297
|
let sc = ((_a = this.Environment) === null || _a === void 0 ? void 0 : _a.Sources) ? (_b = this.Environment) === null || _b === void 0 ? void 0 : _b.Sources[this.EditingSourceControlLookup] : null;
|
|
@@ -4258,11 +4300,22 @@ class BuildPipelineFormComponent {
|
|
|
4258
4300
|
}
|
|
4259
4301
|
return sc;
|
|
4260
4302
|
}
|
|
4303
|
+
get NPMTokenFormControl() {
|
|
4304
|
+
return this.BuildPipelineFormGroup.get('npmToken');
|
|
4305
|
+
}
|
|
4261
4306
|
// (ho) => ho.Lookup === this.BuildPipeline
|
|
4262
4307
|
get SelectedHostingOption() {
|
|
4263
4308
|
var _a, _b;
|
|
4264
4309
|
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);
|
|
4265
4310
|
}
|
|
4311
|
+
get SelectedHostingOptionInputControlValues() {
|
|
4312
|
+
var _a, _b;
|
|
4313
|
+
return (_b = (_a = this.SelectedHostingOption) === null || _a === void 0 ? void 0 : _a.Inputs) === null || _b === void 0 ? void 0 : _b.reduce((prev, cur) => {
|
|
4314
|
+
const res = Object.assign({}, prev);
|
|
4315
|
+
res[cur.Lookup] = this.BuildPipelineFormGroup.controls[cur.Lookup].value;
|
|
4316
|
+
return res;
|
|
4317
|
+
}, {});
|
|
4318
|
+
}
|
|
4266
4319
|
get SourceControlLookups() {
|
|
4267
4320
|
return Object.keys(this.SourceControls || {});
|
|
4268
4321
|
}
|
|
@@ -4270,22 +4323,14 @@ class BuildPipelineFormComponent {
|
|
|
4270
4323
|
return this.Environment.Sources || {};
|
|
4271
4324
|
}
|
|
4272
4325
|
ngOnInit() {
|
|
4273
|
-
var _a, _b, _c;
|
|
4274
4326
|
this.BuildPipelineFormGroup = this.formBuilder.group({});
|
|
4275
|
-
this.loadProjectHostingDetails();
|
|
4276
|
-
console.log("ARTIFACT: ", this.Artifact);
|
|
4277
|
-
// this.BuildPipeline ||
|
|
4278
|
-
// github-artifacts-release is this.HostingDetails?.HostingOptions[0]?.Lookup
|
|
4279
|
-
this.BuildPipeline =
|
|
4280
|
-
((_a = this.HostingDetails) === null || _a === void 0 ? void 0 : _a.HostingOptions) ? (_c = (_b = this.HostingDetails) === null || _b === void 0 ? void 0 : _b.HostingOptions[0]) === null || _c === void 0 ? void 0 : _c.Lookup : '';
|
|
4281
|
-
console.log("Build Pipeline HERE= ", this.BuildPipeline);
|
|
4282
4327
|
if (this.BuildPipelineFormGroup != null) {
|
|
4283
4328
|
this.BuildPipelineFormGroup.removeControl('hostingDetails');
|
|
4284
4329
|
}
|
|
4285
4330
|
this.BuildPipelineFormGroup.addControl('hostingDetails', this.formBuilder.group({
|
|
4286
4331
|
buildPipeline: [this.BuildPipeline, [Validators.required]],
|
|
4287
4332
|
}));
|
|
4288
|
-
this.
|
|
4333
|
+
this.loadProjectHostingDetails();
|
|
4289
4334
|
}
|
|
4290
4335
|
//API METHODS
|
|
4291
4336
|
BuildPipelineChanged() {
|
|
@@ -4294,17 +4339,81 @@ class BuildPipelineFormComponent {
|
|
|
4294
4339
|
this.BuildPipeline = (_b = this.BuildPipelineFormControl) === null || _b === void 0 ? void 0 : _b.value;
|
|
4295
4340
|
this.setupControlsForForm();
|
|
4296
4341
|
}
|
|
4342
|
+
SubmitBuildPipeline() {
|
|
4343
|
+
console.log("submitting build pipeline: ", this.BuildPipelineFormGroup.value);
|
|
4344
|
+
}
|
|
4345
|
+
SaveEnvironment() {
|
|
4346
|
+
var _a;
|
|
4347
|
+
const saveEnvReq = {
|
|
4348
|
+
Environment: Object.assign(Object.assign({}, this.Environment), { Artifacts: this.Environment.Artifacts || {}, DevOpsActions: this.Environment.DevOpsActions || {}, Secrets: this.Environment.Secrets || {}, Sources: this.Environment.Sources || {} }),
|
|
4349
|
+
EnvironmentLookup: this.EnvironmentLookup,
|
|
4350
|
+
EnterpriseDataTokens: {},
|
|
4351
|
+
};
|
|
4352
|
+
let artifactLookup;
|
|
4353
|
+
let artifact = Object.assign(Object.assign({}, this.Artifact), this.SelectedHostingOptionInputControlValues);
|
|
4354
|
+
if (!this.ArtifactLookup) {
|
|
4355
|
+
artifactLookup = Guid.CreateRaw();
|
|
4356
|
+
artifact = Object.assign(Object.assign({}, artifact), { Type: this.SelectedHostingOption
|
|
4357
|
+
.ArtifactType, Name: this.SelectedHostingOption.Name, NPMRegistry: 'https://registry.npmjs.org/' });
|
|
4358
|
+
}
|
|
4359
|
+
else {
|
|
4360
|
+
artifactLookup = this.ArtifactLookup;
|
|
4361
|
+
}
|
|
4362
|
+
saveEnvReq.Environment.Artifacts[artifactLookup] = artifact;
|
|
4363
|
+
let devOpsActionLookup;
|
|
4364
|
+
if (!this.DevOpsActionLookup) {
|
|
4365
|
+
devOpsActionLookup = Guid.CreateRaw();
|
|
4366
|
+
const doa = Object.assign(Object.assign({}, this.DevOpsAction), { ArtifactLookups: [artifactLookup], Name: this.DevOpsActionNameFormControl.value, Path: this.SelectedHostingOption.Path, Templates: this.SelectedHostingOption.Templates });
|
|
4367
|
+
if ((_a = this.NPMTokenFormControl) === null || _a === void 0 ? void 0 : _a.value) {
|
|
4368
|
+
const secretLookup = 'npm-access-token';
|
|
4369
|
+
doa.SecretLookups = [secretLookup];
|
|
4370
|
+
saveEnvReq.Environment.Secrets[secretLookup] = {
|
|
4371
|
+
Name: 'NPM Access Token',
|
|
4372
|
+
DataTokenLookup: secretLookup,
|
|
4373
|
+
KnownAs: 'NPM_TOKEN',
|
|
4374
|
+
};
|
|
4375
|
+
saveEnvReq.EnterpriseDataTokens[secretLookup] = {
|
|
4376
|
+
Name: saveEnvReq.Environment.Secrets[secretLookup].Name,
|
|
4377
|
+
Description: saveEnvReq.Environment.Secrets[secretLookup].Name,
|
|
4378
|
+
Value: this.NPMTokenFormControl.value,
|
|
4379
|
+
};
|
|
4380
|
+
}
|
|
4381
|
+
saveEnvReq.Environment.DevOpsActions[devOpsActionLookup] = doa;
|
|
4382
|
+
}
|
|
4383
|
+
else {
|
|
4384
|
+
devOpsActionLookup = this.DevOpsActionLookup;
|
|
4385
|
+
const doa = Object.assign(Object.assign({}, this.DevOpsAction), { Name: this.DevOpsActionNameFormControl.value });
|
|
4386
|
+
saveEnvReq.Environment.DevOpsActions[devOpsActionLookup] = doa;
|
|
4387
|
+
}
|
|
4388
|
+
// let source: EaCSourceControl = {
|
|
4389
|
+
// ...this.EditingSourceControl,
|
|
4390
|
+
// Branches: this.SourceControlFormControls.SelectedBranches,
|
|
4391
|
+
// MainBranch: this.SourceControlFormControls.MainBranchFormControl.value,
|
|
4392
|
+
// };
|
|
4393
|
+
// source = {
|
|
4394
|
+
// ...source,
|
|
4395
|
+
// Type: 'GitHub',
|
|
4396
|
+
// Name: this.EditingSourceControlLookup,
|
|
4397
|
+
// DevOpsActionTriggerLookups: [devOpsActionLookup],
|
|
4398
|
+
// Organization:
|
|
4399
|
+
// this.SourceControlFormControls.OrganizationFormControl.value,
|
|
4400
|
+
// Repository: this.SourceControlFormControls.RepositoryFormControl.value,
|
|
4401
|
+
// };
|
|
4402
|
+
// const scLookup = `github://${source.Organization}/${source.Repository}`;
|
|
4403
|
+
// saveEnvReq.Environment.Sources[scLookup] = source;
|
|
4404
|
+
this.eacSvc.SaveEnvironmentAsCode(saveEnvReq);
|
|
4405
|
+
}
|
|
4297
4406
|
// Helpers
|
|
4298
4407
|
setupControlsForForm() {
|
|
4299
|
-
//for (const ctrlName in this.BuildPipelineFormGroup.controls) {
|
|
4300
|
-
//devOpsAction doesn't exist
|
|
4301
|
-
//removes hosting details
|
|
4302
|
-
// if (ctrlName !== 'buildPipeline' && ctrlName !== 'devOpsAction') {
|
|
4303
|
-
// console.log("removing control: ", ctrlName)
|
|
4304
|
-
// this.BuildPipelineFormGroup.removeControl(ctrlName);
|
|
4305
|
-
// }
|
|
4306
|
-
//}
|
|
4307
4408
|
var _a, _b, _c, _d, _e, _f;
|
|
4409
|
+
for (const ctrlName in this.BuildPipelineFormGroup.controls) {
|
|
4410
|
+
//devOpsAction doesn't exist
|
|
4411
|
+
//removes hosting details
|
|
4412
|
+
if (ctrlName !== 'buildPipeline' && ctrlName !== 'devOpsAction') {
|
|
4413
|
+
console.log("removing control: ", ctrlName);
|
|
4414
|
+
this.BuildPipelineFormGroup.removeControl(ctrlName);
|
|
4415
|
+
}
|
|
4416
|
+
}
|
|
4308
4417
|
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]));
|
|
4309
4418
|
(_d = (_c = this.SelectedHostingOption) === null || _c === void 0 ? void 0 : _c.Inputs) === null || _d === void 0 ? void 0 : _d.forEach((input) => {
|
|
4310
4419
|
const validators = input.Required ? [Validators.required] : [];
|
|
@@ -4313,9 +4422,7 @@ class BuildPipelineFormComponent {
|
|
|
4313
4422
|
// this.FormGroup.controls[input.Lookup].disable();
|
|
4314
4423
|
// }
|
|
4315
4424
|
});
|
|
4316
|
-
debugger;
|
|
4317
4425
|
if (((_e = this.BuildPipelineFormControl) === null || _e === void 0 ? void 0 : _e.value) === 'npm-release') {
|
|
4318
|
-
debugger;
|
|
4319
4426
|
if (!this.BuildPipelineFormGroup.controls.npmToken) {
|
|
4320
4427
|
this.BuildPipelineFormGroup.addControl('npmToken', this.formBuilder.control('', this.Disabled ? [] : [Validators.required]));
|
|
4321
4428
|
if (this.Disabled) {
|
|
@@ -4330,23 +4437,27 @@ class BuildPipelineFormComponent {
|
|
|
4330
4437
|
}
|
|
4331
4438
|
}
|
|
4332
4439
|
loadProjectHostingDetails() {
|
|
4333
|
-
|
|
4440
|
+
this.HostingDetails.Loading = true;
|
|
4334
4441
|
// this.Organization,
|
|
4335
4442
|
// this.Repository,
|
|
4336
4443
|
// this.MainBranch
|
|
4337
|
-
//
|
|
4338
|
-
//
|
|
4339
|
-
//
|
|
4444
|
+
// "powhound4",
|
|
4445
|
+
// "RedwoodCrystals",
|
|
4446
|
+
// "master"
|
|
4340
4447
|
this.appsFlowSvc
|
|
4341
|
-
.
|
|
4448
|
+
.NewLoadProjectHostingDetails()
|
|
4342
4449
|
.subscribe((response) => {
|
|
4450
|
+
var _a, _b, _c;
|
|
4343
4451
|
this.HostingDetails = response.Model;
|
|
4344
4452
|
console.log("response: ", response);
|
|
4345
4453
|
this.HostingDetails.Loading = false;
|
|
4454
|
+
this.BuildPipeline =
|
|
4455
|
+
((_a = this.HostingDetails) === null || _a === void 0 ? void 0 : _a.HostingOptions) ? (_c = (_b = this.HostingDetails) === null || _b === void 0 ? void 0 : _b.HostingOptions[0]) === null || _c === void 0 ? void 0 : _c.Lookup : '';
|
|
4456
|
+
console.log("Build Pipeline HERE= ", this.BuildPipeline);
|
|
4457
|
+
this.setupControlsForForm();
|
|
4346
4458
|
}, (err) => {
|
|
4347
|
-
this.HostingDetails.Loading = false;
|
|
4348
|
-
console.log("hosting details LOADING EERR: ", this.HostingDetails);
|
|
4349
4459
|
console.log("ERR: ", err);
|
|
4460
|
+
this.HostingDetails.Loading = false;
|
|
4350
4461
|
});
|
|
4351
4462
|
console.log("HOSTING DETAILS: ", this.HostingDetails);
|
|
4352
4463
|
}
|
|
@@ -4354,11 +4465,12 @@ class BuildPipelineFormComponent {
|
|
|
4354
4465
|
BuildPipelineFormComponent.decorators = [
|
|
4355
4466
|
{ type: Component, args: [{
|
|
4356
4467
|
selector: 'lcu-build-pipeline-form',
|
|
4357
|
-
template: "<form class=\"form-card\" [formGroup]=\"BuildPipelineFormGroup\">\n <!-- *ngIf=\"EditingSourceControl?.Branches?.length > 0\" -->\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 <ng-container>\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 </ng-container>\n </mat-card-content>\n </mat-card>\n</form>\n",
|
|
4468
|
+
template: "<form class=\"form-card\" [formGroup]=\"BuildPipelineFormGroup\" (ngSubmit)=\"SubmitBuildPipeline()\">\n <!-- *ngIf=\"EditingSourceControl?.Branches?.length > 0\" -->\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 <ng-container>\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 </ng-container>\n </mat-card-content>\n <mat-card-actions fxLayoutAlign=\"center center\">\n\n <button \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 \n </mat-card-actions>\n </mat-card>\n</form>\n",
|
|
4358
4469
|
styles: [""]
|
|
4359
4470
|
},] }
|
|
4360
4471
|
];
|
|
4361
4472
|
BuildPipelineFormComponent.ctorParameters = () => [
|
|
4473
|
+
{ type: EaCService },
|
|
4362
4474
|
{ type: FormBuilder },
|
|
4363
4475
|
{ type: ApplicationsFlowService }
|
|
4364
4476
|
];
|
|
@@ -4366,25 +4478,24 @@ BuildPipelineFormComponent.propDecorators = {
|
|
|
4366
4478
|
BuildPipeline: [{ type: Input, args: ['build-pipeline',] }],
|
|
4367
4479
|
DevOpsActionLookup: [{ type: Input, args: ['devops-action-lookup',] }],
|
|
4368
4480
|
Disabled: [{ type: Input, args: ['disabled',] }],
|
|
4369
|
-
Environment: [{ type: Input, args: ['environment',] }]
|
|
4481
|
+
Environment: [{ type: Input, args: ['environment',] }],
|
|
4482
|
+
EnvironmentLookup: [{ type: Input, args: ['environment-lookup',] }]
|
|
4370
4483
|
};
|
|
4371
4484
|
|
|
4372
4485
|
class DevopsSourceControlFormComponent {
|
|
4373
4486
|
// Constructors
|
|
4374
|
-
constructor(
|
|
4375
|
-
this.formBuilder = formBuilder;
|
|
4487
|
+
constructor(appsFlowSvc, eacSvc, formBuilder) {
|
|
4376
4488
|
this.appsFlowSvc = appsFlowSvc;
|
|
4377
4489
|
this.eacSvc = eacSvc;
|
|
4490
|
+
this.formBuilder = formBuilder;
|
|
4378
4491
|
this.SeparatorKeysCodes = [ENTER, COMMA];
|
|
4379
4492
|
this.BuildPath = null;
|
|
4380
|
-
// this.EditingSourceControlLookup = null;
|
|
4381
4493
|
this.HostingDetails = new ProjectHostingDetails();
|
|
4382
4494
|
this.SelectedBranches = [];
|
|
4383
4495
|
this.SourceControlRoot = '';
|
|
4384
4496
|
this.UseBranches = true;
|
|
4385
4497
|
this.UseBuildPath = false;
|
|
4386
4498
|
}
|
|
4387
|
-
// Fields
|
|
4388
4499
|
// Properties
|
|
4389
4500
|
get BranchesFormControl() {
|
|
4390
4501
|
return this.DevOpsSourceControlFormGroup.get(this.SourceControlRoot + 'branches');
|
|
@@ -4436,12 +4547,9 @@ class DevopsSourceControlFormComponent {
|
|
|
4436
4547
|
this.destroyFormControls();
|
|
4437
4548
|
}
|
|
4438
4549
|
ngOnInit() {
|
|
4439
|
-
console.log("org: ", this.EditingSourceControl);
|
|
4440
|
-
console.log("lookup: ", this.EditingSourceControlLookup);
|
|
4441
4550
|
if (this.EditingSourceControlLookup === null) {
|
|
4442
4551
|
this.CreateNewSourceControl();
|
|
4443
4552
|
}
|
|
4444
|
-
console.log("org: ", this.EditingSourceControl);
|
|
4445
4553
|
if (this.EditingSourceControl != null) {
|
|
4446
4554
|
this.DevOpsSourceControlFormGroup = this.formBuilder.group({});
|
|
4447
4555
|
this.setupFormControls();
|
|
@@ -4460,6 +4568,7 @@ class DevopsSourceControlFormComponent {
|
|
|
4460
4568
|
this.loadProjectHostingDetails();
|
|
4461
4569
|
}
|
|
4462
4570
|
BuildPathChanged(event) {
|
|
4571
|
+
//do something??
|
|
4463
4572
|
}
|
|
4464
4573
|
CreateNewSourceControl() {
|
|
4465
4574
|
this.SetEditingSourceControl(Guid.CreateRaw());
|
|
@@ -4535,7 +4644,7 @@ class DevopsSourceControlFormComponent {
|
|
|
4535
4644
|
this.EditingSourceControlLookup = scLookup;
|
|
4536
4645
|
}
|
|
4537
4646
|
SubmitSourceControl() {
|
|
4538
|
-
console.log("source control submitted");
|
|
4647
|
+
console.log("source control submitted: ", this.DevOpsSourceControlFormGroup.value);
|
|
4539
4648
|
}
|
|
4540
4649
|
// public SaveSourceControl(): void {
|
|
4541
4650
|
// const saveEnvReq: SaveEnvironmentAsCodeEventRequest = {
|
|
@@ -4550,23 +4659,23 @@ class DevopsSourceControlFormComponent {
|
|
|
4550
4659
|
// EnterpriseDataTokens: {},
|
|
4551
4660
|
// };
|
|
4552
4661
|
// let artifactLookup: string;
|
|
4553
|
-
//
|
|
4554
|
-
//
|
|
4555
|
-
//
|
|
4556
|
-
//
|
|
4557
|
-
//
|
|
4558
|
-
// if (!this.ArtifactLookup) {
|
|
4559
|
-
//
|
|
4560
|
-
//
|
|
4561
|
-
//
|
|
4562
|
-
//
|
|
4563
|
-
//
|
|
4564
|
-
//
|
|
4565
|
-
//
|
|
4566
|
-
//
|
|
4567
|
-
// } else {
|
|
4568
|
-
//
|
|
4569
|
-
// }
|
|
4662
|
+
// let artifact: EaCArtifact = {
|
|
4663
|
+
// ...this.Artifact,
|
|
4664
|
+
// ...this.HostingDetailsFormControls
|
|
4665
|
+
// .SelectedHostingOptionInputControlValues,
|
|
4666
|
+
// };
|
|
4667
|
+
// // if (!this.ArtifactLookup) {
|
|
4668
|
+
// // artifactLookup = Guid.CreateRaw();
|
|
4669
|
+
// // artifact = {
|
|
4670
|
+
// // ...artifact,
|
|
4671
|
+
// // Type: this.HostingDetailsFormControls.SelectedHostingOption
|
|
4672
|
+
// // .ArtifactType,
|
|
4673
|
+
// // Name: this.HostingDetailsFormControls.SelectedHostingOption.Name,
|
|
4674
|
+
// // NPMRegistry: 'https://registry.npmjs.org/',
|
|
4675
|
+
// // };
|
|
4676
|
+
// // } else {
|
|
4677
|
+
// // artifactLookup = this.ArtifactLookup;
|
|
4678
|
+
// // }
|
|
4570
4679
|
// saveEnvReq.Environment.Artifacts[artifactLookup] = artifact;
|
|
4571
4680
|
// let devOpsActionLookup: string;
|
|
4572
4681
|
// if (!this.DevOpsActionLookup) {
|
|
@@ -4765,19 +4874,19 @@ class DevopsSourceControlFormComponent {
|
|
|
4765
4874
|
DevopsSourceControlFormComponent.decorators = [
|
|
4766
4875
|
{ type: Component, args: [{
|
|
4767
4876
|
selector: 'lcu-devops-source-control-form',
|
|
4768
|
-
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\" *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 <!-- [disabled]=\"!SecurityFormGroup.valid || !SecurityFormGroup.dirty\" -->\n <button mat-raised-button type=\"submit\">Save</button>\n </mat-card-actions>\n </mat-card>\n</form>",
|
|
4877
|
+
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\" *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 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 \n </mat-card-actions>\n </mat-card>\n</form>",
|
|
4769
4878
|
styles: [".form-card,.sc-card{width:100%}"]
|
|
4770
4879
|
},] }
|
|
4771
4880
|
];
|
|
4772
4881
|
DevopsSourceControlFormComponent.ctorParameters = () => [
|
|
4773
|
-
{ type: FormBuilder },
|
|
4774
4882
|
{ type: ApplicationsFlowService },
|
|
4775
|
-
{ type: EaCService }
|
|
4883
|
+
{ type: EaCService },
|
|
4884
|
+
{ type: FormBuilder }
|
|
4776
4885
|
];
|
|
4777
4886
|
DevopsSourceControlFormComponent.propDecorators = {
|
|
4778
|
-
BranchesInput: [{ type: ViewChild, args: ['branches',] }],
|
|
4779
4887
|
EditingSourceControlLookup: [{ type: Input, args: ['editing-source-control-lookup',] }],
|
|
4780
|
-
Environment: [{ type: Input, args: ['environment',] }]
|
|
4888
|
+
Environment: [{ type: Input, args: ['environment',] }],
|
|
4889
|
+
BranchesInput: [{ type: ViewChild, args: ['branches',] }]
|
|
4781
4890
|
};
|
|
4782
4891
|
|
|
4783
4892
|
class SourceControlDialogComponent {
|
|
@@ -4791,7 +4900,7 @@ class SourceControlDialogComponent {
|
|
|
4791
4900
|
SourceControlDialogComponent.decorators = [
|
|
4792
4901
|
{ type: Component, args: [{
|
|
4793
4902
|
selector: 'lcu-source-control-dialog',
|
|
4794
|
-
template: "\n<div fxLayoutAlign=\"center center\">\n<lcu-devops-source-control-form\n
|
|
4903
|
+
template: "\n<div fxLayoutAlign=\"center center\">\n <lcu-devops-source-control-form\n [environment]=\"data.environment\"\n [editing-source-control-lookup]=\"data.scLookup\">\n </lcu-devops-source-control-form>\n</div>",
|
|
4795
4904
|
styles: [""]
|
|
4796
4905
|
},] }
|
|
4797
4906
|
];
|
|
@@ -4811,7 +4920,7 @@ class BuildPipelineDialogComponent {
|
|
|
4811
4920
|
BuildPipelineDialogComponent.decorators = [
|
|
4812
4921
|
{ type: Component, args: [{
|
|
4813
4922
|
selector: 'lcu-build-pipeline-dialog',
|
|
4814
|
-
template: "<lcu-build-pipeline-form\n[build-pipeline]=\"data.buildPipeline\"\n[devops-action-lookup]=\"data.devopsActionLookup\"\n[environment]=\"data.environment\"\n>\n\n</lcu-build-pipeline-form
|
|
4923
|
+
template: "<lcu-build-pipeline-form \n [build-pipeline]=\"data.buildPipeline\" \n [devops-action-lookup]=\"data.devopsActionLookup\"\n [environment]=\"data.environment\" \n [environment-lookup]=\"data.environmentLookup\">\n\n</lcu-build-pipeline-form>",
|
|
4815
4924
|
styles: [""]
|
|
4816
4925
|
},] }
|
|
4817
4926
|
];
|
|
@@ -4820,6 +4929,64 @@ BuildPipelineDialogComponent.ctorParameters = () => [
|
|
|
4820
4929
|
{ type: undefined, decorators: [{ type: Inject, args: [MAT_DIALOG_DATA,] }] }
|
|
4821
4930
|
];
|
|
4822
4931
|
|
|
4932
|
+
class EditApplicationFormComponent {
|
|
4933
|
+
constructor(formBldr) {
|
|
4934
|
+
this.formBldr = formBldr;
|
|
4935
|
+
this.SaveFormEvent = new EventEmitter;
|
|
4936
|
+
}
|
|
4937
|
+
get DescriptionFormControl() {
|
|
4938
|
+
var _a;
|
|
4939
|
+
return (_a = this.ApplicationFormGroup) === null || _a === void 0 ? void 0 : _a.controls.description;
|
|
4940
|
+
}
|
|
4941
|
+
get NameFormControl() {
|
|
4942
|
+
var _a;
|
|
4943
|
+
return (_a = this.ApplicationFormGroup) === null || _a === void 0 ? void 0 : _a.controls.name;
|
|
4944
|
+
}
|
|
4945
|
+
get RouteFormControl() {
|
|
4946
|
+
var _a;
|
|
4947
|
+
return (_a = this.ApplicationFormGroup) === null || _a === void 0 ? void 0 : _a.controls.route;
|
|
4948
|
+
}
|
|
4949
|
+
ngOnInit() {
|
|
4950
|
+
this.setupApplicationForm();
|
|
4951
|
+
}
|
|
4952
|
+
SubmitApplicationControl() {
|
|
4953
|
+
console.log("application form: ", this.ApplicationFormGroup.value);
|
|
4954
|
+
this.SaveFormEvent.emit(this.ApplicationFormGroup.value);
|
|
4955
|
+
}
|
|
4956
|
+
//HELPERS
|
|
4957
|
+
setupApplicationForm() {
|
|
4958
|
+
var _a, _b, _c;
|
|
4959
|
+
if (this.EditingApplication != null) {
|
|
4960
|
+
this.ApplicationFormGroup = this.formBldr.group({
|
|
4961
|
+
name: [(_a = this.EditingApplication.Application) === null || _a === void 0 ? void 0 : _a.Name, Validators.required],
|
|
4962
|
+
description: [
|
|
4963
|
+
(_b = this.EditingApplication.Application) === null || _b === void 0 ? void 0 : _b.Description,
|
|
4964
|
+
Validators.required,
|
|
4965
|
+
],
|
|
4966
|
+
route: [
|
|
4967
|
+
((_c = this.EditingApplication.LookupConfig) === null || _c === void 0 ? void 0 : _c.PathRegex.replace('.*', '')) ||
|
|
4968
|
+
'/',
|
|
4969
|
+
Validators.required,
|
|
4970
|
+
],
|
|
4971
|
+
});
|
|
4972
|
+
}
|
|
4973
|
+
}
|
|
4974
|
+
}
|
|
4975
|
+
EditApplicationFormComponent.decorators = [
|
|
4976
|
+
{ type: Component, args: [{
|
|
4977
|
+
selector: 'lcu-edit-application-form',
|
|
4978
|
+
template: "<form class=\"form-card\" [formGroup]=\"ApplicationFormGroup\" (ngSubmit)=\"SubmitApplicationControl()\" >\n <mat-card class=\"spread flow-card\">\n <mat-card-header>\n <mat-card-title>\n <ng-container *ngIf=\"EditingApplication?.Application\">\n Edit Application:\n {{ EditingApplication.Application?.Name }}\n </ng-container>\n\n <ng-container *ngIf=\"!EditingApplication?.Application\">\n Create an Application\n </ng-container>\n </mat-card-title>\n </mat-card-header>\n\n <mat-card-content>\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Name\"\n formControlName=\"name\"\n required\n />\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width\">\n <textarea\n matInput\n placeholder=\"Description\"\n formControlName=\"description\"\n rows=\"3\"\n required\n ></textarea>\n </mat-form-field>\n\n <mat-form-field class=\"mat-full-width\">\n <input\n matInput\n placeholder=\"Route\"\n formControlName=\"route\"\n required\n />\n </mat-form-field>\n </mat-card-content>\n <mat-card-actions fxLayoutAlign=\"center center\">\n\n <button \n mat-raised-button \n type=\"submit\" \n fxFlex=\"100%\" \n color=\"primary\" \n [disabled]=\"!ApplicationFormGroup.valid || !ApplicationFormGroup.dirty\">\n <mat-icon>save</mat-icon>\n Save Source Control\n </button>\n \n </mat-card-actions>\n </mat-card>\n</form>\n",
|
|
4979
|
+
styles: [""]
|
|
4980
|
+
},] }
|
|
4981
|
+
];
|
|
4982
|
+
EditApplicationFormComponent.ctorParameters = () => [
|
|
4983
|
+
{ type: FormBuilder }
|
|
4984
|
+
];
|
|
4985
|
+
EditApplicationFormComponent.propDecorators = {
|
|
4986
|
+
EditingApplication: [{ type: Input, args: ['editing-application',] }],
|
|
4987
|
+
SaveFormEvent: [{ type: Output, args: ['save-form-event',] }]
|
|
4988
|
+
};
|
|
4989
|
+
|
|
4823
4990
|
class ApplicationsFlowModule {
|
|
4824
4991
|
static forRoot() {
|
|
4825
4992
|
return {
|
|
@@ -4876,7 +5043,8 @@ ApplicationsFlowModule.decorators = [
|
|
|
4876
5043
|
BuildPipelineFormComponent,
|
|
4877
5044
|
DevopsSourceControlFormComponent,
|
|
4878
5045
|
SourceControlDialogComponent,
|
|
4879
|
-
BuildPipelineDialogComponent
|
|
5046
|
+
BuildPipelineDialogComponent,
|
|
5047
|
+
EditApplicationFormComponent
|
|
4880
5048
|
],
|
|
4881
5049
|
imports: [
|
|
4882
5050
|
FathymSharedModule,
|
|
@@ -4928,7 +5096,8 @@ ApplicationsFlowModule.decorators = [
|
|
|
4928
5096
|
BuildPipelineFormComponent,
|
|
4929
5097
|
DevopsSourceControlFormComponent,
|
|
4930
5098
|
SourceControlDialogComponent,
|
|
4931
|
-
BuildPipelineDialogComponent
|
|
5099
|
+
BuildPipelineDialogComponent,
|
|
5100
|
+
EditApplicationFormComponent
|
|
4932
5101
|
],
|
|
4933
5102
|
entryComponents: [
|
|
4934
5103
|
ApplicationsFlowProjectsElementComponent,
|
|
@@ -4967,7 +5136,8 @@ ApplicationsFlowModule.decorators = [
|
|
|
4967
5136
|
BuildPipelineFormComponent,
|
|
4968
5137
|
DevopsSourceControlFormComponent,
|
|
4969
5138
|
SourceControlDialogComponent,
|
|
4970
|
-
BuildPipelineDialogComponent
|
|
5139
|
+
BuildPipelineDialogComponent,
|
|
5140
|
+
EditApplicationFormComponent
|
|
4971
5141
|
],
|
|
4972
5142
|
},] }
|
|
4973
5143
|
];
|
|
@@ -5000,5 +5170,5 @@ class FormModel {
|
|
|
5000
5170
|
* Generated bundle index. Do not edit.
|
|
5001
5171
|
*/
|
|
5002
5172
|
|
|
5003
|
-
export { ActionsModel, ApplicationsFlowModule, ApplicationsFlowProjectsContext, ApplicationsFlowProjectsElementComponent, ApplicationsFlowProjectsElementState, ApplicationsFlowService, ApplicationsFlowState, ApplicationsFlowStateContext, BaseFormConfigModel, CardFormConfigModel, CreateProjectWizardComponent, DevSettingsPresetModel, DomainModel, DynamicTabsModel, EaCService, FormActionsModel, FormModel, FormValuesModel, FormsService, GitAuthComponent, GitHubBranch, GitHubOrganization, GitHubRepository, GitHubSetupState, GitHubWorkflowRun, HostingDetailsFormGroupComponent, NPMService, ProjectActionsModel, ProjectHostingDetails, ProjectHostingOption, ProjectHostingOptionInput, ProjectNameComponent, ProjectService, RootDirectoryComponent, SELECTOR_APPLICATIONS_FLOW_PROJECTS_ELEMENT, SaveApplicationAsCodeEventRequest, SaveDFSModifierEventRequest, SaveEnvironmentAsCodeEventRequest, SaveProjectAsCodeEventRequest, SourceControlFormControlsComponent, ThreeColumnComponent, UnpackLowCodeUnitRequest, DynamicTabsComponent as ɵa, HeaderComponent as ɵb, SourceControlFormComponent as ɵba, BuildPipelineFormComponent as ɵbb, DevopsSourceControlFormComponent as ɵbc, SourceControlDialogComponent as ɵbd, BuildPipelineDialogComponent as ɵbe, ProjectTabsComponent as ɵc, GeneralComponent as ɵd, DomainsComponent as ɵe, ProjectItemsComponent as ɵf, BuildsComponent as ɵg, RecentActivitiesComponent as ɵh, FormCardComponent as ɵi, BaseFormComponent as ɵj, BaseFormTestComponent as ɵk, AppsFlowComponent as ɵl, DevOpsComponent as ɵm, DFSModifiersComponent as ɵn, NpmPackageSelectComponent as ɵo, ColumnInfoCardComponent as ɵp, SlottedCardComponent as ɵq, ProjectInfoCardComponent as ɵr, AnalyticsCardComponent as ɵs, FeedCardSmComponent as ɵt, GhControlComponent as ɵu, MainFeedCardComponent as ɵv, TwoColumnHeaderComponent as ɵw, CardCarouselComponent as ɵx, SecurityToggleComponent as ɵy, ProcessorDetailsFormComponent as ɵz };
|
|
5173
|
+
export { ActionsModel, ApplicationsFlowModule, ApplicationsFlowProjectsContext, ApplicationsFlowProjectsElementComponent, ApplicationsFlowProjectsElementState, ApplicationsFlowService, ApplicationsFlowState, ApplicationsFlowStateContext, BaseFormConfigModel, CardFormConfigModel, CreateProjectWizardComponent, DevSettingsPresetModel, DomainModel, DynamicTabsModel, EaCService, FormActionsModel, FormModel, FormValuesModel, FormsService, GitAuthComponent, GitHubBranch, GitHubOrganization, GitHubRepository, GitHubSetupState, GitHubWorkflowRun, HostingDetailsFormGroupComponent, NPMService, ProjectActionsModel, ProjectHostingDetails, ProjectHostingOption, ProjectHostingOptionInput, ProjectNameComponent, ProjectService, RootDirectoryComponent, SELECTOR_APPLICATIONS_FLOW_PROJECTS_ELEMENT, SaveApplicationAsCodeEventRequest, SaveDFSModifierEventRequest, SaveEnvironmentAsCodeEventRequest, SaveProjectAsCodeEventRequest, SourceControlFormControlsComponent, ThreeColumnComponent, UnpackLowCodeUnitRequest, DynamicTabsComponent as ɵa, HeaderComponent as ɵb, SourceControlFormComponent as ɵba, BuildPipelineFormComponent as ɵbb, DevopsSourceControlFormComponent as ɵbc, SourceControlDialogComponent as ɵbd, BuildPipelineDialogComponent as ɵbe, EditApplicationFormComponent as ɵbf, ProjectTabsComponent as ɵc, GeneralComponent as ɵd, DomainsComponent as ɵe, ProjectItemsComponent as ɵf, BuildsComponent as ɵg, RecentActivitiesComponent as ɵh, FormCardComponent as ɵi, BaseFormComponent as ɵj, BaseFormTestComponent as ɵk, AppsFlowComponent as ɵl, DevOpsComponent as ɵm, DFSModifiersComponent as ɵn, NpmPackageSelectComponent as ɵo, ColumnInfoCardComponent as ɵp, SlottedCardComponent as ɵq, ProjectInfoCardComponent as ɵr, AnalyticsCardComponent as ɵs, FeedCardSmComponent as ɵt, GhControlComponent as ɵu, MainFeedCardComponent as ɵv, TwoColumnHeaderComponent as ɵw, CardCarouselComponent as ɵx, SecurityToggleComponent as ɵy, ProcessorDetailsFormComponent as ɵz };
|
|
5004
5174
|
//# sourceMappingURL=lowcodeunit-applications-flow-common.js.map
|