Compare commits
4 commits
Author | SHA1 | Date | |
---|---|---|---|
f01fc2ac02 | |||
d175782f73 | |||
bdaf58b7b0 | |||
7f6d1546f2 |
4 changed files with 15 additions and 6 deletions
|
@ -102,7 +102,7 @@ export async function listentoapp(ctx, data) {
|
|||
if (!app) return
|
||||
|
||||
ctx.socket.join('app.' + data.name)
|
||||
let version = ctx.db.get(ctx.db.data.core[app.name].versions, ctx.db.data.core[app.name].latestInstalled)
|
||||
let version = ctx.db.data.core[app.name].versions[0]
|
||||
ctx.socket.emit('app.updatelog', {
|
||||
name: data.name,
|
||||
log: version?.log || ctx.db.data.core[app.name].updater
|
||||
|
|
15
api/util.mjs
15
api/util.mjs
|
@ -19,13 +19,20 @@ export function safeWrap(log, name, fn) {
|
|||
|
||||
export function getConfig(ctx) {
|
||||
let merge = {
|
||||
applications: []
|
||||
applications: [],
|
||||
name: ctx.db.config.name || '',
|
||||
title: ctx.db.config.title || '',
|
||||
}
|
||||
for (let app of ctx.core.applications) {
|
||||
merge[app.name] = app.config
|
||||
merge[app.name] = {
|
||||
provider: app.config.provider || null,
|
||||
url: app.config.url || null,
|
||||
port: app.config.port || null,
|
||||
scAllowStop: app.config.scAllowStop || null,
|
||||
}
|
||||
merge.applications.push(app.name)
|
||||
}
|
||||
return defaults(ctx.db.config, merge)
|
||||
return merge
|
||||
}
|
||||
|
||||
export function getApp(ctx, name, action) {
|
||||
|
@ -83,7 +90,7 @@ export function getStatus(ctx) {
|
|||
active: active,
|
||||
latestInstalled: installed,
|
||||
updated: appDb.updater,
|
||||
running: app.running,
|
||||
running: app.running || app.ctx.version,
|
||||
updating: app.updating,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,6 +10,8 @@ const core = {
|
|||
status: {},
|
||||
}
|
||||
|
||||
window.core = core
|
||||
|
||||
socket.on('core.config', function(res) {
|
||||
core.apps = []
|
||||
let keys = Object.keys(res)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "sc-manager",
|
||||
"version": "2.0.2",
|
||||
"version": "2.0.6",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
|
Loading…
Reference in a new issue