diff options
Diffstat (limited to 'glances/outputs/static/public/glances.js')
-rw-r--r-- | glances/outputs/static/public/glances.js | 326 |
1 files changed, 216 insertions, 110 deletions
diff --git a/glances/outputs/static/public/glances.js b/glances/outputs/static/public/glances.js index 1cfa7b63..9c8320a9 100644 --- a/glances/outputs/static/public/glances.js +++ b/glances/outputs/static/public/glances.js @@ -556,7 +556,7 @@ function updateLink (link, options, obj) { var undefined; /** Used as the semantic version number. */ - var VERSION = '4.17.15'; + var VERSION = '4.17.19'; /** Used as the size to enable large array optimizations. */ var LARGE_ARRAY_SIZE = 200; @@ -4263,8 +4263,21 @@ function updateLink (link, options, obj) { * @returns {Array} Returns the new sorted array. */ function baseOrderBy(collection, iteratees, orders) { + if (iteratees.length) { + iteratees = arrayMap(iteratees, function(iteratee) { + if (isArray(iteratee)) { + return function(value) { + return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee); + } + } + return iteratee; + }); + } else { + iteratees = [identity]; + } + var index = -1; - iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(getIteratee())); + iteratees = arrayMap(iteratees, baseUnary(getIteratee())); var result = baseMap(collection, function(value, key, collection) { var criteria = arrayMap(iteratees, function(iteratee) { @@ -4521,6 +4534,10 @@ function updateLink (link, options, obj) { var key = toKey(path[index]), newValue = value; + if (key === '__proto__' || key === 'constructor' || key === 'prototype') { + return object; + } + if (index != lastIndex) { var objValue = nested[key]; newValue = customizer ? customizer(objValue, key, nested) : undefined; @@ -4673,11 +4690,14 @@ function updateLink (link, options, obj) { * into `array`. */ function baseSortedIndexBy(array, value, iteratee, retHighest) { - value = iteratee(value); - var low = 0, - high = array == null ? 0 : array.length, - valIsNaN = value !== value, + high = array == null ? 0 : array.length; + if (high === 0) { + return 0; + } + + value = iteratee(value); + var valIsNaN = value !== value, valIsNull = value === null, valIsSymbol = isSymbol(value), valIsUndefined = value === undefined; @@ -6162,10 +6182,11 @@ function updateLink (link, options, obj) { if (arrLength != othLength && !(isPartial && othLength > arrLength)) { return false; } - // Assume cyclic values are equal. - var stacked = stack.get(array); - if (stacked && stack.get(other)) { - return stacked == other; + // Check that cyclic values are equal. + var arrStacked = stack.get(array); + var othStacked = stack.get(other); + if (arrStacked && othStacked) { + return arrStacked == other && othStacked == array; } var index = -1, result = true, @@ -6327,10 +6348,11 @@ function updateLink (link, options, obj) { return false; } } - // Assume cyclic values are equal. - var stacked = stack.get(object); - if (stacked && stack.get(other)) { - return stacked == other; + // Check that cyclic values are equal. + var objStacked = stack.get(object); + var othStacked = stack.get(other); + if (objStacked && othStacked) { + return objStacked == other && othStacked == object; } var result = true; stack.set(object, other); @@ -9711,6 +9733,10 @@ function updateLink (link, options, obj) { * // The `_.property` iteratee shorthand. * _.filter(users, 'active'); * // => objects for ['barney'] + * + * // Combining several predicates using `_.overEvery` or `_.overSome`. + * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]])); + * // => objects for ['fred', 'barney'] */ function filter(collection, predicate) { var func = isArray(collection) ? arrayFilter : baseFilter; @@ -10460,15 +10486,15 @@ function updateLink (link, options, obj) { * var users = [ * { 'user': 'fred', 'age': 48 }, * { 'user': 'barney', 'age': 36 }, - * { 'user': 'fred', 'age': 40 }, + * { 'user': 'fred', 'age': 30 }, * { 'user': 'barney', 'age': 34 } * ]; * * _.sortBy(users, [function(o) { return o.user; }]); - * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]] * * _.sortBy(users, ['user', 'age']); - * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]] + * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]] */ var sortBy = baseRest(function(collection, iteratees) { if (collection == null) { @@ -15343,11 +15369,11 @@ function updateLink (link, options, obj) { // Use a sourceURL for easier debugging. // The sourceURL gets injected into the source that's eval-ed, so be careful - // with lookup (in case of e.g. prototype pollution), and strip newlines if any. - // A newline wouldn't be a valid sourceURL anyway, and it'd enable code injection. + // to normalize all kinds of whitespace, so e.g. newlines (and unicode versions of it) can't sneak in + // and escape the comment, thus injecting code that gets evaled. var sourceURL = '//# sourceURL=' + (hasOwnProperty.call(options, 'sourceURL') - ? (options.sourceURL + '').replace(/[\r\n]/g, ' ') + ? (options.sourceURL + '').replace(/\s/g, ' ') : ('lodash.templateSources[' + (++templateCounter) + ']') ) + '\n'; @@ -15380,8 +15406,6 @@ function updateLink (link, options, obj) { // If `variable` is not specified wrap a with-statement around the generated // code to add the data object to the top of the scope chain. - // Like with sourceURL, we take care to not check the option's prototype, - // as this configuration is a code injection vector. var variable = hasOwnProperty.call(options, 'variable') && options.variable; if (!variable) { source = 'with (obj) {\n' + source + '\n}\n'; @@ -16088,6 +16112,9 @@ function updateLink (link, options, obj) { * values against any array or object value, respectively. See `_.isEqual` * for a list of supported value comparisons. * + * **Note:** Multiple values can be checked by combining several matchers + * using `_.overSome` + * * @static * @memberOf _ * @since 3.0.0 @@ -16103,6 +16130,10 @@ function updateLink (link, options, obj) { * * _.filter(objects, _.matches({ 'a': 4, 'c': 6 })); * // => [{ 'a': 4, 'b': 5, 'c': 6 }] + * + * // Checking for several possible values + * _.filter(users, _.overSome([_.matches({ 'a': 1 }), _.matches({ 'a': 4 })])); + * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }] */ function matches(source) { return baseMatches(baseClone(source, CLONE_DEEP_FLAG)); @@ -16117,6 +16148,9 @@ function updateLink (link, options, obj) { * `srcValue` values against any array or object value, respectively. See * `_.isEqual` for a list of supported value comparisons. * + * **Note:** Multiple values can be checked by combining several matchers + * using `_.overSome` + * * @static * @memberOf _ * @since 3.2.0 @@ -16133,6 +16167,10 @@ function updateLink (link, options, obj) { * * _.find(objects, _.matchesProperty('a', 4)); * // => { 'a': 4, 'b': 5, 'c': 6 } + * + * // Checking for several possible values + * _.filter(users, _.overSome([_.matchesProperty('a', 1), _.matchesProperty('a', 4)])); + * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }] */ function matchesProperty(path, srcValue) { return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG)); @@ -16356,6 +16394,10 @@ function updateLink (link, options, obj) { * Creates a function that checks if **all** of the `predicates` return * truthy when invoked with the arguments it receives. * + * Following shorthands are possible for providing predicates. + * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate. + * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them. + * * @static * @memberOf _ * @since 4.0.0 @@ -16382,6 +16424,10 @@ function updateLink (link, options, obj) { * Creates a function that checks if **any** of the `predicates` return * truthy when invoked with the arguments it receives. * + * Following shorthands are possible for providing predicates. + * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate. + * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them. + * * @static * @memberOf _ * @since 4.0.0 @@ -16401,6 +16447,9 @@ function updateLink (link, options, obj) { * * func(NaN); * // => false + * + * var matchesFunc = _.overSome([{ 'a': 1 }, { 'a': 2 }]) + * var matchesPropertyFunc = _.overSome([['a', 1], ['a', 2]]) */ var overSome = createOver(arraySome); @@ -17903,7 +17952,7 @@ exports = module.exports = __webpack_require__(1)(false); // module -exports.push([module.i, "body {\n background: black;\n color: #BBB;\n font-family: \"Lucida Sans Typewriter\", \"Lucida Console\", Monaco, \"Bitstream Vera Sans Mono\", monospace; }\n\n.table {\n display: table;\n width: 100%;\n max-width: 100%; }\n\n.table-row-group {\n display: table-row-group; }\n\n.table-row {\n display: table-row; }\n\n.table-cell {\n display: table-cell;\n text-align: right; }\n\n.row {\n margin-right: 0px; }\n\n.top-plugin {\n margin-bottom: 20px; }\n\n.plugin {\n margin-bottom: 20px; }\n\n.plugin.table-row-group .table-row:last-child .table-cell {\n padding-bottom: 20px; }\n\n.underline {\n text-decoration: underline; }\n\n.bold {\n font-weight: bold; }\n\n.sort {\n font-weight: bold;\n color: white; }\n\n.sortable {\n cursor: pointer; }\n\n.text-right {\n text-align: right; }\n\n.text-left {\n text-align: left; }\n\n.sidebar .table-cell:not(.text-left) {\n padding-left: 10px; }\n\n/* Theme */\n.title {\n font-weight: bold;\n color: white; }\n\n.highlight {\n font-weight: bold;\n color: #5D4062; }\n\n.ok, .status, .process {\n color: #3E7B04;\n /*font-weight: bold;*/ }\n\n.ok_log {\n background-color: #3E7B04;\n color: white;\n /*font-weight: bold;*/ }\n\n.max {\n color: #3E7B04;\n font-weight: bold; }\n\n.careful {\n color: #295183;\n font-weight: bold; }\n\n.careful_log {\n background-color: #295183;\n color: white;\n font-weight: bold; }\n\n.warning, .nice {\n color: #5D4062;\n font-weight: bold; }\n\n.warning_log {\n background-color: #5D4062;\n color: white;\n font-weight: bold; }\n\n.critical {\n color: #A30000;\n font-weight: bold; }\n\n.critical_log {\n background-color: #A30000;\n color: white;\n font-weight: bold; }\n\n/* Plugins */\n#processlist-plugin .table-cell {\n padding: 0px 5px 0px 5px;\n white-space: nowrap; }\n\n#containers-plugin .table-cell {\n padding: 0px 10px 0px 10px;\n white-space: nowrap; }\n\n#quicklook-plugin .progress {\n margin-bottom: 0px;\n min-width: 100px;\n background-color: #000;\n height: 12px;\n border-radius: 0px;\n text-align: right; }\n\n#quicklook-plugin .progress-bar-ok {\n background-color: #3E7B04; }\n\n#quicklook-plugin .progress-bar-careful {\n background-color: #295183; }\n\n#quicklook-plugin .progress-bar-warning {\n background-color: #5D4062; }\n\n#quicklook-plugin .progress-bar-critical {\n background-color: #A30000; }\n\n#quicklook-plugin .cpu-name {\n white-space: nowrap;\n overflow: hidden;\n width: 100%;\n text-overflow: ellipsis; }\n\n#amps-plugin .process-result {\n max-width: 300px;\n overflow: hidden;\n white-space: pre-wrap;\n padding-left: 10px;\n text-overflow: ellipsis; }\n\n#gpu-plugin .gpu-name {\n white-space: nowrap;\n overflow: hidden;\n width: 100%;\n text-overflow: ellipsis; }\n\n/* Loading page */\n#loading-page .glances-logo {\n background: url(" + escape(__webpack_require__(11)) + ") no-repeat center center;\n background-size: contain; }\n\n@media (max-width: 750px) {\n #loading-page .glances-logo {\n height: 400px; } }\n\n@media (min-width: 750px) {\n #loading-page .glances-logo {\n height: 500px; } }\n\n/*\nLoading animation\nsource : https://github.com/lukehaas/css-loaders\n*/\n#loading-page .loader:before,\n#loading-page .loader:after,\n#loading-page .loader {\n border-radius: 50%;\n width: 1em;\n height: 1em;\n -webkit-animation-fill-mode: both;\n animation-fill-mode: both;\n -webkit-animation: loader 1.8s infinite ease-in-out;\n animation: loader 1.8s infinite ease-in-out; }\n\n#loading-page .loader {\n margin: auto;\n font-size: 10px;\n position: relative;\n text-indent: -9999em;\n -webkit-animation-delay: 0.16s;\n animation-delay: 0.16s; }\n\n#loading-page .loader:before {\n left: -3.5em; }\n\n#loading-page .loader:after {\n left: 3.5em;\n -webkit-animation-delay: 0.32s;\n animation-delay: 0.32s; }\n\n#loading-page .loader:before,\n#loading-page .loader:after {\n content: '';\n position: absolute;\n top: 0; }\n\n@-webkit-keyframes loader {\n 0%, 80%, 100% {\n box-shadow: 0 2.5em 0 -1.3em #56CA69; }\n 40% {\n box-shadow: 0 2.5em 0 0 #56CA69; } }\n\n@keyframes loader {\n 0%, 80%, 100% {\n box-shadow: 0 2.5em 0 -1.3em #56CA69; }\n 40% {\n box-shadow: 0 2.5em 0 0 #56CA69; } }\n", ""]); +exports.push([module.i, "body {\n background: black;\n color: #BBB;\n font-family: \"Lucida Sans Typewriter\", \"Lucida Console\", Monaco, \"Bitstream Vera Sans Mono\", monospace; }\n\n.table {\n display: table;\n width: 100%;\n max-width: 100%; }\n\n.table-row-group {\n display: table-row-group; }\n\n.table-row {\n display: table-row; }\n\n.table-cell {\n display: table-cell;\n text-align: right; }\n\n.row {\n margin-right: 0px; }\n\n.top-plugin {\n margin-bottom: 20px; }\n\n.plugin {\n margin-bottom: 20px; }\n\n.plugin.table-row-group .table-row:last-child .table-cell {\n padding-bottom: 20px; }\n\n.underline {\n text-decoration: underline; }\n\n.bold {\n font-weight: bold; }\n\n.sort {\n font-weight: bold;\n color: white; }\n\n.sortable {\n cursor: pointer; }\n\n.text-right {\n text-align: right; }\n\n.text-left {\n text-align: left; }\n\n.sidebar .table-cell:not(.text-left) {\n padding-left: 10px; }\n\n/* Theme */\n.title {\n font-weight: bold;\n color: white; }\n\n.highlight {\n font-weight: bold;\n color: #5D4062; }\n\n.ok, .status, .process {\n color: #3E7B04;\n /*font-weight: bold;*/ }\n\n.ok_log {\n background-color: #3E7B04;\n color: white;\n /*font-weight: bold;*/ }\n\n.max {\n color: #3E7B04;\n font-weight: bold; }\n\n.careful {\n color: #295183;\n font-weight: bold; }\n\n.careful_log {\n background-color: #295183;\n color: white;\n font-weight: bold; }\n\n.warning, .nice {\n color: #5D4062;\n font-weight: bold; }\n\n.warning_log {\n background-color: #5D4062;\n color: white;\n font-weight: bold; }\n\n.critical {\n color: #A30000;\n font-weight: bold; }\n\n.critical_log {\n background-color: #A30000;\n color: white;\n font-weight: bold; }\n\n/* Plugins */\n#processlist-plugin .table-cell {\n padding: 0px 5px 0px 5px;\n white-space: nowrap; }\n\n#containers-plugin .table-cell {\n padding: 0px 10px 0px 10px;\n white-space: nowrap; }\n\n#quicklook-plugin .progress {\n margin-bottom: 0px;\n min-width: 100px;\n background-color: #000;\n height: 12px;\n border-radius: 0px;\n text-align: right; }\n\n#quicklook-plugin .progress-bar-ok {\n background-color: #3E7B04; }\n\n#quicklook-plugin .progress-bar-careful {\n background-color: #295183; }\n\n#quicklook-plugin .progress-bar-warning {\n background-color: #5D4062; }\n\n#quicklook-plugin .progress-bar-critical {\n background-color: #A30000; }\n\n#quicklook-plugin .cpu-name {\n white-space: nowrap;\n overflow: hidden;\n width: 100%;\n text-overflow: ellipsis; }\n\n#amps .process-result {\n max-width: 300px;\n overflow: hidden;\n white-space: pre-wrap;\n padding-left: 10px;\n text-overflow: ellipsis; }\n\n#gpu .gpu-name {\n white-space: nowrap;\n overflow: hidden;\n width: 100%;\n text-overflow: ellipsis; }\n\n/* Loading page */\n#loading-page .glances-logo {\n background: url(" + escape(__webpack_require__(11)) + ") no-repeat center center;\n background-size: contain; }\n\n@media (max-width: 750px) {\n #loading-page .glances-logo {\n height: 400px; } }\n\n@media (min-width: 750px) {\n #loading-page .glances-logo {\n height: 500px; } }\n\n/*\nLoading animation\nsource : https://github.com/lukehaas/css-loaders\n*/\n#loading-page .loader:before,\n#loading-page .loader:after,\n#loading-page .loader {\n border-radius: 50%;\n width: 1em;\n height: 1em;\n -webkit-animation-fill-mode: both;\n animation-fill-mode: both;\n -webkit-animation: loader 1.8s infinite ease-in-out;\n animation: loader 1.8s infinite ease-in-out; }\n\n#loading-page .loader {\n margin: auto;\n font-size: 10px;\n position: relative;\n text-indent: -9999em;\n -webkit-animation-delay: 0.16s;\n animation-delay: 0.16s; }\n\n#loading-page .loader:before {\n left: -3.5em; }\n\n#loading-page .loader:after {\n left: 3.5em;\n -webkit-animation-delay: 0.32s;\n animation-delay: 0.32s; }\n\n#loading-page .loader:before,\n#loading-page .loader:after {\n content: '';\n position: absolute;\n top: 0; }\n\n@-webkit-keyframes loader {\n 0%, 80%, 100% {\n box-shadow: 0 2.5em 0 -1.3em #56CA69; }\n 40% {\n box-shadow: 0 2.5em 0 0 #56CA69; } }\n\n@keyframes loader {\n 0%, 80%, 100% {\n box-shadow: 0 2.5em 0 -1.3em #56CA69; }\n 40% {\n box-shadow: 0 2.5em 0 0 #56CA69; } }\n", ""]); // exports @@ -17973,8 +18022,8 @@ module.exports = __webpack_require__.p + "9a360c92ce9bda60a8da6389741dcfbf.png"; /***/ (function(module, exports) { /** - * @license AngularJS v1.7.9 - * (c) 2010-2018 Google, Inc. http://angularjs.org + * @license AngularJS v1.8.0 + * (c) 2010-2020 Google, Inc. http://angularjs.org * License: MIT */ (function(window) {'use strict'; @@ -18011,7 +18060,7 @@ var minErrConfig = { * non-positive or non-numeric value, removes the max depth limit. * Default: 5 * - * * `urlErrorParamsEnabled` **{Boolean}** - Specifies wether the generated error url will + * * `urlErrorParamsEnabled` **{Boolean}** - Specifies whether the generated error url will * contain the parameters of the thrown error. Disabling the parameters can be useful if the * generated error url is very long. * @@ -18061,7 +18110,7 @@ function isValidObjectMaxDepth(maxDepth) { * Since data will be parsed statically during a build step, some restrictions * are applied with respect to how minErr instances are created and called. * Instances should have names of the form namespaceMinErr for a minErr created - * using minErr('namespace') . Error codes, namespaces and template strings + * using minErr('namespace'). Error codes, namespaces and template strings * should all be static strings, not variables or general expressions. * * @param {string} module The namespace to use for the new minErr instance. @@ -18073,7 +18122,7 @@ function isValidObjectMaxDepth(maxDepth) { function minErr(module, ErrorConstructor) { ErrorConstructor = ErrorConstructor || Error; - var url = 'https://errors.angularjs.org/1.7.9/'; + var url = 'https://errors.angularjs.org/1.8.0/'; var regex = url.replace('.', '\\.') + '[\\s\\S]*'; var errRegExp = new RegExp(regex, 'g'); @@ -18206,6 +18255,7 @@ function minErr(module, ErrorConstructor) { hasOwnProperty, createMap, stringify, + UNSAFE_restoreLegacyJqLiteXHTMLReplacement, NODE_TYPE_ELEMENT, NODE_TYPE_ATTRIBUTE, @@ -18933,8 +18983,8 @@ function arrayRemove(array, value) { * - [`MediaStream`](https://developer.mozilla.org/docs/Web/API/MediaStream) * - [`Set`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Set) * - [`WeakMap`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WeakMap) - * - ['getter'](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/get)/ - * [`setter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/set)` + * - [`getter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/get)/ + * [`setter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/set) * * @param {*} source The source that will be used to make a copy. Can be any type, including * primitives, `null`, and `undefined`. @@ -20063,6 +20113,26 @@ function bindJQuery() { } /** + * @ngdoc function + * @name angular.UNSAFE_restoreLegacyJqLiteXHTMLReplacement + * @module ng + * @kind function + * + * @description + * Restores the pre-1.8 behavior of jqLite that turns XHTML-like strings like + * `<div /><span />` to `<div></div><span></span>` instead of `<div><span></span></div>`. + * The new behavior is a security fix. Thus, if you need to call this function, please try to adjust + * your code for this change and remove your use of this function as soon as possible. + + * Note that this only patches jqLite. If you use jQuery 3.5.0 or newer, please read the + * [jQuery 3.5 upgrade guide](https://jquery.com/upgrade-guide/3.5/) for more details + * about the workarounds. + */ +function UNSAFE_restoreLegacyJqLiteXHTMLReplacement() { + JQLite.legacyXHTMLReplacement = true; +} + +/** * throw error if the argument is falsy. */ function assertArg(arg, name, reason) { @@ -20781,11 +20851,11 @@ function toDebugString(obj, maxDepth) { var version = { // These placeholder strings will be replaced by grunt's `build` task. // They need to be double- or single-quoted. - full: '1.7.9', + full: '1.8.0', major: 1, - minor: 7, - dot: 9, - codeName: 'pollution-eradication' + minor: 8, + dot: 0, + codeName: 'nested-vaccination' }; @@ -20818,6 +20888,7 @@ function publishExternalAPI(angular) { 'callbacks': {$$counter: 0}, 'getTestability': getTestability, 'reloadWithDebugInfo': reloadWithDebugInfo, + 'UNSAFE_restoreLegacyJqLiteXHTMLReplacement': UNSAFE_restoreLegacyJqLiteXHTMLReplacement, '$$minErr': minErr, '$$csp': csp, '$$encodeUriSegment': encodeUriSegment, @@ -20935,7 +21006,7 @@ function publishExternalAPI(angular) { }); } ]) - .info({ angularVersion: '1.7.9' }); + .info({ angularVersion: '1.8.0' }); } /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -21028,6 +21099,16 @@ function publishExternalAPI(angular) { * - [`val()`](http://api.jquery.com/val/) * - [`wrap()`](http://api.jquery.com/wrap/) * + * jqLite also provides a method restoring pre-1.8 insecure treatment of XHTML-like tags. + * This legacy behavior turns input like `<div /><span />` to `<div></div><span></span>` + * instead of `<div><span></span></div>` like version 1.8 & newer do. To restore it, invoke: + * ```js + * angular.UNSAFE_restoreLegacyJqLiteXHTMLReplacement(); + * ``` + * Note that this only patches jqLite. If you use jQuery 3.5.0 or newer, please read the + * [jQuery 3.5 upgrade guide](https://jquery.com/upgrade-guide/3.5/) for more details + * about the workarounds. + * * ## jQuery/jqLite Extras * AngularJS also provides the following additional methods and events to both jQuery and jqLite: * @@ -21107,20 +21188,36 @@ var HTML_REGEXP = /<|&#?\w+;/; var TAG_NAME_REGEXP = /<([\w:-]+)/; var XHTML_TAG_REGEXP = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi; +// Table parts need to be wrapped with `<table>` or they're +// stripped to their contents when put in a div. +// XHTML parsers do not magically insert elements in the +// same way that tag soup parsers do, so we cannot shorten +// this by omitting <tbody> or other required elements. var wrapMap = { - 'option': [1, '<select multiple="multiple">', '</select>'], - - 'thead': [1, '<table>', '</table>'], - 'col': [2, '<table><colgroup>', '</colgroup></table>'], - 'tr': [2, '<table><tbody>', '</tbody></table>'], - 'td': [3, '<table><tbody><tr>', '</tr></tbody></table>'], - '_default': [0, '', ''] + thead: ['table'], + col: ['colgroup', 'table'], + tr: ['tbody', 'table'], + td: ['tr', 'tbody', 'table'] }; -wrapMap.optgroup = wrapMap.option; wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; wrapMap.th = wrapMap.td; +// Support: IE <10 only +// IE 9 requires an option wrapper & it needs to have the whole table structure +// set up in advance; assigning `"<td></td>"` to `tr.innerHTML` doesn't work, etc. +var wrapMapIE9 = { + option: [1, '<select multiple="multiple">', '</select>'], + _default: [0, '', ''] +}; + +for (var key in wrapMap) { + var wrapMapValueClosing = wrapMap[key]; + var wrapMapValue = wrapMapValueClosing.slice().reverse(); + wrapMapIE9[key] = [wrapMapValue.length, '<' + wrapMapValue.join('><') + '>', '</' + wrapMapValueClosing.join('></') + '>']; +} + +wrapMapIE9.optgroup = wrapMapIE9.option; function jqLiteIsTextNode(html) { return !HTML_REGEXP.test(html); @@ -21141,7 +21238,7 @@ function jqLiteHasData(node) { } function jqLiteBuildFragment(html, context) { - var tmp, tag, wrap, + var tmp, tag, wrap, finalHtml, fragment = context.createDocumentFragment(), nodes = [], i; @@ -21152,13 +21249,30 @@ function jqLiteBuildFragment(html, context) { // Convert html into DOM nodes tmp = fragment.appendChild(context.createElement('div')); tag = (TAG_NAME_REGEXP.exec(html) || ['', ''])[1].toLowerCase(); - wrap = wrapMap[tag] || wrapMap._default; - tmp.innerHTML = wrap[1] + html.replace(XHTML_TAG_REGEXP, '<$1></$2>') + wrap[2]; + finalHtml = JQLite.legacyXHTMLReplacement ? + html.replace(XHTML_TAG_REGEXP, '<$1></$2>') : + html; - // Descend through wrappers to the right content - i = wrap[0]; - while (i--) { - tmp = tmp.lastChild; + if (msie < 10) { + wrap = wrapMapIE9[tag] || wrapMapIE9._default; + tmp.innerHTML = wrap[1] + finalHtml + wrap[2]; + + // Descend through wrappers to the right content + i = wrap[0]; + while (i--) { + tmp = tmp.firstChild; + } + } else { + wrap = wrapMap[tag] || []; + + // Create wrappers & descend into them + i = wrap.length; + while (--i > -1) { + tmp.appendChild(window.document.createElement(wrap[i])); + tmp = tmp.firstChild; + } + + tmp.innerHTML = finalHtml; } nodes = concat(nodes, tmp.childNodes); @@ -26257,7 +26371,7 @@ function $TemplateCacheProvider() { * * When the original node and the replace template declare the same directive(s), they will be * {@link guide/compiler#double-compilation-and-how-to-avoid-it compiled twice} because the compiler - * does not deduplicate them. In many cases, this is not noticable, but e.g. {@link ngModel} will + * does not deduplicate them. In many cases, this is not noticeable, but e.g. {@link ngModel} will * attach `$formatters` and `$parsers` twice. * * See issue [#2573](https://github.com/angular/angular.js/issues/2573). @@ -51580,7 +51694,7 @@ var ngRefDirective = ['$parse', function($parse) { * For example: `item in items | filter:x as results` will store the fragment of the repeated items as `results`, but only after * the items have been processed through the filter. * - * Please note that `as [variable name] is not an operator but rather a part of ngRepeat + * Please note that `as [variable name]` is not an operator but rather a part of ngRepeat * micro-syntax so it can be used only after all filters (and not as operator, inside an expression). * * For example: `item in items | filter : x | orderBy : order | limitTo : limit as results track by item.id` . @@ -52389,11 +52503,11 @@ var ngHideDirective = ['$animate', function($animate) { var colorSpan = element(by.css('span')); it('should check ng-style', function() { - expect(colorSpan.getCssValue('color')).toBe('rgba(0, 0, 0, 1)'); + expect(colorSpan.getCssValue('color')).toMatch(/rgba\(0, 0, 0, 1\)|rgb\(0, 0, 0\)/); element(by.css('input[value=\'set color\']')).click(); - expect(colorSpan.getCssValue('color')).toBe('rgba(255, 0, 0, 1)'); + expect(colorSpan.getCssValue('color')).toMatch(/rgba\(255, 0, 0, 1\)|rgb\(255, 0, 0\)/); element(by.css('input[value=clear]')).click(); - expect(colorSpan.getCssValue('color')).toBe('rgba(0, 0, 0, 1)'); + expect(colorSpan.getCssValue('color')).toMatch(/rgba\(0, 0, 0, 1\)|rgb\(0, 0, 0\)/); }); </file> </example> @@ -54402,7 +54516,7 @@ $provide.value("$locale", { })(window); -!window.angular.$$csp().noInlineStyle && window.angular.element(document.head).prepend('<style type="text/css">@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide:not(.ng-hide-animate){display:none !important;}ng\\:form{display:block;}.ng-animate-shim{visibility:hidden;}.ng-anchor{position:absolute;}</style>'); +!window.angular.$$csp().noInlineStyle && window.angular.element(document.head).prepend(window.angular.element('<style>').text('@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide:not(.ng-hide-animate){display:none !important;}ng\\:form{display:block;}.ng-animate-shim{visibility:hidden;}.ng-anchor{position:absolute;}')); /***/ }), /* 14 */ @@ -57455,7 +57569,7 @@ function GlancesController($scope, GlancesStats, hotkeys, ARGUMENTS) { /* 23 */ /***/ (function(module, exports) { -var path = '/home/nicolargo/dev/glances/glances/outputs/static/js/components/glances/view.html'; +var path = '/Users/floranbrutel/dev/glances/glances/outputs/static/js/components/glances/view.html'; var html = "<div>\n <div ng-if=\"!vm.dataLoaded\" class=\"container-fluid\" id=\"loading-page\">\n <div class=\"glances-logo\"></div>\n <div class=\"loader\">Loading...</div>\n </div>\n\n <glances-help ng-if=\"vm.arguments.help_tag\"></glances-help>\n\n <div ng-if=\"vm.dataLoaded && !vm.arguments.help_tag\" class=\"container-fluid\">\n <div class=\"top-plugin\">\n <div class=\"row\">\n <div class=\"col-sm-24\">\n <div class=\"pull-left\">\n <glances-plugin-system></glances-plugin-system>\n </div>\n <div class=\"pull-left\">\n <glances-plugin-ip></glances-plugin-ip>\n </div>\n <div class=\"pull-right\">\n <glances-plugin-uptime></glances-plugin-uptime>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-sm-24\">\n <div class=\"pull-left\">\n <glances-plugin-cloud></glances-plugin-cloud>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"row\">\n <div class=\"hidden-xs hidden-sm hidden-md col-lg-6\" ng-if=\"!vm.arguments.disable_quicklook\">\n <glances-plugin-quicklook></glances-plugin-quicklook>\n </div>\n <div class=\"col-sm-6 col-md-8 col-lg-6\" ng-if=\"!vm.arguments.disable_cpu && !vm.arguments.percpu\">\n <glances-plugin-cpu></glances-plugin-cpu>\n </div>\n <div class=\"col-sm-12 col-md-8 col-lg-6\" ng-if=\"!vm.arguments.disable_cpu && vm.arguments.percpu\">\n <glances-plugin-percpu></glances-plugin-percpu>\n </div>\n <div class=\"col-sm-6 col-md-4 col-lg-3\" ng-if=\"!vm.arguments.disable_gpu && vm.hasGpu\">\n <glances-plugin-gpu></glances-plugin-gpu>\n </div>\n <div class=\"col-sm-6 col-md-4 col-lg-3\" ng-if=\"!vm.arguments.disable_mem\">\n <glances-plugin-mem></glances-plugin-mem>\n </div>\n <div class=\"col-sm-6 col-md-4 col-lg-3\"\n ng-if=\"!vm.arguments.disable_mem && !(!vm.arguments.disable_gpu && vm.hasGpu)\">\n <glances-plugin-mem-more></glances-plugin-mem-more>\n </div>\n <div class=\"col-sm-6 col-md-4 col-lg-3\" ng-if=\"!vm.arguments.disable_memswap\">\n <glances-plugin-memswap></glances-plugin-memswap>\n </div>\n <div class=\"col-sm-6 col-md-4 col-lg-3\" ng-if=\"!vm.arguments.disable_load\">\n <glances-plugin-load></glances-plugin-load>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-sm-6 sidebar\" ng-if=\"!vm.arguments.disable_left_sidebar\">\n <div class=\"table\">\n <glances-plugin-network id=\"plugin-network\" class=\"plugin table-row-group\" ng-if=\"!vm.arguments.disable_network\"></glances-plugin-network>\n <glances-plugin-connections id=\"plugin-connections\" class=\"plugin table-row-group\" ng-if=\"vm.isLinux && !vm.arguments.disable_connections\"></glances-plugin-connections>\n <glances-plugin-wifi id=\"plugin-wifi\" class=\"plugin table-row-group\" ng-if=\"!vm.arguments.disable_wifi\"></glances-plugin-wifi>\n <glances-plugin-ports id=\"plugin-ports\" class=\"plugin table-row-group\" ng-if=\"!vm.arguments.disable_ports\"></glances-plugin-ports>\n <glances-plugin-diskio id=\"plugin-diskio\" class=\"plugin table-row-group\" ng-if=\"!vm.arguments.disable_diskio\"></glances-plugin-diskio>\n <glances-plugin-fs id=\"plugin-fs\" class=\"plugin table-row-group\" ng-if=\"!vm.arguments.disable_fs\"></glances-plugin-fs>\n <glances-plugin-irq id=\"plugin-irq\" class=\"plugin table-row-group\" ng-if=\"vm.arguments.enable_irq\"></glances-plugin-irq>\n <glances-plugin-folders id=\"plugin-folders\" class=\"plugin table-row-group\" ng-if=\"!vm.arguments.disable_folders\"></glances-plugin-folders>\n <glances-plugin-raid id=\"plugin-raid\" class=\"plugin table-row-group\" ng-if=\"!vm.arguments.raid\"></glances-plugin-raid>\n <glances-plugin-sensors id=\"plugin-sensors\" class=\"plugin table-row-group\" ng-if=\"!vm.arguments.disable_sensors\"></glances-plugin-sensors>\n </div>\n </div>\n <div class=\"col-sm-18\">\n <glances-plugin-docker ng-if=\"!vm.arguments.disable_docker\"></glances-plugin-docker>\n <glances-plugin-alert ng-if=\"!vm.arguments.disable_alert\"></glances-plugin-alert>\n <glances-plugin-process></glances-plugin-process>\n </div>\n </div>\n </div>\n</div>\n"; window.angular.module('ng').run(['$templateCache', function(c) { c.put(path, html) }]); module.exports = path; @@ -57503,7 +57617,7 @@ function GlancesHelpController($http) { /* 26 */ /***/ (function(module, exports) { -var path = '/home/nicolargo/dev/glances/glances/outputs/static/js/components/help/view.html'; +var path = '/Users/floranbrutel/dev/glances/glances/outputs/static/js/components/help/view.html'; var html = "<div class=\"container-fluid\">\n <div class=\"row\">\n <div class=\"col-sm-12 col-lg-24\">{{vm.help.version}} {{vm.help.psutil_version}}</div>\n </div>\n <div class=\"row\"> </div>\n <div class=\"row\">\n <div class=\"col-sm-12 col-lg-24\">{{vm.help.configuration_file}}</div>\n </div>\n <div class=\"row\"> </div>\n <div class=\"row\">\n <div class=\"col-sm-12 col-lg-6\">{{vm.help.sort_auto}}</div>\n <div class=\"col-sm-12 col-lg-6\">{{vm.help.sort_network}}</div>\n </div>\n <div class=\"row\">\n <div class=\"col-sm-12 col-lg-6\">{{vm.help.sort_cpu}}</div>\n <div class=\"col-sm-12 col-lg-6\">{{vm.help.show_hide_alert}}</div>\n </div>\n <div class=\"row\">\n <div class=\"col-sm-12 col-lg-6\">{{vm.help.sort_mem}}</div>\n <div class=\"col-sm-12 col-lg-6\">{{vm.help.percpu}}</div>\n </div>\n <div class=\"row\">\n <div class=\"col-sm-12 col-lg-6\">{{vm.help.sort_user}}</div>\n <div class=\"col-sm-12 col-lg-6\">{{vm.help.show_hide_ip}}</div>\n </div>\n <div class=\"row\">\n <div class=\"col-sm-12 col-lg-6\">{{vm.help.sort_proc}}</div>\n <div class=\"col-sm-12 col-lg-6\">{{vm.help.enable_disable_docker}}</div>\n </div>\n <div class=\"row\">\n <div class=\"col-sm-12 col-lg-6\">{{vm.help.sort_io}}</div>\n <div class=\"col-sm-12 col-lg-6\">{{vm.help.view_network_io_combination}}</div>\n </div>\n <div class=\"row\">\n <div class=\"col-sm-12 col-lg-6\">{{vm.help.sort_cpu_times}}</div>\n <div class=\"col-sm-12 col-lg-6\">{{vm.help.view_cumulative_network}}</div>\n </div>\n <div class=\"row\">\n <div class=\"col-sm-12 col-lg-6\">{{vm.help.show_hide_diskio}}</div>\n <div class=\"col-sm-12 col-lg-6\">{{vm.help.show_hide_filesytem_freespace}}</div>\n </div>\n <div class=\"row\">\n <div class=\"col-sm-12 col-lg-6\">{{vm.help.show_hide_filesystem}}</div>\n <div class=\"col-sm-12 col-lg-6\">{{vm.help.show_hide_vm.help}}</div>\n </div>\n <div class=\"row\">\n <div class=\"col-sm-12 col-lg-6\">{{vm.help.show_hide_network}}</div>\n <div class=\"col-sm-12 col-lg-6\">{{vm.help.diskio_iops}}</div>\n </div>\n <div class=\"row\">\n <div class=\"col-sm-12 col-lg-6\">{{vm.help.show_hide_sensors}}</div>\n <div class=\"col-sm-12 col-lg-6\">{{vm.help.show_hide_top_menu}}</div>\n </div>\n <div class=\"row\">\n <div class=\"col-sm-12 col-lg-6\">{{vm.help.show_hide_left_sidebar}}</div>\n <div class=\"col-sm-12 col-lg-6\">{{vm.help.show_hide_amp}}</div>\n </div>\n <div class=\"row\">\n <div class=\"col-sm-12 col-lg-6\">{{vm.help.enable_disable_process_stats}}</div>\n <div class=\"col-sm-12 col-lg-6\">{{vm.help.show_hide_irq}}</div>\n </div>\n <div class=\"row\">\n <div class=\"col-sm-12 col-lg-6\">{{vm.help.enable_disable_gpu}}</div>\n <div class=\"col-sm-12 col-lg-6\">{{vm.help.enable_disable_mean_gpu}}</div>\n </div>\n <div class=\"row\">\n <div class=\"col-sm-12 col-lg-6\">{{vm.help.enable_disable_quick_look}}</div>\n <div class=\"col-sm-12 col-lg-6\"></div>\n </div>\n <div class=\"row\">\n <div class=\"col-sm-12 col-lg-6\">{{vm.help.enable_disable_short_processname}}</div>\n <div class=\"col-sm-12 col-lg-6\"></div>\n </div>\n <div class=\"row\">\n <div class=\"col-sm-12 col-lg-6\">{{vm.help.enable_disable_ports}}</div>\n <div class=\"col-sm-12 col-lg-6\"></div>\n </div>\n\n</div>\n"; window.angular.module('ng').run(['$templateCache', function(c) { c.put(path, html) }]); module.exports = path; @@ -57607,7 +57721,7 @@ function GlancesPluginAlertController($scope, favicoService) { /* 29 */ /***/ (function(module, exports) { -var path = '/home/nicolargo/dev/glances/glances/outputs/static/js/components/plugin-alert/view.html'; +var path = '/Users/floranbrutel/dev/glances/glances/outputs/static/js/components/plugin-alert/view.html'; var html = "<section id=\"alerts\">\n <span class=\"title\" ng-if=\"!vm.hasAlerts()\">No warning or critical alert detected</span>\n <span class=\"title\" ng-if=\"vm.hasAlerts()\">Warning or critical alerts (last {{vm.count()}} entries)</span>\n</section>\n<section id=\"alert\" class=\"plugin\">\n <div class=\"table\">\n <div class=\"table-row\" ng-repeat=\"alert in vm.getAlerts()\">\n <div class=\"table-cell text-left\">\n {{alert.begin | date : 'yyyy-MM-dd H:mm:ss'}} ({{ alert.ongoing ? 'ongoing' : alert.duration }}) - <span\n ng-hide=\"alert.ongoing\">{{alert.level}} on</span> <span class=\"{{ alert.level | lowercase }}\">{{alert.name}}</span>\n ({{alert.max| number:1 }})\n </div>\n </div>\n </div>\n</section>\n"; window.angular.module('ng').run(['$templateCache', function(c) { c.put(path, html) }]); module.exports = path; @@ -57665,7 +57779,7 @@ function GlancesPluginAmpsController($scope, GlancesStats, favicoService) { }, this); }; - vm.getDescriptionDecoration = function (process) { + vm.getNameDecoration = function (process) { var count = process.count; var countMin = process.countmin; var countMax = process.countmax; @@ -57690,8 +57804,8 @@ function GlancesPluginAmpsController($scope, GlancesStats, favicoService) { /* 32 */ /***/ (function(module, exports) { -var path = '/home/nicolargo/dev/glances/glances/outputs/static/js/components/plugin-amps/view.html'; -var html = "<section id=\"amps\" class=\"plugin\">\n <div class=\"table\">\n <div class=\"table-row\" ng-repeat=\"process in vm.processes\">\n <div class=\"table-cell text-left\" ng-class=\"vm.getDescriptionDecoration(process)\">{{ process.name }}</div>\n <div class=\"table-cell text-left\">{{ p |