mirror of
https://github.com/meshcore-dev/meshcore.js.git
synced 2026-04-20 22:13:49 +00:00
added support for get stats commands
This commit is contained in:
parent
ff135fe0b4
commit
6f571c90dd
3 changed files with 142 additions and 0 deletions
33
index.html
33
index.html
|
|
@ -128,6 +128,15 @@
|
|||
<button @click="setManualAddContacts" class="border border-gray-500 px-2 bg-gray-100 hover:bg-gray-200 rounded">
|
||||
setManualAddContacts
|
||||
</button>
|
||||
<button @click="getStatsCore" class="border border-gray-500 px-2 bg-gray-100 hover:bg-gray-200 rounded">
|
||||
getStatsCore
|
||||
</button>
|
||||
<button @click="getStatsRadio" class="border border-gray-500 px-2 bg-gray-100 hover:bg-gray-200 rounded">
|
||||
getStatsRadio
|
||||
</button>
|
||||
<button @click="getStatsPackets" class="border border-gray-500 px-2 bg-gray-100 hover:bg-gray-200 rounded">
|
||||
getStatsPackets
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -672,6 +681,30 @@
|
|||
alert("failed to set manual add contacts");
|
||||
}
|
||||
},
|
||||
async getStatsCore() {
|
||||
try {
|
||||
const stats = await this.connection.getStatsCore();
|
||||
console.log(stats);
|
||||
} catch(e) {
|
||||
console.log(e);
|
||||
}
|
||||
},
|
||||
async getStatsRadio() {
|
||||
try {
|
||||
const stats = await this.connection.getStatsRadio();
|
||||
console.log(stats);
|
||||
} catch(e) {
|
||||
console.log(e);
|
||||
}
|
||||
},
|
||||
async getStatsPackets() {
|
||||
try {
|
||||
const stats = await this.connection.getStatsPackets();
|
||||
console.log(stats);
|
||||
} catch(e) {
|
||||
console.log(e);
|
||||
}
|
||||
},
|
||||
showCommandLine(contact) {
|
||||
|
||||
// hide cli if clicked same contact
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue