forked from AUEB-BALab/blockly_unix
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve system monitoring blocks and home page
- Loading branch information
Showing
12 changed files
with
443 additions
and
106 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,29 @@ | ||
var dateBlock = { | ||
type: 'date', | ||
message0: '%{BKY_DATE}', | ||
message0: '%{BKY_SYSTEM_DATE_COMMAND}', | ||
category: 'System Monitoring', | ||
unix_description: [ | ||
{ | ||
command: 'date' | ||
desc: 'Display or set the system date and time', | ||
utc_time: '-u' | ||
} | ||
], | ||
message1: '%{BKY_DATE_UTC_TIME}', | ||
args1: [ | ||
{ | ||
type: 'field_checkbox', | ||
name: 'utc_time', | ||
checked: false | ||
} | ||
], | ||
|
||
extensions: ['integer_validation'], | ||
|
||
style: 'System Monitoring', | ||
previousStatement: 'Action', | ||
nextStatement: 'Action', | ||
tooltip: '%{BKY_DATE_TOOLTIP}', | ||
helpUrl: 'https://linux.die.net/man/1/date' | ||
helpUrl: '%{BKY_DATE_HELPURL}' | ||
}; | ||
|
||
Blockly.defineBlocksWithJsonArray([dateBlock]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,58 @@ | ||
var dfBlock = { | ||
type: 'df', | ||
message0: '%{BKY_DF}', | ||
category: 'System Monitoring', | ||
category: 'System Commands', | ||
unix_description: [ | ||
{ | ||
command: 'df' | ||
desc: '-h', | ||
show_fs_type: '-T', | ||
show_total_blocks: '-B', | ||
show_used_blocks: '-u', | ||
show_available_blocks: '-a', | ||
block_size: '-k', | ||
target_fs: '-t' | ||
} | ||
], | ||
message1: '%{BKY_DF_SHOW_FS_TYPE}', | ||
args1: [ | ||
{ | ||
type: 'field_checkbox', | ||
name: 'show_fs_type', | ||
checked: false | ||
} | ||
], | ||
message2: '%{BKY_DF_SHOW_TOTAL_BLOCKS}', | ||
args2: [ | ||
{ | ||
type: 'field_checkbox', | ||
name: 'show_total_blocks', | ||
checked: false | ||
} | ||
], | ||
message3: '%{BKY_DF_SHOW_USED_BLOCKS}', | ||
args3: [ | ||
{ | ||
type: 'field_checkbox', | ||
name: 'show_used_blocks', | ||
checked: false | ||
} | ||
], | ||
message4: '%{BKY_DF_SHOW_AVAILABLE_BLOCKS}', | ||
args4: [ | ||
{ | ||
type: 'field_checkbox', | ||
name: 'show_available_blocks', | ||
checked: false | ||
} | ||
], | ||
|
||
extensions: ['integer_validation'], | ||
|
||
style: 'System Monitoring', | ||
previousStatement: 'Action', | ||
nextStatement: 'Action', | ||
tooltip: '%{BKY_DF_TOOLTIP}', | ||
helpUrl: 'https://linux.die.net/man/1/df' | ||
helpUrl: '%{BKY_DF_HELPURL}' | ||
}; | ||
|
||
Blockly.defineBlocksWithJsonArray([dfBlock]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,65 @@ | ||
var hostnameBlock = { | ||
type: 'hostname', | ||
message0: '%{BKY_HOSTNAME}', | ||
message0: '%{BKY_SYSTEM_HOSTNAME_COMMAND}', | ||
category: 'System Monitoring', | ||
unix_description: [ | ||
{ | ||
command: 'hostname' | ||
desc: "Show or set the system's hostname", | ||
show_hostname: '', | ||
set_hostname: "-s'str'", | ||
show_aliases: '-a', | ||
show_ip: '-i', | ||
show_fqdn: '-f' | ||
} | ||
], | ||
message1: '%{BKY_HOSTNAME_SHOW_HOSTNAME}', | ||
args1: [ | ||
{ | ||
type: 'field_checkbox', | ||
name: 'show_hostname', | ||
checked: false | ||
} | ||
], | ||
message2: '%{BKY_HOSTNAME_SET_HOSTNAME}', | ||
args2: [ | ||
{ | ||
type: 'field_input', | ||
name: 'set_hostname', | ||
text: 'Enter new hostname' | ||
} | ||
], | ||
message3: '%{BKY_HOSTNAME_SHOW_ALIASES}', | ||
args3: [ | ||
{ | ||
type: 'field_checkbox', | ||
name: 'show_aliases', | ||
checked: false | ||
} | ||
], | ||
message4: '%{BKY_HOSTNAME_SHOW_IP}', | ||
args4: [ | ||
{ | ||
type: 'field_checkbox', | ||
name: 'show_ip', | ||
checked: false | ||
} | ||
], | ||
message5: '%{BKY_HOSTNAME_SHOW_FQDN}', | ||
args5: [ | ||
{ | ||
type: 'field_checkbox', | ||
name: 'show_fqdn', | ||
checked: false | ||
} | ||
], | ||
|
||
extensions: ['integer_validation'], | ||
|
||
style: 'System Monitoring', | ||
previousStatement: 'Action', | ||
nextStatement: 'Action', | ||
tooltip: '%{BKY_HOSTNAME_TOOLTIP}', | ||
helpUrl: 'https://linux.die.net/man/1/hostname' | ||
helpUrl: '%{BKY_HOSTNAME_HELPURL}' | ||
}; | ||
|
||
Blockly.defineBlocksWithJsonArray([hostnameBlock]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,67 @@ | ||
var psBlock = { | ||
type: 'ps', | ||
category: 'System Monitoring', | ||
message0: 'ps', | ||
message0: '%{BKY_PS}', | ||
category: 'System Commands', | ||
unix_description: [ | ||
{ | ||
command: 'ps' | ||
desc: '-e', | ||
show_all_processes: '-e', | ||
show_process_user: "-u'str'", | ||
show_process_pid: "-p'str'", | ||
format: '-o', | ||
show_thread: '-L', | ||
sort_by: '--sort', | ||
filter_by: '--pid' | ||
} | ||
], | ||
args0: [], | ||
message1: '%{BKY_PS_SHOW_ALL}', | ||
args1: [ | ||
{ | ||
type: 'field_checkbox', | ||
name: 'show_all_processes', | ||
checked: false // by default it's disabled | ||
} | ||
], | ||
message2: '%{BKY_PS_SHOW_USER}', | ||
args2: [ | ||
{ | ||
type: 'field_input', | ||
name: 'show_process_user', | ||
text: '' | ||
} | ||
], | ||
message3: '%{BKY_PS_SHOW_PID}', | ||
args3: [ | ||
{ | ||
type: 'field_input', | ||
name: 'show_process_pid', | ||
text: '' | ||
} | ||
], | ||
message4: '%{BKY_PS_FORMAT}', | ||
args4: [ | ||
{ | ||
type: 'field_input', | ||
name: 'format', | ||
text: '' | ||
} | ||
], | ||
message5: '%{BKY_PS_SHOW_THREAD}', | ||
args5: [ | ||
{ | ||
type: 'field_checkbox', | ||
name: 'show_thread', | ||
checked: false // by default it's disabled | ||
} | ||
], | ||
|
||
extensions: ['integer_validation'], | ||
|
||
style: 'System Monitoring', | ||
previousStatement: 'Action', | ||
nextStatement: 'Action', | ||
tooltip: 'Εμφανίζει πληροφορίες για τις διεργασίες που εκτελούνται.', | ||
helpUrl: 'https://linux.die.net/man/1/ps' | ||
tooltip: '%{BKY_PS_TOOLTIP}', | ||
helpUrl: '%{BKY_PS_HELPURL}' // URL to further information or documentation. | ||
}; | ||
|
||
Blockly.defineBlocksWithJsonArray([psBlock]); | ||
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.