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).

1  
!7
2  
3  
static int timeout = 10000;
4  
5  
// TODO: spam
6  
7  
p {
8  
  final PGauge gauge1 = pMain(PGauge);
9  
  final PGauge gauge2 = pMain(PGauge);
10  
  final PGauge gauge3 = pMain(PGauge);
11  
  setWindowsY(screenHeight()/2+10, centerArrangeWindows(coActivateFrames(pFrame(gauge2), pFrame(gauge1), pFrame(gauge3))));
12  
  hideConsole();
13  
14  
  repeat with sleep 60 {
15  
    S cmd = "disk space";
16  
    pgauge_showDiskSpace(gauge1, "Very old server's disk", parseDiskSpacePercentage(print(loadPageWithTimeoutOrNull(timeout, "http://tinybrain.de:8080/tb-int/diskspace.php?q=" + urlencode(cmd)))));
17  
    pgauge_showDiskSpace(gauge2, "Old server's disk", parseDiskSpacePercentage(print(loadPageWithTimeoutOrNull(timeout, "http://botcompany.de/1001951/raw/" + urlencode(cmd)))));
18  
    pgauge_showDiskSpace(gauge3, "New server's disk", parseDiskSpacePercentage(print(loadPageWithTimeoutOrNull(timeout, "http://butter.botcompany.de:8080/1001951/raw/" + urlencode(cmd)))));
19  
  }
20  
}

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: 465 / 1056
Version history: 15 change(s)
Referenced in: [show references]