From 42d2239525f48dfcc9cf87fce4f74dbba519d00a Mon Sep 17 00:00:00 2001 From: Alexis Hernandez Date: Sat, 17 Mar 2018 18:35:12 -0600 Subject: [PATCH] web-ui: Add the BlockDetails view --- web-ui/src/app/app-routing.module.ts | 2 ++ web-ui/src/app/app.module.ts | 4 ++- .../block-details/block-details.component.css | 0 .../block-details.component.html | 3 +++ .../block-details.component.spec.ts | 25 +++++++++++++++++++ .../block-details/block-details.component.ts | 15 +++++++++++ 6 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 web-ui/src/app/components/block-details/block-details.component.css create mode 100644 web-ui/src/app/components/block-details/block-details.component.html create mode 100644 web-ui/src/app/components/block-details/block-details.component.spec.ts create mode 100644 web-ui/src/app/components/block-details/block-details.component.ts diff --git a/web-ui/src/app/app-routing.module.ts b/web-ui/src/app/app-routing.module.ts index 83cd11e..559d8ca 100644 --- a/web-ui/src/app/app-routing.module.ts +++ b/web-ui/src/app/app-routing.module.ts @@ -4,10 +4,12 @@ import { Routes, RouterModule } from '@angular/router'; import { HomeComponent } from './components/home/home.component'; import { TransactionDetailsComponent } from './components/transaction-details/transaction-details.component'; import { AddressDetailsComponent } from './components/address-details/address-details.component'; +import { BlockDetailsComponent } from './components/block-details/block-details.component'; const routes: Routes = [ { path: '', component: HomeComponent }, { path: 'addresses/:address', component: AddressDetailsComponent }, + { path: 'blocks/:blockhash', component: BlockDetailsComponent }, { path: 'transactions/:txid', component: TransactionDetailsComponent }, { path: '**', redirectTo: '' } ]; diff --git a/web-ui/src/app/app.module.ts b/web-ui/src/app/app.module.ts index 46d1fc4..32cb68b 100644 --- a/web-ui/src/app/app.module.ts +++ b/web-ui/src/app/app.module.ts @@ -26,6 +26,7 @@ import { NavbarComponent } from './components/navbar/navbar.component'; import { TransactionDetailsComponent } from './components/transaction-details/transaction-details.component'; import { TransactionFinderComponent } from './components/transaction-finder/transaction-finder.component'; import { AddressDetailsComponent } from './components/address-details/address-details.component'; +import { BlockDetailsComponent } from './components/block-details/block-details.component'; @NgModule({ declarations: [ @@ -35,7 +36,8 @@ import { AddressDetailsComponent } from './components/address-details/address-de NavbarComponent, TransactionDetailsComponent, TransactionFinderComponent, - AddressDetailsComponent + AddressDetailsComponent, + BlockDetailsComponent ], imports: [ AppRoutingModule, diff --git a/web-ui/src/app/components/block-details/block-details.component.css b/web-ui/src/app/components/block-details/block-details.component.css new file mode 100644 index 0000000..e69de29 diff --git a/web-ui/src/app/components/block-details/block-details.component.html b/web-ui/src/app/components/block-details/block-details.component.html new file mode 100644 index 0000000..8fe0701 --- /dev/null +++ b/web-ui/src/app/components/block-details/block-details.component.html @@ -0,0 +1,3 @@ +

+ block-details works! +

diff --git a/web-ui/src/app/components/block-details/block-details.component.spec.ts b/web-ui/src/app/components/block-details/block-details.component.spec.ts new file mode 100644 index 0000000..1c3ef91 --- /dev/null +++ b/web-ui/src/app/components/block-details/block-details.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { BlockDetailsComponent } from './block-details.component'; + +describe('BlockDetailsComponent', () => { + let component: BlockDetailsComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ BlockDetailsComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(BlockDetailsComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/web-ui/src/app/components/block-details/block-details.component.ts b/web-ui/src/app/components/block-details/block-details.component.ts new file mode 100644 index 0000000..6c81c11 --- /dev/null +++ b/web-ui/src/app/components/block-details/block-details.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-block-details', + templateUrl: './block-details.component.html', + styleUrls: ['./block-details.component.css'] +}) +export class BlockDetailsComponent implements OnInit { + + constructor() { } + + ngOnInit() { + } + +}