Git Product home page Git Product logo

faf-moderator-client's Introduction

FAF Moderator Client Build

This application enables faforever.com moderators to perform administrative actions. This involves:

  • managing of users, user groups and permissions
  • uploading and assigning avatars
  • managing matchmaker map pools
  • map & mod vault
  • checking recent activities
  • editing runtime translations

How to use / run it

  • Make sure you have Java 21 or higher installed (JRE or JDK does not matter). Adoptium offers free installation packages here (other Java flavours like Oracle should also work)
  • Download the right client version for your operating system from the release page
  • Unzip it
  • Go to the bin folder and run the .bat script (Windows) or the .sh script (Linux)
  • Login with your FAF credentials

Setting up your environment

Recommended software

Boot the dependencies

  • Checkout the FAF Stack and initialize the database (scripts/init-db.sh). Afterwards boot the api via docker-compose up -d faf-java-api.
  • Get some test data and insert it into the MySQL db ( user: root & password: banana). A tool like HeidiSQL can help you with this. This also adds a moderator account with username: test & password: test_password

Run from source

  1. Clone the project with git
  2. Import the project into IntelliJ as "Gradle Project"
  3. Make sure you have the IntelliJ Lombok plugin installed
  4. Make sure you have Enable annotation processing enabled in the settings
  5. Add the dev profile as command line options ("VM options" in IntelliJ) using -Dspring.profiles.active=dev
  6. Add your platform as parameter for all Gradle processes e.g. -PjavafxPlatform=win for Windows.

faf-moderator-client's People

Contributors

1-alex98 avatar basalt79 avatar brutus5000 avatar bukajsytlos avatar dependabot[bot] avatar magge-faf avatar sheikah45 avatar skeenecode avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

faf-moderator-client's Issues

Avatar Assigments

image
Either disable the ability to close this "Assigment" tap or reopen it if it is closed.

Additive search

Requested by giebmasse

Make searches configurable, so they not necessarily clear out all previous results

Add search in Recent activity tab

the newly registered users would be more useful if they contained a timestamp of registration.

a refresh list button or a function doing this every so often or some way of refreshing it would be great too. i believe this is already known about and just wasnt done in time, so no problem there.

being able to filter/search both the users and teamkills would be cool too!

Ban option from "Recent activity" view

Would be useful if players could be banned from this view, without moving to User Management view and searching for the spotted player there. Not top priority, would just be more user friendly :)

Caching of avatar images

Right now, scrolling through an avatar list invokes a reload of all visible avatar images. This is invoncenient especially on small bandwithed connections.

Better API error handling

  • Don't crash on startup if an exception is thrown on first batch loading.
  • Show exceptions to the user with a hint how to report them.

Enable copying of field information

Being able to copy information such as nickname, IP and other fields would improve moderation workflow in mordor significantly.

e.g. right clicking a certain field could copy said field into your clipboard, or the field information could be non-editable but selectable and thus copyable.

using the search field messes up column sorting

ok so in the user management tab, if you sort by id for example, and then enter a search criteria to filter down, for example searching by previous names with *Ret* then the column sorting is ignored.

what should happen is the list should be sorted by that column again.

image
heres a column showing as sorted by id when its clearly not. re-sorting the column works.

improve the user result lists to show banned status

this is for user management and recent activity - it would be nice if there was some way of indicating right in the list of the status of that user:
for example if they are currently banned, or not banned (and maybe something else as well)

there are two ways i can think of doing this:

  1. add a column for current status and if they have a ban thats active write BANNED in there
  2. if they have a ban thats active, change the colour of the entry to red (maybe just the name entry or maybe the whole row)

2 is preferrable, but 1 might be easier, i dunno. you can sort by banned status if you have 1 but its clearer and less cluttered if you have 2. these are not mutually exclusive, but cluttering the ui isnt great either.

for 2 you can have orange for temporary ban and red for permanent. that would be cool.

Show IPv6 addresses

IPv6 addresses just return "172.19.0.1" currently. Would be nice to have IPv6 addresses working as well for various reasons.

I realize this might require some work "above" mordor, but e.g. geolocation doesn't work either with IPv6.

Notes per user

Would be useful in several scenarios if mods could save notes tied to a user. A simple text field that any mod can edit and view when searching for users would be really helpful.

In the UI maybe add a "Note" tab there, on the search result area e.g. display with an asterisk next to the ID to indicate there is a note for the user? Or alternatively show a note column in the search area that truncates long notes and leave the full viewing/editing capabilities for the tab.

Can't hide mapversion

Running faf-stack.
For probably unrelated api exception see FAForever/faf-java-api#182. No other exceptions where in the api log.

Maybe thats the point where the request comes in:

faf-java-api                     | Hibernate: select mapversion0_.id as id1_26_, mapversion0_.create_time as create_t2_26_, mapversion0_.update_time as update_t3_26_, mapversion0_.average_review_score as average_4_26_, mapversion0_.description as descript5_26_,
 mapversion0_.filename as filename6_26_, mapversion0_.height as height7_26_, mapversion0_.hidden as hidden8_26_, mapversion0_.map_id as map_id14_26_, mapversion0_.max_players as max_play9_26_, mapversion0_.reviews as reviews10_26_, mapversion0_.ranked as ranked
11_26_, mapversion0_.version as version12_26_, mapversion0_.width as width13_26_ from map_version mapversion0_ where mapversion0_.id in (?)
faf-java-api                     | Hibernate: select mapversion0_.map_version_id as map_vers1_28_0_, mapversion0_.downloads as download2_28_0_, mapversion0_.draws as draws3_28_0_, mapversion0_.plays as plays4_28_0_ from map_version_statistics mapversion0_ where
 mapversion0_.map_version_id=?

Exception in client:

Exception in thread "JavaFX Application Thread" java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
	at javafx.fxml.FXMLLoader$MethodHandler.invoke(FXMLLoader.java:1774)
	at javafx.fxml.FXMLLoader$ControllerMethodEventHandler.handle(FXMLLoader.java:1657)
	at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)
	at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
	at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
	at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
	at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:49)
	at javafx.event.Event.fireEvent(Event.java:198)
	at javafx.scene.Node.fireEvent(Node.java:8413)
	at javafx.scene.control.Button.fire(Button.java:185)
	at com.sun.javafx.scene.control.behavior.ButtonBehavior.mouseReleased(ButtonBehavior.java:182)
	at com.sun.javafx.scene.control.skin.BehaviorSkinBase$1.handle(BehaviorSkinBase.java:96)
	at com.sun.javafx.scene.control.skin.BehaviorSkinBase$1.handle(BehaviorSkinBase.java:89)
	at com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(CompositeEventHandler.java:218)
	at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:80)
	at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
	at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
	at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
	at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
	at javafx.event.Event.fireEvent(Event.java:198)
	at javafx.scene.Scene$MouseHandler.process(Scene.java:3757)
	at javafx.scene.Scene$MouseHandler.access$1500(Scene.java:3485)
	at javafx.scene.Scene.impl_processMouseEvent(Scene.java:1762)
	at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2494)
	at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:381)
	at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:295)
	at java.security.AccessController.doPrivileged(Native Method)
	at com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$353(GlassViewEventHandler.java:417)
	at com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:389)
	at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:416)
	at com.sun.glass.ui.View.handleMouseEvent(View.java:555)
	at com.sun.glass.ui.View.notifyMouse(View.java:937)
	at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
	at com.sun.glass.ui.win.WinApplication.lambda$null$147(WinApplication.java:177)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:71)
	at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:275)
	at javafx.fxml.FXMLLoader$MethodHandler.invoke(FXMLLoader.java:1771)
	... 56 more
Caused by: org.springframework.web.client.HttpClientErrorException: 403 Forbidden
	at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:78)
	at com.faforever.moderatorclient.api.rest.JsonApiErrorHandler.handleError(JsonApiErrorHandler.java:31)
	at org.springframework.security.oauth2.client.http.OAuth2ErrorHandler.handleError(OAuth2ErrorHandler.java:172)
	at org.springframework.web.client.RestTemplate.handleResponse(RestTemplate.java:700)
	at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:653)
	at org.springframework.security.oauth2.client.OAuth2RestTemplate.doExecute(OAuth2RestTemplate.java:128)
	at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:613)
	at org.springframework.web.client.RestTemplate.patchForObject(RestTemplate.java:457)
	at com.faforever.moderatorclient.api.rest.FafApiCommunicationService.patch(FafApiCommunicationService.java:142)
	at com.faforever.moderatorclient.api.rest.domain.MapService.patchMapVersion(MapService.java:112)
	at com.faforever.moderatorclient.ui.MainController.onToggleMapVersionHiding(MainController.java:431)
	... 66 more

Last login for users incorrect date

the last lobby login shows a date here that isnt possible, since the user has been active for much longer than that, based on his games played. not really sure about the cause of this.

Avatar manager shows incorrect icons for avatars

the icon previews dont correlate to the avatars. the rest of the info appears correct. some previews are empty.
the previews change upon client restart, and searching, so the process isnt deterministic it seems.

i dont know if this is some bug or just an incomplete feature.

make ban time duration more obvious

i'm stupid and don't want to think about the position of day/month when setting the ban duration

changing the example to something like YYYY-MM-DD would be nice

Avatar assignment management

I think this should be implemented as new main tab with abilitiy to search for avatar and for search and select multiple users/players to create assignments for

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.