Would this be an idea?

Discussion in 'Feature Requests' started by ustoopia, Jun 26, 2018.

  1. ustoopia

    ustoopia Member

    I just came up with an idea that might be interesting for ispconfig. In a multiserver setup you can edit the Server Config for each server that is part of the multiserver setup. When you open the config pages of any server here, it doesn't say anywhere on the page what server exactly you are editing. My memory is not as bad as a goldfish, yet, so usually I know what server I opened the config pages for. But other times I come back to a tab maybe a day later and then I have to ask myself, what server was I editing again? Now this is not a big deal because I can just open System->Server Config again easy and pick the server I want to edit. But wouldn't it be handy to have it show somewhere on the page what server you are currently editing? This would also be some sort of fail-safe for people who need to be sure they are changing settings on the correct server. I was just thinking that I would very much like to see a feature like that. Is it an idea perhaps?
     
    till likes this.
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    That's a good idea to avoid failures and we should implement it in ISPConfig. I've added this as a feature request in the bug tracker.
     
  3. florian030

    florian030 ISPConfig Developer ISPConfig Developer

    You mean something like this?
    add to server_config_edit.php:
    Code:
    function onShowEnd() {
      global $app;
      $app->tpl->setVar('server_name', $app->db->queryOneRecord("SELECT server_name FROM server WHERE server_id = ?", $this->id)['server_name']);
      parent::onShowEnd();
    }
    
    and use server_name in the templates. I.e. in server_config_web_edit.htm
    Code:
    <div class='page-header'>
    <h1><tmpl_var name="list_head_txt"> {tmpl_var name='server_name'}</h1>
    </div>
    
     

Share This Page