Browse Source

web-ui: Add the BlockDetails view

scalafmt-draft
Alexis Hernandez 7 years ago
parent
commit
42d2239525
  1. 2
      web-ui/src/app/app-routing.module.ts
  2. 4
      web-ui/src/app/app.module.ts
  3. 0
      web-ui/src/app/components/block-details/block-details.component.css
  4. 3
      web-ui/src/app/components/block-details/block-details.component.html
  5. 25
      web-ui/src/app/components/block-details/block-details.component.spec.ts
  6. 15
      web-ui/src/app/components/block-details/block-details.component.ts

2
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: '' }
];

4
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,

0
web-ui/src/app/components/block-details/block-details.component.css

3
web-ui/src/app/components/block-details/block-details.component.html

@ -0,0 +1,3 @@
<p>
block-details works!
</p>

25
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<BlockDetailsComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ BlockDetailsComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(BlockDetailsComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

15
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() {
}
}
Loading…
Cancel
Save