Skip to content

Commit

Permalink
Merge pull request #10 from s4hri/dev-8.3
Browse files Browse the repository at this point in the history
Refining dashboard
  • Loading branch information
ddetommaso authored Mar 25, 2024
2 parents 6cb4719 + df93505 commit a26613b
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 31 deletions.
68 changes: 42 additions & 26 deletions src/app/defaultDashboardConfiguration.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,46 @@
{
"fsm": {
"enabled": true,
"x": 0,
"y":0,
"rows": 50,
"cols": 70
"Actions Manager":
{
"x":72,
"y":47,
"cols":28,
"rows":53,
"enabled":true
},
"Robot Speech": {
"enabled": true,
"x": 70,
"y": 0,
"rows": 50,
"cols": 30

"Finite State Machine":
{
"x":0,
"y":47,
"cols":72,
"rows":53,
"enabled":true
},
"Robot Cam Viewer": {
"enabled": true,
"x": 0,
"y":50,
"rows": 50,
"cols": 50

"Robot Cam Viewer":
{
"x":31,
"y":0,
"cols":41,
"rows":47,
"enabled":true
},
"Actions Manager": {
"enabled": true,
"x": 50,
"y": 50,
"rows": 50,
"cols": 50
}
}

"Robot Speech":
{
"x":0,
"y":0,
"cols":31,
"rows":47,
"enabled":true
},

"Services Manager":
{
"x":72,
"y":0,
"cols":28,
"rows":47,
"enabled":true
}
}
2 changes: 1 addition & 1 deletion src/app/plugins/fsm/config.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"name": "fsm"
"name": "Finite State Machine"
}
2 changes: 1 addition & 1 deletion src/app/plugins/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ import {RobotCamViewerComponent} from "./robot-cam-viewer/robot-cam-viewer.compo
import {RobotSpeechComponent} from "./robot-speech/robot-speech.component";
import {ServicesManagerComponent} from "./services-manager/services-manager.component";

export const pluginIndex = { "Actions Manager": ActionsManagerComponent, "fsm": FsmComponent, "Robot Cam Viewer": RobotCamViewerComponent, "Robot Speech": RobotSpeechComponent, "Services Manager": ServicesManagerComponent }
export const pluginIndex = { "Actions Manager": ActionsManagerComponent, "Finite State Machine": FsmComponent, "Robot Cam Viewer": RobotCamViewerComponent, "Robot Speech": RobotSpeechComponent, "Services Manager": ServicesManagerComponent }
2 changes: 1 addition & 1 deletion src/app/services/api/api.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ export class ApiService implements IApiService {
//inserisco lo stato iniziale come primo dell'array. è importante che sia il primo poichè cosi il motore grafico che renderizza l'FSM lo posiziona all'estrema sinistra.
nodes.unshift(initState)

const fsmDefaultConfig = defaultDashboardConfig["fsm"];
const fsmDefaultConfig = defaultDashboardConfig["Finite State Machine"];
const x = fsmDefaultConfig.x || 0;
const y = fsmDefaultConfig.y || 0;
const cols = fsmDefaultConfig.cols || 50;
Expand Down
4 changes: 2 additions & 2 deletions src/app/types/FSM.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ export class FSM implements DashboardItem{
this.rows = rows;
this.x = x;
this.y = y;
this.id = 'fsm'
this.id = 'Finite State Machine'
}

exportToJSON():string{
let json:{[key:string]:string} = {};
return "fsm"
return "Finite State Machine"
}

}

0 comments on commit a26613b

Please sign in to comment.