Giter Club home page Giter Club logo

eve-goons-waitlist's Introduction

eve-goons-waitlist

The ESI-enabled ajax-based waitlist used by the Incursions squad in Goonfleet of Eve Online.

Installation and Setup

  • Clone repo
  • Run npm install to grab dependencies
  • Install a MongoDB instance
  • Create a setup.js file using the template below.

setup.js:

exports.oauth = {
	clientID: "YourDeveloperAppIDHere",
	secretKey: "YourSecretKeyHere",
	callbackURL: "http://<callbackURL>/auth/provider/callback",
	scopes: ['publicData','esi-location.read_location.v1','esi-location.read_ship_type.v1','esi-skills.read_skills.v1','esi-skills.read_skillqueue.v1','esi-wallet.read_character_wallet.v1','esi-killmails.read_killmails.v1','esi-assets.read_assets.v1','esi-fleets.read_fleet.v1','esi-fleets.write_fleet.v1','esi-ui.open_window.v1','esi-ui.write_waypoint.v1','esi-fittings.read_fittings.v1','esi-location.read_online.v1','esi-clones.read_implants.v1','esi-characters.read_fatigue.v1'],
	userAgent: 'express 4.9.5, eve-sso, goons-incursionauth 2.0.0',
	baseSSOUrl: "login.eveonline.com"
};

exports.data = {
	directory: "data", //Where data will be stored
	sessionSecret: "RandomStringHere",
	mongoDbURL: "mongoDB://localhost:27017",
	mongoDbName: "eve-goons-waitlist"
}

exports.fleet = {
	comms: [{
		name: "Incursions -> A",
		url: "mumble://mumble.goonfleet.com/Squads%20and%20SIGs/Incursions/Fleet%20A?title=Goonfleet&version=1.2.0"
	},{
		name: "Incursions -> B",
		url: "mumble://mumble.goonfleet.com/Squads%20and%20SIGs/Incursions/Fleet%20B?title=Goonfleet&version=1.2.0" 
	},{
		name: "Incursions -> C",
		url: "mumble://mumble.goonfleet.com/Squads%20and%20SIGs/Incursions/Fleet%20C?title=Goonfleet&version=1.2.0"
	},{
		name: "Incursions -> D",
		url: "mumble://mumble.goonfleet.com/Squads%20and%20SIGs/Incursions/Fleet%20D?title=Goonfleet&version=1.2.0"
	},]
}

exports.settings = {
	port: 80
}

//roleNumeric titles, use null to disable. Leave index0 as member
exports.userPermissions =  ["Member", "Trainee", null, "Fleet Commander", "Senior FC", "Leadership"];

exports.fleetCompFilters = {
	logi: [11987,11989,22474,22442],//Guardian, Oneiros, Damnation, Eos
	caps: [23757,37604,23915,37605,23911,37607,24483,37606,42242,45645],//Archon, Apostle, Chimera, Minokawa, Thanatos, Ninazu, Nidhoggur, Lif, Dagon, Loggerhead
	supers: [23919,11567,23917,3764,23913,671,22852,23773,42241,3514,42125,42126,45649]//Aeon, Avatar, Wyvern, Leviathan, Nyx, Erebus, Hel, Ragnarok, Molok, Revenant, Vendetta, Vanquisher, Komodo
}

exports.browserNotification = {
	"sound": '/includes/alarm.mp3',
	"appName": 'Imperium Incursions Waitlist',
	"imgUrl": '/includes/img/gsf-bee.png'
}

Many of the variables can be populated from here: https://developers.eveonline.com/

  • Run with node index.js.

Development with Docker

Setup your docker environment

Create a 'data' directory in the root of the repository In your setup.js point mongoDbURL to mongoDB://mongo:27017
To run your image then execute: docker-compose up
To rebuild your image execute: docker-compose build

eve-goons-waitlist's People

Contributors

1285done avatar crisboarna avatar ev0ldave avatar mlohstroh avatar samuelgrant avatar sirnardieu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

eve-goons-waitlist's Issues

[TODO] Log all waitlist removals

We need to log FC removals from the waitlist, and just for shits and giggles can we log all invites/removals. Who when and why.

  • Update logs to text file so names are included. IDs are painful as fuck
  • Log all invites, removals and fleet joins in a database table, then create a filterable view.

[BUG] Join/Queue panels are visible when there are no fleets

Bug Description

The join the waitlist, and the queue info panels are visible where there are no active fleets. We can look at putting something there but for now it should just be the 'Waitlist Inactive' banner and any FC banner message that is currently being used for the alpha notice.

Reproduction Steps

Close any open fleets and go to the / route.

Expected Outcome

Remove pilot panels on the left.

Notes

We could look at putting some cool things in there long term. Maybe focus stats during an active deployment, and in between deployment focus information while we are waiting for a spawn. Just a thought.

Responsive view for /commander/

Bug Description

Table spews of the side of the screen. This makes me hate myself ALOT.

Reproduction Steps

Look at commander on a small screen (tablet).

TODO

Use bootstrap classes to make this less crappy on small screens..... All other FC pages should be looked at as well, though the actual waitlist page may not be done.

Something something alt section

Bug Description

Clicking on "Remove all alts" queued me up.

Reproduction Steps

Click on "Remove all alts" and watch.

Expected Outcome

"Remove all alts" working.

Actual Outcome

"Remove all alts" not working.

Notes

grr

Crash when unable to get the fleet member list (still)

/home/user/eve-goons-newwaitlist/eve-goons-waitlist/node_modules/mongodb/lib/utils.js:132
      throw err;
      ^

TypeError: Cannot read property 'length' of null
    at module.exports (/home/user/eve-goons-newwaitlist/eve-goons-waitlist/pageContent/publicWaitlist.js:46:63)
    at /home/user/eve-goons-newwaitlist/eve-goons-waitlist/template.js:21:7
    at sidebar (/home/user/eve-goons-newwaitlist/eve-goons-waitlist/template.js:138:3)
    at /home/user/eve-goons-newwaitlist/eve-goons-waitlist/template.js:20:5
    at header (/home/user/eve-goons-newwaitlist/eve-goons-waitlist/template.js:43:5)
    at generateTemplate (/home/user/eve-goons-newwaitlist/eve-goons-waitlist/template.js:19:3)
    at Object.pageGenerate (/home/user/eve-goons-newwaitlist/eve-goons-waitlist/template.js:12:3)
    at /home/user/eve-goons-newwaitlist/eve-goons-waitlist/routes.js:30:14
    at /home/user/eve-goons-newwaitlist/eve-goons-waitlist/fleets.js:88:4
    at args.push (/home/user/eve-goons-newwaitlist/eve-goons-waitlist/node_modules/mongodb/lib/utils.js:404:72)
    at handleCallback (/home/user/eve-goons-newwaitlist/eve-goons-waitlist/node_modules/mongodb/lib/utils.js:128:55)
    at self.close (/home/user/eve-goons-newwaitlist/eve-goons-waitlist/node_modules/mongodb/lib/cursor.js:934:60)
    at handleCallback (/home/user/eve-goons-newwaitlist/eve-goons-waitlist/node_modules/mongodb/lib/utils.js:128:55)
    at completeClose (/home/user/eve-goons-newwaitlist/eve-goons-waitlist/node_modules/mongodb/lib/cursor.js:1073:14)
    at Cursor.close (/home/user/eve-goons-newwaitlist/eve-goons-waitlist/node_modules/mongodb/lib/cursor.js:1086:10)
    at /home/user/eve-goons-newwaitlist/eve-goons-waitlist/node_modules/mongodb/lib/cursor.js:934:21
error: Forever detected script exited with code: 1

[Todo] FC buttons

Let's get the I am the FC buttons done next time you have a few minutes. They should work something like this:

  • I'm the FC can be used to force the waitlist to update the FC object, so it can continue to use the token. If the token fails (Wrong FC) then don't delete the fleet, disable ESI actions for that fleet and display a banner prompting the new FC to press the button.
  • Back seating FC button should have two states. One that allows you to set yourself as the backseat, and one that lets you remove yourself as the backseat.

@Makeshift let me know what you think

[Feature] Fleet Status: Not Listed

New fleets should be registered as Not Listed. There is already an option in the dropdown box for this.

This allows an FC to set up the required options / in game things before publicly opening the waitlist. If the only fleet is not listed, the public UI should render as if there were no fleets up. However, setting the fleet to that mode should not act in the same was as closing the waitlist (should not remove all pilots from the waitlist).

[Feature request] New Pilot Indicator

Either give us a check box, or show us people who have been in fleet for less than five hours. That way we can make sure we bring them in on a safe site (TPPH/NRF) and give them some extra attention such as a quick newbro speech

Not a bug: Red border on the input fields confuses new people

Bug Description

Reproduction Steps

Expected Outcome

Actual Outcome

Notes

There is no bug, there is a slight design problem. The style Samuel created is great, but it has a small issue. The red border on the active input text field confuses new people to think that the page does not like what they're typing. I'd recommend changing this color to something more neutral.

[TODO] Extend fleet timeout.

Now that the I'm the FC button works (or should work), can you please either extend the amount of time the new FC has to press the button after a star handover or after x number of failed queries unset the FC object and block all fleet related ESI queries until a new FC is set.

[Feature Request] Remember nav bar class

Remember the class of the nav element. If the user collapses or expands the nav bar it should persist through page loads.

  • Currently on page loads it will always be expanded.

unfuck this please

Bug Description

A shiptype name that is too long really fucks up the waitlist

Reproduction Steps

Put a name like "megamegamegamegamegamegamegamegamegamegamegamegamegamegamegamegamegamegamegamegamegamegamegamegamegamegamegamegamegamegamegamegamegamegamega"

Expected Outcome

It doesn't look like shit

Actual Outcome

It looks like shit

Notes

I'm gay

Gracefully handle users being offline

Stuff won't load properly if they're offline.

Unhandled rejection esi:Error: Error from ESI service for https://esi.tech.ccp.is/v1/fleets/1025011408543/members/: {"error":"{'error_label': 'FleetCandidateOffline', 'error_dict': {'invitee': (2, 95334207)}}"}: cannot POST /v1/fleets/1025011408543/members/?datasource=tranquility&language=en-us (420)
    at getExceptionFromAgentError (/home/user/eve-goons-newwaitlist/eve-goons-waitlist/node_modules/eve-swagger/lib/internal/esi-agent.js:82:17)
    at /home/user/eve-goons-newwaitlist/eve-goons-waitlist/node_modules/eve-swagger/lib/internal/esi-agent.js:243:22
    at Request.callback (/home/user/eve-goons-newwaitlist/eve-goons-waitlist/node_modules/superagent/lib/node/index.js:703:3)
    at IncomingMessage.<anonymous> (/home/user/eve-goons-newwaitlist/eve-goons-waitlist/node_modules/superagent/lib/node/index.js:922:12)
    at emitNone (events.js:91:20)
    at IncomingMessage.emit (events.js:185:7)
    at endReadableNT (_stream_readable.js:974:12)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickCallback (internal/process/next_tick.js:98:9)

[Bug] Fleet at a glance not showing values correctly

Bug Description

image

Reproduction Steps

We don't know

Expected Outcome

Show ship names and a count or failing that ship IDs and a count.

Notes

If you can give me show info windows (#22) in game then the user could click on a fleet ID and still see the ship type. Not perfect but it will help.

selecting stuff

Bug Description

cant select/copy any text

Reproduction Steps

try to select/copy some text

Expected Outcome

text gets selected and then copied

Actual Outcome

nothing gets selected

Notes

Gracefully handle a user revoking their refresh token

A user revoking their refresh token while logged in kills the app when they try and do anything with the ESI. If any ESI request comes back with 'invalid token' we should forcefully log the user out and delete their session.

2018-02-22T12:58:14.585Z [error] getLocation: Error for requestNewAccessToken {"err":{"statusCode":400,"data":"{\"error\":\"invalid_token\",\"error_description\":\"The refresh token is expired.\"}"},"characterID":96099470}

[Feature] - Doctrine indicator

Per changes in #23 an FC can now select 'Arse fleet' in the Fleet Type section of their management panel.

If they do pilots will see:
Fleet Type: "Long Deployment" - or something like this
Fleet Doctrine: "Arsefleet"

If the FC selects (HQs/Ass/Vgs/Kundi ) then pilots would see
Fleet Type: what ever was selected by the FC
Fleet Doctrine: "Mainfleet"

[Feature] Invite to squad, Fleet Comp

Description

It would be nice to allow the waitlist to invite people to a specific squad rather than the default squad. What we should do is replace the green plus button with a drop-down nav button. Then list each squad in say wing one and allow fcs to click on the squad they want to put the person in.

At the same time the fleet comp should only show people in the 'active wing'. That way I don't see scouts/cynos that are in fleet in that comp window.

Usecase

  • Arsefleet legions are both DPS and Logi ships. This means the fleet at a glance tab won't help. Having a logi squad vs a dps squad could allow the FC to get a better view of how many legions are logi vs dps.
  • Being able to add people into separate squads minimizes the risk of a squad commander accidentally warping the entire fleet off grid.
  • People will end up in the expected squads rather than the one ESI puts them in.
  • If FCs max squads at 14 people + the squad commander, squad commanders could add their squads to their watchlists as a form of AFK checking pilots.

Connection Partially Encrypted

Bug Description

At least one external URL "breaking" the SSL encryption:
image.eveonline.com

Expected Outcome

Should be called by https://

Do proper logging

  • WITH COLORS
  • AND DIFFERENT OUTPUT TYPES (info, error, debug etc.)
  • NOT IN STUPID PLACES
  • TO A FILE! (I know this is revolutionary)

[Feature Request] Allow FCs to open a jabber conversation with a pilot by clicking one button.

Assuming the pilot has provided us with their ESA name in the format of samuel_the_terrible, we can have a button that allow the FCs to contact a pilot via jabber.

This could be added to the pilot function drop-down menu on the waitlist page /commander/:fleetID/. This would be useful if the FC needs to talk to the pilot in private about an issue stopping them from getting into fleet, or informing a pilot they cannot login after DCing from a TCRC.

<a href="xmpp:[email protected]">Testing Jabber Link</a>

Invite Status Indicators

Bug Description

When inviting a user their row is highlighted green. If the invite succeeds they are removed from the database and view. If the invite fails, they stay highlighted green. This persists through page refreshes.

Reproduction Steps

Invite a player who is offline, in another fleet or who rejects the invite.

Expected Outcome

Clicking the invite button makes the users row go blue. After the invite is sent through ESI successfully the database record should be deleted and for the FC who pressed the invite button the row should go green for 10 seconds before it is deleted.

If the invite fails, the row should go red (only for the FC who clicked invite) and it should not persist past a page refresh.

Notes

Color classes:

  • invite-pending (when a user clicks invite; this class should be used pending a sent or failed response)
  • invite-sent (if ESI accepts the fleet invite request - this does not mean the user accepted the invite, just that they received an invite).
  • invite-failed (Invite failed (The pilot did not get sent an invite) - could be due to the user being offline, in a fleet, fleet being full)

Fleet Registration error - wrong character.

Bug Description

Trying to register a fleet with the wrong pilot (One not authed) returns an error that the waitlist cannot handle. Attempting to load the page kills node, after five time outs the fleet page will then load but I cannot transfer the waitlist boss.

Expected Outcome

An error that states the fleet cannot be registered.

Actual Outcome

      throw err;
      ^

TypeError: Cannot read property 'length' of null
    at module.exports (P:\xampp\htdocs\waitlist\eve-goons-waitlist\pageContent\fcFleetList.js:31:46)
    at P:\xampp\htdocs\waitlist\eve-goons-waitlist\template.js:21:7
    at sidebar (P:\xampp\htdocs\waitlist\eve-goons-waitlist\template.js:114:3)
    at P:\xampp\htdocs\waitlist\eve-goons-waitlist\template.js:20:5
    at header (P:\xampp\htdocs\waitlist\eve-goons-waitlist\template.js:43:5)
    at generateTemplate (P:\xampp\htdocs\waitlist\eve-goons-waitlist\template.js:19:3)
    at Object.pageGenerate (P:\xampp\htdocs\waitlist\eve-goons-waitlist\template.js:12:3)
    at P:\xampp\htdocs\waitlist\eve-goons-waitlist\routes.js:115:14
    at P:\xampp\htdocs\waitlist\eve-goons-waitlist\fleets.js:88:4
    at args.push (P:\xampp\htdocs\waitlist\eve-goons-waitlist\node_modules\mongodb\lib\utils.js:404:72)
    at handleCallback (P:\xampp\htdocs\waitlist\eve-goons-waitlist\node_modules\mongodb\lib\utils.js:128:55)
    at self.close (P:\xampp\htdocs\waitlist\eve-goons-waitlist\node_modules\mongodb\lib\cursor.js:934:60)
    at handleCallback (P:\xampp\htdocs\waitlist\eve-goons-waitlist\node_modules\mongodb\lib\utils.js:128:55)
    at completeClose (P:\xampp\htdocs\waitlist\eve-goons-waitlist\node_modules\mongodb\lib\cursor.js:1073:14)
    at Cursor.close (P:\xampp\htdocs\waitlist\eve-goons-waitlist\node_modules\mongodb\lib\cursor.js:1086:10)
    at P:\xampp\htdocs\waitlist\eve-goons-waitlist\node_modules\mongodb\lib\cursor.js:934:21```

#### Notes
Once I handed over the star in game and waited a minute I was unable to transfer fleet boss in waitlist.... I had to close and create a new fleet with the same link.

[Feature Request] Links for eve items.

  • Hyperlinks for ship/pilot/corporation/constellation names should open a 'show info' window in game.
  • System names should set the destination (After clearing the current autopilot)
  • Ship icons (for pilot fits) should open a UI... haven't worked that one out yet.

Unexpectedly long wait time

Bug Description

There is too long between queuing for fleet and being accepted to fleet

Reproduction Steps

Queue for fleet

Expected Outcome

It doesn't take ages

Actual Outcome

It takes ages

Notes

Blame samuel for this

[BUG] Multiple fleets are listing down not across.

Bug Description

Each new fleet lists down. They should go left to right dropping to a new line as needed.

Reproduction Steps

Open multiple fleets.

Expected Outcome

They should list in rows across before dropping down.

Actual Outcome

image

Notes

Check cols sizes.

[Feature] Alts

Checklist:

  • Login Oauth2
  • Pilot settings table of alts and login button
  • Select alt dropdown on /commander/:name/skills
  • List of alts on /admin/commanders
  • List of alts on /commander/:name:/profile
    • Design view for waitlisting with alts
    • Code waitlisting with main
    • Code leaving waitlist with all (Big red button)
    • Code Queue Info (Waitlist Main)
    • Code Queue Info (Your Position)
    • Code alts waitlist panel
      • Listing Alts (Not already in fleet)
      • Code add specific alt
      • Code remove specific alt
    • Render main/alts table (see below)
      • Code More Actions
      • Code removals
      • Code Invites
      • Code Invite Alarms
      • Code Alarm User
      • Code "Newbee" label - Still need the check to determine who is new and who isn't
      • Code "alt of" label

NOTE: Todo add character whitelist. All waitlist joins need to be vetted for online and whitelist

Other Things:

  • Validate user is online before they waitlist up
  • Validate user is online every timer() cycle as a verification that their token is still good
  • Move timers to the task system
  • Character whitelist function
Main:
object.waitlistMain.characterID == object.characterID

Alt:
object.waitlistMain.characterID != object,characterID
Waitlist table object template
{
	_id: objectID,
	"waitlistMain": {
		"characterID": null,
		"name": null
	},
	"name": Caitlin Viliana,
	"characterID": 96304094,
	"fit",
	"location": {
		"systemID": 1322112,
		"name": 1DQ1-A,
		"docked": false
	},
	contact: {
		"xmpp": samuel_the_terrible,
		"alarmTarget": 96304094
	},
	new: true
	signup: Date.now(),
}
  1. We were going to have an alts table under the main table for waitlists. I think I would like to move them to their own tab. If sockets will let you do fully async then all the tables should be able to update without page refreshes.

  2. Alts on waitlist should only be visible to the fleet their main is in.

Newbee Indicator

  • This will be covered as part of alts. After a person has been with us for x number of sites remove the newbee flag.

Auto Close Fleets at DT

If the waitlist attempts to make ESI requests on a fleet that is no longer active in game CCP will return this error. {'what': 'The specified proxy or server node (1392245) is dead'}}"}.

To combat this issue the following safeguards should be completed:

  • Auto close all registered fleets at 11:00 Eve time.
  • Allow FCs to manually close fleets using the fleet management page.

[Template] Blocking is Bad

Currently a lot of the page generation relies on synchronous stuff which is super terrible and will cause issues in the future. It REALLY needs to be made into async, probably at about the same time data is moved into an actual database.

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.