-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat/timeline demo
- Loading branch information
Showing
11 changed files
with
277 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,3 +44,5 @@ testem.log | |
# System Files | ||
.DS_Store | ||
Thumbs.db | ||
|
||
test-files/*.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/usr/bin/env bash | ||
|
||
rm -rf test-files/* | ||
|
||
COUNT=${1:-20} | ||
MAXSIZE_MB=${2:-100} | ||
|
||
for i in $(seq 1 $COUNT) | ||
do | ||
SIZE=$(( ( RANDOM % $MAXSIZE_MB ) + 1 )) | ||
|
||
WORD1=$( shuf -n1 /usr/share/dict/words ) | ||
WORD2=$( shuf -n1 /usr/share/dict/words ) | ||
|
||
truncate -s "$SIZE"M "test-files/"$i"-$WORD1-$WORD2-$SIZE""MB.txt" | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/// <reference types="google.visualization" /> | ||
import { Injectable, Type } from '@angular/core'; | ||
import { Observable } from 'rxjs'; | ||
import { GoogleCharts } from 'google-charts'; | ||
|
||
export interface GoogleVis { | ||
Timeline: Type<google.visualization.Timeline>; | ||
DataTable: Type<google.visualization.DataTable>; | ||
events: any; | ||
} | ||
|
||
@Injectable({ | ||
providedIn: 'root', | ||
}) | ||
export class GoogleChartsService { | ||
constructor() {} | ||
|
||
public getVisualisation(...withPackages: string[]): Observable<GoogleVis> { | ||
return new Observable(observer => { | ||
// Load the charts library with a callback | ||
GoogleCharts.load(() => { | ||
GoogleCharts.api.charts.load('current', { packages: withPackages }); | ||
GoogleCharts.api.charts.setOnLoadCallback(() => { | ||
observer.next(GoogleCharts.api.visualization); | ||
observer.complete(); | ||
}); | ||
}); | ||
}); | ||
} | ||
} |
14 changes: 11 additions & 3 deletions
14
src/app/multiple-worker-pool/multiple-worker-pool.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.