Package com.serotonin.m2m2.vmstat

Examples of com.serotonin.m2m2.vmstat.VMStatPointLocatorVO$Attributes


    private TranslatableMessage weekday(boolean active) {
        int day = activeDay;
        if (!active)
            day = inactiveDay;
        return new TranslatableMessage(weekdays[day]);
    }
View Full Code Here


        if (!active)
            day = inactiveDay;

        if (day == -3)
            return new TranslatableMessage("common.day.thirdLast");
        if (day == -2)
            return new TranslatableMessage("common.day.secondLastLast");
        if (day == -1)
            return new TranslatableMessage("common.day.last");
        if (day != 11 && day % 10 == 1)
            return new TranslatableMessage("common.counting.st", Integer.toString(day));
        if (day != 12 && day % 10 == 2)
            return new TranslatableMessage("common.counting.nd", Integer.toString(day));
        if (day != 13 && day % 10 == 3)
            return new TranslatableMessage("common.counting.rd", Integer.toString(day));
        return new TranslatableMessage("common.counting.th", Integer.toString(day));
    }
View Full Code Here

    private TranslatableMessage month(boolean active) {
        int day = activeDay;
        if (!active)
            day = inactiveDay;
        return new TranslatableMessage(months[day]);
    }
View Full Code Here

            return squwkException;
        }
    }

    private TranslatableMessage toTranslatableMessage(SquwkException e) {
        return new TranslatableMessage("common.default", e.getMessage());
    }
View Full Code Here

      List<ReportInstance> result;
      if(user.isAdmin())
        result = new ReportDao().getReportInstances();
      else
        result = new ReportDao().getReportInstances(user.getId());
        Translations translations = getTranslations();
        UserDao userDao = new UserDao();
        for (ReportInstance i : result){
            i.setTranslations(translations);
            User reportUser = userDao.getUser(i.getUserId());
            if(reportUser != null)
View Full Code Here

        ReportCommon.ensureReportInstancePermission(Common.getUser(request), instance);

        // Stream the content.
        response.setContentType("text/csv");

        Translations translations = Common.getTranslations();
        if (content == CONTENT_REPORT) {
            ExportCsvStreamer creator = new ExportCsvStreamer(response.getWriter(), translations);
            if(Common.databaseProxy.getNoSQLProxy() == null)
              reportDao.reportInstanceDataSQL(instanceId, creator);
            else
View Full Code Here

    public int getId() {
        return id;
    }

    public JspComponentState createState(RuntimeManager rtm, HttpServletRequest request) {
        JspComponentState state = new JspComponentState();
        state.setId(id);
        createStateImpl(rtm, request, state);
        return state;
    }
View Full Code Here

*/
abstract public class ViewTagSupport extends TagSupport {
    private static final long serialVersionUID = -1;

    protected JspView getJspView() throws JspException {
        JspView view = JspViewsCommon.getJspView((HttpServletRequest) pageContext.getRequest());
        if (view == null)
            throw new JspException("No JSP view in session. Use the init tag before defining points");
        return view;
    }
View Full Code Here

*/
public class ReportsDwr extends ModuleDwr {
    @DwrPermission(user = true)
    public ProcessResult init() {
        ProcessResult response = new ProcessResult();
        ReportDao reportDao = new ReportDao();
        User user = Common.getUser();

        response.addData("points", getReadablePoints());
        response.addData("mailingLists", new MailingListDao().getMailingLists());
        response.addData("users", new UserDao().getUsers());
        if(user.isAdmin()) {
          response.addData("reports", reportDao.getReports());
          response.addData("instances", getReportInstances(user));
      }
        else {
          response.addData("reports", reportDao.getReports(user.getId()));
          response.addData("instances", getReportInstances(user));
      }
        response.addData("templates", getTemplateList());

        return response;
View Full Code Here

    @DwrPermission(user = true)
    public ReportVO getReport(int id, boolean copy) {
        ReportVO report;
        if (id == Common.NEW_ID) {
            report = new ReportVO();
            report.setXid(new ReportDao().generateUniqueXid());
            report.setName(translate("common.newName"));
        }
        else {
            report = new ReportDao().getReport(id);

            if (copy) {
                report.setId(Common.NEW_ID);
                report.setName(TranslatableMessage.translate(getTranslations(), "common.copyPrefix", report.getName()));
            }
View Full Code Here

TOP

Related Classes of com.serotonin.m2m2.vmstat.VMStatPointLocatorVO$Attributes

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.