Skip to content

Commit b51d687

Browse files
committed
lint
1 parent c9c118a commit b51d687

3 files changed

Lines changed: 191 additions & 45 deletions

File tree

src/app/adf-services/df-service-details/df-service-details.component.html

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -882,13 +882,17 @@ <h4 class="text-center" style="color: black !important">
882882
<ng-container *ngIf="isMcp && edit">
883883
<mat-accordion class="full-width">
884884
<mat-expansion-panel [expanded]="true">
885-
<mat-expansion-panel-header>
886-
MCP Tools
887-
</mat-expansion-panel-header>
885+
<mat-expansion-panel-header> MCP Tools </mat-expansion-panel-header>
888886
<div class="details-section" *ngIf="!mcpServicesLoaded">
889887
<p>Loading services...</p>
890888
</div>
891-
<div class="details-section" *ngIf="mcpServicesLoaded && mcpServices.length === 0 && mcpGlobalTools.length === 0">
889+
<div
890+
class="details-section"
891+
*ngIf="
892+
mcpServicesLoaded &&
893+
mcpServices.length === 0 &&
894+
mcpGlobalTools.length === 0
895+
">
892896
<p>No database or file services found.</p>
893897
</div>
894898
<div *ngIf="mcpServicesLoaded" class="mcp-tools-container">
@@ -918,23 +922,29 @@ <h4 class="text-center" style="color: black !important">
918922
</tr>
919923
</thead>
920924
<tbody>
921-
<tr *ngFor="let tool of mcpGlobalTools" [class.disabled-row]="!isToolEnabled(tool.name)">
925+
<tr
926+
*ngFor="let tool of mcpGlobalTools"
927+
[class.disabled-row]="!isToolEnabled(tool.name)">
922928
<td class="toggle-col">
923929
<mat-slide-toggle
924930
color="primary"
925931
[checked]="isToolEnabled(tool.name)"
926932
(change)="toggleTool(tool.name, $event.checked)">
927933
</mat-slide-toggle>
928934
</td>
929-
<td><code>{{ tool.name }}</code></td>
935+
<td>
936+
<code>{{ tool.name }}</code>
937+
</td>
930938
<td>{{ tool.description }}</td>
931939
</tr>
932940
</tbody>
933941
</table>
934942
</mat-expansion-panel>
935943

936944
<!-- Per-service tools -->
937-
<mat-expansion-panel *ngFor="let svc of mcpServices" [expanded]="svc.expanded">
945+
<mat-expansion-panel
946+
*ngFor="let svc of mcpServices"
947+
[expanded]="svc.expanded">
938948
<mat-expansion-panel-header>
939949
<mat-panel-title class="mcp-service-header">
940950
<mat-slide-toggle
@@ -958,15 +968,19 @@ <h4 class="text-center" style="color: black !important">
958968
</tr>
959969
</thead>
960970
<tbody>
961-
<tr *ngFor="let tool of svc.tools" [class.disabled-row]="!isToolEnabled(tool.name)">
971+
<tr
972+
*ngFor="let tool of svc.tools"
973+
[class.disabled-row]="!isToolEnabled(tool.name)">
962974
<td class="toggle-col">
963975
<mat-slide-toggle
964976
color="primary"
965977
[checked]="isToolEnabled(tool.name)"
966978
(change)="toggleTool(tool.name, $event.checked)">
967979
</mat-slide-toggle>
968980
</td>
969-
<td><code>{{ tool.name }}</code></td>
981+
<td>
982+
<code>{{ tool.name }}</code>
983+
</td>
970984
<td>{{ tool.description }}</td>
971985
</tr>
972986
</tbody>

src/app/adf-services/df-service-details/df-service-details.component.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,8 @@ mat-icon {
609609
width: 100%;
610610
border-collapse: collapse;
611611

612-
th, td {
612+
th,
613+
td {
613614
text-align: left;
614615
padding: 8px 12px;
615616
border-bottom: 1px solid rgba(0, 0, 0, 0.12);

src/app/adf-services/df-service-details/df-service-details.component.ts

Lines changed: 166 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -190,15 +190,53 @@ export class DfServiceDetailsComponent implements OnInit {
190190
mcpServicesLoaded = false;
191191
disabledTools = new Set<string>();
192192
mcpGlobalTools: { name: string; title: string; description: string }[] = [
193-
{ name: 'list_apis', title: 'List Available APIs', description: 'List all available database APIs and their tool prefixes' },
194-
{ name: 'all_get_tables', title: 'Get Tables from All Databases', description: 'Retrieve tables from all connected database services in one call' },
195-
{ name: 'all_find_table', title: 'Find Table Across Databases', description: 'Search for a table by name across all connected databases' },
196-
{ name: 'all_get_stored_procedures', title: 'Get Stored Procedures from All', description: 'Retrieve stored procedures from all connected databases' },
197-
{ name: 'all_get_stored_functions', title: 'Get Stored Functions from All', description: 'Retrieve stored functions from all connected databases' },
198-
{ name: 'all_get_resources', title: 'Get Resources from All', description: 'Retrieve all available resources from all connected databases' },
199-
{ name: 'all_list_files', title: 'List Files from All Storage', description: 'List files from all connected file storage services' },
200-
{ name: 'search', title: 'Search (stub)', description: 'Stub search implementation for connectors that require it' },
201-
{ name: 'fetch', title: 'Fetch (stub)', description: 'Stub fetch implementation for connectors that require it' },
193+
{
194+
name: 'list_apis',
195+
title: 'List Available APIs',
196+
description: 'List all available database APIs and their tool prefixes',
197+
},
198+
{
199+
name: 'all_get_tables',
200+
title: 'Get Tables from All Databases',
201+
description:
202+
'Retrieve tables from all connected database services in one call',
203+
},
204+
{
205+
name: 'all_find_table',
206+
title: 'Find Table Across Databases',
207+
description: 'Search for a table by name across all connected databases',
208+
},
209+
{
210+
name: 'all_get_stored_procedures',
211+
title: 'Get Stored Procedures from All',
212+
description: 'Retrieve stored procedures from all connected databases',
213+
},
214+
{
215+
name: 'all_get_stored_functions',
216+
title: 'Get Stored Functions from All',
217+
description: 'Retrieve stored functions from all connected databases',
218+
},
219+
{
220+
name: 'all_get_resources',
221+
title: 'Get Resources from All',
222+
description:
223+
'Retrieve all available resources from all connected databases',
224+
},
225+
{
226+
name: 'all_list_files',
227+
title: 'List Files from All Storage',
228+
description: 'List files from all connected file storage services',
229+
},
230+
{
231+
name: 'search',
232+
title: 'Search (stub)',
233+
description: 'Stub search implementation for connectors that require it',
234+
},
235+
{
236+
name: 'fetch',
237+
title: 'Fetch (stub)',
238+
description: 'Stub fetch implementation for connectors that require it',
239+
},
202240
];
203241

204242
constructor(
@@ -696,7 +734,9 @@ export class DfServiceDetailsComponent implements OnInit {
696734
switchMap((typeData: any) => {
697735
const types: any[] = typeData?.resource ?? [];
698736
const dbTypes = new Set(
699-
types.filter((t: any) => t.group === 'Database').map((t: any) => t.name)
737+
types
738+
.filter((t: any) => t.group === 'Database')
739+
.map((t: any) => t.name)
700740
);
701741
const fileTypes = new Set(
702742
types.filter((t: any) => t.group === 'File').map((t: any) => t.name)
@@ -732,11 +772,11 @@ export class DfServiceDetailsComponent implements OnInit {
732772
})
733773
)
734774
.subscribe({
735-
next: (services) => {
775+
next: services => {
736776
this.mcpServices = services;
737777
this.mcpServicesLoaded = true;
738778
},
739-
error: (err) => {
779+
error: err => {
740780
console.error('Failed to load MCP services:', err);
741781
this.mcpServicesLoaded = true;
742782
},
@@ -749,31 +789,123 @@ export class DfServiceDetailsComponent implements OnInit {
749789
): { name: string; title: string; description: string }[] {
750790
if (category === 'Database') {
751791
return [
752-
{ name: `${prefix}_get_tables`, title: 'List Tables', description: 'Get tables available in the database' },
753-
{ name: `${prefix}_get_table_schema`, title: 'Get Table Schema', description: 'Retrieve the schema of a specific table' },
754-
{ name: `${prefix}_get_table_data`, title: 'Get Table Data', description: 'Retrieve table data with filtering, pagination, and sorting' },
755-
{ name: `${prefix}_create_records`, title: 'Create Records', description: 'Create one or more records in a table' },
756-
{ name: `${prefix}_update_records`, title: 'Update Records', description: 'Update (patch) records in a table' },
757-
{ name: `${prefix}_delete_records`, title: 'Delete Records', description: 'Delete records from a table' },
758-
{ name: `${prefix}_get_table_fields`, title: 'Get Table Fields', description: 'Retrieve field definitions for a table' },
759-
{ name: `${prefix}_get_table_relationships`, title: 'Get Table Relationships', description: 'Retrieve relationships definition for a table' },
760-
{ name: `${prefix}_get_stored_procedures`, title: 'List Stored Procedures', description: 'Get stored procedures available in the database' },
761-
{ name: `${prefix}_call_stored_procedure`, title: 'Call Stored Procedure', description: 'Call a stored procedure' },
762-
{ name: `${prefix}_get_stored_functions`, title: 'List Stored Functions', description: 'Get stored functions available in the database' },
763-
{ name: `${prefix}_call_stored_function`, title: 'Call Stored Function', description: 'Call a stored function' },
764-
{ name: `${prefix}_get_database_resources`, title: 'List Database Resources', description: 'Get all resources available in the database service' },
765-
{ name: `${prefix}_get_api_spec`, title: 'Get API Spec', description: 'Get the OpenAPI specification for this database service' },
766-
{ name: `${prefix}_get_data_model`, title: 'Get Data Model', description: 'Get a condensed data model showing all tables and columns' },
767-
{ name: `${prefix}_aggregate_data`, title: 'Aggregate Data', description: 'Compute server-side aggregations (SUM, COUNT, AVG, MIN, MAX)' },
792+
{
793+
name: `${prefix}_get_tables`,
794+
title: 'List Tables',
795+
description: 'Get tables available in the database',
796+
},
797+
{
798+
name: `${prefix}_get_table_schema`,
799+
title: 'Get Table Schema',
800+
description: 'Retrieve the schema of a specific table',
801+
},
802+
{
803+
name: `${prefix}_get_table_data`,
804+
title: 'Get Table Data',
805+
description:
806+
'Retrieve table data with filtering, pagination, and sorting',
807+
},
808+
{
809+
name: `${prefix}_create_records`,
810+
title: 'Create Records',
811+
description: 'Create one or more records in a table',
812+
},
813+
{
814+
name: `${prefix}_update_records`,
815+
title: 'Update Records',
816+
description: 'Update (patch) records in a table',
817+
},
818+
{
819+
name: `${prefix}_delete_records`,
820+
title: 'Delete Records',
821+
description: 'Delete records from a table',
822+
},
823+
{
824+
name: `${prefix}_get_table_fields`,
825+
title: 'Get Table Fields',
826+
description: 'Retrieve field definitions for a table',
827+
},
828+
{
829+
name: `${prefix}_get_table_relationships`,
830+
title: 'Get Table Relationships',
831+
description: 'Retrieve relationships definition for a table',
832+
},
833+
{
834+
name: `${prefix}_get_stored_procedures`,
835+
title: 'List Stored Procedures',
836+
description: 'Get stored procedures available in the database',
837+
},
838+
{
839+
name: `${prefix}_call_stored_procedure`,
840+
title: 'Call Stored Procedure',
841+
description: 'Call a stored procedure',
842+
},
843+
{
844+
name: `${prefix}_get_stored_functions`,
845+
title: 'List Stored Functions',
846+
description: 'Get stored functions available in the database',
847+
},
848+
{
849+
name: `${prefix}_call_stored_function`,
850+
title: 'Call Stored Function',
851+
description: 'Call a stored function',
852+
},
853+
{
854+
name: `${prefix}_get_database_resources`,
855+
title: 'List Database Resources',
856+
description: 'Get all resources available in the database service',
857+
},
858+
{
859+
name: `${prefix}_get_api_spec`,
860+
title: 'Get API Spec',
861+
description:
862+
'Get the OpenAPI specification for this database service',
863+
},
864+
{
865+
name: `${prefix}_get_data_model`,
866+
title: 'Get Data Model',
867+
description:
868+
'Get a condensed data model showing all tables and columns',
869+
},
870+
{
871+
name: `${prefix}_aggregate_data`,
872+
title: 'Aggregate Data',
873+
description:
874+
'Compute server-side aggregations (SUM, COUNT, AVG, MIN, MAX)',
875+
},
768876
];
769877
}
770878
return [
771-
{ name: `${prefix}_list_files`, title: 'List Files', description: 'List files and folders in a path' },
772-
{ name: `${prefix}_get_file`, title: 'Get File Content', description: 'Get the content of a file' },
773-
{ name: `${prefix}_create_file`, title: 'Create File', description: 'Create a new file with the given content' },
774-
{ name: `${prefix}_get_file_properties`, title: 'Get File Properties', description: 'Get properties/metadata of a file or folder' },
775-
{ name: `${prefix}_create_folder`, title: 'Create Folder', description: 'Create a new folder' },
776-
{ name: `${prefix}_delete_file`, title: 'Delete File or Folder', description: 'Delete a file or folder' },
879+
{
880+
name: `${prefix}_list_files`,
881+
title: 'List Files',
882+
description: 'List files and folders in a path',
883+
},
884+
{
885+
name: `${prefix}_get_file`,
886+
title: 'Get File Content',
887+
description: 'Get the content of a file',
888+
},
889+
{
890+
name: `${prefix}_create_file`,
891+
title: 'Create File',
892+
description: 'Create a new file with the given content',
893+
},
894+
{
895+
name: `${prefix}_get_file_properties`,
896+
title: 'Get File Properties',
897+
description: 'Get properties/metadata of a file or folder',
898+
},
899+
{
900+
name: `${prefix}_create_folder`,
901+
title: 'Create Folder',
902+
description: 'Create a new folder',
903+
},
904+
{
905+
name: `${prefix}_delete_file`,
906+
title: 'Delete File or Folder',
907+
description: 'Delete a file or folder',
908+
},
777909
];
778910
}
779911

@@ -825,7 +957,6 @@ export class DfServiceDetailsComponent implements OnInit {
825957
.replace(/^_|_$/g, '');
826958
}
827959

828-
829960
// Helper method for debugging (can be removed in production)
830961
logFormValues() {
831962
console.log('Form values:', this.serviceForm.value);

0 commit comments

Comments
 (0)