Skip to content

Commit a83e3a6

Browse files
committed
feat: add frontend
1 parent 90b2e66 commit a83e3a6

File tree

9 files changed

+166
-0
lines changed

9 files changed

+166
-0
lines changed

frontend/src/angular/src/app/app.routes.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,9 @@ export const routes: Routes = [
4242
path: 'booklist',
4343
loadChildren: () => import('./book-list').then((mod) => mod.BOOKLIST),
4444
},
45+
{
46+
path: 'mcpclient',
47+
loadChildren: () => import('./mcp-client').then((mod) => mod.MCPCLIENTSEARCH),
48+
},
4549
{ path: '**', redirectTo: 'doclist' },
4650
];

frontend/src/angular/src/app/doc-list/doc-list.component.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22
<div class="toolbar-content">
33
<div i18n="@@doclistHeading">Document List</div>
44
<div class="example-fill-remaining-space"></div>
5+
<div>
6+
<button
7+
mat-flat-button
8+
color="primary"
9+
(click)="mcpClient()"
10+
i18n="@@mcpClient"
11+
>
12+
MCP Client
13+
</button>
14+
</div>
515
<div>
616
<button
717
mat-flat-button

frontend/src/angular/src/app/doc-list/doc-list.component.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ export class DocListComponent implements OnInit {
7272
this.router.navigate(['/docsearch']);
7373
}
7474

75+
protected mcpClient(): void {
76+
this.router.navigate(['/mcpclient']);
77+
}
78+
7579
protected imageQuery(): void {
7680
this.router.navigate(['/imagequery']);
7781
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/**
2+
* Copyright 2018 Sven Loesekann
3+
Licensed under the Apache License, Version 2.0 (the "License");
4+
you may not use this file except in compliance with the License.
5+
You may obtain a copy of the License at
6+
http://www.apache.org/licenses/LICENSE-2.0
7+
Unless required by applicable law or agreed to in writing, software
8+
distributed under the License is distributed on an "AS IS" BASIS,
9+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10+
See the License for the specific language governing permissions and
11+
limitations under the License.
12+
*/
13+
export * from './mcp-client.routes';
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<mat-toolbar color="primary" class="custom-toolbar">
2+
<div class="toolbar-content">
3+
<div i18n="@@mcpSearchHeading">Mcp Search</div>
4+
<div class="example-fill-remaining-space"></div>
5+
<div>
6+
<button
7+
mat-flat-button
8+
color="primary"
9+
(click)="showList()"
10+
i18n="@@list"
11+
>
12+
List
13+
</button>
14+
</div>
15+
<div>
16+
<button
17+
mat-flat-button
18+
color="primary"
19+
(click)="logout()"
20+
i18n="@@logout"
21+
>
22+
Logout
23+
</button>
24+
</div>
25+
</div>
26+
</mat-toolbar>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/**
2+
* Copyright 2023 Sven Loesekann
3+
Licensed under the Apache License, Version 2.0 (the "License");
4+
you may not use this file except in compliance with the License.
5+
You may obtain a copy of the License at
6+
http://www.apache.org/licenses/LICENSE-2.0
7+
Unless required by applicable law or agreed to in writing, software
8+
distributed under the License is distributed on an "AS IS" BASIS,
9+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10+
See the License for the specific language governing permissions and
11+
limitations under the License.
12+
*/
13+
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/**
2+
* Copyright 2023 Sven Loesekann
3+
Licensed under the Apache License, Version 2.0 (the "License");
4+
you may not use this file except in compliance with the License.
5+
You may obtain a copy of the License at
6+
http://www.apache.org/licenses/LICENSE-2.0
7+
Unless required by applicable law or agreed to in writing, software
8+
distributed under the License is distributed on an "AS IS" BASIS,
9+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10+
See the License for the specific language governing permissions and
11+
limitations under the License.
12+
*/
13+
import { ComponentFixture, TestBed } from '@angular/core/testing';
14+
15+
import { McpClientComponent } from './mcp-client.component';
16+
/*
17+
describe('McpClientComponent', () => {
18+
let component: McpClientComponent;
19+
let fixture: ComponentFixture<McpClientComponent>;
20+
21+
beforeEach(async () => {
22+
await TestBed.configureTestingModule({
23+
imports: [McpClientComponent]
24+
})
25+
.compileComponents();
26+
27+
fixture = TestBed.createComponent(McpClientComponent);
28+
component = fixture.componentInstance;
29+
fixture.detectChanges();
30+
});
31+
32+
it('should create', () => {
33+
expect(component).toBeTruthy();
34+
});
35+
});
36+
*/
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/**
2+
* Copyright 2023 Sven Loesekann
3+
Licensed under the Apache License, Version 2.0 (the "License");
4+
you may not use this file except in compliance with the License.
5+
You may obtain a copy of the License at
6+
http://www.apache.org/licenses/LICENSE-2.0
7+
Unless required by applicable law or agreed to in writing, software
8+
distributed under the License is distributed on an "AS IS" BASIS,
9+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10+
See the License for the specific language governing permissions and
11+
limitations under the License.
12+
*/
13+
import { CommonModule } from '@angular/common';
14+
import { Component } from '@angular/core';
15+
import { MatButtonModule } from '@angular/material/button';
16+
import { MatToolbarModule } from '@angular/material/toolbar';
17+
import { Router } from '@angular/router';
18+
19+
@Component({
20+
selector: 'app-mcp-client',
21+
imports: [
22+
CommonModule,
23+
MatToolbarModule,
24+
MatButtonModule],
25+
templateUrl: './mcp-client.component.html',
26+
styleUrl: './mcp-client.component.scss'
27+
})
28+
export class McpClientComponent {
29+
constructor(private readonly router: Router) {}
30+
31+
protected showList(): void {
32+
this.router.navigate(['/doclist']);
33+
}
34+
35+
protected logout(): void {
36+
}
37+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/**
2+
* Copyright 2023 Sven Loesekann
3+
Licensed under the Apache License, Version 2.0 (the "License");
4+
you may not use this file except in compliance with the License.
5+
You may obtain a copy of the License at
6+
http://www.apache.org/licenses/LICENSE-2.0
7+
Unless required by applicable law or agreed to in writing, software
8+
distributed under the License is distributed on an "AS IS" BASIS,
9+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10+
See the License for the specific language governing permissions and
11+
limitations under the License.
12+
*/
13+
import { Routes } from '@angular/router';
14+
import { McpClientComponent } from './mcp-client.component';
15+
16+
17+
export const MCPCLIENTSEARCH: Routes = [
18+
{
19+
path: '',
20+
component: McpClientComponent,
21+
},
22+
{ path: '**', redirectTo: '' },
23+
];

0 commit comments

Comments
 (0)