Search in sources :

Example 1 with AboutEntryV3

use of water.api.schemas3.AboutEntryV3 in project h2o-3 by h2oai.

the class AboutHandler method get.

// called through reflection by RequestServer
@SuppressWarnings("unused")
public AboutV3 get(int version, AboutV3 s) {
    ArrayList<AboutEntryV3> entries = new ArrayList<>();
    entries.add(new AboutEntryV3("Build git branch", H2O.ABV.branchName()));
    entries.add(new AboutEntryV3("Build git hash", H2O.ABV.lastCommitHash()));
    entries.add(new AboutEntryV3("Build git describe", H2O.ABV.describe()));
    entries.add(new AboutEntryV3("Build project version", H2O.ABV.projectVersion()));
    entries.add(new AboutEntryV3("Build age", PrettyPrint.toAge(H2O.ABV.compiledOnDate(), new Date())));
    entries.add(new AboutEntryV3("Built by", H2O.ABV.compiledBy()));
    entries.add(new AboutEntryV3("Built on", H2O.ABV.compiledOn()));
    entries.add(new AboutEntryV3("Internal Security", H2OSecurityManager.instance().securityEnabled ? "Enabled" : "Disabled"));
    if (H2O.ABV.isTooOld()) {
        String latestH2OVersion = H2O.ABV.getLatestH2OVersion();
        entries.add(new AboutEntryV3("Version warning", "Your H2O version is too old! Please download the latest version " + latestH2OVersion + " from http://h2o.ai/download/"));
    }
    for (H2O.AboutEntry ae : H2O.getAboutEntries()) {
        entries.add(new AboutEntryV3(ae.getName(), ae.getValue()));
    }
    s.entries = entries.toArray(new AboutEntryV3[entries.size()]);
    return s;
}
Also used : H2O(water.H2O) ArrayList(java.util.ArrayList) AboutEntryV3(water.api.schemas3.AboutEntryV3) Date(java.util.Date)

Aggregations

ArrayList (java.util.ArrayList)1 Date (java.util.Date)1 H2O (water.H2O)1 AboutEntryV3 (water.api.schemas3.AboutEntryV3)1