Skip to content

Commit

Permalink
New Features:
Browse files Browse the repository at this point in the history
1. Flamegraph showing data from firestore
2. Flamegraph service gets data and shows properly
New Pages:
1. flame-graph.page.ts
Bugs Corrected:
To Be Corrected:
0. On product delete, delete trace results
1. On product delete, delete flamegraph results
  • Loading branch information
juanfranciscocis committed Aug 21, 2024
1 parent 74c2f84 commit 4e9f869
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 26 deletions.
58 changes: 35 additions & 23 deletions src/app/pages/flame-graph/flame-graph.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,29 +17,28 @@ import {User} from "../../interfaces/user";
})
export class FlameGraphPage implements OnInit {

product:Product = {}
date:string = ''
product:Product = {}
date:string = ''






// @ts-ignore
config:FlameGraphConfig = {data}
// @ts-ignore
config:FlameGraphConfig = {data}

constructor(
private flameGraphService: FlameGraphService,
private loadingCtrl: LoadingController,
private router: Router,
private route: ActivatedRoute,
) { }

constructor(
private flameGraphService: FlameGraphService,
private loadingCtrl: LoadingController,
private router: Router,
private route: ActivatedRoute,
) { }

ionViewWillEnter() {
this.getProductAndDateFromParams();
this.getFlameGraph();
}
ionViewWillEnter() {
this.getProductAndDateFromParams();
this.getFlameGraph();
}



Expand Down Expand Up @@ -82,16 +81,29 @@ export class FlameGraphPage implements OnInit {

//get the keys
keys = Object.keys(data_to_transform);
console.log(keys);

//TODO:Add data to the flame graph

console.log('keys',keys);
const lenKeys = keys.length;
const valueKeys = 100/lenKeys;

for (let serv in keys){
const children:RawData[] = [];
for(let i = 0; i < data_to_transform[keys[serv]].length; i++){
children[i] = this.transformToRawData(data_to_transform[keys[serv]][i])
}
console.log('server1',children);
const rawData: RawData = {
label: keys[serv],
value: valueKeys,
children: [
...children
]
};
allRawData.push(rawData);


for (let serverKey in data_to_transform) {
const rawData = this.transformToRawData(data_to_transform[serverKey][0]);
allRawData.push(rawData);
}
console.log('server',allRawData);


}

Expand All @@ -109,7 +121,7 @@ export class FlameGraphPage implements OnInit {


this.config = {data: allRawData};
console.log(allRawData);
console.log("final object",allRawData);



Expand Down
1 change: 1 addition & 0 deletions www/1101.6242a052ff804418.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion www/1101.c247be07eafde795.js

This file was deleted.

2 changes: 1 addition & 1 deletion www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@

<body>
<app-root></app-root>
<script src="runtime.66b22c40f3f60e40.js" type="module"></script><script src="polyfills.e9ea84778c1ce49f.js" type="module"></script><script src="main.4c8a11abcdd96918.js" type="module"></script></body>
<script src="runtime.973eb39b798a5889.js" type="module"></script><script src="polyfills.e9ea84778c1ce49f.js" type="module"></script><script src="main.4c8a11abcdd96918.js" type="module"></script></body>

</html>

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4e9f869

Please sign in to comment.