2020-07-07 17:57:15 +00:00
|
|
|
import { Routes, RouterModule } from '@angular/router';
|
|
|
|
import { ModuleWithProviders } from '@angular/core';
|
|
|
|
|
|
|
|
import { ECLRootComponent } from './ecl-root.component';
|
|
|
|
import { ECLHomeComponent } from './home/home.component';
|
|
|
|
import { ECLOnChainComponent } from './on-chain/on-chain.component';
|
2020-12-20 23:36:04 +00:00
|
|
|
import { ECLConnectionsComponent } from './peers-channels/connections.component';
|
2020-07-07 17:57:15 +00:00
|
|
|
import { ECLTransactionsComponent } from './transactions/transactions.component';
|
|
|
|
import { ECLRoutingComponent } from './routing/routing.component';
|
2021-12-29 23:08:41 +00:00
|
|
|
import { ECLLookupsComponent } from './graph/lookups/lookups.component';
|
2020-12-20 23:36:04 +00:00
|
|
|
import { ECLOnChainReceiveComponent } from './on-chain/on-chain-receive/on-chain-receive.component';
|
|
|
|
import { ECLOnChainSendComponent } from './on-chain/on-chain-send/on-chain-send.component';
|
|
|
|
import { ECLChannelsTablesComponent } from './peers-channels/channels/channels-tables/channels-tables.component';
|
|
|
|
import { ECLChannelOpenTableComponent } from './peers-channels/channels/channels-tables/channel-open-table/channel-open-table.component';
|
|
|
|
import { ECLChannelPendingTableComponent } from './peers-channels/channels/channels-tables/channel-pending-table/channel-pending-table.component';
|
|
|
|
import { ECLPeersComponent } from './peers-channels/peers/peers.component';
|
|
|
|
import { ECLLightningPaymentsComponent } from './transactions/payments/lightning-payments.component';
|
|
|
|
import { ECLLightningInvoicesComponent } from './transactions/invoices/lightning-invoices.component';
|
2021-12-29 23:08:41 +00:00
|
|
|
import { ECLQueryRoutesComponent } from './graph/query-routes/query-routes.component';
|
2020-12-20 23:36:04 +00:00
|
|
|
import { ECLChannelInactiveTableComponent } from './peers-channels/channels/channels-tables/channel-inactive-table/channel-inactive-table.component';
|
|
|
|
import { ECLForwardingHistoryComponent } from './routing/forwarding-history/forwarding-history.component';
|
|
|
|
import { ECLRoutingPeersComponent } from './routing/routing-peers/routing-peers.component';
|
|
|
|
import { ECLReportsComponent } from './reports/reports.component';
|
2022-05-04 16:41:18 +00:00
|
|
|
import { ECLRoutingReportComponent } from './reports/routing/routing-report.component';
|
2020-12-20 23:36:04 +00:00
|
|
|
import { ECLTransactionsReportComponent } from './reports/transactions/transactions-report.component';
|
2020-07-07 17:57:15 +00:00
|
|
|
import { ECLUnlockedGuard } from '../shared/services/auth.guard';
|
|
|
|
import { NotFoundComponent } from '../shared/components/not-found/not-found.component';
|
2021-12-29 23:08:41 +00:00
|
|
|
import { ECLGraphComponent } from './graph/graph.component';
|
2020-07-07 17:57:15 +00:00
|
|
|
|
2022-11-24 03:23:05 +00:00
|
|
|
type PathMatch = 'full' | 'prefix' | undefined;
|
|
|
|
|
2020-07-07 17:57:15 +00:00
|
|
|
export const EclRoutes: Routes = [
|
2021-08-28 21:03:18 +00:00
|
|
|
{
|
|
|
|
path: '', component: ECLRootComponent,
|
2020-07-07 17:57:15 +00:00
|
|
|
children: [
|
2022-11-24 03:23:05 +00:00
|
|
|
{ path: '', pathMatch: <PathMatch>'full', redirectTo: 'home' },
|
2023-05-29 22:14:12 +00:00
|
|
|
{ path: 'home', component: ECLHomeComponent, canActivate: [ECLUnlockedGuard()] },
|
2021-08-28 21:03:18 +00:00
|
|
|
{
|
2023-05-29 22:14:12 +00:00
|
|
|
path: 'onchain', component: ECLOnChainComponent, canActivate: [ECLUnlockedGuard()], children: [
|
2022-11-24 03:23:05 +00:00
|
|
|
{ path: '', pathMatch: <PathMatch>'full', redirectTo: 'receive' },
|
2023-05-29 22:14:12 +00:00
|
|
|
{ path: 'receive', component: ECLOnChainReceiveComponent, canActivate: [ECLUnlockedGuard()] },
|
|
|
|
{ path: 'send', component: ECLOnChainSendComponent, canActivate: [ECLUnlockedGuard()] }
|
2021-08-28 21:03:18 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
2023-05-29 22:14:12 +00:00
|
|
|
path: 'connections', component: ECLConnectionsComponent, canActivate: [ECLUnlockedGuard()], children: [
|
2022-11-24 03:23:05 +00:00
|
|
|
{ path: '', pathMatch: <PathMatch>'full', redirectTo: 'channels' },
|
2021-08-28 21:03:18 +00:00
|
|
|
{
|
2023-05-29 22:14:12 +00:00
|
|
|
path: 'channels', component: ECLChannelsTablesComponent, canActivate: [ECLUnlockedGuard()], children: [
|
2022-11-24 03:23:05 +00:00
|
|
|
{ path: '', pathMatch: <PathMatch>'full', redirectTo: 'open' },
|
2023-05-29 22:14:12 +00:00
|
|
|
{ path: 'open', component: ECLChannelOpenTableComponent, canActivate: [ECLUnlockedGuard()] },
|
|
|
|
{ path: 'pending', component: ECLChannelPendingTableComponent, canActivate: [ECLUnlockedGuard()] },
|
|
|
|
{ path: 'inactive', component: ECLChannelInactiveTableComponent, canActivate: [ECLUnlockedGuard()] }
|
2021-08-28 21:03:18 +00:00
|
|
|
]
|
|
|
|
},
|
2023-05-29 22:14:12 +00:00
|
|
|
{ path: 'peers', component: ECLPeersComponent, data: { sweepAll: false }, canActivate: [ECLUnlockedGuard()] }
|
2021-08-28 21:03:18 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
2023-05-29 22:14:12 +00:00
|
|
|
path: 'transactions', component: ECLTransactionsComponent, canActivate: [ECLUnlockedGuard()], children: [
|
2022-11-24 03:23:05 +00:00
|
|
|
{ path: '', pathMatch: <PathMatch>'full', redirectTo: 'payments' },
|
2023-05-29 22:14:12 +00:00
|
|
|
{ path: 'payments', component: ECLLightningPaymentsComponent, canActivate: [ECLUnlockedGuard()] },
|
|
|
|
{ path: 'invoices', component: ECLLightningInvoicesComponent, canActivate: [ECLUnlockedGuard()] }
|
2021-08-28 21:03:18 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
2023-05-29 22:14:12 +00:00
|
|
|
path: 'routing', component: ECLRoutingComponent, canActivate: [ECLUnlockedGuard()], children: [
|
2022-11-24 03:23:05 +00:00
|
|
|
{ path: '', pathMatch: <PathMatch>'full', redirectTo: 'forwardinghistory' },
|
2023-05-29 22:14:12 +00:00
|
|
|
{ path: 'forwardinghistory', component: ECLForwardingHistoryComponent, canActivate: [ECLUnlockedGuard()] },
|
|
|
|
{ path: 'peers', component: ECLRoutingPeersComponent, canActivate: [ECLUnlockedGuard()] }
|
2021-08-28 21:03:18 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
2023-05-29 22:14:12 +00:00
|
|
|
path: 'reports', component: ECLReportsComponent, canActivate: [ECLUnlockedGuard()], children: [
|
2022-11-24 03:23:05 +00:00
|
|
|
{ path: '', pathMatch: <PathMatch>'full', redirectTo: 'routingreport' },
|
2023-05-29 22:14:12 +00:00
|
|
|
{ path: 'routingreport', component: ECLRoutingReportComponent, canActivate: [ECLUnlockedGuard()] },
|
|
|
|
{ path: 'transactions', component: ECLTransactionsReportComponent, canActivate: [ECLUnlockedGuard()] }
|
2021-08-28 21:03:18 +00:00
|
|
|
]
|
|
|
|
},
|
2021-12-29 23:08:41 +00:00
|
|
|
{
|
2023-05-29 22:14:12 +00:00
|
|
|
path: 'graph', component: ECLGraphComponent, canActivate: [ECLUnlockedGuard()], children: [
|
2022-11-24 03:23:05 +00:00
|
|
|
{ path: '', pathMatch: <PathMatch>'full', redirectTo: 'lookups' },
|
2023-05-29 22:14:12 +00:00
|
|
|
{ path: 'lookups', component: ECLLookupsComponent, canActivate: [ECLUnlockedGuard()] },
|
|
|
|
{ path: 'queryroutes', component: ECLQueryRoutesComponent, canActivate: [ECLUnlockedGuard()] }
|
2021-12-29 23:08:41 +00:00
|
|
|
]
|
|
|
|
},
|
2020-12-20 23:36:04 +00:00
|
|
|
{ path: '**', component: NotFoundComponent }
|
|
|
|
]
|
|
|
|
}
|
2020-07-07 17:57:15 +00:00
|
|
|
];
|
|
|
|
|
2020-12-20 23:36:04 +00:00
|
|
|
export const ECLRouting: ModuleWithProviders<RouterModule> = RouterModule.forChild(EclRoutes);
|