Skip to content

Commit

Permalink
Minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
javalikescript committed Jan 18, 2025
1 parent 4b3806f commit 3889a3c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
6 changes: 3 additions & 3 deletions extensions/web-base/www/app/extensions.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,9 @@ new Vue({
this.info = {};
fetch('/engine/extensions/' + extensionId + '/info').then(assertIsOk).then(getJson).then(function(info) {
this.info = info;
return fetch('/engine/extensions/' + extensionId + '/readme');
}.bind(this)).then(rejectIfNotOk).then(getResponseText).then(function(content) {
this.readme = content;
return fetch('/engine/extensions/' + extensionId + '/readme').then(rejectIfNotOk).then(getResponseText).then(function(content) {
this.readme = content;
}.bind(this), doNothing);
}.bind(this));
}
}
Expand Down
3 changes: 3 additions & 0 deletions extensions/web-base/www/app/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,9 @@ function rejectIfNotOk(response) {
return Promise.reject(response.statusText);
}

function doNothing() {
}

function insertTab(e) {
var t = e && e.target;
if (t && t.setRangeText) {
Expand Down
2 changes: 2 additions & 0 deletions lha/Engine.lua
Original file line number Diff line number Diff line change
Expand Up @@ -564,12 +564,14 @@ return class.create(function(engine)
self:loadExtensions()
self:loadThings()
self:loadThingValues()
logger:info('Engine started')
self.startTime = os.time()
self:publishEvent('startup')
self:publishEvent('configuration')
self:publishEvent('extensions')
self:publishEvent('things')
self:startHeartbeat()
logger:info('Engine heartbeat started')
end

function engine:stop()
Expand Down
3 changes: 3 additions & 0 deletions lha/restEngine.lua
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@ local REST_EXTENSIONS = {
manifest = extension:getManifest()
}
end,
config = function(exchange)
return exchange.attributes.extension:getConfiguration()
end,
info = function(exchange)
return exchange.attributes.extension:toJSON()
end,
Expand Down

0 comments on commit 3889a3c

Please sign in to comment.