@lowcodeunit/applications-flow-common 1.33.98-lets-get-social-ish → 1.33.102-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 +371 -27
- 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 +175 -14
- package/esm2015/lib/controls/devops-source-control-form/devops-source-control-form.component.js +114 -7
- 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 +345 -26
- 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 +23 -10
- 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 +6 -1
- 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 +16 -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,16 +4220,23 @@ SourceControlFormComponent.propDecorators = {
|
|
|
4211
4220
|
};
|
|
4212
4221
|
|
|
4213
4222
|
class BuildPipelineFormComponent {
|
|
4214
|
-
constructor(
|
|
4215
|
-
this.
|
|
4223
|
+
constructor(eacSvc, formBuilder, appsFlowSvc) {
|
|
4224
|
+
this.eacSvc = eacSvc;
|
|
4225
|
+
this.formBuilder = formBuilder;
|
|
4216
4226
|
this.appsFlowSvc = appsFlowSvc;
|
|
4217
4227
|
this.HostingDetails = new ProjectHostingDetails();
|
|
4218
4228
|
}
|
|
4219
|
-
//
|
|
4229
|
+
// @Input('main-branch')
|
|
4230
|
+
// public MainBranch: string;
|
|
4231
|
+
// @Input('organization')
|
|
4232
|
+
// public Organization: string;
|
|
4233
|
+
// @Input('repository')
|
|
4234
|
+
// public Repository: string;
|
|
4220
4235
|
get Artifact() {
|
|
4221
|
-
var _a, _b;
|
|
4222
|
-
|
|
4223
|
-
|
|
4236
|
+
var _a, _b, _c;
|
|
4237
|
+
console.log("ARTIFACT: ", (_a = this.Environment) === null || _a === void 0 ? void 0 : _a.Artifacts[this.ArtifactLookup]);
|
|
4238
|
+
return ((_b = this.Environment) === null || _b === void 0 ? void 0 : _b.Artifacts) && this.ArtifactLookup
|
|
4239
|
+
? ((_c = this.Environment) === null || _c === void 0 ? void 0 : _c.Artifacts[this.ArtifactLookup]) || {}
|
|
4224
4240
|
: {};
|
|
4225
4241
|
}
|
|
4226
4242
|
get ArtifactLookup() {
|
|
@@ -4228,6 +4244,10 @@ class BuildPipelineFormComponent {
|
|
|
4228
4244
|
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;
|
|
4229
4245
|
return artLookup;
|
|
4230
4246
|
}
|
|
4247
|
+
get BuildPipelineFormControl() {
|
|
4248
|
+
var _a;
|
|
4249
|
+
return (_a = this.BuildPipelineFormGroup) === null || _a === void 0 ? void 0 : _a.controls.buildPipeline;
|
|
4250
|
+
}
|
|
4231
4251
|
get DevOpsAction() {
|
|
4232
4252
|
return this.Environment.DevOpsActions && this.DevOpsActionLookup
|
|
4233
4253
|
? this.Environment.DevOpsActions[this.DevOpsActionLookup] || {}
|
|
@@ -4236,6 +4256,9 @@ class BuildPipelineFormComponent {
|
|
|
4236
4256
|
get DevOpsActions() {
|
|
4237
4257
|
return this.Environment.DevOpsActions || {};
|
|
4238
4258
|
}
|
|
4259
|
+
get DevOpsActionNameFormControl() {
|
|
4260
|
+
return this.BuildPipelineFormGroup.get('devOpsActionName');
|
|
4261
|
+
}
|
|
4239
4262
|
get EditingSourceControl() {
|
|
4240
4263
|
var _a, _b;
|
|
4241
4264
|
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;
|
|
@@ -4244,6 +4267,22 @@ class BuildPipelineFormComponent {
|
|
|
4244
4267
|
}
|
|
4245
4268
|
return sc;
|
|
4246
4269
|
}
|
|
4270
|
+
get NPMTokenFormControl() {
|
|
4271
|
+
return this.BuildPipelineFormGroup.get('npmToken');
|
|
4272
|
+
}
|
|
4273
|
+
// (ho) => ho.Lookup === this.BuildPipeline
|
|
4274
|
+
get SelectedHostingOption() {
|
|
4275
|
+
var _a, _b;
|
|
4276
|
+
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);
|
|
4277
|
+
}
|
|
4278
|
+
get SelectedHostingOptionInputControlValues() {
|
|
4279
|
+
var _a, _b;
|
|
4280
|
+
return (_b = (_a = this.SelectedHostingOption) === null || _a === void 0 ? void 0 : _a.Inputs) === null || _b === void 0 ? void 0 : _b.reduce((prev, cur) => {
|
|
4281
|
+
const res = Object.assign({}, prev);
|
|
4282
|
+
res[cur.Lookup] = this.BuildPipelineFormGroup.controls[cur.Lookup].value;
|
|
4283
|
+
return res;
|
|
4284
|
+
}, {});
|
|
4285
|
+
}
|
|
4247
4286
|
get SourceControlLookups() {
|
|
4248
4287
|
return Object.keys(this.SourceControls || {});
|
|
4249
4288
|
}
|
|
@@ -4251,47 +4290,178 @@ class BuildPipelineFormComponent {
|
|
|
4251
4290
|
return this.Environment.Sources || {};
|
|
4252
4291
|
}
|
|
4253
4292
|
ngOnInit() {
|
|
4293
|
+
this.BuildPipelineFormGroup = this.formBuilder.group({});
|
|
4294
|
+
console.log("ARTIFACT: ", this.Artifact);
|
|
4295
|
+
// this.BuildPipeline ||
|
|
4296
|
+
// github-artifacts-release is this.HostingDetails?.HostingOptions[0]?.Lookup
|
|
4297
|
+
if (this.BuildPipelineFormGroup != null) {
|
|
4298
|
+
this.BuildPipelineFormGroup.removeControl('hostingDetails');
|
|
4299
|
+
}
|
|
4300
|
+
this.BuildPipelineFormGroup.addControl('hostingDetails', this.formBuilder.group({
|
|
4301
|
+
buildPipeline: [this.BuildPipeline, [Validators.required]],
|
|
4302
|
+
}));
|
|
4303
|
+
this.loadProjectHostingDetails();
|
|
4304
|
+
// this.setupControlsForForm();
|
|
4254
4305
|
}
|
|
4255
4306
|
//API METHODS
|
|
4256
|
-
|
|
4307
|
+
BuildPipelineChanged() {
|
|
4308
|
+
var _a, _b;
|
|
4309
|
+
console.log("build pipeline value: ", (_a = this.BuildPipelineFormControl) === null || _a === void 0 ? void 0 : _a.value);
|
|
4310
|
+
this.BuildPipeline = (_b = this.BuildPipelineFormControl) === null || _b === void 0 ? void 0 : _b.value;
|
|
4311
|
+
this.setupControlsForForm();
|
|
4312
|
+
}
|
|
4313
|
+
SubmitBuildPipeline() {
|
|
4314
|
+
}
|
|
4315
|
+
SaveEnvironment() {
|
|
4316
|
+
var _a;
|
|
4317
|
+
const saveEnvReq = {
|
|
4318
|
+
Environment: Object.assign(Object.assign({}, this.Environment), { Artifacts: this.Environment.Artifacts || {}, DevOpsActions: this.Environment.DevOpsActions || {}, Secrets: this.Environment.Secrets || {}, Sources: this.Environment.Sources || {} }),
|
|
4319
|
+
EnvironmentLookup: this.EnvironmentLookup,
|
|
4320
|
+
EnterpriseDataTokens: {},
|
|
4321
|
+
};
|
|
4322
|
+
let artifactLookup;
|
|
4323
|
+
let artifact = Object.assign(Object.assign({}, this.Artifact), this.SelectedHostingOptionInputControlValues);
|
|
4324
|
+
if (!this.ArtifactLookup) {
|
|
4325
|
+
artifactLookup = Guid.CreateRaw();
|
|
4326
|
+
artifact = Object.assign(Object.assign({}, artifact), { Type: this.SelectedHostingOption
|
|
4327
|
+
.ArtifactType, Name: this.SelectedHostingOption.Name, NPMRegistry: 'https://registry.npmjs.org/' });
|
|
4328
|
+
}
|
|
4329
|
+
else {
|
|
4330
|
+
artifactLookup = this.ArtifactLookup;
|
|
4331
|
+
}
|
|
4332
|
+
saveEnvReq.Environment.Artifacts[artifactLookup] = artifact;
|
|
4333
|
+
let devOpsActionLookup;
|
|
4334
|
+
if (!this.DevOpsActionLookup) {
|
|
4335
|
+
devOpsActionLookup = Guid.CreateRaw();
|
|
4336
|
+
const doa = Object.assign(Object.assign({}, this.DevOpsAction), { ArtifactLookups: [artifactLookup], Name: this.DevOpsActionNameFormControl.value, Path: this.SelectedHostingOption.Path, Templates: this.SelectedHostingOption.Templates });
|
|
4337
|
+
if ((_a = this.NPMTokenFormControl) === null || _a === void 0 ? void 0 : _a.value) {
|
|
4338
|
+
const secretLookup = 'npm-access-token';
|
|
4339
|
+
doa.SecretLookups = [secretLookup];
|
|
4340
|
+
saveEnvReq.Environment.Secrets[secretLookup] = {
|
|
4341
|
+
Name: 'NPM Access Token',
|
|
4342
|
+
DataTokenLookup: secretLookup,
|
|
4343
|
+
KnownAs: 'NPM_TOKEN',
|
|
4344
|
+
};
|
|
4345
|
+
saveEnvReq.EnterpriseDataTokens[secretLookup] = {
|
|
4346
|
+
Name: saveEnvReq.Environment.Secrets[secretLookup].Name,
|
|
4347
|
+
Description: saveEnvReq.Environment.Secrets[secretLookup].Name,
|
|
4348
|
+
Value: this.NPMTokenFormControl.value,
|
|
4349
|
+
};
|
|
4350
|
+
}
|
|
4351
|
+
saveEnvReq.Environment.DevOpsActions[devOpsActionLookup] = doa;
|
|
4352
|
+
}
|
|
4353
|
+
else {
|
|
4354
|
+
devOpsActionLookup = this.DevOpsActionLookup;
|
|
4355
|
+
const doa = Object.assign(Object.assign({}, this.DevOpsAction), { Name: this.DevOpsActionNameFormControl.value });
|
|
4356
|
+
saveEnvReq.Environment.DevOpsActions[devOpsActionLookup] = doa;
|
|
4357
|
+
}
|
|
4358
|
+
// let source: EaCSourceControl = {
|
|
4359
|
+
// ...this.EditingSourceControl,
|
|
4360
|
+
// Branches: this.SourceControlFormControls.SelectedBranches,
|
|
4361
|
+
// MainBranch: this.SourceControlFormControls.MainBranchFormControl.value,
|
|
4362
|
+
// };
|
|
4363
|
+
// source = {
|
|
4364
|
+
// ...source,
|
|
4365
|
+
// Type: 'GitHub',
|
|
4366
|
+
// Name: this.EditingSourceControlLookup,
|
|
4367
|
+
// DevOpsActionTriggerLookups: [devOpsActionLookup],
|
|
4368
|
+
// Organization:
|
|
4369
|
+
// this.SourceControlFormControls.OrganizationFormControl.value,
|
|
4370
|
+
// Repository: this.SourceControlFormControls.RepositoryFormControl.value,
|
|
4371
|
+
// };
|
|
4372
|
+
// const scLookup = `github://${source.Organization}/${source.Repository}`;
|
|
4373
|
+
// saveEnvReq.Environment.Sources[scLookup] = source;
|
|
4374
|
+
this.eacSvc.SaveEnvironmentAsCode(saveEnvReq);
|
|
4375
|
+
}
|
|
4376
|
+
// Helpers
|
|
4377
|
+
setupControlsForForm() {
|
|
4378
|
+
var _a, _b, _c, _d, _e, _f;
|
|
4379
|
+
for (const ctrlName in this.BuildPipelineFormGroup.controls) {
|
|
4380
|
+
//devOpsAction doesn't exist
|
|
4381
|
+
//removes hosting details
|
|
4382
|
+
if (ctrlName !== 'buildPipeline' && ctrlName !== 'devOpsAction') {
|
|
4383
|
+
console.log("removing control: ", ctrlName);
|
|
4384
|
+
this.BuildPipelineFormGroup.removeControl(ctrlName);
|
|
4385
|
+
}
|
|
4386
|
+
}
|
|
4387
|
+
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]));
|
|
4388
|
+
(_d = (_c = this.SelectedHostingOption) === null || _c === void 0 ? void 0 : _c.Inputs) === null || _d === void 0 ? void 0 : _d.forEach((input) => {
|
|
4389
|
+
const validators = input.Required ? [Validators.required] : [];
|
|
4390
|
+
this.BuildPipelineFormGroup.addControl(input.Lookup, this.formBuilder.control(this.Artifact[input.Lookup] || input.DefaultValue || '', validators));
|
|
4391
|
+
// if (this.Disabled) {
|
|
4392
|
+
// this.FormGroup.controls[input.Lookup].disable();
|
|
4393
|
+
// }
|
|
4394
|
+
});
|
|
4395
|
+
if (((_e = this.BuildPipelineFormControl) === null || _e === void 0 ? void 0 : _e.value) === 'npm-release') {
|
|
4396
|
+
if (!this.BuildPipelineFormGroup.controls.npmToken) {
|
|
4397
|
+
this.BuildPipelineFormGroup.addControl('npmToken', this.formBuilder.control('', this.Disabled ? [] : [Validators.required]));
|
|
4398
|
+
if (this.Disabled) {
|
|
4399
|
+
this.BuildPipelineFormGroup.controls.npmToken.disable();
|
|
4400
|
+
}
|
|
4401
|
+
}
|
|
4402
|
+
}
|
|
4403
|
+
else if (((_f = this.BuildPipelineFormControl) === null || _f === void 0 ? void 0 : _f.value) === 'github-artifacts-release') {
|
|
4404
|
+
if (this.BuildPipelineFormGroup.controls.npmToken) {
|
|
4405
|
+
this.BuildPipelineFormGroup.removeControl('npmToken');
|
|
4406
|
+
}
|
|
4407
|
+
}
|
|
4408
|
+
}
|
|
4257
4409
|
loadProjectHostingDetails() {
|
|
4258
4410
|
this.HostingDetails.Loading = true;
|
|
4411
|
+
// this.Organization,
|
|
4412
|
+
// this.Repository,
|
|
4413
|
+
// this.MainBranch
|
|
4414
|
+
// "powhound4",
|
|
4415
|
+
// "RedwoodCrystals",
|
|
4416
|
+
// "master"
|
|
4259
4417
|
this.appsFlowSvc
|
|
4260
|
-
.
|
|
4418
|
+
.NewLoadProjectHostingDetails()
|
|
4261
4419
|
.subscribe((response) => {
|
|
4420
|
+
var _a, _b, _c;
|
|
4262
4421
|
this.HostingDetails = response.Model;
|
|
4422
|
+
console.log("response: ", response);
|
|
4263
4423
|
this.HostingDetails.Loading = false;
|
|
4424
|
+
this.BuildPipeline =
|
|
4425
|
+
((_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 : '';
|
|
4426
|
+
console.log("Build Pipeline HERE= ", this.BuildPipeline);
|
|
4427
|
+
this.setupControlsForForm();
|
|
4264
4428
|
}, (err) => {
|
|
4429
|
+
console.log("hosting details LOADING EERR: ", this.HostingDetails);
|
|
4430
|
+
console.log("ERR: ", err);
|
|
4265
4431
|
this.HostingDetails.Loading = false;
|
|
4266
4432
|
});
|
|
4433
|
+
console.log("HOSTING DETAILS: ", this.HostingDetails);
|
|
4267
4434
|
}
|
|
4268
4435
|
}
|
|
4269
4436
|
BuildPipelineFormComponent.decorators = [
|
|
4270
4437
|
{ type: Component, args: [{
|
|
4271
4438
|
selector: 'lcu-build-pipeline-form',
|
|
4272
|
-
template: "<
|
|
4439
|
+
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 <!-- [disabled]=\"!SecurityFormGroup.valid || !SecurityFormGroup.dirty\" -->\n <button mat-raised-button type=\"submit\">Save</button>\n </mat-card-actions>\n </mat-card>\n</form>\n",
|
|
4273
4440
|
styles: [""]
|
|
4274
4441
|
},] }
|
|
4275
4442
|
];
|
|
4276
4443
|
BuildPipelineFormComponent.ctorParameters = () => [
|
|
4444
|
+
{ type: EaCService },
|
|
4277
4445
|
{ type: FormBuilder },
|
|
4278
4446
|
{ type: ApplicationsFlowService }
|
|
4279
4447
|
];
|
|
4280
4448
|
BuildPipelineFormComponent.propDecorators = {
|
|
4449
|
+
BuildPipeline: [{ type: Input, args: ['build-pipeline',] }],
|
|
4281
4450
|
DevOpsActionLookup: [{ type: Input, args: ['devops-action-lookup',] }],
|
|
4451
|
+
Disabled: [{ type: Input, args: ['disabled',] }],
|
|
4282
4452
|
Environment: [{ type: Input, args: ['environment',] }],
|
|
4283
|
-
|
|
4284
|
-
Organization: [{ type: Input, args: ['organization',] }],
|
|
4285
|
-
Repository: [{ type: Input, args: ['repository',] }]
|
|
4453
|
+
EnvironmentLookup: [{ type: Input, args: ['environment-lookup',] }]
|
|
4286
4454
|
};
|
|
4287
4455
|
|
|
4288
4456
|
class DevopsSourceControlFormComponent {
|
|
4289
4457
|
// Constructors
|
|
4290
|
-
constructor(formBuilder, appsFlowSvc) {
|
|
4458
|
+
constructor(formBuilder, appsFlowSvc, eacSvc) {
|
|
4291
4459
|
this.formBuilder = formBuilder;
|
|
4292
4460
|
this.appsFlowSvc = appsFlowSvc;
|
|
4461
|
+
this.eacSvc = eacSvc;
|
|
4293
4462
|
this.SeparatorKeysCodes = [ENTER, COMMA];
|
|
4294
4463
|
this.BuildPath = null;
|
|
4464
|
+
// this.EditingSourceControlLookup = null;
|
|
4295
4465
|
this.HostingDetails = new ProjectHostingDetails();
|
|
4296
4466
|
this.SelectedBranches = [];
|
|
4297
4467
|
this.SourceControlRoot = '';
|
|
@@ -4350,7 +4520,16 @@ class DevopsSourceControlFormComponent {
|
|
|
4350
4520
|
this.destroyFormControls();
|
|
4351
4521
|
}
|
|
4352
4522
|
ngOnInit() {
|
|
4353
|
-
this.
|
|
4523
|
+
console.log("org: ", this.EditingSourceControl);
|
|
4524
|
+
console.log("lookup: ", this.EditingSourceControlLookup);
|
|
4525
|
+
if (this.EditingSourceControlLookup === null) {
|
|
4526
|
+
this.CreateNewSourceControl();
|
|
4527
|
+
}
|
|
4528
|
+
console.log("org: ", this.EditingSourceControl);
|
|
4529
|
+
if (this.EditingSourceControl != null) {
|
|
4530
|
+
this.DevOpsSourceControlFormGroup = this.formBuilder.group({});
|
|
4531
|
+
this.setupFormControls();
|
|
4532
|
+
}
|
|
4354
4533
|
this.RefreshOrganizations();
|
|
4355
4534
|
}
|
|
4356
4535
|
// API Methods
|
|
@@ -4366,6 +4545,9 @@ class DevopsSourceControlFormComponent {
|
|
|
4366
4545
|
}
|
|
4367
4546
|
BuildPathChanged(event) {
|
|
4368
4547
|
}
|
|
4548
|
+
CreateNewSourceControl() {
|
|
4549
|
+
this.SetEditingSourceControl(Guid.CreateRaw());
|
|
4550
|
+
}
|
|
4369
4551
|
CreateRepository() {
|
|
4370
4552
|
this.CreatingRepository = true;
|
|
4371
4553
|
this.RepositoryFormControl.reset();
|
|
@@ -4433,6 +4615,95 @@ class DevopsSourceControlFormComponent {
|
|
|
4433
4615
|
}
|
|
4434
4616
|
});
|
|
4435
4617
|
}
|
|
4618
|
+
SetEditingSourceControl(scLookup) {
|
|
4619
|
+
this.EditingSourceControlLookup = scLookup;
|
|
4620
|
+
}
|
|
4621
|
+
SubmitSourceControl() {
|
|
4622
|
+
console.log("source control submitted");
|
|
4623
|
+
}
|
|
4624
|
+
// public SaveSourceControl(): void {
|
|
4625
|
+
// const saveEnvReq: SaveEnvironmentAsCodeEventRequest = {
|
|
4626
|
+
// Environment: {
|
|
4627
|
+
// ...this.Environment,
|
|
4628
|
+
// Artifacts: this.Environment.Artifacts || {},
|
|
4629
|
+
// DevOpsActions: this.Environment.DevOpsActions || {},
|
|
4630
|
+
// Secrets: this.Environment.Secrets || {},
|
|
4631
|
+
// Sources: this.Environment.Sources || {},
|
|
4632
|
+
// },
|
|
4633
|
+
// EnvironmentLookup: this.EnvironmentLookup,
|
|
4634
|
+
// EnterpriseDataTokens: {},
|
|
4635
|
+
// };
|
|
4636
|
+
// let artifactLookup: string;
|
|
4637
|
+
// let artifact: EaCArtifact = {
|
|
4638
|
+
// ...this.Artifact,
|
|
4639
|
+
// ...this.HostingDetailsFormControls
|
|
4640
|
+
// .SelectedHostingOptionInputControlValues,
|
|
4641
|
+
// };
|
|
4642
|
+
// // if (!this.ArtifactLookup) {
|
|
4643
|
+
// // artifactLookup = Guid.CreateRaw();
|
|
4644
|
+
// // artifact = {
|
|
4645
|
+
// // ...artifact,
|
|
4646
|
+
// // Type: this.HostingDetailsFormControls.SelectedHostingOption
|
|
4647
|
+
// // .ArtifactType,
|
|
4648
|
+
// // Name: this.HostingDetailsFormControls.SelectedHostingOption.Name,
|
|
4649
|
+
// // NPMRegistry: 'https://registry.npmjs.org/',
|
|
4650
|
+
// // };
|
|
4651
|
+
// // } else {
|
|
4652
|
+
// // artifactLookup = this.ArtifactLookup;
|
|
4653
|
+
// // }
|
|
4654
|
+
// saveEnvReq.Environment.Artifacts[artifactLookup] = artifact;
|
|
4655
|
+
// let devOpsActionLookup: string;
|
|
4656
|
+
// if (!this.DevOpsActionLookup) {
|
|
4657
|
+
// devOpsActionLookup = Guid.CreateRaw();
|
|
4658
|
+
// // const doa: EaCDevOpsAction = {
|
|
4659
|
+
// // ...this.DevOpsAction,
|
|
4660
|
+
// // ArtifactLookups: [artifactLookup],
|
|
4661
|
+
// // Name: this.HostingDetailsFormControls.DevOpsActionNameFormControl.value,
|
|
4662
|
+
// // Path: this.HostingDetailsFormControls.SelectedHostingOption.Path,
|
|
4663
|
+
// // Templates:
|
|
4664
|
+
// // this.HostingDetailsFormControls.SelectedHostingOption.Templates,
|
|
4665
|
+
// // };
|
|
4666
|
+
// if (this.HostingDetailsFormControls.NPMTokenFormControl?.value) {
|
|
4667
|
+
// const secretLookup = 'npm-access-token';
|
|
4668
|
+
// doa.SecretLookups = [secretLookup];
|
|
4669
|
+
// saveEnvReq.Environment.Secrets[secretLookup] = {
|
|
4670
|
+
// Name: 'NPM Access Token',
|
|
4671
|
+
// DataTokenLookup: secretLookup,
|
|
4672
|
+
// KnownAs: 'NPM_TOKEN',
|
|
4673
|
+
// };
|
|
4674
|
+
// saveEnvReq.EnterpriseDataTokens[secretLookup] = {
|
|
4675
|
+
// Name: saveEnvReq.Environment.Secrets[secretLookup].Name,
|
|
4676
|
+
// Description: saveEnvReq.Environment.Secrets[secretLookup].Name,
|
|
4677
|
+
// Value: this.NPMTokenFormControl.value,
|
|
4678
|
+
// };
|
|
4679
|
+
// }
|
|
4680
|
+
// saveEnvReq.Environment.DevOpsActions[devOpsActionLookup] = doa;
|
|
4681
|
+
// } else {
|
|
4682
|
+
// devOpsActionLookup = this.DevOpsActionLookupFormControl.value;
|
|
4683
|
+
// const doa: EaCDevOpsAction = {
|
|
4684
|
+
// ...this.DevOpsAction,
|
|
4685
|
+
// Name: this.HostingDetailsFormControls.DevOpsActionNameFormControl.value,
|
|
4686
|
+
// };
|
|
4687
|
+
// saveEnvReq.Environment.DevOpsActions[devOpsActionLookup] = doa;
|
|
4688
|
+
// }
|
|
4689
|
+
// let source: EaCSourceControl = {
|
|
4690
|
+
// ...this.EditingSourceControl,
|
|
4691
|
+
// Branches: this.SelectedBranches,
|
|
4692
|
+
// MainBranch: this.MainBranchFormControl.value,
|
|
4693
|
+
// };
|
|
4694
|
+
// source = {
|
|
4695
|
+
// ...source,
|
|
4696
|
+
// Type: 'GitHub',
|
|
4697
|
+
// Name: this.EditingSourceControlLookup,
|
|
4698
|
+
// DevOpsActionTriggerLookups: [devOpsActionLookup],
|
|
4699
|
+
// Organization:
|
|
4700
|
+
// this.OrganizationFormControl.value,
|
|
4701
|
+
// Repository: this.RepositoryFormControl.value,
|
|
4702
|
+
// };
|
|
4703
|
+
// const scLookup = `github://${source.Organization}/${source.Repository}`;
|
|
4704
|
+
// saveEnvReq.Environment.Sources[scLookup] = source;
|
|
4705
|
+
// this.eacSvc.SaveEnvironmentAsCode(saveEnvReq);
|
|
4706
|
+
// }
|
|
4436
4707
|
// Helpers
|
|
4437
4708
|
addBranchOption(value) {
|
|
4438
4709
|
value = (value || '').trim();
|
|
@@ -4560,8 +4831,8 @@ class DevopsSourceControlFormComponent {
|
|
|
4560
4831
|
}
|
|
4561
4832
|
}
|
|
4562
4833
|
setupFormControls() {
|
|
4834
|
+
// this.destroyFormControls();
|
|
4563
4835
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
4564
|
-
this.destroyFormControls();
|
|
4565
4836
|
this.DevOpsSourceControlFormGroup.addControl('devOpsActionLookup', new FormControl(this.DevOpsActionLookup || '', []));
|
|
4566
4837
|
this.DevOpsSourceControlFormGroup.addControl([this.SourceControlRoot, 'organization'].join(''), new FormControl((_a = this.EditingSourceControl.Organization) !== null && _a !== void 0 ? _a : '', Validators.required));
|
|
4567
4838
|
this.DevOpsSourceControlFormGroup.addControl([this.SourceControlRoot, 'repository'].join(''), new FormControl((_b = this.EditingSourceControl.Repository) !== null && _b !== void 0 ? _b : '', Validators.required));
|
|
@@ -4578,19 +4849,61 @@ class DevopsSourceControlFormComponent {
|
|
|
4578
4849
|
DevopsSourceControlFormComponent.decorators = [
|
|
4579
4850
|
{ type: Component, args: [{
|
|
4580
4851
|
selector: 'lcu-devops-source-control-form',
|
|
4581
|
-
template: "<div class=\"form-card\" fxFlex=\"35%\" fxFlex.lt-md=\"100%\">\n <mat-card class=\"spread\">\n <mat-card-header>\n <mat-card-title> Source Control </mat-card-title>\n\n <div fxFlex></div>\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 <div [formGroup]=\"DevOpsSourceControlFormGroup\">\n <div class=\"card\">\n <mat-form-field class=\"mat-full-width\">\n <mat-select\n formControlName=\"devOpsActionLookup\"\n placeholder=\"DevOps Action\"\n [disabled]=\"HostingDetails?.Loading\"\n (selectionChange)=\"DevOpsActionLookupChanged($event)\"\n >\n <ng-container\n *ngFor=\"let devOpsActionLookup of DevOpsActionLookups\"\n >\n <mat-option\n [value]=\"devOpsActionLookup\"\n *ngIf=\"DevOpsActions[devOpsActionLookup]; let devOpsAction\"\n >\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\n class=\"mat-full-width with-hint\"\n *ngIf=\"OrganizationOptions?.length > 0\"\n >\n <mat-icon class=\"org-icon\" matPrefix>corporate_fare</mat-icon>\n \n <mat-select\n [formControlName]=\"SourceControlRoot + 'organization'\"\n placeholder=\"Organization\"\n (selectionChange)=\"OrganizationChanged($event)\"\n [disabled]=\"Loading || HostingDetails?.Loading\"\n required\n >\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\n matSuffix\n href=\"/.oauth/github?oauth-force-edit=true\"\n target=\"_blank\"\n color=\"accent\"\n >\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\n href=\"https://github.com/account/organizations/new\"\n target=\"_blank\"\n >\n start here\n </a>\n </mat-hint>\n </mat-form-field>\n </div>\n \n <div\n class=\"card\"\n *ngIf=\"\n RepositoryFormControl?.valid ||\n (OrganizationFormControl?.valid && !Loading)\n \"\n >\n <mat-form-field class=\"mat-full-width\">\n <mat-icon class=\"org-icon\" matPrefix>description</mat-icon>\n \n <mat-select\n [formControlName]=\"SourceControlRoot + 'repository'\"\n [placeholder]=\"\n OrganizationFormControl?.valid\n ? 'Repository'\n : 'Repository (select organization first)'\n \"\n [disabled]=\"\n !OrganizationFormControl?.valid || Loading || HostingDetails?.Loading\n \"\n (selectionChange)=\"RepositoryChanged($event)\"\n *ngIf=\"!CreatingRepository\"\n required\n >\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\n matInput\n placeholder=\"Repository (creates new if does not exist)\"\n [formControlName]=\"SourceControlRoot + 'repository'\"\n *ngIf=\"CreatingRepository\"\n [fxHide]=\"Loading || HostingDetails?.Loading\"\n required\n />\n \n <mat-icon\n matSuffix\n (click)=\"CreateRepository()\"\n [fxHide]=\"Loading || HostingDetails?.Loading\"\n *ngIf=\"!CreatingRepository && OrganizationFormControl?.valid\"\n >\n add_circle\n </mat-icon>\n \n <button mat-button type=\"button\" \n (click)=\"SaveRepository()\" \n *ngIf=\"CreatingRepository && RepositoryFormControl?.valid\">\n \n <mat-icon\n matSuffix\n color=\"primary\"\n >\n save\n </mat-icon>\n </button>\n \n <button mat-button type=\"button\" \n (click)=\"CancelCreateRepository()\"\n *ngIf=\"CreatingRepository\">\n \n <mat-icon\n matSuffix\n \n >\n cancel\n </mat-icon>\n </button>\n </mat-form-field>\n </div>\n \n <div\n class=\"card\"\n *ngIf=\"\n (BranchesFormControl?.valid ||\n (OrganizationFormControl?.valid &&\n RepositoryFormControl?.valid &&\n !Loading)) &&\n !CreatingRepository &&\n UseBranches\n \"\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\n (optionSelected)=\"BranchOptionSelected($event)\"\n #branchOptions=\"matAutocomplete\"\n >\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\n [removable]=\"true\"\n (removed)=\"RemoveBranchOption(selBranch)\"\n *ngFor=\"let selBranch of SelectedBranches\"\n >\n {{ selBranch }}\n <mat-icon matChipRemove>cancel</mat-icon>\n </mat-chip>\n \n <input\n matInput\n placeholder=\"New Branch...\"\n [formControlName]=\"SourceControlRoot + 'branches'\"\n #branches\n [matAutocomplete]=\"branchOptions\"\n [matChipInputFor]=\"selectedBranches\"\n [matChipInputSeparatorKeyCodes]=\"SeparatorKeysCodes\"\n [matChipInputAddOnBlur]=\"true\"\n (matChipInputTokenEnd)=\"AddBranchOption($event)\"\n [disabled]=\"Loading || HostingDetails?.Loading\"\n required\n />\n </mat-chip-list>\n </mat-form-field>\n \n <mat-form-field\n class=\"mat-full-width with-hint\"\n [fxShow]=\"SelectedBranches?.length > 1\"\n >\n <mat-icon class=\"org-icon\" matPrefix>account_tree</mat-icon>\n \n <mat-select\n [formControlName]=\"SourceControlRoot + 'mainBranch'\"\n placeholder=\"Main Branch\"\n [disabled]=\"Loading || HostingDetails?.Loading\"\n (selectionChange)=\"MainBranchChanged($event)\"\n required\n >\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\n matSuffix\n mat-icon-button\n href=\"/.oauth/github?oauth-force-edit=true\"\n \n target=\"_blank\"\n color=\"accent\"\n >\n <mat-icon\n matTooltip=\"Re-authorize Organizations\"\n 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\n href=\"https://github.com/account/organizations/new\"\n target=\"_blank\"\n >\n start here\n </a>\n </mat-hint>\n </mat-form-field>\n </div>\n \n <div\n class=\"card\"\n *ngIf=\"\n (BuildPathFormControl?.valid ||\n (OrganizationFormControl?.valid &&\n RepositoryFormControl?.valid &&\n !Loading)) &&\n !CreatingRepository &&\n UseBuildPath\n \"\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\n [formControlName]=\"SourceControlRoot + 'buildPath'\"\n placeholder=\"Build Path\"\n [disabled]=\"Loading || BuildPathDisabled\"\n (selectionChange)=\"BuildPathChanged($event)\"\n required\n >\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\n class=\"mat-title\"\n *ngIf=\"\n OrganizationFormControl?.valid && !RepositoryFormControl?.valid\n \"\n >\n Loading repositories\n </h4>\n \n <h4\n class=\"mat-title\"\n *ngIf=\"RepositoryFormControl?.valid && !BranchesFormControl?.valid\"\n >\n Loading branches\n </h4>\n \n <h4\n class=\"mat-title\"\n *ngIf=\"\n (RepositoryFormControl?.valid || BranchesFormControl?.valid) &&\n !BuildPathFormControl?.valid\n \"\n >\n Loading build paths\n </h4>\n </div>\n </div>\n </div>\n </div>\n \n </mat-card-content>\n </mat-card>\n </div>\n",
|
|
4582
|
-
styles: [""]
|
|
4852
|
+
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>",
|
|
4853
|
+
styles: [".form-card,.sc-card{width:100%}"]
|
|
4583
4854
|
},] }
|
|
4584
4855
|
];
|
|
4585
4856
|
DevopsSourceControlFormComponent.ctorParameters = () => [
|
|
4586
4857
|
{ type: FormBuilder },
|
|
4587
|
-
{ type: ApplicationsFlowService }
|
|
4858
|
+
{ type: ApplicationsFlowService },
|
|
4859
|
+
{ type: EaCService }
|
|
4588
4860
|
];
|
|
4589
4861
|
DevopsSourceControlFormComponent.propDecorators = {
|
|
4590
4862
|
BranchesInput: [{ type: ViewChild, args: ['branches',] }],
|
|
4863
|
+
EditingSourceControlLookup: [{ type: Input, args: ['editing-source-control-lookup',] }],
|
|
4591
4864
|
Environment: [{ type: Input, args: ['environment',] }]
|
|
4592
4865
|
};
|
|
4593
4866
|
|
|
4867
|
+
class SourceControlDialogComponent {
|
|
4868
|
+
constructor(dialogRef, data) {
|
|
4869
|
+
this.dialogRef = dialogRef;
|
|
4870
|
+
this.data = data;
|
|
4871
|
+
}
|
|
4872
|
+
ngOnInit() {
|
|
4873
|
+
}
|
|
4874
|
+
}
|
|
4875
|
+
SourceControlDialogComponent.decorators = [
|
|
4876
|
+
{ type: Component, args: [{
|
|
4877
|
+
selector: 'lcu-source-control-dialog',
|
|
4878
|
+
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>",
|
|
4879
|
+
styles: [""]
|
|
4880
|
+
},] }
|
|
4881
|
+
];
|
|
4882
|
+
SourceControlDialogComponent.ctorParameters = () => [
|
|
4883
|
+
{ type: MatDialogRef },
|
|
4884
|
+
{ type: undefined, decorators: [{ type: Inject, args: [MAT_DIALOG_DATA,] }] }
|
|
4885
|
+
];
|
|
4886
|
+
|
|
4887
|
+
class BuildPipelineDialogComponent {
|
|
4888
|
+
constructor(dialogRef, data) {
|
|
4889
|
+
this.dialogRef = dialogRef;
|
|
4890
|
+
this.data = data;
|
|
4891
|
+
}
|
|
4892
|
+
ngOnInit() {
|
|
4893
|
+
}
|
|
4894
|
+
}
|
|
4895
|
+
BuildPipelineDialogComponent.decorators = [
|
|
4896
|
+
{ type: Component, args: [{
|
|
4897
|
+
selector: 'lcu-build-pipeline-dialog',
|
|
4898
|
+
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\n</lcu-build-pipeline-form>\n",
|
|
4899
|
+
styles: [""]
|
|
4900
|
+
},] }
|
|
4901
|
+
];
|
|
4902
|
+
BuildPipelineDialogComponent.ctorParameters = () => [
|
|
4903
|
+
{ type: MatDialogRef },
|
|
4904
|
+
{ type: undefined, decorators: [{ type: Inject, args: [MAT_DIALOG_DATA,] }] }
|
|
4905
|
+
];
|
|
4906
|
+
|
|
4594
4907
|
class ApplicationsFlowModule {
|
|
4595
4908
|
static forRoot() {
|
|
4596
4909
|
return {
|
|
@@ -4645,7 +4958,9 @@ ApplicationsFlowModule.decorators = [
|
|
|
4645
4958
|
ProcessorDetailsFormComponent,
|
|
4646
4959
|
SourceControlFormComponent,
|
|
4647
4960
|
BuildPipelineFormComponent,
|
|
4648
|
-
DevopsSourceControlFormComponent
|
|
4961
|
+
DevopsSourceControlFormComponent,
|
|
4962
|
+
SourceControlDialogComponent,
|
|
4963
|
+
BuildPipelineDialogComponent
|
|
4649
4964
|
],
|
|
4650
4965
|
imports: [
|
|
4651
4966
|
FathymSharedModule,
|
|
@@ -4695,7 +5010,9 @@ ApplicationsFlowModule.decorators = [
|
|
|
4695
5010
|
ProcessorDetailsFormComponent,
|
|
4696
5011
|
SourceControlFormComponent,
|
|
4697
5012
|
BuildPipelineFormComponent,
|
|
4698
|
-
DevopsSourceControlFormComponent
|
|
5013
|
+
DevopsSourceControlFormComponent,
|
|
5014
|
+
SourceControlDialogComponent,
|
|
5015
|
+
BuildPipelineDialogComponent
|
|
4699
5016
|
],
|
|
4700
5017
|
entryComponents: [
|
|
4701
5018
|
ApplicationsFlowProjectsElementComponent,
|
|
@@ -4732,7 +5049,9 @@ ApplicationsFlowModule.decorators = [
|
|
|
4732
5049
|
ProcessorDetailsFormComponent,
|
|
4733
5050
|
SourceControlFormComponent,
|
|
4734
5051
|
BuildPipelineFormComponent,
|
|
4735
|
-
DevopsSourceControlFormComponent
|
|
5052
|
+
DevopsSourceControlFormComponent,
|
|
5053
|
+
SourceControlDialogComponent,
|
|
5054
|
+
BuildPipelineDialogComponent
|
|
4736
5055
|
],
|
|
4737
5056
|
},] }
|
|
4738
5057
|
];
|
|
@@ -4765,5 +5084,5 @@ class FormModel {
|
|
|
4765
5084
|
* Generated bundle index. Do not edit.
|
|
4766
5085
|
*/
|
|
4767
5086
|
|
|
4768
|
-
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 };
|
|
5087
|
+
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 };
|
|
4769
5088
|
//# sourceMappingURL=lowcodeunit-applications-flow-common.js.map
|