From 00b1f0e3ccff190b7711e6ec3ab8738bee0d075a Mon Sep 17 00:00:00 2001 From: alecmerdler Date: Fri, 17 Feb 2017 17:08:33 -0800 Subject: [PATCH] starting ManageTriggerCustomGitComponent --- ...anage-trigger-custom-git.component.spec.ts | 0 .../manage-trigger-custom-git.component.ts | 69 ++++++++++++++++++ static/js/quay.module.ts | 2 + static/partials/trigger-setup.html | 5 +- test/data/test.db | Bin 1306624 -> 1306624 bytes 5 files changed, 74 insertions(+), 2 deletions(-) create mode 100644 static/js/directives/ui/manage-trigger-custom-git/manage-trigger-custom-git.component.spec.ts create mode 100644 static/js/directives/ui/manage-trigger-custom-git/manage-trigger-custom-git.component.ts diff --git a/static/js/directives/ui/manage-trigger-custom-git/manage-trigger-custom-git.component.spec.ts b/static/js/directives/ui/manage-trigger-custom-git/manage-trigger-custom-git.component.spec.ts new file mode 100644 index 000000000..e69de29bb diff --git a/static/js/directives/ui/manage-trigger-custom-git/manage-trigger-custom-git.component.ts b/static/js/directives/ui/manage-trigger-custom-git/manage-trigger-custom-git.component.ts new file mode 100644 index 000000000..3f4f55b83 --- /dev/null +++ b/static/js/directives/ui/manage-trigger-custom-git/manage-trigger-custom-git.component.ts @@ -0,0 +1,69 @@ +import { Input, Output, Component } from 'angular-ts-decorators'; + + +@Component({ + selector: 'manageTriggerCustomGit', + template: ` +
+
+ +
+ +
+

Enter repository

+ + Please enter the HTTP or SSH style URL used to clone your git repository: + + +
+ +
+ + +
+ +
+

Select build context directory

+ Please select the build context directory under the git repository: + +
+ + +
+
+ ` +}) +export class ManageTriggerCustomGitComponent implements ng.IComponentController { + + // FIXME: Use one-way data binding + @Input('=') public trigger: {config: any}; + @Output() public activateTrigger: any; + private config: any = {}; + private currentState: any | null; + private gitUrlRegEx: string = "((ssh|http(s)?)|(git@[\w\.]+))(:(//)?)([\w\.@\:/\-~]+)(\.git)(/)?"; + + public $onChanges(changes: ng.IOnChangesObject): void { + if (changes['trigger'] !== undefined) { + this.config = Object.assign({}, changes['trigger'].currentValue.config); + } + } +} diff --git a/static/js/quay.module.ts b/static/js/quay.module.ts index 76ac3f207..229c16a09 100644 --- a/static/js/quay.module.ts +++ b/static/js/quay.module.ts @@ -7,6 +7,7 @@ import { RegexMatchViewComponent } from "./directives/ui/regex-match-view/regex- import { NgModule } from "angular-ts-decorators"; import { QuayRoutes } from "./quay-routes.module"; import { DockerfilePathSelectComponent } from './directives/ui/dockerfile-path-select/dockerfile-path-select.component'; +import { ManageTriggerCustomGitComponent } from './directives/ui/manage-trigger-custom-git/manage-trigger-custom-git.component'; var quayDependencies: any[] = [ @@ -55,6 +56,7 @@ if (INJECTED_CONFIG && INJECTED_CONFIG.RECAPTCHA_SITE_KEY) { declarations: [ RegexMatchViewComponent, DockerfilePathSelectComponent, + ManageTriggerCustomGitComponent, ], providers: [ ViewArrayImpl, diff --git a/static/partials/trigger-setup.html b/static/partials/trigger-setup.html index 6ccb87bda..79f676508 100644 --- a/static/partials/trigger-setup.html +++ b/static/partials/trigger-setup.html @@ -44,8 +44,9 @@
-
+
diff --git a/test/data/test.db b/test/data/test.db index 9c7a22b34ab4c1da80f7bd8882a9f159c5241908..5b1af4074de1911cda2ad7635c99851d7c652caf 100644 GIT binary patch delta 196 zcmWN=u@1pd6adis-lLRqm6603G*nx3lUOC4B*q)mY_~An7(~KkHTeONEr-19w%3OFhb9h zMHmZV0@wh7JDp9vc;<9ir%G0i8trBCYK3J7fDbp+f lfW$B07k`QU$i49NZmEor+cdKDl3vzPujsa3P12}lod56bJC*16S!Iv zxVI+oER$z5WZ>`RH{2}fpvoT=#l+1J%E`zX%OJ?WV4j?oVrgQUtea?_W~ggoY+|Bo znVMpzo0OCYK}5DNma(Dq;c!fXowux&x|