Skip to content

Commit

Permalink
Update SDK to work with AMD loaders
Browse files Browse the repository at this point in the history
  • Loading branch information
itay committed Feb 27, 2013
1 parent e2cf86c commit 13ffc85
Show file tree
Hide file tree
Showing 10 changed files with 39 additions and 27 deletions.
24 changes: 14 additions & 10 deletions client/splunk.js
Expand Up @@ -1544,7 +1544,7 @@ require.define("/lib/paths.js", function (require, module, exports, __dirname, _
passwords: "admin/passwords",
parser: "search/parser",
properties: "properties",
roles: "authentication/roles",
roles: "authorization/roles",
savedSearches: "saved/searches",
settings: "server/settings",
users: "/services/authentication/users",
Expand Down Expand Up @@ -1989,14 +1989,14 @@ require.define("/lib/service.js", function (require, module, exports, __dirname,
var root = exports || this;
var Service = null;

/**
* Contains functionality common to Splunk Enterprise and Splunk Storm.
*
* This class is an implementation detail and is therefore SDK-private.
*
* @class splunkjs.private.BaseService
* @extends splunkjs.Context
*/
// /**
// * Contains functionality common to Splunk Enterprise and Splunk Storm.
// *
// * This class is an implementation detail and is therefore SDK-private.
// *
// * @class splunkjs.private.BaseService
// * @extends splunkjs.Context
// */
var BaseService = Context.extend({
init: function() {
this._super.apply(this, arguments);
Expand Down Expand Up @@ -6132,7 +6132,11 @@ require.define("/contrib/script.js", function (require, module, exports, __dirna
* (c) Dustin Diaz, Jacob Thornton 2011
* License: MIT
*/
!function(a,b){typeof define=="function"?define(b):typeof module!="undefined"?module.exports=b():this[a]=b()}("$script",function(){function s(a,b,c){for(c=0,j=a.length;c<j;++c)if(!b(a[c]))return m;return 1}function t(a,b){s(a,function(a){return!b(a)})}function u(a,b,c){function o(a){return a.call?a():f[a]}function p(){if(!--m){f[l]=1,j&&j();for(var a in h)s(a.split("|"),o)&&!t(h[a],o)&&(h[a]=[])}}a=a[n]?a:[a];var e=b&&b.call,j=e?b:c,l=e?a.join(""):b,m=a.length;return setTimeout(function(){t(a,function(a){if(k[a])return l&&(g[l]=1),k[a]==2&&p();k[a]=1,l&&(g[l]=1),v(!d.test(a)&&i?i+a+".js":a,p)})},0),u}function v(a,d){var e=b.createElement("script"),f=m;e.onload=e.onerror=e[r]=function(){if(e[p]&&!/^c|loade/.test(e[p])||f)return;e.onload=e[r]=null,f=1,k[a]=2,d()},e.async=1,e.src=a,c.insertBefore(e,c.firstChild)}var a=this,b=document,c=b.getElementsByTagName("head")[0],d=/^https?:\/\//,e=a.$script,f={},g={},h={},i,k={},l="string",m=!1,n="push",o="DOMContentLoaded",p="readyState",q="addEventListener",r="onreadystatechange";return!b[p]&&b[q]&&(b[q](o,function w(){b.removeEventListener(o,w,m),b[p]="complete"},m),b[p]="loading"),u.get=v,u.order=function(a,b,c){(function d(e){e=a.shift(),a.length?u(e,d):u(e,b,c)})()},u.path=function(a){i=a},u.ready=function(a,b,c){a=a[n]?a:[a];var d=[];return!t(a,function(a){f[a]||d[n](a)})&&s(a,function(a){return f[a]})?b():!function(a){h[a]=h[a]||[],h[a][n](b),c&&c(d)}(a.join("|")),u},u.noConflict=function(){return a.$script=e,this},u})
/*
* Modified by Splunk, Inc to remove AMD/requirejs support support
* Removed: 'typeof define=="function"?define(b):'
*/
!function(a,b){typeof module!="undefined"?module.exports=b():this[a]=b()}("$script",function(){function s(a,b,c){for(c=0,j=a.length;c<j;++c)if(!b(a[c]))return m;return 1}function t(a,b){s(a,function(a){return!b(a)})}function u(a,b,c){function o(a){return a.call?a():f[a]}function p(){if(!--m){f[l]=1,j&&j();for(var a in h)s(a.split("|"),o)&&!t(h[a],o)&&(h[a]=[])}}a=a[n]?a:[a];var e=b&&b.call,j=e?b:c,l=e?a.join(""):b,m=a.length;return setTimeout(function(){t(a,function(a){if(k[a])return l&&(g[l]=1),k[a]==2&&p();k[a]=1,l&&(g[l]=1),v(!d.test(a)&&i?i+a+".js":a,p)})},0),u}function v(a,d){var e=b.createElement("script"),f=m;e.onload=e.onerror=e[r]=function(){if(e[p]&&!/^c|loade/.test(e[p])||f)return;e.onload=e[r]=null,f=1,k[a]=2,d()},e.async=1,e.src=a,c.insertBefore(e,c.firstChild)}var a=this,b=document,c=b.getElementsByTagName("head")[0],d=/^https?:\/\//,e=a.$script,f={},g={},h={},i,k={},l="string",m=!1,n="push",o="DOMContentLoaded",p="readyState",q="addEventListener",r="onreadystatechange";return!b[p]&&b[q]&&(b[q](o,function w(){b.removeEventListener(o,w,m),b[p]="complete"},m),b[p]="loading"),u.get=v,u.order=function(a,b,c){(function d(e){e=a.shift(),a.length?u(e,d):u(e,b,c)})()},u.path=function(a){i=a},u.ready=function(a,b,c){a=a[n]?a:[a];var d=[];return!t(a,function(a){f[a]||d[n](a)})&&s(a,function(a){return f[a]})?b():!function(a){h[a]=h[a]||[],h[a][n](b),c&&c(d)}(a.join("|")),u},u.noConflict=function(){return a.$script=e,this},u})
});

require.define("/browser.entry.js", function (require, module, exports, __dirname, __filename) {
Expand Down
2 changes: 1 addition & 1 deletion client/splunk.min.js

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions client/splunk.test.js
Expand Up @@ -1801,7 +1801,7 @@ require.define("/lib/paths.js", function (require, module, exports, __dirname, _
passwords: "admin/passwords",
parser: "search/parser",
properties: "properties",
roles: "authentication/roles",
roles: "authorization/roles",
savedSearches: "saved/searches",
settings: "server/settings",
users: "/services/authentication/users",
Expand Down Expand Up @@ -2246,14 +2246,14 @@ require.define("/lib/service.js", function (require, module, exports, __dirname,
var root = exports || this;
var Service = null;

/**
* Contains functionality common to Splunk Enterprise and Splunk Storm.
*
* This class is an implementation detail and is therefore SDK-private.
*
* @class splunkjs.private.BaseService
* @extends splunkjs.Context
*/
// /**
// * Contains functionality common to Splunk Enterprise and Splunk Storm.
// *
// * This class is an implementation detail and is therefore SDK-private.
// *
// * @class splunkjs.private.BaseService
// * @extends splunkjs.Context
// */
var BaseService = Context.extend({
init: function() {
this._super.apply(this, arguments);
Expand Down
2 changes: 1 addition & 1 deletion client/splunk.test.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion client/splunk.ui.charting.js
Expand Up @@ -410,7 +410,7 @@ require.define("/ui/charting.js", function (require, module, exports, __dirname,
},

draw: function() {
this.chart.draw();
this.chart.draw(function(){});
}
});
})();
Expand Down
2 changes: 1 addition & 1 deletion client/splunk.ui.charting.min.js

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion client/splunk.ui.js
Expand Up @@ -352,7 +352,11 @@ require.define("/contrib/script.js", function (require, module, exports, __dirna
* (c) Dustin Diaz, Jacob Thornton 2011
* License: MIT
*/
!function(a,b){typeof define=="function"?define(b):typeof module!="undefined"?module.exports=b():this[a]=b()}("$script",function(){function s(a,b,c){for(c=0,j=a.length;c<j;++c)if(!b(a[c]))return m;return 1}function t(a,b){s(a,function(a){return!b(a)})}function u(a,b,c){function o(a){return a.call?a():f[a]}function p(){if(!--m){f[l]=1,j&&j();for(var a in h)s(a.split("|"),o)&&!t(h[a],o)&&(h[a]=[])}}a=a[n]?a:[a];var e=b&&b.call,j=e?b:c,l=e?a.join(""):b,m=a.length;return setTimeout(function(){t(a,function(a){if(k[a])return l&&(g[l]=1),k[a]==2&&p();k[a]=1,l&&(g[l]=1),v(!d.test(a)&&i?i+a+".js":a,p)})},0),u}function v(a,d){var e=b.createElement("script"),f=m;e.onload=e.onerror=e[r]=function(){if(e[p]&&!/^c|loade/.test(e[p])||f)return;e.onload=e[r]=null,f=1,k[a]=2,d()},e.async=1,e.src=a,c.insertBefore(e,c.firstChild)}var a=this,b=document,c=b.getElementsByTagName("head")[0],d=/^https?:\/\//,e=a.$script,f={},g={},h={},i,k={},l="string",m=!1,n="push",o="DOMContentLoaded",p="readyState",q="addEventListener",r="onreadystatechange";return!b[p]&&b[q]&&(b[q](o,function w(){b.removeEventListener(o,w,m),b[p]="complete"},m),b[p]="loading"),u.get=v,u.order=function(a,b,c){(function d(e){e=a.shift(),a.length?u(e,d):u(e,b,c)})()},u.path=function(a){i=a},u.ready=function(a,b,c){a=a[n]?a:[a];var d=[];return!t(a,function(a){f[a]||d[n](a)})&&s(a,function(a){return f[a]})?b():!function(a){h[a]=h[a]||[],h[a][n](b),c&&c(d)}(a.join("|")),u},u.noConflict=function(){return a.$script=e,this},u})
/*
* Modified by Splunk, Inc to remove AMD/requirejs support support
* Removed: 'typeof define=="function"?define(b):'
*/
!function(a,b){typeof module!="undefined"?module.exports=b():this[a]=b()}("$script",function(){function s(a,b,c){for(c=0,j=a.length;c<j;++c)if(!b(a[c]))return m;return 1}function t(a,b){s(a,function(a){return!b(a)})}function u(a,b,c){function o(a){return a.call?a():f[a]}function p(){if(!--m){f[l]=1,j&&j();for(var a in h)s(a.split("|"),o)&&!t(h[a],o)&&(h[a]=[])}}a=a[n]?a:[a];var e=b&&b.call,j=e?b:c,l=e?a.join(""):b,m=a.length;return setTimeout(function(){t(a,function(a){if(k[a])return l&&(g[l]=1),k[a]==2&&p();k[a]=1,l&&(g[l]=1),v(!d.test(a)&&i?i+a+".js":a,p)})},0),u}function v(a,d){var e=b.createElement("script"),f=m;e.onload=e.onerror=e[r]=function(){if(e[p]&&!/^c|loade/.test(e[p])||f)return;e.onload=e[r]=null,f=1,k[a]=2,d()},e.async=1,e.src=a,c.insertBefore(e,c.firstChild)}var a=this,b=document,c=b.getElementsByTagName("head")[0],d=/^https?:\/\//,e=a.$script,f={},g={},h={},i,k={},l="string",m=!1,n="push",o="DOMContentLoaded",p="readyState",q="addEventListener",r="onreadystatechange";return!b[p]&&b[q]&&(b[q](o,function w(){b.removeEventListener(o,w,m),b[p]="complete"},m),b[p]="loading"),u.get=v,u.order=function(a,b,c){(function d(e){e=a.shift(),a.length?u(e,d):u(e,b,c)})()},u.path=function(a){i=a},u.ready=function(a,b,c){a=a[n]?a:[a];var d=[];return!t(a,function(a){f[a]||d[n](a)})&&s(a,function(a){return f[a]})?b():!function(a){h[a]=h[a]||[],h[a][n](b),c&&c(d)}(a.join("|")),u},u.noConflict=function(){return a.$script=e,this},u})
});

require.define("/browser.ui.entry.js", function (require, module, exports, __dirname, __filename) {
Expand Down

0 comments on commit 13ffc85

Please sign in to comment.