-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added component, linked into menu * basic functionality is in * improved behaviour * Added hover functionality * Added hateful lazy-loaded js fix * Avoided error logs * reflecting lazy chunks * We didn't end up using this * Avoided no-node failure * fixed package repo
- Loading branch information
1 parent
8496e1a
commit fc253a8
Showing
17 changed files
with
1,182 additions
and
10 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
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
16 changes: 16 additions & 0 deletions
16
report/report-ng/projects/report/src/app/entry-hover.service.spec.ts
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 @@ | ||
import { TestBed } from '@angular/core/testing'; | ||
|
||
import { EntryHoverService } from './entry-hover.service'; | ||
|
||
describe('EntryHoverService', () => { | ||
let service: EntryHoverService; | ||
|
||
beforeEach(() => { | ||
TestBed.configureTestingModule({}); | ||
service = TestBed.inject(EntryHoverService); | ||
}); | ||
|
||
it('should be created', () => { | ||
expect(service).toBeTruthy(); | ||
}); | ||
}); |
23 changes: 23 additions & 0 deletions
23
report/report-ng/projects/report/src/app/entry-hover.service.ts
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,23 @@ | ||
import { Injectable } from '@angular/core'; | ||
import { Entry } from './types'; | ||
|
||
/** | ||
* Mechanism for watching which index entries are hovered over | ||
*/ | ||
@Injectable({ | ||
providedIn: 'root' | ||
}) | ||
export class EntryHoverService { | ||
|
||
listeners: ((entry: Entry | null) => void)[] = []; | ||
|
||
constructor() { } | ||
|
||
onHover(callback: (entry: Entry | null) => void): void { | ||
this.listeners.push(callback); | ||
} | ||
|
||
hovered(entry: Entry | null): void { | ||
this.listeners.forEach(cb => cb(entry)); | ||
} | ||
} |
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
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
3 changes: 3 additions & 0 deletions
3
report/report-ng/projects/report/src/app/system-diagram/system-diagram.component.css
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,3 @@ | ||
#container { | ||
text-align: center; | ||
} |
10 changes: 10 additions & 0 deletions
10
report/report-ng/projects/report/src/app/system-diagram/system-diagram.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<mat-expansion-panel *ngIf="loadProgress != 0"> | ||
<mat-expansion-panel-header> | ||
<mat-panel-title>Interactions</mat-panel-title> | ||
<mat-panel-description>{{summary}}</mat-panel-description> | ||
</mat-expansion-panel-header> | ||
<div #myTestDiv id="container"> | ||
<mat-progress-bar *ngIf="loadProgress != 100" [value]="loadProgress"></mat-progress-bar> | ||
<pre class="mermaid"></pre> | ||
</div> | ||
</mat-expansion-panel> |
38 changes: 38 additions & 0 deletions
38
report/report-ng/projects/report/src/app/system-diagram/system-diagram.component.spec.ts
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,38 @@ | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { SystemDiagramComponent } from './system-diagram.component'; | ||
import { ModelDiffDataService } from '../model-diff-data.service'; | ||
import { RouterTestingModule } from '@angular/router/testing'; | ||
import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; | ||
import { MatExpansionModule } from '@angular/material/expansion'; | ||
|
||
describe('SystemDiagramComponent', () => { | ||
let component: SystemDiagramComponent; | ||
let fixture: ComponentFixture<SystemDiagramComponent>; | ||
let mockMdds; | ||
|
||
beforeEach(async () => { | ||
mockMdds = jasmine.createSpyObj([ | ||
'path', 'index', 'onFlow', 'flowLoadProgress', 'flowFor']); | ||
await TestBed.configureTestingModule({ | ||
declarations: [SystemDiagramComponent], | ||
providers: [ | ||
{ provide: ModelDiffDataService, useValue: mockMdds }, | ||
], | ||
imports: [ | ||
RouterTestingModule, | ||
BrowserAnimationsModule, | ||
MatExpansionModule, | ||
] | ||
}) | ||
.compileComponents(); | ||
|
||
fixture = TestBed.createComponent(SystemDiagramComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
Oops, something went wrong.