mirror of
https://github.com/gnh1201/welsonjs.git
synced 2024-11-26 15:31:42 +00:00
Add squel.js
This commit is contained in:
parent
94052fa412
commit
d86fc7f279
2
app/assets/js/squel-5.13.0.min.js
vendored
Normal file
2
app/assets/js/squel-5.13.0.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
17
lib/std.js
17
lib/std.js
|
@ -5,10 +5,6 @@
|
|||
// Common routines. Defines LIB object which contains the API, as well as
|
||||
// a global DBG function.
|
||||
//
|
||||
// References:
|
||||
// * https://github.com/redskyit/wsh-appjs
|
||||
// * https://github.com/JSman-/JS-Framework
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -49,12 +45,15 @@ require("app/assets/js/es5-shim-4.5.14.min");
|
|||
require("app/assets/js/es5-sham-4.5.14.min");
|
||||
|
||||
// JSON 3 was a JSON polyfill for older JavaScript platforms
|
||||
require("app/assets/js/json3-3.3.2.min");
|
||||
global.JSON = require("app/assets/js/json3-3.3.2.min");
|
||||
|
||||
// ECMAScript 6 compatibility shims for legacy JS engines
|
||||
require("app/assets/js/es6-shim-0.35.5.min");
|
||||
require("app/assets/js/es6-sham-0.35.5.min");
|
||||
|
||||
// Squel.js SQL Query Builder
|
||||
global.squel = require("app/assets/js/squel-5.13.0.min");
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
// Global APIs
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -84,10 +83,6 @@ global.CHR = function(ord) {
|
|||
// Private APIs / Utility functions
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
exports.VERSIONINFO = "Standard Lib (std.js) version 0.2";
|
||||
exports.global = global;
|
||||
exports.require = global.require;
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
// Emulate Server.CreateObject
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -122,3 +117,7 @@ exports.CreateObject = function(progId, serverName, callback) {
|
|||
};
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
exports.VERSIONINFO = "Standard Lib (std.js) version 0.2";
|
||||
exports.global = global;
|
||||
exports.require = global.require;
|
||||
|
|
|
@ -190,7 +190,8 @@ exports.createShortcut = function(shoutcutName, fileName) {
|
|||
|
||||
exports.ping = function(address) {
|
||||
var wmi = GetObject("winmgmts:{impersonationLevel=impersonate}!\\\\.\\root\\cimv2");
|
||||
var query = "Select * From win32_PingStatus where address='" + address + "'";
|
||||
//var query = "Select * From win32_PingStatus where address='" + address + "'";
|
||||
var query = squel.select().from("Win32_PingStatus").where("address = ?", address).toString();
|
||||
|
||||
var colItems = wmi.ExecQuery(query);
|
||||
var enumItems = new Enumerator(colItems);
|
||||
|
|
Loading…
Reference in New Issue
Block a user