add restart button to frontend

This commit is contained in:
dni ⚡ 2022-09-27 16:37:08 +02:00
parent f2e494384e
commit 9757fad868

View File

@ -65,6 +65,14 @@
:options="data.funding_source" :options="data.funding_source"
></q-select> ></q-select>
<br /> <br />
<div>
<q-btn
class="q-mt-md float-right"
label="Restart Server"
color="primary"
@click="restartServer"
></q-btn>
</div>
</div> </div>
<div class="col-12"> <div class="col-12">
<p>Fee reserve</p> <p>Fee reserve</p>
@ -89,7 +97,7 @@
></q-input> ></q-input>
</div> </div>
</div> </div>
<br />
</div> </div>
</div> </div>
</div> </div>
@ -1257,6 +1265,24 @@
let spaces = this.data.admin.ad_space let spaces = this.data.admin.ad_space
this.data.admin.ad_space = spaces.filter(s => s !== ad) this.data.admin.ad_space = spaces.filter(s => s !== ad)
}, },
restartServer() {
LNbits.api
.request(
'GET',
'/admin/api/v1/admin/restart/',
this.g.user.wallets[0].adminkey
)
.then(response => {
this.$q.notify({
type: 'positive',
message: 'Success! Restarted Server',
icon: null
})
})
.catch(function (error) {
LNbits.utils.notifyApiError(error)
})
},
topupWallet() { topupWallet() {
LNbits.api LNbits.api
.request( .request(