diff --git a/client/src/app/ctl/config/config-manifest/repository/repository.component.spec.ts b/client/src/app/ctl/config/config-manifest/repository/repository.component.spec.ts
new file mode 100644
index 0000000..083cb76
--- /dev/null
+++ b/client/src/app/ctl/config/config-manifest/repository/repository.component.spec.ts
@@ -0,0 +1,62 @@
+/*
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+*/
+
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+import { FormsModule, ReactiveFormsModule } from '@angular/forms';
+import { MatButtonModule } from '@angular/material/button';
+import { MatCheckboxModule } from '@angular/material/checkbox';
+import { MatDialogModule, MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
+import { MatInputModule } from '@angular/material/input';
+import { MatSelectModule } from '@angular/material/select';
+import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
+import { ToastrModule } from 'ngx-toastr';
+
+import { RepositoryComponent } from './repository.component';
+
+describe('RepositoryComponent', () => {
+ let component: RepositoryComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ RepositoryComponent ],
+ imports: [
+ BrowserAnimationsModule,
+ FormsModule,
+ MatButtonModule,
+ MatCheckboxModule,
+ MatInputModule,
+ MatSelectModule,
+ ReactiveFormsModule,
+ MatDialogModule,
+ ToastrModule.forRoot()
+ ],
+ providers: [
+ {provide: MAT_DIALOG_DATA, useValue: {name: 'default'}},
+ {provide: MatDialogRef, useValue: {}}
+ ]
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(RepositoryComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/client/src/app/ctl/config/config-manifest/repository/repository.component.ts b/client/src/app/ctl/config/config-manifest/repository/repository.component.ts
new file mode 100644
index 0000000..c4cb219
--- /dev/null
+++ b/client/src/app/ctl/config/config-manifest/repository/repository.component.ts
@@ -0,0 +1,79 @@
+/*
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+*/
+
+import { Component, Inject, OnInit } from '@angular/core';
+import { FormGroup, FormControl, Validators } from '@angular/forms';
+import { MatDialogRef, MAT_DIALOG_DATA} from '@angular/material/dialog';
+import { WsConstants, WsMessage } from 'src/services/ws/ws.models';
+import { WsService } from 'src/services/ws/ws.service';
+import { ManifestOptions } from '../../config.models';
+
+@Component({
+ selector: 'app-repository',
+ templateUrl: './repository.component.html',
+ styleUrls: ['./repository.component.css']
+})
+export class RepositoryComponent implements OnInit{
+
+ group: FormGroup;
+ checkoutTypes = ['Branch', 'CommitHash', 'Tag'];
+ checkoutType = 'Branch';
+
+ constructor(
+ public dialogRef: MatDialogRef,
+ @Inject(MAT_DIALOG_DATA) public data: {
+ name: string,
+ },
+ private ws: WsService) {}
+
+ ngOnInit(): void {
+ this.group = new FormGroup({
+ repoName: new FormControl('', Validators.required),
+ url: new FormControl('', Validators.required),
+ checkoutReference: new FormControl('', Validators.required),
+ force: new FormControl(false),
+ isPhase: new FormControl(false)
+ });
+ }
+
+ cancel(): void {
+ this.dialogRef.close();
+ }
+
+ setRepo(): void {
+ const msg = new WsMessage(WsConstants.CTL, WsConstants.CONFIG, WsConstants.SET_MANIFEST);
+ msg.name = this.data.name;
+ const opts: ManifestOptions = {
+ Name: this.data.name,
+ RepoName: this.group.controls.repoName.value,
+ URL: this.group.controls.url.value,
+ Branch: null,
+ CommitHash: null,
+ Tag: null,
+ RemoteRef: null,
+ Force: this.group.controls.force.value,
+ IsPhase: this.group.controls.isPhase.value,
+ TargetPath: null,
+ MetadataPath: null
+ };
+
+ opts[this.checkoutType] = this.group.controls.checkoutReference.value;
+
+ msg.data = JSON.parse(JSON.stringify(opts));
+ this.ws.sendMessage(msg);
+
+ this.dialogRef.close();
+ }
+
+}
diff --git a/client/src/app/ctl/config/config-manifest/repository/repository.module.ts b/client/src/app/ctl/config/config-manifest/repository/repository.module.ts
new file mode 100644
index 0000000..137859e
--- /dev/null
+++ b/client/src/app/ctl/config/config-manifest/repository/repository.module.ts
@@ -0,0 +1,36 @@
+/*
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+*/
+
+import { NgModule } from '@angular/core';
+import { FormsModule, ReactiveFormsModule } from '@angular/forms';
+import { MatButtonModule } from '@angular/material/button';
+import { MatCheckboxModule } from '@angular/material/checkbox';
+import { MatDialogModule } from '@angular/material/dialog';
+import { MatInputModule } from '@angular/material/input';
+import { RepositoryComponent } from './repository.component';
+
+@NgModule({
+ imports: [
+ FormsModule,
+ MatInputModule,
+ MatCheckboxModule,
+ ReactiveFormsModule,
+ MatButtonModule,
+ MatDialogModule
+ ],
+ declarations: [],
+ providers: []
+})
+
+export class RepositoryModule { }
diff --git a/client/src/app/ctl/config/config.models.ts b/client/src/app/ctl/config/config.models.ts
index 000c7fd..ae7ec1a 100644
--- a/client/src/app/ctl/config/config.models.ts
+++ b/client/src/app/ctl/config/config.models.ts
@@ -12,6 +12,8 @@
# limitations under the License.
*/
+import { FormControl } from '@angular/forms';
+
export class EncryptionConfig {
name: string;
encryptionKeyPath: string;
@@ -101,7 +103,6 @@ export class ManifestOptions {
RemoteRef = '';
Force = false;
IsPhase = false;
- SubPath = '';
TargetPath = '';
MetadataPath = '';
}
diff --git a/client/src/app/ctl/config/config.module.ts b/client/src/app/ctl/config/config.module.ts
index 133fc5d..31c5d23 100755
--- a/client/src/app/ctl/config/config.module.ts
+++ b/client/src/app/ctl/config/config.module.ts
@@ -30,6 +30,7 @@ import { MatCheckboxModule } from '@angular/material/checkbox';
import { MatExpansionModule } from '@angular/material/expansion';
import { ConfigNewComponent } from './config-new/config-new.component';
import { MatSelectModule } from '@angular/material/select';
+import { RepositoryComponent } from './config-manifest/repository/repository.component';
@NgModule({
imports: [
@@ -52,7 +53,8 @@ import { MatSelectModule } from '@angular/material/select';
ConfigManagementComponent,
ConfigManifestComponent,
ConfigInitComponent,
- ConfigNewComponent
+ ConfigNewComponent,
+ RepositoryComponent
],
providers: [],
schemas: [CUSTOM_ELEMENTS_SCHEMA]