Skip to content

Commit

Permalink
fixup frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
dni committed Oct 23, 2024
1 parent 0763cf2 commit 3cfbb27
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions static/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,33 +123,32 @@ window.app = Vue.createApp({
},
methods: {
///////////////Jobs////////////////////////////
getJobs() {
getJobs: () => {
LNbits.api
.request(
'GET',
'/scheduler/api/v1/jobs',
this.g.user.wallets[0].adminkey
user.wallets[0].adminkey
)
.then(response => {
this.jobs = response.data.map(function (obj) {
this.jobs = response.data.data.map(function (obj) {
return mapcrontabs(obj)
})
// console.log("[index] getjobs: ", JSON.stringify(this.jobs))
})
},
openLogDialog: function (linkId) {
openLogDialog(linkId) {
this.jobLogDialog.show = true
const link = _.findWhere(this.jobs, {id: linkId})
this.jobLogDialog.id = _.clone(link._data.id)
this.id_code = this.jobLogDialog.id
},
openTestlogDialog: function (linkId) {
openTestlogDialog(linkId) {
this.testlogDialog.show = true
const link = _.findWhere(this.jobs, {id: linkId})
this.testlogDialog.id = _.clone(link._data.id)
this.id_code = this.testlogDialog.id
},
fetchJobLogDialog: function (id) {
fetchJobLogDialog() {
const id = this.jobLogDialog.id
//console.log("this.jobLogDialog.id ", this.jobLogDialog.id)
//console.log("fetch job Log Dialog: ", id)
Expand All @@ -170,10 +169,10 @@ window.app = Vue.createApp({
LNbits.utils.notifyApiError(error)
})
},
clearJobLogDialog: function () {
clearJobLogDialog() {
this.output = ''
},
closeJobLogDialog: function () {
closeJobLogDialog() {
this.output = '' // clears the dialog content on close
this.jobLogDialog.show = false
},
Expand Down

0 comments on commit 3cfbb27

Please sign in to comment.