Package org.rhq.enterprise.server.measurement.MeasurementPreferences

Examples of org.rhq.enterprise.server.measurement.MeasurementPreferences.MetricRangePreferences


        WebUser user = EnterpriseFacesContextUtility.getWebUser();
        MeasurementPreferences preferences = user.getMeasurementPreferences();

        EntityContext context = WebUtility.getEntityContext();
        try {
            MetricRangePreferences rangePreferences = preferences.getMetricRangePreferences();

            // adjust down so the start time of the first point equals the begin time of the metric display range prefs
            long adjust = (rangePreferences.end - rangePreferences.begin) / DefaultConstants.DEFAULT_CHART_POINTS;

            if (context.type == EntityContext.Type.Resource) {
View Full Code Here


        @Override
        public PageList<CallTimeDataComposite> fetchPage(PageControl pc) {
            WebUser user = EnterpriseFacesContextUtility.getWebUser();
            MeasurementPreferences preferences = user.getMeasurementPreferences();
            MetricRangePreferences rangePreferences = preferences.getMetricRangePreferences();

            /*
            Subject subject = getSubject();
            PageList<CallTimeDataComposite> results = new PageList<CallTimeDataComposite>();
            if (context.category == EntityContext.Category.Resource) {
View Full Code Here

    }

    public EventsTimelineUIBean() {
        WebUser user = EnterpriseFacesContextUtility.getWebUser();
        MeasurementPreferences preferences = user.getMeasurementPreferences();
        MetricRangePreferences rangePreferences = preferences.getMetricRangePreferences();

        long begin = rangePreferences.begin;
        long end = rangePreferences.end;
        int numberOfBuckets = DefaultConstants.DEFAULT_CHART_POINTS;
View Full Code Here

            return metricSummaries;
        }

        WebUser user = EnterpriseFacesContextUtility.getWebUser();
        MeasurementPreferences preferences = user.getMeasurementPreferences();
        MetricRangePreferences range = preferences.getMetricRangePreferences();

        if (context.type == EntityContext.Type.Resource) {
            //null -> don't filter, we want everything, false -> not only enabled
            List<MeasurementSchedule> measurementSchedules = scheduleManager.findSchedulesForResourceAndType(
                user.getSubject(), context.resourceId, DataType.MEASUREMENT, null, true);
View Full Code Here

    @Deprecated
    public List<MetricDisplaySummary> getMetricDisplaySummariesForAutoGroup(Subject subject, int parent, int type,
        String viewName) {
        MeasurementPreferences preferences = new MeasurementPreferences(subject);
        MetricRangePreferences rangePreferences = preferences.getMetricRangePreferences();
        long begin = rangePreferences.begin;
        long end = rangePreferences.end;

        int[] measurementDefinitionIds;
        try {
View Full Code Here

    public List<MetricDisplaySummary> getMetricDisplaySummariesForCompatibleGroup(Subject subject,
        EntityContext context, String viewName) {

        MeasurementPreferences preferences = new MeasurementPreferences(subject);
        MetricRangePreferences rangePreferences = preferences.getMetricRangePreferences();
        long begin = rangePreferences.begin;
        long end = rangePreferences.end;

        /* Fiddle the metrics from the | delimited stored ones and only display those.
         * Use the default list as fall back if we don't have them in preferences
View Full Code Here

        for (MeasurementSchedule sched : scheds) {
            scheduleIds[index++] = sched.getId();
        }

        MeasurementPreferences preferences = new MeasurementPreferences(subject);
        MetricRangePreferences rangePreferences = preferences.getMetricRangePreferences();
        long begin = rangePreferences.begin;
        long end = rangePreferences.end;

        List<MetricDisplaySummary> idss = getMetricDisplaySummariesForResource(subject, resourceId, scheduleIds, begin,
            end);
View Full Code Here

    @Override
    public void encodeBegin(FacesContext context, UIComponent component) throws IOException {
        ResponseWriter writer = context.getResponseWriter();

        MetricComponent metric = (MetricComponent) component;
        MetricRangePreferences rangePreferences = metric.getMetricRangePreferences();
        TimeUnit preferencesUnit = null;
        int lastN = 0;

        writer.startElement("b", null);
        writer.write("Metric Display Range:");
View Full Code Here

    public void execute() {
        FacesContext facesContext = FacesContextUtility.getFacesContext();
        WebUser user = EnterpriseFacesContextUtility.getWebUser();
        MeasurementPreferences preferences = user.getMeasurementPreferences();
        MetricRangePreferences rangePreferences = preferences.getMetricRangePreferences();

        String metricType = "";
        if (this.getIntervalType() == null) {
            metricType = getDurationType();
        } else {
View Full Code Here

    }

    public void init() {
        WebUser user = EnterpriseFacesContextUtility.getWebUser();
        MeasurementPreferences preferences = user.getMeasurementPreferences();
        MetricRangePreferences rangePreferences = preferences.getMetricRangePreferences();
        if (rangePreferences.readOnly) {
            this.setDurationType(null);
            this.setIntervalType("interval");
            this.setUnit(null);
            this.setFromTime(new Date(rangePreferences.begin));
View Full Code Here

TOP

Related Classes of org.rhq.enterprise.server.measurement.MeasurementPreferences.MetricRangePreferences

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.