Commit 59b2446a authored by jan.koester's avatar jan.koester
Browse files

test

parent da8d8794
Loading
Loading
Loading
Loading
+17 −0
Changes for www/modules/network.js: 17 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -54,6 +54,8 @@
      'Namen: Buchstaben, Ziffern, „-“, „_“ und „.“, höchstens 15 Zeichen.',
    'Select at least one member.': 'Mindestens ein Mitglied auswählen.',
    '{0} saved and applied.': '{0} gespeichert und angewendet.', '{0} saved.': '{0} gespeichert.',
    '{0} has no configuration (left over from an earlier change); the device is deleted, its members are released.':
      '{0} hat keine Konfiguration (Überbleibsel einer früheren Änderung); das Gerät wird gelöscht, seine Mitglieder werden freigegeben.',
    'The addresses of {0} are taken over.': 'Die Adressen von {0} werden übernommen.',
    'A bond can be a port of the bridge: its addresses move to the bridge, which keeps the bond\'s MAC address, so connections survive the change. Leave STP off for that (with STP a new port forwards only after about 30 seconds).':
      'Ein Bond kann Port der Bridge sein: seine Adressen ziehen auf die Bridge um, die die MAC-Adresse des Bonds behält; bestehende Verbindungen überstehen den Umbau. Dafür STP ausgeschaltet lassen (mit STP leitet ein neuer Port erst nach etwa 30 Sekunden weiter).',
@@ -315,6 +317,20 @@
    });
  }

  // a bond or bridge device without configuration (left over): only the
  // device can go
  const orphan = i => (i.kind === 'bond' || i.kind === 'bridge') && !netdevs.some(n => n.name === i.name);
  async function deleteOrphan(i) {
    const ok = await confirmAction(t('Delete {0}?', i.name),
      t('{0} has no configuration (left over from an earlier change); the device is deleted, its members are released.', i.name),
      t('Delete'));
    if (!ok) return;
    if (await run(() => call('network', 'deleteNetdev', {netdev: i.name}), t('{0} deleted.', i.name)) !== undefined) {
      await run(() => call('network', 'reload', {}));
      load();
    }
  }

  async function deleteConfig(i) {
    const ok = await confirmAction(t('Delete configuration'),
      t('The configuration "{0}" ({1}) will be deleted; {2} then gets the next matching one.', i.config, i.configPath, i.name),
@@ -367,6 +383,7 @@
            h('button', {class: 'small', onclick: () => action(i.name, 'reload', t('{0} reloaded.', i.name))}, t('Reload')),
            i.memberOf || i.master || i.kind ? null : h('button', {class: 'small', onclick: () => configure(i)}, t('Configure')),
            ownConfig(i) && !i.memberOf && !i.kind ? h('button', {class: 'small danger', onclick: () => deleteConfig(i)}, t('Delete config')) : null,
            orphan(i) ? h('button', {class: 'small danger', onclick: () => deleteOrphan(i)}, t('Delete')) : null,
          ]},
        ], interfaces, t('No interfaces found.'))),
      netdevPanel());