2 Commits

Author SHA1 Message Date
b842114bb3 Merge pull request 'fix' (#36) from feature/task-11-mdadm_status into master
All checks were successful
Hedgehog_server_CD/ServerMonitorBot/pipeline/head This commit looks good
Reviewed-on: #36
2023-11-22 20:43:28 +03:00
6545e01f9b Merge pull request 'feature/task-11-mdadm_status' (#35) from feature/task-11-mdadm_status into master
All checks were successful
Hedgehog_server_CD/ServerMonitorBot/pipeline/head This commit looks good
Reviewed-on: #35
2023-11-22 20:10:07 +03:00
2 changed files with 8 additions and 12 deletions

View File

@@ -84,7 +84,6 @@ public class MdadmStatusCommand extends CommandTemplate {
private List<String> parseHddState(Command result) {
List<String> names = new ArrayList<>();
names.add("Number Name State");
String[] lines = result.getResponse().split("\n");
@@ -101,7 +100,7 @@ public class MdadmStatusCommand extends CommandTemplate {
} else {
List<String> elements = Arrays.stream(line.split(" "))
.filter(x -> !Objects.equals(x, "")).toList();
names.add("Number Name State");
names.add(elements.get(0) + ", "
+ elements.get(6) + ", "
+ elements.get(4) + " "

View File

@@ -26,17 +26,14 @@ public class TelegramBotKeyboard implements UiFormer {
ArrayList<KeyboardRow> keyboardRows = new ArrayList<>();
KeyboardRow keyboardRow1 = new KeyboardRow();
keyboardRows.add(keyboardRow1);
KeyboardRow keyboardRow = new KeyboardRow();
keyboardRows.add(keyboardRow);
keyboardRow1.add(new KeyboardButton(STATUS));
keyboardRow1.add(new KeyboardButton(UNAME));
keyboardRow1.add(new KeyboardButton(CPU_TEMP));
keyboardRow1.add(new KeyboardButton(HDD_TEMP));
KeyboardRow keyboardRow2 = new KeyboardRow();
keyboardRows.add(keyboardRow2);
keyboardRow2.add(new KeyboardButton(MDADM));
keyboardRow.add(new KeyboardButton(STATUS));
keyboardRow.add(new KeyboardButton(UNAME));
keyboardRow.add(new KeyboardButton(CPU_TEMP));
keyboardRow.add(new KeyboardButton(HDD_TEMP));
keyboardRow.add(new KeyboardButton(MDADM));
replyKeyboardMarkup.setKeyboard(keyboardRows);
message.setReplyMarkup(replyKeyboardMarkup);