@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,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('rxjs'), require('@angular/common/http'), require('@lcu/common'), require('@angular/forms'), require('@angular/flex-layout'), require('@lowcodeunit/app-host-common'), require('@angular/cdk/keycodes'), require('rxjs/operators'), require('@angular/cdk/layout'), require('@angular/material/tooltip'), require('@angular/material/slide-toggle')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@lowcodeunit/applications-flow-common', ['exports', '@angular/core', 'rxjs', '@angular/common/http', '@lcu/common', '@angular/forms', '@angular/flex-layout', '@lowcodeunit/app-host-common', '@angular/cdk/keycodes', 'rxjs/operators', '@angular/cdk/layout', '@angular/material/tooltip', '@angular/material/slide-toggle'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.lowcodeunit = global.lowcodeunit || {}, global.lowcodeunit['applications-flow-common'] = {}), global.ng.core, global.rxjs, global.ng.common.http, global.i2, global.ng.forms, global.ng.flexLayout, global.appHostCommon, global.ng.cdk.keycodes, global.rxjs.operators, global.ng.cdk.layout, global.ng.material.tooltip, global.ng.material.slideToggle));
|
|
5
|
-
}(this, (function (exports, i0, rxjs, i1, i2, forms, flexLayout, appHostCommon, keycodes, operators, layout, tooltip, slideToggle) { 'use strict';
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('rxjs'), require('@angular/common/http'), require('@lcu/common'), require('@angular/forms'), require('@angular/flex-layout'), require('@lowcodeunit/app-host-common'), require('@angular/cdk/keycodes'), require('rxjs/operators'), require('@angular/cdk/layout'), require('@angular/material/tooltip'), require('@angular/material/slide-toggle'), require('@angular/material/dialog')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@lowcodeunit/applications-flow-common', ['exports', '@angular/core', 'rxjs', '@angular/common/http', '@lcu/common', '@angular/forms', '@angular/flex-layout', '@lowcodeunit/app-host-common', '@angular/cdk/keycodes', 'rxjs/operators', '@angular/cdk/layout', '@angular/material/tooltip', '@angular/material/slide-toggle', '@angular/material/dialog'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.lowcodeunit = global.lowcodeunit || {}, global.lowcodeunit['applications-flow-common'] = {}), global.ng.core, global.rxjs, global.ng.common.http, global.i2, global.ng.forms, global.ng.flexLayout, global.appHostCommon, global.ng.cdk.keycodes, global.rxjs.operators, global.ng.cdk.layout, global.ng.material.tooltip, global.ng.material.slideToggle, global.ng.material.dialog));
|
|
5
|
+
}(this, (function (exports, i0, rxjs, i1, i2, forms, flexLayout, appHostCommon, keycodes, operators, layout, tooltip, slideToggle, dialog) { 'use strict';
|
|
6
6
|
|
|
7
7
|
/*! *****************************************************************************
|
|
8
8
|
Copyright (c) Microsoft Corporation.
|
|
@@ -576,6 +576,11 @@
|
|
|
576
576
|
headers: this.loadHeaders(),
|
|
577
577
|
});
|
|
578
578
|
};
|
|
579
|
+
ApplicationsFlowService.prototype.NewLoadProjectHostingDetails = function () {
|
|
580
|
+
return this.http.get(this.apiRoot + "/api/lowcodeunit/manage/projects/hosting/details", {
|
|
581
|
+
headers: this.loadHeaders(),
|
|
582
|
+
});
|
|
583
|
+
};
|
|
579
584
|
ApplicationsFlowService.prototype.SaveEnterpriseAsCode = function (eac) {
|
|
580
585
|
return this.http.post(this.apiRoot + "/api/lowcodeunit/manage/eac", eac, {
|
|
581
586
|
headers: this.loadHeaders(),
|
|
@@ -1775,6 +1780,7 @@
|
|
|
1775
1780
|
HostingDetailsFormGroupComponent.prototype.ngOnChanges = function () { };
|
|
1776
1781
|
HostingDetailsFormGroupComponent.prototype.ngOnInit = function () {
|
|
1777
1782
|
var _a, _b, _c;
|
|
1783
|
+
console.log("made it to hosting details");
|
|
1778
1784
|
this.BuildPipeline =
|
|
1779
1785
|
this.BuildPipeline || ((_a = this.Details) === null || _a === void 0 ? void 0 : _a.HostingOptions)
|
|
1780
1786
|
? (_c = (_b = this.Details) === null || _b === void 0 ? void 0 : _b.HostingOptions[0]) === null || _c === void 0 ? void 0 : _c.Lookup : '';
|
|
@@ -4746,6 +4752,7 @@
|
|
|
4746
4752
|
|
|
4747
4753
|
var SlottedCardComponent = /** @class */ (function () {
|
|
4748
4754
|
function SlottedCardComponent() {
|
|
4755
|
+
this.MainActionClicked = new i0.EventEmitter;
|
|
4749
4756
|
}
|
|
4750
4757
|
SlottedCardComponent.prototype.ngOnInit = function () {
|
|
4751
4758
|
};
|
|
@@ -4757,7 +4764,7 @@
|
|
|
4757
4764
|
SlottedCardComponent.decorators = [
|
|
4758
4765
|
{ type: i0.Component, args: [{
|
|
4759
4766
|
selector: 'lcu-slotted-card',
|
|
4760
|
-
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",
|
|
4767
|
+
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",
|
|
4761
4768
|
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%}"]
|
|
4762
4769
|
},] }
|
|
4763
4770
|
];
|
|
@@ -5397,7 +5404,7 @@
|
|
|
5397
5404
|
ProcessorDetailsFormComponent.decorators = [
|
|
5398
5405
|
{ type: i0.Component, args: [{
|
|
5399
5406
|
selector: 'lcu-processor-details-form',
|
|
5400
|
-
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
|
|
5407
|
+
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",
|
|
5401
5408
|
styles: [""]
|
|
5402
5409
|
},] }
|
|
5403
5410
|
];
|
|
@@ -5482,36 +5489,701 @@
|
|
|
5482
5489
|
};
|
|
5483
5490
|
|
|
5484
5491
|
var BuildPipelineFormComponent = /** @class */ (function () {
|
|
5485
|
-
function BuildPipelineFormComponent() {
|
|
5492
|
+
function BuildPipelineFormComponent(formBuilder, appsFlowSvc) {
|
|
5493
|
+
this.formBuilder = formBuilder;
|
|
5494
|
+
this.appsFlowSvc = appsFlowSvc;
|
|
5495
|
+
this.HostingDetails = new ProjectHostingDetails();
|
|
5486
5496
|
}
|
|
5497
|
+
Object.defineProperty(BuildPipelineFormComponent.prototype, "Artifact", {
|
|
5498
|
+
// @Input('main-branch')
|
|
5499
|
+
// public MainBranch: string;
|
|
5500
|
+
// @Input('organization')
|
|
5501
|
+
// public Organization: string;
|
|
5502
|
+
// @Input('repository')
|
|
5503
|
+
// public Repository: string;
|
|
5504
|
+
get: function () {
|
|
5505
|
+
var _a, _b, _c;
|
|
5506
|
+
console.log("ARTIFACT: ", (_a = this.Environment) === null || _a === void 0 ? void 0 : _a.Artifacts[this.ArtifactLookup]);
|
|
5507
|
+
return ((_b = this.Environment) === null || _b === void 0 ? void 0 : _b.Artifacts) && this.ArtifactLookup
|
|
5508
|
+
? ((_c = this.Environment) === null || _c === void 0 ? void 0 : _c.Artifacts[this.ArtifactLookup]) || {}
|
|
5509
|
+
: {};
|
|
5510
|
+
},
|
|
5511
|
+
enumerable: false,
|
|
5512
|
+
configurable: true
|
|
5513
|
+
});
|
|
5514
|
+
Object.defineProperty(BuildPipelineFormComponent.prototype, "ArtifactLookup", {
|
|
5515
|
+
get: function () {
|
|
5516
|
+
var _a, _b;
|
|
5517
|
+
var 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;
|
|
5518
|
+
return artLookup;
|
|
5519
|
+
},
|
|
5520
|
+
enumerable: false,
|
|
5521
|
+
configurable: true
|
|
5522
|
+
});
|
|
5523
|
+
Object.defineProperty(BuildPipelineFormComponent.prototype, "BuildPipelineFormControl", {
|
|
5524
|
+
get: function () {
|
|
5525
|
+
var _a;
|
|
5526
|
+
return (_a = this.BuildPipelineFormGroup) === null || _a === void 0 ? void 0 : _a.controls.buildPipeline;
|
|
5527
|
+
},
|
|
5528
|
+
enumerable: false,
|
|
5529
|
+
configurable: true
|
|
5530
|
+
});
|
|
5531
|
+
Object.defineProperty(BuildPipelineFormComponent.prototype, "DevOpsAction", {
|
|
5532
|
+
get: function () {
|
|
5533
|
+
return this.Environment.DevOpsActions && this.DevOpsActionLookup
|
|
5534
|
+
? this.Environment.DevOpsActions[this.DevOpsActionLookup] || {}
|
|
5535
|
+
: {};
|
|
5536
|
+
},
|
|
5537
|
+
enumerable: false,
|
|
5538
|
+
configurable: true
|
|
5539
|
+
});
|
|
5540
|
+
Object.defineProperty(BuildPipelineFormComponent.prototype, "DevOpsActions", {
|
|
5541
|
+
get: function () {
|
|
5542
|
+
return this.Environment.DevOpsActions || {};
|
|
5543
|
+
},
|
|
5544
|
+
enumerable: false,
|
|
5545
|
+
configurable: true
|
|
5546
|
+
});
|
|
5547
|
+
Object.defineProperty(BuildPipelineFormComponent.prototype, "EditingSourceControl", {
|
|
5548
|
+
get: function () {
|
|
5549
|
+
var _a, _b;
|
|
5550
|
+
var 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;
|
|
5551
|
+
if (sc == null && this.EditingSourceControlLookup) {
|
|
5552
|
+
sc = {};
|
|
5553
|
+
}
|
|
5554
|
+
return sc;
|
|
5555
|
+
},
|
|
5556
|
+
enumerable: false,
|
|
5557
|
+
configurable: true
|
|
5558
|
+
});
|
|
5559
|
+
Object.defineProperty(BuildPipelineFormComponent.prototype, "SelectedHostingOption", {
|
|
5560
|
+
// (ho) => ho.Lookup === this.BuildPipeline
|
|
5561
|
+
get: function () {
|
|
5562
|
+
var _this = this;
|
|
5563
|
+
var _a, _b;
|
|
5564
|
+
return (_b = (_a = this.HostingDetails) === null || _a === void 0 ? void 0 : _a.HostingOptions) === null || _b === void 0 ? void 0 : _b.find(function (ho) { return ho.Lookup === _this.BuildPipeline; });
|
|
5565
|
+
},
|
|
5566
|
+
enumerable: false,
|
|
5567
|
+
configurable: true
|
|
5568
|
+
});
|
|
5569
|
+
Object.defineProperty(BuildPipelineFormComponent.prototype, "SourceControlLookups", {
|
|
5570
|
+
get: function () {
|
|
5571
|
+
return Object.keys(this.SourceControls || {});
|
|
5572
|
+
},
|
|
5573
|
+
enumerable: false,
|
|
5574
|
+
configurable: true
|
|
5575
|
+
});
|
|
5576
|
+
Object.defineProperty(BuildPipelineFormComponent.prototype, "SourceControls", {
|
|
5577
|
+
get: function () {
|
|
5578
|
+
return this.Environment.Sources || {};
|
|
5579
|
+
},
|
|
5580
|
+
enumerable: false,
|
|
5581
|
+
configurable: true
|
|
5582
|
+
});
|
|
5487
5583
|
BuildPipelineFormComponent.prototype.ngOnInit = function () {
|
|
5584
|
+
var _a, _b, _c;
|
|
5585
|
+
this.BuildPipelineFormGroup = this.formBuilder.group({});
|
|
5586
|
+
this.loadProjectHostingDetails();
|
|
5587
|
+
console.log("ARTIFACT: ", this.Artifact);
|
|
5588
|
+
// this.BuildPipeline ||
|
|
5589
|
+
// github-artifacts-release is this.HostingDetails?.HostingOptions[0]?.Lookup
|
|
5590
|
+
this.BuildPipeline =
|
|
5591
|
+
((_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 : '';
|
|
5592
|
+
console.log("Build Pipeline HERE= ", this.BuildPipeline);
|
|
5593
|
+
if (this.BuildPipelineFormGroup != null) {
|
|
5594
|
+
this.BuildPipelineFormGroup.removeControl('hostingDetails');
|
|
5595
|
+
}
|
|
5596
|
+
this.BuildPipelineFormGroup.addControl('hostingDetails', this.formBuilder.group({
|
|
5597
|
+
buildPipeline: [this.BuildPipeline, [forms.Validators.required]],
|
|
5598
|
+
}));
|
|
5599
|
+
this.setupControlsForForm();
|
|
5600
|
+
};
|
|
5601
|
+
//API METHODS
|
|
5602
|
+
BuildPipelineFormComponent.prototype.BuildPipelineChanged = function () {
|
|
5603
|
+
var _a, _b;
|
|
5604
|
+
console.log("build pipeline value: ", (_a = this.BuildPipelineFormControl) === null || _a === void 0 ? void 0 : _a.value);
|
|
5605
|
+
this.BuildPipeline = (_b = this.BuildPipelineFormControl) === null || _b === void 0 ? void 0 : _b.value;
|
|
5606
|
+
this.setupControlsForForm();
|
|
5607
|
+
};
|
|
5608
|
+
// Helpers
|
|
5609
|
+
BuildPipelineFormComponent.prototype.setupControlsForForm = function () {
|
|
5610
|
+
var _this = this;
|
|
5611
|
+
//for (const ctrlName in this.BuildPipelineFormGroup.controls) {
|
|
5612
|
+
//devOpsAction doesn't exist
|
|
5613
|
+
//removes hosting details
|
|
5614
|
+
// if (ctrlName !== 'buildPipeline' && ctrlName !== 'devOpsAction') {
|
|
5615
|
+
// console.log("removing control: ", ctrlName)
|
|
5616
|
+
// this.BuildPipelineFormGroup.removeControl(ctrlName);
|
|
5617
|
+
// }
|
|
5618
|
+
//}
|
|
5619
|
+
var _a, _b, _c, _d, _e, _f;
|
|
5620
|
+
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) || '', [forms.Validators.required]));
|
|
5621
|
+
(_d = (_c = this.SelectedHostingOption) === null || _c === void 0 ? void 0 : _c.Inputs) === null || _d === void 0 ? void 0 : _d.forEach(function (input) {
|
|
5622
|
+
var validators = input.Required ? [forms.Validators.required] : [];
|
|
5623
|
+
_this.BuildPipelineFormGroup.addControl(input.Lookup, _this.formBuilder.control(_this.Artifact[input.Lookup] || input.DefaultValue || '', validators));
|
|
5624
|
+
// if (this.Disabled) {
|
|
5625
|
+
// this.FormGroup.controls[input.Lookup].disable();
|
|
5626
|
+
// }
|
|
5627
|
+
});
|
|
5628
|
+
debugger;
|
|
5629
|
+
if (((_e = this.BuildPipelineFormControl) === null || _e === void 0 ? void 0 : _e.value) === 'npm-release') {
|
|
5630
|
+
debugger;
|
|
5631
|
+
if (!this.BuildPipelineFormGroup.controls.npmToken) {
|
|
5632
|
+
this.BuildPipelineFormGroup.addControl('npmToken', this.formBuilder.control('', this.Disabled ? [] : [forms.Validators.required]));
|
|
5633
|
+
if (this.Disabled) {
|
|
5634
|
+
this.BuildPipelineFormGroup.controls.npmToken.disable();
|
|
5635
|
+
}
|
|
5636
|
+
}
|
|
5637
|
+
}
|
|
5638
|
+
else if (((_f = this.BuildPipelineFormControl) === null || _f === void 0 ? void 0 : _f.value) === 'github-artifacts-release') {
|
|
5639
|
+
if (this.BuildPipelineFormGroup.controls.npmToken) {
|
|
5640
|
+
this.BuildPipelineFormGroup.removeControl('npmToken');
|
|
5641
|
+
}
|
|
5642
|
+
}
|
|
5643
|
+
};
|
|
5644
|
+
BuildPipelineFormComponent.prototype.loadProjectHostingDetails = function () {
|
|
5645
|
+
var _this = this;
|
|
5646
|
+
// this.HostingDetails.Loading = true;
|
|
5647
|
+
// this.Organization,
|
|
5648
|
+
// this.Repository,
|
|
5649
|
+
// this.MainBranch
|
|
5650
|
+
// "powhound4",
|
|
5651
|
+
// "RedwoodCrystals",
|
|
5652
|
+
// "master"
|
|
5653
|
+
this.appsFlowSvc
|
|
5654
|
+
.NewLoadProjectHostingDetails()
|
|
5655
|
+
.subscribe(function (response) {
|
|
5656
|
+
_this.HostingDetails = response.Model;
|
|
5657
|
+
console.log("response: ", response);
|
|
5658
|
+
_this.HostingDetails.Loading = false;
|
|
5659
|
+
}, function (err) {
|
|
5660
|
+
_this.HostingDetails.Loading = false;
|
|
5661
|
+
console.log("hosting details LOADING EERR: ", _this.HostingDetails);
|
|
5662
|
+
console.log("ERR: ", err);
|
|
5663
|
+
});
|
|
5664
|
+
console.log("HOSTING DETAILS: ", this.HostingDetails);
|
|
5488
5665
|
};
|
|
5489
5666
|
return BuildPipelineFormComponent;
|
|
5490
5667
|
}());
|
|
5491
5668
|
BuildPipelineFormComponent.decorators = [
|
|
5492
5669
|
{ type: i0.Component, args: [{
|
|
5493
5670
|
selector: 'lcu-build-pipeline-form',
|
|
5494
|
-
template: "<
|
|
5671
|
+
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",
|
|
5495
5672
|
styles: [""]
|
|
5496
5673
|
},] }
|
|
5497
5674
|
];
|
|
5498
|
-
BuildPipelineFormComponent.ctorParameters = function () { return [
|
|
5675
|
+
BuildPipelineFormComponent.ctorParameters = function () { return [
|
|
5676
|
+
{ type: forms.FormBuilder },
|
|
5677
|
+
{ type: ApplicationsFlowService }
|
|
5678
|
+
]; };
|
|
5679
|
+
BuildPipelineFormComponent.propDecorators = {
|
|
5680
|
+
BuildPipeline: [{ type: i0.Input, args: ['build-pipeline',] }],
|
|
5681
|
+
DevOpsActionLookup: [{ type: i0.Input, args: ['devops-action-lookup',] }],
|
|
5682
|
+
Disabled: [{ type: i0.Input, args: ['disabled',] }],
|
|
5683
|
+
Environment: [{ type: i0.Input, args: ['environment',] }]
|
|
5684
|
+
};
|
|
5499
5685
|
|
|
5500
5686
|
var DevopsSourceControlFormComponent = /** @class */ (function () {
|
|
5501
|
-
|
|
5687
|
+
// Constructors
|
|
5688
|
+
function DevopsSourceControlFormComponent(formBuilder, appsFlowSvc, eacSvc) {
|
|
5689
|
+
this.formBuilder = formBuilder;
|
|
5690
|
+
this.appsFlowSvc = appsFlowSvc;
|
|
5691
|
+
this.eacSvc = eacSvc;
|
|
5692
|
+
this.SeparatorKeysCodes = [keycodes.ENTER, keycodes.COMMA];
|
|
5693
|
+
this.BuildPath = null;
|
|
5694
|
+
// this.EditingSourceControlLookup = null;
|
|
5695
|
+
this.HostingDetails = new ProjectHostingDetails();
|
|
5696
|
+
this.SelectedBranches = [];
|
|
5697
|
+
this.SourceControlRoot = '';
|
|
5698
|
+
this.UseBranches = true;
|
|
5699
|
+
this.UseBuildPath = false;
|
|
5502
5700
|
}
|
|
5701
|
+
Object.defineProperty(DevopsSourceControlFormComponent.prototype, "BranchesFormControl", {
|
|
5702
|
+
// Fields
|
|
5703
|
+
// Properties
|
|
5704
|
+
get: function () {
|
|
5705
|
+
return this.DevOpsSourceControlFormGroup.get(this.SourceControlRoot + 'branches');
|
|
5706
|
+
},
|
|
5707
|
+
enumerable: false,
|
|
5708
|
+
configurable: true
|
|
5709
|
+
});
|
|
5710
|
+
Object.defineProperty(DevopsSourceControlFormComponent.prototype, "BuildPathFormControl", {
|
|
5711
|
+
get: function () {
|
|
5712
|
+
return this.DevOpsSourceControlFormGroup.get(this.SourceControlRoot + 'buildPath');
|
|
5713
|
+
},
|
|
5714
|
+
enumerable: false,
|
|
5715
|
+
configurable: true
|
|
5716
|
+
});
|
|
5717
|
+
Object.defineProperty(DevopsSourceControlFormComponent.prototype, "DevOpsActionLookups", {
|
|
5718
|
+
get: function () {
|
|
5719
|
+
return Object.keys(this.DevOpsActions || {});
|
|
5720
|
+
},
|
|
5721
|
+
enumerable: false,
|
|
5722
|
+
configurable: true
|
|
5723
|
+
});
|
|
5724
|
+
Object.defineProperty(DevopsSourceControlFormComponent.prototype, "DevOpsActionLookup", {
|
|
5725
|
+
get: function () {
|
|
5726
|
+
var _a, _b, _c;
|
|
5727
|
+
if (!!((_a = this.DevOpsActionLookupFormControl) === null || _a === void 0 ? void 0 : _a.value)) {
|
|
5728
|
+
return this.DevOpsActionLookupFormControl.value;
|
|
5729
|
+
}
|
|
5730
|
+
if (!!((_b = this.EditingSourceControl) === null || _b === void 0 ? void 0 : _b.DevOpsActionTriggerLookups)) {
|
|
5731
|
+
return (_c = this.EditingSourceControl) === null || _c === void 0 ? void 0 : _c.DevOpsActionTriggerLookups[0];
|
|
5732
|
+
}
|
|
5733
|
+
else {
|
|
5734
|
+
return null;
|
|
5735
|
+
}
|
|
5736
|
+
},
|
|
5737
|
+
enumerable: false,
|
|
5738
|
+
configurable: true
|
|
5739
|
+
});
|
|
5740
|
+
Object.defineProperty(DevopsSourceControlFormComponent.prototype, "DevOpsActionLookupFormControl", {
|
|
5741
|
+
get: function () {
|
|
5742
|
+
return this.DevOpsSourceControlFormGroup.get('devOpsActionLookup');
|
|
5743
|
+
},
|
|
5744
|
+
enumerable: false,
|
|
5745
|
+
configurable: true
|
|
5746
|
+
});
|
|
5747
|
+
Object.defineProperty(DevopsSourceControlFormComponent.prototype, "DevOpsActions", {
|
|
5748
|
+
get: function () {
|
|
5749
|
+
return this.Environment.DevOpsActions || {};
|
|
5750
|
+
},
|
|
5751
|
+
enumerable: false,
|
|
5752
|
+
configurable: true
|
|
5753
|
+
});
|
|
5754
|
+
Object.defineProperty(DevopsSourceControlFormComponent.prototype, "EditingSourceControl", {
|
|
5755
|
+
get: function () {
|
|
5756
|
+
var _a, _b;
|
|
5757
|
+
var 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;
|
|
5758
|
+
if (sc == null && this.EditingSourceControlLookup) {
|
|
5759
|
+
sc = {};
|
|
5760
|
+
}
|
|
5761
|
+
return sc;
|
|
5762
|
+
},
|
|
5763
|
+
enumerable: false,
|
|
5764
|
+
configurable: true
|
|
5765
|
+
});
|
|
5766
|
+
Object.defineProperty(DevopsSourceControlFormComponent.prototype, "MainBranchFormControl", {
|
|
5767
|
+
get: function () {
|
|
5768
|
+
return this.DevOpsSourceControlFormGroup.get(this.SourceControlRoot + 'mainBranch');
|
|
5769
|
+
},
|
|
5770
|
+
enumerable: false,
|
|
5771
|
+
configurable: true
|
|
5772
|
+
});
|
|
5773
|
+
Object.defineProperty(DevopsSourceControlFormComponent.prototype, "OrganizationFormControl", {
|
|
5774
|
+
get: function () {
|
|
5775
|
+
return this.DevOpsSourceControlFormGroup.get(this.SourceControlRoot + 'organization');
|
|
5776
|
+
},
|
|
5777
|
+
enumerable: false,
|
|
5778
|
+
configurable: true
|
|
5779
|
+
});
|
|
5780
|
+
Object.defineProperty(DevopsSourceControlFormComponent.prototype, "RepositoryFormControl", {
|
|
5781
|
+
get: function () {
|
|
5782
|
+
return this.DevOpsSourceControlFormGroup.get(this.SourceControlRoot + 'repository');
|
|
5783
|
+
},
|
|
5784
|
+
enumerable: false,
|
|
5785
|
+
configurable: true
|
|
5786
|
+
});
|
|
5787
|
+
// Life Cycle
|
|
5788
|
+
DevopsSourceControlFormComponent.prototype.ngAfterViewInit = function () { };
|
|
5789
|
+
DevopsSourceControlFormComponent.prototype.ngOnDestroy = function () {
|
|
5790
|
+
this.destroyFormControls();
|
|
5791
|
+
};
|
|
5503
5792
|
DevopsSourceControlFormComponent.prototype.ngOnInit = function () {
|
|
5793
|
+
console.log("org: ", this.EditingSourceControl);
|
|
5794
|
+
console.log("lookup: ", this.EditingSourceControlLookup);
|
|
5795
|
+
if (this.EditingSourceControlLookup === null) {
|
|
5796
|
+
this.CreateNewSourceControl();
|
|
5797
|
+
}
|
|
5798
|
+
console.log("org: ", this.EditingSourceControl);
|
|
5799
|
+
if (this.EditingSourceControl != null) {
|
|
5800
|
+
this.DevOpsSourceControlFormGroup = this.formBuilder.group({});
|
|
5801
|
+
this.setupFormControls();
|
|
5802
|
+
}
|
|
5803
|
+
this.RefreshOrganizations();
|
|
5804
|
+
};
|
|
5805
|
+
// API Methods
|
|
5806
|
+
DevopsSourceControlFormComponent.prototype.AddBranchOption = function (event) {
|
|
5807
|
+
this.addBranchOption(event.value);
|
|
5808
|
+
event.input.value = '';
|
|
5809
|
+
};
|
|
5810
|
+
DevopsSourceControlFormComponent.prototype.BranchOptionSelected = function (event) {
|
|
5811
|
+
this.addBranchOption(event.option.value);
|
|
5812
|
+
};
|
|
5813
|
+
DevopsSourceControlFormComponent.prototype.BranchesChanged = function (branches) {
|
|
5814
|
+
this.loadProjectHostingDetails();
|
|
5815
|
+
};
|
|
5816
|
+
DevopsSourceControlFormComponent.prototype.BuildPathChanged = function (event) {
|
|
5817
|
+
};
|
|
5818
|
+
DevopsSourceControlFormComponent.prototype.CreateNewSourceControl = function () {
|
|
5819
|
+
this.SetEditingSourceControl(i2.Guid.CreateRaw());
|
|
5820
|
+
};
|
|
5821
|
+
DevopsSourceControlFormComponent.prototype.CreateRepository = function () {
|
|
5822
|
+
this.CreatingRepository = true;
|
|
5823
|
+
this.RepositoryFormControl.reset();
|
|
5824
|
+
};
|
|
5825
|
+
DevopsSourceControlFormComponent.prototype.CancelCreateRepository = function () {
|
|
5826
|
+
this.CreatingRepository = false;
|
|
5827
|
+
};
|
|
5828
|
+
DevopsSourceControlFormComponent.prototype.DevOpsActionLookupChanged = function (event) {
|
|
5829
|
+
this.configureDevOpsAction();
|
|
5830
|
+
};
|
|
5831
|
+
DevopsSourceControlFormComponent.prototype.MainBranchChanged = function (event) {
|
|
5832
|
+
this.emitBranchesChanged();
|
|
5833
|
+
};
|
|
5834
|
+
DevopsSourceControlFormComponent.prototype.OrganizationChanged = function (event) {
|
|
5835
|
+
var org = this.OrganizationFormControl;
|
|
5836
|
+
this.RepositoryFormControl.reset();
|
|
5837
|
+
if (this.UseBranches) {
|
|
5838
|
+
this.BranchesFormControl.reset();
|
|
5839
|
+
this.SelectedBranches = [];
|
|
5840
|
+
}
|
|
5841
|
+
this.listRepositories();
|
|
5842
|
+
};
|
|
5843
|
+
DevopsSourceControlFormComponent.prototype.RefreshOrganizations = function () {
|
|
5844
|
+
var _a, _b, _c;
|
|
5845
|
+
// this.Loading = true;
|
|
5846
|
+
this.listOrganizations();
|
|
5847
|
+
(_a = this.OrganizationFormControl) === null || _a === void 0 ? void 0 : _a.reset();
|
|
5848
|
+
(_b = this.RepositoryFormControl) === null || _b === void 0 ? void 0 : _b.reset();
|
|
5849
|
+
if (this.UseBranches) {
|
|
5850
|
+
(_c = this.BranchesFormControl) === null || _c === void 0 ? void 0 : _c.reset();
|
|
5851
|
+
}
|
|
5852
|
+
};
|
|
5853
|
+
DevopsSourceControlFormComponent.prototype.RemoveBranchOption = function (option) {
|
|
5854
|
+
var index = this.SelectedBranches.indexOf(option);
|
|
5855
|
+
if (index >= 0) {
|
|
5856
|
+
this.SelectedBranches.splice(index, 1);
|
|
5857
|
+
}
|
|
5858
|
+
this.emitBranchesChanged();
|
|
5859
|
+
};
|
|
5860
|
+
DevopsSourceControlFormComponent.prototype.RepositoryChanged = function (event) {
|
|
5861
|
+
var repo = this.RepositoryFormControl;
|
|
5862
|
+
if (this.UseBranches) {
|
|
5863
|
+
this.BranchesFormControl.reset();
|
|
5864
|
+
this.SelectedBranches = [];
|
|
5865
|
+
this.listBranches();
|
|
5866
|
+
}
|
|
5867
|
+
if (!this.UseBranches) {
|
|
5868
|
+
this.listBuildPaths();
|
|
5869
|
+
}
|
|
5870
|
+
};
|
|
5871
|
+
DevopsSourceControlFormComponent.prototype.SaveRepository = function () {
|
|
5872
|
+
var _this = this;
|
|
5873
|
+
this.Loading = true;
|
|
5874
|
+
var org = this.OrganizationFormControl.value;
|
|
5875
|
+
var repoName = this.RepositoryFormControl.value;
|
|
5876
|
+
this.appsFlowSvc
|
|
5877
|
+
.CreateRepository(org, repoName)
|
|
5878
|
+
.subscribe(function (response) {
|
|
5879
|
+
if (response.Status.Code === 0) {
|
|
5880
|
+
_this.listRepositories(repoName);
|
|
5881
|
+
_this.CreatingRepository = false;
|
|
5882
|
+
}
|
|
5883
|
+
else {
|
|
5884
|
+
// TODO: Need to surface an error to the user...
|
|
5885
|
+
_this.Loading = false;
|
|
5886
|
+
}
|
|
5887
|
+
});
|
|
5888
|
+
};
|
|
5889
|
+
DevopsSourceControlFormComponent.prototype.SetEditingSourceControl = function (scLookup) {
|
|
5890
|
+
this.EditingSourceControlLookup = scLookup;
|
|
5891
|
+
};
|
|
5892
|
+
DevopsSourceControlFormComponent.prototype.SubmitSourceControl = function () {
|
|
5893
|
+
console.log("source control submitted");
|
|
5894
|
+
};
|
|
5895
|
+
// public SaveSourceControl(): void {
|
|
5896
|
+
// const saveEnvReq: SaveEnvironmentAsCodeEventRequest = {
|
|
5897
|
+
// Environment: {
|
|
5898
|
+
// ...this.Environment,
|
|
5899
|
+
// Artifacts: this.Environment.Artifacts || {},
|
|
5900
|
+
// DevOpsActions: this.Environment.DevOpsActions || {},
|
|
5901
|
+
// Secrets: this.Environment.Secrets || {},
|
|
5902
|
+
// Sources: this.Environment.Sources || {},
|
|
5903
|
+
// },
|
|
5904
|
+
// EnvironmentLookup: this.EnvironmentLookup,
|
|
5905
|
+
// EnterpriseDataTokens: {},
|
|
5906
|
+
// };
|
|
5907
|
+
// let artifactLookup: string;
|
|
5908
|
+
// // let artifact: EaCArtifact = {
|
|
5909
|
+
// // ...this.Artifact,
|
|
5910
|
+
// // ...this.HostingDetailsFormControls
|
|
5911
|
+
// // .SelectedHostingOptionInputControlValues,
|
|
5912
|
+
// // };
|
|
5913
|
+
// if (!this.ArtifactLookup) {
|
|
5914
|
+
// artifactLookup = Guid.CreateRaw();
|
|
5915
|
+
// artifact = {
|
|
5916
|
+
// ...artifact,
|
|
5917
|
+
// Type: this.HostingDetailsFormControls.SelectedHostingOption
|
|
5918
|
+
// .ArtifactType,
|
|
5919
|
+
// Name: this.HostingDetailsFormControls.SelectedHostingOption.Name,
|
|
5920
|
+
// NPMRegistry: 'https://registry.npmjs.org/',
|
|
5921
|
+
// };
|
|
5922
|
+
// } else {
|
|
5923
|
+
// artifactLookup = this.ArtifactLookup;
|
|
5924
|
+
// }
|
|
5925
|
+
// saveEnvReq.Environment.Artifacts[artifactLookup] = artifact;
|
|
5926
|
+
// let devOpsActionLookup: string;
|
|
5927
|
+
// if (!this.DevOpsActionLookup) {
|
|
5928
|
+
// devOpsActionLookup = Guid.CreateRaw();
|
|
5929
|
+
// // const doa: EaCDevOpsAction = {
|
|
5930
|
+
// // ...this.DevOpsAction,
|
|
5931
|
+
// // ArtifactLookups: [artifactLookup],
|
|
5932
|
+
// // Name: this.HostingDetailsFormControls.DevOpsActionNameFormControl.value,
|
|
5933
|
+
// // Path: this.HostingDetailsFormControls.SelectedHostingOption.Path,
|
|
5934
|
+
// // Templates:
|
|
5935
|
+
// // this.HostingDetailsFormControls.SelectedHostingOption.Templates,
|
|
5936
|
+
// // };
|
|
5937
|
+
// if (this.HostingDetailsFormControls.NPMTokenFormControl?.value) {
|
|
5938
|
+
// const secretLookup = 'npm-access-token';
|
|
5939
|
+
// doa.SecretLookups = [secretLookup];
|
|
5940
|
+
// saveEnvReq.Environment.Secrets[secretLookup] = {
|
|
5941
|
+
// Name: 'NPM Access Token',
|
|
5942
|
+
// DataTokenLookup: secretLookup,
|
|
5943
|
+
// KnownAs: 'NPM_TOKEN',
|
|
5944
|
+
// };
|
|
5945
|
+
// saveEnvReq.EnterpriseDataTokens[secretLookup] = {
|
|
5946
|
+
// Name: saveEnvReq.Environment.Secrets[secretLookup].Name,
|
|
5947
|
+
// Description: saveEnvReq.Environment.Secrets[secretLookup].Name,
|
|
5948
|
+
// Value: this.NPMTokenFormControl.value,
|
|
5949
|
+
// };
|
|
5950
|
+
// }
|
|
5951
|
+
// saveEnvReq.Environment.DevOpsActions[devOpsActionLookup] = doa;
|
|
5952
|
+
// } else {
|
|
5953
|
+
// devOpsActionLookup = this.DevOpsActionLookupFormControl.value;
|
|
5954
|
+
// const doa: EaCDevOpsAction = {
|
|
5955
|
+
// ...this.DevOpsAction,
|
|
5956
|
+
// Name: this.HostingDetailsFormControls.DevOpsActionNameFormControl.value,
|
|
5957
|
+
// };
|
|
5958
|
+
// saveEnvReq.Environment.DevOpsActions[devOpsActionLookup] = doa;
|
|
5959
|
+
// }
|
|
5960
|
+
// let source: EaCSourceControl = {
|
|
5961
|
+
// ...this.EditingSourceControl,
|
|
5962
|
+
// Branches: this.SelectedBranches,
|
|
5963
|
+
// MainBranch: this.MainBranchFormControl.value,
|
|
5964
|
+
// };
|
|
5965
|
+
// source = {
|
|
5966
|
+
// ...source,
|
|
5967
|
+
// Type: 'GitHub',
|
|
5968
|
+
// Name: this.EditingSourceControlLookup,
|
|
5969
|
+
// DevOpsActionTriggerLookups: [devOpsActionLookup],
|
|
5970
|
+
// Organization:
|
|
5971
|
+
// this.OrganizationFormControl.value,
|
|
5972
|
+
// Repository: this.RepositoryFormControl.value,
|
|
5973
|
+
// };
|
|
5974
|
+
// const scLookup = `github://${source.Organization}/${source.Repository}`;
|
|
5975
|
+
// saveEnvReq.Environment.Sources[scLookup] = source;
|
|
5976
|
+
// this.eacSvc.SaveEnvironmentAsCode(saveEnvReq);
|
|
5977
|
+
// }
|
|
5978
|
+
// Helpers
|
|
5979
|
+
DevopsSourceControlFormComponent.prototype.addBranchOption = function (value) {
|
|
5980
|
+
value = (value || '').trim();
|
|
5981
|
+
if (value && this.SelectedBranches.indexOf(value) < 0) {
|
|
5982
|
+
this.SelectedBranches.push(value);
|
|
5983
|
+
}
|
|
5984
|
+
this.BranchesInput.nativeElement.blur();
|
|
5985
|
+
this.emitBranchesChanged();
|
|
5986
|
+
};
|
|
5987
|
+
DevopsSourceControlFormComponent.prototype.configureDevOpsAction = function () {
|
|
5988
|
+
var _this = this;
|
|
5989
|
+
setTimeout(function () {
|
|
5990
|
+
_this.DevOpsActionLookupFormControl.setValue(_this.DevOpsActionLookup);
|
|
5991
|
+
}, 0);
|
|
5992
|
+
};
|
|
5993
|
+
DevopsSourceControlFormComponent.prototype.destroyFormControls = function () {
|
|
5994
|
+
var _a, _b, _c, _d;
|
|
5995
|
+
this.DevOpsSourceControlFormGroup.removeControl([this.SourceControlRoot, 'mainBranch'].join(''));
|
|
5996
|
+
(_a = this.DevOpsSourceControlFormGroup) === null || _a === void 0 ? void 0 : _a.removeControl([this.SourceControlRoot, 'branches'].join(''));
|
|
5997
|
+
(_b = this.DevOpsSourceControlFormGroup) === null || _b === void 0 ? void 0 : _b.removeControl([this.SourceControlRoot, 'buildPath'].join(''));
|
|
5998
|
+
this.SelectedBranches = [];
|
|
5999
|
+
(_c = this.DevOpsSourceControlFormGroup) === null || _c === void 0 ? void 0 : _c.removeControl([this.SourceControlRoot, 'organization'].join(''));
|
|
6000
|
+
(_d = this.DevOpsSourceControlFormGroup) === null || _d === void 0 ? void 0 : _d.removeControl([this.SourceControlRoot, 'repository'].join(''));
|
|
6001
|
+
};
|
|
6002
|
+
DevopsSourceControlFormComponent.prototype.emitBranchesChanged = function () {
|
|
6003
|
+
var _a, _b;
|
|
6004
|
+
if (((_a = this.SelectedBranches) === null || _a === void 0 ? void 0 : _a.length) > 0 &&
|
|
6005
|
+
(!this.MainBranchFormControl.value ||
|
|
6006
|
+
this.SelectedBranches.indexOf(this.MainBranchFormControl.value) < 0)) {
|
|
6007
|
+
this.MainBranchFormControl.setValue(this.SelectedBranches.find(function (branch) { return branch === 'main' || branch === 'master'; }) || this.SelectedBranches[0]);
|
|
6008
|
+
}
|
|
6009
|
+
else if (((_b = this.SelectedBranches) === null || _b === void 0 ? void 0 : _b.length) <= 0) {
|
|
6010
|
+
this.MainBranchFormControl.reset();
|
|
6011
|
+
}
|
|
6012
|
+
this.BranchesFormControl.setValue(this.SelectedBranches.join(','));
|
|
6013
|
+
this.BranchesChanged(this.SelectedBranches || []);
|
|
6014
|
+
};
|
|
6015
|
+
DevopsSourceControlFormComponent.prototype.listBranches = function () {
|
|
6016
|
+
var _this = this;
|
|
6017
|
+
if (this.UseBranches) {
|
|
6018
|
+
this.Loading = true;
|
|
6019
|
+
this.appsFlowSvc
|
|
6020
|
+
.ListBranches(this.OrganizationFormControl.value, this.RepositoryFormControl.value)
|
|
6021
|
+
.subscribe(function (response) {
|
|
6022
|
+
var _a, _b, _c;
|
|
6023
|
+
_this.BranchOptions = response.Model;
|
|
6024
|
+
_this.Loading = false;
|
|
6025
|
+
if (((_b = (_a = _this.EditingSourceControl) === null || _a === void 0 ? void 0 : _a.Branches) === null || _b === void 0 ? void 0 : _b.length) > 0) {
|
|
6026
|
+
_this.SelectedBranches = _this.EditingSourceControl.Branches;
|
|
6027
|
+
}
|
|
6028
|
+
else if (((_c = _this.BranchOptions) === null || _c === void 0 ? void 0 : _c.length) === 1) {
|
|
6029
|
+
_this.BranchesFormControl.setValue(_this.BranchOptions[0].Name);
|
|
6030
|
+
_this.SelectedBranches = [_this.BranchOptions[0].Name];
|
|
6031
|
+
}
|
|
6032
|
+
_this.emitBranchesChanged();
|
|
6033
|
+
_this.listBuildPaths();
|
|
6034
|
+
});
|
|
6035
|
+
}
|
|
6036
|
+
};
|
|
6037
|
+
DevopsSourceControlFormComponent.prototype.listBuildPaths = function () {
|
|
6038
|
+
var _this = this;
|
|
6039
|
+
if (this.UseBuildPath) {
|
|
6040
|
+
this.Loading = true;
|
|
6041
|
+
this.appsFlowSvc
|
|
6042
|
+
.ListBuildPaths(this.OrganizationFormControl.value, this.RepositoryFormControl.value)
|
|
6043
|
+
.subscribe(function (response) {
|
|
6044
|
+
var _a;
|
|
6045
|
+
_this.BuildPathOptions = response.Model;
|
|
6046
|
+
_this.Loading = false;
|
|
6047
|
+
if (((_a = _this.BuildPathOptions) === null || _a === void 0 ? void 0 : _a.length) === 1) {
|
|
6048
|
+
_this.BuildPathFormControl.setValue(_this.BuildPathOptions[0]);
|
|
6049
|
+
}
|
|
6050
|
+
});
|
|
6051
|
+
}
|
|
6052
|
+
};
|
|
6053
|
+
DevopsSourceControlFormComponent.prototype.listOrganizations = function () {
|
|
6054
|
+
var _this = this;
|
|
6055
|
+
this.Loading = true;
|
|
6056
|
+
this.appsFlowSvc
|
|
6057
|
+
.ListOrganizations()
|
|
6058
|
+
.subscribe(function (response) {
|
|
6059
|
+
var _a;
|
|
6060
|
+
_this.OrganizationOptions = response.Model;
|
|
6061
|
+
_this.Loading = false;
|
|
6062
|
+
if ((_a = _this.EditingSourceControl) === null || _a === void 0 ? void 0 : _a.Organization) {
|
|
6063
|
+
setTimeout(function () {
|
|
6064
|
+
var _a;
|
|
6065
|
+
_this.OrganizationFormControl.setValue(_this.EditingSourceControl.Organization);
|
|
6066
|
+
_this.listRepositories((_a = _this.EditingSourceControl) === null || _a === void 0 ? void 0 : _a.Repository);
|
|
6067
|
+
}, 0);
|
|
6068
|
+
}
|
|
6069
|
+
});
|
|
6070
|
+
};
|
|
6071
|
+
DevopsSourceControlFormComponent.prototype.listRepositories = function (activeRepo) {
|
|
6072
|
+
var _this = this;
|
|
6073
|
+
if (activeRepo === void 0) { activeRepo = null; }
|
|
6074
|
+
this.Loading = true;
|
|
6075
|
+
this.appsFlowSvc
|
|
6076
|
+
.ListRepositories(this.OrganizationFormControl.value)
|
|
6077
|
+
.subscribe(function (response) {
|
|
6078
|
+
var _a;
|
|
6079
|
+
_this.RepositoryOptions = response.Model;
|
|
6080
|
+
_this.Loading = false;
|
|
6081
|
+
if (activeRepo) {
|
|
6082
|
+
setTimeout(function () {
|
|
6083
|
+
_this.RepositoryFormControl.setValue(activeRepo);
|
|
6084
|
+
_this.listBranches();
|
|
6085
|
+
if (!_this.UseBranches) {
|
|
6086
|
+
_this.listBuildPaths();
|
|
6087
|
+
}
|
|
6088
|
+
}, 0);
|
|
6089
|
+
}
|
|
6090
|
+
else if (((_a = _this.RepositoryOptions) === null || _a === void 0 ? void 0 : _a.length) <= 0) {
|
|
6091
|
+
_this.CreatingRepository = true;
|
|
6092
|
+
}
|
|
6093
|
+
});
|
|
6094
|
+
};
|
|
6095
|
+
DevopsSourceControlFormComponent.prototype.loadProjectHostingDetails = function () {
|
|
6096
|
+
var _this = this;
|
|
6097
|
+
var _a, _b, _c, _d;
|
|
6098
|
+
if (((_a = this.SelectedBranches) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
6099
|
+
this.HostingDetails.Loading = true;
|
|
6100
|
+
this.appsFlowSvc
|
|
6101
|
+
.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)
|
|
6102
|
+
.subscribe(function (response) {
|
|
6103
|
+
_this.HostingDetails = response.Model;
|
|
6104
|
+
_this.HostingDetails.Loading = false;
|
|
6105
|
+
_this.configureDevOpsAction();
|
|
6106
|
+
}, function (err) {
|
|
6107
|
+
_this.HostingDetails.Loading = false;
|
|
6108
|
+
});
|
|
6109
|
+
}
|
|
6110
|
+
};
|
|
6111
|
+
DevopsSourceControlFormComponent.prototype.setupFormControls = function () {
|
|
6112
|
+
// this.destroyFormControls();
|
|
6113
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
6114
|
+
this.DevOpsSourceControlFormGroup.addControl('devOpsActionLookup', new forms.FormControl(this.DevOpsActionLookup || '', []));
|
|
6115
|
+
this.DevOpsSourceControlFormGroup.addControl([this.SourceControlRoot, 'organization'].join(''), new forms.FormControl((_a = this.EditingSourceControl.Organization) !== null && _a !== void 0 ? _a : '', forms.Validators.required));
|
|
6116
|
+
this.DevOpsSourceControlFormGroup.addControl([this.SourceControlRoot, 'repository'].join(''), new forms.FormControl((_b = this.EditingSourceControl.Repository) !== null && _b !== void 0 ? _b : '', forms.Validators.required));
|
|
6117
|
+
if (this.UseBranches) {
|
|
6118
|
+
this.DevOpsSourceControlFormGroup.addControl([this.SourceControlRoot, 'branches'].join(''), new forms.FormControl((_d = (_c = this.EditingSourceControl) === null || _c === void 0 ? void 0 : _c.Branches) !== null && _d !== void 0 ? _d : '', forms.Validators.required));
|
|
6119
|
+
this.SelectedBranches = (_e = this.EditingSourceControl) === null || _e === void 0 ? void 0 : _e.Branches;
|
|
6120
|
+
this.DevOpsSourceControlFormGroup.addControl([this.SourceControlRoot, 'mainBranch'].join(''), new forms.FormControl((_f = this.EditingSourceControl.MainBranch) !== null && _f !== void 0 ? _f : '', forms.Validators.required));
|
|
6121
|
+
}
|
|
6122
|
+
if (this.UseBuildPath) {
|
|
6123
|
+
this.DevOpsSourceControlFormGroup.addControl([this.SourceControlRoot, 'buildPath'].join(''), new forms.FormControl((_g = this.BuildPath) !== null && _g !== void 0 ? _g : '', forms.Validators.required));
|
|
6124
|
+
}
|
|
5504
6125
|
};
|
|
5505
6126
|
return DevopsSourceControlFormComponent;
|
|
5506
6127
|
}());
|
|
5507
6128
|
DevopsSourceControlFormComponent.decorators = [
|
|
5508
6129
|
{ type: i0.Component, args: [{
|
|
5509
6130
|
selector: 'lcu-devops-source-control-form',
|
|
5510
|
-
template: "<p>devops-source-control-form works!</p>\n",
|
|
6131
|
+
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>",
|
|
6132
|
+
styles: [".form-card,.sc-card{width:100%}"]
|
|
6133
|
+
},] }
|
|
6134
|
+
];
|
|
6135
|
+
DevopsSourceControlFormComponent.ctorParameters = function () { return [
|
|
6136
|
+
{ type: forms.FormBuilder },
|
|
6137
|
+
{ type: ApplicationsFlowService },
|
|
6138
|
+
{ type: EaCService }
|
|
6139
|
+
]; };
|
|
6140
|
+
DevopsSourceControlFormComponent.propDecorators = {
|
|
6141
|
+
BranchesInput: [{ type: i0.ViewChild, args: ['branches',] }],
|
|
6142
|
+
EditingSourceControlLookup: [{ type: i0.Input, args: ['editing-source-control-lookup',] }],
|
|
6143
|
+
Environment: [{ type: i0.Input, args: ['environment',] }]
|
|
6144
|
+
};
|
|
6145
|
+
|
|
6146
|
+
var SourceControlDialogComponent = /** @class */ (function () {
|
|
6147
|
+
function SourceControlDialogComponent(dialogRef, data) {
|
|
6148
|
+
this.dialogRef = dialogRef;
|
|
6149
|
+
this.data = data;
|
|
6150
|
+
}
|
|
6151
|
+
SourceControlDialogComponent.prototype.ngOnInit = function () {
|
|
6152
|
+
};
|
|
6153
|
+
return SourceControlDialogComponent;
|
|
6154
|
+
}());
|
|
6155
|
+
SourceControlDialogComponent.decorators = [
|
|
6156
|
+
{ type: i0.Component, args: [{
|
|
6157
|
+
selector: 'lcu-source-control-dialog',
|
|
6158
|
+
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>",
|
|
6159
|
+
styles: [""]
|
|
6160
|
+
},] }
|
|
6161
|
+
];
|
|
6162
|
+
SourceControlDialogComponent.ctorParameters = function () { return [
|
|
6163
|
+
{ type: dialog.MatDialogRef },
|
|
6164
|
+
{ type: undefined, decorators: [{ type: i0.Inject, args: [dialog.MAT_DIALOG_DATA,] }] }
|
|
6165
|
+
]; };
|
|
6166
|
+
|
|
6167
|
+
var BuildPipelineDialogComponent = /** @class */ (function () {
|
|
6168
|
+
function BuildPipelineDialogComponent(dialogRef, data) {
|
|
6169
|
+
this.dialogRef = dialogRef;
|
|
6170
|
+
this.data = data;
|
|
6171
|
+
}
|
|
6172
|
+
BuildPipelineDialogComponent.prototype.ngOnInit = function () {
|
|
6173
|
+
};
|
|
6174
|
+
return BuildPipelineDialogComponent;
|
|
6175
|
+
}());
|
|
6176
|
+
BuildPipelineDialogComponent.decorators = [
|
|
6177
|
+
{ type: i0.Component, args: [{
|
|
6178
|
+
selector: 'lcu-build-pipeline-dialog',
|
|
6179
|
+
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",
|
|
5511
6180
|
styles: [""]
|
|
5512
6181
|
},] }
|
|
5513
6182
|
];
|
|
5514
|
-
|
|
6183
|
+
BuildPipelineDialogComponent.ctorParameters = function () { return [
|
|
6184
|
+
{ type: dialog.MatDialogRef },
|
|
6185
|
+
{ type: undefined, decorators: [{ type: i0.Inject, args: [dialog.MAT_DIALOG_DATA,] }] }
|
|
6186
|
+
]; };
|
|
5515
6187
|
|
|
5516
6188
|
var ApplicationsFlowModule = /** @class */ (function () {
|
|
5517
6189
|
function ApplicationsFlowModule() {
|
|
@@ -5570,7 +6242,9 @@
|
|
|
5570
6242
|
ProcessorDetailsFormComponent,
|
|
5571
6243
|
SourceControlFormComponent,
|
|
5572
6244
|
BuildPipelineFormComponent,
|
|
5573
|
-
DevopsSourceControlFormComponent
|
|
6245
|
+
DevopsSourceControlFormComponent,
|
|
6246
|
+
SourceControlDialogComponent,
|
|
6247
|
+
BuildPipelineDialogComponent
|
|
5574
6248
|
],
|
|
5575
6249
|
imports: [
|
|
5576
6250
|
i2.FathymSharedModule,
|
|
@@ -5620,7 +6294,9 @@
|
|
|
5620
6294
|
ProcessorDetailsFormComponent,
|
|
5621
6295
|
SourceControlFormComponent,
|
|
5622
6296
|
BuildPipelineFormComponent,
|
|
5623
|
-
DevopsSourceControlFormComponent
|
|
6297
|
+
DevopsSourceControlFormComponent,
|
|
6298
|
+
SourceControlDialogComponent,
|
|
6299
|
+
BuildPipelineDialogComponent
|
|
5624
6300
|
],
|
|
5625
6301
|
entryComponents: [
|
|
5626
6302
|
ApplicationsFlowProjectsElementComponent,
|
|
@@ -5657,7 +6333,9 @@
|
|
|
5657
6333
|
ProcessorDetailsFormComponent,
|
|
5658
6334
|
SourceControlFormComponent,
|
|
5659
6335
|
BuildPipelineFormComponent,
|
|
5660
|
-
DevopsSourceControlFormComponent
|
|
6336
|
+
DevopsSourceControlFormComponent,
|
|
6337
|
+
SourceControlDialogComponent,
|
|
6338
|
+
BuildPipelineDialogComponent
|
|
5661
6339
|
],
|
|
5662
6340
|
},] }
|
|
5663
6341
|
];
|
|
@@ -5751,6 +6429,8 @@
|
|
|
5751
6429
|
exports.ɵba = SourceControlFormComponent;
|
|
5752
6430
|
exports.ɵbb = BuildPipelineFormComponent;
|
|
5753
6431
|
exports.ɵbc = DevopsSourceControlFormComponent;
|
|
6432
|
+
exports.ɵbd = SourceControlDialogComponent;
|
|
6433
|
+
exports.ɵbe = BuildPipelineDialogComponent;
|
|
5754
6434
|
exports.ɵc = ProjectTabsComponent;
|
|
5755
6435
|
exports.ɵd = GeneralComponent;
|
|
5756
6436
|
exports.ɵe = DomainsComponent;
|