Jump to content

A21 Dashboard Map


Hagi

Recommended Posts

On 7/6/2023 at 6:25 AM, Alloc said:

If you can't connect to the page at all it's not related to permissions. Logs might give further hints.

image.png

It doesn't seem to throw errors when starting it up. I am not trying to come off as knowing anything, but I am having some difficulty after updating to A21...

Link to comment
Share on other sites

3 hours ago, B14d3r11 said:

image.png

It doesn't seem to throw errors when starting it up. I am not trying to come off as knowing anything, but I am having some difficulty after updating to A21...

Are you behind the firewall, some routers don't like to redirect your external IP adress on the local network, maybe try from a smartphone. There's also the old "Is your firewall set to forward the port" of course. I had issues untill I added the port to the address in the serverconfig file. like ":8080" at the end.  

Link to comment
Share on other sites

9 minutes ago, rl2000 said:

Are you behind the firewall, some routers don't like to redirect your external IP adress on the local network, maybe try from a smartphone. There's also the old "Is your firewall set to forward the port" of course. I had issues untill I added the port to the address in the serverconfig file. like ":8080" at the end.  

Yeah I made sure everything was port forwarded correctly. I currently have friends playing on the server, just don't have access to the webserver portion. It may just be an issue because I am using a no-ip based redirect? I might just swap it in a minute and see lol

Edit: Just updated it to my normal external IP and yeah still unable to connect.
Edit 2: Was able to use 127.0.0.1:8080 and connect to it, just wondering why it is timing out when it is connected externally, could it be a permissions issue?

Edited by B14d3r11 (see edit history)
Link to comment
Share on other sites

  • 4 weeks later...
serveradmin.xml

<webmodules>
  <module name="web.map" permission_level="2000" />
  <module name="webapi.Command" permission_level="1000">
    <method name="GET" permission_level="inherit" />
    <method name="POST" permission_level="inherit" />
    <method name="PUT" permission_level="inherit" />
    <method name="DELETE" permission_level="inherit" />
  </module>
</webmodules>



serverConfig.xml

<property name="WebDashboardEnabled" value="true"/>
<property name="WebDashboardPort" value="8080"/>
<property name="WebDashboardUrl" value="www.mydomain.com:8080"/>
<property name="EnableMapRendering" value="true"/>


These are the exact settings that worked for me. I know the advice was that you didn't need to restart the server to add new perms, but I found that the web map didn't work until I restarted my server. Hard refreshing the browser probably wouldn't hurt either (Ctrl+F5).

Edited by Textra (see edit history)
Link to comment
Share on other sites

  • 4 weeks later...

> 1. What is "Login"? dont work at all for me
It allows you to log in to the page. The login popup tells you what to do to create a user.

 

2. why i cand "scroll" on the "mods" entry?

Bug in the first release, it's already fixed and the fixed version will be included in 21.2

 

> 3. What are "markers? Only some bvlue "?" bulbs...

It's just an example mod to show how mods can interact with this new system to add their own stuff. If you don't want it to show up you can disable it by removing permissions (i.e. permissions to e.g. -1), or you can delete the whole mod from the mods folder. 

Link to comment
Share on other sites

  • 2 weeks later...

If you have been using Alloc's extensions then you may still have the "webpermissionxs.xml" file around.  This file is no longer used and the permissions have moved into "serveradmin.xml".  I have found that if I add the module entries manually to the serveradmin.xml file in A21.2b14 that I have to restart the server for some of the values to take affect.

 

I'm using CPM so I had to add the "webapi.viewallclaims" module entry which is an extension when using Prisma's custom map.js file with the CPM mod.

 

Here is what I ended up setting so there is one more example around.  We allow our players to see the animals, other player land claims (to help with base placement), reset regions, and a few other things.

 

I set webapi.map to mods and above so that our players would have to use the legacy map so we can render the extra map information from CPM.

 

Hopefully, this helps you as this thread is a bit all over the place.

 

serverconfig.xml
    <property name="WebDashboardEnabled" value="true"/>
    <property name="WebDashboardPort" value="8080"/>
    <property name="WebDashboardUrl" value=""/>
    <property name="EnableMapRendering" value="true"/>



serveradmin.xml
    Note:  level 1 is what my moderators are set at, so mods and admins

  <webmodules>
    <module name="web.map" permission_level="2000" />
    <module name="webapi.GetAnimalsLocation" permission_level="2000" />
    <module name="webapi.GetHostileLocation" permission_level="1" />
    <module name="webapi.GetLandClaims" permission_level="2000" />
    <module name="webapi.GetPlayerInventories" permission_level="1" />
    <module name="webapi.GetPlayerInventory" permission_level="1" />
    <module name="webapi.GetPlayerList" permission_level="2000" />
    <module name="webapi.GetPlayersLocation" permission_level="1" />
    <module name="webapi.GetPlayersOnline" permission_level="1" />
    <module name="webapi.Map" permission_level="1" />
    <module name="webapi.viewallclaims" permission_level="2000" />
  </webmodules>

 

Edited by bob the big blob of goo
Typo (see edit history)
Link to comment
Share on other sites

On 9/9/2023 at 3:13 AM, bob the big blob of goo said:

I have found that if I add the module entries manually to the serveradmin.xml file in A21.2b14 that I have to restart the server for some of the values to take affect.

Would still be interested in knowing what exactly you changed and didn't seem to apply. Permissions are definitely reloaded live (you'll see that in the log output when it happens), so I assume it must be something very specific I missed.

 

On 9/9/2023 at 3:13 AM, bob the big blob of goo said:

I'm using CPM so I had to add the "webapi.viewallclaims" module entry which is an extension when using Prisma's custom map.js file with the CPM mod.

Actually that's vanilla. It just defines what permission level is required so that a user can view landclaims of all players, not just his own.

 

On 9/9/2023 at 3:13 AM, bob the big blob of goo said:

I set webapi.map to mods and above so that our players would have to use the legacy map so we can render the extra map information from CPM.

Note that this API only provides info about the Map to the frontend, it doesn't actually control whether the map images can be accessed. For the vanilla web dashboard that indeed means it would not show the "Map" menu entry as it requires access to this API to know details on what to show, so for *most* practical reasons that is doing what you want. But it might not meet other people's use cases so wanted to make this one clear :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...