Add new components for AI and tutorials, update routing, and enhance file upload functionality

This commit is contained in:
liosha84
2025-08-04 10:38:46 +03:00
parent 18c6906637
commit 483d029952
206 changed files with 2362 additions and 1199 deletions
@@ -0,0 +1,27 @@
<p>settings.component works!</p>
<mat-card>
<mat-card-content>
<mat-divider></mat-divider>
<mat-tab-group>
<mat-tab label="Data Source properties">
<table mat-table
[dataSource]="properties" multiTemplateDataRows="true" class="mat-elevation-z8">
@for (column of displayedColumns; track column) {
<ng-container matColumnDef="{{column}}">
<th mat-header-cell *matHeaderCellDef>{{column}}</th>
<td mat-cell *matCellDef="let element ; let k = dataIndex;">{{element[column]}}</td>
</ng-container>
}
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr mat-row *matRowDef="let element; columns: displayedColumns;"
class="example-element-row"
>
</tr>
</table>
</mat-tab>
</mat-tab-group>
</mat-card-content>
</mat-card>
@@ -0,0 +1,23 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { SettingsComponent } from './settings.component';
describe('SettingsComponent', () => {
let component: SettingsComponent;
let fixture: ComponentFixture<SettingsComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [SettingsComponent]
})
.compileComponents();
fixture = TestBed.createComponent(SettingsComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
@@ -0,0 +1,63 @@
import { Component } from '@angular/core';
import {MatCard, MatCardContent} from '@angular/material/card';
import {MatDivider} from '@angular/material/divider';
import {MatTab, MatTabGroup} from '@angular/material/tabs';
import {
MatCell,
MatCellDef,
MatColumnDef,
MatHeaderCell, MatHeaderCellDef,
MatHeaderRow,
MatHeaderRowDef,
MatRow, MatRowDef, MatTable
} from '@angular/material/table';
import {SystemService} from '../../../services/system.service';
import {NameValueItem} from '../../../models/name-value-item';
@Component({
selector: 'app-settings.component',
imports: [
MatCard,
MatCardContent,
MatDivider,
MatTab,
MatTabGroup,
MatCell,
MatCellDef,
MatColumnDef,
MatHeaderCell,
MatTable,
MatHeaderCellDef,
MatHeaderRow,
MatHeaderRowDef,
MatRow,
MatRowDef
],
templateUrl: './settings.component.html',
styleUrl: './settings.component.scss'
})
export class SettingsComponent {
properties: NameValueItem[] = [] ;
displayedColumns: string[] = ['name', 'value'];
constructor(private systemService: SystemService) {
this.retrieveProperties();
}
retrieveProperties(): void {
this.systemService.getDataSourceProperties()
.subscribe(
(data: NameValueItem[]) => {
this.properties = data;
console.log(data);
},
(error: any) => {
console.log(error);
}
);
}
}