Skip to content

Commit

Permalink
Revert "[BREAK] Federation refactor with addition of chained events (#…
Browse files Browse the repository at this point in the history
…15206)"

This reverts commit 4166e0b.
  • Loading branch information
sampaiodiego committed Aug 28, 2019
1 parent b389818 commit 063b9d6
Show file tree
Hide file tree
Showing 94 changed files with 3,050 additions and 2,523 deletions.
7 changes: 4 additions & 3 deletions app/federation/client/admin/dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@
{{/each}}
</div>
<div class="group left wrap border-component-color">
{{#each federationPeers}}
{{#each federationPeerStatuses}}
<div class="overview-column small">
<div class="overview-pill">
<span class="title">{{domain}}</span>
<div class="overview-pill" title="{{status}} - {{statusAt}}">
<div class="status {{status}}"></div>
<span class="title">{{peer}}</span>
</div>
</div>
{{/each}}
Expand Down
16 changes: 9 additions & 7 deletions app/federation/client/admin/dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const updateOverviewData = () => {
console.log(error);

return;
// return handleError(error);
}

const { data } = result;
Expand All @@ -29,31 +30,32 @@ const updateOverviewData = () => {
});
};

const updateServers = () => {
Meteor.call('federation:getServers', (error, result) => {
const updatePeerStatuses = () => {
Meteor.call('federation:getPeerStatuses', (error, result) => {
if (error) {
console.log(error);

return;
// return handleError(error);
}

const { data } = result;

templateInstance.federationPeers.set(data);
templateInstance.federationPeerStatuses.set(data);
});
};

const updateData = () => {
updateOverviewData();
updateServers();
updatePeerStatuses();
};

Template.dashboard.helpers({
federationOverviewData() {
return templateInstance.federationOverviewData.get();
},
federationPeers() {
return templateInstance.federationPeers.get();
federationPeerStatuses() {
return templateInstance.federationPeerStatuses.get();
},
});

Expand All @@ -62,7 +64,7 @@ Template.dashboard.onCreated(function() {
templateInstance = Template.instance();

this.federationOverviewData = new ReactiveVar();
this.federationPeers = new ReactiveVar();
this.federationPeerStatuses = new ReactiveVar();
});

Template.dashboard.onRendered(() => {
Expand Down
141 changes: 0 additions & 141 deletions app/federation/client/admin/visualizer.css

This file was deleted.

10 changes: 0 additions & 10 deletions app/federation/client/admin/visualizer.html

This file was deleted.

141 changes: 0 additions & 141 deletions app/federation/client/admin/visualizer.js

This file was deleted.

6 changes: 1 addition & 5 deletions app/federation/client/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,2 @@
import './messageTypes';
import './admin/dashboard';

import './tabBar';

import './views/federationFlexTab.html';
import './views/federationFlexTab.js';
23 changes: 23 additions & 0 deletions app/federation/client/messageTypes.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { MessageTypes } from '../../ui-utils/client';

// Register message types
MessageTypes.registerType({
id: 'rejected-message-by-peer',
system: true,
message: 'This_message_was_rejected_by__peer__peer',
data(message) {
return {
peer: message.peer,
};
},
});
MessageTypes.registerType({
id: 'peer-does-not-exist',
system: true,
message: 'The_peer__peer__does_not_exist',
data(message) {
return {
peer: message.peer,
};
},
});
Loading

0 comments on commit 063b9d6

Please sign in to comment.