mirror of
https://github.com/Ride-The-Lightning/RTL.git
synced 2024-11-19 01:40:29 +01:00
db and ellipsis fix
This commit is contained in:
parent
2e54ba92ac
commit
4d163a8216
@ -11,7 +11,7 @@ export const listOfferBookmarks = (req, res, next) => {
|
||||
logger.log({ selectedNode: req.session.selectedNode, level: 'INFO', fileName: 'Offers', msg: 'Getting Offer Bookmarks..' });
|
||||
databaseService.find(req.session.selectedNode, CollectionsEnum.OFFERS).then((offers) => {
|
||||
logger.log({ selectedNode: req.session.selectedNode, level: 'INFO', fileName: 'Offers', msg: 'Offer Bookmarks Received', data: offers });
|
||||
res.status(200).json(offers.Offers);
|
||||
res.status(200).json(offers);
|
||||
}).catch((errRes) => {
|
||||
const err = common.handleError(errRes, 'Offers', 'Offer Bookmarks Error', req.session.selectedNode);
|
||||
return res.status(err.statusCode).json({ message: err.message, error: err.error });
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { Database } from '../../utils/database.js';
|
||||
import { Logger } from '../../utils/logger.js';
|
||||
import { Common } from '../../utils/common.js';
|
||||
import { CollectionFieldsEnum, CollectionsEnum } from '../../models/database.model.js';
|
||||
import { CollectionsEnum } from '../../models/database.model.js';
|
||||
const logger = Logger;
|
||||
const common = Common;
|
||||
const databaseService = Database;
|
||||
@ -19,13 +19,11 @@ export const savePageSettings = (req, res, next) => {
|
||||
logger.log({ selectedNode: req.session.selectedNode, level: 'INFO', fileName: 'Page Settings', msg: 'Saving Page Settings..' });
|
||||
// eslint-disable-next-line arrow-body-style
|
||||
return Promise.all(req.body.map((page) => databaseService.validateDocument(CollectionsEnum.PAGE_SETTINGS, page))).then((values) => {
|
||||
return Promise.all(req.body.map((page) => databaseService.update(req.session.selectedNode, CollectionsEnum.PAGE_SETTINGS, page, CollectionFieldsEnum.PAGE_ID, page.pageId))).
|
||||
then((values) => {
|
||||
logger.log({ selectedNode: req.session.selectedNode, level: 'INFO', fileName: 'PayRequest', msg: 'Payment List Decoded', data: values });
|
||||
res.status(201).json(values);
|
||||
}).
|
||||
catch((errRes) => {
|
||||
const err = common.handleError(errRes, 'Page Settings', 'Page Settings Update Error', req.session.selectedNode);
|
||||
return databaseService.insert(req.session.selectedNode, CollectionsEnum.PAGE_SETTINGS, req.body).then((insertRes) => {
|
||||
logger.log({ selectedNode: req.session.selectedNode, level: 'INFO', fileName: 'Page Settings', msg: 'Page Settings Updated', data: insertRes });
|
||||
res.status(201).json(insertRes);
|
||||
}).catch((insertErrRes) => {
|
||||
const err = common.handleError(insertErrRes, 'Page Settings', 'Page Settings Update Error', req.session.selectedNode);
|
||||
throw new Error(JSON.stringify({ message: err.message, error: err.error }));
|
||||
});
|
||||
}).catch((errRes) => {
|
||||
|
@ -64,15 +64,15 @@ export class DatabaseService {
|
||||
}
|
||||
});
|
||||
}
|
||||
insert(selectedNode, collectionName, newDocument) {
|
||||
insert(selectedNode, collectionName, newCollection) {
|
||||
return new Promise((resolve, reject) => {
|
||||
try {
|
||||
if (!selectedNode || !selectedNode.index) {
|
||||
reject(new Error('Selected Node Config Not Found.'));
|
||||
}
|
||||
this.nodeDatabase[selectedNode.index].data[collectionName].push(newDocument);
|
||||
this.saveDatabase(+selectedNode.index);
|
||||
resolve(newDocument);
|
||||
this.nodeDatabase[selectedNode.index].data[collectionName] = newCollection;
|
||||
this.saveDatabase(selectedNode, collectionName);
|
||||
resolve(this.nodeDatabase[selectedNode.index].data[collectionName]);
|
||||
}
|
||||
catch (errRes) {
|
||||
reject(errRes);
|
||||
@ -108,7 +108,7 @@ export class DatabaseService {
|
||||
}
|
||||
this.nodeDatabase[selectedNode.index].data[collectionName].push(updatedDocument);
|
||||
}
|
||||
this.saveDatabase(+selectedNode.index);
|
||||
this.saveDatabase(selectedNode, collectionName);
|
||||
resolve(updatedDocument);
|
||||
}
|
||||
catch (errRes) {
|
||||
@ -147,7 +147,7 @@ export class DatabaseService {
|
||||
else {
|
||||
reject(new Error('Unable to delete, document not found.'));
|
||||
}
|
||||
this.saveDatabase(+selectedNode.index);
|
||||
this.saveDatabase(selectedNode, collectionName);
|
||||
resolve(documentFieldValue);
|
||||
}
|
||||
catch (errRes) {
|
||||
@ -155,9 +155,10 @@ export class DatabaseService {
|
||||
}
|
||||
});
|
||||
}
|
||||
saveDatabase(nodeIndex) {
|
||||
saveDatabase(selectedNode, collectionName) {
|
||||
const nodeIndex = +selectedNode.index;
|
||||
try {
|
||||
if (+nodeIndex < 1) {
|
||||
if (nodeIndex < 1) {
|
||||
return true;
|
||||
}
|
||||
const selNode = this.nodeDatabase[nodeIndex] && this.nodeDatabase[nodeIndex].adapter && this.nodeDatabase[nodeIndex].adapter.selNode ? this.nodeDatabase[nodeIndex].adapter.selNode : null;
|
||||
@ -165,8 +166,8 @@ export class DatabaseService {
|
||||
this.logger.log({ selectedNode: selNode, level: 'ERROR', fileName: 'Database', msg: 'Database Save Error: Selected Node Setup Not Found.' });
|
||||
throw new Error('Database Save Error: Selected Node Setup Not Found.');
|
||||
}
|
||||
this.nodeDatabase[nodeIndex].adapter.saveData(this.nodeDatabase[nodeIndex].data);
|
||||
this.logger.log({ selectedNode: this.nodeDatabase[nodeIndex].adapter.selNode, level: 'INFO', fileName: 'Database', msg: 'Database Saved' });
|
||||
this.nodeDatabase[nodeIndex].adapter.saveData(collectionName, this.nodeDatabase[selectedNode.index].data[collectionName]);
|
||||
this.logger.log({ selectedNode: this.nodeDatabase[nodeIndex].adapter.selNode, level: 'INFO', fileName: 'Database', msg: 'Database Collection ' + collectionName + ' Saved' });
|
||||
return true;
|
||||
}
|
||||
catch (err) {
|
||||
@ -206,6 +207,8 @@ export class DatabaseAdapter {
|
||||
const newFileName = this.dbFilePath + sep + 'rtldb-' + selNode.ln_implementation + '-Offers.json';
|
||||
try {
|
||||
this.common.createDirectory(this.dbFilePath);
|
||||
const oldOffers = JSON.parse(fs.readFileSync(oldFileName, 'utf-8'));
|
||||
fs.writeFileSync(oldFileName, JSON.stringify(oldOffers.Offers, null, 2));
|
||||
fs.renameSync(oldFileName, newFileName);
|
||||
}
|
||||
catch (err) {
|
||||
@ -224,7 +227,7 @@ export class DatabaseAdapter {
|
||||
const collectionFileName = this.dbFilePath + sep + 'rtldb-' + this.selNode.ln_implementation + '-' + collectionName + '.json';
|
||||
try {
|
||||
if (!fs.existsSync(collectionFileName)) {
|
||||
fs.writeFileSync(collectionFileName, '{}');
|
||||
fs.writeFileSync(collectionFileName, '[]');
|
||||
}
|
||||
}
|
||||
catch (err) {
|
||||
@ -242,17 +245,13 @@ export class DatabaseAdapter {
|
||||
getSelNode() {
|
||||
return this.selNode;
|
||||
}
|
||||
saveData(data) {
|
||||
saveData(collectionName, collectionData) {
|
||||
try {
|
||||
if (data) {
|
||||
for (const collectionName in data) {
|
||||
if (data.hasOwnProperty(collectionName)) {
|
||||
const collectionFileName = this.dbFilePath + sep + 'rtldb-' + this.selNode.ln_implementation + '-' + collectionName + '.json';
|
||||
const tempFile = collectionFileName + '.tmp';
|
||||
fs.writeFileSync(tempFile, JSON.stringify(data, null, 2));
|
||||
fs.renameSync(tempFile, collectionFileName);
|
||||
}
|
||||
}
|
||||
if (collectionData) {
|
||||
const collectionFileName = this.dbFilePath + sep + 'rtldb-' + this.selNode.ln_implementation + '-' + collectionName + '.json';
|
||||
const tempFile = collectionFileName + '.tmp';
|
||||
fs.writeFileSync(tempFile, JSON.stringify(collectionData, null, 2));
|
||||
fs.renameSync(tempFile, collectionFileName);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ export const listOfferBookmarks = (req, res, next) => {
|
||||
logger.log({ selectedNode: req.session.selectedNode, level: 'INFO', fileName: 'Offers', msg: 'Getting Offer Bookmarks..' });
|
||||
databaseService.find(req.session.selectedNode, CollectionsEnum.OFFERS).then((offers: any) => {
|
||||
logger.log({ selectedNode: req.session.selectedNode, level: 'INFO', fileName: 'Offers', msg: 'Offer Bookmarks Received', data: offers });
|
||||
res.status(200).json(offers.Offers);
|
||||
res.status(200).json(offers);
|
||||
}).catch((errRes) => {
|
||||
const err = common.handleError(errRes, 'Offers', 'Offer Bookmarks Error', req.session.selectedNode);
|
||||
return res.status(err.statusCode).json({ message: err.message, error: err.error });
|
||||
|
@ -22,15 +22,13 @@ export const savePageSettings = (req, res, next) => {
|
||||
logger.log({ selectedNode: req.session.selectedNode, level: 'INFO', fileName: 'Page Settings', msg: 'Saving Page Settings..' });
|
||||
// eslint-disable-next-line arrow-body-style
|
||||
return Promise.all(req.body.map((page) => databaseService.validateDocument(CollectionsEnum.PAGE_SETTINGS, page))).then((values) => {
|
||||
return Promise.all(req.body.map((page) => databaseService.update(req.session.selectedNode, CollectionsEnum.PAGE_SETTINGS, page, CollectionFieldsEnum.PAGE_ID, page.pageId))).
|
||||
then((values) => {
|
||||
logger.log({ selectedNode: req.session.selectedNode, level: 'INFO', fileName: 'PayRequest', msg: 'Payment List Decoded', data: values });
|
||||
res.status(201).json(values);
|
||||
}).
|
||||
catch((errRes) => {
|
||||
const err = common.handleError(errRes, 'Page Settings', 'Page Settings Update Error', req.session.selectedNode);
|
||||
throw new Error(JSON.stringify({ message: err.message, error: err.error }));
|
||||
});
|
||||
return databaseService.insert(req.session.selectedNode, CollectionsEnum.PAGE_SETTINGS, req.body).then((insertRes) => {
|
||||
logger.log({ selectedNode: req.session.selectedNode, level: 'INFO', fileName: 'Page Settings', msg: 'Page Settings Updated', data: insertRes });
|
||||
res.status(201).json(insertRes);
|
||||
}).catch((insertErrRes) => {
|
||||
const err = common.handleError(insertErrRes, 'Page Settings', 'Page Settings Update Error', req.session.selectedNode);
|
||||
throw new Error(JSON.stringify({ message: err.message, error: err.error }));
|
||||
});
|
||||
}).catch((errRes) => {
|
||||
const err = common.handleError(errRes, 'Page Settings', 'Page Settings Validation Error', req.session.selectedNode);
|
||||
return res.status(err.statusCode).json({ message: err.message, error: err.error });
|
||||
|
@ -70,15 +70,15 @@ export class DatabaseService {
|
||||
});
|
||||
}
|
||||
|
||||
insert(selectedNode: CommonSelectedNode, collectionName: CollectionsEnum, newDocument: any) {
|
||||
insert(selectedNode: CommonSelectedNode, collectionName: CollectionsEnum, newCollection: any) {
|
||||
return new Promise((resolve, reject) => {
|
||||
try {
|
||||
if (!selectedNode || !selectedNode.index) {
|
||||
reject(new Error('Selected Node Config Not Found.'));
|
||||
}
|
||||
this.nodeDatabase[selectedNode.index].data[collectionName].push(newDocument);
|
||||
this.saveDatabase(+selectedNode.index);
|
||||
resolve(newDocument);
|
||||
this.nodeDatabase[selectedNode.index].data[collectionName] = newCollection;
|
||||
this.saveDatabase(selectedNode, collectionName);
|
||||
resolve(this.nodeDatabase[selectedNode.index].data[collectionName]);
|
||||
} catch (errRes) {
|
||||
reject(errRes);
|
||||
}
|
||||
@ -113,7 +113,7 @@ export class DatabaseService {
|
||||
}
|
||||
this.nodeDatabase[selectedNode.index].data[collectionName].push(updatedDocument);
|
||||
}
|
||||
this.saveDatabase(+selectedNode.index);
|
||||
this.saveDatabase(selectedNode, collectionName);
|
||||
resolve(updatedDocument);
|
||||
} catch (errRes) {
|
||||
reject(errRes);
|
||||
@ -150,7 +150,7 @@ export class DatabaseService {
|
||||
} else {
|
||||
reject(new Error('Unable to delete, document not found.'));
|
||||
}
|
||||
this.saveDatabase(+selectedNode.index);
|
||||
this.saveDatabase(selectedNode, collectionName);
|
||||
resolve(documentFieldValue);
|
||||
} catch (errRes) {
|
||||
reject(errRes);
|
||||
@ -158,9 +158,10 @@ export class DatabaseService {
|
||||
});
|
||||
}
|
||||
|
||||
saveDatabase(nodeIndex: number) {
|
||||
saveDatabase(selectedNode: CommonSelectedNode, collectionName: CollectionsEnum) {
|
||||
const nodeIndex = +selectedNode.index;
|
||||
try {
|
||||
if (+nodeIndex < 1) {
|
||||
if (nodeIndex < 1) {
|
||||
return true;
|
||||
}
|
||||
const selNode = this.nodeDatabase[nodeIndex] && this.nodeDatabase[nodeIndex].adapter && this.nodeDatabase[nodeIndex].adapter.selNode ? this.nodeDatabase[nodeIndex].adapter.selNode : null;
|
||||
@ -168,8 +169,8 @@ export class DatabaseService {
|
||||
this.logger.log({ selectedNode: selNode, level: 'ERROR', fileName: 'Database', msg: 'Database Save Error: Selected Node Setup Not Found.' });
|
||||
throw new Error('Database Save Error: Selected Node Setup Not Found.');
|
||||
}
|
||||
this.nodeDatabase[nodeIndex].adapter.saveData(this.nodeDatabase[nodeIndex].data);
|
||||
this.logger.log({ selectedNode: this.nodeDatabase[nodeIndex].adapter.selNode, level: 'INFO', fileName: 'Database', msg: 'Database Saved' });
|
||||
this.nodeDatabase[nodeIndex].adapter.saveData(collectionName, this.nodeDatabase[selectedNode.index].data[collectionName]);
|
||||
this.logger.log({ selectedNode: this.nodeDatabase[nodeIndex].adapter.selNode, level: 'INFO', fileName: 'Database', msg: 'Database Collection ' + collectionName + ' Saved' });
|
||||
return true;
|
||||
} catch (err) {
|
||||
const selNode = this.nodeDatabase[nodeIndex] && this.nodeDatabase[nodeIndex].adapter && this.nodeDatabase[nodeIndex].adapter.selNode ? this.nodeDatabase[nodeIndex].adapter.selNode : null;
|
||||
@ -209,6 +210,8 @@ export class DatabaseAdapter {
|
||||
const newFileName = this.dbFilePath + sep + 'rtldb-' + selNode.ln_implementation + '-Offers.json';
|
||||
try {
|
||||
this.common.createDirectory(this.dbFilePath);
|
||||
const oldOffers: any = JSON.parse(fs.readFileSync(oldFileName, 'utf-8'));
|
||||
fs.writeFileSync(oldFileName, JSON.stringify(oldOffers.Offers, null, 2));
|
||||
fs.renameSync(oldFileName, newFileName);
|
||||
} catch (err) {
|
||||
this.logger.log({ selectedNode: selNode, level: 'ERROR', fileName: 'Database', msg: 'Rename Old Database Error', error: err });
|
||||
@ -226,7 +229,7 @@ export class DatabaseAdapter {
|
||||
const collectionFileName = this.dbFilePath + sep + 'rtldb-' + this.selNode.ln_implementation + '-' + collectionName + '.json';
|
||||
try {
|
||||
if (!fs.existsSync(collectionFileName)) {
|
||||
fs.writeFileSync(collectionFileName, '{}');
|
||||
fs.writeFileSync(collectionFileName, '[]');
|
||||
}
|
||||
} catch (err) {
|
||||
return new Error('Unable to Create Database File Error ' + JSON.stringify(err));
|
||||
@ -244,17 +247,13 @@ export class DatabaseAdapter {
|
||||
return this.selNode;
|
||||
}
|
||||
|
||||
saveData(data: any) {
|
||||
saveData(collectionName: string, collectionData: any) {
|
||||
try {
|
||||
if (data) {
|
||||
for (const collectionName in data) {
|
||||
if (data.hasOwnProperty(collectionName)) {
|
||||
const collectionFileName = this.dbFilePath + sep + 'rtldb-' + this.selNode.ln_implementation + '-' + collectionName + '.json';
|
||||
const tempFile = collectionFileName + '.tmp';
|
||||
fs.writeFileSync(tempFile, JSON.stringify(data, null, 2));
|
||||
fs.renameSync(tempFile, collectionFileName);
|
||||
}
|
||||
}
|
||||
if (collectionData) {
|
||||
const collectionFileName = this.dbFilePath + sep + 'rtldb-' + this.selNode.ln_implementation + '-' + collectionName + '.json';
|
||||
const tempFile = collectionFileName + '.tmp';
|
||||
fs.writeFileSync(tempFile, JSON.stringify(collectionData, null, 2));
|
||||
fs.renameSync(tempFile, collectionFileName);
|
||||
}
|
||||
return true;
|
||||
} catch (err) {
|
||||
|
@ -29,7 +29,7 @@
|
||||
<ng-container matColumnDef="id">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> ID </th>
|
||||
<td mat-cell *matCellDef="let hop">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '12rem' : '40rem'}">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '40rem'}">
|
||||
<span class="ellipsis-child">{{hop?.id}}</span>
|
||||
</div>
|
||||
</td>
|
||||
@ -37,7 +37,7 @@
|
||||
<ng-container matColumnDef="alias">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> Alias </th>
|
||||
<td mat-cell *matCellDef="let hop">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '12rem' : '40rem'}">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '40rem'}">
|
||||
<span class="ellipsis-child">{{hop?.alias}}</span>
|
||||
</div>
|
||||
</td>
|
||||
|
@ -62,15 +62,17 @@
|
||||
<table mat-table #table [dataSource]="liquidityNodes" matSort [ngClass]="{'overflow-auto error-border': errorMessage !== '','overflow-auto': true}">
|
||||
<ng-container matColumnDef="alias">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> Alias </th>
|
||||
<td mat-cell *matCellDef="let lqNode" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '20rem'}">
|
||||
<span fxLayout="row" fxLayoutAlign="start center">
|
||||
{{lqNode?.alias}}
|
||||
<mat-chip-list class="ml-half" aria-label="Address Types">
|
||||
<mat-chip *ngFor="let addrType of lqNode.address_types" color="primary" selected>
|
||||
{{addrType === 'tor' ? 'Tor' : addrType === 'ipv' ? 'Clearnet' : addrType}}
|
||||
</mat-chip>
|
||||
</mat-chip-list>
|
||||
</span>
|
||||
<td mat-cell *matCellDef="let lqNode">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '20rem'}">
|
||||
<span fxLayout="row" fxLayoutAlign="start center" class="ellipsis-child">
|
||||
{{lqNode?.alias}}
|
||||
<mat-chip-list class="ml-half" aria-label="Address Types">
|
||||
<mat-chip *ngFor="let addrType of lqNode.address_types" color="primary" selected>
|
||||
{{addrType === 'tor' ? 'Tor' : addrType === 'ipv' ? 'Clearnet' : addrType}}
|
||||
</mat-chip>
|
||||
</mat-chip-list>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="nodeid">
|
||||
|
@ -18,7 +18,7 @@
|
||||
<ng-container matColumnDef="short_channel_id">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> Short Channel ID </th>
|
||||
<td mat-cell *matCellDef="let channel">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '12rem' : '22rem'}">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '22rem'}">
|
||||
<span class="ellipsis-child">{{channel?.short_channel_id}}</span>
|
||||
</div>
|
||||
</td>
|
||||
@ -26,7 +26,7 @@
|
||||
<ng-container matColumnDef="alias">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> Alias </th>
|
||||
<td mat-cell *matCellDef="let channel">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '12rem' : '22rem'}">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '22rem'}">
|
||||
<span class="ellipsis-child">{{channel?.alias}}</span>
|
||||
</div>
|
||||
</td>
|
||||
@ -34,7 +34,7 @@
|
||||
<ng-container matColumnDef="id">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> Id </th>
|
||||
<td mat-cell *matCellDef="let channel">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '12rem' : '22rem'}">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '22rem'}">
|
||||
<span class="ellipsis-child">{{channel?.id}}</span>
|
||||
</div>
|
||||
</td>
|
||||
@ -42,7 +42,7 @@
|
||||
<ng-container matColumnDef="channel_id">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> Channel Id </th>
|
||||
<td mat-cell *matCellDef="let channel">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '12rem' : '22rem'}">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '22rem'}">
|
||||
<span class="ellipsis-child">{{channel?.channel_id}}</span>
|
||||
</div>
|
||||
</td>
|
||||
@ -50,7 +50,7 @@
|
||||
<ng-container matColumnDef="funding_txid">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> Funding Transaction Id </th>
|
||||
<td mat-cell *matCellDef="let channel">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '12rem' : '22rem'}">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '22rem'}">
|
||||
<span class="ellipsis-child">{{channel?.funding_txid}}</span>
|
||||
</div>
|
||||
</td>
|
||||
|
@ -18,7 +18,7 @@
|
||||
<ng-container matColumnDef="alias">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> Alias </th>
|
||||
<td mat-cell *matCellDef="let channel">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '12rem' : '22rem'}">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '22rem'}">
|
||||
<span class="ellipsis-child">{{channel?.alias}}</span>
|
||||
</div>
|
||||
</td>
|
||||
@ -26,7 +26,7 @@
|
||||
<ng-container matColumnDef="id">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> Id </th>
|
||||
<td mat-cell *matCellDef="let channel">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '12rem' : '22rem'}">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '22rem'}">
|
||||
<span class="ellipsis-child">{{channel?.id}}</span>
|
||||
</div>
|
||||
</td>
|
||||
@ -34,7 +34,7 @@
|
||||
<ng-container matColumnDef="channel_id">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> Channel Id </th>
|
||||
<td mat-cell *matCellDef="let channel">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '12rem' : '22rem'}">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '22rem'}">
|
||||
<span class="ellipsis-child">{{channel?.channel_id}}</span>
|
||||
</div>
|
||||
</td>
|
||||
@ -42,7 +42,7 @@
|
||||
<ng-container matColumnDef="funding_txid">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> Funding Transaction Id </th>
|
||||
<td mat-cell *matCellDef="let channel">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '12rem' : '22rem'}">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '22rem'}">
|
||||
<span class="ellipsis-child">{{channel?.funding_txid}}</span>
|
||||
</div>
|
||||
</td>
|
||||
@ -53,7 +53,7 @@
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="state">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> State </th>
|
||||
<td mat-cell *matCellDef="let channel" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '12rem' : '22rem'}"> {{CLNChannelPendingState[channel?.state]}} </td>
|
||||
<td mat-cell *matCellDef="let channel" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '22rem'}"> {{CLNChannelPendingState[channel?.state]}} </td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="our_channel_reserve_satoshis">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header arrowPosition="before"> Local Reserve (Sats) </th>
|
||||
|
@ -27,7 +27,7 @@
|
||||
<ng-container matColumnDef="alias">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> Alias </th>
|
||||
<td mat-cell *matCellDef="let peer">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '12rem' : '40rem'}">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '40rem'}">
|
||||
<span class="ellipsis-child">{{peer?.alias}}</span>
|
||||
</div>
|
||||
</td>
|
||||
@ -35,7 +35,7 @@
|
||||
<ng-container matColumnDef="id">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> ID </th>
|
||||
<td mat-cell *matCellDef="let peer">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '12rem' : '40rem'}">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '40rem'}">
|
||||
<span class="ellipsis-child">{{peer?.id}}</span>
|
||||
</div>
|
||||
</td>
|
||||
@ -43,7 +43,7 @@
|
||||
<ng-container matColumnDef="netaddr">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> Network Address </th>
|
||||
<td mat-cell *matCellDef="let peer">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '12rem' : '40rem'}">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '40rem'}">
|
||||
<span class="ellipsis-child" *ngFor="let addr of peer?.netaddr; last as isLast">{{addr}}<span *ngIf="!isLast">,<br></span></span>
|
||||
</div>
|
||||
</td>
|
||||
|
@ -13,11 +13,19 @@
|
||||
<table mat-table #tableIn [dataSource]="RoutingPeersIncoming" matSort class="overflow-auto incoming-table">
|
||||
<ng-container matColumnDef="channel_id">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>Channel ID</th>
|
||||
<td mat-cell *matCellDef="let rPeer" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '5rem' : '10rem'}">{{rPeer.channel_id}}</td>
|
||||
<td mat-cell *matCellDef="let rPeer">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '10rem'}">
|
||||
<span class="ellipsis-child">{{rPeer.channel_id}}</span>
|
||||
</div>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="alias">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>Peer Alias</th>
|
||||
<td mat-cell *matCellDef="let rPeer" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '5rem' : '10rem'}">{{rPeer.alias}}</td>
|
||||
<td mat-cell *matCellDef="let rPeer">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '10rem'}">
|
||||
<span class="ellipsis-child">{{rPeer.alias}}</span>
|
||||
</div>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="events">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header arrowPosition="before">Events</th>
|
||||
@ -58,11 +66,19 @@
|
||||
<table mat-table #tableOut [dataSource]="RoutingPeersOutgoing" matSort class="overflow-auto outgoing-table">
|
||||
<ng-container matColumnDef="channel_id">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>Channel ID</th>
|
||||
<td mat-cell *matCellDef="let rPeer" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '5rem' : '10rem'}">{{rPeer.channel_id}}</td>
|
||||
<td mat-cell *matCellDef="let rPeer">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '10rem'}">
|
||||
<span class="ellipsis-child">{{rPeer.channel_id}}</span>
|
||||
</div>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="alias">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>Peer Alias</th>
|
||||
<td mat-cell *matCellDef="let rPeer" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '5rem' : '10rem'}">{{rPeer.alias}}</td>
|
||||
<td mat-cell *matCellDef="let rPeer">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '10rem'}">
|
||||
<span class="ellipsis-child">{{rPeer.alias}}</span>
|
||||
</div>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="events">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header arrowPosition="before">Events</th>
|
||||
|
@ -221,7 +221,7 @@ export const CLNReducer = createReducer(initCLNState,
|
||||
on(setPageSettings, (state, { payload }) => {
|
||||
const newPageSettings: PageSettings[] = [];
|
||||
CLN_DEFAULT_PAGE_SETTINGS.forEach((defaultPage) => {
|
||||
const pageSetting = payload && Object.keys(payload).length > 0 ? payload.find((p) => p.pageId === defaultPage.pageId) : null;
|
||||
const pageSetting = payload && payload.length && payload.length > 0 ? payload.find((p) => p.pageId === defaultPage.pageId) : null;
|
||||
if (pageSetting) {
|
||||
const tablesSettings = JSON.parse(JSON.stringify(pageSetting.tables));
|
||||
pageSetting.tables = []; // To maintain settings order
|
||||
|
@ -20,7 +20,7 @@
|
||||
<ng-container matColumnDef="title">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> Title </th>
|
||||
<td mat-cell *matCellDef="let offersbookmark">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '20rem' : '30rem'}">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '30rem'}">
|
||||
<span class="ellipsis-child">{{offersbookmark.title}}</span>
|
||||
</div>
|
||||
</td>
|
||||
@ -32,7 +32,7 @@
|
||||
<ng-container matColumnDef="description">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> Description </th>
|
||||
<td mat-cell *matCellDef="let offersbookmark">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '20rem' : '30rem'}">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '30rem'}">
|
||||
<span class="ellipsis-child">{{offersbookmark.description}}</span>
|
||||
</div>
|
||||
</td>
|
||||
@ -44,7 +44,7 @@
|
||||
<ng-container matColumnDef="bolt12">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> Invoice </th>
|
||||
<td mat-cell *matCellDef="let offersbookmark">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '20rem' : '30rem'}">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '30rem'}">
|
||||
<span class="ellipsis-child">{{offersbookmark.bolt12}}</span>
|
||||
</div>
|
||||
</td>
|
||||
|
@ -25,7 +25,7 @@
|
||||
<ng-container matColumnDef="offer_id">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> Offer ID </th>
|
||||
<td mat-cell *matCellDef="let offer">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '25rem' : '50rem'}">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '50rem'}">
|
||||
<span class="ellipsis-child">
|
||||
{{offer.offer_id}}
|
||||
</span>
|
||||
@ -45,7 +45,7 @@
|
||||
<ng-container matColumnDef="bolt12">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> Invoice </th>
|
||||
<td mat-cell *matCellDef="let offer">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '25rem' : '50rem'}">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '50rem'}">
|
||||
<span class="ellipsis-child">
|
||||
{{offer.bolt12}}
|
||||
</span>
|
||||
|
@ -30,13 +30,16 @@
|
||||
}
|
||||
}
|
||||
|
||||
.mat-column-group_status, .mat-column-group_created_at {
|
||||
.mpp-row-span:not(:first-of-type) {
|
||||
padding-left: 3rem;
|
||||
}
|
||||
}
|
||||
|
||||
.mpp-row-span {
|
||||
min-height: 4.2rem;
|
||||
place-content: center flex-start;
|
||||
align-items: center;
|
||||
&:not(:first-of-type) {
|
||||
padding-left: 3rem;
|
||||
}
|
||||
&.ellipsis-parent {
|
||||
display: flex;
|
||||
}
|
||||
|
@ -44,7 +44,7 @@
|
||||
<ng-container matColumnDef="nodeId">
|
||||
<th mat-header-cell *matHeaderCellDef> ID </th>
|
||||
<td mat-cell *matCellDef="let hop">
|
||||
<span fxLayout="row" class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '20rem' : '60rem'}">
|
||||
<span fxLayout="row" class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '60rem'}">
|
||||
<span class="ellipsis-child">{{hop?.nodeId}}</span>
|
||||
</span>
|
||||
</td>
|
||||
|
@ -26,7 +26,7 @@
|
||||
<ng-container matColumnDef="channelId">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> Channel Id </th>
|
||||
<td mat-cell *matCellDef="let channel">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '12rem' : '22rem'}">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '22rem'}">
|
||||
<span class="ellipsis-child">{{channel?.channelId}}</span>
|
||||
</div>
|
||||
</td>
|
||||
@ -42,7 +42,7 @@
|
||||
<ng-container matColumnDef="nodeId">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> Node Id </th>
|
||||
<td mat-cell *matCellDef="let channel">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '12rem' : '22rem'}">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '22rem'}">
|
||||
<span class="ellipsis-child">{{channel?.nodeId}}</span>
|
||||
</div>
|
||||
</td>
|
||||
|
@ -22,7 +22,7 @@
|
||||
<ng-container matColumnDef="channelId">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> Channel Id </th>
|
||||
<td mat-cell *matCellDef="let channel">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '12rem' : '22rem'}">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '22rem'}">
|
||||
<span class="ellipsis-child">{{channel?.channelId}}</span>
|
||||
</div>
|
||||
</td>
|
||||
@ -30,7 +30,7 @@
|
||||
<ng-container matColumnDef="alias">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> Alias </th>
|
||||
<td mat-cell *matCellDef="let channel">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '12rem' : '22rem'}">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '22rem'}">
|
||||
<span class="ellipsis-child">{{channel?.alias}}</span>
|
||||
</div>
|
||||
</td>
|
||||
@ -38,7 +38,7 @@
|
||||
<ng-container matColumnDef="nodeId">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> Node Id </th>
|
||||
<td mat-cell *matCellDef="let channel">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '12rem' : '22rem'}">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '22rem'}">
|
||||
<span class="ellipsis-child">{{channel?.nodeId}}</span>
|
||||
</div>
|
||||
</td>
|
||||
|
@ -22,7 +22,7 @@
|
||||
<ng-container matColumnDef="channelId">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> Channel Id </th>
|
||||
<td mat-cell *matCellDef="let channel">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '12rem' : '22rem'}">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '22rem'}">
|
||||
<span class="ellipsis-child">{{channel?.channelId}}</span>
|
||||
</div>
|
||||
</td>
|
||||
@ -34,7 +34,7 @@
|
||||
<ng-container matColumnDef="nodeId">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> Node Id </th>
|
||||
<td mat-cell *matCellDef="let channel">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '12rem' : '22rem'}">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '22rem'}">
|
||||
<span class="ellipsis-child">{{channel?.nodeId}}</span>
|
||||
</div>
|
||||
</td>
|
||||
|
@ -23,7 +23,11 @@
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="fromChannelId">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>In Channel Id</th>
|
||||
<td mat-cell *matCellDef="let fhEvent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '20rem'}">{{fhEvent?.fromChannelId}}</td>
|
||||
<td mat-cell *matCellDef="let fhEvent">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '20rem'}">
|
||||
<span class="ellipsis-child">{{fhEvent?.fromChannelId}}</span>
|
||||
</div>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="fromShortChannelId">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>In Channel Short Id</th>
|
||||
@ -31,11 +35,19 @@
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="fromChannelAlias">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>In Channel</th>
|
||||
<td mat-cell *matCellDef="let fhEvent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '20rem'}">{{fhEvent?.fromChannelAlias}}</td>
|
||||
<td mat-cell *matCellDef="let fhEvent">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '20rem'}">
|
||||
<span class="ellipsis-child">{{fhEvent?.fromChannelAlias}}</span>
|
||||
</div>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="toChannelId">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>Out Channel Id</th>
|
||||
<td mat-cell *matCellDef="let fhEvent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '20rem'}">{{fhEvent?.toChannelId}}</td>
|
||||
<td mat-cell *matCellDef="let fhEvent">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '20rem'}">
|
||||
<span class="ellipsis-child">{{fhEvent?.toChannelId}}</span>
|
||||
</div>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="toShortChannelId">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>Out Channel Short Id</th>
|
||||
@ -43,7 +55,11 @@
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="toChannelAlias">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>Out Channel</th>
|
||||
<td mat-cell *matCellDef="let fhEvent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '20rem'}">{{fhEvent?.toChannelAlias}}</td>
|
||||
<td mat-cell *matCellDef="let fhEvent">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '20rem'}">
|
||||
<span class="ellipsis-child">{{fhEvent?.toChannelAlias}}</span>
|
||||
</div>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="amountIn">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header arrowPosition="before">Amount In (Sats)</th>
|
||||
@ -59,7 +75,11 @@
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="paymentHash">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>Payment Hash</th>
|
||||
<td mat-cell *matCellDef="let fhEvent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '20rem'}">{{fhEvent?.paymentHash}}</td>
|
||||
<td mat-cell *matCellDef="let fhEvent">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '20rem'}">
|
||||
<span class="ellipsis-child">{{fhEvent?.paymentHash}}</span>
|
||||
</div>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="actions">
|
||||
<th mat-header-cell *matHeaderCellDef>
|
||||
|
@ -13,11 +13,19 @@
|
||||
<table mat-table #tableIn [dataSource]="RoutingPeersIncoming" matSort class="overflow-auto incoming-table">
|
||||
<ng-container matColumnDef="channelId">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>Channel ID</th>
|
||||
<td mat-cell *matCellDef="let rPeer" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '5rem' : '10rem'}">{{rPeer.channelId}}</td>
|
||||
<td mat-cell *matCellDef="let rPeer">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '10rem'}">
|
||||
<span class="ellipsis-child">{{rPeer?.channelId}}</span>
|
||||
</div>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="alias">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>Peer Alias</th>
|
||||
<td mat-cell *matCellDef="let rPeer" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '5rem' : '10rem'}">{{rPeer.alias}}</td>
|
||||
<td mat-cell *matCellDef="let rPeer">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '10rem'}">
|
||||
<span class="ellipsis-child">{{rPeer?.alias}}</span>
|
||||
</div>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="events">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header arrowPosition="before">Events</th>
|
||||
@ -58,11 +66,19 @@
|
||||
<table mat-table #tableOut [dataSource]="RoutingPeersOutgoing" matSort class="overflow-auto outgoing-table">
|
||||
<ng-container matColumnDef="channelId">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>Channel ID</th>
|
||||
<td mat-cell *matCellDef="let rPeer" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '5rem' : '10rem'}">{{rPeer.channelId}}</td>
|
||||
<td mat-cell *matCellDef="let rPeer">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '10rem'}">
|
||||
<span class="ellipsis-child">{{rPeer?.channelId}}</span>
|
||||
</div>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="alias">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>Peer Alias</th>
|
||||
<td mat-cell *matCellDef="let rPeer" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '5rem' : '10rem'}">{{rPeer.alias}}</td>
|
||||
<td mat-cell *matCellDef="let rPeer">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '10rem'}">
|
||||
<span class="ellipsis-child">{{rPeer?.alias}}</span>
|
||||
</div>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="events">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header arrowPosition="before">Events</th>
|
||||
|
@ -218,7 +218,7 @@ export const ECLReducer = createReducer(initECLState,
|
||||
on(setPageSettings, (state, { payload }) => {
|
||||
const newPageSettings: PageSettings[] = [];
|
||||
ECL_DEFAULT_PAGE_SETTINGS.forEach((defaultPage) => {
|
||||
const pageSetting = payload && Object.keys(payload).length > 0 ? payload.find((p) => p.pageId === defaultPage.pageId) : null;
|
||||
const pageSetting = payload && payload.length && payload.length > 0 ? payload.find((p) => p.pageId === defaultPage.pageId) : null;
|
||||
if (pageSetting) {
|
||||
const tablesSettings = JSON.parse(JSON.stringify(pageSetting.tables));
|
||||
pageSetting.tables = []; // To maintain settings order
|
||||
|
@ -1,6 +1,6 @@
|
||||
<div fxLayout="column" fxFlex="100" fxLayoutAlign="space-between stretch">
|
||||
<div fxLayout="column" fxFlex="colWidth" fxLayoutAlign="space-between stretch">
|
||||
<form *ngIf="calledFrom === 'home'" fxLayout="column" fxLayoutAlign="space-between stretch" fxLayout.gt-sm="row wrap" #sendPaymentForm="ngForm">
|
||||
<mat-form-field fxFlex="100">
|
||||
<mat-form-field fxFlex="colWidth">
|
||||
<textarea [perfectScrollbar] matInput placeholder="Payment Request" name="paymentRequest" tabindex="1" [ngModel]="paymentRequest" (ngModelChange)="onPaymentRequestEntry($event)" required (matTextareaAutosize)="true" #paymentReq="ngModel"></textarea>
|
||||
<mat-hint *ngIf="paymentRequest && paymentDecodedHint !== ''">{{paymentDecodedHint}}</mat-hint>
|
||||
<mat-error *ngIf="!paymentRequest">Payment request is required.</mat-error>
|
||||
@ -24,9 +24,9 @@
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxLayout="row" fxLayoutAlign="start start">
|
||||
<div [perfectScrollbar] fxLayout="column" fxLayoutAlign="start center" fxFlex="100" class="table-container">
|
||||
<div [perfectScrollbar] fxLayout="column" fxLayoutAlign="start center" fxFlex="colWidth" class="table-container">
|
||||
<mat-progress-bar *ngIf="apiCallStatus.status === apiCallStatusEnum.INITIATED" mode="indeterminate"></mat-progress-bar>
|
||||
<table mat-table #table fxFlex="100" [dataSource]="payments" matSort [ngClass]="{'overflow-auto error-border': errorMessage !== '','overflow-auto': true}">
|
||||
<table mat-table #table fxFlex="colWidth" [dataSource]="payments" matSort [ngClass]="{'overflow-auto error-border': errorMessage !== '','overflow-auto': true}">
|
||||
<ng-container matColumnDef="firstPartTimestamp">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>Date/Time</th>
|
||||
<td mat-cell *matCellDef="let payment">{{payment?.firstPartTimestamp | date:'dd/MMM/y HH:mm'}}</td>
|
||||
@ -34,7 +34,7 @@
|
||||
<ng-container matColumnDef="id">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>ID</th>
|
||||
<td mat-cell *matCellDef="let payment">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '20rem'}">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : colWidth}">
|
||||
<span class="ellipsis-child">{{payment?.id}}</span>
|
||||
</div>
|
||||
</td>
|
||||
@ -42,7 +42,7 @@
|
||||
<ng-container matColumnDef="recipientNodeId">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>Destination Node Id</th>
|
||||
<td mat-cell *matCellDef="let payment">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '20rem'}">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : colWidth}">
|
||||
<span class="ellipsis-child">{{payment?.recipientNodeId}}</span>
|
||||
</div>
|
||||
</td>
|
||||
@ -50,7 +50,7 @@
|
||||
<ng-container matColumnDef="recipientNodeAlias">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>Destination</th>
|
||||
<td mat-cell *matCellDef="let payment">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '20rem'}">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : colWidth}">
|
||||
<span class="ellipsis-child">{{payment?.recipientNodeAlias}}</span>
|
||||
</div>
|
||||
</td>
|
||||
@ -62,7 +62,7 @@
|
||||
<ng-container matColumnDef="description">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>Description</th>
|
||||
<td mat-cell *matCellDef="let payment">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '20rem'}">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : colWidth}">
|
||||
<span class="ellipsis-child">{{payment?.description}}</span>
|
||||
</div>
|
||||
</td>
|
||||
@ -70,7 +70,7 @@
|
||||
<ng-container matColumnDef="paymentHash">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>Payment Hash</th>
|
||||
<td mat-cell *matCellDef="let payment">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '20rem'}">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : colWidth}">
|
||||
<span class="ellipsis-child">{{payment?.paymentHash}}</span>
|
||||
</div>
|
||||
</td>
|
||||
@ -78,7 +78,7 @@
|
||||
<ng-container matColumnDef="paymentPreimage">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>Preimage</th>
|
||||
<td mat-cell *matCellDef="let payment">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '20rem'}">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : colWidth}">
|
||||
<span class="ellipsis-child">{{payment?.paymentPreimage}}</span>
|
||||
</div>
|
||||
</td>
|
||||
@ -119,12 +119,12 @@
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="group_id">
|
||||
<td mat-cell *matCellDef="let payment">
|
||||
<div fxLayoutAlign="start center" class="ellipsis-parent part-row-span" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '20rem'}">
|
||||
<div fxLayoutAlign="start center" class="ellipsis-parent part-row-span" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : colWidth}">
|
||||
<span class="ellipsis-child">{{payment?.id}}</span>
|
||||
</div>
|
||||
<span *ngIf="payment?.is_expanded">
|
||||
<span *ngFor="let part of payment?.parts" fxLayoutAlign="start center" class="part-row-span">
|
||||
<span fxLayoutAlign="start center" class="ellipsis-parent part-row-span" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '20rem'}">
|
||||
<span fxLayoutAlign="start center" class="ellipsis-parent part-row-span" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : colWidth}">
|
||||
<span class="ellipsis-child">{{part.id}}</span>
|
||||
</span>
|
||||
</span>
|
||||
@ -133,12 +133,12 @@
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="group_recipientNodeId">
|
||||
<td mat-cell *matCellDef="let payment">
|
||||
<div fxLayoutAlign="start center" class="ellipsis-parent part-row-span" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '20rem'}">
|
||||
<div fxLayoutAlign="start center" class="ellipsis-parent part-row-span" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : colWidth}">
|
||||
<span class="ellipsis-child">{{payment?.recipientNodeId}}</span>
|
||||
</div>
|
||||
<span *ngIf="payment?.is_expanded">
|
||||
<span *ngFor="let part of payment?.parts" fxLayoutAlign="start center" class="part-row-span">
|
||||
<span fxLayoutAlign="start center" class="ellipsis-parent part-row-span" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '20rem'}">
|
||||
<span fxLayoutAlign="start center" class="ellipsis-parent part-row-span" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : colWidth}">
|
||||
<span class="ellipsis-child">{{part.toChannelId}}</span>
|
||||
</span>
|
||||
</span>
|
||||
@ -147,12 +147,12 @@
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="group_recipientNodeAlias">
|
||||
<td mat-cell *matCellDef="let payment">
|
||||
<div fxLayoutAlign="start center" class="ellipsis-parent part-row-span" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '20rem'}">
|
||||
<div fxLayoutAlign="start center" class="ellipsis-parent part-row-span" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : colWidth}">
|
||||
<span class="ellipsis-child">{{payment?.recipientNodeAlias}}</span>
|
||||
</div>
|
||||
<span *ngIf="payment?.is_expanded">
|
||||
<span *ngFor="let part of payment?.parts" fxLayoutAlign="start center" class="part-row-span">
|
||||
<span fxLayoutAlign="start center" class="ellipsis-parent part-row-span" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '20rem'}">
|
||||
<span fxLayoutAlign="start center" class="ellipsis-parent part-row-span" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : colWidth}">
|
||||
<span class="ellipsis-child">{{part.toChannelAlias}}</span>
|
||||
</span>
|
||||
</span>
|
||||
@ -171,12 +171,12 @@
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="group_description">
|
||||
<td mat-cell *matCellDef="let payment">
|
||||
<div fxLayoutAlign="start center" class="ellipsis-parent part-row-span" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '20rem'}">
|
||||
<div fxLayoutAlign="start center" class="ellipsis-parent part-row-span" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : colWidth}">
|
||||
<span class="ellipsis-child">{{payment?.description}}</span>
|
||||
</div>
|
||||
<span *ngIf="payment?.is_expanded">
|
||||
<span *ngFor="let part of payment?.parts" fxLayoutAlign="start center" class="part-row-span">
|
||||
<span fxLayoutAlign="start center" class="ellipsis-parent part-row-span" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '20rem'}">
|
||||
<span fxLayoutAlign="start center" class="ellipsis-parent part-row-span" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : colWidth}">
|
||||
<span class="ellipsis-child">Fee Paid: {{part.feesPaid | number:'1.0-0'}} (Sats)</span>
|
||||
</span>
|
||||
</span>
|
||||
@ -185,12 +185,12 @@
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="group_paymentHash">
|
||||
<td mat-cell *matCellDef="let payment">
|
||||
<div fxLayoutAlign="start center" class="ellipsis-parent part-row-span" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '20rem'}">
|
||||
<div fxLayoutAlign="start center" class="ellipsis-parent part-row-span" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : colWidth}">
|
||||
<span class="ellipsis-child">{{payment?.paymentHash}}</span>
|
||||
</div>
|
||||
<span *ngIf="payment?.is_expanded">
|
||||
<span *ngFor="let part of payment?.parts" fxLayoutAlign="start center" class="part-row-span">
|
||||
<span fxLayoutAlign="start center" class="ellipsis-parent part-row-span" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '20rem'}">
|
||||
<span fxLayoutAlign="start center" class="ellipsis-parent part-row-span" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : colWidth}">
|
||||
<span class="ellipsis-child">Fee Paid: {{part.feesPaid | number:'1.0-0'}} (Sats)</span>
|
||||
</span>
|
||||
</span>
|
||||
@ -199,12 +199,12 @@
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="group_paymentPreimage">
|
||||
<td mat-cell *matCellDef="let payment">
|
||||
<div fxLayoutAlign="start center" class="ellipsis-parent part-row-span" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '20rem'}">
|
||||
<div fxLayoutAlign="start center" class="ellipsis-parent part-row-span" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : colWidth}">
|
||||
<span class="ellipsis-child">{{payment?.paymentPreimage}}</span>
|
||||
</div>
|
||||
<span *ngIf="payment?.is_expanded">
|
||||
<span *ngFor="let part of payment?.parts" fxLayoutAlign="start center" class="part-row-span">
|
||||
<span fxLayoutAlign="start center" class="ellipsis-parent part-row-span" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '20rem'}">
|
||||
<span fxLayoutAlign="start center" class="ellipsis-parent part-row-span" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : colWidth}">
|
||||
<span class="ellipsis-child">Fee Paid: {{part.feesPaid | number:'1.0-0'}} (Sats)</span>
|
||||
</span>
|
||||
</span>
|
||||
|
@ -4,9 +4,8 @@
|
||||
.mat-column-group_id, .mat-column-group_recipientNodeId,
|
||||
.mat-column-group_recipientNodeAlias, .mat-column-group_recipientAmount,
|
||||
.mat-column-group_description, .mat-column-group_paymentHash, .mat-column-group_paymentPreimage {
|
||||
padding-left: 2rem;
|
||||
flex: 1 1 12%;
|
||||
width: 12%;
|
||||
flex: 0 0 20%;
|
||||
width: 20%;
|
||||
& .ellipsis-parent {
|
||||
display: flex;
|
||||
}
|
||||
@ -31,13 +30,16 @@
|
||||
}
|
||||
}
|
||||
|
||||
.mat-column-group_firstPartTimestamp {
|
||||
.part-row-span:not(:first-of-type) {
|
||||
padding-left: 3rem;
|
||||
}
|
||||
}
|
||||
|
||||
.part-row-span {
|
||||
min-height: 4.2rem;
|
||||
place-content: center flex-start;
|
||||
align-items: center;
|
||||
&:not(:first-of-type) {
|
||||
padding-left: 3rem;
|
||||
}
|
||||
&.ellipsis-parent {
|
||||
display: flex;
|
||||
}
|
||||
|
@ -40,6 +40,7 @@ export class ECLLightningPaymentsComponent implements OnInit, AfterViewInit, OnD
|
||||
@ViewChild('sendPaymentForm', { static: false }) form;
|
||||
@ViewChild(MatSort, { static: false }) sort: MatSort | undefined;
|
||||
@ViewChild(MatPaginator, { static: false }) paginator: MatPaginator | undefined;
|
||||
public colWidth = '20rem';
|
||||
public PAGE_ID = 'transactions';
|
||||
public tableSetting: TableSetting = { tableId: 'payments', recordsPerPage: PAGE_SIZE, sortBy: 'firstPartTimestamp', sortOrder: SortOrderEnum.DESCENDING };
|
||||
public faHistory = faHistory;
|
||||
@ -93,6 +94,7 @@ export class ECLLightningPaymentsComponent implements OnInit, AfterViewInit, OnD
|
||||
this.partColumns = [];
|
||||
this.displayedColumns.map((col) => this.partColumns.push('group_' + col));
|
||||
this.pageSize = this.tableSetting.recordsPerPage ? +this.tableSetting.recordsPerPage : PAGE_SIZE;
|
||||
this.colWidth = this.displayedColumns.length ? ((this.commonService.getContainerSize().width / this.displayedColumns.length) / 10) + 'rem' : '20rem';
|
||||
this.logger.info(this.displayedColumns);
|
||||
});
|
||||
this.store.select(payments).pipe(takeUntil(this.unSubs[3])).
|
||||
@ -103,7 +105,7 @@ export class ECLLightningPaymentsComponent implements OnInit, AfterViewInit, OnD
|
||||
this.errorMessage = !this.apiCallStatus.message ? '' : (typeof (this.apiCallStatus.message) === 'object') ? JSON.stringify(this.apiCallStatus.message) : this.apiCallStatus.message;
|
||||
}
|
||||
this.paymentJSONArr = (paymentsSeletor.payments && paymentsSeletor.payments.sent && paymentsSeletor.payments.sent.length > 0) ? paymentsSeletor.payments.sent : [];
|
||||
if (this.paymentJSONArr.length > 0 && this.sort && this.paginator && this.displayedColumns.length > 0) {
|
||||
if (this.paymentJSONArr.length > 0 && this.sort && this.paginator && this.displayedColumns.length > 0) {
|
||||
this.loadPaymentsTable(this.paymentJSONArr);
|
||||
}
|
||||
this.logger.info(paymentsSeletor);
|
||||
|
@ -28,7 +28,11 @@
|
||||
<table mat-table #table fxFlex="100" [dataSource]="channels" matSort [ngClass]="{'overflow-auto error-border': errorMessage !== '','overflow-auto': true}">
|
||||
<ng-container matColumnDef="channel_point">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> Channel Point </th>
|
||||
<td mat-cell *matCellDef="let channel" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '28rem'}">{{channel?.channel_point}}</td>
|
||||
<td mat-cell *matCellDef="let channel">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '28rem'}">
|
||||
<span class="ellipsis-child">{{channel?.channel_point}}</span>
|
||||
</div>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="actions">
|
||||
<th mat-header-cell *matHeaderCellDef>
|
||||
|
@ -23,7 +23,11 @@
|
||||
<table mat-table #table [dataSource]="channels" matSort [ngClass]="{'overflow-auto error-border': flgLoading[0]==='error','overflow-auto': true}">
|
||||
<ng-container matColumnDef="channel_point">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> Channel Point </th>
|
||||
<td mat-cell *matCellDef="let channel" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '45rem'}">{{channel?.channel_point}}</td>
|
||||
<td mat-cell *matCellDef="let channel">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '45rem'}">
|
||||
<span class="ellipsis-child">{{channel?.channel_point}}</span>
|
||||
</div>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="actions">
|
||||
<th mat-header-cell *matHeaderCellDef>
|
||||
|
@ -32,15 +32,27 @@
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="pubkey_alias">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> Peer </th>
|
||||
<td mat-cell *matCellDef="let hop" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '20rem'}"> {{hop?.pubkey_alias}} </td>
|
||||
<td mat-cell *matCellDef="let hop">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '20rem'}">
|
||||
<span class="ellipsis-child">{{hop?.pubkey_alias}}</span>
|
||||
</div>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="pub_key">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> Peer Pubkey </th>
|
||||
<td mat-cell *matCellDef="let hop" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '20rem'}"> {{hop?.pub_key}} </td>
|
||||
<td mat-cell *matCellDef="let hop">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '20rem'}">
|
||||
<span class="ellipsis-child">{{hop?.pub_key}}</span>
|
||||
</div>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="chan_id">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> Channel </th>
|
||||
<td mat-cell *matCellDef="let hop" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '20rem'}"> {{hop?.chan_id}} </td>
|
||||
<td mat-cell *matCellDef="let hop">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '20rem'}">
|
||||
<span class="ellipsis-child">{{hop?.chan_id}}</span>
|
||||
</div>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="tlv_payload">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> TLV Payload </th>
|
||||
|
@ -14,15 +14,27 @@
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="label">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> Label </th>
|
||||
<td mat-cell *matCellDef="let transaction" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '20rem'}"> {{transaction?.label}} </td>
|
||||
<td mat-cell *matCellDef="let transaction">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '20rem'}">
|
||||
<span class="ellipsis-child">{{transaction?.label}}</span>
|
||||
</div>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="block_hash">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> Block Hash </th>
|
||||
<td mat-cell *matCellDef="let transaction" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '20rem'}"> {{transaction?.block_hash}} </td>
|
||||
<td mat-cell *matCellDef="let transaction">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '20rem'}">
|
||||
<span class="ellipsis-child">{{transaction?.block_hash}}</span>
|
||||
</div>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="tx_hash">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> Transaction Hash </th>
|
||||
<td mat-cell *matCellDef="let transaction" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '20rem'}"> {{transaction?.tx_hash}} </td>
|
||||
<td mat-cell *matCellDef="let transaction">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '20rem'}">
|
||||
<span class="ellipsis-child">{{transaction?.tx_hash}}</span>
|
||||
</div>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="amount">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header arrowPosition="before"> Amount (Sats) </th>
|
||||
|
@ -60,8 +60,8 @@ export class OnChainUTXOsComponent implements OnInit, OnChanges, OnDestroy {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.router.routeReuseStrategy.shouldReuseRoute = () => false;
|
||||
this.router.onSameUrlNavigation = 'reload';
|
||||
// this.router.routeReuseStrategy.shouldReuseRoute = () => false;
|
||||
// this.router.onSameUrlNavigation = 'reload';
|
||||
this.tableSetting.tableId = this.isDustUTXO ? 'dust_utxos' : 'utxos';
|
||||
this.store.select(lndPageSettings).pipe(takeUntil(this.unSubs[0])).
|
||||
subscribe((settings: { pageSettings: PageSettings[], apiCallStatus: ApiCallStatusPayload }) => {
|
||||
|
@ -15,11 +15,11 @@
|
||||
<span fxLayoutAlign="start center" class="htlc-row-span">
|
||||
Active HTLCs: {{channel?.pending_htlcs?.length}}
|
||||
</span>
|
||||
<span *ngIf="channel.is_expanded">
|
||||
<span *ngFor="let htlc of channel?.pending_htlcs; index as i" fxLayoutAlign="start center" class="htlc-row-span">
|
||||
<ng-container *ngIf="channel.is_expanded">
|
||||
<span *ngFor="let htlc of channel?.pending_htlcs; index as i" fxLayoutAlign="end center" class="htlc-row-span">
|
||||
{{htlc?.amount | number}}
|
||||
</span>
|
||||
</span>
|
||||
</ng-container>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="incoming">
|
||||
@ -84,10 +84,10 @@
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="hash_lock">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header arrowPosition="before" class="htlc-row-span">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header arrowPosition="before" class="pl-3 htlc-row-span">
|
||||
<span fxLayoutAlign="end center" class="htlc-row-span">Hash Lock</span>
|
||||
</th>
|
||||
<td mat-cell *matCellDef="let channel">
|
||||
<td mat-cell *matCellDef="let channel" class="pl-3">
|
||||
<span fxLayoutAlign="end center" class="htlc-row-span">{{' '}}</span>
|
||||
<span *ngIf="channel.is_expanded">
|
||||
<span *ngFor="let htlc of channel?.pending_htlcs" fxLayoutAlign="end center" class="htlc-row-span">
|
||||
@ -97,7 +97,7 @@
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="actions">
|
||||
<th mat-header-cell *matHeaderCellDef>
|
||||
<th mat-header-cell *matHeaderCellDef class="px-2">
|
||||
<div class="bordered-box table-actions-select" fxLayoutAlign="center center">
|
||||
<mat-select placeholder="Actions" tabindex="1" class="mr-0">
|
||||
<mat-select-trigger></mat-select-trigger>
|
||||
@ -105,7 +105,7 @@
|
||||
</mat-select>
|
||||
</div>
|
||||
</th>
|
||||
<td mat-cell *matCellDef="let channel">
|
||||
<td mat-cell *matCellDef="let channel" class="px-2">
|
||||
<span fxLayoutAlign="end center">
|
||||
<button mat-flat-button class="btn-htlc-expand" color="primary" type="button" tabindex="5" (click)="channel.is_expanded = !channel.is_expanded">{{channel.is_expanded ? 'Hide' : 'Show'}}</button>
|
||||
</span>
|
||||
|
@ -9,13 +9,17 @@
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.mat-column-amount {
|
||||
.htlc-row-span:not(:first-of-type) {
|
||||
padding-left: 3rem;
|
||||
padding-right: 2rem;
|
||||
}
|
||||
}
|
||||
|
||||
.htlc-row-span {
|
||||
min-height: 4.2rem;
|
||||
place-content: center flex-start;
|
||||
align-items: center;
|
||||
&:not(:first-of-type) {
|
||||
padding-left: 3rem;
|
||||
}
|
||||
}
|
||||
|
||||
.mat-column-actions {
|
||||
|
@ -19,27 +19,51 @@
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="remote_alias">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> Peer </th>
|
||||
<td mat-cell *matCellDef="let channel" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '20rem'}"> {{channel.remote_alias}} </td>
|
||||
<td mat-cell *matCellDef="let channel">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '20rem'}">
|
||||
<span class="ellipsis-child">{{channel?.remote_alias}}</span>
|
||||
</div>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="remote_pubkey">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> Pubkey </th>
|
||||
<td mat-cell *matCellDef="let channel" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '20rem'}"> {{channel.remote_pubkey}} </td>
|
||||
<td mat-cell *matCellDef="let channel">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '20rem'}">
|
||||
<span class="ellipsis-child">{{channel?.remote_pubkey}}</span>
|
||||
</div>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="channel_point">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> Channel Point </th>
|
||||
<td mat-cell *matCellDef="let channel" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '20rem'}"> {{channel.channel_point}} </td>
|
||||
<td mat-cell *matCellDef="let channel">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '20rem'}">
|
||||
<span class="ellipsis-child">{{channel?.channel_point}}</span>
|
||||
</div>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="chan_id">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> Channel Id </th>
|
||||
<td mat-cell *matCellDef="let channel" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '20rem'}"> {{channel.chan_id}} </td>
|
||||
<td mat-cell *matCellDef="let channel">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '20rem'}">
|
||||
<span class="ellipsis-child">{{channel?.chan_id}}</span>
|
||||
</div>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="closing_tx_hash">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> Closing Tx Hash </th>
|
||||
<td mat-cell *matCellDef="let channel" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '20rem'}"> {{channel.closing_tx_hash}} </td>
|
||||
<td mat-cell *matCellDef="let channel">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '20rem'}">
|
||||
<span class="ellipsis-child">{{channel?.closing_tx_hash}}</span>
|
||||
</div>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="chain_hash">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> Chain Hash </th>
|
||||
<td mat-cell *matCellDef="let channel" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '20rem'}"> {{channel.chain_hash}} </td>
|
||||
<td mat-cell *matCellDef="let channel">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '20rem'}">
|
||||
<span class="ellipsis-child">{{channel?.chain_hash}}</span>
|
||||
</div>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="open_initiator">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> Open Initiator </th>
|
||||
|
@ -17,15 +17,27 @@
|
||||
<table mat-table #table [dataSource]="peers" matSort [ngClass]="{'overflow-auto error-border': errorMessage !== '','overflow-auto': true}">
|
||||
<ng-container matColumnDef="alias">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> Alias </th>
|
||||
<td mat-cell *matCellDef="let peer" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '25rem'}"> {{peer?.alias}} </td>
|
||||
<td mat-cell *matCellDef="let peer">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '25rem'}">
|
||||
<span class="ellipsis-child">{{peer?.alias}}</span>
|
||||
</div>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="pub_key">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> Public Key </th>
|
||||
<td mat-cell *matCellDef="let peer" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '25rem'}"> {{peer?.pub_key}} </td>
|
||||
<td mat-cell *matCellDef="let peer">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '25rem'}">
|
||||
<span class="ellipsis-child">{{peer?.pub_key}}</span>
|
||||
</div>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="address">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> Address </th>
|
||||
<td mat-cell *matCellDef="let peer" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '25rem'}"> {{peer?.address}} </td>
|
||||
<td mat-cell *matCellDef="let peer">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '25rem'}">
|
||||
<span class="ellipsis-child">{{peer?.address}}</span>
|
||||
</div>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="sync_type">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> Sync Type </th>
|
||||
|
@ -15,19 +15,35 @@
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="alias_in">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>Inbound Alias</th>
|
||||
<td mat-cell *matCellDef="let fhEvent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '20rem'}">{{fhEvent.alias_in}}</td>
|
||||
<td mat-cell *matCellDef="let fhEvent">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '20rem'}">
|
||||
<span class="ellipsis-child">{{fhEvent?.alias_in}}</span>
|
||||
</div>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="chan_id_in">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>Inbound Channel</th>
|
||||
<td mat-cell *matCellDef="let fhEvent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '20rem'}">{{fhEvent.chan_id_in}}</td>
|
||||
<td mat-cell *matCellDef="let fhEvent">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '20rem'}">
|
||||
<span class="ellipsis-child">{{fhEvent?.chan_id_in}}</span>
|
||||
</div>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="alias_out">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>Outbound Alias</th>
|
||||
<td mat-cell *matCellDef="let fhEvent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '20rem'}">{{fhEvent.alias_out}}</td>
|
||||
<td mat-cell *matCellDef="let fhEvent">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '20rem'}">
|
||||
<span class="ellipsis-child">{{fhEvent?.alias_out}}</span>
|
||||
</div>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="chan_id_out">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>Outbound Channel</th>
|
||||
<td mat-cell *matCellDef="let fhEvent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '20rem'}">{{fhEvent.chan_id_out}}</td>
|
||||
<td mat-cell *matCellDef="let fhEvent">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '20rem'}">
|
||||
<span class="ellipsis-child">{{fhEvent?.chan_id_out}}</span>
|
||||
</div>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="amt_in">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header arrowPosition="before">Inbound Amount (Sats)</th>
|
||||
|
@ -12,19 +12,35 @@
|
||||
<table mat-table #table [dataSource]="NonRoutingPeers" matSort class="overflow-auto">
|
||||
<ng-container matColumnDef="chan_id">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>Channel ID</th>
|
||||
<td mat-cell *matCellDef="let nonRPeer" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '20rem'}">{{nonRPeer.chan_id}}</td>
|
||||
<td mat-cell *matCellDef="let nonRPeer">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '20rem'}">
|
||||
<span class="ellipsis-child">{{nonRPeer?.chan_id}}</span>
|
||||
</div>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="remote_alias">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>Peer Alias</th>
|
||||
<td mat-cell *matCellDef="let nonRPeer" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '20rem'}">{{nonRPeer.remote_alias}}</td>
|
||||
<td mat-cell *matCellDef="let nonRPeer">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '20rem'}">
|
||||
<span class="ellipsis-child">{{nonRPeer?.remote_alias}}</span>
|
||||
</div>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="remote_pubkey">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>Peer Pubkey</th>
|
||||
<td mat-cell *matCellDef="let nonRPeer" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '20rem'}">{{nonRPeer.remote_pubkey}}</td>
|
||||
<td mat-cell *matCellDef="let nonRPeer">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '20rem'}">
|
||||
<span class="ellipsis-child">{{nonRPeer?.remote_pubkey}}</span>
|
||||
</div>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="channel_point">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> Channel Point </th>
|
||||
<td mat-cell *matCellDef="let nonRPeer" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '20rem'}">{{nonRPeer.channel_point}}</td>
|
||||
<td mat-cell *matCellDef="let nonRPeer">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '20rem'}">
|
||||
<span class="ellipsis-child">{{nonRPeer?.channel_point}}</span>
|
||||
</div>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="uptime">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header arrowPosition="before">Uptime ({{timeUnit}})</th>
|
||||
|
@ -13,11 +13,19 @@
|
||||
<table mat-table #tableIn [dataSource]="RoutingPeersIncoming" matSort class="overflow-auto incoming-table">
|
||||
<ng-container matColumnDef="chan_id">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>Channel ID</th>
|
||||
<td mat-cell *matCellDef="let rPeer" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '28rem'}">{{rPeer.chan_id}}</td>
|
||||
<td mat-cell *matCellDef="let rPeer">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '28rem'}">
|
||||
<span class="ellipsis-child">{{rPeer?.chan_id}}</span>
|
||||
</div>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="alias">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>Peer Alias</th>
|
||||
<td mat-cell *matCellDef="let rPeer" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '28rem'}">{{rPeer.alias}}</td>
|
||||
<td mat-cell *matCellDef="let rPeer">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '28rem'}">
|
||||
<span class="ellipsis-child">{{rPeer?.alias}}</span>
|
||||
</div>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="events">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header arrowPosition="before">Events</th>
|
||||
@ -62,11 +70,19 @@
|
||||
<table mat-table #tableOut [dataSource]="RoutingPeersOutgoing" matSort class="overflow-auto outgoing-table">
|
||||
<ng-container matColumnDef="chan_id">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>Channel ID</th>
|
||||
<td mat-cell *matCellDef="let rPeer" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '28rem'}">{{rPeer.chan_id}}</td>
|
||||
<td mat-cell *matCellDef="let rPeer">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '28rem'}">
|
||||
<span class="ellipsis-child">{{rPeer?.chan_id}}</span>
|
||||
</div>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="alias">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>Peer Alias</th>
|
||||
<td mat-cell *matCellDef="let rPeer" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '28rem'}">{{rPeer.alias}}</td>
|
||||
<td mat-cell *matCellDef="let rPeer">
|
||||
<div class="ellipsis-parent" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '28rem'}">
|
||||
<span class="ellipsis-child">{{rPeer?.alias}}</span>
|
||||
</div>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="events">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header arrowPosition="before">Events</th>
|
||||
|
@ -226,7 +226,7 @@ export const LNDReducer = createReducer(initLNDState,
|
||||
on(setPageSettings, (state, { payload }) => {
|
||||
const newPageSettings: PageSettings[] = [];
|
||||
LND_DEFAULT_PAGE_SETTINGS.forEach((defaultPage) => {
|
||||
const pageSetting = payload && Object.keys(payload).length > 0 ? payload.find((p) => p.pageId === defaultPage.pageId) : null;
|
||||
const pageSetting = payload && payload.length && payload.length > 0 ? payload.find((p) => p.pageId === defaultPage.pageId) : null;
|
||||
if (pageSetting) {
|
||||
const tablesSettings = JSON.parse(JSON.stringify(pageSetting.tables));
|
||||
pageSetting.tables = []; // To maintain settings order
|
||||
|
@ -30,13 +30,16 @@
|
||||
}
|
||||
}
|
||||
|
||||
.mat-column-group_status, .mat-column-group_creation_date {
|
||||
.htlc-row-span:not(:first-of-type) {
|
||||
padding-left: 3rem;
|
||||
}
|
||||
}
|
||||
|
||||
.htlc-row-span {
|
||||
min-height: 4.2rem;
|
||||
place-content: center flex-start;
|
||||
align-items: center;
|
||||
&:not(:first-of-type) {
|
||||
padding-left: 3rem;
|
||||
}
|
||||
&.ellipsis-parent {
|
||||
display: flex;
|
||||
}
|
||||
|
@ -169,7 +169,7 @@ export class PageSettingsComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
|
||||
onUpdatePageSettings(): boolean | void {
|
||||
if (this.pageSettings.reduce((pacc, page) => pacc || (page.tables.reduce((acc, table) => !(table.recordsPerPage && table.sortBy && table.sortOrder && table.columnSelection && table.columnSelection.length >= 2), false)), false)) {
|
||||
if (this.pageSettings.reduce((pacc, page) => (pacc || (page.tables.reduce((acc, table) => !(table.recordsPerPage && table.sortBy && table.sortOrder && table.columnSelection && table.columnSelection.length >= 2), false))), false)) {
|
||||
return true;
|
||||
}
|
||||
this.errorMessage = '';
|
||||
|
@ -748,9 +748,9 @@ export const CLN_DEFAULT_PAGE_SETTINGS: PageSettings[] = [
|
||||
columnSelection: ['alias', 'channel', 'direction', 'delay', 'msatoshi'] }
|
||||
] },
|
||||
{ pageId: 'peerswap', tables: [
|
||||
{ tableId: 'swaps', recordsPerPage: PAGE_SIZE, sortBy: '', sortOrder: SortOrderEnum.DESCENDING,
|
||||
columnSelectionSM: [],
|
||||
columnSelection: [] }
|
||||
{ tableId: 'swaps', recordsPerPage: PAGE_SIZE, sortBy: 'created_at', sortOrder: SortOrderEnum.DESCENDING,
|
||||
columnSelectionSM: ['id', 'state', 'amount'],
|
||||
columnSelection: ['id', 'alias', 'short_channel_id', 'created_at', 'state', 'amount'] }
|
||||
] }
|
||||
];
|
||||
|
||||
@ -839,8 +839,8 @@ export const CLN_TABLES_DEF = {
|
||||
},
|
||||
peerswap: {
|
||||
swaps: {
|
||||
maxColumns: 5,
|
||||
allowedColumns: []
|
||||
maxColumns: 6,
|
||||
allowedColumns: ['id', 'alias', 'short_channel_id', 'created_at', 'state', 'amount']
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user