This commit is contained in:
parent
23261fbb5c
commit
023ee097b0
Binary file not shown.
|
@ -104,6 +104,7 @@ void mdCommander::driver() {
|
|||
cbreak();
|
||||
greet();
|
||||
while(acceptingInput) {
|
||||
refresh();
|
||||
mvprintw(row-1,1,"> ");
|
||||
next=0;
|
||||
i=0;
|
||||
|
@ -251,7 +252,7 @@ void mdCommander::say(char *what)
|
|||
void mdCommander::greet() {
|
||||
|
||||
const char *title="AusReg Cliever Commander",
|
||||
*prompt="? for main menu or enter commander command now";
|
||||
*prompt="Enter ? or command";
|
||||
|
||||
sprintf(theBanner,banner,thisConfig->shellProcess);
|
||||
getmaxyx(stdscr,row,col);
|
||||
|
@ -260,23 +261,24 @@ void mdCommander::greet() {
|
|||
mvprintw(row-2,1,"%s",prompt);
|
||||
refresh();
|
||||
acceptingInput = true;
|
||||
EPPmode = true;
|
||||
|
||||
}
|
||||
void mdCommander::help() {
|
||||
|
||||
|
||||
const char *prompt="Enter command";
|
||||
|
||||
doHeader();
|
||||
mvprintw(5,10," a - AC system control menu");
|
||||
mvprintw(6,10," e - standard EPP command menu");
|
||||
mvprintw(7,10," ? - display this screen");
|
||||
mvprintw(5,10," a - AC system");
|
||||
mvprintw(6,10," e - EPP ");
|
||||
mvprintw(7,10," ? - this screen");
|
||||
mvprintw(8,10," ?? - display commands");
|
||||
mvprintw(9,10," ! - run the active command");
|
||||
mvprintw(10,10," !! - run active commands");
|
||||
mvprintw(11,10," C<n> - make <n> the active command");
|
||||
mvprintw(12,10," E<n> - display/edit command <n> ");
|
||||
mvprintw(13,10," S<n> - send command <n>");
|
||||
mvprintw(14,10," X<n> - discard the command(s)");
|
||||
mvprintw(15,10," <n> - make <n> the target EPP server");
|
||||
mvprintw(9,10," ! - run ");
|
||||
mvprintw(10,10," !! - run all active");
|
||||
mvprintw(11,10," C<n> - make <n> the current command");
|
||||
mvprintw(12,10," E<n> - display/edit <n> ");
|
||||
mvprintw(13,10," S<n> - send <n>");
|
||||
mvprintw(14,10," X<n> - discard ");
|
||||
mvprintw(15,10," <n> - make <n> the target device");
|
||||
mvprintw(16,10," log - display this cliever's log");
|
||||
mvprintw(17,10," mlog - display the master daemon log");
|
||||
mvprintw(18,10," done - terminate commander but not process");
|
||||
|
@ -284,6 +286,8 @@ void mdCommander::help() {
|
|||
mvprintw(23,5,"<n> is an integer, above active everywhere outside data entry (>>)");
|
||||
mvprintw(24,5,"no space before <n>, X0 to delete all commands.");
|
||||
|
||||
mvprintw(row-2,1,"%s",prompt);
|
||||
refresh();
|
||||
}
|
||||
void mdCommander::eppMainMenu() {
|
||||
|
||||
|
@ -302,16 +306,33 @@ void mdCommander::eppMainMenu() {
|
|||
mvprintw(22,10," D - delete");
|
||||
mvprintw(23,10," T - transfer");
|
||||
|
||||
say((char *)"Action letter or ? to exit");
|
||||
}
|
||||
void mdCommander::acMainMenu() {
|
||||
|
||||
char selection[10];
|
||||
|
||||
doHeader();
|
||||
mvprintw(5,(col-strlen("AC System Directives"))/2,"AC System Directives");
|
||||
|
||||
mvprintw(15,10," (H)ALT - Flush queues, stop, ignore incoming requests");
|
||||
mvprintw(16,10," (L)OAD - Resume execution, accept work");
|
||||
mvprintw(17,10," (B)ANG - Force reload the entire AC system");
|
||||
mvprintw(20,10,"These are only active on this screen, there's no confirmation.");
|
||||
mvprintw(20,10,"Only active on this screen, there's no confirmation.");
|
||||
|
||||
say((char *)"Select Action letter or anything else to exit");
|
||||
prompt(false);
|
||||
mvgetstr(row-1,2,selection);
|
||||
switch(selection[0]) {
|
||||
case 'H':
|
||||
break;
|
||||
case 'L':
|
||||
break;
|
||||
case 'B':
|
||||
break;
|
||||
}
|
||||
|
||||
help();
|
||||
|
||||
}
|
||||
bool sendEPPCommand() {
|
||||
|
@ -429,7 +450,7 @@ const char *befehlJetzt = cmdNames[commandsNow[cmdNow]];
|
|||
nocbreak();
|
||||
while(true) {
|
||||
showCommand(false);
|
||||
say((char *)"line no to replace, A to add, enter to return");
|
||||
say((char *)"line no. to replace, A to add, enter to return");
|
||||
prompt(false);
|
||||
mvgetstr(row-1,2,sp);
|
||||
if (!strlen(sp)) goto done;
|
||||
|
@ -462,8 +483,14 @@ const char *befehlJetzt = cmdNames[commandsNow[cmdNow]];
|
|||
} // run / execute
|
||||
else {
|
||||
say((char *)"Press 'Y' to confirm");
|
||||
prompt(false);
|
||||
mvgetstr(row-1,2,sp);
|
||||
if (sp[0] == 'Y') return false;
|
||||
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
};
|
||||
void mdCommander::check(bool run) {
|
||||
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
class mdCommander {
|
||||
|
||||
bool acceptingInput,deleted[MAX_CMDS];
|
||||
bool EPPmode; // RFC 9
|
||||
int activeCommands, argsNow[MAX_CMDS], cmdNow, cmdsNow, mdStdDevIdx;
|
||||
int row,col, thisArg;
|
||||
int commandsNow[MAX_CMDS]; // type index into cmdNames
|
||||
|
|
Loading…
Reference in New Issue