Compare commits

..

No commits in common. "master" and "v2.0.0" have entirely different histories.

7 changed files with 8 additions and 23 deletions

View file

@ -102,7 +102,7 @@ export async function listentoapp(ctx, data) {
if (!app) return
ctx.socket.join('app.' + data.name)
let version = ctx.db.data.core[app.name].versions[0]
let version = ctx.db.get(ctx.db.data.core[app.name].versions, ctx.db.data.core[app.name].latestInstalled)
ctx.socket.emit('app.updatelog', {
name: data.name,
log: version?.log || ctx.db.data.core[app.name].updater

View file

@ -68,10 +68,8 @@ export function formatLog(data) {
delete rec.v;
let d = new Date(rec.time)
// Time.
var time = '[' + d.toISOString().replace('T', ' ').replace('Z', '') + ']'
var time = '[' + rec.time.toISOString().replace('T', ' ').replace('Z', '') + ']'
time = stylize(time, 'none')
delete rec.time;

View file

@ -19,20 +19,13 @@ export function safeWrap(log, name, fn) {
export function getConfig(ctx) {
let merge = {
applications: [],
name: ctx.db.config.name || '',
title: ctx.db.config.title || '',
applications: []
}
for (let app of ctx.core.applications) {
merge[app.name] = {
provider: app.config.provider || null,
url: app.config.url || null,
port: app.config.port || null,
scAllowStop: app.config.scAllowStop || null,
}
merge[app.name] = app.config
merge.applications.push(app.name)
}
return merge
return defaults(ctx.db.config, merge)
}
export function getApp(ctx, name, action) {
@ -90,7 +83,7 @@ export function getStatus(ctx) {
active: active,
latestInstalled: installed,
updated: appDb.updater,
running: app.running || app.ctx.version,
running: app.running,
updating: app.updating,
}
}

View file

@ -23,7 +23,6 @@ environment:
build_script:
- sh: |
mkdir /lib64
ln -s /lib/libc.musl-x86_64.so.1 /lib64/ld-linux-x86-64.so.2
chmod -R 777 /appveyor/projects
npm install
@ -60,9 +59,6 @@ on_success:
-H "Authorization: token $deploytoken" \
-F "attachment=@${CURR_VER}_build-sc.7z" \
https://git.nfp.is/api/v1/repos/$APPVEYOR_REPO_NAME/releases/$RELEASE_ID/assets
echo "Deplying to production"
curl -X POST http://192.168.93.51:8881/update/manager | jq
fi
# on build failure

View file

@ -26,7 +26,7 @@ const Header = {
m('div.seperator'),
m(m.route.Link, {
href: '/log',
class: path.startsWith('/log') ? 'active' : '',
class: path === '/log' ? 'active' : '',
}, 'Log'),
m('div.seperator'),
m(m.route.Link, {

View file

@ -10,8 +10,6 @@ const core = {
status: {},
}
window.core = core
socket.on('core.config', function(res) {
core.apps = []
let keys = Object.keys(res)

View file

@ -1,6 +1,6 @@
{
"name": "sc-manager",
"version": "2.0.6",
"version": "2.0.0",
"description": "",
"main": "index.js",
"scripts": {