formbondset.cgi

来自「嵌入式无线路由系统openwrt的web配置工具」· CGI 代码 · 共 62 行

CGI
62
字号
#!/usr/bin/haserl# Copyright (C) 2009 OpenRB.comcontent-type: text/html(function(){  var moduleId = 'interfaces_bondsettings',      elems = FlashSYS.getCache( moduleId ),      formOptions = <? /lib/flashsys/modules/interfaces/formbondset.lua ?>;  if (!elems) {    var window = FlashSYS.newWindow({      id: moduleId,      title: $TR( moduleId ),      width: 320,      height: 160,      padding: 5,      canReload: false,      type: 'modal'    });    var form = new FlashSYS.Form(window.contentEl, {      module: moduleId,      saveModule: 'interfaces',      saveAction: 'savebondset',      reload: 'interfaces',      trPrefix: 'interfaces_bond_',      elements: [        { type: 'select', name: 'max_bonds', values: ['1', '2', '3', '4'], cls: 'w40p' },        { type: 'select', name: 'mode', values: [            ['0', 'balance-rr'], ['1', 'active-backup'], ['2', 'balance-xor'], ['3', 'broadcast'],            ['4', '802.3ad'], ['5', 'balance-tlb'], ['6', 'balance-alb']          ]        },        { type: 'select', name: 'mon_mode', values: [['miimon','MII'],['arp','ARP']], cls: 'w40p', blocks: {            change: {              'miimon': {'mii': 1, 'arp': 0},              'arp': {'mii': 0, 'arp': 1}            }          }        },        { type: 'blockStart', name: 'mii' },          { type: 'text', name: 'miimon', cls: 'w20p', postfix: $TR('milliseconds'),            validate: {required: true, digit: true} },        'blockEnd',        { type: 'blockStart', name: 'arp' },          { type: 'text', name: 'arp_interval', cls: 'w20p', postfix: $TR('milliseconds'),            validate: {required: true, digit: true} },          { type: 'text', name: 'arp_ip_target', validate: {required: true} },        'blockEnd'      ],      submitEl: window.footerEl,      addChange: true,      changeModule: 'interfaces',      changeAction: 'restartbond'    });    elems = FlashSYS.setCache(moduleId, {window: window, form: form });  }  elems.form.loadValues(formOptions.values, formOptions.params);})();

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?