+ Path entered for folder containing Dockerfile is invalid: Must start with a '/'.
+
+
+
diff --git a/static/js/directives/ui/dockerfile-path-select/dockerfile-path-select.component.ts b/static/js/directives/ui/dockerfile-path-select/dockerfile-path-select.component.ts
index ab3c05756..be0109ef4 100644
--- a/static/js/directives/ui/dockerfile-path-select/dockerfile-path-select.component.ts
+++ b/static/js/directives/ui/dockerfile-path-select/dockerfile-path-select.component.ts
@@ -1,47 +1,12 @@
import { Input, Component } from 'angular-ts-decorators';
+/**
+ * A component that allows the user to select the location of the Dockerfile in their source code repository.
+ */
@Component({
selector: 'dockerfilePathSelect',
- template: `
-
- Path entered for folder containing Dockerfile is invalid: Must start with a '/'.
-
-
-
- `,
+ templateUrl: '/static/js/directives/ui/dockerfile-path-select/dockerfile-path-select.component.html'
})
export class DockerfilePathSelectComponent implements ng.IComponentController {
diff --git a/static/js/directives/ui/manage-trigger-custom-git.js b/static/js/directives/ui/manage-trigger-custom-git.js
deleted file mode 100644
index e039e11c0..000000000
--- a/static/js/directives/ui/manage-trigger-custom-git.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * An element which displays the setup and management workflow for a custom git trigger.
- */
-angular.module('quay').directive('manageTriggerCustomGit', function () {
- var directiveDefinitionObject = {
- priority: 0,
- templateUrl: '/static/directives/manage-trigger-custom-git.html',
- replace: false,
- transclude: true,
- restrict: 'C',
- scope: {
- 'trigger': '=trigger',
- 'activateTrigger': '&activateTrigger'
- },
- controller: function($scope, $element) {
- $scope.config = {};
- $scope.currentState = null;
-
- $scope.$watch('trigger', function(trigger) {
- if (trigger) {
- $scope.config = trigger['config'] || {};
- }
- });
- }
- };
- return directiveDefinitionObject;
-});
\ No newline at end of file
diff --git a/static/directives/manage-trigger-custom-git.html b/static/js/directives/ui/manage-trigger-custom-git/manage-trigger-custom-git.component.html
similarity index 71%
rename from static/directives/manage-trigger-custom-git.html
rename to static/js/directives/ui/manage-trigger-custom-git/manage-trigger-custom-git.component.html
index 96fb0819a..563ac04f9 100644
--- a/static/directives/manage-trigger-custom-git.html
+++ b/static/js/directives/ui/manage-trigger-custom-git/manage-trigger-custom-git.component.html
@@ -1,11 +1,13 @@
-
+
+ section-valid="$ctrl.config.build_source">
Enter repository
@@ -13,7 +15,8 @@
Please enter the HTTP or SSH style URL used to clone your git repository:
+ ng-model="$ctrl.config.build_source"
+ ng-pattern="/(((http|https):\/\/)(.+)|\w+@(.+):(.+))/">
Custom git triggers support any externally accessible git repository, via either the normal git protocol or HTTP.
@@ -26,18 +29,19 @@
+ section-valid="$ctrl.config.subdir">
Select build context directory
- Please select the build context directory under the git repository:
-
+ Please select the build context directory under the git repository:
+
The build context directory is the path of the directory containing the Dockerfile and any other files to be made available when the build is triggered.
If the Dockerfile is located at the root of the git repository, enter / as the build context directory.
-
-
\ No newline at end of file
+
+
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
index 3f4f55b83..4addf1a24 100644
--- 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
@@ -1,56 +1,12 @@
import { Input, Output, Component } from 'angular-ts-decorators';
+/**
+ * A component that lets the user set up a build trigger for a custom Git repository.
+ */
@Component({
selector: 'manageTriggerCustomGit',
- template: `
-
-
-
-
-
-
-
Enter repository
-
- Please enter the HTTP or SSH style URL used to clone your git repository:
-
-
-
-
-
Custom git triggers support any externally accessible git repository, via either the normal git protocol or HTTP.
-
-
It is the responsibility of the git repository to invoke a webhook to tell that a commit has been added.
-
-
-
-
-
-
-
-
Select build context directory
- Please select the build context directory under the git repository:
-
-
-
-
The build context directory is the path of the directory containing the Dockerfile and any other files to be made available when the build is triggered.
-
If the Dockerfile is located at the root of the git repository, enter / as the build context directory.
-
-
-
-
- `
+ templateUrl: '/static/js/directives/ui/manage-trigger-custom-git/manage-trigger-custom-git.component.html'
})
export class ManageTriggerCustomGitComponent implements ng.IComponentController {
@@ -59,7 +15,6 @@ export class ManageTriggerCustomGitComponent implements ng.IComponentController
@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) {
diff --git a/static/js/directives/ui/regex-match-view/regex-match-view.component.html b/static/js/directives/ui/regex-match-view/regex-match-view.component.html
new file mode 100644
index 000000000..bdfaa597a
--- /dev/null
+++ b/static/js/directives/ui/regex-match-view/regex-match-view.component.html
@@ -0,0 +1,29 @@
+
+
+ Invalid Regular Expression!
+
+
+
+
+
Matching:
+
+
+
+ {{ item.title }}
+
+
+
+
+
+
Not Matching:
+
+
+
+ {{ item.title }}
+
+
+
+
+
+
+
diff --git a/static/js/directives/ui/regex-match-view/regex-match-view.component.ts b/static/js/directives/ui/regex-match-view/regex-match-view.component.ts
index 45995908d..256a2d99e 100644
--- a/static/js/directives/ui/regex-match-view/regex-match-view.component.ts
+++ b/static/js/directives/ui/regex-match-view/regex-match-view.component.ts
@@ -2,42 +2,12 @@ import { Input, Component } from 'angular-ts-decorators';
/**
- * An element which displays the matches and non-matches for a regular expression against a set of
+ * A component that displays the matches and non-matches for a regular expression against a set of
* items.
*/
@Component({
selector: 'regexMatchView',
- template: `
-