@lowcodeunit/applications-flow-common 1.33.97-lets-get-social-ish → 1.33.101-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 +695 -15
- 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 +12 -4
- package/esm2015/lib/controls/build-pipeline-form/build-pipeline-form.component.js +149 -5
- package/esm2015/lib/controls/devops-source-control-form/devops-source-control-form.component.js +409 -6
- package/esm2015/lib/controls/processor-details-form/processor-details-form.component.js +2 -2
- package/esm2015/lib/dialogs/build-pipeline-dialog/build-pipeline-dialog.component.js +22 -0
- package/esm2015/lib/dialogs/source-control-dialog/source-control-dialog.component.js +22 -0
- package/esm2015/lib/elements/projects/controls/hosting-details-form-group/hosting-details-form-group.component.js +2 -1
- package/esm2015/lib/elements/slotted-card/slotted-card.component.js +6 -4
- package/esm2015/lib/services/applications-flow.service.js +6 -1
- package/esm2015/lowcodeunit-applications-flow-common.js +3 -1
- package/fesm2015/lowcodeunit-applications-flow-common.js +607 -14
- 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 +30 -1
- 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 +72 -3
- package/lib/controls/devops-source-control-form/devops-source-control-form.component.d.ts.map +1 -1
- package/lib/dialogs/build-pipeline-dialog/build-pipeline-dialog.component.d.ts +15 -0
- package/lib/dialogs/build-pipeline-dialog/build-pipeline-dialog.component.d.ts.map +1 -0
- package/lib/dialogs/source-control-dialog/source-control-dialog.component.d.ts +14 -0
- package/lib/dialogs/source-control-dialog/source-control-dialog.component.d.ts.map +1 -0
- package/lib/elements/projects/controls/hosting-details-form-group/hosting-details-form-group.component.d.ts.map +1 -1
- 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 +2 -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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ɵɵdefineInjectable, Injectable, ɵɵinject, INJECTOR, Injector, Component, Input, EventEmitter, Output, ViewChild, ComponentFactoryResolver, ViewContainerRef, ChangeDetectorRef, NgModule } from '@angular/core';
|
|
1
|
+
import { ɵɵdefineInjectable, Injectable, ɵɵinject, INJECTOR, Injector, Component, Input, EventEmitter, Output, ViewChild, ComponentFactoryResolver, ViewContainerRef, ChangeDetectorRef, Inject, NgModule } from '@angular/core';
|
|
2
2
|
import { Subject, Observable } from 'rxjs';
|
|
3
3
|
import { __awaiter } from 'tslib';
|
|
4
4
|
import { HttpClient, HttpBackend } from '@angular/common/http';
|
|
@@ -11,6 +11,7 @@ import { map, debounceTime, switchMap } from 'rxjs/operators';
|
|
|
11
11
|
import { BreakpointObserver } from '@angular/cdk/layout';
|
|
12
12
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
13
13
|
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
|
|
14
|
+
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
|
|
14
15
|
|
|
15
16
|
/**
|
|
16
17
|
* Model for form values
|
|
@@ -247,6 +248,11 @@ class ApplicationsFlowService {
|
|
|
247
248
|
headers: this.loadHeaders(),
|
|
248
249
|
});
|
|
249
250
|
}
|
|
251
|
+
NewLoadProjectHostingDetails() {
|
|
252
|
+
return this.http.get(`${this.apiRoot}/api/lowcodeunit/manage/projects/hosting/details`, {
|
|
253
|
+
headers: this.loadHeaders(),
|
|
254
|
+
});
|
|
255
|
+
}
|
|
250
256
|
SaveEnterpriseAsCode(eac) {
|
|
251
257
|
return this.http.post(`${this.apiRoot}/api/lowcodeunit/manage/eac`, eac, {
|
|
252
258
|
headers: this.loadHeaders(),
|
|
@@ -1037,6 +1043,7 @@ class HostingDetailsFormGroupComponent {
|
|
|
1037
1043
|
ngOnChanges() { }
|
|
1038
1044
|
ngOnInit() {
|
|
1039
1045
|
var _a, _b, _c;
|
|
1046
|
+
console.log("made it to hosting details");
|
|
1040
1047
|
this.BuildPipeline =
|
|
1041
1048
|
this.BuildPipeline || ((_a = this.Details) === null || _a === void 0 ? void 0 : _a.HostingOptions)
|
|
1042
1049
|
? (_c = (_b = this.Details) === null || _b === void 0 ? void 0 : _b.HostingOptions[0]) === null || _c === void 0 ? void 0 : _c.Lookup : '';
|
|
@@ -3553,7 +3560,9 @@ ColumnInfoCardComponent.propDecorators = {
|
|
|
3553
3560
|
};
|
|
3554
3561
|
|
|
3555
3562
|
class SlottedCardComponent {
|
|
3556
|
-
constructor() {
|
|
3563
|
+
constructor() {
|
|
3564
|
+
this.MainActionClicked = new EventEmitter;
|
|
3565
|
+
}
|
|
3557
3566
|
ngOnInit() {
|
|
3558
3567
|
}
|
|
3559
3568
|
MainActionClickEvent() {
|
|
@@ -3563,7 +3572,7 @@ class SlottedCardComponent {
|
|
|
3563
3572
|
SlottedCardComponent.decorators = [
|
|
3564
3573
|
{ type: Component, args: [{
|
|
3565
3574
|
selector: 'lcu-slotted-card',
|
|
3566
|
-
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 class=\"slotted-card-action-btn\" [href]=\"ActionPath\">{{ ActionText }}</a>\n </mat-card-actions>\n\n </mat-card>\n\n\n",
|
|
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 *ngIf=\"ActionPath\" class=\"slotted-card-action-btn\" [href]=\"ActionPath\">{{ ActionText }}</a>\n <a mat-button *ngIf=\"!ActionPath\" class=\"slotted-card-action-btn\" (click)=\"MainActionClickEvent()\">{{ ActionText }}</a>\n </mat-card-actions>\n\n </mat-card>\n\n\n",
|
|
3567
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{border-radius:0 0 2px 2px;border-top:1px solid #d3d3d3;width:100%}"]
|
|
3568
3577
|
},] }
|
|
3569
3578
|
];
|
|
@@ -4143,7 +4152,7 @@ class ProcessorDetailsFormComponent {
|
|
|
4143
4152
|
ProcessorDetailsFormComponent.decorators = [
|
|
4144
4153
|
{ type: Component, args: [{
|
|
4145
4154
|
selector: 'lcu-processor-details-form',
|
|
4146
|
-
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 <!-- [disabled]=\"!SecurityFormGroup.valid || !SecurityFormGroup.dirty\" -->\n <button mat-raised-button type=\"submit\" >Save
|
|
4155
|
+
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 <!-- [disabled]=\"!SecurityFormGroup.valid || !SecurityFormGroup.dirty\" -->\n <button mat-raised-button type=\"submit\" >Save</button>\n </mat-card-actions>\n</mat-card>\n</form>\n \n",
|
|
4147
4156
|
styles: [""]
|
|
4148
4157
|
},] }
|
|
4149
4158
|
];
|
|
@@ -4211,32 +4220,610 @@ SourceControlFormComponent.propDecorators = {
|
|
|
4211
4220
|
};
|
|
4212
4221
|
|
|
4213
4222
|
class BuildPipelineFormComponent {
|
|
4214
|
-
constructor() {
|
|
4223
|
+
constructor(formBuilder, appsFlowSvc) {
|
|
4224
|
+
this.formBuilder = formBuilder;
|
|
4225
|
+
this.appsFlowSvc = appsFlowSvc;
|
|
4226
|
+
this.HostingDetails = new ProjectHostingDetails();
|
|
4227
|
+
}
|
|
4228
|
+
// @Input('main-branch')
|
|
4229
|
+
// public MainBranch: string;
|
|
4230
|
+
// @Input('organization')
|
|
4231
|
+
// public Organization: string;
|
|
4232
|
+
// @Input('repository')
|
|
4233
|
+
// public Repository: string;
|
|
4234
|
+
get Artifact() {
|
|
4235
|
+
var _a, _b, _c;
|
|
4236
|
+
console.log("ARTIFACT: ", (_a = this.Environment) === null || _a === void 0 ? void 0 : _a.Artifacts[this.ArtifactLookup]);
|
|
4237
|
+
return ((_b = this.Environment) === null || _b === void 0 ? void 0 : _b.Artifacts) && this.ArtifactLookup
|
|
4238
|
+
? ((_c = this.Environment) === null || _c === void 0 ? void 0 : _c.Artifacts[this.ArtifactLookup]) || {}
|
|
4239
|
+
: {};
|
|
4240
|
+
}
|
|
4241
|
+
get ArtifactLookup() {
|
|
4242
|
+
var _a, _b;
|
|
4243
|
+
const artLookup = ((_a = this.DevOpsAction) === null || _a === void 0 ? void 0 : _a.ArtifactLookups) ? (_b = this.DevOpsAction) === null || _b === void 0 ? void 0 : _b.ArtifactLookups[0] : null;
|
|
4244
|
+
return artLookup;
|
|
4245
|
+
}
|
|
4246
|
+
get BuildPipelineFormControl() {
|
|
4247
|
+
var _a;
|
|
4248
|
+
return (_a = this.BuildPipelineFormGroup) === null || _a === void 0 ? void 0 : _a.controls.buildPipeline;
|
|
4249
|
+
}
|
|
4250
|
+
get DevOpsAction() {
|
|
4251
|
+
return this.Environment.DevOpsActions && this.DevOpsActionLookup
|
|
4252
|
+
? this.Environment.DevOpsActions[this.DevOpsActionLookup] || {}
|
|
4253
|
+
: {};
|
|
4254
|
+
}
|
|
4255
|
+
get DevOpsActions() {
|
|
4256
|
+
return this.Environment.DevOpsActions || {};
|
|
4257
|
+
}
|
|
4258
|
+
get EditingSourceControl() {
|
|
4259
|
+
var _a, _b;
|
|
4260
|
+
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;
|
|
4261
|
+
if (sc == null && this.EditingSourceControlLookup) {
|
|
4262
|
+
sc = {};
|
|
4263
|
+
}
|
|
4264
|
+
return sc;
|
|
4265
|
+
}
|
|
4266
|
+
// (ho) => ho.Lookup === this.BuildPipeline
|
|
4267
|
+
get SelectedHostingOption() {
|
|
4268
|
+
var _a, _b;
|
|
4269
|
+
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);
|
|
4270
|
+
}
|
|
4271
|
+
get SourceControlLookups() {
|
|
4272
|
+
return Object.keys(this.SourceControls || {});
|
|
4273
|
+
}
|
|
4274
|
+
get SourceControls() {
|
|
4275
|
+
return this.Environment.Sources || {};
|
|
4276
|
+
}
|
|
4215
4277
|
ngOnInit() {
|
|
4278
|
+
var _a, _b, _c;
|
|
4279
|
+
this.BuildPipelineFormGroup = this.formBuilder.group({});
|
|
4280
|
+
this.loadProjectHostingDetails();
|
|
4281
|
+
console.log("ARTIFACT: ", this.Artifact);
|
|
4282
|
+
// this.BuildPipeline ||
|
|
4283
|
+
// github-artifacts-release is this.HostingDetails?.HostingOptions[0]?.Lookup
|
|
4284
|
+
this.BuildPipeline =
|
|
4285
|
+
((_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 : '';
|
|
4286
|
+
console.log("Build Pipeline HERE= ", this.BuildPipeline);
|
|
4287
|
+
if (this.BuildPipelineFormGroup != null) {
|
|
4288
|
+
this.BuildPipelineFormGroup.removeControl('hostingDetails');
|
|
4289
|
+
}
|
|
4290
|
+
this.BuildPipelineFormGroup.addControl('hostingDetails', this.formBuilder.group({
|
|
4291
|
+
buildPipeline: [this.BuildPipeline, [Validators.required]],
|
|
4292
|
+
}));
|
|
4293
|
+
this.setupControlsForForm();
|
|
4294
|
+
}
|
|
4295
|
+
//API METHODS
|
|
4296
|
+
BuildPipelineChanged() {
|
|
4297
|
+
var _a, _b;
|
|
4298
|
+
console.log("build pipeline value: ", (_a = this.BuildPipelineFormControl) === null || _a === void 0 ? void 0 : _a.value);
|
|
4299
|
+
this.BuildPipeline = (_b = this.BuildPipelineFormControl) === null || _b === void 0 ? void 0 : _b.value;
|
|
4300
|
+
this.setupControlsForForm();
|
|
4301
|
+
}
|
|
4302
|
+
// Helpers
|
|
4303
|
+
setupControlsForForm() {
|
|
4304
|
+
//for (const ctrlName in this.BuildPipelineFormGroup.controls) {
|
|
4305
|
+
//devOpsAction doesn't exist
|
|
4306
|
+
//removes hosting details
|
|
4307
|
+
// if (ctrlName !== 'buildPipeline' && ctrlName !== 'devOpsAction') {
|
|
4308
|
+
// console.log("removing control: ", ctrlName)
|
|
4309
|
+
// this.BuildPipelineFormGroup.removeControl(ctrlName);
|
|
4310
|
+
// }
|
|
4311
|
+
//}
|
|
4312
|
+
var _a, _b, _c, _d, _e, _f;
|
|
4313
|
+
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]));
|
|
4314
|
+
(_d = (_c = this.SelectedHostingOption) === null || _c === void 0 ? void 0 : _c.Inputs) === null || _d === void 0 ? void 0 : _d.forEach((input) => {
|
|
4315
|
+
const validators = input.Required ? [Validators.required] : [];
|
|
4316
|
+
this.BuildPipelineFormGroup.addControl(input.Lookup, this.formBuilder.control(this.Artifact[input.Lookup] || input.DefaultValue || '', validators));
|
|
4317
|
+
// if (this.Disabled) {
|
|
4318
|
+
// this.FormGroup.controls[input.Lookup].disable();
|
|
4319
|
+
// }
|
|
4320
|
+
});
|
|
4321
|
+
debugger;
|
|
4322
|
+
if (((_e = this.BuildPipelineFormControl) === null || _e === void 0 ? void 0 : _e.value) === 'npm-release') {
|
|
4323
|
+
debugger;
|
|
4324
|
+
if (!this.BuildPipelineFormGroup.controls.npmToken) {
|
|
4325
|
+
this.BuildPipelineFormGroup.addControl('npmToken', this.formBuilder.control('', this.Disabled ? [] : [Validators.required]));
|
|
4326
|
+
if (this.Disabled) {
|
|
4327
|
+
this.BuildPipelineFormGroup.controls.npmToken.disable();
|
|
4328
|
+
}
|
|
4329
|
+
}
|
|
4330
|
+
}
|
|
4331
|
+
else if (((_f = this.BuildPipelineFormControl) === null || _f === void 0 ? void 0 : _f.value) === 'github-artifacts-release') {
|
|
4332
|
+
if (this.BuildPipelineFormGroup.controls.npmToken) {
|
|
4333
|
+
this.BuildPipelineFormGroup.removeControl('npmToken');
|
|
4334
|
+
}
|
|
4335
|
+
}
|
|
4336
|
+
}
|
|
4337
|
+
loadProjectHostingDetails() {
|
|
4338
|
+
// this.HostingDetails.Loading = true;
|
|
4339
|
+
// this.Organization,
|
|
4340
|
+
// this.Repository,
|
|
4341
|
+
// this.MainBranch
|
|
4342
|
+
// "powhound4",
|
|
4343
|
+
// "RedwoodCrystals",
|
|
4344
|
+
// "master"
|
|
4345
|
+
this.appsFlowSvc
|
|
4346
|
+
.NewLoadProjectHostingDetails()
|
|
4347
|
+
.subscribe((response) => {
|
|
4348
|
+
this.HostingDetails = response.Model;
|
|
4349
|
+
console.log("response: ", response);
|
|
4350
|
+
this.HostingDetails.Loading = false;
|
|
4351
|
+
}, (err) => {
|
|
4352
|
+
this.HostingDetails.Loading = false;
|
|
4353
|
+
console.log("hosting details LOADING EERR: ", this.HostingDetails);
|
|
4354
|
+
console.log("ERR: ", err);
|
|
4355
|
+
});
|
|
4356
|
+
console.log("HOSTING DETAILS: ", this.HostingDetails);
|
|
4216
4357
|
}
|
|
4217
4358
|
}
|
|
4218
4359
|
BuildPipelineFormComponent.decorators = [
|
|
4219
4360
|
{ type: Component, args: [{
|
|
4220
4361
|
selector: 'lcu-build-pipeline-form',
|
|
4221
|
-
template: "<
|
|
4362
|
+
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",
|
|
4222
4363
|
styles: [""]
|
|
4223
4364
|
},] }
|
|
4224
4365
|
];
|
|
4225
|
-
BuildPipelineFormComponent.ctorParameters = () => [
|
|
4366
|
+
BuildPipelineFormComponent.ctorParameters = () => [
|
|
4367
|
+
{ type: FormBuilder },
|
|
4368
|
+
{ type: ApplicationsFlowService }
|
|
4369
|
+
];
|
|
4370
|
+
BuildPipelineFormComponent.propDecorators = {
|
|
4371
|
+
BuildPipeline: [{ type: Input, args: ['build-pipeline',] }],
|
|
4372
|
+
DevOpsActionLookup: [{ type: Input, args: ['devops-action-lookup',] }],
|
|
4373
|
+
Disabled: [{ type: Input, args: ['disabled',] }],
|
|
4374
|
+
Environment: [{ type: Input, args: ['environment',] }]
|
|
4375
|
+
};
|
|
4226
4376
|
|
|
4227
4377
|
class DevopsSourceControlFormComponent {
|
|
4228
|
-
|
|
4378
|
+
// Constructors
|
|
4379
|
+
constructor(formBuilder, appsFlowSvc, eacSvc) {
|
|
4380
|
+
this.formBuilder = formBuilder;
|
|
4381
|
+
this.appsFlowSvc = appsFlowSvc;
|
|
4382
|
+
this.eacSvc = eacSvc;
|
|
4383
|
+
this.SeparatorKeysCodes = [ENTER, COMMA];
|
|
4384
|
+
this.BuildPath = null;
|
|
4385
|
+
// this.EditingSourceControlLookup = null;
|
|
4386
|
+
this.HostingDetails = new ProjectHostingDetails();
|
|
4387
|
+
this.SelectedBranches = [];
|
|
4388
|
+
this.SourceControlRoot = '';
|
|
4389
|
+
this.UseBranches = true;
|
|
4390
|
+
this.UseBuildPath = false;
|
|
4391
|
+
}
|
|
4392
|
+
// Fields
|
|
4393
|
+
// Properties
|
|
4394
|
+
get BranchesFormControl() {
|
|
4395
|
+
return this.DevOpsSourceControlFormGroup.get(this.SourceControlRoot + 'branches');
|
|
4396
|
+
}
|
|
4397
|
+
get BuildPathFormControl() {
|
|
4398
|
+
return this.DevOpsSourceControlFormGroup.get(this.SourceControlRoot + 'buildPath');
|
|
4399
|
+
}
|
|
4400
|
+
get DevOpsActionLookups() {
|
|
4401
|
+
return Object.keys(this.DevOpsActions || {});
|
|
4402
|
+
}
|
|
4403
|
+
get DevOpsActionLookup() {
|
|
4404
|
+
var _a, _b, _c;
|
|
4405
|
+
if (!!((_a = this.DevOpsActionLookupFormControl) === null || _a === void 0 ? void 0 : _a.value)) {
|
|
4406
|
+
return this.DevOpsActionLookupFormControl.value;
|
|
4407
|
+
}
|
|
4408
|
+
if (!!((_b = this.EditingSourceControl) === null || _b === void 0 ? void 0 : _b.DevOpsActionTriggerLookups)) {
|
|
4409
|
+
return (_c = this.EditingSourceControl) === null || _c === void 0 ? void 0 : _c.DevOpsActionTriggerLookups[0];
|
|
4410
|
+
}
|
|
4411
|
+
else {
|
|
4412
|
+
return null;
|
|
4413
|
+
}
|
|
4414
|
+
}
|
|
4415
|
+
get DevOpsActionLookupFormControl() {
|
|
4416
|
+
return this.DevOpsSourceControlFormGroup.get('devOpsActionLookup');
|
|
4417
|
+
}
|
|
4418
|
+
get DevOpsActions() {
|
|
4419
|
+
return this.Environment.DevOpsActions || {};
|
|
4420
|
+
}
|
|
4421
|
+
get EditingSourceControl() {
|
|
4422
|
+
var _a, _b;
|
|
4423
|
+
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;
|
|
4424
|
+
if (sc == null && this.EditingSourceControlLookup) {
|
|
4425
|
+
sc = {};
|
|
4426
|
+
}
|
|
4427
|
+
return sc;
|
|
4428
|
+
}
|
|
4429
|
+
get MainBranchFormControl() {
|
|
4430
|
+
return this.DevOpsSourceControlFormGroup.get(this.SourceControlRoot + 'mainBranch');
|
|
4431
|
+
}
|
|
4432
|
+
get OrganizationFormControl() {
|
|
4433
|
+
return this.DevOpsSourceControlFormGroup.get(this.SourceControlRoot + 'organization');
|
|
4434
|
+
}
|
|
4435
|
+
get RepositoryFormControl() {
|
|
4436
|
+
return this.DevOpsSourceControlFormGroup.get(this.SourceControlRoot + 'repository');
|
|
4437
|
+
}
|
|
4438
|
+
// Life Cycle
|
|
4439
|
+
ngAfterViewInit() { }
|
|
4440
|
+
ngOnDestroy() {
|
|
4441
|
+
this.destroyFormControls();
|
|
4442
|
+
}
|
|
4229
4443
|
ngOnInit() {
|
|
4444
|
+
console.log("org: ", this.EditingSourceControl);
|
|
4445
|
+
console.log("lookup: ", this.EditingSourceControlLookup);
|
|
4446
|
+
if (this.EditingSourceControlLookup === null) {
|
|
4447
|
+
this.CreateNewSourceControl();
|
|
4448
|
+
}
|
|
4449
|
+
console.log("org: ", this.EditingSourceControl);
|
|
4450
|
+
if (this.EditingSourceControl != null) {
|
|
4451
|
+
this.DevOpsSourceControlFormGroup = this.formBuilder.group({});
|
|
4452
|
+
this.setupFormControls();
|
|
4453
|
+
}
|
|
4454
|
+
this.RefreshOrganizations();
|
|
4455
|
+
}
|
|
4456
|
+
// API Methods
|
|
4457
|
+
AddBranchOption(event) {
|
|
4458
|
+
this.addBranchOption(event.value);
|
|
4459
|
+
event.input.value = '';
|
|
4460
|
+
}
|
|
4461
|
+
BranchOptionSelected(event) {
|
|
4462
|
+
this.addBranchOption(event.option.value);
|
|
4463
|
+
}
|
|
4464
|
+
BranchesChanged(branches) {
|
|
4465
|
+
this.loadProjectHostingDetails();
|
|
4466
|
+
}
|
|
4467
|
+
BuildPathChanged(event) {
|
|
4468
|
+
}
|
|
4469
|
+
CreateNewSourceControl() {
|
|
4470
|
+
this.SetEditingSourceControl(Guid.CreateRaw());
|
|
4471
|
+
}
|
|
4472
|
+
CreateRepository() {
|
|
4473
|
+
this.CreatingRepository = true;
|
|
4474
|
+
this.RepositoryFormControl.reset();
|
|
4475
|
+
}
|
|
4476
|
+
CancelCreateRepository() {
|
|
4477
|
+
this.CreatingRepository = false;
|
|
4478
|
+
}
|
|
4479
|
+
DevOpsActionLookupChanged(event) {
|
|
4480
|
+
this.configureDevOpsAction();
|
|
4481
|
+
}
|
|
4482
|
+
MainBranchChanged(event) {
|
|
4483
|
+
this.emitBranchesChanged();
|
|
4484
|
+
}
|
|
4485
|
+
OrganizationChanged(event) {
|
|
4486
|
+
const org = this.OrganizationFormControl;
|
|
4487
|
+
this.RepositoryFormControl.reset();
|
|
4488
|
+
if (this.UseBranches) {
|
|
4489
|
+
this.BranchesFormControl.reset();
|
|
4490
|
+
this.SelectedBranches = [];
|
|
4491
|
+
}
|
|
4492
|
+
this.listRepositories();
|
|
4493
|
+
}
|
|
4494
|
+
RefreshOrganizations() {
|
|
4495
|
+
var _a, _b, _c;
|
|
4496
|
+
// this.Loading = true;
|
|
4497
|
+
this.listOrganizations();
|
|
4498
|
+
(_a = this.OrganizationFormControl) === null || _a === void 0 ? void 0 : _a.reset();
|
|
4499
|
+
(_b = this.RepositoryFormControl) === null || _b === void 0 ? void 0 : _b.reset();
|
|
4500
|
+
if (this.UseBranches) {
|
|
4501
|
+
(_c = this.BranchesFormControl) === null || _c === void 0 ? void 0 : _c.reset();
|
|
4502
|
+
}
|
|
4503
|
+
}
|
|
4504
|
+
RemoveBranchOption(option) {
|
|
4505
|
+
const index = this.SelectedBranches.indexOf(option);
|
|
4506
|
+
if (index >= 0) {
|
|
4507
|
+
this.SelectedBranches.splice(index, 1);
|
|
4508
|
+
}
|
|
4509
|
+
this.emitBranchesChanged();
|
|
4510
|
+
}
|
|
4511
|
+
RepositoryChanged(event) {
|
|
4512
|
+
const repo = this.RepositoryFormControl;
|
|
4513
|
+
if (this.UseBranches) {
|
|
4514
|
+
this.BranchesFormControl.reset();
|
|
4515
|
+
this.SelectedBranches = [];
|
|
4516
|
+
this.listBranches();
|
|
4517
|
+
}
|
|
4518
|
+
if (!this.UseBranches) {
|
|
4519
|
+
this.listBuildPaths();
|
|
4520
|
+
}
|
|
4521
|
+
}
|
|
4522
|
+
SaveRepository() {
|
|
4523
|
+
this.Loading = true;
|
|
4524
|
+
const org = this.OrganizationFormControl.value;
|
|
4525
|
+
const repoName = this.RepositoryFormControl.value;
|
|
4526
|
+
this.appsFlowSvc
|
|
4527
|
+
.CreateRepository(org, repoName)
|
|
4528
|
+
.subscribe((response) => {
|
|
4529
|
+
if (response.Status.Code === 0) {
|
|
4530
|
+
this.listRepositories(repoName);
|
|
4531
|
+
this.CreatingRepository = false;
|
|
4532
|
+
}
|
|
4533
|
+
else {
|
|
4534
|
+
// TODO: Need to surface an error to the user...
|
|
4535
|
+
this.Loading = false;
|
|
4536
|
+
}
|
|
4537
|
+
});
|
|
4538
|
+
}
|
|
4539
|
+
SetEditingSourceControl(scLookup) {
|
|
4540
|
+
this.EditingSourceControlLookup = scLookup;
|
|
4541
|
+
}
|
|
4542
|
+
SubmitSourceControl() {
|
|
4543
|
+
console.log("source control submitted");
|
|
4544
|
+
}
|
|
4545
|
+
// public SaveSourceControl(): void {
|
|
4546
|
+
// const saveEnvReq: SaveEnvironmentAsCodeEventRequest = {
|
|
4547
|
+
// Environment: {
|
|
4548
|
+
// ...this.Environment,
|
|
4549
|
+
// Artifacts: this.Environment.Artifacts || {},
|
|
4550
|
+
// DevOpsActions: this.Environment.DevOpsActions || {},
|
|
4551
|
+
// Secrets: this.Environment.Secrets || {},
|
|
4552
|
+
// Sources: this.Environment.Sources || {},
|
|
4553
|
+
// },
|
|
4554
|
+
// EnvironmentLookup: this.EnvironmentLookup,
|
|
4555
|
+
// EnterpriseDataTokens: {},
|
|
4556
|
+
// };
|
|
4557
|
+
// let artifactLookup: string;
|
|
4558
|
+
// // let artifact: EaCArtifact = {
|
|
4559
|
+
// // ...this.Artifact,
|
|
4560
|
+
// // ...this.HostingDetailsFormControls
|
|
4561
|
+
// // .SelectedHostingOptionInputControlValues,
|
|
4562
|
+
// // };
|
|
4563
|
+
// if (!this.ArtifactLookup) {
|
|
4564
|
+
// artifactLookup = Guid.CreateRaw();
|
|
4565
|
+
// artifact = {
|
|
4566
|
+
// ...artifact,
|
|
4567
|
+
// Type: this.HostingDetailsFormControls.SelectedHostingOption
|
|
4568
|
+
// .ArtifactType,
|
|
4569
|
+
// Name: this.HostingDetailsFormControls.SelectedHostingOption.Name,
|
|
4570
|
+
// NPMRegistry: 'https://registry.npmjs.org/',
|
|
4571
|
+
// };
|
|
4572
|
+
// } else {
|
|
4573
|
+
// artifactLookup = this.ArtifactLookup;
|
|
4574
|
+
// }
|
|
4575
|
+
// saveEnvReq.Environment.Artifacts[artifactLookup] = artifact;
|
|
4576
|
+
// let devOpsActionLookup: string;
|
|
4577
|
+
// if (!this.DevOpsActionLookup) {
|
|
4578
|
+
// devOpsActionLookup = Guid.CreateRaw();
|
|
4579
|
+
// // const doa: EaCDevOpsAction = {
|
|
4580
|
+
// // ...this.DevOpsAction,
|
|
4581
|
+
// // ArtifactLookups: [artifactLookup],
|
|
4582
|
+
// // Name: this.HostingDetailsFormControls.DevOpsActionNameFormControl.value,
|
|
4583
|
+
// // Path: this.HostingDetailsFormControls.SelectedHostingOption.Path,
|
|
4584
|
+
// // Templates:
|
|
4585
|
+
// // this.HostingDetailsFormControls.SelectedHostingOption.Templates,
|
|
4586
|
+
// // };
|
|
4587
|
+
// if (this.HostingDetailsFormControls.NPMTokenFormControl?.value) {
|
|
4588
|
+
// const secretLookup = 'npm-access-token';
|
|
4589
|
+
// doa.SecretLookups = [secretLookup];
|
|
4590
|
+
// saveEnvReq.Environment.Secrets[secretLookup] = {
|
|
4591
|
+
// Name: 'NPM Access Token',
|
|
4592
|
+
// DataTokenLookup: secretLookup,
|
|
4593
|
+
// KnownAs: 'NPM_TOKEN',
|
|
4594
|
+
// };
|
|
4595
|
+
// saveEnvReq.EnterpriseDataTokens[secretLookup] = {
|
|
4596
|
+
// Name: saveEnvReq.Environment.Secrets[secretLookup].Name,
|
|
4597
|
+
// Description: saveEnvReq.Environment.Secrets[secretLookup].Name,
|
|
4598
|
+
// Value: this.NPMTokenFormControl.value,
|
|
4599
|
+
// };
|
|
4600
|
+
// }
|
|
4601
|
+
// saveEnvReq.Environment.DevOpsActions[devOpsActionLookup] = doa;
|
|
4602
|
+
// } else {
|
|
4603
|
+
// devOpsActionLookup = this.DevOpsActionLookupFormControl.value;
|
|
4604
|
+
// const doa: EaCDevOpsAction = {
|
|
4605
|
+
// ...this.DevOpsAction,
|
|
4606
|
+
// Name: this.HostingDetailsFormControls.DevOpsActionNameFormControl.value,
|
|
4607
|
+
// };
|
|
4608
|
+
// saveEnvReq.Environment.DevOpsActions[devOpsActionLookup] = doa;
|
|
4609
|
+
// }
|
|
4610
|
+
// let source: EaCSourceControl = {
|
|
4611
|
+
// ...this.EditingSourceControl,
|
|
4612
|
+
// Branches: this.SelectedBranches,
|
|
4613
|
+
// MainBranch: this.MainBranchFormControl.value,
|
|
4614
|
+
// };
|
|
4615
|
+
// source = {
|
|
4616
|
+
// ...source,
|
|
4617
|
+
// Type: 'GitHub',
|
|
4618
|
+
// Name: this.EditingSourceControlLookup,
|
|
4619
|
+
// DevOpsActionTriggerLookups: [devOpsActionLookup],
|
|
4620
|
+
// Organization:
|
|
4621
|
+
// this.OrganizationFormControl.value,
|
|
4622
|
+
// Repository: this.RepositoryFormControl.value,
|
|
4623
|
+
// };
|
|
4624
|
+
// const scLookup = `github://${source.Organization}/${source.Repository}`;
|
|
4625
|
+
// saveEnvReq.Environment.Sources[scLookup] = source;
|
|
4626
|
+
// this.eacSvc.SaveEnvironmentAsCode(saveEnvReq);
|
|
4627
|
+
// }
|
|
4628
|
+
// Helpers
|
|
4629
|
+
addBranchOption(value) {
|
|
4630
|
+
value = (value || '').trim();
|
|
4631
|
+
if (value && this.SelectedBranches.indexOf(value) < 0) {
|
|
4632
|
+
this.SelectedBranches.push(value);
|
|
4633
|
+
}
|
|
4634
|
+
this.BranchesInput.nativeElement.blur();
|
|
4635
|
+
this.emitBranchesChanged();
|
|
4636
|
+
}
|
|
4637
|
+
configureDevOpsAction() {
|
|
4638
|
+
setTimeout(() => {
|
|
4639
|
+
this.DevOpsActionLookupFormControl.setValue(this.DevOpsActionLookup);
|
|
4640
|
+
}, 0);
|
|
4641
|
+
}
|
|
4642
|
+
destroyFormControls() {
|
|
4643
|
+
var _a, _b, _c, _d;
|
|
4644
|
+
this.DevOpsSourceControlFormGroup.removeControl([this.SourceControlRoot, 'mainBranch'].join(''));
|
|
4645
|
+
(_a = this.DevOpsSourceControlFormGroup) === null || _a === void 0 ? void 0 : _a.removeControl([this.SourceControlRoot, 'branches'].join(''));
|
|
4646
|
+
(_b = this.DevOpsSourceControlFormGroup) === null || _b === void 0 ? void 0 : _b.removeControl([this.SourceControlRoot, 'buildPath'].join(''));
|
|
4647
|
+
this.SelectedBranches = [];
|
|
4648
|
+
(_c = this.DevOpsSourceControlFormGroup) === null || _c === void 0 ? void 0 : _c.removeControl([this.SourceControlRoot, 'organization'].join(''));
|
|
4649
|
+
(_d = this.DevOpsSourceControlFormGroup) === null || _d === void 0 ? void 0 : _d.removeControl([this.SourceControlRoot, 'repository'].join(''));
|
|
4650
|
+
}
|
|
4651
|
+
emitBranchesChanged() {
|
|
4652
|
+
var _a, _b;
|
|
4653
|
+
if (((_a = this.SelectedBranches) === null || _a === void 0 ? void 0 : _a.length) > 0 &&
|
|
4654
|
+
(!this.MainBranchFormControl.value ||
|
|
4655
|
+
this.SelectedBranches.indexOf(this.MainBranchFormControl.value) < 0)) {
|
|
4656
|
+
this.MainBranchFormControl.setValue(this.SelectedBranches.find((branch) => branch === 'main' || branch === 'master') || this.SelectedBranches[0]);
|
|
4657
|
+
}
|
|
4658
|
+
else if (((_b = this.SelectedBranches) === null || _b === void 0 ? void 0 : _b.length) <= 0) {
|
|
4659
|
+
this.MainBranchFormControl.reset();
|
|
4660
|
+
}
|
|
4661
|
+
this.BranchesFormControl.setValue(this.SelectedBranches.join(','));
|
|
4662
|
+
this.BranchesChanged(this.SelectedBranches || []);
|
|
4663
|
+
}
|
|
4664
|
+
listBranches() {
|
|
4665
|
+
if (this.UseBranches) {
|
|
4666
|
+
this.Loading = true;
|
|
4667
|
+
this.appsFlowSvc
|
|
4668
|
+
.ListBranches(this.OrganizationFormControl.value, this.RepositoryFormControl.value)
|
|
4669
|
+
.subscribe((response) => {
|
|
4670
|
+
var _a, _b, _c;
|
|
4671
|
+
this.BranchOptions = response.Model;
|
|
4672
|
+
this.Loading = false;
|
|
4673
|
+
if (((_b = (_a = this.EditingSourceControl) === null || _a === void 0 ? void 0 : _a.Branches) === null || _b === void 0 ? void 0 : _b.length) > 0) {
|
|
4674
|
+
this.SelectedBranches = this.EditingSourceControl.Branches;
|
|
4675
|
+
}
|
|
4676
|
+
else if (((_c = this.BranchOptions) === null || _c === void 0 ? void 0 : _c.length) === 1) {
|
|
4677
|
+
this.BranchesFormControl.setValue(this.BranchOptions[0].Name);
|
|
4678
|
+
this.SelectedBranches = [this.BranchOptions[0].Name];
|
|
4679
|
+
}
|
|
4680
|
+
this.emitBranchesChanged();
|
|
4681
|
+
this.listBuildPaths();
|
|
4682
|
+
});
|
|
4683
|
+
}
|
|
4684
|
+
}
|
|
4685
|
+
listBuildPaths() {
|
|
4686
|
+
if (this.UseBuildPath) {
|
|
4687
|
+
this.Loading = true;
|
|
4688
|
+
this.appsFlowSvc
|
|
4689
|
+
.ListBuildPaths(this.OrganizationFormControl.value, this.RepositoryFormControl.value)
|
|
4690
|
+
.subscribe((response) => {
|
|
4691
|
+
var _a;
|
|
4692
|
+
this.BuildPathOptions = response.Model;
|
|
4693
|
+
this.Loading = false;
|
|
4694
|
+
if (((_a = this.BuildPathOptions) === null || _a === void 0 ? void 0 : _a.length) === 1) {
|
|
4695
|
+
this.BuildPathFormControl.setValue(this.BuildPathOptions[0]);
|
|
4696
|
+
}
|
|
4697
|
+
});
|
|
4698
|
+
}
|
|
4699
|
+
}
|
|
4700
|
+
listOrganizations() {
|
|
4701
|
+
this.Loading = true;
|
|
4702
|
+
this.appsFlowSvc
|
|
4703
|
+
.ListOrganizations()
|
|
4704
|
+
.subscribe((response) => {
|
|
4705
|
+
var _a;
|
|
4706
|
+
this.OrganizationOptions = response.Model;
|
|
4707
|
+
this.Loading = false;
|
|
4708
|
+
if ((_a = this.EditingSourceControl) === null || _a === void 0 ? void 0 : _a.Organization) {
|
|
4709
|
+
setTimeout(() => {
|
|
4710
|
+
var _a;
|
|
4711
|
+
this.OrganizationFormControl.setValue(this.EditingSourceControl.Organization);
|
|
4712
|
+
this.listRepositories((_a = this.EditingSourceControl) === null || _a === void 0 ? void 0 : _a.Repository);
|
|
4713
|
+
}, 0);
|
|
4714
|
+
}
|
|
4715
|
+
});
|
|
4716
|
+
}
|
|
4717
|
+
listRepositories(activeRepo = null) {
|
|
4718
|
+
this.Loading = true;
|
|
4719
|
+
this.appsFlowSvc
|
|
4720
|
+
.ListRepositories(this.OrganizationFormControl.value)
|
|
4721
|
+
.subscribe((response) => {
|
|
4722
|
+
var _a;
|
|
4723
|
+
this.RepositoryOptions = response.Model;
|
|
4724
|
+
this.Loading = false;
|
|
4725
|
+
if (activeRepo) {
|
|
4726
|
+
setTimeout(() => {
|
|
4727
|
+
this.RepositoryFormControl.setValue(activeRepo);
|
|
4728
|
+
this.listBranches();
|
|
4729
|
+
if (!this.UseBranches) {
|
|
4730
|
+
this.listBuildPaths();
|
|
4731
|
+
}
|
|
4732
|
+
}, 0);
|
|
4733
|
+
}
|
|
4734
|
+
else if (((_a = this.RepositoryOptions) === null || _a === void 0 ? void 0 : _a.length) <= 0) {
|
|
4735
|
+
this.CreatingRepository = true;
|
|
4736
|
+
}
|
|
4737
|
+
});
|
|
4738
|
+
}
|
|
4739
|
+
loadProjectHostingDetails() {
|
|
4740
|
+
var _a, _b, _c, _d;
|
|
4741
|
+
if (((_a = this.SelectedBranches) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
4742
|
+
this.HostingDetails.Loading = true;
|
|
4743
|
+
this.appsFlowSvc
|
|
4744
|
+
.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)
|
|
4745
|
+
.subscribe((response) => {
|
|
4746
|
+
this.HostingDetails = response.Model;
|
|
4747
|
+
this.HostingDetails.Loading = false;
|
|
4748
|
+
this.configureDevOpsAction();
|
|
4749
|
+
}, (err) => {
|
|
4750
|
+
this.HostingDetails.Loading = false;
|
|
4751
|
+
});
|
|
4752
|
+
}
|
|
4753
|
+
}
|
|
4754
|
+
setupFormControls() {
|
|
4755
|
+
// this.destroyFormControls();
|
|
4756
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
4757
|
+
this.DevOpsSourceControlFormGroup.addControl('devOpsActionLookup', new FormControl(this.DevOpsActionLookup || '', []));
|
|
4758
|
+
this.DevOpsSourceControlFormGroup.addControl([this.SourceControlRoot, 'organization'].join(''), new FormControl((_a = this.EditingSourceControl.Organization) !== null && _a !== void 0 ? _a : '', Validators.required));
|
|
4759
|
+
this.DevOpsSourceControlFormGroup.addControl([this.SourceControlRoot, 'repository'].join(''), new FormControl((_b = this.EditingSourceControl.Repository) !== null && _b !== void 0 ? _b : '', Validators.required));
|
|
4760
|
+
if (this.UseBranches) {
|
|
4761
|
+
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));
|
|
4762
|
+
this.SelectedBranches = (_e = this.EditingSourceControl) === null || _e === void 0 ? void 0 : _e.Branches;
|
|
4763
|
+
this.DevOpsSourceControlFormGroup.addControl([this.SourceControlRoot, 'mainBranch'].join(''), new FormControl((_f = this.EditingSourceControl.MainBranch) !== null && _f !== void 0 ? _f : '', Validators.required));
|
|
4764
|
+
}
|
|
4765
|
+
if (this.UseBuildPath) {
|
|
4766
|
+
this.DevOpsSourceControlFormGroup.addControl([this.SourceControlRoot, 'buildPath'].join(''), new FormControl((_g = this.BuildPath) !== null && _g !== void 0 ? _g : '', Validators.required));
|
|
4767
|
+
}
|
|
4230
4768
|
}
|
|
4231
4769
|
}
|
|
4232
4770
|
DevopsSourceControlFormComponent.decorators = [
|
|
4233
4771
|
{ type: Component, args: [{
|
|
4234
4772
|
selector: 'lcu-devops-source-control-form',
|
|
4235
|
-
template: "<p>devops-source-control-form works!</p>\n",
|
|
4773
|
+
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>",
|
|
4774
|
+
styles: [".form-card,.sc-card{width:100%}"]
|
|
4775
|
+
},] }
|
|
4776
|
+
];
|
|
4777
|
+
DevopsSourceControlFormComponent.ctorParameters = () => [
|
|
4778
|
+
{ type: FormBuilder },
|
|
4779
|
+
{ type: ApplicationsFlowService },
|
|
4780
|
+
{ type: EaCService }
|
|
4781
|
+
];
|
|
4782
|
+
DevopsSourceControlFormComponent.propDecorators = {
|
|
4783
|
+
BranchesInput: [{ type: ViewChild, args: ['branches',] }],
|
|
4784
|
+
EditingSourceControlLookup: [{ type: Input, args: ['editing-source-control-lookup',] }],
|
|
4785
|
+
Environment: [{ type: Input, args: ['environment',] }]
|
|
4786
|
+
};
|
|
4787
|
+
|
|
4788
|
+
class SourceControlDialogComponent {
|
|
4789
|
+
constructor(dialogRef, data) {
|
|
4790
|
+
this.dialogRef = dialogRef;
|
|
4791
|
+
this.data = data;
|
|
4792
|
+
}
|
|
4793
|
+
ngOnInit() {
|
|
4794
|
+
}
|
|
4795
|
+
}
|
|
4796
|
+
SourceControlDialogComponent.decorators = [
|
|
4797
|
+
{ type: Component, args: [{
|
|
4798
|
+
selector: 'lcu-source-control-dialog',
|
|
4799
|
+
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>",
|
|
4236
4800
|
styles: [""]
|
|
4237
4801
|
},] }
|
|
4238
4802
|
];
|
|
4239
|
-
|
|
4803
|
+
SourceControlDialogComponent.ctorParameters = () => [
|
|
4804
|
+
{ type: MatDialogRef },
|
|
4805
|
+
{ type: undefined, decorators: [{ type: Inject, args: [MAT_DIALOG_DATA,] }] }
|
|
4806
|
+
];
|
|
4807
|
+
|
|
4808
|
+
class BuildPipelineDialogComponent {
|
|
4809
|
+
constructor(dialogRef, data) {
|
|
4810
|
+
this.dialogRef = dialogRef;
|
|
4811
|
+
this.data = data;
|
|
4812
|
+
}
|
|
4813
|
+
ngOnInit() {
|
|
4814
|
+
}
|
|
4815
|
+
}
|
|
4816
|
+
BuildPipelineDialogComponent.decorators = [
|
|
4817
|
+
{ type: Component, args: [{
|
|
4818
|
+
selector: 'lcu-build-pipeline-dialog',
|
|
4819
|
+
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>\n",
|
|
4820
|
+
styles: [""]
|
|
4821
|
+
},] }
|
|
4822
|
+
];
|
|
4823
|
+
BuildPipelineDialogComponent.ctorParameters = () => [
|
|
4824
|
+
{ type: MatDialogRef },
|
|
4825
|
+
{ type: undefined, decorators: [{ type: Inject, args: [MAT_DIALOG_DATA,] }] }
|
|
4826
|
+
];
|
|
4240
4827
|
|
|
4241
4828
|
class ApplicationsFlowModule {
|
|
4242
4829
|
static forRoot() {
|
|
@@ -4292,7 +4879,9 @@ ApplicationsFlowModule.decorators = [
|
|
|
4292
4879
|
ProcessorDetailsFormComponent,
|
|
4293
4880
|
SourceControlFormComponent,
|
|
4294
4881
|
BuildPipelineFormComponent,
|
|
4295
|
-
DevopsSourceControlFormComponent
|
|
4882
|
+
DevopsSourceControlFormComponent,
|
|
4883
|
+
SourceControlDialogComponent,
|
|
4884
|
+
BuildPipelineDialogComponent
|
|
4296
4885
|
],
|
|
4297
4886
|
imports: [
|
|
4298
4887
|
FathymSharedModule,
|
|
@@ -4342,7 +4931,9 @@ ApplicationsFlowModule.decorators = [
|
|
|
4342
4931
|
ProcessorDetailsFormComponent,
|
|
4343
4932
|
SourceControlFormComponent,
|
|
4344
4933
|
BuildPipelineFormComponent,
|
|
4345
|
-
DevopsSourceControlFormComponent
|
|
4934
|
+
DevopsSourceControlFormComponent,
|
|
4935
|
+
SourceControlDialogComponent,
|
|
4936
|
+
BuildPipelineDialogComponent
|
|
4346
4937
|
],
|
|
4347
4938
|
entryComponents: [
|
|
4348
4939
|
ApplicationsFlowProjectsElementComponent,
|
|
@@ -4379,7 +4970,9 @@ ApplicationsFlowModule.decorators = [
|
|
|
4379
4970
|
ProcessorDetailsFormComponent,
|
|
4380
4971
|
SourceControlFormComponent,
|
|
4381
4972
|
BuildPipelineFormComponent,
|
|
4382
|
-
DevopsSourceControlFormComponent
|
|
4973
|
+
DevopsSourceControlFormComponent,
|
|
4974
|
+
SourceControlDialogComponent,
|
|
4975
|
+
BuildPipelineDialogComponent
|
|
4383
4976
|
],
|
|
4384
4977
|
},] }
|
|
4385
4978
|
];
|
|
@@ -4412,5 +5005,5 @@ class FormModel {
|
|
|
4412
5005
|
* Generated bundle index. Do not edit.
|
|
4413
5006
|
*/
|
|
4414
5007
|
|
|
4415
|
-
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, 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 };
|
|
5008
|
+
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 };
|
|
4416
5009
|
//# sourceMappingURL=lowcodeunit-applications-flow-common.js.map
|