🐶 Sync 2026-10-08 01:07:04

This commit is contained in:
github-actions[bot] committed 2026-10-08 01:07:04 +08:00
1 parent 31f25ca6cb
commit ef5af2e0cc
283 files changed
+34710 -16084

No files matched your search

@@ -488,7 +488,7 @@ const dv = view.extend({
parseMemory(value) {
if (!value) return 0;
const rex = /^([0-9.]+) *([bkmgt])?i? *[Bb]?/i;
const rex = /^([0-9.]+) *([bkmgtp])?i? *[Bb]?/i;
let [, amount, unit] = rex.exec(value.toLowerCase());
amount = amount ? Number.parseFloat(amount) : 0;
switch (unit) {
@@ -1086,7 +1086,7 @@ return dm2.dv.extend({
o = s.taboption('wsconsole', form.DummyValue, 'wsconsole_controls', _('WebSocket Console'));
o.render = L.bind(function() {
const status = this.getContainerStatus();
const status = this.getContainerStatus(this_container);
const isRunning = status === 'running';
if (!isRunning) {
@@ -1327,6 +1327,7 @@ return dm2.dv.extend({
.then(() => {
const this_container = map.data.get('json', 'cont');
const id = this_container?.Id;
const nc = gethc('NanoCpus');
/* In the container edit context, there are not many items we
can change - duplicate the container */
const createBody = {
@@ -1335,11 +1336,11 @@ return dm2.dv.extend({
Memory: toInt(gethc('Memory')),
MemorySwap: toInt(gethc('MemorySwap')),
MemoryReservation: toInt(gethc('MemoryReservation')),
BlkioWeight: toInt(gethc('blkio_weight')),
BlkioWeight: toInt(gethc('BlkioWeight')),
CpuPeriod: toInt(gethc('CpuPeriod')),
CpuQuota: toInt(gethc('CpuQuota')),
NanoCPUs: toInt(gethc('NanoCpus') * (10 ** 9)), // unit: 10^-9, input: float
NanoCPUs: nc ? Math.round(nc * 1e9) : undefined, // unit: 10^-9, input: float
OomKillDisable: toBool(gethc('OomKillDisable')),
RestartPolicy: { Name: get('restart_policy') || this_container.HostConfig?.RestartPolicy?.Name },
@@ -22,7 +22,7 @@ return dm2.dv.extend({
render([volumes, containers]) {
if (volumes?.code !== 200) {
return E('div', {}, [ volumes.body.message ]);
return E('div', {}, [ volumes?.body?.message ?? _('Failed to load volumes') ]);
}
// this.volumes = volumes || {};