Removed all references on the FrontEnd to a global server list, its gone now, also made the FrontEnd gracefully handle archived gathers with no servers (#125)

This commit is contained in:
ArturPhilibin 2018-12-29 15:28:15 +00:00 committed by Absurdon
parent 4b2d67f524
commit 39c64072c0
4 changed files with 5 additions and 10 deletions

View file

@ -1034,7 +1034,7 @@ const GatherVotingResults = React.createClass({
},
selectedServers() {
return rankVotes(this.countVotes('serverVote'), this.props.gather.servers).slice(0, 2);
return rankVotes(this.countVotes('serverVote'), this.props.gather.servers || []).slice(0, 2);
},
serverTable(server, primary) {

View file

@ -4,7 +4,6 @@ import {CompletedGather} from "javascripts/components/gather";
const ArchivedGathers = exports.ArchivedGathers = React.createClass({
propTypes: {
archive: React.PropTypes.array.isRequired,
servers: React.PropTypes.array.isRequired,
maps: React.PropTypes.array.isRequired
},
@ -18,8 +17,7 @@ const ArchivedGathers = exports.ArchivedGathers = React.createClass({
key={archivedGather.gather.done.time}
show={(index === 0) ? true : false}
gather={archivedGather.gather}
maps={this.props.maps}
servers={this.props.servers} />
maps={this.props.maps} />
});
return (

View file

@ -510,8 +510,7 @@ const GatherPage = React.createClass({
<div className="row">
<div className="col-lg-12 col-md-12 col-sm-12">
<ArchivedGathers archive={this.state.archive}
maps={this.state.maps}
servers={this.state.servers} />
maps={this.state.maps} />
</div>
</div>
</section>

View file

@ -40,8 +40,7 @@ module.exports = function (namespace) {
if (error) return winston.error(error);
namespace.emit("gather:archive:refresh", {
archive: recentGathers,
maps: Map.list,
servers: Server.list
maps: Map.list
});
});
};
@ -108,8 +107,7 @@ module.exports = function (namespace) {
if (error) return winston.error(error);
socket.emit("gather:archive:refresh", {
archive: recentGathers,
maps: Map.list,
servers: Server.list
maps: Map.list
});
});