Search in sources :

Example 1 with Promise

use of play.libs.F.Promise in project coprhd-controller by CoprHD.

the class AdminDashboard method version.

@Restrictions({ @Restrict("SYSTEM_MONITOR"), @Restrict("SYSTEM_ADMIN"), @Restrict("RESTRICTED_SYSTEM_ADMIN") })
public static void version() {
    License license = AdminDashboardUtils.getLicense();
    Map<String, Promise<?>> promises = Maps.newHashMap();
    promises.put("clusterInfo", AdminDashboardUtils.clusterInfo());
    trySetRenderArgs(promises);
    // Add lastUpdated render args after promises are redeemed
    Date clusterInfoLastUpdated = AdminDashboardUtils.getClusterInfoLastUpdated();
    render(license, clusterInfoLastUpdated);
}
Also used : Promise(play.libs.F.Promise) License(com.emc.vipr.model.sys.licensing.License) Date(java.util.Date) Restrictions(controllers.deadbolt.Restrictions)

Aggregations

License (com.emc.vipr.model.sys.licensing.License)1 Restrictions (controllers.deadbolt.Restrictions)1 Date (java.util.Date)1 Promise (play.libs.F.Promise)1