diff --git a/ui/pi-web-agent-app/angular.json b/ui/pi-web-agent-app/angular.json
index fcc9052e..7b86569c 100644
--- a/ui/pi-web-agent-app/angular.json
+++ b/ui/pi-web-agent-app/angular.json
@@ -34,6 +34,7 @@
"src/assets"
],
"styles": [
+ "./node_modules/@angular/material/prebuilt-themes/indigo-pink.css",
"src/styles.scss"
],
"scripts": []
@@ -98,6 +99,7 @@
"src/assets"
],
"styles": [
+ "./node_modules/@angular/material/prebuilt-themes/indigo-pink.css",
"src/styles.scss"
],
"scripts": []
diff --git a/ui/pi-web-agent-app/package-lock.json b/ui/pi-web-agent-app/package-lock.json
index a6d8cbba..f8990bd4 100644
--- a/ui/pi-web-agent-app/package-lock.json
+++ b/ui/pi-web-agent-app/package-lock.json
@@ -236,6 +236,23 @@
"tslib": "^2.0.0"
}
},
+ "@angular/cdk": {
+ "version": "11.2.6",
+ "resolved": "https://registry.npmjs.org/@angular/cdk/-/cdk-11.2.6.tgz",
+ "integrity": "sha512-cVR+F6oIIxOTHXQOPUF6owWEPqqmK9vih/MFlgG0PrkVd8KkuCkjfet9xPVLaTLK/kGY+EWsqGX84crFS/XyYg==",
+ "requires": {
+ "parse5": "^5.0.0",
+ "tslib": "^2.0.0"
+ },
+ "dependencies": {
+ "parse5": {
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/parse5/-/parse5-5.1.1.tgz",
+ "integrity": "sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug==",
+ "optional": true
+ }
+ }
+ },
"@angular/cli": {
"version": "11.2.5",
"resolved": "https://registry.npmjs.org/@angular/cli/-/cli-11.2.5.tgz",
@@ -426,6 +443,14 @@
"tslib": "^2.0.0"
}
},
+ "@angular/material": {
+ "version": "11.2.6",
+ "resolved": "https://registry.npmjs.org/@angular/material/-/material-11.2.6.tgz",
+ "integrity": "sha512-e/wHn875tvgUu6n3LhSC3h/F2aQ2rEo6cwgFMYNxCNyBcpu6TBx3WfR7nbwsyQIWjnpn0g1KvtRwzJtRp6Nimw==",
+ "requires": {
+ "tslib": "^2.0.0"
+ }
+ },
"@angular/platform-browser": {
"version": "11.2.6",
"resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-11.2.6.tgz",
diff --git a/ui/pi-web-agent-app/package.json b/ui/pi-web-agent-app/package.json
index e3aa3cab..440395c8 100644
--- a/ui/pi-web-agent-app/package.json
+++ b/ui/pi-web-agent-app/package.json
@@ -12,10 +12,12 @@
"private": true,
"dependencies": {
"@angular/animations": "~11.2.6",
+ "@angular/cdk": "^11.2.6",
"@angular/common": "~11.2.6",
"@angular/compiler": "~11.2.6",
"@angular/core": "~11.2.6",
"@angular/forms": "~11.2.6",
+ "@angular/material": "^11.2.6",
"@angular/platform-browser": "~11.2.6",
"@angular/platform-browser-dynamic": "~11.2.6",
"@angular/router": "~11.2.6",
diff --git a/ui/pi-web-agent-app/src/app/app.component.html b/ui/pi-web-agent-app/src/app/app.component.html
index 34844559..6f8242a8 100644
--- a/ui/pi-web-agent-app/src/app/app.component.html
+++ b/ui/pi-web-agent-app/src/app/app.component.html
@@ -1,505 +1,5 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
{{ title }} app is running!
-
-
-
-
-
-
-
Resources
-
Here are some links to help you get started:
-
-
-
-
-
Next Steps
-
What do you want to do next with your app?
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Run and Watch Tests
-
-
-
-
-
-
Build for Production
-
-
-
-
-
-
ng generate component xyz
-
ng add @angular/material
-
ng add @angular/pwa
-
ng add _____
-
ng test
-
ng build --prod
-
-
-
-
-
-
-
-
-
-
+
diff --git a/ui/pi-web-agent-app/src/app/app.module.ts b/ui/pi-web-agent-app/src/app/app.module.ts
index b1c6c96a..35873f8d 100644
--- a/ui/pi-web-agent-app/src/app/app.module.ts
+++ b/ui/pi-web-agent-app/src/app/app.module.ts
@@ -3,14 +3,25 @@ import { BrowserModule } from '@angular/platform-browser';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
+import { LiveInfoComponent } from './live-info/live-info.component';
+import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
+import {MatDividerModule} from '@angular/material/divider';
+import {MatListModule} from '@angular/material/list';
+import { HttpClientModule } from '@angular/common/http';
+
@NgModule({
declarations: [
- AppComponent
+ AppComponent,
+ LiveInfoComponent
],
imports: [
BrowserModule,
- AppRoutingModule
+ AppRoutingModule,
+ BrowserAnimationsModule,
+ MatDividerModule,
+ MatListModule,
+ HttpClientModule
],
providers: [],
bootstrap: [AppComponent]
diff --git a/ui/pi-web-agent-app/src/app/live-info/live-info.component.html b/ui/pi-web-agent-app/src/app/live-info/live-info.component.html
new file mode 100644
index 00000000..129b065a
--- /dev/null
+++ b/ui/pi-web-agent-app/src/app/live-info/live-info.component.html
@@ -0,0 +1,9 @@
+
+
+
+ OS: {{system_info.OS_Info.Id}} {{system_info.OS_Info.Version_Codename}}
+
+ Kernel: {{system_info.Kernel}}
+
+ Temperature: {{system_info.Temperature}}
+
\ No newline at end of file
diff --git a/ui/pi-web-agent-app/src/app/live-info/live-info.component.scss b/ui/pi-web-agent-app/src/app/live-info/live-info.component.scss
new file mode 100644
index 00000000..e69de29b
diff --git a/ui/pi-web-agent-app/src/app/live-info/live-info.component.spec.ts b/ui/pi-web-agent-app/src/app/live-info/live-info.component.spec.ts
new file mode 100644
index 00000000..81795635
--- /dev/null
+++ b/ui/pi-web-agent-app/src/app/live-info/live-info.component.spec.ts
@@ -0,0 +1,25 @@
+import { ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { LiveInfoComponent } from './live-info.component';
+
+describe('LiveInfoComponent', () => {
+ let component: LiveInfoComponent;
+ let fixture: ComponentFixture
;
+
+ beforeEach(async () => {
+ await TestBed.configureTestingModule({
+ declarations: [ LiveInfoComponent ]
+ })
+ .compileComponents();
+ });
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(LiveInfoComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/ui/pi-web-agent-app/src/app/live-info/live-info.component.ts b/ui/pi-web-agent-app/src/app/live-info/live-info.component.ts
new file mode 100644
index 00000000..56fe4d9c
--- /dev/null
+++ b/ui/pi-web-agent-app/src/app/live-info/live-info.component.ts
@@ -0,0 +1,27 @@
+import { Component, OnInit } from '@angular/core';
+import { SystemInfo, SystemInfoService } from '../system-info.service';
+
+@Component({
+ selector: 'app-live-info',
+ templateUrl: './live-info.component.html',
+ styleUrls: ['./live-info.component.scss']
+})
+export class LiveInfoComponent implements OnInit {
+
+ constructor(private system_info_service: SystemInfoService) { }
+
+ system_info: SystemInfo = {
+ Temperature: "",
+ Kernel: "",
+ OS_Info: {
+ Id: "",
+ Version_Codename: ""
+ }
+ }
+ ngOnInit(): void {
+ this.system_info_service.fetch_system_info().subscribe(
+ (info: SystemInfo) => this.system_info = info
+ );
+ }
+
+}
\ No newline at end of file
diff --git a/ui/pi-web-agent-app/src/app/system-info.service.spec.ts b/ui/pi-web-agent-app/src/app/system-info.service.spec.ts
new file mode 100644
index 00000000..4175368d
--- /dev/null
+++ b/ui/pi-web-agent-app/src/app/system-info.service.spec.ts
@@ -0,0 +1,16 @@
+import { TestBed } from '@angular/core/testing';
+
+import { SystemInfoService } from './system-info.service';
+
+describe('SystemInfoService', () => {
+ let service: SystemInfoService;
+
+ beforeEach(() => {
+ TestBed.configureTestingModule({});
+ service = TestBed.inject(SystemInfoService);
+ });
+
+ it('should be created', () => {
+ expect(service).toBeTruthy();
+ });
+});
diff --git a/ui/pi-web-agent-app/src/app/system-info.service.ts b/ui/pi-web-agent-app/src/app/system-info.service.ts
new file mode 100644
index 00000000..4406965a
--- /dev/null
+++ b/ui/pi-web-agent-app/src/app/system-info.service.ts
@@ -0,0 +1,26 @@
+import { Injectable } from '@angular/core';
+import { HttpClient } from '@angular/common/http';
+
+@Injectable({
+ providedIn: 'root'
+})
+export class SystemInfoService {
+
+ private api_endpoint = "/api/info"
+
+ constructor(private http: HttpClient) { }
+
+
+ fetch_system_info() {
+ return this.http.get(`${this.api_endpoint}/os_info`)
+ }
+}
+
+export interface SystemInfo {
+ Temperature: string,
+ Kernel: string,
+ OS_Info: {
+ Id: string,
+ Version_Codename: string
+ }
+}
diff --git a/ui/pi-web-agent-app/src/index.html b/ui/pi-web-agent-app/src/index.html
index a8efa205..c0b8ea9d 100644
--- a/ui/pi-web-agent-app/src/index.html
+++ b/ui/pi-web-agent-app/src/index.html
@@ -6,8 +6,11 @@
+
+
+
-
+
diff --git a/ui/pi-web-agent-app/src/styles.scss b/ui/pi-web-agent-app/src/styles.scss
index 90d4ee00..7e7239a2 100644
--- a/ui/pi-web-agent-app/src/styles.scss
+++ b/ui/pi-web-agent-app/src/styles.scss
@@ -1 +1,4 @@
/* You can add global styles to this file, and also import other style files */
+
+html, body { height: 100%; }
+body { margin: 0; font-family: Roboto, "Helvetica Neue", sans-serif; }