mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-01-14 04:01:58 +01:00
Network ExtensionData visualization
This commit is contained in:
parent
2ad5f979f6
commit
4c9488c859
@ -19,12 +19,16 @@ package com.djrapitops.plan.utilities.html.pages;
|
||||
import com.djrapitops.plan.api.exceptions.ParseException;
|
||||
import com.djrapitops.plan.data.store.containers.NetworkContainer;
|
||||
import com.djrapitops.plan.data.store.keys.NetworkKeys;
|
||||
import com.djrapitops.plan.data.store.keys.ServerKeys;
|
||||
import com.djrapitops.plan.system.file.PlanFiles;
|
||||
import com.djrapitops.plan.system.info.server.properties.ServerProperties;
|
||||
import com.djrapitops.plan.system.update.VersionCheckSystem;
|
||||
import com.djrapitops.plan.utilities.formatting.Formatters;
|
||||
import com.djrapitops.plan.utilities.formatting.PlaceholderReplacer;
|
||||
import com.djrapitops.plan.utilities.html.structure.AnalysisPluginsTabContentCreator;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import static com.djrapitops.plan.data.store.keys.NetworkKeys.*;
|
||||
|
||||
/**
|
||||
@ -40,19 +44,22 @@ public class NetworkPage implements Page {
|
||||
private final VersionCheckSystem versionCheckSystem;
|
||||
private final PlanFiles files;
|
||||
private final ServerProperties serverProperties;
|
||||
private final Formatters formatters;
|
||||
|
||||
NetworkPage(
|
||||
NetworkContainer networkContainer,
|
||||
AnalysisPluginsTabContentCreator analysisPluginsTabContentCreator,
|
||||
VersionCheckSystem versionCheckSystem,
|
||||
PlanFiles files,
|
||||
ServerProperties serverProperties
|
||||
ServerProperties serverProperties,
|
||||
Formatters formatters
|
||||
) {
|
||||
this.networkContainer = networkContainer;
|
||||
this.analysisPluginsTabContentCreator = analysisPluginsTabContentCreator;
|
||||
this.versionCheckSystem = versionCheckSystem;
|
||||
this.files = files;
|
||||
this.serverProperties = serverProperties;
|
||||
this.formatters = formatters;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -76,9 +83,11 @@ public class NetworkPage implements Page {
|
||||
);
|
||||
placeholderReplacer.put("update", versionCheckSystem.getUpdateHtml().orElse(""));
|
||||
|
||||
AnalysisPluginTabs analysisPluginTabs = new AnalysisPluginTabs(networkContainer.getBungeeContainer().getValue(ServerKeys.EXTENSION_DATA).orElse(new ArrayList<>()), formatters);
|
||||
|
||||
String[] content = analysisPluginsTabContentCreator.createContent(null, networkContainer.getUnsafe(NetworkKeys.PLAYERS_MUTATOR));
|
||||
String nav = content[0];
|
||||
String tabs = content[1];
|
||||
String nav = analysisPluginTabs.getNav() + content[0];
|
||||
String tabs = analysisPluginTabs.getTabs() + content[1];
|
||||
|
||||
placeholderReplacer.put("navPluginsTabs", nav);
|
||||
placeholderReplacer.put("tabsPlugins", tabs);
|
||||
|
@ -191,6 +191,6 @@ public class PageFactory {
|
||||
.query(ContainerFetchQueries.fetchNetworkContainer()); // Not cached, big.
|
||||
return new NetworkPage(networkContainer,
|
||||
analysisPluginsTabContentCreator.get(),
|
||||
versionCheckSystem.get(), fileSystem.get(), serverInfo.get().getServerProperties());
|
||||
versionCheckSystem.get(), fileSystem.get(), serverInfo.get().getServerProperties(), formatters.get());
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user