Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

20
LINES

< > BotCompany Repo | #1014295 // Show disk status of all 3 servers (OK)

JavaX source code (desktop) [tags: use-pretranspiled] - run with: x30.jar

Download Jar. Uses 994K of libraries. Click here for Pure Java version (8325L/43K).

!7

static int timeout = 10000;

// TODO: spam

p {
  final PGauge gauge1 = pMain(PGauge);
  final PGauge gauge2 = pMain(PGauge);
  final PGauge gauge3 = pMain(PGauge);
  setWindowsY(screenHeight()/2+10, centerArrangeWindows(coActivateFrames(pFrame(gauge2), pFrame(gauge1), pFrame(gauge3))));
  hideConsole();

  repeat with sleep 60 {
    S cmd = "disk space";
    pgauge_showDiskSpace(gauge1, "Very old server's disk", parseDiskSpacePercentage(print(loadPageWithTimeoutOrNull(timeout, "http://tinybrain.de:8080/tb-int/diskspace.php?q=" + urlencode(cmd)))));
    pgauge_showDiskSpace(gauge2, "Old server's disk", parseDiskSpacePercentage(print(loadPageWithTimeoutOrNull(timeout, "http://botcompany.de/1001951/raw/" + urlencode(cmd)))));
    pgauge_showDiskSpace(gauge3, "New server's disk", parseDiskSpacePercentage(print(loadPageWithTimeoutOrNull(timeout, "http://butter.botcompany.de:8080/1001951/raw/" + urlencode(cmd)))));
  }
}

Author comment

Began life as a copy of #1014291

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1014295
Snippet name: Show disk status of all 3 servers (OK)
Eternal ID of this version: #1014295/16
Text MD5: fd1f5fa34b75565536dda77320125d77
Transpilation MD5: 067e845b851acb53d536de35daf08760
Author: stefan
Category: javax
Type: JavaX source code (desktop)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-04-20 02:44:42
Source code size: 952 bytes / 20 lines
Pitched / IR pitched: No / No
Views / Downloads: 464 / 1055
Version history: 15 change(s)
Referenced in: [show references]