mirror of
https://github.com/unraid/webgui.git
synced 2026-01-06 17:49:58 -06:00
Merge branch 'master' into inhibitGUIsearch
This commit is contained in:
@@ -1447,7 +1447,7 @@ function getMillisPerPixel(timeInSeconds, containerId) {
|
||||
// SmoothieCharts initialization
|
||||
var cpuchart = new SmoothieChart({
|
||||
millisPerPixel: (cpuline * 1000) / 600, // Safe initial value
|
||||
minValue: -0.5,
|
||||
minValue: 0,
|
||||
maxValue: 100,
|
||||
responsive: true,
|
||||
grid: {
|
||||
@@ -1463,9 +1463,8 @@ var cpuchart = new SmoothieChart({
|
||||
precision: 0
|
||||
},
|
||||
timestampFormatter: function(date) { return ''; },
|
||||
yRangeFunction: function(range) {
|
||||
return { min: -0.5, max: 100 };
|
||||
},
|
||||
minValueScale: 1.02,
|
||||
maxValueScale: 1.02,
|
||||
yMinFormatter: function(value) {
|
||||
return Math.max(0, Math.floor(value));
|
||||
},
|
||||
@@ -1491,7 +1490,8 @@ var netchart = new SmoothieChart({
|
||||
placement: 'left'
|
||||
},
|
||||
timestampFormatter: function(date) { return ''; },
|
||||
maxValueScale: 1.0,
|
||||
minValueScale: 1.02,
|
||||
maxValueScale: 1.02,
|
||||
yMaxFormatter: function(value) {
|
||||
if (value >= 1000) {
|
||||
return Math.floor(value / 1000) + ' Mbps';
|
||||
@@ -1726,10 +1726,10 @@ function updateCPUBarCharts() {
|
||||
$cpuElements.text(cpuLoadText).css({'color': cpuLoadFontColor});
|
||||
|
||||
// Only call alive() if color actually changed
|
||||
if (cpuLoadColor !== lastCpuValues.color) {
|
||||
//if (cpuLoadColor !== lastCpuValues.color) {
|
||||
$cpuAliveElements.alive(cpuLoadText, cpuLoadColor);
|
||||
lastCpuValues.color = cpuLoadColor;
|
||||
}
|
||||
// }
|
||||
|
||||
lastCpuValues.load = cpuLoad;
|
||||
lastCpuValues.fontColor = cpuLoadFontColor;
|
||||
@@ -1760,14 +1760,14 @@ function updateCPUBarCharts() {
|
||||
|
||||
// Only update alive() if color changed
|
||||
const lastCore = lastCpuValues.coreValues[index] || {};
|
||||
if (coreColor !== lastCore.color) {
|
||||
//if (coreColor !== lastCore.color) {
|
||||
cpuAliveUpdates.push({
|
||||
selector: '#cpu' + index,
|
||||
text: coreLoadText,
|
||||
color: coreColor
|
||||
});
|
||||
lastCore.color = coreColor;
|
||||
}
|
||||
// }
|
||||
|
||||
// Update cache
|
||||
lastCpuValues.coreValues[index] = {
|
||||
@@ -2774,4 +2774,4 @@ $(function() {
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
</script>
|
||||
|
||||
@@ -54,8 +54,8 @@ Q.find=(function(){var aP=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][
|
||||
/* Modified by Andrew Zawadzki - Changed variable code to be codeAZ due to conflict with const code in vue */
|
||||
shortcut={all_shortcuts:{},add:function(l,p,i){var e={type:"keydown",propagate:!1,disable_in_input:!1,target:document,keycode:!1};if(i)for(var t in e)void 0===i[t]&&(i[t]=e[t]);else i=e;var a=i.target;"string"==typeof i.target&&(a=document.getElementById(i.target));l=l.toLowerCase();function r(e){var t;if(e=e||window.event,!i.disable_in_input||(e.target?t=e.target:e.srcElement&&(t=e.srcElement),3==t.nodeType&&(t=t.parentNode),"INPUT"!=t.tagName&&"TEXTAREA"!=t.tagName)){e.keyCode?codeAZ=e.keyCode:e.which&&(codeAZ=e.which);var a=String.fromCharCode(codeAZ).toLowerCase();188==codeAZ&&(a=","),190==codeAZ&&(a=".");var r=l.split("+"),n=0,s={"`":"~",1:"!",2:"@",3:"#",4:"$",5:"%",6:"^",7:"&",8:"*",9:"(",0:")","-":"_","=":"+",";":":","'":'"',",":"<",".":">","/":"?","\\":"|"},o={esc:27,escape:27,tab:9,space:32,return:13,enter:13,backspace:8,scrolllock:145,scroll_lock:145,scroll:145,capslock:20,caps_lock:20,caps:20,numlock:144,num_lock:144,num:144,pause:19,break:19,insert:45,home:36,delete:46,end:35,pageup:33,page_up:33,pu:33,pagedown:34,page_down:34,pd:34,left:37,up:38,right:39,down:40,f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123},d={shift:{wanted:!1,pressed:!1},ctrl:{wanted:!1,pressed:!1},alt:{wanted:!1,pressed:!1},meta:{wanted:!1,pressed:!1}};e.ctrlKey&&(d.ctrl.pressed=!0),e.shiftKey&&(d.shift.pressed=!0),e.altKey&&(d.alt.pressed=!0),e.metaKey&&(d.meta.pressed=!0);for(var c=0;k=r[c],c<r.length;c++)"ctrl"==k||"control"==k?(n++,d.ctrl.wanted=!0):"shift"==k?(n++,d.shift.wanted=!0):"alt"==k?(n++,d.alt.wanted=!0):"meta"==k?(n++,d.meta.wanted=!0):1<k.length?o[k]==codeAZ&&n++:i.keycode?i.keycode==codeAZ&&n++:a==k?n++:s[a]&&e.shiftKey&&(a=s[a])==k&&n++;return n!=r.length||d.ctrl.pressed!=d.ctrl.wanted||d.shift.pressed!=d.shift.wanted||d.alt.pressed!=d.alt.wanted||d.meta.pressed!=d.meta.wanted||(p(e),i.propagate)?void 0:(e.cancelBubble=!0,e.returnValue=!1,e.stopPropagation&&(e.stopPropagation(),e.preventDefault()),!1)}}this.all_shortcuts[l]={callback:r,target:a,event:i.type},a.addEventListener?a.addEventListener(i.type,r,!1):a.attachEvent?a.attachEvent("on"+i.type,r):a["on"+i.type]=r},remove:function(e){e=e.toLowerCase();var t=this.all_shortcuts[e];if(delete this.all_shortcuts[e],t){var a=t.event,r=t.target,n=t.callback;r.detachEvent?r.detachEvent("on"+a,n):r.removeEventListener?r.removeEventListener(a,n,!1):r["on"+a]=!1}}};
|
||||
|
||||
/* readmore.js - v2.1.0 PERFORMANCE OPTIMIZED for Unraid Docker page */
|
||||
(function(c){function g(b,a){this.element=b;this.options=c.extend({},h,a);c(this.element).data("max-height",this.options.maxHeight);c(this.element).data("height-margin",this.options.heightMargin);delete this.options.maxHeight;if(this.options.embedCSS&&!k){var d=".readmore-js-toggle, .readmore-js-section { "+this.options.sectionCSS+" } .readmore-js-section { overflow: hidden; }",e=document.createElement("style");e.type="text/css";e.styleSheet?e.styleSheet.cssText=d:e.appendChild(document.createTextNode(d));document.getElementsByTagName("head")[0].appendChild(e);k=!0}this._defaults=h;this._name=f;this.init()}var f="readmore",h={speed:100,maxHeight:200,heightMargin:16,moreLink:'<a href="#">Read More</a>',lessLink:'<a href="#">Close</a>',embedCSS:!0,sectionCSS:"display: block; width: 100%;",startOpen:!1,expandedClass:"readmore-js-expanded",collapsedClass:"readmore-js-collapsed",beforeToggle:function(){},afterToggle:function(){}},k=!1,resizeTimer=null,measuredHeights=new WeakMap();g.prototype={init:function(){var b=this;c(this.element).each(function(){var a=c(this),d=a.css("max-height").replace(/[^-\d\.]/g,"")>a.data("max-height")?a.css("max-height").replace(/[^-\d\.]/g,""):a.data("max-height"),e=a.data("height-margin");"none"!=a.css("max-height")&&a.css("max-height","none");var expandedHeight=b.getBoxHeight(a);if(a.outerHeight(!0)<=d+e)return!0;a.addClass("readmore-js-section "+b.options.collapsedClass).data("collapsedHeight",d).data("expandedHeight",expandedHeight);var toggle=c(b.options.startOpen?b.options.lessLink:b.options.moreLink).on("click",function(c){b.toggleSlider(this,a,c)}).addClass("readmore-js-toggle");a.after(toggle);b.options.startOpen||a.css({height:d})});c(window).on("resize.readmore",function(a){clearTimeout(resizeTimer);resizeTimer=setTimeout(function(){b.resizeBoxes()},250)})},toggleSlider:function(b,a,d){d.preventDefault();var e=this;var collapsed=a.hasClass(e.options.collapsedClass);var newHeight=collapsed?a.data("expandedHeight"):a.data("collapsedHeight");var newLink=collapsed?e.options.lessLink:e.options.moreLink;var sectionClass=collapsed?e.options.expandedClass:e.options.collapsedClass;e.options.beforeToggle(b,a,collapsed);c(a).animate({height:newHeight},{duration:e.options.speed,complete:function(){e.options.afterToggle(b,a,collapsed);var newToggle=c(newLink).on("click",function(c){e.toggleSlider(this,a,c)}).addClass("readmore-js-toggle");c(b).replaceWith(newToggle);c(this).removeClass(e.options.collapsedClass+" "+e.options.expandedClass).addClass(sectionClass)}})},getBoxHeight:function(b){var cached=measuredHeights.get(b[0]);if(cached)return cached;var origHeight=b.css("height");b.css({height:"auto"});var expandedHeight=b.outerHeight(!0);b.css({height:origHeight});measuredHeights.set(b[0],expandedHeight);return expandedHeight},resizeBoxes:function(){var b=this;measuredHeights=new WeakMap();c(".readmore-js-section").each(function(){var a=c(this);var expandedHeight=b.getBoxHeight(a);a.data("expandedHeight",expandedHeight);if(a.hasClass(b.options.expandedClass)){a.css("height",expandedHeight+"px")}})},destroy:function(){var b=this;c(window).off("resize.readmore");c(this.element).each(function(){var a=c(this);a.removeClass("readmore-js-section "+b.options.collapsedClass+" "+b.options.expandedClass).css({"max-height":"",height:"auto"}).next(".readmore-js-toggle").remove();a.removeData();measuredHeights.delete(a[0])})}};c.fn[f]=function(b){var a=arguments;if(void 0===b||"object"===typeof b)return this.each(function(){if(c.data(this,"plugin_"+f)){var a=c.data(this,"plugin_"+f);a.destroy.apply(a)}c.data(this,"plugin_"+f,new g(this,b))});if("string"===typeof b&&"_"!==b[0]&&"init"!==b)return this.each(function(){var d=c.data(this,"plugin_"+f);d instanceof g&&"function"===typeof d[b]&&d[b].apply(d,Array.prototype.slice.call(a,1))})}})(jQuery);
|
||||
/* readmore.js - v2.3.0 PERFORMANCE OPTIMIZED for Unraid Docker page - No animations */
|
||||
(function(c){function g(b,a){this.element=b;this.options=c.extend({},h,a);c(this.element).data("max-height",this.options.maxHeight);c(this.element).data("height-margin",this.options.heightMargin);delete this.options.maxHeight;if(this.options.embedCSS&&!k){var d=".readmore-js-toggle, .readmore-js-section { "+this.options.sectionCSS+" } .readmore-js-section { overflow: hidden; }",e=document.createElement("style");e.type="text/css";e.styleSheet?e.styleSheet.cssText=d:e.appendChild(document.createTextNode(d));document.getElementsByTagName("head")[0].appendChild(e);k=!0}this._defaults=h;this._name=f;this.init()}var f="readmore",h={speed:0,maxHeight:200,heightMargin:16,moreLink:'<a href="#">Read More</a>',lessLink:'<a href="#">Close</a>',embedCSS:!0,sectionCSS:"display: block; width: 100%;",startOpen:!1,expandedClass:"readmore-js-expanded",collapsedClass:"readmore-js-collapsed",beforeToggle:function(){},afterToggle:function(){}},k=!1,resizeTimer=null,measuredHeights=new WeakMap();g.prototype={init:function(){var b=this;c(this.element).each(function(){var a=c(this);if(a.hasClass("readmore-js-section")){return}var d=a.css("max-height").replace(/[^-\d\.]/g,"")>a.data("max-height")?a.css("max-height").replace(/[^-\d\.]/g,""):a.data("max-height"),e=a.data("height-margin");"none"!=a.css("max-height")&&a.css("max-height","none");a.css({height:"auto",overflow:"visible"});var expandedHeight=a.outerHeight(!0);if(expandedHeight<=d+e){a.css({height:"",overflow:""});return!0}a.addClass("readmore-js-section "+b.options.collapsedClass).data("collapsedHeight",d).data("expandedHeight",expandedHeight);if(!b.options.startOpen){a.css({height:d+"px",overflow:"hidden"})}else{a.css({height:expandedHeight+"px"})}var toggle=c(b.options.startOpen?b.options.lessLink:b.options.moreLink).on("click",function(c){b.toggleSlider(this,a,c)}).addClass("readmore-js-toggle");a.after(toggle)});c(window).off("resize.readmore").on("resize.readmore",function(a){clearTimeout(resizeTimer);resizeTimer=setTimeout(function(){b.resizeBoxes()},250)})},toggleSlider:function(b,a,d){d.preventDefault();var e=this;var collapsed=a.hasClass(e.options.collapsedClass);var newHeight=collapsed?a.data("expandedHeight"):a.data("collapsedHeight");if(!newHeight||newHeight==0){a.css({height:"auto",overflow:"visible"});newHeight=collapsed?a.outerHeight(!0):a.data("collapsedHeight");if(collapsed)a.data("expandedHeight",newHeight)}var newLink=collapsed?e.options.lessLink:e.options.moreLink;var sectionClass=collapsed?e.options.expandedClass:e.options.collapsedClass;e.options.beforeToggle(b,a,collapsed);a.css({height:newHeight+"px",overflow:collapsed?"visible":"hidden"});a.removeClass(e.options.collapsedClass+" "+e.options.expandedClass).addClass(sectionClass);var newToggle=c(newLink).on("click",function(c){e.toggleSlider(this,a,c)}).addClass("readmore-js-toggle");c(b).replaceWith(newToggle);e.options.afterToggle(b,a,collapsed)},resizeBoxes:function(){var b=this;c(".readmore-js-section").each(function(){var a=c(this);a.css({height:"auto",overflow:"visible"});var expandedHeight=a.outerHeight(!0);a.data("expandedHeight",expandedHeight);if(a.hasClass(b.options.expandedClass)){a.css({height:expandedHeight+"px"})}else if(a.hasClass(b.options.collapsedClass)){a.css({height:a.data("collapsedHeight")+"px",overflow:"hidden"})}})},destroy:function(){var b=this;c(window).off("resize.readmore");c(this.element).each(function(){var a=c(this);a.removeClass("readmore-js-section "+b.options.collapsedClass+" "+b.options.expandedClass).css({"max-height":"",height:"",overflow:""}).next(".readmore-js-toggle").remove();a.removeData();measuredHeights.delete(a[0])})}};c.fn[f]=function(b){var a=arguments;if(void 0===b||"object"===typeof b)return this.each(function(){if(c.data(this,"plugin_"+f)){var a=c.data(this,"plugin_"+f);a.destroy.apply(a)}c.data(this,"plugin_"+f,new g(this,b))});if("string"===typeof b&&"_"!==b[0]&&"init"!==b)return this.each(function(){var d=c.data(this,"plugin_"+f);d instanceof g&&"function"===typeof d[b]&&d[b].apply(d,Array.prototype.slice.call(a,1))})}})(jQuery);
|
||||
/**
|
||||
* Simple, lightweight, usable local autocomplete library for modern browsers
|
||||
* Because there weren’t enough autocomplete scripts in the world? Because I’m completely insane and have NIH syndrome? Probably both. :P
|
||||
|
||||
Reference in New Issue
Block a user