main.cgi

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

CGI
51
字号
#!/usr/bin/haserl# Copyright (C) 2008 OpenRB.comcontent-type: text/html(function(){  var moduleId = 'processes';  var elems = FlashSYS.getCache( moduleId );  FlashSYS.setReloader(moduleId);  if (!elems) {    var window = FlashSYS.newWindow({      id: moduleId,      title: $TR( moduleId ),      width: 400,      height: 225,      padding: 5    });    var table = new FlashSYS.Table(window.contentEl, {      trPrefix: 'processes_',      tableHead: {        'pid': { width: 15 },        'cmd': { width: 75 },        'delete': { width: 10, blank: true, confirm: 'processes_confirm', params: { module: moduleId, action: 'delete', reload: moduleId } }      }    });    elems = FlashSYS.setCache(moduleId, {      window: window,      table: table    });  }  var tableValues = {}, tableData = <? /lib/flashsys/modules/processes/main.lua ?>, delIcon = { 'cls': 'Icon Delete', 'title': $TR('title_delete') };  if ($type(tableData) != 'array') {    return;  }  for (var i = 0, j = tableData.length; i < j; i++) {    var items = tableData[i].clean().split(' ');    if (items.length < 5) {      continue;    }    var pid = items[0], cmd = items.slice(4).join(' ');     tableValues[ pid ] = [ pid, cmd, delIcon];  }  elems.table.loadValues(tableValues);})();

⌨️ 快捷键说明

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