Fix input number min value

This commit is contained in:
everoddandeven 2024-10-09 15:03:25 +02:00
parent e536a2e2b3
commit 125b43f396
3 changed files with 22 additions and 24 deletions

View file

@ -247,7 +247,7 @@
<div *ngIf="!getBlockByHash" class="col-sm-3">
<label for="get-block-height" class="form-label">Block height</label>
<input type="number" class="form-control" id="get-block-height" placeholder="" [(ngModel)]="getBlockHeight" [ngModelOptions]="{standalone: true}" [disabled]="getBlockByHash">
<input type="number" min="0" class="form-control" id="get-block-height" placeholder="" [(ngModel)]="getBlockHeight" [ngModelOptions]="{standalone: true}" [disabled]="getBlockByHash">
<small class="text-body-secondary">Block height</small>
</div>
</div>
@ -377,7 +377,7 @@
<div *ngIf="!getBlockHeaderByHash" class="col-sm-3">
<label for="get-block-header-height" class="form-label">Block header height</label>
<input type="number" class="form-control" id="get-block-header-height" placeholder="" [(ngModel)]="getBlockHeaderHeight" [ngModelOptions]="{standalone: true}" [disabled]="getBlockHeaderByHash">
<input type="number" min="0" class="form-control" id="get-block-header-height" placeholder="" [(ngModel)]="getBlockHeaderHeight" [ngModelOptions]="{standalone: true}" [disabled]="getBlockHeaderByHash">
<small class="text-body-secondary">Block header height</small>
</div>
</div>
@ -489,8 +489,6 @@
</div>
</div>
<app-daemon-not-running></app-daemon-not-running>
<app-daemon-stopping></app-daemon-stopping>

View file

@ -104,7 +104,7 @@
<div class="col-sm-3">
<label for="start-mining-threads-count" class="form-label">Threads Count</label>
<input type="number" class="form-control" id="start-mining-threads-count" placeholder="" [(ngModel)]="startMiningThreadsCount" [ngModelOptions]="{standalone: true}">
<input type="number" min="0" class="form-control" id="start-mining-threads-count" placeholder="" [(ngModel)]="startMiningThreadsCount" [ngModelOptions]="{standalone: true}">
<small class="text-body-secondary">Number of mining thread to run</small>
</div>
@ -205,7 +205,7 @@
<div class="col-sm-3">
<label for="get-block-header-reserve-size" class="form-label">Reserve size</label>
<input type="number" class="form-control" min="0" id="get-block-header-reserve-size" placeholder="" [(ngModel)]="getBlockTemplateReserveSize" [ngModelOptions]="{standalone: true}">
<input type="number" min="0" class="form-control" id="get-block-header-reserve-size" placeholder="" [(ngModel)]="getBlockTemplateReserveSize" [ngModelOptions]="{standalone: true}">
</div>
</div>
</div>
@ -237,13 +237,13 @@
<h4 class="mb-3">Calculate PoW hash for a block candidate</h4>
<div class="col-sm-6">
<label for="calc-pow-major-version" class="form-label">Major version</label>
<input type="number" class="form-control" min="0" id="calc-pow-major-version" placeholder="" [(ngModel)]="calcPowMajorVersion" [ngModelOptions]="{standalone: true}">
<input type="number" min="0" class="form-control" min="0" id="calc-pow-major-version" placeholder="" [(ngModel)]="calcPowMajorVersion" [ngModelOptions]="{standalone: true}">
<small class="text-body-secondary">The major version of the monero protocol at this block height</small>
</div>
<div class="col-sm-6">
<label for="calc-pow-height" class="form-label">Height</label>
<input type="number" class="form-control" min="0" id="calc-pow-height" placeholder="" [(ngModel)]="calcPowHeight" [ngModelOptions]="{standalone: true}">
<input type="number" min="0" class="form-control" min="0" id="calc-pow-height" placeholder="" [(ngModel)]="calcPowHeight" [ngModelOptions]="{standalone: true}">
</div>
<div class="col-sm-12">
@ -432,13 +432,13 @@
<h4 class="mb-3">Generate a block and specify the address to receive the coinbase reward</h4>
<div class="col-sm-6">
<label for="generate-blocks-starting-nonce" class="form-label">Starting Nonce</label>
<input type="number" class="form-control" min="0" id="generate-blocks-starting-nonce" placeholder="" [(ngModel)]="generateStartingNonce" [ngModelOptions]="{standalone: true}">
<input type="number" min="0" class="form-control" min="0" id="generate-blocks-starting-nonce" placeholder="" [(ngModel)]="generateStartingNonce" [ngModelOptions]="{standalone: true}">
<small class="text-body-secondary">Increased by miner until it finds a matching result that solves a block</small>
</div>
<div class="col-sm-6">
<label for="generate-blocks-amount-of-blocks" class="form-label">Amount of blocks</label>
<input type="number" class="form-control" min="0" id="generate-blocks-amount-of-blocks" placeholder="" [(ngModel)]="generateBlocksAmountOfBlocks" [ngModelOptions]="{standalone: true}">
<input type="number" min="0" class="form-control" min="0" id="generate-blocks-amount-of-blocks" placeholder="" [(ngModel)]="generateBlocksAmountOfBlocks" [ngModelOptions]="{standalone: true}">
<small class="text-body-secondary">Number of blocks to be generated</small>
</div>

View file

@ -94,7 +94,7 @@
<div class="col-md-6">
<label for="rpc-bind-port" class="form-label">Bind port</label>
<input type="number" class="form-control" id="rpc-bind-port" placeholder="18081" [(ngModel)]="currentSettings.rpcBindPort" [ngModelOptions]="{standalone: true}">
<input type="number" min="0" class="form-control" id="rpc-bind-port" placeholder="18081" [(ngModel)]="currentSettings.rpcBindPort" [ngModelOptions]="{standalone: true}">
<small class="text-body-secondary">18081 for mainnet, 28081 for testnet, 38081 for stagenet</small>
</div>
@ -163,7 +163,7 @@
<div class="col-md-6">
<label for="zmq-rpc-bind-port" class="form-label">Bind port</label>
<input type="number" class="form-control" id="zmq-rpc-bind-port" placeholder="18082" [(ngModel)]="currentSettings.zmqRpcBindPort" [ngModelOptions]="{standalone: true}">
<input type="number" min="0" class="form-control" id="zmq-rpc-bind-port" placeholder="18082" [(ngModel)]="currentSettings.zmqRpcBindPort" [ngModelOptions]="{standalone: true}">
<small class="text-body-secondary">18082 for mainnet, 28082 for testnet, 38082 for stagenet</small>
</div>
@ -188,13 +188,13 @@
<div class="col-md-6">
<label for="rpc-payment-difficulty" class="form-label">Difficulty</label>
<input type="number" class="form-control" id="rpc-payment-difficulty" placeholder="1000" [(ngModel)]="currentSettings.rpcPaymentDifficuly" [ngModelOptions]="{standalone: true}">
<input type="number" min="0" class="form-control" id="rpc-payment-difficulty" placeholder="1000" [(ngModel)]="currentSettings.rpcPaymentDifficuly" [ngModelOptions]="{standalone: true}">
<small class="text-body-secondary">Restrict RPC to clients sending micropayment at this difficulty</small>
</div>
<div class="col-md-6">
<label for="rpc-payment-credits" class="form-label">Credits</label>
<input type="number" class="form-control" id="rpc-payment-credits" placeholder="100" [(ngModel)]="currentSettings.rpcPaymentCredits" [ngModelOptions]="{standalone: true}">
<input type="number" min="0" class="form-control" id="rpc-payment-credits" placeholder="100" [(ngModel)]="currentSettings.rpcPaymentCredits" [ngModelOptions]="{standalone: true}">
<small class="text-body-secondary">Restrict RPC to clients sending micropayment, yelds that many credits per payment</small>
</div>
@ -288,13 +288,13 @@
<div class="col-md-6">
<label for="p2p-bind-port" class="form-label">Bind port</label>
<input type="number" class="form-control" id="p2p-bind-port" placeholder="18080" [(ngModel)]="currentSettings.p2pBindPort" [ngModelOptions]="{standalone: true}">
<input type="number" min="0" class="form-control" id="p2p-bind-port" placeholder="18080" [(ngModel)]="currentSettings.p2pBindPort" [ngModelOptions]="{standalone: true}">
<small class="text-body-secondary">18080 for mainnet, 28080 for testnet, 38080 for stagenet</small>
</div>
<div class="col-md-6">
<label for="p2p-external-port" class="form-label">External port</label>
<input type="number" class="form-control" id="p2p-external-port" placeholder="18080" [(ngModel)]="currentSettings.p2pExternalPort" [ngModelOptions]="{standalone: true}">
<input type="number" min="0" class="form-control" id="p2p-external-port" placeholder="18080" [(ngModel)]="currentSettings.p2pExternalPort" [ngModelOptions]="{standalone: true}">
<small class="text-body-secondary">External port for p2p network protocol (if port forwarding used with NAT)</small>
</div>
@ -311,7 +311,7 @@
<div class="col-md-6">
<label for="p2p-bind-port-ipv6" class="form-label">Bind IPv6 port</label>
<input type="number" class="form-control" id="p2p-bind-port-ipv6" placeholder="18080" [(ngModel)]="currentSettings.p2pBindPortIpv6" [ngModelOptions]="{standalone: true}">
<input type="number" min="0" class="form-control" id="p2p-bind-port-ipv6" placeholder="18080" [(ngModel)]="currentSettings.p2pBindPortIpv6" [ngModelOptions]="{standalone: true}">
<small class="text-body-secondary">18080 for mainnet, 28080 for testnet, 38080 for stagenet</small>
</div>
@ -406,12 +406,12 @@
<div class="col-md-4">
<label for="block-sync-size" class="form-label">Block sync size</label>
<input type="number" class="form-control" id="block-sync-size" placeholder="" [(ngModel)]="currentSettings.blockSyncSize" [ngModelOptions]="{standalone: true}">
<input type="number" min="0" class="form-control" id="block-sync-size" placeholder="" [(ngModel)]="currentSettings.blockSyncSize" [ngModelOptions]="{standalone: true}">
</div>
<div class="col-md-4">
<label for="block-download-max-size" class="form-label">Block download max size</label>
<input type="number" class="form-control" id="block-download-max-size" placeholder="" [(ngModel)]="currentSettings.blockDownloadMaxSize" [ngModelOptions]="{standalone: true}">
<input type="number" min="0" class="form-control" id="block-download-max-size" placeholder="" [(ngModel)]="currentSettings.blockDownloadMaxSize" [ngModelOptions]="{standalone: true}">
</div>
<div class="col-md-4">
@ -470,19 +470,19 @@
<div class="col-md-4">
<label for="bg-mining-min-idle-interval" class="form-label">Minimum idle interval</label>
<input type="number" class="form-control" id="bg-mining-min-idle-interval" placeholder="" [(ngModel)]="currentSettings.bgMiningMinIdleInterval" [ngModelOptions]="{standalone: true}">
<input type="number" min="0" class="form-control" id="bg-mining-min-idle-interval" placeholder="" [(ngModel)]="currentSettings.bgMiningMinIdleInterval" [ngModelOptions]="{standalone: true}">
<small class="text-body-secondary">Specify min lookback interval in seconds for determining idle state</small>
</div>
<div class="col-md-4">
<label for="bg-mining-idle-threshold" class="form-label">Idle threshold</label>
<input type="number" class="form-control" id="bg-mining-idle-threshold" placeholder="" [(ngModel)]="currentSettings.bgMiningIdleThreshold" [ngModelOptions]="{standalone: true}">
<input type="number" min="0" class="form-control" id="bg-mining-idle-threshold" placeholder="" [(ngModel)]="currentSettings.bgMiningIdleThreshold" [ngModelOptions]="{standalone: true}">
<small class="text-body-secondary">Specify minimum avg idle percentage over lookback interval</small>
</div>
<div class="col-md-4">
<label for="bg-mining-miner-target" class="form-label">Miner target</label>
<input type="number" class="form-control" id="bg-mining-miner-target" placeholder="" [(ngModel)]="currentSettings.bgMiningMinerTarget" [ngModelOptions]="{standalone: true}">
<input type="number" min="0" class="form-control" id="bg-mining-miner-target" placeholder="" [(ngModel)]="currentSettings.bgMiningMinerTarget" [ngModelOptions]="{standalone: true}">
<small class="text-body-secondary">Specify maximum percentage cpu use by miners</small>
</div>
@ -514,13 +514,13 @@
<div class="col-md-4">
<label for="max-log-file-size" class="form-label">Max log file size</label>
<input type="number" class="form-control" id="max-log-file-size" placeholder="104850000" [(ngModel)]="currentSettings.maxLogFileSize" [ngModelOptions]="{standalone: true}">
<input type="number" min="0" class="form-control" id="max-log-file-size" placeholder="104850000" [(ngModel)]="currentSettings.maxLogFileSize" [ngModelOptions]="{standalone: true}">
<small class="text-body-secondary">Specify maximum log file size [B]</small>
</div>
<div class="col-md-4">
<label for="max-log-files" class="form-label">Max log files</label>
<input type="number" class="form-control" id="max-log-files" placeholder="50" [(ngModel)]="currentSettings.maxLogFiles" [ngModelOptions]="{standalone: true}">
<input type="number" min="0" class="form-control" id="max-log-files" placeholder="50" [(ngModel)]="currentSettings.maxLogFiles" [ngModelOptions]="{standalone: true}">
<small class="text-body-secondary">Specify maximum number of rotated log files to be saved (no limit by setting to 0)</small>
</div>
</div>