Improved NS2 Web Admin

13»

Comments

  • FuhrerDarqueSydeFuhrerDarqueSyde Join Date: 2004-10-04 Member: 32076Members, Constellation
    <!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->function fixURIEncodedStringBug(str)
    {
        var fixedStr = str;
        var regexMatch1 = /\%(25){4,}/gi;
        var regexMatch2 = /(\+|\%2B)/gi;

        while (regexMatch1.test(fixedStr))
        {
            fixedStr = fixedStr.replace(regexMatch1, "%");
        }

        fixedStr = fixedStr.replace(regexMatch2, "%20");

        return decodeURIComponent(fixedStr);
    }<!--c2--></div><!--ec2-->

    That is currently what I am using right now. I slightly modified the handling of the 25s. I tried removing the %2B handling to see but it is definitely encoding the +s normally associated for the spaces to %2B so I HAVE to handle them.
  • ChaguiChagui Join Date: 2008-03-01 Member: 63773Members
    <!--quoteo(post=2066930:date=Jan 26 2013, 05:41 AM:name=mbrick)--><div class='quotetop'>QUOTE (mbrick @ Jan 26 2013, 05:41 AM) <a href="index.php?act=findpost&pid=2066930"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Any chance you can fix the time scale on the performance monitor page? Across the bottom I see: 0:01, 0:01, 1:01, 1:01, 1:01. Is it resetting after each round and expanding to show the entire round? Or 1 hr total?<!--QuoteEnd--></div><!--QuoteEEnd-->

    This code should fix the time scale. Also makes two independent Y-axis, one for tickrate (left) and one for players (right).

    <!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->function showPerfChart()
    {
        $('#perfchart').empty();
        $.jqplot('perfchart',performance_data,{
            title: 'Server Performance',
                axes:{    
                        xaxis:{
                            pad:0,                          
                            renderer:$.jqplot.DateAxisRenderer,
                            tickOptions:{formatString:'%H:%M'},
                            numberTicks: 12    
                            },
                        yaxis:{
                            // tickRenderer:$.jqplot.CanvasAxisTickRenderer,
                            // label:'Tickrate',
                            useSeriesColor: true,
                            min:0,
                            tickOptions: {showGridline: true},
                            tickInterval: 5},
                        y2axis:{
                            // label:'Players',
                            useSeriesColor: true,
                            min:0,
                            tickOptions: {showGridline: false},
                            tickInterval: 2}
                    },
                legend: {
                    show: true,
                    location: 'sw',
                    labels: ['Players','Tickrate'],
                    },
            seriesDefaults: { markerOptions: { show: false, }, },        
            series: [{label:'Players',yaxis:'y2axis'}, {label:'Tickrate',yaxis:'yaxis'}],        
        });
    }<!--c2--></div><!--ec2-->

    The graph dosen't reset after a round, and i think the tickrate drops to zero after map change. It would be awesome if the lua could send the round-end and change-map events.
  • WhosatWhosat Singapore Join Date: 2006-11-03 Member: 58301Members, Reinforced - Shadow
    CODEfunction fixURIEncodedStringBug(str)
    {
        var fixedStr = str;
        var regexMatch1 = /\%(25){4,}/gi;
        var regexMatch2 = /(\+|\%2B)/gi;

        while (regexMatch1.test(fixedStr))
        {
            fixedStr = fixedStr.replace(regexMatch1, "%");
        }

        fixedStr = fixedStr.replace(regexMatch2, "%20");

        return decodeURIComponent(fixedStr);
    }

    That is currently what I am using right now. I slightly modified the handling of the 25s. I tried removing the %2B handling to see but it is definitely encoding the +s normally associated for the spaces to %2B so I HAVE to handle them.

    How different was it from the previous handling of the code?
  • ProplusProplus Join Date: 2012-12-08 Member: 174523Members
    mbrick wrote: »
    Any chance you can fix the time scale on the performance monitor page? Across the bottom I see: 0:01, 0:01, 1:01, 1:01, 1:01. Is it resetting after each round and expanding to show the entire round? Or 1 hr total?

    I made a post before the forum upgrade but I think it got lost in the wash.

    The graph scales already, you're seeing those times because it hasn't been running long enough or you keep refreshing it. You can switch between tabs in the web admin but don't refresh. This graph is even missing a couple of hour markers because it's become squashed up!

    rnIyw1w.png
    Additionally the chat window will usually stop working after a while forcing you to refresh the page and resetting the graph.
  • -pANIC--pANIC- Join Date: 2013-01-13 Member: 179295Members, Reinforced - Gold
    Which is the latest file to download for the improve UI?
  • ProplusProplus Join Date: 2012-12-08 Member: 174523Members
    Whosat wrote: »
    Incorporated Fuhrer's chat fix and submitted a pull request to devicenull for ns2web.

    Also includes all the community improvements in this thread.

    And I've also made the Change Map dropdown use maps from the maps list on the server, and you may also double-click the maps on the Maps tab to change to that map.

    https://github.com/ShrmnK/ns2web

    this is the one I installed, the chat garbage is fixed which is great. Thanks to all who fixed this!


    I have three banned players who I cannot unban through the web interface, it was supposed to be a 24h ban but the times are showing up as 13465859873 and clicking unban does nothing, I haven't tried to unban them directly through server commands yet.. heh
  • WhosatWhosat Singapore Join Date: 2006-11-03 Member: 58301Members, Reinforced - Shadow
    Proplus wrote: »
    I have three banned players who I cannot unban through the web interface, it was supposed to be a 24h ban but the times are showing up as 13465859873 and clicking unban does nothing, I haven't tried to unban them directly through server commands yet.. heh

    Build 238 carries the one on https://github.com/ShrmnK/ns2web (which has also been pulled into the main repository, https://github.com/devicenull/ns2web

    If you can verify that this unban issue is specific to the web interface, I will take a look at it later after work :)
  • dethovudethovu Join Date: 2009-06-23 Member: 67906Members
    edited February 2013
    Is there anyway at all to have the following done to the web admin:

    1. Display the chat window at the top of the page. This is for the obvious reason that as people join and leave the server, the chat window as it resides now gets pushed down and eventually out of the screen.

    2. Display Steam IDs in the chat. So trolls can be spotted and dealt with.

    3. Log the chat and/or player connections. So trolls can be spotted and dealt with later.

    It would be absolutely fantastic if these could be implemented somehow. As it stands now, web admin feels extremely crippled when you're away from the screen.
  • SeeVeeSeeVee Join Date: 2012-10-31 Member: 165206Members
    edited February 2013
    @ dethovu: I use DAK admin mod loaded through the server.lua so it is server-side only and turn on enhanced logging feature. Captures IP's, names and steam ID's. It creates a new log per match so it's easy to search through :)
  • FaustFaust Join Date: 2004-11-18 Member: 32852Members, Constellation, Reinforced - Shadow
    edited February 2013
    Proplus wrote:
    I have three banned players who I cannot unban through the web interface, it was supposed to be a 24h ban but the times are showing up as 13465859873 and clicking unban does nothing, I haven't tried to unban them directly through server commands yet.. heh

    This happens with the native web interface. In fact I'd like to report these issues, but I'm not sure where I can do this.
  • WhosatWhosat Singapore Join Date: 2006-11-03 Member: 58301Members, Reinforced - Shadow
    Issues? Or do you mean suggestions? You can put them up here as the web admin interface is more or less a community project.

    Hopefully someone with the expertise can come and implement these.

    But to my knowledge, the steamIDs are not returned in the ?request=getchatlist JSON response. The devs will have to implement this in the server code.
  • FaustFaust Join Date: 2004-11-18 Member: 32852Members, Constellation, Reinforced - Shadow
    edited February 2013
    I actually quoted the wrong person, woops! I edited my previous post.

    Edit: Server-related bugs can be reported here: https://groups.google.com/forum/?fromgroups#!forum/uwe-server-ops
Sign In or Register to comment.