secubox-openwrt/package/secubox/luci-app-peertube/htdocs/luci-static/resources/peertube/api.js
CyberMind-FR 5c34ca2cae feat(luci): Add luci-app-peertube dashboard for PeerTube video platform
- RPCD handler (luci.peertube) with 11 methods: status, start, stop,
  install, uninstall, update, logs, emancipate, live_enable,
  live_disable, configure_haproxy
- ACL permissions for read (status, logs) and write operations
- Dashboard features:
  - Install wizard with features and requirements
  - Service status display with access URL
  - Live streaming toggle with enable/disable buttons
  - HAProxy configuration status
  - Emancipate form for public exposure
  - Logs viewer with refresh

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-15 05:51:04 +01:00

73 lines
1.1 KiB
JavaScript

'use strict';
'require rpc';
return L.Class.extend({
status: rpc.declare({
object: 'luci.peertube',
method: 'status',
expect: { }
}),
start: rpc.declare({
object: 'luci.peertube',
method: 'start',
expect: { }
}),
stop: rpc.declare({
object: 'luci.peertube',
method: 'stop',
expect: { }
}),
install: rpc.declare({
object: 'luci.peertube',
method: 'install',
expect: { }
}),
uninstall: rpc.declare({
object: 'luci.peertube',
method: 'uninstall',
expect: { }
}),
update: rpc.declare({
object: 'luci.peertube',
method: 'update',
expect: { }
}),
logs: rpc.declare({
object: 'luci.peertube',
method: 'logs',
params: ['lines'],
expect: { }
}),
emancipate: rpc.declare({
object: 'luci.peertube',
method: 'emancipate',
params: ['domain'],
expect: { }
}),
liveEnable: rpc.declare({
object: 'luci.peertube',
method: 'live_enable',
expect: { }
}),
liveDisable: rpc.declare({
object: 'luci.peertube',
method: 'live_disable',
expect: { }
}),
configureHaproxy: rpc.declare({
object: 'luci.peertube',
method: 'configure_haproxy',
expect: { }
})
});