Compare commits
2 Commits
feature/ta
...
b842114bb3
| Author | SHA1 | Date | |
|---|---|---|---|
| b842114bb3 | |||
| 6545e01f9b |
@@ -84,7 +84,6 @@ public class MdadmStatusCommand extends CommandTemplate {
|
|||||||
|
|
||||||
private List<String> parseHddState(Command result) {
|
private List<String> parseHddState(Command result) {
|
||||||
List<String> names = new ArrayList<>();
|
List<String> names = new ArrayList<>();
|
||||||
names.add("Number Name State");
|
|
||||||
|
|
||||||
String[] lines = result.getResponse().split("\n");
|
String[] lines = result.getResponse().split("\n");
|
||||||
|
|
||||||
@@ -101,7 +100,7 @@ public class MdadmStatusCommand extends CommandTemplate {
|
|||||||
} else {
|
} else {
|
||||||
List<String> elements = Arrays.stream(line.split(" "))
|
List<String> elements = Arrays.stream(line.split(" "))
|
||||||
.filter(x -> !Objects.equals(x, "")).toList();
|
.filter(x -> !Objects.equals(x, "")).toList();
|
||||||
|
names.add("Number Name State");
|
||||||
names.add(elements.get(0) + ", "
|
names.add(elements.get(0) + ", "
|
||||||
+ elements.get(6) + ", "
|
+ elements.get(6) + ", "
|
||||||
+ elements.get(4) + " "
|
+ elements.get(4) + " "
|
||||||
|
|||||||
@@ -26,17 +26,14 @@ public class TelegramBotKeyboard implements UiFormer {
|
|||||||
|
|
||||||
ArrayList<KeyboardRow> keyboardRows = new ArrayList<>();
|
ArrayList<KeyboardRow> keyboardRows = new ArrayList<>();
|
||||||
|
|
||||||
KeyboardRow keyboardRow1 = new KeyboardRow();
|
KeyboardRow keyboardRow = new KeyboardRow();
|
||||||
keyboardRows.add(keyboardRow1);
|
keyboardRows.add(keyboardRow);
|
||||||
|
|
||||||
keyboardRow1.add(new KeyboardButton(STATUS));
|
keyboardRow.add(new KeyboardButton(STATUS));
|
||||||
keyboardRow1.add(new KeyboardButton(UNAME));
|
keyboardRow.add(new KeyboardButton(UNAME));
|
||||||
keyboardRow1.add(new KeyboardButton(CPU_TEMP));
|
keyboardRow.add(new KeyboardButton(CPU_TEMP));
|
||||||
keyboardRow1.add(new KeyboardButton(HDD_TEMP));
|
keyboardRow.add(new KeyboardButton(HDD_TEMP));
|
||||||
|
keyboardRow.add(new KeyboardButton(MDADM));
|
||||||
KeyboardRow keyboardRow2 = new KeyboardRow();
|
|
||||||
keyboardRows.add(keyboardRow2);
|
|
||||||
keyboardRow2.add(new KeyboardButton(MDADM));
|
|
||||||
|
|
||||||
replyKeyboardMarkup.setKeyboard(keyboardRows);
|
replyKeyboardMarkup.setKeyboard(keyboardRows);
|
||||||
message.setReplyMarkup(replyKeyboardMarkup);
|
message.setReplyMarkup(replyKeyboardMarkup);
|
||||||
|
|||||||
Reference in New Issue
Block a user