Implement NodeBalancers

This commit is contained in:
2024-08-08 19:46:58 -04:00
parent 35e9d259f5
commit 709a220e1b
22 changed files with 2585 additions and 23 deletions

View File

@ -15,7 +15,7 @@
* along with Linode Manager Classic. If not, see <https://www.gnu.org/licenses/>.
*/
import { settings, elements, apiDelete, apiGet, apiPost, drawSeries, eventTitles, parseParams, setupHeader, timeString, translateKernel } from "/global.js";
import { settings, elements, apiDelete, apiGet, apiPost, countSI, drawSeries, eventTitles, parseParams, setupHeader, timeString, translateKernel } from "/global.js";
(function()
{
@ -233,24 +233,6 @@ import { settings, elements, apiDelete, apiGet, apiPost, drawSeries, eventTitles
apiPost("/linode/instances/" + data.params.lid + "/boot", request, callback);
};
// Convert an unqualified count into a string with an SI prefix (i.e. bytes to MB/GB/etc)
var countSI = function(count)
{
var prefix = "KMGTPEZY";
var unit = "";
for (var i = 0; i < prefix.length; i++) {
if (count >= 1024) {
count /= 1024;
unit = prefix.charAt(i);
} else {
break;
}
}
return count.toFixed(2) + " " + unit;
};
// Generate a config profile table row
var createConfigRow = function(config)
{