Welcome to the PufferPanel community forums! If you need help please register an account and post in the Support category.

Feature suggestion: Command History



  • Hello there,

    I don't know where to post this, but I have a suggestion for a feature which would be amazing!
    It's a command history. So basically if you go to the server console and enter "say hello" and then press the Arrow-Up key
    the previous entered command appears inside the input box. So you can navigate through the Arrow-Up/Down keys
    through the command history. I made an example on how to do it in JS (because I used it for my website once)

    var history = []; 
    var index = 0;
    
    //Stuff 
    
    var e = document.getElementById(/* input field */).onkeydown = function(e)
    {
          //Stuff
    
          if(e.keyCode == 38)
          {
                if(index < history.length)
                {
                      document.getElementById(/* input field */).value = history[index];
                      this.selectionStart = this.selectionEnd = this.value.length;
                      index++;
                }
    	
                if(index == 0) //workaround undefined
                { 
                      return false;
                }  
    
                if(index == history.length) //workaround undefined index
                { 
                      index--;
                }
          }
    
          else if(e.keyCode == 40) 
          {
                if (index > 0)
                {
                      index--;
                      document.getElementById(/* input field */).value = history[index];
                      this.selectionStart = this.selectionEnd = this.value.length;
                }
    	
                else if(index == 0) //if it's 0, theres no value
                { 
                      document.getElementById(/* input field */).value = ""; 
                      //Empty the inputbox if last command reached
                }
          }
    }
    

    If someone could make a mod out of this or implement it, that would be awesome!
    Console operations would be a lot easyer then!

    Regards



  • Am I really the only one who needs that feature? :o



  • Based on the code you gave though, it'd be a local history, so if you refresh, it's gone. Is that really what you want though? Autocomplete I think works on that field.



  • Yea that would be awesome. Just like in a Commandline Terminal or even ingame.
    So you don't have to retype everything and just press Arrow Up. An auto complete would be awesome aswell!



  • From an auditing standpoint it would be very useful to have two views:

    1. A view to see which users ran what commands on each server. It would be useful to see when someone last ran a command and also would be useful to see the command history of each server overall.
    2. A view to see a particular user's actions around the panel including their commands run on each server. That would be useful to see exactly what each user is doing as whole instead of having to check each server command history view.

    From a console user's standpoint it would be useful to have both a clickable list of the 5-10 most recent commands and also have a separate list of "favorite" commands that can be set for each server individually.



3
Online

666
Users

708
Topics

3.2k
Posts

Looks like your connection to PufferPanel Community was lost, please wait while we try to reconnect.