Merge branch 'master' into unfurler-optional-puppeteer
This commit is contained in:
commit
034b7fb516
@ -61,7 +61,7 @@
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@media (min-width: 991px) {
|
@media (min-width: 991px) {
|
||||||
position: relative;
|
position: relative;
|
||||||
top: -65px;
|
top: -100px;
|
||||||
}
|
}
|
||||||
@media (min-width: 830px) and (max-width: 991px) {
|
@media (min-width: 830px) and (max-width: 991px) {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
@ -61,7 +61,7 @@
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@media (min-width: 991px) {
|
@media (min-width: 991px) {
|
||||||
position: relative;
|
position: relative;
|
||||||
top: -65px;
|
top: -100px;
|
||||||
}
|
}
|
||||||
@media (min-width: 830px) and (max-width: 991px) {
|
@media (min-width: 830px) and (max-width: 991px) {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
@ -61,7 +61,7 @@
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@media (min-width: 991px) {
|
@media (min-width: 991px) {
|
||||||
position: relative;
|
position: relative;
|
||||||
top: -65px;
|
top: -100px;
|
||||||
}
|
}
|
||||||
@media (min-width: 830px) and (max-width: 991px) {
|
@media (min-width: 830px) and (max-width: 991px) {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
@ -61,7 +61,7 @@
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@media (min-width: 991px) {
|
@media (min-width: 991px) {
|
||||||
position: relative;
|
position: relative;
|
||||||
top: -65px;
|
top: -100px;
|
||||||
}
|
}
|
||||||
@media (min-width: 830px) and (max-width: 991px) {
|
@media (min-width: 830px) and (max-width: 991px) {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
@ -61,7 +61,7 @@
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@media (min-width: 1130px) {
|
@media (min-width: 1130px) {
|
||||||
position: relative;
|
position: relative;
|
||||||
top: -65px;
|
top: -100px;
|
||||||
}
|
}
|
||||||
@media (min-width: 830px) and (max-width: 1130px) {
|
@media (min-width: 830px) and (max-width: 1130px) {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
@ -61,7 +61,7 @@
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@media (min-width: 991px) {
|
@media (min-width: 991px) {
|
||||||
position: relative;
|
position: relative;
|
||||||
top: -65px;
|
top: -100px;
|
||||||
}
|
}
|
||||||
@media (min-width: 830px) and (max-width: 991px) {
|
@media (min-width: 830px) and (max-width: 991px) {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
@ -55,7 +55,7 @@
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@media (min-width: 991px) {
|
@media (min-width: 991px) {
|
||||||
position: relative;
|
position: relative;
|
||||||
top: -65px;
|
top: -100px;
|
||||||
}
|
}
|
||||||
@media (min-width: 830px) and (max-width: 991px) {
|
@media (min-width: 830px) and (max-width: 991px) {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@media (min-width: 991px) {
|
@media (min-width: 991px) {
|
||||||
position: relative;
|
position: relative;
|
||||||
top: -65px;
|
top: -100px;
|
||||||
}
|
}
|
||||||
@media (min-width: 830px) and (max-width: 991px) {
|
@media (min-width: 830px) and (max-width: 991px) {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<form [formGroup]="radioGroupForm" class="formRadioGroup"
|
<form [formGroup]="radioGroupForm" class="formRadioGroup"
|
||||||
[class]="stateService.env.MINING_DASHBOARD ? 'mining' : ''" (click)="saveGraphPreference()">
|
[class]="(stateService.env.MINING_DASHBOARD || stateService.env.LIGHTNING) ? 'mining' : 'no-menu'" (click)="saveGraphPreference()">
|
||||||
<div *ngIf="!isMobile()" class="btn-group btn-group-toggle">
|
<div *ngIf="!isMobile()" class="btn-group btn-group-toggle">
|
||||||
<label ngbButtonLabel class="btn-primary btn-sm mr-2">
|
<label ngbButtonLabel class="btn-primary btn-sm mr-2">
|
||||||
<a [routerLink]="['/tv' | relativeUrl]" style="color: white" id="btn-tv">
|
<a [routerLink]="['/tv' | relativeUrl]" style="color: white" id="btn-tv">
|
||||||
|
@ -55,13 +55,19 @@
|
|||||||
.formRadioGroup.mining {
|
.formRadioGroup.mining {
|
||||||
@media (min-width: 991px) {
|
@media (min-width: 991px) {
|
||||||
position: relative;
|
position: relative;
|
||||||
top: -65px;
|
top: -100px;
|
||||||
}
|
}
|
||||||
@media (min-width: 830px) and (max-width: 991px) {
|
@media (min-width: 830px) and (max-width: 991px) {
|
||||||
position: relative;
|
position: relative;
|
||||||
top: 0px;
|
top: 0px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.formRadioGroup.no-menu {
|
||||||
|
@media (min-width: 991px) {
|
||||||
|
position: relative;
|
||||||
|
top: -33px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.loading{
|
.loading{
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<table class="table table-borderless" *ngIf="response.channels.length > 0">
|
<table class="table table-borderless" *ngIf="response.channels.length > 0" [style]="isLoading ? 'opacity: 0.75' : ''">
|
||||||
<ng-container *ngTemplateOutlet="tableHeader"></ng-container>
|
<ng-container *ngTemplateOutlet="tableHeader"></ng-container>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr *ngFor="let channel of response.channels; let i = index;">
|
<tr *ngFor="let channel of response.channels; let i = index;">
|
||||||
|
@ -14,6 +14,7 @@ import { LightningApiService } from '../lightning-api.service';
|
|||||||
export class ChannelsListComponent implements OnInit, OnChanges {
|
export class ChannelsListComponent implements OnInit, OnChanges {
|
||||||
@Input() publicKey: string;
|
@Input() publicKey: string;
|
||||||
@Output() channelsStatusChangedEvent = new EventEmitter<string>();
|
@Output() channelsStatusChangedEvent = new EventEmitter<string>();
|
||||||
|
@Output() loadingEvent = new EventEmitter<boolean>(false);
|
||||||
channels$: Observable<any>;
|
channels$: Observable<any>;
|
||||||
|
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
@ -26,6 +27,7 @@ export class ChannelsListComponent implements OnInit, OnChanges {
|
|||||||
defaultStatus = 'open';
|
defaultStatus = 'open';
|
||||||
status = 'open';
|
status = 'open';
|
||||||
publicKeySize = 25;
|
publicKeySize = 25;
|
||||||
|
isLoading = false;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private lightningApiService: LightningApiService,
|
private lightningApiService: LightningApiService,
|
||||||
@ -56,6 +58,8 @@ export class ChannelsListComponent implements OnInit, OnChanges {
|
|||||||
)
|
)
|
||||||
.pipe(
|
.pipe(
|
||||||
tap((val) => {
|
tap((val) => {
|
||||||
|
this.isLoading = true;
|
||||||
|
this.loadingEvent.emit(true);
|
||||||
if (typeof val === 'string') {
|
if (typeof val === 'string') {
|
||||||
this.status = val;
|
this.status = val;
|
||||||
this.page = 1;
|
this.page = 1;
|
||||||
@ -64,10 +68,12 @@ export class ChannelsListComponent implements OnInit, OnChanges {
|
|||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
switchMap(() => {
|
switchMap(() => {
|
||||||
this.channelsStatusChangedEvent.emit(this.status);
|
this.channelsStatusChangedEvent.emit(this.status);
|
||||||
return this.lightningApiService.getChannelsByNodeId$(this.publicKey, (this.page - 1) * this.itemsPerPage, this.status);
|
return this.lightningApiService.getChannelsByNodeId$(this.publicKey, (this.page - 1) * this.itemsPerPage, this.status);
|
||||||
}),
|
}),
|
||||||
map((response) => {
|
map((response) => {
|
||||||
|
this.isLoading = false;
|
||||||
|
this.loadingEvent.emit(false);
|
||||||
return {
|
return {
|
||||||
channels: response.body,
|
channels: response.body,
|
||||||
totalItems: parseInt(response.headers.get('x-total-count'), 10)
|
totalItems: parseInt(response.headers.get('x-total-count'), 10)
|
||||||
|
@ -133,7 +133,7 @@
|
|||||||
|
|
||||||
<app-node-channels style="display:block;margin-bottom: 40px" [publicKey]="node.public_key"></app-node-channels>
|
<app-node-channels style="display:block;margin-bottom: 40px" [publicKey]="node.public_key"></app-node-channels>
|
||||||
|
|
||||||
<div class="d-flex justify-content-between">
|
<div class="d-flex">
|
||||||
<h2 *ngIf="channelsListStatus === 'open'">
|
<h2 *ngIf="channelsListStatus === 'open'">
|
||||||
<span i18n="lightning.open-channels">Open channels</span>
|
<span i18n="lightning.open-channels">Open channels</span>
|
||||||
<span> ({{ node.opened_channel_count }})</span>
|
<span> ({{ node.opened_channel_count }})</span>
|
||||||
@ -142,10 +142,13 @@
|
|||||||
<span i18n="lightning.open-channels">Closed channels</span>
|
<span i18n="lightning.open-channels">Closed channels</span>
|
||||||
<span> ({{ node.closed_channel_count }})</span>
|
<span> ({{ node.closed_channel_count }})</span>
|
||||||
</h2>
|
</h2>
|
||||||
|
<div *ngIf="channelListLoading" class="spinner-border ml-3" role="status"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<app-channels-list [publicKey]="node.public_key"
|
<app-channels-list [publicKey]="node.public_key"
|
||||||
(channelsStatusChangedEvent)="onChannelsListStatusChanged($event)"></app-channels-list>
|
(channelsStatusChangedEvent)="onChannelsListStatusChanged($event)"
|
||||||
|
(loadingEvent)="onLoadingEvent($event)"
|
||||||
|
></app-channels-list>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -57,3 +57,16 @@ app-fiat {
|
|||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.spinner-border {
|
||||||
|
@media (min-width: 768px) {
|
||||||
|
margin-top: 6.5px;
|
||||||
|
width: 1.75rem;
|
||||||
|
height: 1.75rem;
|
||||||
|
}
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
margin-top: 2.3px;
|
||||||
|
width: 1.5rem;
|
||||||
|
height: 1.5rem;
|
||||||
|
}
|
||||||
|
}
|
@ -22,7 +22,7 @@ export class NodeComponent implements OnInit {
|
|||||||
channelsListStatus: string;
|
channelsListStatus: string;
|
||||||
error: Error;
|
error: Error;
|
||||||
publicKey: string;
|
publicKey: string;
|
||||||
|
channelListLoading = false;
|
||||||
publicKeySize = 99;
|
publicKeySize = 99;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
@ -97,4 +97,8 @@ export class NodeComponent implements OnInit {
|
|||||||
onChannelsListStatusChanged(e) {
|
onChannelsListStatusChanged(e) {
|
||||||
this.channelsListStatus = e;
|
this.channelsListStatus = e;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onLoadingEvent(e) {
|
||||||
|
this.channelListLoading = e;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -44,13 +44,13 @@ export class NodeChannels implements OnChanges {
|
|||||||
switchMap((response) => {
|
switchMap((response) => {
|
||||||
this.isLoading = true;
|
this.isLoading = true;
|
||||||
if ((response.body?.length ?? 0) <= 0) {
|
if ((response.body?.length ?? 0) <= 0) {
|
||||||
return [];
|
this.isLoading = false;
|
||||||
|
return [''];
|
||||||
}
|
}
|
||||||
return [response.body];
|
return [response.body];
|
||||||
}),
|
}),
|
||||||
tap((body: any[]) => {
|
tap((body: any[]) => {
|
||||||
if (body.length === 0) {
|
if (body.length === 0 || body[0].length === 0) {
|
||||||
this.isLoading = false;
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const biggestCapacity = body[0].capacity;
|
const biggestCapacity = body[0].capacity;
|
||||||
|
@ -60,7 +60,7 @@
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@media (min-width: 991px) {
|
@media (min-width: 991px) {
|
||||||
position: relative;
|
position: relative;
|
||||||
top: -65px;
|
top: -100px;
|
||||||
}
|
}
|
||||||
@media (min-width: 830px) and (max-width: 991px) {
|
@media (min-width: 830px) and (max-width: 991px) {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@media (min-width: 991px) {
|
@media (min-width: 991px) {
|
||||||
position: relative;
|
position: relative;
|
||||||
top: -65px;
|
top: -100px;
|
||||||
}
|
}
|
||||||
@media (min-width: 830px) and (max-width: 991px) {
|
@media (min-width: 830px) and (max-width: 991px) {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
@ -60,7 +60,7 @@
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@media (min-width: 991px) {
|
@media (min-width: 991px) {
|
||||||
position: relative;
|
position: relative;
|
||||||
top: -65px;
|
top: -100px;
|
||||||
}
|
}
|
||||||
@media (min-width: 830px) and (max-width: 991px) {
|
@media (min-width: 830px) and (max-width: 991px) {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
@ -145,7 +145,7 @@ for repo in $backend_repos;do
|
|||||||
done
|
done
|
||||||
|
|
||||||
# build unfurlers
|
# build unfurlers
|
||||||
for repo in mainnet liquid;do
|
for repo in mainnet liquid bisq;do
|
||||||
build_unfurler "${repo}"
|
build_unfurler "${repo}"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -9,18 +9,20 @@ for site in mainnet mainnet-lightning testnet testnet-lightning signet signet-li
|
|||||||
screen -dmS "${site}" sh -c 'while true;do npm run start-production;sleep 1;done'
|
screen -dmS "${site}" sh -c 'while true;do npm run start-production;sleep 1;done'
|
||||||
done
|
done
|
||||||
|
|
||||||
# only start unfurler if GPU present
|
# only start xorg if GPU present
|
||||||
if pciconf -lv|grep -i nvidia >/dev/null 2>&1;then
|
if pciconf -lv|grep -i nvidia >/dev/null 2>&1;then
|
||||||
export DISPLAY=:0
|
export DISPLAY=:0
|
||||||
screen -dmS x startx
|
screen -dmS x startx
|
||||||
sleep 3
|
sleep 3
|
||||||
for site in mainnet liquid;do
|
|
||||||
cd "$HOME/${site}/unfurler" && \
|
|
||||||
echo "starting mempool unfurler: ${site}" && \
|
|
||||||
screen -dmS "unfurler-${site}" sh -c 'while true;do npm run unfurler;sleep 2;done'
|
|
||||||
done
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# start unfurlers for each frontend
|
||||||
|
for site in mainnet liquid bisq;do
|
||||||
|
cd "$HOME/${site}/unfurler" && \
|
||||||
|
echo "starting mempool unfurler: ${site}" && \
|
||||||
|
screen -dmS "unfurler-${site}" sh -c 'while true;do npm run unfurler;sleep 2;done'
|
||||||
|
done
|
||||||
|
|
||||||
# start nginx warm cacher
|
# start nginx warm cacher
|
||||||
for site in mainnet;do
|
for site in mainnet;do
|
||||||
echo "starting mempool cache warmer: ${site}"
|
echo "starting mempool cache warmer: ${site}"
|
||||||
|
17
production/unfurler-config.bisq.json
Normal file
17
production/unfurler-config.bisq.json
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
"SERVER": {
|
||||||
|
"HOST": "https://bisq.fra.mempool.space",
|
||||||
|
"HTTP_PORT": 8002
|
||||||
|
},
|
||||||
|
"MEMPOOL": {
|
||||||
|
"HTTP_HOST": "http://127.0.0.1",
|
||||||
|
"HTTP_PORT": 82,
|
||||||
|
"NETWORK": "bisq"
|
||||||
|
},
|
||||||
|
"PUPPETEER": {
|
||||||
|
"CLUSTER_SIZE": 8,
|
||||||
|
"EXEC_PATH": "/usr/local/bin/chrome",
|
||||||
|
"MAX_PAGE_AGE": 86400,
|
||||||
|
"RENDER_TIMEOUT": 3000
|
||||||
|
}
|
||||||
|
}
|
@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"SERVER": {
|
"SERVER": {
|
||||||
"HOST": "https://liquid.network",
|
"HOST": "https://liquid.fra.mempool.space",
|
||||||
"HTTP_PORT": 8002
|
"HTTP_PORT": 8003
|
||||||
},
|
},
|
||||||
"MEMPOOL": {
|
"MEMPOOL": {
|
||||||
"HTTP_HOST": "https://liquid.network",
|
"HTTP_HOST": "http://127.0.0.1",
|
||||||
"HTTP_PORT": 443,
|
"HTTP_PORT": 83,
|
||||||
"NETWORK": "liquid"
|
"NETWORK": "bitcoin"
|
||||||
},
|
},
|
||||||
"PUPPETEER": {
|
"PUPPETEER": {
|
||||||
"CLUSTER_SIZE": 8,
|
"CLUSTER_SIZE": 8,
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
{
|
{
|
||||||
"SERVER": {
|
"SERVER": {
|
||||||
"HOST": "https://mempool.space",
|
"HOST": "https://mempool.fra.mempool.space",
|
||||||
"HTTP_PORT": 8001
|
"HTTP_PORT": 8001
|
||||||
},
|
},
|
||||||
"MEMPOOL": {
|
"MEMPOOL": {
|
||||||
"HTTP_HOST": "https://mempool.space",
|
"HTTP_HOST": "http://127.0.0.1",
|
||||||
"HTTP_PORT": 443,
|
"HTTP_PORT": 81,
|
||||||
"NETWORK": "bitcoin"
|
"NETWORK": "bitcoin"
|
||||||
},
|
},
|
||||||
"PUPPETEER": {
|
"PUPPETEER": {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user