From b2d7763e658ede9bbc8059b04b14d1e6af10ee9a Mon Sep 17 00:00:00 2001 From: qixinzhi Date: Tue, 28 Nov 2023 14:52:54 +0800 Subject: [PATCH] * Merge metric code from master. --- .../hour/consume_of_task_in_execution.php | 0 .../hour/estimate_of_task_in_execution.php | 0 .../hour/left_of_task_in_execution.php | 0 .../rate/progress_of_task_in_execution.php | 0 .../rate_of_developed_story_in_execution.php | 0 .../rate_of_finished_story_in_execution.php | 0 ...nt_of_daily_finished_task_in_execution.php | 0 .../count_of_developed_story_in_execution.php | 0 .../count_of_finished_story_in_execution.php | 0 .../count_of_finished_task_in_execution.php | 0 .../count_of_invalid_story_in_execution.php | 0 .../scale/count_of_story_in_execution.php | 0 .../scale/count_of_task_in_execution.php | 0 .../count_of_unfinished_task_in_execution.php | 0 .../count_of_valid_story_in_execution.php | 0 .../qc/count_of_released_bug_in_product.php | 0 .../qc/rate_of_approved_story_in_product.php | 0 .../rate_of_delivery_story_in_product.php | 0 .../rate/rate_of_finish_story_in_product.php | 0 .../rate/rate_of_fixed_bug_in_product.php | 0 ...ntration_of_developed_story_in_product.php | 0 ...coverage_of_projected_story_in_product.php | 0 .../count_of_activated_bug_in_product.php | 0 ...t_of_annual_closed_feedback_in_product.php | 0 ...ount_of_annual_closed_story_in_product.php | 0 ...count_of_annual_created_bug_in_product.php | 0 ...ount_of_annual_created_case_in_product.php | 0 ...nnual_created_effective_bug_in_product.php | 0 ..._of_annual_created_feedback_in_product.php | 0 ..._annual_created_productplan_in_product.php | 0 ...t_of_annual_created_release_in_product.php | 0 ..._annual_created_requirement_in_product.php | 0 ...unt_of_annual_created_story_in_product.php | 0 ...t_of_annual_delivered_story_in_product.php | 0 ...annual_finished_productplan_in_product.php | 0 ...nt_of_annual_finished_story_in_product.php | 0 .../count_of_annual_fixed_bug_in_product.php | 0 .../product/scale/count_of_bug_in_product.php | 0 .../scale/count_of_case_in_product.php | 0 .../count_of_closed_story_in_product.php | 0 .../count_of_daily_closed_bug_in_product.php | 0 .../count_of_daily_created_bug_in_product.php | 16 +- ...count_of_daily_resolved_bug_in_product.php | 0 .../count_of_delivered_story_in_product.php | 3 +- .../count_of_developed_story_in_product.php | 0 .../count_of_effective_bug_in_product.php | 0 .../scale/count_of_feedback_in_product.php | 0 .../count_of_finished_story_in_product.php | 0 .../scale/count_of_fixed_bug_in_product.php | 0 .../count_of_invalid_story_in_product.php | 3 +- ...count_of_monthly_closed_bug_in_product.php | 0 ...unt_of_monthly_closed_story_in_product.php | 0 ...ount_of_monthly_created_bug_in_product.php | 0 ..._of_monthly_created_release_in_product.php | 0 ...nt_of_monthly_created_story_in_product.php | 13 +- ..._of_monthly_delivered_story_in_product.php | 0 ...t_of_monthly_finished_story_in_product.php | 0 .../count_of_monthly_fixed_bug_in_product.php | 0 .../scale/count_of_productplan_in_product.php | 0 .../scale/count_of_release_in_product.php | 0 .../scale/count_of_requirement_in_product.php | 0 .../scale/count_of_severe_bug_in_product.php | 0 .../count_of_severity_1_bug_in_product.php | 0 .../count_of_severity_2_bug_in_product.php | 0 .../scale/count_of_story_in_product.php | 0 .../count_of_unclosed_story_in_product.php | 0 .../scale/count_of_valid_story_in_product.php | 0 ...cale_of_annual_closed_story_in_product.php | 0 ...e_of_annual_delivered_story_in_product.php | 0 ...le_of_annual_finished_story_in_product.php | 0 ...e_of_monthly_finished_story_in_product.php | 0 .../scale/scale_of_story_in_product.php | 0 .../project/hour/ac_of_all_in_waterfall.php | 0 .../hour/consume_of_all_in_project.php | 0 .../hour/consume_of_task_in_project.php | 0 .../hour/day_of_invested_in_project.php | 0 .../hour/estimate_of_task_in_project.php | 0 .../hour/ev_of_finished_task_in_waterfall.php | 0 .../project/hour/left_of_task_in_project.php | 0 .../project/hour/pv_of_task_in_waterfall.php | 0 .../calc/project/rate/cv_in_waterfall.php | 0 .../rate/progress_of_task_in_project.php | 0 .../rate_of_finished_story_in_project.php | 0 .../calc/project/rate/sv_in_waterfall.php | 0 ...unt_annual_closed_execution_in_project.php | 0 .../count_of_activated_bug_in_project.php | 0 ...nt_of_annual_finished_story_in_project.php | 0 .../project/scale/count_of_bug_in_project.php | 0 .../scale/count_of_closed_bug_in_project.php | 0 .../count_of_closed_execution_in_project.php | 0 .../count_of_closed_story_in_project.php | 0 .../count_of_doing_execution_in_project.php | 0 .../scale/count_of_doing_task_in_project.php | 0 .../scale/count_of_execution_in_project.php | 0 .../count_of_finished_story_in_project.php | 0 .../count_of_finished_task_in_project.php | 0 .../count_of_invalid_story_in_project.php | 0 .../count_of_opened_issue_in_project.php | 0 .../scale/count_of_opened_risk_in_project.php | 0 .../scale/count_of_story_in_project.php | 0 ...ount_of_suspended_execution_in_project.php | 0 .../scale/count_of_task_in_project.php | 0 .../count_of_unclosed_story_in_project.php | 0 .../scale/count_of_user_in_project.php | 0 .../scale/count_of_valid_story_in_project.php | 0 .../scale/count_of_wait_task_in_project.php | 0 .../scale/count_wait_execution_in_project.php | 0 ...le_of_annual_finished_story_in_project.php | 0 .../scale/scale_of_story_in_project.php | 0 .../time/count_of_actual_time_in_project.php | 0 .../project/time/left_period_of_project.php | 0 .../time/planned_period_of_project.php | 0 .../time/variance_of_time_in_project.php | 0 .../hour/consume_of_annual_closed_project.php | 0 .../consume_of_monthly_closed_project.php | 0 .../calc/system/hour/consume_of_task.php | 0 .../hour/day_of_annual_closed_project.php | 0 .../calc/system/hour/day_of_annual_effort.php | 0 .../calc/system/hour/day_of_daily_effort.php | 0 .../estimate_of_annual_closed_project.php | 0 .../calc/system/hour/estimate_of_task.php | 0 .../system/hour/hour_of_annual_effort.php | 0 .../calc/system/hour/hour_of_daily_effort.php | 0 .../metric/calc/system/hour/left_of_task.php | 0 .../rate/rate_of_annual_delivered_story.php | 0 .../rate/rate_of_annual_finished_story.php | 0 ...closed_execution_which_annual_finished.php | 0 ...finished_project_which_annual_finished.php | 0 .../system/rate/rate_of_delivered_story.php | 4 +- .../system/rate/rate_of_finished_story.php | 4 +- .../calc/system/rate/rate_of_fixed_bug.php | 0 ...closed_execution_which_annual_finished.php | 0 ...finished_project_which_annual_finished.php | 0 .../system/scale/count_of_activated_bug.php | 0 .../count_of_annual_closed_execution.php | 0 .../scale/count_of_annual_closed_feedback.php | 0 .../scale/count_of_annual_closed_product.php | 0 .../count_of_annual_closed_productplan.php | 0 .../scale/count_of_annual_closed_project.php | 0 .../count_of_annual_closed_top_program.php | 0 .../scale/count_of_annual_created_bug.php | 0 .../scale/count_of_annual_created_case.php | 0 .../scale/count_of_annual_created_doc.php | 0 .../count_of_annual_created_execution.php | 0 .../count_of_annual_created_feedback.php | 0 .../scale/count_of_annual_created_product.php | 0 .../count_of_annual_created_productplan.php | 0 .../scale/count_of_annual_created_project.php | 0 .../scale/count_of_annual_created_release.php | 0 .../scale/count_of_annual_created_story.php | 0 .../scale/count_of_annual_created_task.php | 0 .../count_of_annual_created_top_program.php | 0 .../scale/count_of_annual_created_user.php | 0 .../scale/count_of_annual_delivered_story.php | 0 .../count_of_annual_finished_productplan.php | 0 .../count_of_annual_finished_project.php | 0 .../scale/count_of_annual_finished_story.php | 0 .../scale/count_of_annual_finished_task.php | 0 .../scale/count_of_annual_fixed_bug.php | 0 .../metric/calc/system/scale/count_of_bug.php | 0 .../calc/system/scale/count_of_case.php | 0 .../calc/system/scale/count_of_closed_bug.php | 0 .../scale/count_of_closed_execution.php | 0 .../system/scale/count_of_closed_feedback.php | 0 .../system/scale/count_of_closed_product.php | 0 .../system/scale/count_of_closed_program.php | 0 .../system/scale/count_of_closed_project.php | 0 .../system/scale/count_of_closed_story.php | 0 .../system/scale/count_of_closed_task.php | 0 .../scale/count_of_closed_top_program.php | 0 .../scale/count_of_daily_closed_bug.php | 0 .../scale/count_of_daily_created_story.php | 0 .../scale/count_of_daily_finished_task.php | 0 .../system/scale/count_of_daily_run_case.php | 0 ...nished_execution_which_annual_finished.php | 0 ...ayed_finished_execution_which_finished.php | 0 ...finished_project_which_annual_finished.php | 0 ...elayed_finished_project_which_finished.php | 0 .../system/scale/count_of_delivered_story.php | 0 .../metric/calc/system/scale/count_of_doc.php | 0 .../system/scale/count_of_doing_execution.php | 0 .../system/scale/count_of_doing_program.php | 0 .../system/scale/count_of_doing_project.php | 0 .../calc/system/scale/count_of_execution.php | 0 .../calc/system/scale/count_of_feedback.php | 0 .../scale/count_of_finished_productplan.php | 0 .../system/scale/count_of_finished_story.php | 0 .../system/scale/count_of_finished_task.php | 0 .../calc/system/scale/count_of_fixed_bug.php | 0 .../system/scale/count_of_invalid_story.php | 0 .../calc/system/scale/count_of_line.php | 0 .../system/scale/count_of_marker_release.php | 0 .../count_of_monthly_closed_execution.php | 0 .../scale/count_of_monthly_closed_project.php | 0 .../scale/count_of_monthly_created_bug.php | 0 .../count_of_monthly_created_execution.php | 0 .../count_of_monthly_created_project.php | 0 .../count_of_monthly_created_release.php | 0 .../scale/count_of_monthly_created_story.php | 0 .../scale/count_of_monthly_created_task.php | 0 .../scale/count_of_monthly_finished_story.php | 0 .../scale/count_of_monthly_finished_task.php | 0 .../scale/count_of_monthly_fixed_bug.php | 0 .../system/scale/count_of_normal_product.php | 0 .../calc/system/scale/count_of_product.php | 0 .../system/scale/count_of_productplan.php | 0 .../calc/system/scale/count_of_program.php | 0 .../calc/system/scale/count_of_project.php | 0 .../calc/system/scale/count_of_release.php | 0 .../system/scale/count_of_resolved_bug.php | 0 .../calc/system/scale/count_of_story.php | 0 .../scale/count_of_suspended_execution.php | 0 .../scale/count_of_suspended_program.php | 0 .../scale/count_of_suspended_project.php | 0 .../calc/system/scale/count_of_task.php | 0 .../system/scale/count_of_top_program.php | 0 .../system/scale/count_of_unclosed_bug.php | 0 .../scale/count_of_unclosed_execution.php | 0 .../scale/count_of_unclosed_project.php | 0 .../system/scale/count_of_unclosed_story.php | 0 .../scale/count_of_unclosed_top_program.php | 0 ...nished_execution_which_annual_finished.php | 0 ...ayed_finished_execution_which_finished.php | 0 ...finished_project_which_annual_finished.php | 0 ..._finished_project_which_annual_started.php | 0 ...elayed_finished_project_which_finished.php | 0 .../scale/count_of_unfinished_productplan.php | 0 .../system/scale/count_of_unfinished_task.php | 0 .../calc/system/scale/count_of_user.php | 0 .../calc/system/scale/count_of_valid_bug.php | 0 .../system/scale/count_of_valid_story.php | 0 .../system/scale/count_of_wait_execution.php | 0 .../system/scale/count_of_wait_program.php | 0 .../system/scale/count_of_wait_project.php | 0 .../scale/count_of_weekly_created_release.php | 0 .../scale/count_of_weekly_finished_story.php | 0 .../scale/scale_of_annual_closed_story.php | 0 .../scale/scale_of_annual_delivered_story.php | 0 .../scale/scale_of_annual_finished_story.php | 0 .../system/scale/scale_of_finished_story.php | 3 +- .../system/scale/scale_of_invalid_story.php | 3 +- .../scale/scale_of_monthly_closed_story.php | 0 .../scale_of_monthly_delivered_story.php | 0 .../scale/scale_of_monthly_finished_story.php | 0 .../calc/system/scale/scale_of_story.php | 3 +- .../system/scale/scale_of_valid_story.php | 3 +- .../scale/scale_of_weekly_finished_story.php | 0 .../scale/count_of_assigned_bug_in_user.php | 0 .../scale/count_of_assigned_case_in_user.php | 0 .../count_of_assigned_feedback_in_user.php | 0 .../scale/count_of_assigned_task_in_user.php | 0 .../count_of_daily_finished_task_in_user.php | 0 .../count_of_daily_fixed_bug_in_user.php | 0 ...count_of_daily_review_feedback_in_user.php | 0 .../count_of_daily_review_story_in_user.php | 0 .../scale/count_of_dealyed_task_in_user.php | 0 .../scale/count_of_delayed_bug_in_user.php | 0 .../scale/count_of_pending_story_in_user.php | 0 .../count_of_reviewing_feedback_in_user.php | 0 .../count_of_reviewing_story_in_user.php | 0 module/metric/config/form.php | 0 module/metric/config/search.php | 0 module/metric/config/table.php | 0 module/metric/control.php | 144 +++- module/metric/css/preview.ui.css | 28 +- module/metric/dataset.php | 14 +- module/metric/js/common.ui.js | 31 + module/metric/js/preview.ui.js | 461 ++++--------- module/metric/lang/de.php | 56 +- module/metric/lang/en.php | 56 +- module/metric/lang/fr.php | 56 +- module/metric/lang/zh-cn.php | 56 +- module/metric/lang/zh-tw.php | 4 +- module/metric/model.php | 640 ++++++++++++++++-- module/metric/tao.php | 135 +++- .../hour/consume_of_task_in_execution.php | 0 .../hour/estimate_of_task_in_execution.php | 0 .../hour/left_of_task_in_execution.php | 0 .../rate/progress_of_task_in_execution.php | 0 .../rate_of_developed_story_in_execution.php | 0 .../rate_of_finished_story_in_execution.php | 0 ...nt_of_daily_finished_task_in_execution.php | 0 .../count_of_developed_story_in_execution.php | 0 .../count_of_finished_story_in_execution.php | 0 .../count_of_finished_task_in_execution.php | 0 .../count_of_invalid_story_in_execution.php | 0 .../scale/count_of_story_in_execution.php | 0 .../scale/count_of_task_in_execution.php | 0 .../count_of_unfinished_task_in_execution.php | 0 .../count_of_valid_story_in_execution.php | 0 .../qc/rate_of_approved_story_in_product.php | 0 .../rate/rate_of_finish_story_in_product.php | 0 .../rate/rate_of_fixed_bug_in_product.php | 0 ...ntration_of_developed_story_in_product.php | 0 ...coverage_of_projected_story_in_product.php | 0 .../count_of_activated_bug_in_product.php | 0 ...t_of_annual_closed_feedback_in_product.php | 0 ...ount_of_annual_closed_story_in_product.php | 0 ...count_of_annual_created_bug_in_product.php | 0 ...ount_of_annual_created_case_in_product.php | 0 ...nnual_created_effective_bug_in_product.php | 0 ..._of_annual_created_feedback_in_product.php | 0 ..._annual_created_productplan_in_product.php | 0 ...t_of_annual_created_release_in_product.php | 0 ..._annual_created_requirement_in_product.php | 0 ...unt_of_annual_created_story_in_product.php | 0 ...t_of_annual_delivered_story_in_product.php | 0 ...annual_finished_productplan_in_product.php | 0 ...nt_of_annual_finished_story_in_product.php | 0 .../count_of_annual_fixed_bug_in_product.php | 0 .../product/scale/count_of_bug_in_product.php | 0 .../scale/count_of_case_in_product.php | 0 .../count_of_closed_story_in_product.php | 0 .../count_of_daily_closed_bug_in_product.php | 0 .../count_of_daily_created_bug_in_product.php | 0 ...count_of_daily_resolved_bug_in_product.php | 0 .../count_of_delivered_story_in_product.php | 0 .../count_of_developed_story_in_product.php | 0 .../count_of_effective_bug_in_product.php | 0 .../scale/count_of_feedback_in_product.php | 0 .../count_of_finished_story_in_product.php | 0 .../scale/count_of_fixed_bug_in_product.php | 0 .../count_of_invalid_story_in_product.php | 0 ...unt_of_monthly_closed_story_in_product.php | 0 ...nt_of_monthly_created_story_in_product.php | 0 ..._of_monthly_delivered_story_in_product.php | 0 ...t_of_monthly_finished_story_in_product.php | 0 .../scale/count_of_productplan_in_product.php | 0 .../scale/count_of_release_in_product.php | 0 .../scale/count_of_requirement_in_product.php | 0 .../scale/count_of_severe_bug_in_product.php | 0 .../count_of_severity_1_bug_in_product.php | 0 .../count_of_severity_2_bug_in_product.php | 0 .../scale/count_of_story_in_product.php | 0 .../count_of_unclosed_story_in_product.php | 0 .../scale/count_of_valid_story_in_product.php | 0 ...cale_of_annual_closed_story_in_product.php | 0 ...e_of_annual_delivered_story_in_product.php | 0 ...le_of_annual_finished_story_in_product.php | 0 .../scale/scale_of_story_in_product.php | 0 .../case.yaml | 0 .../story.yaml | 0 .../project/hour/ac_of_all_in_waterfall.php | 0 .../hour/consume_of_all_in_project.php | 0 .../hour/consume_of_task_in_project.php | 0 .../hour/day_of_invested_in_project.php | 0 .../hour/estimate_of_task_in_project.php | 0 .../hour/ev_of_finished_task_in_waterfall.php | 0 .../project/hour/left_of_task_in_project.php | 0 .../project/hour/pv_of_task_in_waterfall.php | 0 .../calc/project/rate/cv_in_waterfall.php | 0 .../rate/progress_of_task_in_project.php | 0 .../rate_of_finished_story_in_project.php | 0 .../calc/project/rate/sv_in_waterfall.php | 0 ...unt_annual_closed_execution_in_project.php | 0 .../count_of_activated_bug_in_project.php | 0 ...nt_of_annual_finished_story_in_project.php | 0 .../project/scale/count_of_bug_in_project.php | 0 .../scale/count_of_closed_bug_in_project.php | 0 .../count_of_closed_execution_in_project.php | 0 .../count_of_closed_story_in_project.php | 0 .../count_of_doing_execution_in_project.php | 0 .../scale/count_of_doing_task_in_project.php | 0 .../scale/count_of_execution_in_project.php | 0 .../count_of_finished_story_in_project.php | 0 .../count_of_finished_task_in_project.php | 0 .../count_of_invalid_story_in_project.php | 0 .../count_of_opened_issue_in_project.php | 0 .../scale/count_of_opened_risk_in_project.php | 0 .../scale/count_of_story_in_project.php | 0 ...ount_of_suspended_execution_in_project.php | 0 .../scale/count_of_task_in_project.php | 0 .../count_of_unclosed_story_in_project.php | 0 .../scale/count_of_user_in_project.php | 0 .../scale/count_of_valid_story_in_project.php | 0 .../scale/count_of_wait_task_in_project.php | 0 .../scale/count_wait_execution_in_project.php | 0 ...le_of_annual_finished_story_in_project.php | 0 .../scale/scale_of_story_in_project.php | 0 .../time/count_of_actual_time_in_project.php | 0 .../project/time/left_period_of_project.php | 0 .../time/planned_period_of_project.php | 0 .../time/variance_of_time_in_project.php | 0 .../hour/consume_of_annual_closed_project.php | 0 .../consume_of_monthly_closed_project.php | 0 .../test/calc/system/hour/consume_of_task.php | 0 .../calc/system/hour/day_of_annual_effort.php | 0 .../estimate_of_annual_closed_project.php | 0 .../calc/system/hour/estimate_of_task.php | 0 .../system/hour/hour_of_annual_effort.php | 0 .../test/calc/system/hour/left_of_task.php | 0 .../rate/rate_of_annual_delivered_story.php | 0 .../rate/rate_of_annual_finished_story.php | 0 ...closed_execution_which_annual_finished.php | 0 ...finished_project_which_annual_finished.php | 0 .../system/rate/rate_of_delivered_story.php | 0 .../system/rate/rate_of_finished_story.php | 0 .../calc/system/rate/rate_of_fixed_bug.php | 0 .../system/scale/count_of_activated_bug.php | 0 .../count_of_annual_closed_execution.php | 0 .../scale/count_of_annual_closed_feedback.php | 0 .../scale/count_of_annual_closed_product.php | 0 .../count_of_annual_closed_productplan.php | 0 .../scale/count_of_annual_closed_project.php | 0 .../count_of_annual_closed_top_program.php | 0 .../scale/count_of_annual_created_bug.php | 0 .../scale/count_of_annual_created_case.php | 0 .../scale/count_of_annual_created_doc.php | 0 .../count_of_annual_created_execution.php | 0 .../count_of_annual_created_feedback.php | 0 .../scale/count_of_annual_created_product.php | 0 .../count_of_annual_created_productplan.php | 0 .../scale/count_of_annual_created_project.php | 0 .../scale/count_of_annual_created_release.php | 0 .../scale/count_of_annual_created_story.php | 0 .../scale/count_of_annual_created_task.php | 0 .../count_of_annual_created_top_program.php | 0 .../scale/count_of_annual_created_user.php | 0 .../scale/count_of_annual_delivered_story.php | 0 .../count_of_annual_finished_productplan.php | 0 .../count_of_annual_finished_project.php | 0 .../scale/count_of_annual_finished_story.php | 0 .../scale/count_of_annual_finished_task.php | 0 .../scale/count_of_annual_fixed_bug.php | 0 .../test/calc/system/scale/count_of_bug.php | 0 .../test/calc/system/scale/count_of_case.php | 0 .../calc/system/scale/count_of_closed_bug.php | 0 .../scale/count_of_closed_execution.php | 0 .../system/scale/count_of_closed_feedback.php | 0 .../system/scale/count_of_closed_product.php | 0 .../system/scale/count_of_closed_program.php | 0 .../system/scale/count_of_closed_project.php | 0 .../system/scale/count_of_closed_story.php | 0 .../system/scale/count_of_closed_task.php | 0 .../scale/count_of_closed_top_program.php | 0 .../scale/count_of_daily_created_story.php | 0 .../system/scale/count_of_daily_run_case.php | 0 ...nished_execution_which_annual_finished.php | 0 ...ayed_finished_execution_which_finished.php | 0 ...finished_project_which_annual_finished.php | 0 ...elayed_finished_project_which_finished.php | 0 .../system/scale/count_of_delivered_story.php | 0 .../test/calc/system/scale/count_of_doc.php | 0 .../system/scale/count_of_doing_execution.php | 0 .../system/scale/count_of_doing_program.php | 0 .../system/scale/count_of_doing_project.php | 0 .../calc/system/scale/count_of_execution.php | 0 .../calc/system/scale/count_of_feedback.php | 0 .../scale/count_of_finished_productplan.php | 0 .../system/scale/count_of_finished_story.php | 0 .../system/scale/count_of_finished_task.php | 0 .../calc/system/scale/count_of_fixed_bug.php | 0 .../system/scale/count_of_invalid_story.php | 0 .../test/calc/system/scale/count_of_line.php | 0 .../system/scale/count_of_marker_release.php | 0 .../count_of_monthly_closed_execution.php | 0 .../scale/count_of_monthly_closed_project.php | 0 .../scale/count_of_monthly_created_bug.php | 0 .../count_of_monthly_created_execution.php | 0 .../count_of_monthly_created_project.php | 0 .../count_of_monthly_created_release.php | 0 .../scale/count_of_monthly_created_story.php | 0 .../scale/count_of_monthly_created_task.php | 0 .../scale/count_of_monthly_finished_story.php | 0 .../scale/count_of_monthly_finished_task.php | 0 .../scale/count_of_monthly_fixed_bug.php | 0 .../system/scale/count_of_normal_product.php | 0 .../calc/system/scale/count_of_product.php | 0 .../system/scale/count_of_productplan.php | 0 .../calc/system/scale/count_of_program.php | 0 .../calc/system/scale/count_of_project.php | 0 .../calc/system/scale/count_of_release.php | 0 .../system/scale/count_of_resolved_bug.php | 0 .../test/calc/system/scale/count_of_story.php | 0 .../scale/count_of_suspended_execution.php | 0 .../scale/count_of_suspended_program.php | 0 .../scale/count_of_suspended_project.php | 0 .../test/calc/system/scale/count_of_task.php | 0 .../system/scale/count_of_top_program.php | 0 .../system/scale/count_of_unclosed_bug.php | 0 .../scale/count_of_unclosed_execution.php | 0 .../scale/count_of_unclosed_project.php | 0 .../system/scale/count_of_unclosed_story.php | 0 .../scale/count_of_unclosed_top_program.php | 0 ...nished_execution_which_annual_finished.php | 0 ...ayed_finished_execution_which_finished.php | 0 ...finished_project_which_annual_finished.php | 0 ..._finished_project_which_annual_started.php | 0 ...elayed_finished_project_which_finished.php | 0 .../scale/count_of_unfinished_productplan.php | 0 .../system/scale/count_of_unfinished_task.php | 0 .../test/calc/system/scale/count_of_user.php | 0 .../calc/system/scale/count_of_valid_bug.php | 0 .../system/scale/count_of_valid_story.php | 0 .../system/scale/count_of_wait_execution.php | 0 .../system/scale/count_of_wait_program.php | 0 .../system/scale/count_of_wait_project.php | 0 .../scale/count_of_weekly_created_release.php | 0 .../scale/count_of_weekly_finished_story.php | 0 .../scale/scale_of_annual_closed_story.php | 0 .../scale/scale_of_annual_delivered_story.php | 0 .../scale/scale_of_annual_finished_story.php | 0 .../system/scale/scale_of_finished_story.php | 0 .../system/scale/scale_of_invalid_story.php | 0 .../scale/scale_of_monthly_closed_story.php | 0 .../scale_of_monthly_delivered_story.php | 0 .../scale/scale_of_monthly_finished_story.php | 0 .../test/calc/system/scale/scale_of_story.php | 0 .../system/scale/scale_of_valid_story.php | 0 .../scale/scale_of_weekly_finished_story.php | 0 .../scale/count_of_assigned_bug_in_user.php | 0 .../count_of_assigned_feedback_in_user.php | 0 .../scale/count_of_assigned_task_in_user.php | 0 .../count_of_daily_finished_task_in_user.php | 0 .../count_of_daily_fixed_bug_in_user.php | 0 ...count_of_daily_review_feedback_in_user.php | 0 .../count_of_daily_review_story_in_user.php | 0 .../scale/count_of_pending_story_in_user.php | 0 .../count_of_reviewing_feedback_in_user.php | 0 .../count_of_reviewing_story_in_user.php | 0 module/metric/test/groupData/notime.php | 18 + module/metric/test/groupData/notimeobject.php | 20 + module/metric/test/groupData/object-year.php | 17 + module/metric/test/groupData/time-day.php | 24 + module/metric/test/groupData/time-month.php | 20 + module/metric/test/groupData/time-week.php | 20 + module/metric/test/groupData/time-year.php | 14 + .../metric/ui/ajaxgetmetricsidetree.html.php | 41 ++ .../ui/ajaxgetmultiplemetricbox.html.php | 230 +++++++ .../metric/ui/ajaxgettableandcharts.html.php | 60 ++ module/metric/ui/browse.html.php | 14 +- module/metric/ui/create.html.php | 22 +- module/metric/ui/details.html.php | 22 +- module/metric/ui/edit.html.php | 28 +- module/metric/ui/emptycollect.html.php | 6 +- module/metric/ui/implement.html.php | 18 +- module/metric/ui/preview.html.php | 1 + module/metric/ui/previewmultiple.html.php | 518 ++++++++------ module/metric/ui/previewsingle.html.php | 244 ++++--- module/metric/ui/viewphpmetric.html.php | 17 +- module/metric/ui/viewsqlmetric.html.php | 61 +- module/metric/view/browse.html.php | 0 module/metric/zen.php | 235 ++++++- 543 files changed, 2410 insertions(+), 976 deletions(-) mode change 100644 => 100755 module/metric/calc/execution/hour/consume_of_task_in_execution.php mode change 100644 => 100755 module/metric/calc/execution/hour/estimate_of_task_in_execution.php mode change 100644 => 100755 module/metric/calc/execution/hour/left_of_task_in_execution.php mode change 100644 => 100755 module/metric/calc/execution/rate/progress_of_task_in_execution.php mode change 100644 => 100755 module/metric/calc/execution/rate/rate_of_developed_story_in_execution.php mode change 100644 => 100755 module/metric/calc/execution/rate/rate_of_finished_story_in_execution.php mode change 100644 => 100755 module/metric/calc/execution/scale/count_of_daily_finished_task_in_execution.php mode change 100644 => 100755 module/metric/calc/execution/scale/count_of_developed_story_in_execution.php mode change 100644 => 100755 module/metric/calc/execution/scale/count_of_finished_story_in_execution.php mode change 100644 => 100755 module/metric/calc/execution/scale/count_of_finished_task_in_execution.php mode change 100644 => 100755 module/metric/calc/execution/scale/count_of_invalid_story_in_execution.php mode change 100644 => 100755 module/metric/calc/execution/scale/count_of_story_in_execution.php mode change 100644 => 100755 module/metric/calc/execution/scale/count_of_task_in_execution.php mode change 100644 => 100755 module/metric/calc/execution/scale/count_of_unfinished_task_in_execution.php mode change 100644 => 100755 module/metric/calc/execution/scale/count_of_valid_story_in_execution.php mode change 100644 => 100755 module/metric/calc/product/qc/count_of_released_bug_in_product.php mode change 100644 => 100755 module/metric/calc/product/qc/rate_of_approved_story_in_product.php mode change 100644 => 100755 module/metric/calc/product/rate/rate_of_delivery_story_in_product.php mode change 100644 => 100755 module/metric/calc/product/rate/rate_of_finish_story_in_product.php mode change 100644 => 100755 module/metric/calc/product/rate/rate_of_fixed_bug_in_product.php mode change 100644 => 100755 module/metric/calc/product/scale/bug_concentration_of_developed_story_in_product.php mode change 100644 => 100755 module/metric/calc/product/scale/case_coverage_of_projected_story_in_product.php mode change 100644 => 100755 module/metric/calc/product/scale/count_of_activated_bug_in_product.php mode change 100644 => 100755 module/metric/calc/product/scale/count_of_annual_closed_feedback_in_product.php mode change 100644 => 100755 module/metric/calc/product/scale/count_of_annual_closed_story_in_product.php mode change 100644 => 100755 module/metric/calc/product/scale/count_of_annual_created_bug_in_product.php mode change 100644 => 100755 module/metric/calc/product/scale/count_of_annual_created_case_in_product.php mode change 100644 => 100755 module/metric/calc/product/scale/count_of_annual_created_effective_bug_in_product.php mode change 100644 => 100755 module/metric/calc/product/scale/count_of_annual_created_feedback_in_product.php mode change 100644 => 100755 module/metric/calc/product/scale/count_of_annual_created_productplan_in_product.php mode change 100644 => 100755 module/metric/calc/product/scale/count_of_annual_created_release_in_product.php mode change 100644 => 100755 module/metric/calc/product/scale/count_of_annual_created_requirement_in_product.php mode change 100644 => 100755 module/metric/calc/product/scale/count_of_annual_created_story_in_product.php mode change 100644 => 100755 module/metric/calc/product/scale/count_of_annual_delivered_story_in_product.php mode change 100644 => 100755 module/metric/calc/product/scale/count_of_annual_finished_productplan_in_product.php mode change 100644 => 100755 module/metric/calc/product/scale/count_of_annual_finished_story_in_product.php mode change 100644 => 100755 module/metric/calc/product/scale/count_of_annual_fixed_bug_in_product.php mode change 100644 => 100755 module/metric/calc/product/scale/count_of_bug_in_product.php mode change 100644 => 100755 module/metric/calc/product/scale/count_of_case_in_product.php mode change 100644 => 100755 module/metric/calc/product/scale/count_of_closed_story_in_product.php mode change 100644 => 100755 module/metric/calc/product/scale/count_of_daily_closed_bug_in_product.php mode change 100644 => 100755 module/metric/calc/product/scale/count_of_daily_created_bug_in_product.php mode change 100644 => 100755 module/metric/calc/product/scale/count_of_daily_resolved_bug_in_product.php mode change 100644 => 100755 module/metric/calc/product/scale/count_of_delivered_story_in_product.php mode change 100644 => 100755 module/metric/calc/product/scale/count_of_developed_story_in_product.php mode change 100644 => 100755 module/metric/calc/product/scale/count_of_effective_bug_in_product.php mode change 100644 => 100755 module/metric/calc/product/scale/count_of_feedback_in_product.php mode change 100644 => 100755 module/metric/calc/product/scale/count_of_finished_story_in_product.php mode change 100644 => 100755 module/metric/calc/product/scale/count_of_fixed_bug_in_product.php mode change 100644 => 100755 module/metric/calc/product/scale/count_of_invalid_story_in_product.php mode change 100644 => 100755 module/metric/calc/product/scale/count_of_monthly_closed_bug_in_product.php mode change 100644 => 100755 module/metric/calc/product/scale/count_of_monthly_closed_story_in_product.php mode change 100644 => 100755 module/metric/calc/product/scale/count_of_monthly_created_bug_in_product.php mode change 100644 => 100755 module/metric/calc/product/scale/count_of_monthly_created_release_in_product.php mode change 100644 => 100755 module/metric/calc/product/scale/count_of_monthly_created_story_in_product.php mode change 100644 => 100755 module/metric/calc/product/scale/count_of_monthly_delivered_story_in_product.php mode change 100644 => 100755 module/metric/calc/product/scale/count_of_monthly_finished_story_in_product.php mode change 100644 => 100755 module/metric/calc/product/scale/count_of_monthly_fixed_bug_in_product.php mode change 100644 => 100755 module/metric/calc/product/scale/count_of_productplan_in_product.php mode change 100644 => 100755 module/metric/calc/product/scale/count_of_release_in_product.php mode change 100644 => 100755 module/metric/calc/product/scale/count_of_requirement_in_product.php mode change 100644 => 100755 module/metric/calc/product/scale/count_of_severe_bug_in_product.php mode change 100644 => 100755 module/metric/calc/product/scale/count_of_severity_1_bug_in_product.php mode change 100644 => 100755 module/metric/calc/product/scale/count_of_severity_2_bug_in_product.php mode change 100644 => 100755 module/metric/calc/product/scale/count_of_story_in_product.php mode change 100644 => 100755 module/metric/calc/product/scale/count_of_unclosed_story_in_product.php mode change 100644 => 100755 module/metric/calc/product/scale/count_of_valid_story_in_product.php mode change 100644 => 100755 module/metric/calc/product/scale/scale_of_annual_closed_story_in_product.php mode change 100644 => 100755 module/metric/calc/product/scale/scale_of_annual_delivered_story_in_product.php mode change 100644 => 100755 module/metric/calc/product/scale/scale_of_annual_finished_story_in_product.php mode change 100644 => 100755 module/metric/calc/product/scale/scale_of_monthly_finished_story_in_product.php mode change 100644 => 100755 module/metric/calc/product/scale/scale_of_story_in_product.php mode change 100644 => 100755 module/metric/calc/project/hour/ac_of_all_in_waterfall.php mode change 100644 => 100755 module/metric/calc/project/hour/consume_of_all_in_project.php mode change 100644 => 100755 module/metric/calc/project/hour/consume_of_task_in_project.php mode change 100644 => 100755 module/metric/calc/project/hour/day_of_invested_in_project.php mode change 100644 => 100755 module/metric/calc/project/hour/estimate_of_task_in_project.php mode change 100644 => 100755 module/metric/calc/project/hour/ev_of_finished_task_in_waterfall.php mode change 100644 => 100755 module/metric/calc/project/hour/left_of_task_in_project.php mode change 100644 => 100755 module/metric/calc/project/hour/pv_of_task_in_waterfall.php mode change 100644 => 100755 module/metric/calc/project/rate/cv_in_waterfall.php mode change 100644 => 100755 module/metric/calc/project/rate/progress_of_task_in_project.php mode change 100644 => 100755 module/metric/calc/project/rate/rate_of_finished_story_in_project.php mode change 100644 => 100755 module/metric/calc/project/rate/sv_in_waterfall.php mode change 100644 => 100755 module/metric/calc/project/scale/count_annual_closed_execution_in_project.php mode change 100644 => 100755 module/metric/calc/project/scale/count_of_activated_bug_in_project.php mode change 100644 => 100755 module/metric/calc/project/scale/count_of_annual_finished_story_in_project.php mode change 100644 => 100755 module/metric/calc/project/scale/count_of_bug_in_project.php mode change 100644 => 100755 module/metric/calc/project/scale/count_of_closed_bug_in_project.php mode change 100644 => 100755 module/metric/calc/project/scale/count_of_closed_execution_in_project.php mode change 100644 => 100755 module/metric/calc/project/scale/count_of_closed_story_in_project.php mode change 100644 => 100755 module/metric/calc/project/scale/count_of_doing_execution_in_project.php mode change 100644 => 100755 module/metric/calc/project/scale/count_of_doing_task_in_project.php mode change 100644 => 100755 module/metric/calc/project/scale/count_of_execution_in_project.php mode change 100644 => 100755 module/metric/calc/project/scale/count_of_finished_story_in_project.php mode change 100644 => 100755 module/metric/calc/project/scale/count_of_finished_task_in_project.php mode change 100644 => 100755 module/metric/calc/project/scale/count_of_invalid_story_in_project.php mode change 100644 => 100755 module/metric/calc/project/scale/count_of_opened_issue_in_project.php mode change 100644 => 100755 module/metric/calc/project/scale/count_of_opened_risk_in_project.php mode change 100644 => 100755 module/metric/calc/project/scale/count_of_story_in_project.php mode change 100644 => 100755 module/metric/calc/project/scale/count_of_suspended_execution_in_project.php mode change 100644 => 100755 module/metric/calc/project/scale/count_of_task_in_project.php mode change 100644 => 100755 module/metric/calc/project/scale/count_of_unclosed_story_in_project.php mode change 100644 => 100755 module/metric/calc/project/scale/count_of_user_in_project.php mode change 100644 => 100755 module/metric/calc/project/scale/count_of_valid_story_in_project.php mode change 100644 => 100755 module/metric/calc/project/scale/count_of_wait_task_in_project.php mode change 100644 => 100755 module/metric/calc/project/scale/count_wait_execution_in_project.php mode change 100644 => 100755 module/metric/calc/project/scale/scale_of_annual_finished_story_in_project.php mode change 100644 => 100755 module/metric/calc/project/scale/scale_of_story_in_project.php mode change 100644 => 100755 module/metric/calc/project/time/count_of_actual_time_in_project.php mode change 100644 => 100755 module/metric/calc/project/time/left_period_of_project.php mode change 100644 => 100755 module/metric/calc/project/time/planned_period_of_project.php mode change 100644 => 100755 module/metric/calc/project/time/variance_of_time_in_project.php mode change 100644 => 100755 module/metric/calc/system/hour/consume_of_annual_closed_project.php mode change 100644 => 100755 module/metric/calc/system/hour/consume_of_monthly_closed_project.php mode change 100644 => 100755 module/metric/calc/system/hour/consume_of_task.php mode change 100644 => 100755 module/metric/calc/system/hour/day_of_annual_closed_project.php mode change 100644 => 100755 module/metric/calc/system/hour/day_of_annual_effort.php mode change 100644 => 100755 module/metric/calc/system/hour/day_of_daily_effort.php mode change 100644 => 100755 module/metric/calc/system/hour/estimate_of_annual_closed_project.php mode change 100644 => 100755 module/metric/calc/system/hour/estimate_of_task.php mode change 100644 => 100755 module/metric/calc/system/hour/hour_of_annual_effort.php mode change 100644 => 100755 module/metric/calc/system/hour/hour_of_daily_effort.php mode change 100644 => 100755 module/metric/calc/system/hour/left_of_task.php mode change 100644 => 100755 module/metric/calc/system/rate/rate_of_annual_delivered_story.php mode change 100644 => 100755 module/metric/calc/system/rate/rate_of_annual_finished_story.php mode change 100644 => 100755 module/metric/calc/system/rate/rate_of_delayed_closed_execution_which_annual_finished.php mode change 100644 => 100755 module/metric/calc/system/rate/rate_of_delayed_finished_project_which_annual_finished.php mode change 100644 => 100755 module/metric/calc/system/rate/rate_of_delivered_story.php mode change 100644 => 100755 module/metric/calc/system/rate/rate_of_finished_story.php mode change 100644 => 100755 module/metric/calc/system/rate/rate_of_fixed_bug.php mode change 100644 => 100755 module/metric/calc/system/rate/rate_of_undelayed_closed_execution_which_annual_finished.php mode change 100644 => 100755 module/metric/calc/system/rate/rate_of_undelayed_finished_project_which_annual_finished.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_activated_bug.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_annual_closed_execution.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_annual_closed_feedback.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_annual_closed_product.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_annual_closed_productplan.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_annual_closed_project.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_annual_closed_top_program.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_annual_created_bug.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_annual_created_case.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_annual_created_doc.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_annual_created_execution.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_annual_created_feedback.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_annual_created_product.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_annual_created_productplan.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_annual_created_project.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_annual_created_release.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_annual_created_story.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_annual_created_task.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_annual_created_top_program.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_annual_created_user.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_annual_delivered_story.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_annual_finished_productplan.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_annual_finished_project.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_annual_finished_story.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_annual_finished_task.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_annual_fixed_bug.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_bug.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_case.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_closed_bug.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_closed_execution.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_closed_feedback.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_closed_product.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_closed_program.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_closed_project.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_closed_story.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_closed_task.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_closed_top_program.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_daily_closed_bug.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_daily_created_story.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_daily_finished_task.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_daily_run_case.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_delayed_finished_execution_which_annual_finished.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_delayed_finished_execution_which_finished.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_delayed_finished_project_which_annual_finished.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_delayed_finished_project_which_finished.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_delivered_story.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_doc.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_doing_execution.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_doing_program.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_doing_project.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_execution.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_feedback.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_finished_productplan.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_finished_story.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_finished_task.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_fixed_bug.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_invalid_story.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_line.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_marker_release.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_monthly_closed_execution.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_monthly_closed_project.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_monthly_created_bug.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_monthly_created_execution.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_monthly_created_project.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_monthly_created_release.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_monthly_created_story.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_monthly_created_task.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_monthly_finished_story.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_monthly_finished_task.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_monthly_fixed_bug.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_normal_product.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_product.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_productplan.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_program.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_project.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_release.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_resolved_bug.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_story.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_suspended_execution.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_suspended_program.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_suspended_project.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_task.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_top_program.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_unclosed_bug.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_unclosed_execution.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_unclosed_project.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_unclosed_story.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_unclosed_top_program.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_undelayed_finished_execution_which_annual_finished.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_undelayed_finished_execution_which_finished.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_undelayed_finished_project_which_annual_finished.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_undelayed_finished_project_which_annual_started.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_undelayed_finished_project_which_finished.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_unfinished_productplan.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_unfinished_task.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_user.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_valid_bug.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_valid_story.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_wait_execution.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_wait_program.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_wait_project.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_weekly_created_release.php mode change 100644 => 100755 module/metric/calc/system/scale/count_of_weekly_finished_story.php mode change 100644 => 100755 module/metric/calc/system/scale/scale_of_annual_closed_story.php mode change 100644 => 100755 module/metric/calc/system/scale/scale_of_annual_delivered_story.php mode change 100644 => 100755 module/metric/calc/system/scale/scale_of_annual_finished_story.php mode change 100644 => 100755 module/metric/calc/system/scale/scale_of_finished_story.php mode change 100644 => 100755 module/metric/calc/system/scale/scale_of_invalid_story.php mode change 100644 => 100755 module/metric/calc/system/scale/scale_of_monthly_closed_story.php mode change 100644 => 100755 module/metric/calc/system/scale/scale_of_monthly_delivered_story.php mode change 100644 => 100755 module/metric/calc/system/scale/scale_of_monthly_finished_story.php mode change 100644 => 100755 module/metric/calc/system/scale/scale_of_story.php mode change 100644 => 100755 module/metric/calc/system/scale/scale_of_valid_story.php mode change 100644 => 100755 module/metric/calc/system/scale/scale_of_weekly_finished_story.php mode change 100644 => 100755 module/metric/calc/user/scale/count_of_assigned_bug_in_user.php mode change 100644 => 100755 module/metric/calc/user/scale/count_of_assigned_case_in_user.php mode change 100644 => 100755 module/metric/calc/user/scale/count_of_assigned_feedback_in_user.php mode change 100644 => 100755 module/metric/calc/user/scale/count_of_assigned_task_in_user.php mode change 100644 => 100755 module/metric/calc/user/scale/count_of_daily_finished_task_in_user.php mode change 100644 => 100755 module/metric/calc/user/scale/count_of_daily_fixed_bug_in_user.php mode change 100644 => 100755 module/metric/calc/user/scale/count_of_daily_review_feedback_in_user.php mode change 100644 => 100755 module/metric/calc/user/scale/count_of_daily_review_story_in_user.php mode change 100644 => 100755 module/metric/calc/user/scale/count_of_dealyed_task_in_user.php mode change 100644 => 100755 module/metric/calc/user/scale/count_of_delayed_bug_in_user.php mode change 100644 => 100755 module/metric/calc/user/scale/count_of_pending_story_in_user.php mode change 100644 => 100755 module/metric/calc/user/scale/count_of_reviewing_feedback_in_user.php mode change 100644 => 100755 module/metric/calc/user/scale/count_of_reviewing_story_in_user.php mode change 100644 => 100755 module/metric/config/form.php mode change 100644 => 100755 module/metric/config/search.php mode change 100644 => 100755 module/metric/config/table.php mode change 100644 => 100755 module/metric/control.php mode change 100644 => 100755 module/metric/lang/de.php mode change 100644 => 100755 module/metric/lang/en.php mode change 100644 => 100755 module/metric/lang/fr.php mode change 100644 => 100755 module/metric/lang/zh-cn.php mode change 100644 => 100755 module/metric/lang/zh-tw.php mode change 100644 => 100755 module/metric/model.php mode change 100644 => 100755 module/metric/test/calc/execution/hour/consume_of_task_in_execution.php mode change 100644 => 100755 module/metric/test/calc/execution/hour/estimate_of_task_in_execution.php mode change 100644 => 100755 module/metric/test/calc/execution/hour/left_of_task_in_execution.php mode change 100644 => 100755 module/metric/test/calc/execution/rate/progress_of_task_in_execution.php mode change 100644 => 100755 module/metric/test/calc/execution/rate/rate_of_developed_story_in_execution.php mode change 100644 => 100755 module/metric/test/calc/execution/rate/rate_of_finished_story_in_execution.php mode change 100644 => 100755 module/metric/test/calc/execution/scale/count_of_daily_finished_task_in_execution.php mode change 100644 => 100755 module/metric/test/calc/execution/scale/count_of_developed_story_in_execution.php mode change 100644 => 100755 module/metric/test/calc/execution/scale/count_of_finished_story_in_execution.php mode change 100644 => 100755 module/metric/test/calc/execution/scale/count_of_finished_task_in_execution.php mode change 100644 => 100755 module/metric/test/calc/execution/scale/count_of_invalid_story_in_execution.php mode change 100644 => 100755 module/metric/test/calc/execution/scale/count_of_story_in_execution.php mode change 100644 => 100755 module/metric/test/calc/execution/scale/count_of_task_in_execution.php mode change 100644 => 100755 module/metric/test/calc/execution/scale/count_of_unfinished_task_in_execution.php mode change 100644 => 100755 module/metric/test/calc/execution/scale/count_of_valid_story_in_execution.php mode change 100644 => 100755 module/metric/test/calc/product/qc/rate_of_approved_story_in_product.php mode change 100644 => 100755 module/metric/test/calc/product/rate/rate_of_finish_story_in_product.php mode change 100644 => 100755 module/metric/test/calc/product/rate/rate_of_fixed_bug_in_product.php mode change 100644 => 100755 module/metric/test/calc/product/scale/bug_concentration_of_developed_story_in_product.php mode change 100644 => 100755 module/metric/test/calc/product/scale/case_coverage_of_projected_story_in_product.php mode change 100644 => 100755 module/metric/test/calc/product/scale/count_of_activated_bug_in_product.php mode change 100644 => 100755 module/metric/test/calc/product/scale/count_of_annual_closed_feedback_in_product.php mode change 100644 => 100755 module/metric/test/calc/product/scale/count_of_annual_closed_story_in_product.php mode change 100644 => 100755 module/metric/test/calc/product/scale/count_of_annual_created_bug_in_product.php mode change 100644 => 100755 module/metric/test/calc/product/scale/count_of_annual_created_case_in_product.php mode change 100644 => 100755 module/metric/test/calc/product/scale/count_of_annual_created_effective_bug_in_product.php mode change 100644 => 100755 module/metric/test/calc/product/scale/count_of_annual_created_feedback_in_product.php mode change 100644 => 100755 module/metric/test/calc/product/scale/count_of_annual_created_productplan_in_product.php mode change 100644 => 100755 module/metric/test/calc/product/scale/count_of_annual_created_release_in_product.php mode change 100644 => 100755 module/metric/test/calc/product/scale/count_of_annual_created_requirement_in_product.php mode change 100644 => 100755 module/metric/test/calc/product/scale/count_of_annual_created_story_in_product.php mode change 100644 => 100755 module/metric/test/calc/product/scale/count_of_annual_delivered_story_in_product.php mode change 100644 => 100755 module/metric/test/calc/product/scale/count_of_annual_finished_productplan_in_product.php mode change 100644 => 100755 module/metric/test/calc/product/scale/count_of_annual_finished_story_in_product.php mode change 100644 => 100755 module/metric/test/calc/product/scale/count_of_annual_fixed_bug_in_product.php mode change 100644 => 100755 module/metric/test/calc/product/scale/count_of_bug_in_product.php mode change 100644 => 100755 module/metric/test/calc/product/scale/count_of_case_in_product.php mode change 100644 => 100755 module/metric/test/calc/product/scale/count_of_closed_story_in_product.php mode change 100644 => 100755 module/metric/test/calc/product/scale/count_of_daily_closed_bug_in_product.php mode change 100644 => 100755 module/metric/test/calc/product/scale/count_of_daily_created_bug_in_product.php mode change 100644 => 100755 module/metric/test/calc/product/scale/count_of_daily_resolved_bug_in_product.php mode change 100644 => 100755 module/metric/test/calc/product/scale/count_of_delivered_story_in_product.php mode change 100644 => 100755 module/metric/test/calc/product/scale/count_of_developed_story_in_product.php mode change 100644 => 100755 module/metric/test/calc/product/scale/count_of_effective_bug_in_product.php mode change 100644 => 100755 module/metric/test/calc/product/scale/count_of_feedback_in_product.php mode change 100644 => 100755 module/metric/test/calc/product/scale/count_of_finished_story_in_product.php mode change 100644 => 100755 module/metric/test/calc/product/scale/count_of_fixed_bug_in_product.php mode change 100644 => 100755 module/metric/test/calc/product/scale/count_of_invalid_story_in_product.php mode change 100644 => 100755 module/metric/test/calc/product/scale/count_of_monthly_closed_story_in_product.php mode change 100644 => 100755 module/metric/test/calc/product/scale/count_of_monthly_created_story_in_product.php mode change 100644 => 100755 module/metric/test/calc/product/scale/count_of_monthly_delivered_story_in_product.php mode change 100644 => 100755 module/metric/test/calc/product/scale/count_of_monthly_finished_story_in_product.php mode change 100644 => 100755 module/metric/test/calc/product/scale/count_of_productplan_in_product.php mode change 100644 => 100755 module/metric/test/calc/product/scale/count_of_release_in_product.php mode change 100644 => 100755 module/metric/test/calc/product/scale/count_of_requirement_in_product.php mode change 100644 => 100755 module/metric/test/calc/product/scale/count_of_severe_bug_in_product.php mode change 100644 => 100755 module/metric/test/calc/product/scale/count_of_severity_1_bug_in_product.php mode change 100644 => 100755 module/metric/test/calc/product/scale/count_of_severity_2_bug_in_product.php mode change 100644 => 100755 module/metric/test/calc/product/scale/count_of_story_in_product.php mode change 100644 => 100755 module/metric/test/calc/product/scale/count_of_unclosed_story_in_product.php mode change 100644 => 100755 module/metric/test/calc/product/scale/count_of_valid_story_in_product.php mode change 100644 => 100755 module/metric/test/calc/product/scale/scale_of_annual_closed_story_in_product.php mode change 100644 => 100755 module/metric/test/calc/product/scale/scale_of_annual_delivered_story_in_product.php mode change 100644 => 100755 module/metric/test/calc/product/scale/scale_of_annual_finished_story_in_product.php mode change 100644 => 100755 module/metric/test/calc/product/scale/scale_of_story_in_product.php mode change 100644 => 100755 module/metric/test/calc/product/scale/yaml/testcase_coverage_of_projected_story_in_product/case.yaml mode change 100644 => 100755 module/metric/test/calc/product/scale/yaml/testcase_coverage_of_projected_story_in_product/story.yaml mode change 100644 => 100755 module/metric/test/calc/project/hour/ac_of_all_in_waterfall.php mode change 100644 => 100755 module/metric/test/calc/project/hour/consume_of_all_in_project.php mode change 100644 => 100755 module/metric/test/calc/project/hour/consume_of_task_in_project.php mode change 100644 => 100755 module/metric/test/calc/project/hour/day_of_invested_in_project.php mode change 100644 => 100755 module/metric/test/calc/project/hour/estimate_of_task_in_project.php mode change 100644 => 100755 module/metric/test/calc/project/hour/ev_of_finished_task_in_waterfall.php mode change 100644 => 100755 module/metric/test/calc/project/hour/left_of_task_in_project.php mode change 100644 => 100755 module/metric/test/calc/project/hour/pv_of_task_in_waterfall.php mode change 100644 => 100755 module/metric/test/calc/project/rate/cv_in_waterfall.php mode change 100644 => 100755 module/metric/test/calc/project/rate/progress_of_task_in_project.php mode change 100644 => 100755 module/metric/test/calc/project/rate/rate_of_finished_story_in_project.php mode change 100644 => 100755 module/metric/test/calc/project/rate/sv_in_waterfall.php mode change 100644 => 100755 module/metric/test/calc/project/scale/count_annual_closed_execution_in_project.php mode change 100644 => 100755 module/metric/test/calc/project/scale/count_of_activated_bug_in_project.php mode change 100644 => 100755 module/metric/test/calc/project/scale/count_of_annual_finished_story_in_project.php mode change 100644 => 100755 module/metric/test/calc/project/scale/count_of_bug_in_project.php mode change 100644 => 100755 module/metric/test/calc/project/scale/count_of_closed_bug_in_project.php mode change 100644 => 100755 module/metric/test/calc/project/scale/count_of_closed_execution_in_project.php mode change 100644 => 100755 module/metric/test/calc/project/scale/count_of_closed_story_in_project.php mode change 100644 => 100755 module/metric/test/calc/project/scale/count_of_doing_execution_in_project.php mode change 100644 => 100755 module/metric/test/calc/project/scale/count_of_doing_task_in_project.php mode change 100644 => 100755 module/metric/test/calc/project/scale/count_of_execution_in_project.php mode change 100644 => 100755 module/metric/test/calc/project/scale/count_of_finished_story_in_project.php mode change 100644 => 100755 module/metric/test/calc/project/scale/count_of_finished_task_in_project.php mode change 100644 => 100755 module/metric/test/calc/project/scale/count_of_invalid_story_in_project.php mode change 100644 => 100755 module/metric/test/calc/project/scale/count_of_opened_issue_in_project.php mode change 100644 => 100755 module/metric/test/calc/project/scale/count_of_opened_risk_in_project.php mode change 100644 => 100755 module/metric/test/calc/project/scale/count_of_story_in_project.php mode change 100644 => 100755 module/metric/test/calc/project/scale/count_of_suspended_execution_in_project.php mode change 100644 => 100755 module/metric/test/calc/project/scale/count_of_task_in_project.php mode change 100644 => 100755 module/metric/test/calc/project/scale/count_of_unclosed_story_in_project.php mode change 100644 => 100755 module/metric/test/calc/project/scale/count_of_user_in_project.php mode change 100644 => 100755 module/metric/test/calc/project/scale/count_of_valid_story_in_project.php mode change 100644 => 100755 module/metric/test/calc/project/scale/count_of_wait_task_in_project.php mode change 100644 => 100755 module/metric/test/calc/project/scale/count_wait_execution_in_project.php mode change 100644 => 100755 module/metric/test/calc/project/scale/scale_of_annual_finished_story_in_project.php mode change 100644 => 100755 module/metric/test/calc/project/scale/scale_of_story_in_project.php mode change 100644 => 100755 module/metric/test/calc/project/time/count_of_actual_time_in_project.php mode change 100644 => 100755 module/metric/test/calc/project/time/left_period_of_project.php mode change 100644 => 100755 module/metric/test/calc/project/time/planned_period_of_project.php mode change 100644 => 100755 module/metric/test/calc/project/time/variance_of_time_in_project.php mode change 100644 => 100755 module/metric/test/calc/system/hour/consume_of_annual_closed_project.php mode change 100644 => 100755 module/metric/test/calc/system/hour/consume_of_monthly_closed_project.php mode change 100644 => 100755 module/metric/test/calc/system/hour/consume_of_task.php mode change 100644 => 100755 module/metric/test/calc/system/hour/day_of_annual_effort.php mode change 100644 => 100755 module/metric/test/calc/system/hour/estimate_of_annual_closed_project.php mode change 100644 => 100755 module/metric/test/calc/system/hour/estimate_of_task.php mode change 100644 => 100755 module/metric/test/calc/system/hour/hour_of_annual_effort.php mode change 100644 => 100755 module/metric/test/calc/system/hour/left_of_task.php mode change 100644 => 100755 module/metric/test/calc/system/rate/rate_of_annual_delivered_story.php mode change 100644 => 100755 module/metric/test/calc/system/rate/rate_of_annual_finished_story.php mode change 100644 => 100755 module/metric/test/calc/system/rate/rate_of_delayed_closed_execution_which_annual_finished.php mode change 100644 => 100755 module/metric/test/calc/system/rate/rate_of_delayed_finished_project_which_annual_finished.php mode change 100644 => 100755 module/metric/test/calc/system/rate/rate_of_delivered_story.php mode change 100644 => 100755 module/metric/test/calc/system/rate/rate_of_finished_story.php mode change 100644 => 100755 module/metric/test/calc/system/rate/rate_of_fixed_bug.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_activated_bug.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_annual_closed_execution.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_annual_closed_feedback.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_annual_closed_product.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_annual_closed_productplan.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_annual_closed_project.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_annual_closed_top_program.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_annual_created_bug.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_annual_created_case.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_annual_created_doc.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_annual_created_execution.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_annual_created_feedback.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_annual_created_product.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_annual_created_productplan.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_annual_created_project.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_annual_created_release.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_annual_created_story.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_annual_created_task.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_annual_created_top_program.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_annual_created_user.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_annual_delivered_story.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_annual_finished_productplan.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_annual_finished_project.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_annual_finished_story.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_annual_finished_task.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_annual_fixed_bug.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_bug.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_case.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_closed_bug.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_closed_execution.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_closed_feedback.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_closed_product.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_closed_program.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_closed_project.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_closed_story.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_closed_task.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_closed_top_program.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_daily_created_story.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_daily_run_case.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_delayed_finished_execution_which_annual_finished.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_delayed_finished_execution_which_finished.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_delayed_finished_project_which_annual_finished.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_delayed_finished_project_which_finished.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_delivered_story.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_doc.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_doing_execution.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_doing_program.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_doing_project.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_execution.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_feedback.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_finished_productplan.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_finished_story.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_finished_task.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_fixed_bug.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_invalid_story.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_line.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_marker_release.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_monthly_closed_execution.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_monthly_closed_project.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_monthly_created_bug.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_monthly_created_execution.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_monthly_created_project.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_monthly_created_release.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_monthly_created_story.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_monthly_created_task.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_monthly_finished_story.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_monthly_finished_task.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_monthly_fixed_bug.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_normal_product.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_product.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_productplan.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_program.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_project.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_release.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_resolved_bug.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_story.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_suspended_execution.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_suspended_program.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_suspended_project.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_task.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_top_program.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_unclosed_bug.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_unclosed_execution.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_unclosed_project.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_unclosed_story.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_unclosed_top_program.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_undelayed_finished_execution_which_annual_finished.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_undelayed_finished_execution_which_finished.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_undelayed_finished_project_which_annual_finished.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_undelayed_finished_project_which_annual_started.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_undelayed_finished_project_which_finished.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_unfinished_productplan.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_unfinished_task.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_user.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_valid_bug.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_valid_story.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_wait_execution.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_wait_program.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_wait_project.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_weekly_created_release.php mode change 100644 => 100755 module/metric/test/calc/system/scale/count_of_weekly_finished_story.php mode change 100644 => 100755 module/metric/test/calc/system/scale/scale_of_annual_closed_story.php mode change 100644 => 100755 module/metric/test/calc/system/scale/scale_of_annual_delivered_story.php mode change 100644 => 100755 module/metric/test/calc/system/scale/scale_of_annual_finished_story.php mode change 100644 => 100755 module/metric/test/calc/system/scale/scale_of_finished_story.php mode change 100644 => 100755 module/metric/test/calc/system/scale/scale_of_invalid_story.php mode change 100644 => 100755 module/metric/test/calc/system/scale/scale_of_monthly_closed_story.php mode change 100644 => 100755 module/metric/test/calc/system/scale/scale_of_monthly_delivered_story.php mode change 100644 => 100755 module/metric/test/calc/system/scale/scale_of_monthly_finished_story.php mode change 100644 => 100755 module/metric/test/calc/system/scale/scale_of_story.php mode change 100644 => 100755 module/metric/test/calc/system/scale/scale_of_valid_story.php mode change 100644 => 100755 module/metric/test/calc/system/scale/scale_of_weekly_finished_story.php mode change 100644 => 100755 module/metric/test/calc/user/scale/count_of_assigned_bug_in_user.php mode change 100644 => 100755 module/metric/test/calc/user/scale/count_of_assigned_feedback_in_user.php mode change 100644 => 100755 module/metric/test/calc/user/scale/count_of_assigned_task_in_user.php mode change 100644 => 100755 module/metric/test/calc/user/scale/count_of_daily_finished_task_in_user.php mode change 100644 => 100755 module/metric/test/calc/user/scale/count_of_daily_fixed_bug_in_user.php mode change 100644 => 100755 module/metric/test/calc/user/scale/count_of_daily_review_feedback_in_user.php mode change 100644 => 100755 module/metric/test/calc/user/scale/count_of_daily_review_story_in_user.php mode change 100644 => 100755 module/metric/test/calc/user/scale/count_of_pending_story_in_user.php mode change 100644 => 100755 module/metric/test/calc/user/scale/count_of_reviewing_feedback_in_user.php mode change 100644 => 100755 module/metric/test/calc/user/scale/count_of_reviewing_story_in_user.php create mode 100644 module/metric/test/groupData/notime.php create mode 100644 module/metric/test/groupData/notimeobject.php create mode 100644 module/metric/test/groupData/object-year.php create mode 100644 module/metric/test/groupData/time-day.php create mode 100644 module/metric/test/groupData/time-month.php create mode 100644 module/metric/test/groupData/time-week.php create mode 100644 module/metric/test/groupData/time-year.php create mode 100644 module/metric/ui/ajaxgetmetricsidetree.html.php create mode 100644 module/metric/ui/ajaxgetmultiplemetricbox.html.php create mode 100644 module/metric/ui/ajaxgettableandcharts.html.php mode change 100644 => 100755 module/metric/ui/browse.html.php mode change 100644 => 100755 module/metric/view/browse.html.php diff --git a/module/metric/calc/execution/hour/consume_of_task_in_execution.php b/module/metric/calc/execution/hour/consume_of_task_in_execution.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/execution/hour/estimate_of_task_in_execution.php b/module/metric/calc/execution/hour/estimate_of_task_in_execution.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/execution/hour/left_of_task_in_execution.php b/module/metric/calc/execution/hour/left_of_task_in_execution.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/execution/rate/progress_of_task_in_execution.php b/module/metric/calc/execution/rate/progress_of_task_in_execution.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/execution/rate/rate_of_developed_story_in_execution.php b/module/metric/calc/execution/rate/rate_of_developed_story_in_execution.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/execution/rate/rate_of_finished_story_in_execution.php b/module/metric/calc/execution/rate/rate_of_finished_story_in_execution.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/execution/scale/count_of_daily_finished_task_in_execution.php b/module/metric/calc/execution/scale/count_of_daily_finished_task_in_execution.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/execution/scale/count_of_developed_story_in_execution.php b/module/metric/calc/execution/scale/count_of_developed_story_in_execution.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/execution/scale/count_of_finished_story_in_execution.php b/module/metric/calc/execution/scale/count_of_finished_story_in_execution.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/execution/scale/count_of_finished_task_in_execution.php b/module/metric/calc/execution/scale/count_of_finished_task_in_execution.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/execution/scale/count_of_invalid_story_in_execution.php b/module/metric/calc/execution/scale/count_of_invalid_story_in_execution.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/execution/scale/count_of_story_in_execution.php b/module/metric/calc/execution/scale/count_of_story_in_execution.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/execution/scale/count_of_task_in_execution.php b/module/metric/calc/execution/scale/count_of_task_in_execution.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/execution/scale/count_of_unfinished_task_in_execution.php b/module/metric/calc/execution/scale/count_of_unfinished_task_in_execution.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/execution/scale/count_of_valid_story_in_execution.php b/module/metric/calc/execution/scale/count_of_valid_story_in_execution.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/product/qc/count_of_released_bug_in_product.php b/module/metric/calc/product/qc/count_of_released_bug_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/product/qc/rate_of_approved_story_in_product.php b/module/metric/calc/product/qc/rate_of_approved_story_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/product/rate/rate_of_delivery_story_in_product.php b/module/metric/calc/product/rate/rate_of_delivery_story_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/product/rate/rate_of_finish_story_in_product.php b/module/metric/calc/product/rate/rate_of_finish_story_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/product/rate/rate_of_fixed_bug_in_product.php b/module/metric/calc/product/rate/rate_of_fixed_bug_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/product/scale/bug_concentration_of_developed_story_in_product.php b/module/metric/calc/product/scale/bug_concentration_of_developed_story_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/product/scale/case_coverage_of_projected_story_in_product.php b/module/metric/calc/product/scale/case_coverage_of_projected_story_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/product/scale/count_of_activated_bug_in_product.php b/module/metric/calc/product/scale/count_of_activated_bug_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/product/scale/count_of_annual_closed_feedback_in_product.php b/module/metric/calc/product/scale/count_of_annual_closed_feedback_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/product/scale/count_of_annual_closed_story_in_product.php b/module/metric/calc/product/scale/count_of_annual_closed_story_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/product/scale/count_of_annual_created_bug_in_product.php b/module/metric/calc/product/scale/count_of_annual_created_bug_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/product/scale/count_of_annual_created_case_in_product.php b/module/metric/calc/product/scale/count_of_annual_created_case_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/product/scale/count_of_annual_created_effective_bug_in_product.php b/module/metric/calc/product/scale/count_of_annual_created_effective_bug_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/product/scale/count_of_annual_created_feedback_in_product.php b/module/metric/calc/product/scale/count_of_annual_created_feedback_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/product/scale/count_of_annual_created_productplan_in_product.php b/module/metric/calc/product/scale/count_of_annual_created_productplan_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/product/scale/count_of_annual_created_release_in_product.php b/module/metric/calc/product/scale/count_of_annual_created_release_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/product/scale/count_of_annual_created_requirement_in_product.php b/module/metric/calc/product/scale/count_of_annual_created_requirement_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/product/scale/count_of_annual_created_story_in_product.php b/module/metric/calc/product/scale/count_of_annual_created_story_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/product/scale/count_of_annual_delivered_story_in_product.php b/module/metric/calc/product/scale/count_of_annual_delivered_story_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/product/scale/count_of_annual_finished_productplan_in_product.php b/module/metric/calc/product/scale/count_of_annual_finished_productplan_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/product/scale/count_of_annual_finished_story_in_product.php b/module/metric/calc/product/scale/count_of_annual_finished_story_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/product/scale/count_of_annual_fixed_bug_in_product.php b/module/metric/calc/product/scale/count_of_annual_fixed_bug_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/product/scale/count_of_bug_in_product.php b/module/metric/calc/product/scale/count_of_bug_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/product/scale/count_of_case_in_product.php b/module/metric/calc/product/scale/count_of_case_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/product/scale/count_of_closed_story_in_product.php b/module/metric/calc/product/scale/count_of_closed_story_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/product/scale/count_of_daily_closed_bug_in_product.php b/module/metric/calc/product/scale/count_of_daily_closed_bug_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/product/scale/count_of_daily_created_bug_in_product.php b/module/metric/calc/product/scale/count_of_daily_created_bug_in_product.php old mode 100644 new mode 100755 index 1bbda522ab..c9c693045d --- a/module/metric/calc/product/scale/count_of_daily_created_bug_in_product.php +++ b/module/metric/calc/product/scale/count_of_daily_created_bug_in_product.php @@ -44,21 +44,7 @@ class count_of_daily_created_bug_in_product extends baseCalc public function getResult($options = array()) { - $records = array(); - foreach($this->result as $product => $years) - { - foreach($years as $year => $months) - { - foreach($months as $month => $days) - { - foreach($days as $day => $value) - { - $records[] = array('product' => $product, 'year' => $year, 'month' => $month, 'day' => $day, 'value' => $value); - } - } - } - } - + $records = $this->getRecords(array('product', 'year', 'month', 'day', 'value')); return $this->filterByOptions($records, $options); } } diff --git a/module/metric/calc/product/scale/count_of_daily_resolved_bug_in_product.php b/module/metric/calc/product/scale/count_of_daily_resolved_bug_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/product/scale/count_of_delivered_story_in_product.php b/module/metric/calc/product/scale/count_of_delivered_story_in_product.php old mode 100644 new mode 100755 index 5c89ccb793..bb8bf6e992 --- a/module/metric/calc/product/scale/count_of_delivered_story_in_product.php +++ b/module/metric/calc/product/scale/count_of_delivered_story_in_product.php @@ -44,6 +44,7 @@ class count_of_delivered_story_in_product extends baseCalc public function getResult($options = array()) { - return $this->filterByOptions($this->result, $options); + $records = $this->result; + return $this->filterByOptions($records, $options); } } diff --git a/module/metric/calc/product/scale/count_of_developed_story_in_product.php b/module/metric/calc/product/scale/count_of_developed_story_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/product/scale/count_of_effective_bug_in_product.php b/module/metric/calc/product/scale/count_of_effective_bug_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/product/scale/count_of_feedback_in_product.php b/module/metric/calc/product/scale/count_of_feedback_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/product/scale/count_of_finished_story_in_product.php b/module/metric/calc/product/scale/count_of_finished_story_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/product/scale/count_of_fixed_bug_in_product.php b/module/metric/calc/product/scale/count_of_fixed_bug_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/product/scale/count_of_invalid_story_in_product.php b/module/metric/calc/product/scale/count_of_invalid_story_in_product.php old mode 100644 new mode 100755 index f8939f7828..6138cb3dc5 --- a/module/metric/calc/product/scale/count_of_invalid_story_in_product.php +++ b/module/metric/calc/product/scale/count_of_invalid_story_in_product.php @@ -43,6 +43,7 @@ class count_of_invalid_story_in_product extends baseCalc public function getResult($options = array()) { - return $this->filterByOptions($this->result, $options); + $records = $this->result; + return $this->filterByOptions($records, $options); } } diff --git a/module/metric/calc/product/scale/count_of_monthly_closed_bug_in_product.php b/module/metric/calc/product/scale/count_of_monthly_closed_bug_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/product/scale/count_of_monthly_closed_story_in_product.php b/module/metric/calc/product/scale/count_of_monthly_closed_story_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/product/scale/count_of_monthly_created_bug_in_product.php b/module/metric/calc/product/scale/count_of_monthly_created_bug_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/product/scale/count_of_monthly_created_release_in_product.php b/module/metric/calc/product/scale/count_of_monthly_created_release_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/product/scale/count_of_monthly_created_story_in_product.php b/module/metric/calc/product/scale/count_of_monthly_created_story_in_product.php old mode 100644 new mode 100755 index c95466e0f3..52bdd7bd21 --- a/module/metric/calc/product/scale/count_of_monthly_created_story_in_product.php +++ b/module/metric/calc/product/scale/count_of_monthly_created_story_in_product.php @@ -47,18 +47,7 @@ class count_of_monthly_created_story_in_product extends baseCalc public function getResult($options = null) { - $records = array(); - foreach($this->result as $product => $years) - { - foreach($years as $year => $months) - { - foreach($months as $month => $value) - { - $records[] = array('product' => $product, 'year' => $year, 'month' => $month, 'value' => $value); - } - } - } - + $records = $this->getRecords(array('product', 'year', 'month', 'value')); return $this->filterByOptions($records, $options); } } diff --git a/module/metric/calc/product/scale/count_of_monthly_delivered_story_in_product.php b/module/metric/calc/product/scale/count_of_monthly_delivered_story_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/product/scale/count_of_monthly_finished_story_in_product.php b/module/metric/calc/product/scale/count_of_monthly_finished_story_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/product/scale/count_of_monthly_fixed_bug_in_product.php b/module/metric/calc/product/scale/count_of_monthly_fixed_bug_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/product/scale/count_of_productplan_in_product.php b/module/metric/calc/product/scale/count_of_productplan_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/product/scale/count_of_release_in_product.php b/module/metric/calc/product/scale/count_of_release_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/product/scale/count_of_requirement_in_product.php b/module/metric/calc/product/scale/count_of_requirement_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/product/scale/count_of_severe_bug_in_product.php b/module/metric/calc/product/scale/count_of_severe_bug_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/product/scale/count_of_severity_1_bug_in_product.php b/module/metric/calc/product/scale/count_of_severity_1_bug_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/product/scale/count_of_severity_2_bug_in_product.php b/module/metric/calc/product/scale/count_of_severity_2_bug_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/product/scale/count_of_story_in_product.php b/module/metric/calc/product/scale/count_of_story_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/product/scale/count_of_unclosed_story_in_product.php b/module/metric/calc/product/scale/count_of_unclosed_story_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/product/scale/count_of_valid_story_in_product.php b/module/metric/calc/product/scale/count_of_valid_story_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/product/scale/scale_of_annual_closed_story_in_product.php b/module/metric/calc/product/scale/scale_of_annual_closed_story_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/product/scale/scale_of_annual_delivered_story_in_product.php b/module/metric/calc/product/scale/scale_of_annual_delivered_story_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/product/scale/scale_of_annual_finished_story_in_product.php b/module/metric/calc/product/scale/scale_of_annual_finished_story_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/product/scale/scale_of_monthly_finished_story_in_product.php b/module/metric/calc/product/scale/scale_of_monthly_finished_story_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/product/scale/scale_of_story_in_product.php b/module/metric/calc/product/scale/scale_of_story_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/project/hour/ac_of_all_in_waterfall.php b/module/metric/calc/project/hour/ac_of_all_in_waterfall.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/project/hour/consume_of_all_in_project.php b/module/metric/calc/project/hour/consume_of_all_in_project.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/project/hour/consume_of_task_in_project.php b/module/metric/calc/project/hour/consume_of_task_in_project.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/project/hour/day_of_invested_in_project.php b/module/metric/calc/project/hour/day_of_invested_in_project.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/project/hour/estimate_of_task_in_project.php b/module/metric/calc/project/hour/estimate_of_task_in_project.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/project/hour/ev_of_finished_task_in_waterfall.php b/module/metric/calc/project/hour/ev_of_finished_task_in_waterfall.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/project/hour/left_of_task_in_project.php b/module/metric/calc/project/hour/left_of_task_in_project.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/project/hour/pv_of_task_in_waterfall.php b/module/metric/calc/project/hour/pv_of_task_in_waterfall.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/project/rate/cv_in_waterfall.php b/module/metric/calc/project/rate/cv_in_waterfall.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/project/rate/progress_of_task_in_project.php b/module/metric/calc/project/rate/progress_of_task_in_project.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/project/rate/rate_of_finished_story_in_project.php b/module/metric/calc/project/rate/rate_of_finished_story_in_project.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/project/rate/sv_in_waterfall.php b/module/metric/calc/project/rate/sv_in_waterfall.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/project/scale/count_annual_closed_execution_in_project.php b/module/metric/calc/project/scale/count_annual_closed_execution_in_project.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/project/scale/count_of_activated_bug_in_project.php b/module/metric/calc/project/scale/count_of_activated_bug_in_project.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/project/scale/count_of_annual_finished_story_in_project.php b/module/metric/calc/project/scale/count_of_annual_finished_story_in_project.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/project/scale/count_of_bug_in_project.php b/module/metric/calc/project/scale/count_of_bug_in_project.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/project/scale/count_of_closed_bug_in_project.php b/module/metric/calc/project/scale/count_of_closed_bug_in_project.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/project/scale/count_of_closed_execution_in_project.php b/module/metric/calc/project/scale/count_of_closed_execution_in_project.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/project/scale/count_of_closed_story_in_project.php b/module/metric/calc/project/scale/count_of_closed_story_in_project.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/project/scale/count_of_doing_execution_in_project.php b/module/metric/calc/project/scale/count_of_doing_execution_in_project.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/project/scale/count_of_doing_task_in_project.php b/module/metric/calc/project/scale/count_of_doing_task_in_project.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/project/scale/count_of_execution_in_project.php b/module/metric/calc/project/scale/count_of_execution_in_project.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/project/scale/count_of_finished_story_in_project.php b/module/metric/calc/project/scale/count_of_finished_story_in_project.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/project/scale/count_of_finished_task_in_project.php b/module/metric/calc/project/scale/count_of_finished_task_in_project.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/project/scale/count_of_invalid_story_in_project.php b/module/metric/calc/project/scale/count_of_invalid_story_in_project.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/project/scale/count_of_opened_issue_in_project.php b/module/metric/calc/project/scale/count_of_opened_issue_in_project.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/project/scale/count_of_opened_risk_in_project.php b/module/metric/calc/project/scale/count_of_opened_risk_in_project.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/project/scale/count_of_story_in_project.php b/module/metric/calc/project/scale/count_of_story_in_project.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/project/scale/count_of_suspended_execution_in_project.php b/module/metric/calc/project/scale/count_of_suspended_execution_in_project.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/project/scale/count_of_task_in_project.php b/module/metric/calc/project/scale/count_of_task_in_project.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/project/scale/count_of_unclosed_story_in_project.php b/module/metric/calc/project/scale/count_of_unclosed_story_in_project.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/project/scale/count_of_user_in_project.php b/module/metric/calc/project/scale/count_of_user_in_project.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/project/scale/count_of_valid_story_in_project.php b/module/metric/calc/project/scale/count_of_valid_story_in_project.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/project/scale/count_of_wait_task_in_project.php b/module/metric/calc/project/scale/count_of_wait_task_in_project.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/project/scale/count_wait_execution_in_project.php b/module/metric/calc/project/scale/count_wait_execution_in_project.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/project/scale/scale_of_annual_finished_story_in_project.php b/module/metric/calc/project/scale/scale_of_annual_finished_story_in_project.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/project/scale/scale_of_story_in_project.php b/module/metric/calc/project/scale/scale_of_story_in_project.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/project/time/count_of_actual_time_in_project.php b/module/metric/calc/project/time/count_of_actual_time_in_project.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/project/time/left_period_of_project.php b/module/metric/calc/project/time/left_period_of_project.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/project/time/planned_period_of_project.php b/module/metric/calc/project/time/planned_period_of_project.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/project/time/variance_of_time_in_project.php b/module/metric/calc/project/time/variance_of_time_in_project.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/hour/consume_of_annual_closed_project.php b/module/metric/calc/system/hour/consume_of_annual_closed_project.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/hour/consume_of_monthly_closed_project.php b/module/metric/calc/system/hour/consume_of_monthly_closed_project.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/hour/consume_of_task.php b/module/metric/calc/system/hour/consume_of_task.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/hour/day_of_annual_closed_project.php b/module/metric/calc/system/hour/day_of_annual_closed_project.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/hour/day_of_annual_effort.php b/module/metric/calc/system/hour/day_of_annual_effort.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/hour/day_of_daily_effort.php b/module/metric/calc/system/hour/day_of_daily_effort.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/hour/estimate_of_annual_closed_project.php b/module/metric/calc/system/hour/estimate_of_annual_closed_project.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/hour/estimate_of_task.php b/module/metric/calc/system/hour/estimate_of_task.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/hour/hour_of_annual_effort.php b/module/metric/calc/system/hour/hour_of_annual_effort.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/hour/hour_of_daily_effort.php b/module/metric/calc/system/hour/hour_of_daily_effort.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/hour/left_of_task.php b/module/metric/calc/system/hour/left_of_task.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/rate/rate_of_annual_delivered_story.php b/module/metric/calc/system/rate/rate_of_annual_delivered_story.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/rate/rate_of_annual_finished_story.php b/module/metric/calc/system/rate/rate_of_annual_finished_story.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/rate/rate_of_delayed_closed_execution_which_annual_finished.php b/module/metric/calc/system/rate/rate_of_delayed_closed_execution_which_annual_finished.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/rate/rate_of_delayed_finished_project_which_annual_finished.php b/module/metric/calc/system/rate/rate_of_delayed_finished_project_which_annual_finished.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/rate/rate_of_delivered_story.php b/module/metric/calc/system/rate/rate_of_delivered_story.php old mode 100644 new mode 100755 index 387bc7174d..7034dfa761 --- a/module/metric/calc/system/rate/rate_of_delivered_story.php +++ b/module/metric/calc/system/rate/rate_of_delivered_story.php @@ -24,7 +24,7 @@ class rate_of_delivered_story extends baseCalc public $fieldList = array('t1.closedReason', 't1.stage'); - public $result = array(); + public $result = array('valid' => 0, 'delivered' => 0); public function calculate($row) { @@ -37,7 +37,7 @@ class rate_of_delivered_story extends baseCalc public function getResult($options = array()) { - $this->result = $this->result['valid'] ? round($this->result['delivered'] / $this->result['valid'], 4) : 0; + $this->result = !empty($this->result['valid']) ? round($this->result['delivered'] / $this->result['valid'], 4) : 0; $records = array(array('value' => $this->result)); return $this->filterByOptions($records, $options); diff --git a/module/metric/calc/system/rate/rate_of_finished_story.php b/module/metric/calc/system/rate/rate_of_finished_story.php old mode 100644 new mode 100755 index b6065b6160..bd80b8e992 --- a/module/metric/calc/system/rate/rate_of_finished_story.php +++ b/module/metric/calc/system/rate/rate_of_finished_story.php @@ -24,7 +24,7 @@ class rate_of_finished_story extends baseCalc public $fieldList = array('t1.status', 't1.closedReason'); - public $result = array(); + public $result = array('finished' => 0, 'valid' => 0); public function calculate($row) { @@ -37,7 +37,7 @@ class rate_of_finished_story extends baseCalc public function getResult($options = array()) { - $this->result = $this->result['valid'] ? round($this->result['finished'] / $this->result['valid'], 4) : 0; + $this->result = !empty($this->result['valid']) ? round($this->result['finished'] / $this->result['valid'], 4) : 0; $records = array(array('value' => $this->result)); return $this->filterByOptions($records, $options); diff --git a/module/metric/calc/system/rate/rate_of_fixed_bug.php b/module/metric/calc/system/rate/rate_of_fixed_bug.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/rate/rate_of_undelayed_closed_execution_which_annual_finished.php b/module/metric/calc/system/rate/rate_of_undelayed_closed_execution_which_annual_finished.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/rate/rate_of_undelayed_finished_project_which_annual_finished.php b/module/metric/calc/system/rate/rate_of_undelayed_finished_project_which_annual_finished.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_activated_bug.php b/module/metric/calc/system/scale/count_of_activated_bug.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_annual_closed_execution.php b/module/metric/calc/system/scale/count_of_annual_closed_execution.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_annual_closed_feedback.php b/module/metric/calc/system/scale/count_of_annual_closed_feedback.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_annual_closed_product.php b/module/metric/calc/system/scale/count_of_annual_closed_product.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_annual_closed_productplan.php b/module/metric/calc/system/scale/count_of_annual_closed_productplan.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_annual_closed_project.php b/module/metric/calc/system/scale/count_of_annual_closed_project.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_annual_closed_top_program.php b/module/metric/calc/system/scale/count_of_annual_closed_top_program.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_annual_created_bug.php b/module/metric/calc/system/scale/count_of_annual_created_bug.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_annual_created_case.php b/module/metric/calc/system/scale/count_of_annual_created_case.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_annual_created_doc.php b/module/metric/calc/system/scale/count_of_annual_created_doc.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_annual_created_execution.php b/module/metric/calc/system/scale/count_of_annual_created_execution.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_annual_created_feedback.php b/module/metric/calc/system/scale/count_of_annual_created_feedback.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_annual_created_product.php b/module/metric/calc/system/scale/count_of_annual_created_product.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_annual_created_productplan.php b/module/metric/calc/system/scale/count_of_annual_created_productplan.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_annual_created_project.php b/module/metric/calc/system/scale/count_of_annual_created_project.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_annual_created_release.php b/module/metric/calc/system/scale/count_of_annual_created_release.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_annual_created_story.php b/module/metric/calc/system/scale/count_of_annual_created_story.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_annual_created_task.php b/module/metric/calc/system/scale/count_of_annual_created_task.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_annual_created_top_program.php b/module/metric/calc/system/scale/count_of_annual_created_top_program.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_annual_created_user.php b/module/metric/calc/system/scale/count_of_annual_created_user.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_annual_delivered_story.php b/module/metric/calc/system/scale/count_of_annual_delivered_story.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_annual_finished_productplan.php b/module/metric/calc/system/scale/count_of_annual_finished_productplan.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_annual_finished_project.php b/module/metric/calc/system/scale/count_of_annual_finished_project.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_annual_finished_story.php b/module/metric/calc/system/scale/count_of_annual_finished_story.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_annual_finished_task.php b/module/metric/calc/system/scale/count_of_annual_finished_task.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_annual_fixed_bug.php b/module/metric/calc/system/scale/count_of_annual_fixed_bug.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_bug.php b/module/metric/calc/system/scale/count_of_bug.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_case.php b/module/metric/calc/system/scale/count_of_case.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_closed_bug.php b/module/metric/calc/system/scale/count_of_closed_bug.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_closed_execution.php b/module/metric/calc/system/scale/count_of_closed_execution.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_closed_feedback.php b/module/metric/calc/system/scale/count_of_closed_feedback.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_closed_product.php b/module/metric/calc/system/scale/count_of_closed_product.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_closed_program.php b/module/metric/calc/system/scale/count_of_closed_program.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_closed_project.php b/module/metric/calc/system/scale/count_of_closed_project.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_closed_story.php b/module/metric/calc/system/scale/count_of_closed_story.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_closed_task.php b/module/metric/calc/system/scale/count_of_closed_task.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_closed_top_program.php b/module/metric/calc/system/scale/count_of_closed_top_program.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_daily_closed_bug.php b/module/metric/calc/system/scale/count_of_daily_closed_bug.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_daily_created_story.php b/module/metric/calc/system/scale/count_of_daily_created_story.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_daily_finished_task.php b/module/metric/calc/system/scale/count_of_daily_finished_task.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_daily_run_case.php b/module/metric/calc/system/scale/count_of_daily_run_case.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_delayed_finished_execution_which_annual_finished.php b/module/metric/calc/system/scale/count_of_delayed_finished_execution_which_annual_finished.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_delayed_finished_execution_which_finished.php b/module/metric/calc/system/scale/count_of_delayed_finished_execution_which_finished.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_delayed_finished_project_which_annual_finished.php b/module/metric/calc/system/scale/count_of_delayed_finished_project_which_annual_finished.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_delayed_finished_project_which_finished.php b/module/metric/calc/system/scale/count_of_delayed_finished_project_which_finished.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_delivered_story.php b/module/metric/calc/system/scale/count_of_delivered_story.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_doc.php b/module/metric/calc/system/scale/count_of_doc.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_doing_execution.php b/module/metric/calc/system/scale/count_of_doing_execution.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_doing_program.php b/module/metric/calc/system/scale/count_of_doing_program.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_doing_project.php b/module/metric/calc/system/scale/count_of_doing_project.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_execution.php b/module/metric/calc/system/scale/count_of_execution.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_feedback.php b/module/metric/calc/system/scale/count_of_feedback.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_finished_productplan.php b/module/metric/calc/system/scale/count_of_finished_productplan.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_finished_story.php b/module/metric/calc/system/scale/count_of_finished_story.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_finished_task.php b/module/metric/calc/system/scale/count_of_finished_task.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_fixed_bug.php b/module/metric/calc/system/scale/count_of_fixed_bug.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_invalid_story.php b/module/metric/calc/system/scale/count_of_invalid_story.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_line.php b/module/metric/calc/system/scale/count_of_line.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_marker_release.php b/module/metric/calc/system/scale/count_of_marker_release.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_monthly_closed_execution.php b/module/metric/calc/system/scale/count_of_monthly_closed_execution.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_monthly_closed_project.php b/module/metric/calc/system/scale/count_of_monthly_closed_project.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_monthly_created_bug.php b/module/metric/calc/system/scale/count_of_monthly_created_bug.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_monthly_created_execution.php b/module/metric/calc/system/scale/count_of_monthly_created_execution.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_monthly_created_project.php b/module/metric/calc/system/scale/count_of_monthly_created_project.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_monthly_created_release.php b/module/metric/calc/system/scale/count_of_monthly_created_release.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_monthly_created_story.php b/module/metric/calc/system/scale/count_of_monthly_created_story.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_monthly_created_task.php b/module/metric/calc/system/scale/count_of_monthly_created_task.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_monthly_finished_story.php b/module/metric/calc/system/scale/count_of_monthly_finished_story.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_monthly_finished_task.php b/module/metric/calc/system/scale/count_of_monthly_finished_task.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_monthly_fixed_bug.php b/module/metric/calc/system/scale/count_of_monthly_fixed_bug.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_normal_product.php b/module/metric/calc/system/scale/count_of_normal_product.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_product.php b/module/metric/calc/system/scale/count_of_product.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_productplan.php b/module/metric/calc/system/scale/count_of_productplan.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_program.php b/module/metric/calc/system/scale/count_of_program.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_project.php b/module/metric/calc/system/scale/count_of_project.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_release.php b/module/metric/calc/system/scale/count_of_release.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_resolved_bug.php b/module/metric/calc/system/scale/count_of_resolved_bug.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_story.php b/module/metric/calc/system/scale/count_of_story.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_suspended_execution.php b/module/metric/calc/system/scale/count_of_suspended_execution.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_suspended_program.php b/module/metric/calc/system/scale/count_of_suspended_program.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_suspended_project.php b/module/metric/calc/system/scale/count_of_suspended_project.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_task.php b/module/metric/calc/system/scale/count_of_task.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_top_program.php b/module/metric/calc/system/scale/count_of_top_program.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_unclosed_bug.php b/module/metric/calc/system/scale/count_of_unclosed_bug.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_unclosed_execution.php b/module/metric/calc/system/scale/count_of_unclosed_execution.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_unclosed_project.php b/module/metric/calc/system/scale/count_of_unclosed_project.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_unclosed_story.php b/module/metric/calc/system/scale/count_of_unclosed_story.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_unclosed_top_program.php b/module/metric/calc/system/scale/count_of_unclosed_top_program.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_undelayed_finished_execution_which_annual_finished.php b/module/metric/calc/system/scale/count_of_undelayed_finished_execution_which_annual_finished.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_undelayed_finished_execution_which_finished.php b/module/metric/calc/system/scale/count_of_undelayed_finished_execution_which_finished.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_undelayed_finished_project_which_annual_finished.php b/module/metric/calc/system/scale/count_of_undelayed_finished_project_which_annual_finished.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_undelayed_finished_project_which_annual_started.php b/module/metric/calc/system/scale/count_of_undelayed_finished_project_which_annual_started.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_undelayed_finished_project_which_finished.php b/module/metric/calc/system/scale/count_of_undelayed_finished_project_which_finished.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_unfinished_productplan.php b/module/metric/calc/system/scale/count_of_unfinished_productplan.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_unfinished_task.php b/module/metric/calc/system/scale/count_of_unfinished_task.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_user.php b/module/metric/calc/system/scale/count_of_user.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_valid_bug.php b/module/metric/calc/system/scale/count_of_valid_bug.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_valid_story.php b/module/metric/calc/system/scale/count_of_valid_story.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_wait_execution.php b/module/metric/calc/system/scale/count_of_wait_execution.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_wait_program.php b/module/metric/calc/system/scale/count_of_wait_program.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_wait_project.php b/module/metric/calc/system/scale/count_of_wait_project.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_weekly_created_release.php b/module/metric/calc/system/scale/count_of_weekly_created_release.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/count_of_weekly_finished_story.php b/module/metric/calc/system/scale/count_of_weekly_finished_story.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/scale_of_annual_closed_story.php b/module/metric/calc/system/scale/scale_of_annual_closed_story.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/scale_of_annual_delivered_story.php b/module/metric/calc/system/scale/scale_of_annual_delivered_story.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/scale_of_annual_finished_story.php b/module/metric/calc/system/scale/scale_of_annual_finished_story.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/scale_of_finished_story.php b/module/metric/calc/system/scale/scale_of_finished_story.php old mode 100644 new mode 100755 index 9089d8460d..aba40481bc --- a/module/metric/calc/system/scale/scale_of_finished_story.php +++ b/module/metric/calc/system/scale/scale_of_finished_story.php @@ -38,6 +38,7 @@ class scale_of_finished_story extends baseCalc public function getResult($options = array()) { - return $this->filterByOptions($this->result, $options); + $records = $this->getRecords(array('value')); + return $this->filterByOptions($records, $options); } } diff --git a/module/metric/calc/system/scale/scale_of_invalid_story.php b/module/metric/calc/system/scale/scale_of_invalid_story.php old mode 100644 new mode 100755 index cb2421150c..49d6d1e86b --- a/module/metric/calc/system/scale/scale_of_invalid_story.php +++ b/module/metric/calc/system/scale/scale_of_invalid_story.php @@ -38,6 +38,7 @@ class scale_of_invalid_story extends baseCalc public function getResult($options = array()) { - return $this->filterByOptions($this->result, $options); + $records = $this->getRecords(array('value')); + return $this->filterByOptions($records, $options); } } diff --git a/module/metric/calc/system/scale/scale_of_monthly_closed_story.php b/module/metric/calc/system/scale/scale_of_monthly_closed_story.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/scale_of_monthly_delivered_story.php b/module/metric/calc/system/scale/scale_of_monthly_delivered_story.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/scale_of_monthly_finished_story.php b/module/metric/calc/system/scale/scale_of_monthly_finished_story.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/system/scale/scale_of_story.php b/module/metric/calc/system/scale/scale_of_story.php old mode 100644 new mode 100755 index f01917df84..989678b8f4 --- a/module/metric/calc/system/scale/scale_of_story.php +++ b/module/metric/calc/system/scale/scale_of_story.php @@ -38,6 +38,7 @@ class scale_of_story extends baseCalc public function getResult($options = array()) { - return $this->filterByOptions($this->result, $options); + $records = $this->getRecords(array('value')); + return $this->filterByOptions($records, $options); } } diff --git a/module/metric/calc/system/scale/scale_of_valid_story.php b/module/metric/calc/system/scale/scale_of_valid_story.php old mode 100644 new mode 100755 index 6d7e2ceb61..4a64786546 --- a/module/metric/calc/system/scale/scale_of_valid_story.php +++ b/module/metric/calc/system/scale/scale_of_valid_story.php @@ -38,6 +38,7 @@ class scale_of_valid_story extends baseCalc public function getResult($options = array()) { - return $this->filterByOptions($this->result, $options); + $records = $this->getRecords(array('value')); + return $this->filterByOptions($records, $options); } } diff --git a/module/metric/calc/system/scale/scale_of_weekly_finished_story.php b/module/metric/calc/system/scale/scale_of_weekly_finished_story.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/user/scale/count_of_assigned_bug_in_user.php b/module/metric/calc/user/scale/count_of_assigned_bug_in_user.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/user/scale/count_of_assigned_case_in_user.php b/module/metric/calc/user/scale/count_of_assigned_case_in_user.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/user/scale/count_of_assigned_feedback_in_user.php b/module/metric/calc/user/scale/count_of_assigned_feedback_in_user.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/user/scale/count_of_assigned_task_in_user.php b/module/metric/calc/user/scale/count_of_assigned_task_in_user.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/user/scale/count_of_daily_finished_task_in_user.php b/module/metric/calc/user/scale/count_of_daily_finished_task_in_user.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/user/scale/count_of_daily_fixed_bug_in_user.php b/module/metric/calc/user/scale/count_of_daily_fixed_bug_in_user.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/user/scale/count_of_daily_review_feedback_in_user.php b/module/metric/calc/user/scale/count_of_daily_review_feedback_in_user.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/user/scale/count_of_daily_review_story_in_user.php b/module/metric/calc/user/scale/count_of_daily_review_story_in_user.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/user/scale/count_of_dealyed_task_in_user.php b/module/metric/calc/user/scale/count_of_dealyed_task_in_user.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/user/scale/count_of_delayed_bug_in_user.php b/module/metric/calc/user/scale/count_of_delayed_bug_in_user.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/user/scale/count_of_pending_story_in_user.php b/module/metric/calc/user/scale/count_of_pending_story_in_user.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/user/scale/count_of_reviewing_feedback_in_user.php b/module/metric/calc/user/scale/count_of_reviewing_feedback_in_user.php old mode 100644 new mode 100755 diff --git a/module/metric/calc/user/scale/count_of_reviewing_story_in_user.php b/module/metric/calc/user/scale/count_of_reviewing_story_in_user.php old mode 100644 new mode 100755 diff --git a/module/metric/config/form.php b/module/metric/config/form.php old mode 100644 new mode 100755 diff --git a/module/metric/config/search.php b/module/metric/config/search.php old mode 100644 new mode 100755 diff --git a/module/metric/config/table.php b/module/metric/config/table.php old mode 100644 new mode 100755 diff --git a/module/metric/control.php b/module/metric/control.php old mode 100644 new mode 100755 index 3db00033e8..c3316dcd9b --- a/module/metric/control.php +++ b/module/metric/control.php @@ -29,14 +29,20 @@ class metric extends control * @param string $scope * @param string $viewType * @param int $metricID - * @param string $filters + * @param string $filtersBase64 + * @param int $recTotal + * @param int $recPerPage + * @param int $pageID * @access public * @return void */ - public function preview($scope = 'project', $viewType = 'single', $metricID = 0, $filtersBase64 = '') + public function preview($scope = 'project', $viewType = 'single', $metricID = 0, $filtersBase64 = '', $recTotal = 0, $recPerPage = 100, $pageID = 1) { $this->metric->processScopeList('released'); + $this->app->loadClass('pager', true); + $pager = new pager($recTotal, $recPerPage, $pageID); + $filters = array(); if($scope == 'filter') { @@ -52,20 +58,33 @@ class metric extends control { $metrics = $this->metric->getList($scope, 'released'); } + $groupMetrics = $this->metric->groupMetricByObject($metrics); + $current = $this->metric->getByID($metricID); - if(empty($current)) $current = current($metrics); + if(empty($current) and $groupMetrics) $current = current(current($groupMetrics)); $resultHeader = array(); $resultData = array(); if(!empty($current)) { $metric = $this->metric->getByID($current->id); - $result = $this->metric->getResultByCode($metric->code, array(), 'cron'); - $resultHeader = $this->metricZen->getViewTableHeader($result); + $result = $this->metric->getResultByCode($metric->code, array(), 'cron', $pager); + + $resultHeader = $this->metricZen->getViewTableHeader($metric); $resultData = $this->metricZen->getViewTableData($metric, $result); } + list($groupHeader, $groupData) = $this->metricZen->getGroupTable($resultHeader, $resultData); + $this->view->groupHeader = $groupHeader; + $this->view->groupData = $groupData; + $this->view->dateType = $this->metric->getDateTypeByCode($metric->code); + $this->view->dateLabels = $this->metric->getDateLabels($this->view->dateType); + $this->view->defaultDate = $this->metric->getDefaultDate($this->view->dateLabels); + $this->view->tableWidth = $this->metricZen->getViewTableWidth($groupHeader); + $this->view->headerGroup = $this->metric->isHeaderGroup($groupHeader); + $this->view->metrics = $metrics; + $this->view->groupMetrics = $groupMetrics; $this->view->current = $current; $this->view->metricList = $this->lang->metric->metricList; $this->view->scope = $scope; @@ -74,8 +93,10 @@ class metric extends control $this->view->recTotal = count($metrics); $this->view->filters = $filters; $this->view->filtersBase64 = $filtersBase64; - $this->view->resultHeader = $resultHeader; - $this->view->resultData = $resultData; + $this->view->dtablePager = $pager; + $this->view->chartTypeList = $this->metric->getChartTypeList($resultHeader); + $this->view->echartOptions = $this->metric->getEchartsOptions($resultHeader, $resultData); + $this->view->metricRecordType = $this->metric->getMetricRecordType($resultHeader); $this->display(); } @@ -122,7 +143,7 @@ class metric extends control $this->view->metric = $metric; $this->view->legendBasic = $this->metricZen->getBasicInfo($this->view,'scope,object,purpose,name,code,unit,desc,definition'); - $this->view->createEditInfo = $this->metricZen->getCreateEditInfo($this->view, 'createdBy'); + $this->view->createEditInfo = $this->metricZen->getCreateEditInfo($this->view, 'createdBy,implementedBy,lastEdited'); $this->display(); } @@ -138,11 +159,11 @@ class metric extends control { // 保存当前的错误报告级别和显示错误的设置 $originalDebug = $this->config->debug; + $isFirstGenerate = $this->metric->isFirstGenerate(); // 开启调试模式 $this->config->debug = 2; - $this->metric->clearMetricLib(); $calcList = $this->metric->getCalcInstanceList(); $classifiedCalcGroup = $this->metric->classifyCalc($calcList); @@ -158,14 +179,17 @@ class metric extends control $rows = $statement->fetchAll(); $this->metricZen->calcMetric($rows, $calcGroup->calcList); - $records = $this->metricZen->prepareMetricRecord($calcGroup->calcList); - + $records = $this->metricZen->prepareMetricRecord($calcGroup->calcList, $isFirstGenerate); $this->metric->insertMetricLib($records); } catch(Exception $e) { a($e->getMessage()); } + catch(Error $e) + { + a($e->getMessage()); + } } // 恢复之前的调试状态 @@ -179,26 +203,6 @@ class metric extends control echo 'success'; } - /** - * 获取数据表格的数据。 - * Get data of datatable. - * - * @param int $metricID - * @access public - * @return string - */ - public function ajaxGetTableData($metricID) - { - $metric = $this->metric->getByID($metricID); - $result = $this->metric->getResultByCode($metric->code, $_POST, 'cron'); - - $response = new stdclass(); - $response->header = $this->metricZen->getViewTableHeader($result); - $response->data = $this->metricZen->getViewTableData($metric, $result); - - echo json_encode($response); - } - /** * 获取数据表格的数据。 * Get data of datatable. @@ -253,4 +257,82 @@ class metric extends control return $this->send($optionList); } + + public function ajaxGetMetricSideTree() + { + $metricIDList = explode(',', $_POST['metricIDList']); + $checkedList = explode(',', $_POST['checkedList']); + $metrics = $this->metric->getMetricsByIDList($metricIDList); + + $this->view->groupMetrics = $this->metric->groupMetricByObject($metrics); + $this->view->checkedList = $checkedList; + $this->display(); + } + + public function ajaxGetMultipleMetricBox($metricID) + { + $metric = $this->metric->getByID($metricID); + $result = $this->metric->getResultByCode($metric->code, array(), 'cron'); + $resultHeader = $this->metricZen->getViewTableHeader($metric); + $resultData = $this->metricZen->getViewTableData($metric, $result); + + list($groupHeader, $groupData) = $this->metricZen->getGroupTable($resultHeader, $resultData); + $this->view->groupHeader = $groupHeader; + $this->view->groupData = $groupData; + $this->view->dateType = $this->metric->getDateTypeByCode($metric->code); + $this->view->dateLabels = $this->metric->getDateLabels($this->view->dateType); + $this->view->defaultDate = $this->metric->getDefaultDate($this->view->dateLabels); + $this->view->tableWidth = $this->metricZen->getViewTableWidth($groupHeader); + $this->view->headerGroup = $this->metric->isHeaderGroup($groupHeader); + $this->view->metricRecordType = $this->metric->getMetricRecordType($resultHeader); + + $this->view->metric = $metric; + $this->view->chartTypeList = $this->metric->getChartTypeList($resultHeader); + $this->view->echartOptions = $this->metric->getEchartsOptions($resultHeader, $resultData); + + $this->display(); + } + + public function ajaxGetTableAndCharts($metricID, $viewType = 'single') + { + $metric = $this->metric->getByID($metricID); + $result = $this->metric->getResultByCode($metric->code, $_POST, 'cron'); + $resultHeader = $this->metricZen->getViewTableHeader($metric); + $resultData = $this->metricZen->getViewTableData($metric, $result); + + list($groupHeader, $groupData) = $this->metricZen->getGroupTable($resultHeader, $resultData); + $this->view->groupHeader = $groupHeader; + $this->view->groupData = $groupData; + $this->view->tableWidth = $this->metricZen->getViewTableWidth($groupHeader); + $this->view->headerGroup = $this->metric->isHeaderGroup($groupHeader); + $this->view->metricRecordType = $this->metric->getMetricRecordType($resultHeader); + + $this->view->viewType = $viewType; + $this->view->metric = $metric; + $this->view->chartTypeList = $this->metric->getChartTypeList($resultHeader); + $this->view->echartOptions = $this->metric->getEchartsOptions($resultHeader, $resultData); + + $this->display(); + } + + /** + * 获取数据表格的数据。 + * Get data of datatable. + * + * @param int $metricID + * @access public + * @return string + */ + public function ajaxGetEchartsOptions($metricID, $chartType = 'line') + { + $metric = $this->metric->getByID($metricID); + $result = $this->metric->getResultByCode($metric->code, $_POST, 'cron'); + + $resultHeader = $this->metricZen->getViewTableHeader($metric); + $resultData = $this->metricZen->getViewTableData($metric, $result); + + $echartOptions = $this->metric->getEchartsOptions($resultHeader, $resultData, $chartType); + + echo json_encode($echartOptions); + } } diff --git a/module/metric/css/preview.ui.css b/module/metric/css/preview.ui.css index 27a765109b..d23020e2c4 100644 --- a/module/metric/css/preview.ui.css +++ b/module/metric/css/preview.ui.css @@ -8,18 +8,20 @@ .filter-btn {padding-left: 0.625rem !important; padding-right: 0.625rem !important;} .main, .side {border-radius: 2px;} -.side .title {height: 48px; padding-left: 16px;} +.side .title {height: 48px; padding-left: 16px; margin-bottom: 2px;} .side .name-color {color: var(--color-gray-600);} .side .metric-tree {height: calc(100vh - 180px); max-height: 864px; overflow-y: scroll;} .side .metric-item {padding-left: 24px; padding-top: 6px; padding-bottom: 6px;} .side .metric-item:hover {background-color: var(--color-gray-100);} .side .metric-item a {color: var(--color-inherit);} .side .metric-item:hover, .side .checkbox-primary:hover {color: var(--color-primary-500);} -.side .metric-current {color: var(--color-primary-600); background-color:var(--color-primary-50);} +.side .metric-group {padding-left: 16px; padding-top: 6px; padding-bottom: 2px; color: var(--color-gray-600);} +.side .metric-current {color: var(--color-primary-600); background-color:var(--color-primary-50); font-weight: 600;} .side .checkbox-primary {padding-left: 24px; padding-top: 6px; padding-bottom: 6px;} .side .checkbox-primary:hover {background-color: var(--color-gray-100);} -.side .check-list-metric {padding-top: 0; padding-bottom: 12px; gap: 0;} +.side .check-list-metric {padding-top: 0; padding-bottom: 0px; gap: 0;} +.side .check-list-title {padding-top: 6px; padding-bottom: 2px; color: var(--color-gray-600); padding-left: 16px;} .main .metric-name {height: 48px; padding-left: 16px; margin-bottom: 8px; padding-right: 16px;} .main .metric-name-notfirst {border-top: 1px solid var(--color-gray-300);} @@ -34,20 +36,20 @@ .metric-remove:hover {color: var(--color-primary-500);} .main .chart-line-margin {margin-right: 16px;} .main .table-and-chart {display: flex;} -.main .table-and-chart-single {height: calc(100vh - 180px - 56px); max-height: 864px; padding: 16px;} -.main .table-and-chart-multiple {max-height: 346px; padding: 16px;} +.main .table-and-chart-single {height: calc(100vh - 180px - 48px); max-height: 864px; padding: 8px 16px 16px 16px;} +.main .table-and-chart-multiple {max-height: 352px; padding: 8px 16px 16px 16px;} .main .canvas {height: calc(100vh - 172px + 48px); max-height: 920px; overflow-y: hidden;} .main .table-and-charts {height: calc(100vh - 172px); max-height: calc(100% - 48px); overflow-y: scroll;} -.main .metricBox {max-height: 432px;} +.main .metricBox {max-height: 408px;} .chart-single {height: calc(100% - 32px); width: 100%;} .chart-multiple {height: 285px; width: 100%;} -.chart-type {width: 30%; padding-left: 16px;} +.chart-type {width: 30%; padding-left: 50px;} i.star-empty {color: var(--color-gray-400);} i.star {color: var(--color-warning-300);} -.table-and-chart .table-side {flex: 0 0 480px; overflow-x: hidden;} -.table-and-chart .chart-side {flex: 0 0 calc(100% - 480px);} +.table-and-chart .table-side {flex-shrink: 1; max-width: 50%;} +.table-and-chart .chart-side {flex-grow: 1;} .table-and-chart .chart-center {display:flex; justify-content: center; align-items: center;} .icon-18 {font-size: 18px;} @@ -73,7 +75,6 @@ i.star {color: var(--color-warning-300);} .dropdown-icon.rotate {transform: rotate(270deg); } .filter-panel {margin-bottom: 1rem;} -.filter-panel .divider {opacity: unset;} .filter-panel>.panel-body {display: flex;} .filter-panel>.panel-body .panel {position: relative; border: none; box-shadow: none;} .filter-panel>.panel-body .panel.divider:after {content: ""; position: absolute; right: 0px; top: 5px; right: 0; bottom: 5px; width: 1px; background-color: var(--color-gray-300);} @@ -92,7 +93,8 @@ i.star {color: var(--color-warning-300);} .cell-ellipsis {display: inline-block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;} -.query-inline {padding-left: 80px !important;} -.query-inline>label {justify-content: flex-start !important; width: 80px !important;} -.query-btn {padding-left: 16px !important;} +.query-inline {padding-left: 8px !important;} +.query-inline>label {justify-content: flex-start !important;} +.query-btn {padding-left: 20px !important;} .picker-nowrap .picker-multi-selections {flex-wrap: nowrap !important; overflow: hidden !important;} +.query-date .selected,.query-calc-date .selected {background-color: var(--color-primary-50); color: var(--color-primary-600);} diff --git a/module/metric/dataset.php b/module/metric/dataset.php index 54f84190db..c1e8601f1d 100644 --- a/module/metric/dataset.php +++ b/module/metric/dataset.php @@ -111,7 +111,7 @@ class dataset { return $this->dao->select($fieldList) ->from(TABLE_RELEASE)->alias('t1') - ->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project=t2.id') + ->leftJoin(TABLE_PROJECT)->alias('t2')->on("CONCAT(',', t2.id, ',') LIKE CONCAT('%', t1.project, '%')") ->leftJoin(TABLE_PRODUCT)->alias('t3')->on('t1.product=t3.id') ->where('t1.deleted')->eq(0) ->andWhere('t3.deleted')->eq(0) @@ -260,9 +260,7 @@ class dataset ->andWhere('t4.type')->in('sprint,stage,kanban') ->andWhere('t5.deleted')->eq(0) // 已删除的项目 ->andWhere("NOT FIND_IN_SET('or', t1.vision)") - ->andWhere("NOT FIND_IN_SET('or', t5.vision)") ->andWhere("NOT FIND_IN_SET('lite', t1.vision)") - ->andWhere("NOT FIND_IN_SET('lite', t5.vision)") ->query(); } @@ -288,9 +286,7 @@ class dataset ->andWhere('t4.deleted')->eq(0) ->andWhere('t4.type')->eq('project') ->andWhere("NOT FIND_IN_SET('or', t1.vision)") - ->andWhere("NOT FIND_IN_SET('or', t4.vision)") ->andWhere("NOT FIND_IN_SET('lite', t1.vision)") - ->andWhere("NOT FIND_IN_SET('lite', t4.vision)") ->query(); } @@ -607,14 +603,6 @@ class dataset ->query(); } - /** - * 统计合并请求信息。 - * Get mr list. - * - * @param string $fieldList - * @access public - * @return PDOStatement - */ public function getMRs($fieldList) { return $this->dao->select($fieldList)->from(TABLE_MR)->alias('t1') diff --git a/module/metric/js/common.ui.js b/module/metric/js/common.ui.js index a02d06ba43..8ac8b4d891 100644 --- a/module/metric/js/common.ui.js +++ b/module/metric/js/common.ui.js @@ -13,3 +13,34 @@ window.addUnit = function(e) $("[name^='customUnit']").prop('checked', false); } } + +window.renderDTableCell = function(result, {row, col}) +{ + var commonWidth = { + scope: 160, + date: 96, + value: 96, + calcTime: 128, + }; + var width = 480; + + var cols = Object.keys(row.data); + + var cellWidth = {}; + cols.forEach(function(col) { + if(commonWidth[col]) { + cellWidth[col] = commonWidth[col]; + } + }); + + colsWidth = Object.values(cellWidth).reduce((a, b) => a + b, 0); + Object.keys(cellWidth).forEach(function(col) { + cellWidth[col] = Math.floor(cellWidth[col] / colsWidth * width); + }); + + + var html = `${row.data[col.name]}`; + result[0] = {html: html}; + + return result; +} diff --git a/module/metric/js/preview.ui.js b/module/metric/js/preview.ui.js index 8e434e3066..6365bf38a6 100644 --- a/module/metric/js/preview.ui.js +++ b/module/metric/js/preview.ui.js @@ -8,19 +8,15 @@ window.afterPageUpdate = function($target, info, options) chartList.push({value: key, text: chartTypeList[key]}); } window.filterChecked = {}; - window.scrollToItem(); - window.renderDTable(current.id, resultHeader, resultData); - window.renderChart(current.id, resultHeader, resultData); - if(viewType == 'multiple') window.renderCheckedLabel(); + + if(viewType == 'multiple') + { + window.renderCheckedLabel(); + $(window).on('resize', window.renderCheckedLabel); + } if(viewType == 'single') window.addTitle2Star(); - $(window).on('resize', window.renderCheckedLabel); window.initFilterPanel(); } -window.scrollToItem = function() -{ - var item = $('.metric-tree').find('.metric-' + current.id); - item.scrollIntoView(); -} window.addTitle2Star = function() { @@ -62,14 +58,6 @@ window.handleNavMenuClick = function($el) }) } -window.handleQueryClick = function(id) -{ - var $form = id ? $('#queryForm' + id) : $('#queryForm'); - var check = window.validateForm($form); - if(!check) return; - window.ajaxGetRecords(id, 'filter'); -} - window.handleFilterCheck = function() { window.updateFilterCheck(); @@ -123,28 +111,36 @@ window.handleFilterClick = function() loadPage($.createLink('metric', 'preview', 'scope=filter&viewType=' + viewType + '&metricID=0&filtersBase64=' + filterBase64)); } -window.handleChartTypeChange = function($el) +window.handleChartTypeChange = function(metricID, viewType = 'single') { if(viewType == 'single') { var chartType = $('[name=chartType]').val(); - - window.renderChart(current.id, resultHeader, resultData, chartType, false); } else { - var $metricBox = $($el.base.closest('.metricBox')); - var metricID = $metricBox.attr('metric-id'); - var chartType = $metricBox.find('[name=chartType]').val(); - - $.get($.createLink('metric', 'ajaxGetTableData', 'metricID=' + metricID), function(resp) - { - var data = JSON.parse(resp); - if(data) { - window.renderChart(metricID, data.header, data.data, chartType, false); - } - }); + var chartType = $('#metricBox' + metricID).find('[name=chartType]').val(); } + + var $form = $('#queryForm' + metricID); + var formData = window.getFormData($form); + + $.post($.createLink('metric', 'ajaxGetEchartsOptions', 'metricID=' + metricID + '&chartType=' + chartType), formData, function(resp) + { + var datas = JSON.parse(resp); + if(!datas) return; + + if(chartType == 'pie') + { + var options = window.genPieOption(datas); + } + else + { + var options = window.genLineBarOption(chartType, datas); + } + + window.renderChart(metricID, viewType, options); + }); } window.handleRemoveLabel = function(id) @@ -154,6 +150,33 @@ window.handleRemoveLabel = function(id) window.updateCheckAction(checkedItem.id, checkedItem.name, false); } + +window.handleDateLabelClick = function(evt) +{ + $form = $(evt).closest('form'); + $form.find('.query-date button.btn').removeClass('selected'); + $form.find('.query-date-picker input[name="dateBegin"]').zui('datepicker').$.setValue(''); + $form.find('.query-date-picker input[name="dateEnd"]').zui('datepicker').$.setValue(''); + $(evt).addClass('selected'); +} + +window.handleCalcDateClick = function(evt) +{ + $form = $(evt).closest('form'); + $form.find('.query-calc-date button.btn').removeClass('selected'); + $(evt).addClass('selected'); +} + +window.handleDatePickerChange = function(evt) +{ + $form = $(evt).closest('form'); + var dateBegin = $form.find('.query-date-picker input[name="dateBegin"]').zui('datepicker').$.value; + var dateEnd = $form.find('.query-date-picker input[name="dateEnd"]').zui('datepicker').$.value; + if(dateBegin.length && dateEnd.length) + { + $form.find('.query-date button.btn').removeClass('selected'); + } +} /* 事件处理函数结束。 */ window.isMetricChecked = function(id) @@ -163,14 +186,19 @@ window.isMetricChecked = function(id) window.renderCheckList = function(metrics) { - $('.side .check-list-metric').empty(); + $('.side .metric-tree').empty(); - var metricsHtml = metrics.map(function(metric){ - var isChecked = window.isMetricChecked(metric.id); - return window.generateCheckItem(metric.name, metric.id, metric.scope, isChecked); - }).join(''); - - $('.side .check-list-metric').html(metricsHtml); + var ids = metrics.map(obj => obj.id).join(','); + var checked = window.checkedList.map(obj => obj.id).join(','); + $.post($.createLink('metric', 'ajaxGetMetricSideTree'), + { + 'metricIDList': ids, + 'checkedList' : checked + }, + function(resp) + { + $('.side .metric-tree').html(resp); + }); } window.updateCheckList = function(id, name, isChecked) @@ -195,7 +223,7 @@ window.ajaxGetMetrics = function(scope, filters = '', callback) { $.get($.createLink('metric', 'ajaxGetMetrics', 'scope=' + scope + '&filters=' + filters), function(resp){ var metrics = JSON.parse(resp); - var total = metrics.length; + var total = metrics.length; window.renderCheckList(metrics); @@ -263,19 +291,6 @@ window.initFilterPanel = function() } } -window.renderDTable = function(metricID = current.id, header = resultHeader, data = resultData) -{ - var $currentBox = $('#metricBox' + metricID); - if(viewType == 'single') $currentBox = $('.table-and-chart-single'); - - if(!$currentBox.find('.dtable').length) return; - $currentBox.find('.dtable').remove(); - $currentBox.find('.table-side').append('
'); - - window.initDTable($currentBox.find('.dtable'), header, data); - if(viewType == 'multiple') window.initQueryForm(metricID, $currentBox.find('.metric-name'), header, data); -} - window.getMetricRecordType = function(recordRow) { if(!recordRow) return false; @@ -286,69 +301,7 @@ window.getMetricRecordType = function(recordRow) return type.join('-'); } -window.initQueryForm = function(id, $el, header = resultHeader, data = resultData) -{ - var $form = id ? $('#queryForm' + id) : $('#queryForm'); - var formData = window.getFormData($form); - - $el.siblings('form#queryForm' + id).remove(); - var $form = $('#queryFormTpl').clone(); - $form.attr('id', 'queryForm' + id); - $form.removeClass('hidden'); - $form.find('script').remove(); - - var recordType = window.getMetricRecordType(data.length ? data[0] : false); - - if(!recordType) return; - - $el.after($form); - - if(recordType == 'scope' || recordType == 'scope-date') - { - var scope = $('.metric-tree .checkbox-primary input#metric' + id).attr('scope'); - $form.find('.query-scope').removeClass('hidden'); - $form.find('.query-scope #scope').attr('id', 'scope' + id); - $form.find('.query-scope label').text(queryScopeLang[scope]); - var scopeUnique = {}; - var scopeItems = []; - data.forEach(function(item) { - if(scopeUnique[item.scopeID]) return; - scopeUnique[item.scopeID] = item.scope; - scopeItems.push({text: item.scope, value: item.scopeID}); - }); - zui.create("picker","#scope" + id,{"multiple":10,"name":"scope","required":false,"items":scopeItems, "defaultValue": formData.get('scope'),"emptyValue":""}); - } - if(recordType == 'date' || recordType == 'scope-date') - { - $form.find('.query-date-range').removeClass('hidden'); - $form.find('.query-date-range #dateBegin').attr('id', 'dateBegin' + id); - $form.find('.query-date-range #dateEnd').attr('id', 'dateEnd' + id); - zui.create("datePicker","#dateBegin" + id,{"multiple":false,"icon":"calendar","name":"dateBegin", "defaultValue": formData.get('dateBegin')}) - zui.create("datePicker","#dateEnd" + id,{"multiple":false,"icon":"calendar","name":"dateEnd", "defaultValue": formData.get('dateEnd')}) - } - - if(recordType == 'system') - { - $form.find('.query-calc-time-range').removeClass('hidden'); - $form.find('.query-calc-time-range #calcBegin').attr('id', 'calcBegin' + id); - $form.find('.query-calc-time-range #calcEnd').attr('id', 'calcEnd' + id); - zui.create("datePicker","#calcBegin" + id,{"multiple":false,"icon":"calendar","name":"calcBegin", "defaultValue": formData.get('calcBegin')}) - zui.create("datePicker","#calcEnd" + id,{"multiple":false,"icon":"calendar","name":"calcEnd", "defaultValue": formData.get('calcEnd')}) - } - else - { - $form.find('.query-calc-time').removeClass('hidden'); - $form.find('.query-calc-time #calcTime').attr('id', 'calcTime' + id); - zui.create("datePicker","#calcTime" + id,{"multiple":false,"icon":"calendar","name":"calcTime", "defaultValue": formData.get('calcTime')}) - } - - $form.find('.query-btn button').attr('onclick', 'window.handleQueryClick(' + id + ')'); - - $form.find('.form-group.hidden').remove(); - -} - -window.renderChart = function(metricID = current.id, header = resultHeader, data = resultData, chartType = 'line', initPicker = true) +window.renderChart = function(metricID, viewType, options) { var $currentBox = $('#metricBox' + metricID); if(viewType == 'single') $currentBox = $('.table-and-chart-single'); @@ -358,143 +311,7 @@ window.renderChart = function(metricID = current.id, header = resultHeader, data $currentBox.find('.chart').remove(); $currentBox.find('.chart-side').append('
'); - if(initPicker) window.initPicker($currentBox.find('.chart-type'), window.chartList, header.length); - window.initChart($currentBox.find('.chart')[0], header, data, chartType); -} - -window.initDTable = function($obj, head, data) -{ - var height = 310; - var width = 480; - if(viewType == 'single') height = $('.table-side').height(); - if(!head || !data) return; - - var commonWidth = { - scope: 160, - date: 96, - value: 96, - calcTime: 128, - }; - - var cols = head.map(function(col){ return col.name; }); - - var cellWidth = {}; - cols.forEach(function(col) { - if(commonWidth[col]) { - cellWidth[col] = commonWidth[col]; - } - }); - - colsWidth = Object.values(cellWidth).reduce((a, b) => a + b, 0); - Object.keys(cellWidth).forEach(function(col) { - cellWidth[col] = Math.floor(cellWidth[col] / colsWidth * width); - }); - - new zui.DTable($obj,{ - responsive: true, - bordered: true, - scrollbarHover: true, - height: height, - cols: head, - data: data, - // footPager: pager, - // footer: ['pager'], - onRenderCell: function(result, {row, col}) - { - var html = `${row.data[col.name]}`; - result[0] = {html: html}; - - return result; - } - }); -} - -window.initChart = function($obj, head, data, chartType) -{ - if(!data.length) return; - if(chartType == 'pie') return window.initPieChart($obj, head, data); - if(head.length == 2) { - var x = head[1].name; - var y = head[0].name; - } - else if(head.length == 3) - { - var x = head[0].name; - var y = head[1].name; - } - else if(head.length == 4) { - var x = head[1].name; - var y = head[2].name; - } - if(!x || !y) return; - - var type = (chartType == 'barX' || chartType == 'barY') ? 'bar' : chartType; - - data.sort(function(a, b) { - return a[x] > b[x] ? -1 : 1; - }); - - var xAxis = { - type: 'category', - data: data.map(item => item[x]) - }; - if(head.length == 2) xAxis.data = xAxis.data.map(item => item.slice(0, 10)); - xAxis.data = [...new Set(xAxis.data)]; - var yAxis = {type: 'value'}; - - if(head.length <= 3) { - var series = [{ - data: data.map(item => item[y]), - type: type - }]; - } - else if(head.length == 4) { - var series = []; - - var groupedData = data.reduce((accumulator, currentValue) => { - var scope = currentValue.scope; - var date = currentValue.date; - var value = currentValue.value; - - var group = accumulator.find(item => item.scope === scope); - if (group) { - group.date.push({date: date, value: value}); - } else { - accumulator.push({ scope, date: [{date: date, value: value}] }); - } - return accumulator; - }, []); - - var selectedScope = {}; - - for(key in groupedData) { - var scope = groupedData[key].scope; - var dates = groupedData[key].date; - - var seriesData = []; - xAxis.data.forEach(function(date) { - seriesData.push(dates.find(item => item.date === date) ? dates.find(item => item.date === date).value : 0); - }); - - series.push({data: seriesData, type: type, name: scope}); - selectedScope[scope] = false; - } - - selectedScope[Object.keys(selectedScope)[0]] = true; - } - - var option = window.genLineBarOption(chartType, xAxis, yAxis, series, selectedScope); - window.renderEchart($obj, option); -} - -window.initPieChart = function($obj, head, data) -{ - var x = head[0].name; - var y = head[1].name; - var datas = data.map(item => ({name: item[x], value: item[y]})); - - var option = window.genPieOption(datas); - window.renderEchart($obj, option); + window.renderEchart($currentBox.find('.chart')[0], options); } window.renderEchart = function($obj, option) @@ -505,23 +322,6 @@ window.renderEchart = function($obj, option) }); } -window.initPicker = function($obj, items, headLength = 3) -{ - if(headLength != 3) { - items = items.filter(item => item.value != 'pie'); - } - if($obj.zui('picker')) { - $obj.zui('picker').destroy(); - } - new zui.Picker($obj, { - items, - defaultValue: 'line', - name: 'chartType', - required: true, - onChange: function() { window.handleChartTypeChange(this) }, - }); -} - window.setDropDown = function() { var $drop = $('.dropdown-icon'); @@ -571,45 +371,42 @@ window.updateMetricBoxs = function(id, isChecked) } else { - var label = window.checkedList.find(function(checked){return checked.id == id}); - var tpl = $("#metricBox-tpl").html(); - var data = { - id: label.id, - name: label.name, - }; - var html = $(zui.formatString(tpl, data)); - - $('.table-and-charts').append(html); - - window.ajaxGetRecords(id, 'add'); + window.appendMetricBox(id); } } /** - * 多选添加一个度量项到展示区,或者使用筛选器更新一个度量项的展示内容。 - * Add a metricBox or use filter to change metricBox. + * 多选添加一个度量项到展示区。 + * Add a metricBox. * - * @param string mode add|filter * @access public * @return void */ -window.ajaxGetRecords = function(id, mode = 'add') +window.appendMetricBox = function(id, mode = 'add') { - var $form = id ? $('#queryForm' + id) : $('#queryForm'); + $.get($.createLink('metric', 'ajaxGetMultipleMetricBox', 'metricID=' + id), function(resp) + { + $('.table-and-charts').append(resp); + }); +} + +window.handleQueryClick = function(id, viewType = 'single') +{ + var $form = $('#queryForm' + id); + var check = window.validateForm($form); + if(!check) return; + var formData = window.getFormData($form); - id = id ?? current.id; - - $.post($.createLink('metric', 'ajaxGetTableData', 'metricID=' + id),formData, function(resp) + $.post($.createLink('metric', 'ajaxGetTableAndCharts', 'metricID=' + id + '&viewType=' + viewType), formData, function(resp) { - var data = JSON.parse(resp); - if(data) + if(viewType == 'multiple') { - var chartType = viewType == 'multiple' ? $('#metricBox' + id).find('[name=chartType]').val() : $('[name=chartType]').val(); - window.renderDTable(id, data.header, data.data); - - var initPicker = (mode == 'add'); - window.renderChart(id, data.header, data.data, chartType, initPicker); + $('#metricBox' + id).find('.table-and-chart').replaceWith(resp); + } + else + { + $('.table-and-chart-single').replaceWith(resp); } }); } @@ -621,31 +418,54 @@ window.validateForm = function($form) var dateBegin = formObj.dateBegin?.length ? new Date(formObj.dateBegin) : false; var dateEnd = formObj.dateEnd?.length ? new Date(formObj.dateEnd) : false; - var calcBegin = formObj.calcBegin?.length ? new Date(formObj.calcBegin) : false; - var calcEnd = formObj.calcEnd?.length ? new Date(formObj.calcEnd) : false; if(dateBegin && dateEnd && dateBegin > dateEnd) { zui.Messager.show(errorDateRange, {type: 'danger', time: 2000}); return false; } - if(calcBegin && calcEnd && calcBegin > calcEnd) - { - zui.Messager.show(errorCalcTimeRange, {type: 'danger', time: 2000}); - return false; - } return true; } window.getFormData = function($form) { + var $dateBegin = $form.find('.query-date-picker input[name="dateBegin"]'); + var $dateEnd = $form.find('.query-date-picker input[name="dateEnd"]'); + var $selectedDate = $form.find('.query-date button.selected'); + + var dateBeginValue = $dateBegin.length ? $dateBegin.zui('datepicker').$.value : ''; + var dateEndValue = $dateEnd.length ? $dateEnd.zui('datepicker').$.value : ''; + + if(!$selectedDate.length && $dateBegin.length && $dateEnd.length && (!dateBeginValue.length || !dateEndValue.length)) + { + var buttons = $form.find('.query-date button'); + $(buttons[0]).addClass('selected'); + $form.find('.query-date-picker input[name="dateBegin"]').zui('datepicker').$.setValue(''); + $form.find('.query-date-picker input[name="dateEnd"]').zui('datepicker').$.setValue(''); + } + var formSerialize = $form.serialize(); var formObj = window.parseSerialize(formSerialize); var formData = new FormData(); for(var key in formObj) { - formData.append(key, formObj[key]); + var value = formObj[key]; + if(key.startsWith('scope')) key = 'scope'; + formData.append(key, value); + } + + if($selectedDate.length) + { + formData.append('dateLabel', $selectedDate.attr('key')); + formData.delete('dateBegin'); + formData.delete('dateEnd'); + } + + var $calcDate = $form.find('.query-calc-date button.selected'); + if($calcDate.length) + { + formData.append('calcDate', $calcDate.attr('key')); } return formData; @@ -660,6 +480,11 @@ window.collectMetric = function(id) }); } +window.toggleCollapsed = function() +{ + $('.sidebar').toggleClass('is-collapsed'); +} + window.renderCheckedLabel = function() { var $content = $('.checked-label-content'); @@ -865,7 +690,7 @@ window.deactiveNavMenu = function() $(itemSelector).find('span.label').remove(); } -window.genPieOption = function(data) +window.genPieOption = function(datas) { var option = { tooltip: { @@ -880,7 +705,7 @@ window.genPieOption = function(data) { type: 'pie', radius: '50%', - data: data, + data: datas.data, emphasis: { itemStyle: { shadowBlur: 10, @@ -895,24 +720,16 @@ window.genPieOption = function(data) return option; } -window.genLineBarOption = function(chartType, xAxis, yAxis, series, selectedScope = null) +window.genLineBarOption = function(chartType, datas) { - var legend = {left: '16', right: '16', type: 'scroll'}; - if(selectedScope) - { - legend.selector = true; - legend.selected = selectedScope; - } - var option = { grid: { - top: '48', - left: '16', - right: '16', + left: '10%', + right: '10%', bottom: '15%', containLabel: true }, - legend: legend, + legend: datas.legend, tooltip: { trigger: 'axis', axisPointer: { @@ -925,12 +742,12 @@ window.genLineBarOption = function(chartType, xAxis, yAxis, series, selectedScop extraCssText: 'max-height:60%;overflow-y:scroll',//最大高度以及超出处理 enterable:true//鼠标可以进入tooltip区域,使用滚动条 }, - xAxis: chartType == 'barY' ? yAxis : xAxis, - yAxis: chartType == 'barY' ? xAxis : yAxis, - series: series, + xAxis: chartType == 'barY' ? datas.yAxis : datas.xAxis, + yAxis: chartType == 'barY' ? datas.xAxis : datas.yAxis, + series: datas.series, }; - var dataLength = series[0].data.length; + var dataLength = Array.isArray(datas.series) ? datas.series[0].data.length : datas.series.data.length; if(dataLength > 15) option.dataZoom = window.genDataZoom(dataLength, 15, chartType == 'barY' ? 'y' : 'x'); return option; diff --git a/module/metric/lang/de.php b/module/metric/lang/de.php old mode 100644 new mode 100755 index 2022fca871..1c9224d1fb --- a/module/metric/lang/de.php +++ b/module/metric/lang/de.php @@ -21,6 +21,7 @@ $lang->metric->date = "Date"; $lang->metric->metricData = "Metric Data"; $lang->metric->system = "System"; $lang->metric->weekCell = "%s,Week %s"; +$lang->metric->week = "Week %s"; $lang->metric->create = "Create " . $this->lang->metric->common; $lang->metric->edit = "Edit " . $this->lang->metric->common; $lang->metric->view = 'View' . $this->lang->metric->common; @@ -51,8 +52,18 @@ $lang->metric->testMetric = 'Test Metric'; $lang->metric->calcTime = 'Calculate Time'; $lang->metric->to = 'to'; +$lang->metric->placeholder = new stdclass(); +$lang->metric->placeholder->select = "Please select"; +$lang->metric->placeholder->project = "All Projects"; +$lang->metric->placeholder->product = "All Products"; +$lang->metric->placeholder->execution = "All Executions"; +$lang->metric->placeholder->dept = "All Teams"; +$lang->metric->placeholder->user = "All Users"; +$lang->metric->placeholder->program = "All Program Sets"; + $lang->metric->query = new stdclass(); $lang->metric->query->action = 'query'; + $lang->metric->query->scope = array(); $lang->metric->query->scope['project'] = 'Project'; $lang->metric->query->scope['product'] = 'Product'; @@ -61,6 +72,30 @@ $lang->metric->query->scope['dept'] = 'Dept'; $lang->metric->query->scope['user'] = 'User'; $lang->metric->query->scope['program'] = 'Program'; +$lang->metric->query->yearLabels = array(); +$lang->metric->query->yearLabels['3'] = '3 years'; +$lang->metric->query->yearLabels['5'] = '5 years'; +$lang->metric->query->yearLabels['10'] = '10 years'; +$lang->metric->query->yearLabels['all'] = 'All'; + +$lang->metric->query->monthLabels = array(); +$lang->metric->query->monthLabels['6'] = '6 months'; +$lang->metric->query->monthLabels['12'] = '12 months'; +$lang->metric->query->monthLabels['24'] = '24 months'; +$lang->metric->query->monthLabels['36'] = '36 months'; + +$lang->metric->query->weekLabels = array(); +$lang->metric->query->weekLabels['4'] = '4 weeks'; +$lang->metric->query->weekLabels['8'] = '8 weeks'; +$lang->metric->query->weekLabels['12'] = '12 weeks'; +$lang->metric->query->weekLabels['16'] = '16 weeks'; + +$lang->metric->query->dayLabels = array(); +$lang->metric->query->dayLabels['7'] = '7 days'; +$lang->metric->query->dayLabels['14'] = '14 days'; +$lang->metric->query->dayLabels['21'] = '21 days'; +$lang->metric->query->dayLabels['28'] = '28 days'; + $lang->metric->viewType = new stdclass(); $lang->metric->viewType->single = 'Single view'; $lang->metric->viewType->multiple = 'Multiple view'; @@ -98,7 +133,6 @@ $lang->metric->implementAction = 'Implement Metric'; $lang->metric->deleteAction = 'Delete Metric'; $lang->metric->delistAction = 'Delist Metric'; $lang->metric->detailsAction = 'Metric Detail'; -$lang->metric->updateMetricLib = 'Update Metric Lib'; $lang->metric->stageList = array(); $lang->metric->stageList['wait'] = "Not Released"; @@ -115,8 +149,8 @@ $lang->metric->featureBar['preview']['dept'] = 'Team'; $lang->metric->featureBar['preview']['user'] = 'Individual'; $lang->metric->featureBar['preview']['program'] = 'Program'; $lang->metric->featureBar['preview']['system'] = 'System'; -// $lang->metric->featureBar['preview']['code'] = 'Code Repository'; -// $lang->metric->featureBar['preview']['pipeline'] = 'Pipeline'; +$lang->metric->featureBar['preview']['code'] = 'Code Repository'; +$lang->metric->featureBar['preview']['pipeline'] = 'Pipeline'; $lang->metric->more = 'More'; $lang->metric->collect = 'My Collect'; @@ -131,12 +165,11 @@ $lang->metric->oldMetric->dayNames = array(1 => 'Monday', 2 => 'Tuesday', 3 => ' $lang->metric->moreSelects = array(); $lang->metric->unitList = array(); -$lang->metric->unitList['count'] = 'Count'; -$lang->metric->unitList['measure'] = 'Man-hour'; -$lang->metric->unitList['hour'] = 'Hour'; -$lang->metric->unitList['day'] = 'Day'; -$lang->metric->unitList['manday'] = 'Man-day'; -$lang->metric->unitList['percentage'] = 'Percentage'; +$lang->metric->unitList['count'] = 'Count'; +$lang->metric->unitList['measure'] = 'Man-hour'; +$lang->metric->unitList['hour'] = 'Hour'; +$lang->metric->unitList['day'] = 'Day'; +$lang->metric->unitList['manday'] = 'Man-day'; $lang->metric->afterCreateList = array(); $lang->metric->afterCreateList['back'] = 'Back to List Page'; @@ -165,8 +198,8 @@ $lang->metric->scopeList['project'] = "Project"; $lang->metric->scopeList['execution'] = "Execution"; $lang->metric->scopeList['dept'] = "Team"; $lang->metric->scopeList['user'] = "Individual"; -// $lang->metric->scopeList['code'] = "Code Repository"; -// $lang->metric->scopeList['pipeline'] = "Pipeline"; +$lang->metric->scopeList['code'] = "Code Repository"; +$lang->metric->scopeList['pipeline'] = "Pipeline"; $lang->metric->scopeList['other'] = "Other"; global $config; @@ -208,7 +241,6 @@ if(in_array($config->edition, array('max', 'ipd'))) $lang->metric->objectList['risk'] = "Risk"; $lang->metric->objectList['issue'] = "Issue"; } - $lang->metric->objectList['review'] = "Review"; $lang->metric->objectList['other'] = "Other"; diff --git a/module/metric/lang/en.php b/module/metric/lang/en.php old mode 100644 new mode 100755 index 2022fca871..1c9224d1fb --- a/module/metric/lang/en.php +++ b/module/metric/lang/en.php @@ -21,6 +21,7 @@ $lang->metric->date = "Date"; $lang->metric->metricData = "Metric Data"; $lang->metric->system = "System"; $lang->metric->weekCell = "%s,Week %s"; +$lang->metric->week = "Week %s"; $lang->metric->create = "Create " . $this->lang->metric->common; $lang->metric->edit = "Edit " . $this->lang->metric->common; $lang->metric->view = 'View' . $this->lang->metric->common; @@ -51,8 +52,18 @@ $lang->metric->testMetric = 'Test Metric'; $lang->metric->calcTime = 'Calculate Time'; $lang->metric->to = 'to'; +$lang->metric->placeholder = new stdclass(); +$lang->metric->placeholder->select = "Please select"; +$lang->metric->placeholder->project = "All Projects"; +$lang->metric->placeholder->product = "All Products"; +$lang->metric->placeholder->execution = "All Executions"; +$lang->metric->placeholder->dept = "All Teams"; +$lang->metric->placeholder->user = "All Users"; +$lang->metric->placeholder->program = "All Program Sets"; + $lang->metric->query = new stdclass(); $lang->metric->query->action = 'query'; + $lang->metric->query->scope = array(); $lang->metric->query->scope['project'] = 'Project'; $lang->metric->query->scope['product'] = 'Product'; @@ -61,6 +72,30 @@ $lang->metric->query->scope['dept'] = 'Dept'; $lang->metric->query->scope['user'] = 'User'; $lang->metric->query->scope['program'] = 'Program'; +$lang->metric->query->yearLabels = array(); +$lang->metric->query->yearLabels['3'] = '3 years'; +$lang->metric->query->yearLabels['5'] = '5 years'; +$lang->metric->query->yearLabels['10'] = '10 years'; +$lang->metric->query->yearLabels['all'] = 'All'; + +$lang->metric->query->monthLabels = array(); +$lang->metric->query->monthLabels['6'] = '6 months'; +$lang->metric->query->monthLabels['12'] = '12 months'; +$lang->metric->query->monthLabels['24'] = '24 months'; +$lang->metric->query->monthLabels['36'] = '36 months'; + +$lang->metric->query->weekLabels = array(); +$lang->metric->query->weekLabels['4'] = '4 weeks'; +$lang->metric->query->weekLabels['8'] = '8 weeks'; +$lang->metric->query->weekLabels['12'] = '12 weeks'; +$lang->metric->query->weekLabels['16'] = '16 weeks'; + +$lang->metric->query->dayLabels = array(); +$lang->metric->query->dayLabels['7'] = '7 days'; +$lang->metric->query->dayLabels['14'] = '14 days'; +$lang->metric->query->dayLabels['21'] = '21 days'; +$lang->metric->query->dayLabels['28'] = '28 days'; + $lang->metric->viewType = new stdclass(); $lang->metric->viewType->single = 'Single view'; $lang->metric->viewType->multiple = 'Multiple view'; @@ -98,7 +133,6 @@ $lang->metric->implementAction = 'Implement Metric'; $lang->metric->deleteAction = 'Delete Metric'; $lang->metric->delistAction = 'Delist Metric'; $lang->metric->detailsAction = 'Metric Detail'; -$lang->metric->updateMetricLib = 'Update Metric Lib'; $lang->metric->stageList = array(); $lang->metric->stageList['wait'] = "Not Released"; @@ -115,8 +149,8 @@ $lang->metric->featureBar['preview']['dept'] = 'Team'; $lang->metric->featureBar['preview']['user'] = 'Individual'; $lang->metric->featureBar['preview']['program'] = 'Program'; $lang->metric->featureBar['preview']['system'] = 'System'; -// $lang->metric->featureBar['preview']['code'] = 'Code Repository'; -// $lang->metric->featureBar['preview']['pipeline'] = 'Pipeline'; +$lang->metric->featureBar['preview']['code'] = 'Code Repository'; +$lang->metric->featureBar['preview']['pipeline'] = 'Pipeline'; $lang->metric->more = 'More'; $lang->metric->collect = 'My Collect'; @@ -131,12 +165,11 @@ $lang->metric->oldMetric->dayNames = array(1 => 'Monday', 2 => 'Tuesday', 3 => ' $lang->metric->moreSelects = array(); $lang->metric->unitList = array(); -$lang->metric->unitList['count'] = 'Count'; -$lang->metric->unitList['measure'] = 'Man-hour'; -$lang->metric->unitList['hour'] = 'Hour'; -$lang->metric->unitList['day'] = 'Day'; -$lang->metric->unitList['manday'] = 'Man-day'; -$lang->metric->unitList['percentage'] = 'Percentage'; +$lang->metric->unitList['count'] = 'Count'; +$lang->metric->unitList['measure'] = 'Man-hour'; +$lang->metric->unitList['hour'] = 'Hour'; +$lang->metric->unitList['day'] = 'Day'; +$lang->metric->unitList['manday'] = 'Man-day'; $lang->metric->afterCreateList = array(); $lang->metric->afterCreateList['back'] = 'Back to List Page'; @@ -165,8 +198,8 @@ $lang->metric->scopeList['project'] = "Project"; $lang->metric->scopeList['execution'] = "Execution"; $lang->metric->scopeList['dept'] = "Team"; $lang->metric->scopeList['user'] = "Individual"; -// $lang->metric->scopeList['code'] = "Code Repository"; -// $lang->metric->scopeList['pipeline'] = "Pipeline"; +$lang->metric->scopeList['code'] = "Code Repository"; +$lang->metric->scopeList['pipeline'] = "Pipeline"; $lang->metric->scopeList['other'] = "Other"; global $config; @@ -208,7 +241,6 @@ if(in_array($config->edition, array('max', 'ipd'))) $lang->metric->objectList['risk'] = "Risk"; $lang->metric->objectList['issue'] = "Issue"; } - $lang->metric->objectList['review'] = "Review"; $lang->metric->objectList['other'] = "Other"; diff --git a/module/metric/lang/fr.php b/module/metric/lang/fr.php old mode 100644 new mode 100755 index 2022fca871..1c9224d1fb --- a/module/metric/lang/fr.php +++ b/module/metric/lang/fr.php @@ -21,6 +21,7 @@ $lang->metric->date = "Date"; $lang->metric->metricData = "Metric Data"; $lang->metric->system = "System"; $lang->metric->weekCell = "%s,Week %s"; +$lang->metric->week = "Week %s"; $lang->metric->create = "Create " . $this->lang->metric->common; $lang->metric->edit = "Edit " . $this->lang->metric->common; $lang->metric->view = 'View' . $this->lang->metric->common; @@ -51,8 +52,18 @@ $lang->metric->testMetric = 'Test Metric'; $lang->metric->calcTime = 'Calculate Time'; $lang->metric->to = 'to'; +$lang->metric->placeholder = new stdclass(); +$lang->metric->placeholder->select = "Please select"; +$lang->metric->placeholder->project = "All Projects"; +$lang->metric->placeholder->product = "All Products"; +$lang->metric->placeholder->execution = "All Executions"; +$lang->metric->placeholder->dept = "All Teams"; +$lang->metric->placeholder->user = "All Users"; +$lang->metric->placeholder->program = "All Program Sets"; + $lang->metric->query = new stdclass(); $lang->metric->query->action = 'query'; + $lang->metric->query->scope = array(); $lang->metric->query->scope['project'] = 'Project'; $lang->metric->query->scope['product'] = 'Product'; @@ -61,6 +72,30 @@ $lang->metric->query->scope['dept'] = 'Dept'; $lang->metric->query->scope['user'] = 'User'; $lang->metric->query->scope['program'] = 'Program'; +$lang->metric->query->yearLabels = array(); +$lang->metric->query->yearLabels['3'] = '3 years'; +$lang->metric->query->yearLabels['5'] = '5 years'; +$lang->metric->query->yearLabels['10'] = '10 years'; +$lang->metric->query->yearLabels['all'] = 'All'; + +$lang->metric->query->monthLabels = array(); +$lang->metric->query->monthLabels['6'] = '6 months'; +$lang->metric->query->monthLabels['12'] = '12 months'; +$lang->metric->query->monthLabels['24'] = '24 months'; +$lang->metric->query->monthLabels['36'] = '36 months'; + +$lang->metric->query->weekLabels = array(); +$lang->metric->query->weekLabels['4'] = '4 weeks'; +$lang->metric->query->weekLabels['8'] = '8 weeks'; +$lang->metric->query->weekLabels['12'] = '12 weeks'; +$lang->metric->query->weekLabels['16'] = '16 weeks'; + +$lang->metric->query->dayLabels = array(); +$lang->metric->query->dayLabels['7'] = '7 days'; +$lang->metric->query->dayLabels['14'] = '14 days'; +$lang->metric->query->dayLabels['21'] = '21 days'; +$lang->metric->query->dayLabels['28'] = '28 days'; + $lang->metric->viewType = new stdclass(); $lang->metric->viewType->single = 'Single view'; $lang->metric->viewType->multiple = 'Multiple view'; @@ -98,7 +133,6 @@ $lang->metric->implementAction = 'Implement Metric'; $lang->metric->deleteAction = 'Delete Metric'; $lang->metric->delistAction = 'Delist Metric'; $lang->metric->detailsAction = 'Metric Detail'; -$lang->metric->updateMetricLib = 'Update Metric Lib'; $lang->metric->stageList = array(); $lang->metric->stageList['wait'] = "Not Released"; @@ -115,8 +149,8 @@ $lang->metric->featureBar['preview']['dept'] = 'Team'; $lang->metric->featureBar['preview']['user'] = 'Individual'; $lang->metric->featureBar['preview']['program'] = 'Program'; $lang->metric->featureBar['preview']['system'] = 'System'; -// $lang->metric->featureBar['preview']['code'] = 'Code Repository'; -// $lang->metric->featureBar['preview']['pipeline'] = 'Pipeline'; +$lang->metric->featureBar['preview']['code'] = 'Code Repository'; +$lang->metric->featureBar['preview']['pipeline'] = 'Pipeline'; $lang->metric->more = 'More'; $lang->metric->collect = 'My Collect'; @@ -131,12 +165,11 @@ $lang->metric->oldMetric->dayNames = array(1 => 'Monday', 2 => 'Tuesday', 3 => ' $lang->metric->moreSelects = array(); $lang->metric->unitList = array(); -$lang->metric->unitList['count'] = 'Count'; -$lang->metric->unitList['measure'] = 'Man-hour'; -$lang->metric->unitList['hour'] = 'Hour'; -$lang->metric->unitList['day'] = 'Day'; -$lang->metric->unitList['manday'] = 'Man-day'; -$lang->metric->unitList['percentage'] = 'Percentage'; +$lang->metric->unitList['count'] = 'Count'; +$lang->metric->unitList['measure'] = 'Man-hour'; +$lang->metric->unitList['hour'] = 'Hour'; +$lang->metric->unitList['day'] = 'Day'; +$lang->metric->unitList['manday'] = 'Man-day'; $lang->metric->afterCreateList = array(); $lang->metric->afterCreateList['back'] = 'Back to List Page'; @@ -165,8 +198,8 @@ $lang->metric->scopeList['project'] = "Project"; $lang->metric->scopeList['execution'] = "Execution"; $lang->metric->scopeList['dept'] = "Team"; $lang->metric->scopeList['user'] = "Individual"; -// $lang->metric->scopeList['code'] = "Code Repository"; -// $lang->metric->scopeList['pipeline'] = "Pipeline"; +$lang->metric->scopeList['code'] = "Code Repository"; +$lang->metric->scopeList['pipeline'] = "Pipeline"; $lang->metric->scopeList['other'] = "Other"; global $config; @@ -208,7 +241,6 @@ if(in_array($config->edition, array('max', 'ipd'))) $lang->metric->objectList['risk'] = "Risk"; $lang->metric->objectList['issue'] = "Issue"; } - $lang->metric->objectList['review'] = "Review"; $lang->metric->objectList['other'] = "Other"; diff --git a/module/metric/lang/zh-cn.php b/module/metric/lang/zh-cn.php old mode 100644 new mode 100755 index e8f9510cc9..de78bc126b --- a/module/metric/lang/zh-cn.php +++ b/module/metric/lang/zh-cn.php @@ -21,6 +21,7 @@ $lang->metric->date = "日期"; $lang->metric->metricData = "度量数据"; $lang->metric->system = "system"; $lang->metric->weekCell = "%s年第%s周"; +$lang->metric->week = "%s周"; $lang->metric->create = "创建" . $this->lang->metric->common; $lang->metric->edit = "编辑" . $this->lang->metric->common; $lang->metric->view = '查看' . $this->lang->metric->common; @@ -51,8 +52,18 @@ $lang->metric->testMetric = '测试度量'; $lang->metric->calcTime = '采集时间'; $lang->metric->to = '至'; +$lang->metric->placeholder = new stdclass(); +$lang->metric->placeholder->select = "请选择"; +$lang->metric->placeholder->project = "全部项目"; +$lang->metric->placeholder->product = "全部产品"; +$lang->metric->placeholder->execution = "全部执行"; +$lang->metric->placeholder->dept = "全部团队"; +$lang->metric->placeholder->user = "全部用户"; +$lang->metric->placeholder->program = "全部项目集"; + $lang->metric->query = new stdclass(); $lang->metric->query->action = '查询'; + $lang->metric->query->scope = array(); $lang->metric->query->scope['project'] = '项目'; $lang->metric->query->scope['product'] = '产品'; @@ -61,6 +72,30 @@ $lang->metric->query->scope['dept'] = '团队'; $lang->metric->query->scope['user'] = '姓名'; $lang->metric->query->scope['program'] = '项目集'; +$lang->metric->query->yearLabels = array(); +$lang->metric->query->yearLabels['3'] = '近3年'; +$lang->metric->query->yearLabels['5'] = '近5年'; +$lang->metric->query->yearLabels['10'] = '近10年'; +$lang->metric->query->yearLabels['all'] = '全部'; + +$lang->metric->query->monthLabels = array(); +$lang->metric->query->monthLabels['6'] = '近6个月'; +$lang->metric->query->monthLabels['12'] = '近12个月'; +$lang->metric->query->monthLabels['24'] = '近24个月'; +$lang->metric->query->monthLabels['36'] = '近36个月'; + +$lang->metric->query->weekLabels = array(); +$lang->metric->query->weekLabels['4'] = '近4周'; +$lang->metric->query->weekLabels['8'] = '近8周'; +$lang->metric->query->weekLabels['12'] = '近12周'; +$lang->metric->query->weekLabels['16'] = '近16周'; + +$lang->metric->query->dayLabels = array(); +$lang->metric->query->dayLabels['7'] = '近7天'; +$lang->metric->query->dayLabels['14'] = '近14天'; +$lang->metric->query->dayLabels['21'] = '近21天'; +$lang->metric->query->dayLabels['28'] = '近28天'; + $lang->metric->viewType = new stdclass(); $lang->metric->viewType->single = '单独查看'; $lang->metric->viewType->multiple = '组合查看'; @@ -98,7 +133,6 @@ $lang->metric->implementAction = '实现度量项'; $lang->metric->deleteAction = '删除度量项'; $lang->metric->delistAction = '下架度量项'; $lang->metric->detailsAction = '度量项详情'; -$lang->metric->updateMetricLib = '更新度量库'; $lang->metric->stageList = array(); $lang->metric->stageList['wait'] = "未发布"; @@ -115,8 +149,8 @@ $lang->metric->featureBar['preview']['dept'] = '团队'; $lang->metric->featureBar['preview']['user'] = '个人'; $lang->metric->featureBar['preview']['program'] = '项目集'; $lang->metric->featureBar['preview']['system'] = '系统'; -// $lang->metric->featureBar['preview']['code'] = '代码库'; -// $lang->metric->featureBar['preview']['pipeline'] = '流水线'; +$lang->metric->featureBar['preview']['code'] = '代码库'; +$lang->metric->featureBar['preview']['pipeline'] = '流水线'; $lang->metric->more = '更多'; $lang->metric->collect = '我收藏的'; @@ -131,12 +165,11 @@ $lang->metric->oldMetric->dayNames = array(1 => '星期一', 2 => '星期二', 3 $lang->metric->moreSelects = array(); $lang->metric->unitList = array(); -$lang->metric->unitList['count'] = '个'; -$lang->metric->unitList['measure'] = '工时'; -$lang->metric->unitList['hour'] = '小时'; -$lang->metric->unitList['day'] = '天'; -$lang->metric->unitList['manday'] = '人天'; -$lang->metric->unitList['percentage'] = '百分比'; +$lang->metric->unitList['count'] = '个'; +$lang->metric->unitList['measure'] = '工时'; +$lang->metric->unitList['hour'] = '小时'; +$lang->metric->unitList['day'] = '天'; +$lang->metric->unitList['manday'] = '人天'; $lang->metric->afterCreateList = array(); $lang->metric->afterCreateList['back'] = '返回列表页'; @@ -165,8 +198,8 @@ $lang->metric->scopeList['project'] = "项目"; $lang->metric->scopeList['execution'] = "执行"; $lang->metric->scopeList['dept'] = "团队"; $lang->metric->scopeList['user'] = "个人"; -// $lang->metric->scopeList['code'] = "代码库"; -// $lang->metric->scopeList['pipeline'] = "流水线"; +$lang->metric->scopeList['code'] = "代码库"; +$lang->metric->scopeList['pipeline'] = "流水线"; $lang->metric->scopeList['other'] = "其他"; global $config; @@ -208,7 +241,6 @@ if(in_array($config->edition, array('max', 'ipd'))) $lang->metric->objectList['risk'] = "风险"; $lang->metric->objectList['issue'] = "问题"; } - $lang->metric->objectList['review'] = "评审"; $lang->metric->objectList['other'] = "其他"; diff --git a/module/metric/lang/zh-tw.php b/module/metric/lang/zh-tw.php old mode 100644 new mode 100755 index 4583b2ce9e..ef315c4064 --- a/module/metric/lang/zh-tw.php +++ b/module/metric/lang/zh-tw.php @@ -77,8 +77,8 @@ $lang->metric->scopeList['project'] = "專案"; $lang->metric->scopeList['execution'] = "執行"; $lang->metric->scopeList['dept'] = "團隊"; $lang->metric->scopeList['user'] = "個人"; -// $lang->metric->scopeList['code'] = "程式庫"; -// $lang->metric->scopeList['pipeline'] = "流水線"; +$lang->metric->scopeList['code'] = "程式庫"; +$lang->metric->scopeList['pipeline'] = "流水線"; global $config; $lang->metric->objectList = array(); diff --git a/module/metric/model.php b/module/metric/model.php old mode 100644 new mode 100755 index 4198eee215..fe03e90a2a --- a/module/metric/model.php +++ b/module/metric/model.php @@ -1,4 +1,7 @@ lang->metric->objectList), array()); + foreach($metrics as $metric) + { + $group = isset($groupMetrics[$metric->object]) ? $metric->object : 'other'; + $groupMetrics[$group][] = $metric; + } + + $purposes = array_keys($this->lang->metric->purposeList); + foreach($groupMetrics as $key => $metrics) + { + if(empty($metrics)) + { + unset($groupMetrics[$key]); + continue; + } + + usort($metrics, function($a, $b) use ($purposes) { + $aIndex = array_search($a->purpose, $purposes); + $bIndex = array_search($b->purpose, $purposes); + + if($aIndex === $bIndex) return 0; + return ($aIndex < $bIndex) ? -1 : 1; + }); + + $groupMetrics[$key] = $metrics; + } + + return $groupMetrics; + } + + public function getMetricsByIDList($metricIDList) + { + return $this->metricTao->fetchMetricsByIDList($metricIDList); + } + /** * 获取旧度量项列表。 * Get old metric list. @@ -136,7 +176,7 @@ class metricModel extends model $metric->oldUnit = $oldMetric->unit; $metric->collectType = $oldMetric->collectType; $metric->collectConf = $oldMetric->collectConf; - $metric->execTime = $oldMetric->execTime; + $metric->execTime = $oldMetric->execTime; } return $metric; @@ -212,24 +252,79 @@ class metricModel extends model } /** - * 根据代号获取计算实时度量项的结果。 - * Get result of calculate metric by code. + * 获取度量数据的日期字段。 + * Get date field of metric data. * * @param string $code - * @param array $options e.g. array('product' => '1,2,3', 'year' => '2023') + * @access protected + * @return array + */ + protected function getMetricRecordDateField(string $code): array + { + $record = $this->dao->select("year, month, week, day") + ->from(TABLE_METRICLIB) + ->where('metricCode')->eq($code) + ->fetch(); + + if(!$record) return array(); + + $dataFields = array(); + $recordKeys = array_keys((array)$record); + foreach($recordKeys as $recordKey) + { + if(!empty($record->$recordKey)) $dataFields[] = $recordKey; + } + + return $dataFields; + } + + /** + * 设置默认的度量数据筛选参数。 + * Set default options of metric data. + * + * @param array $options + * @param array $dataFields * @access public * @return array */ - public function getResultByCode($code, $options = array(), $type = 'realtime') + public function setDefaultOptions(array $options, array $dataFields): array + { + if(!empty($options)) return $options; + + $dateType = $this->getDateType($dataFields); + + if($dateType != 'nodate') + { + $dateLabels = $this->getDateLabels($dateType); + $defaultDate = $this->getDefaultDate($dateLabels); + $options = array('dateType' => $dateType, 'dateLabel' => $defaultDate); + } + + return $options; + } + + /** + * 根据代号获取计算实时度量项的结果。 + * Get result of calculate metric by code. + * + * @param string $code + * @param array $options e.g. array('product' => '1,2,3', 'year' => '2023') + * @param string $type + * @param object|null $pager + * @access public + * @return array + */ + public function getResultByCode($code, $options = array(), $type = 'realtime', $pager = null) { if($type == 'cron') { $metric = $this->metricTao->fetchMetricByCode($code); $dataFields = $this->getMetricRecordDateField($code); + $options = $this->setDefaultOptions($options, $dataFields); if($metric->scope != 'system') $dataFields[] = $metric->scope; - return $this->metricTao->fetchMetricRecords($code, $dataFields, $options); + return $this->metricTao->fetchMetricRecords($code, $dataFields, $options, $pager); } $metric = $this->metricTao->fetchMetricByCode($code); @@ -279,20 +374,14 @@ class metricModel extends model */ public function getExecutableMetric() { - $currentWeek = date('w'); - $currentDay = date('d'); - $now = date('H:i'); - $metricList = $this->dao->select('id,code,time') ->from(TABLE_METRIC) ->where('deleted')->eq('0') ->fetchAll(); $excutableMetrics = array(); - foreach($metricList as $metric) - { - $excutableMetrics[$metric->id] = $metric->code; - } + foreach($metricList as $metric) $excutableMetrics[$metric->id] = $metric->code; + return $excutableMetrics; } @@ -307,6 +396,70 @@ class metricModel extends model return dao::isError(); } + /** + * 根据度量项收集周期来清理过期的度量库数据。 + * Clear outdated metric records by cycle. + * + * @param string $code + * @param string $cycle + * @access public + * @return array + */ + public function clearOutDatedRecords($code, $cycle) + { + $year = date('Y'); + $month = date('n'); + $week = date('W'); + $day = date('j'); + + if($cycle == 'year') + { + $this->dao->delete()->from(TABLE_METRICLIB) + ->where('metricCode')->eq($code) + ->andWhere('year')->eq($year) + ->exec(); + } + elseif($cycle == 'month') + { + $this->dao->delete()->from(TABLE_METRICLIB) + ->where('metricCode')->eq($code) + ->andWhere('year')->eq($year) + ->andWhere('month')->eq($month) + ->exec(); + } + elseif($cycle == 'week') + { + $this->dao->delete()->from(TABLE_METRICLIB) + ->where('metricCode')->eq($code) + ->andWhere('year')->eq($year) + ->andWhere('week')->eq($week) + ->exec(); + } + elseif($cycle == 'day') + { + $this->dao->delete()->from(TABLE_METRICLIB) + ->where('metricCode')->eq($code) + ->andWhere('year')->eq($year) + ->andWhere('month')->eq($month) + ->andWhere('day')->eq($day) + ->exec(); + } + } + + /** + * 是否为第一次生成度量数据。 + * Whether it is the first time to generate metric data. + * + * @access public + * @return bool + */ + public function isFirstGenerate(): bool + { + $record = $this->dao->select('id')->from(TABLE_METRICLIB)->fetch(); + + return !$record; + } + /** * 插入度量库数据。 * Insert into metric lib. @@ -547,7 +700,7 @@ class metricModel extends model $objectPairs = $this->loadModel('dept')->getDeptPairs(); break; case 'user': - $objectPairs = $this->loadModel('user')->getPairs('noletter|noclosed'); + $objectPairs = $this->loadModel('user')->getPairs('noletter'); break; case 'program': $objectPairs = $this->dao->select('id, name')->from(TABLE_PROGRAM) @@ -587,31 +740,44 @@ class metricModel extends model * Build date cell. * * @param object $row + * @param array $object * @access public * @return string */ - public function buildDateCell($row) + public function buildDateCell($row, $record) { - extract((array)$row); + extract($record); + $date = $dateString = false; + $dateType = 'day'; if(isset($year, $month, $day)) { - return "{$year}-{$month}-{$day}"; + $date = $dateString = "{$year}-{$month}-{$day}"; + $dateType = 'day'; } elseif(isset($year, $week)) { - return sprintf($this->lang->metric->weekCell, $year, $week); + $date = sprintf($this->lang->metric->weekCell, $year, $week); + $dateString = "{$year}-{$week}"; + $dateType = 'week'; } elseif(isset($year, $month)) { - return $year . $this->lang->year . $month . $this->lang->month; + $date = $year . $this->lang->year . $month . $this->lang->month; + $dateString = "{$year}-{$month}"; + $dateType = 'month'; } elseif(isset($year)) { - return $year . $this->lang->year; + $date = $year . $this->lang->year; + $dateString = $year; + $dateType = 'year'; } - return false; + $row->date = $date; + $row->dateString = $dateString; + $row->dateType = $dateType; + return $row; } public function checkCalcExists($metric) @@ -901,7 +1067,7 @@ class metricModel extends model } elseif($optionType == 'user') { - $options = $this->loadModel('user')->getPairs('noletter|noclosed'); + $options = $this->loadModel('user')->getPairs('noletter'); } elseif(strpos($optionType, '.') !== false) { @@ -1023,21 +1189,273 @@ class metricModel extends model * 获取度量项的数据类型。 * Get data type of metric. * - * @param object $tableData + * @param array $tableData * @access public * @return string|false */ - public function getMetricRecordType(object|bool $tableData): string|false + public function getMetricRecordType(array|bool $tableData): string|false { if(!$tableData) return false; + $fields = array_column($tableData, 'name'); + $type = array(); - if(isset($tableData->scope)) $type[] = 'scope'; - if(isset($tableData->date)) $type[] = 'date'; + if(in_array('scope', $fields)) $type[] = 'scope'; + if(in_array('date', $fields)) $type[] = 'date'; if(empty($type)) $type[] = 'system'; return implode('-', $type); } + /** + * 获取一个echarts的legend配置。 + * Get lengend options of echarts by head and series. + * + * @param array $series + * @param string $range object|time + * @access public + * @return array + */ + public function getEchartLegend(array $series, string $range = 'time') + { + $legend = array('type' => 'scroll'); + + if($range == 'object') + { + $selectedScope = array(); + foreach($series as $index => $se) + { + $selectedScope[$se['name']] = $index == 0 ? true : false; + } + + $legend['selector'] = true; + $legend['selected'] = $selectedScope; + } + + return $legend; + } + + /** + * 通过header来判断一个度量项有没有对象的概念。 + * Judge whether a metric has the concept of an object. + * + * header 通过 metric 模块的 getViewTableHeader 方法取得 + * @param array $header 表头 + * @access public + * @return bool + */ + public function isObjectMetric(array $header): bool + { + return in_array('scope', array_column($header, 'name')); + } + + /** + * 获取一个echarts的配置项。 + * Get options of echarts by head and data. + * + * @param array $head 表头 + * @param array $data 数据 + * @param string $chartType 图表类型 barX|barY|line|pie + * @access public + * @return array|false + */ + public function getEchartsOptions(array $header, array $data, string $chartType = 'line'): array|false + { + if(!$header || !$data) return false; + $type = in_array($chartType, array('barX', 'barY')) ? 'bar' : $chartType; + if($type == 'pie') return $this->getPieEchartsOptions($header, $data); + + $headLength = count($header); + if($headLength == 2) + { + return $this->getTimeOptions($header, $data, $type); + } + elseif($headLength == 3) + { + if($this->isObjectMetric($header)) + { + return $this->getObjectOptions($data, $type); + } + else + { + return $this->getTimeOptions($header, $data, $type); + } + } + elseif($headLength == 4) + { + return $this->getObjectOptions($data, $type); + } + } + + /** + * 获取一个 对象属性度量的 echart options。 + * Get options of echarts by data. + * + * @param array $data 数据 + * @param string $type 类型 line|bar + * @access public + * @return array + */ + public function getObjectOptions(array $data, string $type): array + { + $dateField = !isset(current($data)->dateString) ? 'calcTime' : 'dateString'; + usort($data, function($a, $b) use ($dateField) + { + $keyA = $a->$dateField; + $keyB = $b->$dateField; + + if($keyA == $keyB) return 0; + + return $keyA > $keyB ? -1 : 1; + }); + + $times = array(); + $objects = array(); + foreach($data as $dataInfo) + { + $time = substr($dataInfo->$dateField, 0, 10); + $object = $dataInfo->scope; + $value = $dataInfo->value; + + if(!isset($times[$time])) $times[$time] = $time; + if(!isset($objects[$object])) $objects[$object] = array(); + $objects[$object][$time] = $value; + } + + $xAxis = array('type' => 'category', 'data' => $times); + $yAxis = array('type' => 'value'); + $series = array(); + foreach($objects as $object => $datas) + { + $seriesData = array(); + foreach($times as $time) + { + $seriesData[] = isset($datas[$time]) ? $datas[$time] : 0; + } + + $series[] = array('type' => $type, 'name' => $object, 'data' => $seriesData); + } + + $legend = $this->getEchartLegend($series, 'object'); + + $options = array(); + $options['xAxis'] = $xAxis; + $options['yAxis'] = $yAxis; + $options['legend'] = $legend; + $options['series'] = $series; + + return $options; + } + + /** + * 获取一个 时间属性度量的 echart options。 + * Get options of echarts by head and data. + * + * @param array $head 表头 + * @param string $type 类型 line|bar + * @access public + * @return array + */ + public function getTimeOptions(array $header, array $data, string $type): array + { + list($x, $y) = $this->getEchartXY($header); + + usort($data, function($a, $b) use ($x) + { + $keyA = $a->$x; + $keyB = $b->$x; + + if($keyA == $keyB) return 0; + + return $keyA > $keyB ? -1 : 1; + }); + + $xTime = array_column($data, $x); + foreach($xTime as $key => $time) + { + $xTime[$key] = substr($time, 0, 10); + } + $xAxis = array('type' => 'category', 'data' => $xTime); + $yAxis = array('type' => 'value'); + + $series = array('type' => $type, 'data' => array_column($data, $y)); + $legend = $this->getEchartLegend($series); + + $options = array(); + $options['xAxis'] = $xAxis; + $options['yAxis'] = $yAxis; + $options['legend'] = $legend; + $options['series'] = $series; + + return $options; + } + + /** + * 获取一个echarts pie的配置项。 + * Get options of echarts pie by head and data. + * + * @param array $head 表头 + * @param array $datas 数据 + * @access public + * @return array + */ + public function getPieEchartsOptions(array $header, array $datas): array + { + list($x, $y) = $this->getEchartXY($header); + + $seriesData = array(); + foreach($datas as $data) + { + $seriesData[] = array('name' => $data->$x, 'value' => $data->$y); + } + + $options = array(); + $options['data'] = $seriesData; + + return $options; + } + + /** + * 获取图表 x轴 和 y轴的字段。 + * Get echart x and y field. + * + * @param array $header 表头 + * @access public + * @return array + */ + public function getEchartXY(array $header): array + { + $x = $y = ''; + $headLength = count($header); + if($headLength == 2) + { + $x = $header[1]['name']; + $y = $header[0]['name']; + } + elseif($headLength == 3) + { + $x = $header[0]['name']; + $y = $header[1]['name']; + } + + return array($x, $y); + } + + /** + * 获取一个图表可选的类型。 + * Get a echart typeList. + * + * @param array $header 表头 + * @access public + * @return array + */ + public function getChartTypeList(array $header): array + { + $chartTypeList = $this->lang->metric->chartTypeList; + if($this->isObjectMetric($header)) unset($chartTypeList['pie']); + + return $chartTypeList; + } + /** * 更新度量项的创建时间 * Update created date of metrics. @@ -1048,7 +1466,8 @@ class metricModel extends model public function updateMetricDate() { $now = helper::now(); - $this->dao->update(TABLE_METRIC)->set('createdDate')->eq($now)->where('deleted')->eq(0)->andWhere('createdDate is null')->exec(); + $metricIDList = $this->dao->select('id')->from(TABLE_METRIC)->where('deleted')->eq('0')->fetchPairs(); + foreach($metricIDList as $metricID) $this->dao->update(TABLE_METRIC)->set('createdDate')->eq($now)->exec(); } /** @@ -1097,8 +1516,32 @@ class metricModel extends model * @access public * @return object|string|false */ - public function processRecordQuery(array $query, string $key, string $type = 'common'): object|string|false + public function processRecordQuery(array $query, string $key, string $type = 'common'): object|array|string|false { + if($key == 'dateLabel') + { + if(isset($query[$key])) + { + $dateType = $query['dateType']; + $dateLabel = $query['dateLabel']; + + if($dateLabel == 'all') $dateStr = '1970-01-01'; + if(is_numeric($dateLabel)) $dateStr = date('Y-m-d', strtotime('-' . ((int)$dateLabel - 1) . " {$dateType}s")); + + $query['dateBegin'] = $dateStr; + $query['dateEnd'] = date('Y-m-d'); + } + + $begin = $this->processRecordQuery($query, 'dateBegin', 'date'); + $end = $this->processRecordQuery($query, 'dateEnd', 'date'); + return array($begin, $end); + } + + if($key == 'calcDate' && isset($query[$key])) + { + return date('Y-m-d', strtotime("-{$query[$key]} days")); + } + if(!isset($query[$key]) || empty($query[$key])) return false; if($type == 'date') @@ -1120,30 +1563,31 @@ class metricModel extends model } /** - * 获取度量数据的日期字段。 - * Get date field of metric data. + * 获取度量数据的日期类型。 + * Get date type of metric data. * - * @param string $code + * @param array $dateFields * @access public - * @return array + * @return string */ - public function getMetricRecordDateField(string $code): array + public function getDateType(array $dateFields): string { - $record = $this->dao->select("year, month, week, day") - ->from(TABLE_METRICLIB) - ->where('metricCode')->eq($code) - ->fetch(); + $dateList = array_intersect($dateFields, $this->config->metric->dateList); - if(!$record) return array(); + if(in_array('day', $dateList)) return 'day'; + if(in_array('week', $dateList)) return 'week'; + if(in_array('month', $dateList)) return 'month'; + if(in_array('year', $dateList)) return 'year'; - $dataFields = array(); - $recordKeys = array_keys((array)$record); - foreach($recordKeys as $recordKey) - { - if(!empty($record->$recordKey)) $dataFields[] = $recordKey; - } + return 'nodate'; + } - return $dataFields; + public function getDateTypeByCode(string $code) + { + $dataFields = $this->getMetricRecordDateField($code); + $dateType = $this->getDateType($dataFields); + + return $dateType; } /** @@ -1154,12 +1598,14 @@ class metricModel extends model * @access public * @return string */ - public function getDateType(array $dateFields): string + public function getDateByDateType(string $dateType): string { - if(in_array('day', $dateFields)) return 'day'; - if(in_array('week', $dateFields)) return 'week'; - if(in_array('month', $dateFields)) return 'month'; - if(in_array('year', $dateFields)) return 'year'; + if($dateType == 'day') $sub = '-7 days'; + if($dateType == 'week') $sub = '-1 month'; + if($dateType == 'month') $sub = '-1 year'; + if($dateType == 'year') $sub = '-3 years'; + + return date('Y-m-d', strtotime($sub)); } /** @@ -1198,4 +1644,96 @@ class metricModel extends model return $str; } + + /** + * 判断 header 是否有分组(合并单元格)。 + * Judge header whether there are merges cell. + * + * @param array $header + * @access protected + * @return array + */ + protected function isHeaderGroup($header) + { + if(!$header) return false; + + foreach($header as $head) + { + if(isset($head['headerGroup'])) return true; + } + + return false; + } + + /** + * 判断是否是按系统统计的度量项。 + * Determine whether it is metric in system. + * + * @param array $results + * @access public + * @return bool + */ + public function isSystemMetric($results) + { + $firstRecord = (object)current($results); + + foreach($this->config->metric->excludeGlobal as $exclude) + { + if(isset($firstRecord->$exclude)) return false; + } + return true; + } + + /** + * 获取度量项的收集周期。 + * Get collect cycle of metric. + * + * @param array|object $record + * @access public + * @return string|null + */ + public function getMetricCycle($record) + { + $record = (object)$record; + + if(isset($record->year) && !isset($record->month) && !isset($record->week)) return 'year'; + if(isset($record->year, $record->month) && !isset($record->day)) return 'month'; + if(isset($record->year, $record->month, $record->day)) return 'day'; + if(isset($record->year, $record->week)) return 'week'; + + return null; + } + + /** + * 获取日期标签。 + * Get date labels. + * + * @param string $dateType + * @access public + * @return array|false + */ + public function getDateLabels(string $dateType): array|false + { + if($dateType == 'nodate') return array(); + $objectKey = "{$dateType}Labels"; + + return $this->lang->metric->query->$objectKey; + } + + /** + * 获取默认选中的日期。 + * Get default selected date. + * + * @param array $dateLabels + * @param array $filters + * @access public + * @return string + */ + public function getDefaultDate(array $dateLabels, array $filters = array()): string + { + $defaultDate = ''; + + $dates = array_keys($dateLabels); + return (string)current($dates); + } } diff --git a/module/metric/tao.php b/module/metric/tao.php index 39b7dd5fd3..98130a746e 100644 --- a/module/metric/tao.php +++ b/module/metric/tao.php @@ -43,6 +43,39 @@ class metricTao extends metricModel return $metrics; } + /** + * 根据编号获取度项。 + * Fetch metric by id. + * + * @param string $code + * @param array|string $fields + * @access protected + * @return mixed + */ + protected function fetchMetricByID($code, $fields = '*') + { + if(is_array($fields)) $fields = implode(',', $fields); + + $metric = $this->dao->select($fields)->from(TABLE_METRIC)->where('code')->eq($code)->fetch(); + return $metric->scope; + } + + /** + * 根据编号列表获取度项。 + * Fetch metric list by id list. + * + * @param array $metricIDList + * @access protected + * @return array + */ + protected function fetchMetricsByIDList($metricIDList) + { + return $this->dao->select('*')->from(TABLE_METRIC) + ->where('deleted')->eq(0) + ->andWhere('id')->in($metricIDList) + ->fetchAll(); + } + /** * 根据度量项编码获取度量项数据。 * Fetch metric by code. @@ -126,48 +159,88 @@ class metricTao extends metricModel ->fetchAll(); } + /** + * 获取范围对象类型以构建分页对象。 + * Get object list with page. + * + * @param string $code + * @param string $scope + * @param object $pager + * @access protected + * @return array|false + */ + protected function getObjectsWithPager($code, $scope, $pager) + { + if($scope == 'system') return false; + + $scopeObjects = $this->dao->select($scope)->from(TABLE_METRICLIB)->where('metricCode')->eq($code)->fetchPairs(); + if($scope == 'product') + { + $objects = $this->dao->select('id')->from(TABLE_PRODUCT) + ->where('deleted')->eq(0) + ->andWhere('shadow')->eq(0) + ->andWhere('id')->in($scopeObjects) + ->page($pager) + ->fetchPairs(); + } + elseif($scope == 'project') + { + $objects = $this->dao->select('id')->from(TABLE_PROJECT) + ->where('deleted')->eq(0) + ->andWhere('type')->eq('project') + ->andWhere('id')->in($scopeObjects) + ->page($pager) + ->fetchPairs(); + } + elseif($scope == 'execution') + { + $objects = $this->dao->select('id')->from(TABLE_EXECUTION) + ->where('deleted')->eq(0) + ->andWhere('type')->in('sprint,stage,kanban') + ->andWhere('id')->in($scopeObjects) + ->page($pager) + ->fetchPairs(); + } + elseif($scope == 'user') + { + $objects = $this->dao->select('account')->from(TABLE_USER) + ->where('deleted')->eq('0') + ->andWhere('account')->in($scopeObjects) + ->page($pager) + ->fetchPairs(); + } + + return $objects; + } + /** * 请求度量数据。 * Fetch metric data. * - * @param string $code - * @param array $fieldList + * @param string $code + * @param array $fieldList + * @param array $query + * @param object|null $pager * @access protected * @return array */ - protected function fetchMetricRecords(string $code, array $fieldList, array $query = array()): array + protected function fetchMetricRecords(string $code, array $fieldList, array $query = array(), object|null $pager = null): array { - $dataFieldStr = implode(', ', $fieldList); - if(!empty($dataFieldStr)) $dataFieldStr .= ', '; + $metricScope = $this->fetchMetricByID($code, 'scope'); + $objectList = $this->getObjectsWithPager($code, $metricScope, $pager); - $record = $this->dao->select("id, {$dataFieldStr} value, date") - ->from(TABLE_METRICLIB) - ->where('metricCode')->eq($code) - ->fetch(); - if(!$record) return array(); - - $fieldList = array_keys((array)($record)); $scopeList = array_intersect($fieldList, $this->config->metric->scopeList); $dateList = array_intersect($fieldList, $this->config->metric->dateList); - /** - * 如果没有传入筛选参数 - * 如果范围和日期列为空,说明最终需要的数据只有两列,而这作为全局数据的标记,所以要取所有的数据,否则只取今天之前的数据。 - * 如果传入了筛选参数,则按照筛选参数进行筛选。 - * If no filtering parameters are passed in - * If the range and date columns are empty, only two columns of data are needed at the end, and this serves as a marker for global data, so get all the data, otherwise only the data before today. - * If filtering parameters are passed in, filter according to the filtering parameters. - */ - $date = empty($query) ? (empty($scopeList) && empty($dateList) ? date('Y-m-d H:i:s', 0) : helper::today()) : ''; + $dateType = $this->getDateType($dateList); + $query['dateType'] = $dateType; $scope = $this->processRecordQuery($query, 'scope'); $dateBegin = $this->processRecordQuery($query, 'dateBegin', 'date'); $dateEnd = $this->processRecordQuery($query, 'dateEnd', 'date'); - $calcTime = $this->processRecordQuery($query, 'calcTime'); - $calcBegin = $this->processRecordQuery($query, 'calcBegin'); - $calcEnd = $this->processRecordQuery($query, 'calcEnd'); + list($dateBegin, $dateEnd) = $this->processRecordQuery($query, 'dateLabel', 'date'); - $dateType = empty($dateList) ? '' : $this->getDateType($dateList); + $calcDate = $this->processRecordQuery($query, 'calcDate', 'date'); $yearBegin = empty($dateBegin) ? '' : $dateBegin->year; $yearEnd = empty($dateEnd) ? '' : $dateEnd->year; @@ -181,9 +254,14 @@ class metricTao extends metricModel $scopeKey = current($scopeList); $scopeValue = $scope; - $records = $this->dao->select("id, {$dataFieldStr} value, date") + $fieldList = array_merge($fieldList, array('id', 'value', 'date')); + $wrapFields = array_map(fn($value) => "`$value`", $fieldList); + $dataFieldStr = implode(',', $wrapFields); + + $records = $this->dao->select($dataFieldStr) ->from(TABLE_METRICLIB) ->where('metricCode')->eq($code) + ->beginIF($metricScope != 'system')->andWhere($metricScope)->in($objectList)->fi() ->beginIF(!empty($scope))->andWhere($scopeKey)->in($scopeValue)->fi() ->beginIF(!empty($dateBegin) and $dateType == 'year')->andWhere('`year`')->ge($yearBegin)->fi() ->beginIF(!empty($dateEnd) and $dateType == 'year')->andWhere('`year`')->le($yearEnd)->fi() @@ -193,10 +271,7 @@ class metricTao extends metricModel ->beginIF(!empty($dateEnd) and $dateType == 'week')->andWhere('CONCAT(`year`, `week`)')->le($weekEnd)->fi() ->beginIF(!empty($dateBegin) and $dateType == 'day')->andWhere('CONCAT(`year`, `month`, `day`)')->ge($dayBegin)->fi() ->beginIF(!empty($dateEnd) and $dateType == 'day')->andWhere('CONCAT(`year`, `month`, `day`)')->le($dayEnd)->fi() - ->beginIF(!empty($calcTime))->andWhere('left(date, 10)')->eq($calcTime)->fi() - ->beginIF(!empty($calcBegin))->andWhere('left(date, 10)')->ge($calcBegin)->fi() - ->beginIF(!empty($calcEnd))->andWhere('left(date, 10)')->le($calcEnd)->fi() - ->beginIF(empty($query))->andWhere('date')->gt($date)->fi() + ->beginIF(!empty($calcDate))->andWhere('date')->ge($calcDate)->fi() ->beginIF(!empty($scopeList))->orderBy("date desc, $scopeKey, year desc, month desc, week desc, day desc")->fi() ->beginIF(empty($scopeList))->orderBy("date desc, year desc, month desc, week desc, day desc")->fi() ->fetchAll(); diff --git a/module/metric/test/calc/execution/hour/consume_of_task_in_execution.php b/module/metric/test/calc/execution/hour/consume_of_task_in_execution.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/execution/hour/estimate_of_task_in_execution.php b/module/metric/test/calc/execution/hour/estimate_of_task_in_execution.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/execution/hour/left_of_task_in_execution.php b/module/metric/test/calc/execution/hour/left_of_task_in_execution.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/execution/rate/progress_of_task_in_execution.php b/module/metric/test/calc/execution/rate/progress_of_task_in_execution.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/execution/rate/rate_of_developed_story_in_execution.php b/module/metric/test/calc/execution/rate/rate_of_developed_story_in_execution.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/execution/rate/rate_of_finished_story_in_execution.php b/module/metric/test/calc/execution/rate/rate_of_finished_story_in_execution.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/execution/scale/count_of_daily_finished_task_in_execution.php b/module/metric/test/calc/execution/scale/count_of_daily_finished_task_in_execution.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/execution/scale/count_of_developed_story_in_execution.php b/module/metric/test/calc/execution/scale/count_of_developed_story_in_execution.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/execution/scale/count_of_finished_story_in_execution.php b/module/metric/test/calc/execution/scale/count_of_finished_story_in_execution.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/execution/scale/count_of_finished_task_in_execution.php b/module/metric/test/calc/execution/scale/count_of_finished_task_in_execution.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/execution/scale/count_of_invalid_story_in_execution.php b/module/metric/test/calc/execution/scale/count_of_invalid_story_in_execution.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/execution/scale/count_of_story_in_execution.php b/module/metric/test/calc/execution/scale/count_of_story_in_execution.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/execution/scale/count_of_task_in_execution.php b/module/metric/test/calc/execution/scale/count_of_task_in_execution.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/execution/scale/count_of_unfinished_task_in_execution.php b/module/metric/test/calc/execution/scale/count_of_unfinished_task_in_execution.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/execution/scale/count_of_valid_story_in_execution.php b/module/metric/test/calc/execution/scale/count_of_valid_story_in_execution.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/product/qc/rate_of_approved_story_in_product.php b/module/metric/test/calc/product/qc/rate_of_approved_story_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/product/rate/rate_of_finish_story_in_product.php b/module/metric/test/calc/product/rate/rate_of_finish_story_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/product/rate/rate_of_fixed_bug_in_product.php b/module/metric/test/calc/product/rate/rate_of_fixed_bug_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/product/scale/bug_concentration_of_developed_story_in_product.php b/module/metric/test/calc/product/scale/bug_concentration_of_developed_story_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/product/scale/case_coverage_of_projected_story_in_product.php b/module/metric/test/calc/product/scale/case_coverage_of_projected_story_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/product/scale/count_of_activated_bug_in_product.php b/module/metric/test/calc/product/scale/count_of_activated_bug_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/product/scale/count_of_annual_closed_feedback_in_product.php b/module/metric/test/calc/product/scale/count_of_annual_closed_feedback_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/product/scale/count_of_annual_closed_story_in_product.php b/module/metric/test/calc/product/scale/count_of_annual_closed_story_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/product/scale/count_of_annual_created_bug_in_product.php b/module/metric/test/calc/product/scale/count_of_annual_created_bug_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/product/scale/count_of_annual_created_case_in_product.php b/module/metric/test/calc/product/scale/count_of_annual_created_case_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/product/scale/count_of_annual_created_effective_bug_in_product.php b/module/metric/test/calc/product/scale/count_of_annual_created_effective_bug_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/product/scale/count_of_annual_created_feedback_in_product.php b/module/metric/test/calc/product/scale/count_of_annual_created_feedback_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/product/scale/count_of_annual_created_productplan_in_product.php b/module/metric/test/calc/product/scale/count_of_annual_created_productplan_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/product/scale/count_of_annual_created_release_in_product.php b/module/metric/test/calc/product/scale/count_of_annual_created_release_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/product/scale/count_of_annual_created_requirement_in_product.php b/module/metric/test/calc/product/scale/count_of_annual_created_requirement_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/product/scale/count_of_annual_created_story_in_product.php b/module/metric/test/calc/product/scale/count_of_annual_created_story_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/product/scale/count_of_annual_delivered_story_in_product.php b/module/metric/test/calc/product/scale/count_of_annual_delivered_story_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/product/scale/count_of_annual_finished_productplan_in_product.php b/module/metric/test/calc/product/scale/count_of_annual_finished_productplan_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/product/scale/count_of_annual_finished_story_in_product.php b/module/metric/test/calc/product/scale/count_of_annual_finished_story_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/product/scale/count_of_annual_fixed_bug_in_product.php b/module/metric/test/calc/product/scale/count_of_annual_fixed_bug_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/product/scale/count_of_bug_in_product.php b/module/metric/test/calc/product/scale/count_of_bug_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/product/scale/count_of_case_in_product.php b/module/metric/test/calc/product/scale/count_of_case_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/product/scale/count_of_closed_story_in_product.php b/module/metric/test/calc/product/scale/count_of_closed_story_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/product/scale/count_of_daily_closed_bug_in_product.php b/module/metric/test/calc/product/scale/count_of_daily_closed_bug_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/product/scale/count_of_daily_created_bug_in_product.php b/module/metric/test/calc/product/scale/count_of_daily_created_bug_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/product/scale/count_of_daily_resolved_bug_in_product.php b/module/metric/test/calc/product/scale/count_of_daily_resolved_bug_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/product/scale/count_of_delivered_story_in_product.php b/module/metric/test/calc/product/scale/count_of_delivered_story_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/product/scale/count_of_developed_story_in_product.php b/module/metric/test/calc/product/scale/count_of_developed_story_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/product/scale/count_of_effective_bug_in_product.php b/module/metric/test/calc/product/scale/count_of_effective_bug_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/product/scale/count_of_feedback_in_product.php b/module/metric/test/calc/product/scale/count_of_feedback_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/product/scale/count_of_finished_story_in_product.php b/module/metric/test/calc/product/scale/count_of_finished_story_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/product/scale/count_of_fixed_bug_in_product.php b/module/metric/test/calc/product/scale/count_of_fixed_bug_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/product/scale/count_of_invalid_story_in_product.php b/module/metric/test/calc/product/scale/count_of_invalid_story_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/product/scale/count_of_monthly_closed_story_in_product.php b/module/metric/test/calc/product/scale/count_of_monthly_closed_story_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/product/scale/count_of_monthly_created_story_in_product.php b/module/metric/test/calc/product/scale/count_of_monthly_created_story_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/product/scale/count_of_monthly_delivered_story_in_product.php b/module/metric/test/calc/product/scale/count_of_monthly_delivered_story_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/product/scale/count_of_monthly_finished_story_in_product.php b/module/metric/test/calc/product/scale/count_of_monthly_finished_story_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/product/scale/count_of_productplan_in_product.php b/module/metric/test/calc/product/scale/count_of_productplan_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/product/scale/count_of_release_in_product.php b/module/metric/test/calc/product/scale/count_of_release_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/product/scale/count_of_requirement_in_product.php b/module/metric/test/calc/product/scale/count_of_requirement_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/product/scale/count_of_severe_bug_in_product.php b/module/metric/test/calc/product/scale/count_of_severe_bug_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/product/scale/count_of_severity_1_bug_in_product.php b/module/metric/test/calc/product/scale/count_of_severity_1_bug_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/product/scale/count_of_severity_2_bug_in_product.php b/module/metric/test/calc/product/scale/count_of_severity_2_bug_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/product/scale/count_of_story_in_product.php b/module/metric/test/calc/product/scale/count_of_story_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/product/scale/count_of_unclosed_story_in_product.php b/module/metric/test/calc/product/scale/count_of_unclosed_story_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/product/scale/count_of_valid_story_in_product.php b/module/metric/test/calc/product/scale/count_of_valid_story_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/product/scale/scale_of_annual_closed_story_in_product.php b/module/metric/test/calc/product/scale/scale_of_annual_closed_story_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/product/scale/scale_of_annual_delivered_story_in_product.php b/module/metric/test/calc/product/scale/scale_of_annual_delivered_story_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/product/scale/scale_of_annual_finished_story_in_product.php b/module/metric/test/calc/product/scale/scale_of_annual_finished_story_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/product/scale/scale_of_story_in_product.php b/module/metric/test/calc/product/scale/scale_of_story_in_product.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/product/scale/yaml/testcase_coverage_of_projected_story_in_product/case.yaml b/module/metric/test/calc/product/scale/yaml/testcase_coverage_of_projected_story_in_product/case.yaml old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/product/scale/yaml/testcase_coverage_of_projected_story_in_product/story.yaml b/module/metric/test/calc/product/scale/yaml/testcase_coverage_of_projected_story_in_product/story.yaml old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/project/hour/ac_of_all_in_waterfall.php b/module/metric/test/calc/project/hour/ac_of_all_in_waterfall.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/project/hour/consume_of_all_in_project.php b/module/metric/test/calc/project/hour/consume_of_all_in_project.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/project/hour/consume_of_task_in_project.php b/module/metric/test/calc/project/hour/consume_of_task_in_project.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/project/hour/day_of_invested_in_project.php b/module/metric/test/calc/project/hour/day_of_invested_in_project.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/project/hour/estimate_of_task_in_project.php b/module/metric/test/calc/project/hour/estimate_of_task_in_project.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/project/hour/ev_of_finished_task_in_waterfall.php b/module/metric/test/calc/project/hour/ev_of_finished_task_in_waterfall.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/project/hour/left_of_task_in_project.php b/module/metric/test/calc/project/hour/left_of_task_in_project.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/project/hour/pv_of_task_in_waterfall.php b/module/metric/test/calc/project/hour/pv_of_task_in_waterfall.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/project/rate/cv_in_waterfall.php b/module/metric/test/calc/project/rate/cv_in_waterfall.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/project/rate/progress_of_task_in_project.php b/module/metric/test/calc/project/rate/progress_of_task_in_project.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/project/rate/rate_of_finished_story_in_project.php b/module/metric/test/calc/project/rate/rate_of_finished_story_in_project.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/project/rate/sv_in_waterfall.php b/module/metric/test/calc/project/rate/sv_in_waterfall.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/project/scale/count_annual_closed_execution_in_project.php b/module/metric/test/calc/project/scale/count_annual_closed_execution_in_project.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/project/scale/count_of_activated_bug_in_project.php b/module/metric/test/calc/project/scale/count_of_activated_bug_in_project.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/project/scale/count_of_annual_finished_story_in_project.php b/module/metric/test/calc/project/scale/count_of_annual_finished_story_in_project.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/project/scale/count_of_bug_in_project.php b/module/metric/test/calc/project/scale/count_of_bug_in_project.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/project/scale/count_of_closed_bug_in_project.php b/module/metric/test/calc/project/scale/count_of_closed_bug_in_project.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/project/scale/count_of_closed_execution_in_project.php b/module/metric/test/calc/project/scale/count_of_closed_execution_in_project.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/project/scale/count_of_closed_story_in_project.php b/module/metric/test/calc/project/scale/count_of_closed_story_in_project.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/project/scale/count_of_doing_execution_in_project.php b/module/metric/test/calc/project/scale/count_of_doing_execution_in_project.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/project/scale/count_of_doing_task_in_project.php b/module/metric/test/calc/project/scale/count_of_doing_task_in_project.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/project/scale/count_of_execution_in_project.php b/module/metric/test/calc/project/scale/count_of_execution_in_project.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/project/scale/count_of_finished_story_in_project.php b/module/metric/test/calc/project/scale/count_of_finished_story_in_project.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/project/scale/count_of_finished_task_in_project.php b/module/metric/test/calc/project/scale/count_of_finished_task_in_project.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/project/scale/count_of_invalid_story_in_project.php b/module/metric/test/calc/project/scale/count_of_invalid_story_in_project.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/project/scale/count_of_opened_issue_in_project.php b/module/metric/test/calc/project/scale/count_of_opened_issue_in_project.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/project/scale/count_of_opened_risk_in_project.php b/module/metric/test/calc/project/scale/count_of_opened_risk_in_project.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/project/scale/count_of_story_in_project.php b/module/metric/test/calc/project/scale/count_of_story_in_project.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/project/scale/count_of_suspended_execution_in_project.php b/module/metric/test/calc/project/scale/count_of_suspended_execution_in_project.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/project/scale/count_of_task_in_project.php b/module/metric/test/calc/project/scale/count_of_task_in_project.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/project/scale/count_of_unclosed_story_in_project.php b/module/metric/test/calc/project/scale/count_of_unclosed_story_in_project.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/project/scale/count_of_user_in_project.php b/module/metric/test/calc/project/scale/count_of_user_in_project.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/project/scale/count_of_valid_story_in_project.php b/module/metric/test/calc/project/scale/count_of_valid_story_in_project.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/project/scale/count_of_wait_task_in_project.php b/module/metric/test/calc/project/scale/count_of_wait_task_in_project.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/project/scale/count_wait_execution_in_project.php b/module/metric/test/calc/project/scale/count_wait_execution_in_project.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/project/scale/scale_of_annual_finished_story_in_project.php b/module/metric/test/calc/project/scale/scale_of_annual_finished_story_in_project.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/project/scale/scale_of_story_in_project.php b/module/metric/test/calc/project/scale/scale_of_story_in_project.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/project/time/count_of_actual_time_in_project.php b/module/metric/test/calc/project/time/count_of_actual_time_in_project.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/project/time/left_period_of_project.php b/module/metric/test/calc/project/time/left_period_of_project.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/project/time/planned_period_of_project.php b/module/metric/test/calc/project/time/planned_period_of_project.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/project/time/variance_of_time_in_project.php b/module/metric/test/calc/project/time/variance_of_time_in_project.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/hour/consume_of_annual_closed_project.php b/module/metric/test/calc/system/hour/consume_of_annual_closed_project.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/hour/consume_of_monthly_closed_project.php b/module/metric/test/calc/system/hour/consume_of_monthly_closed_project.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/hour/consume_of_task.php b/module/metric/test/calc/system/hour/consume_of_task.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/hour/day_of_annual_effort.php b/module/metric/test/calc/system/hour/day_of_annual_effort.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/hour/estimate_of_annual_closed_project.php b/module/metric/test/calc/system/hour/estimate_of_annual_closed_project.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/hour/estimate_of_task.php b/module/metric/test/calc/system/hour/estimate_of_task.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/hour/hour_of_annual_effort.php b/module/metric/test/calc/system/hour/hour_of_annual_effort.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/hour/left_of_task.php b/module/metric/test/calc/system/hour/left_of_task.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/rate/rate_of_annual_delivered_story.php b/module/metric/test/calc/system/rate/rate_of_annual_delivered_story.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/rate/rate_of_annual_finished_story.php b/module/metric/test/calc/system/rate/rate_of_annual_finished_story.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/rate/rate_of_delayed_closed_execution_which_annual_finished.php b/module/metric/test/calc/system/rate/rate_of_delayed_closed_execution_which_annual_finished.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/rate/rate_of_delayed_finished_project_which_annual_finished.php b/module/metric/test/calc/system/rate/rate_of_delayed_finished_project_which_annual_finished.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/rate/rate_of_delivered_story.php b/module/metric/test/calc/system/rate/rate_of_delivered_story.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/rate/rate_of_finished_story.php b/module/metric/test/calc/system/rate/rate_of_finished_story.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/rate/rate_of_fixed_bug.php b/module/metric/test/calc/system/rate/rate_of_fixed_bug.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_activated_bug.php b/module/metric/test/calc/system/scale/count_of_activated_bug.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_annual_closed_execution.php b/module/metric/test/calc/system/scale/count_of_annual_closed_execution.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_annual_closed_feedback.php b/module/metric/test/calc/system/scale/count_of_annual_closed_feedback.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_annual_closed_product.php b/module/metric/test/calc/system/scale/count_of_annual_closed_product.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_annual_closed_productplan.php b/module/metric/test/calc/system/scale/count_of_annual_closed_productplan.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_annual_closed_project.php b/module/metric/test/calc/system/scale/count_of_annual_closed_project.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_annual_closed_top_program.php b/module/metric/test/calc/system/scale/count_of_annual_closed_top_program.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_annual_created_bug.php b/module/metric/test/calc/system/scale/count_of_annual_created_bug.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_annual_created_case.php b/module/metric/test/calc/system/scale/count_of_annual_created_case.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_annual_created_doc.php b/module/metric/test/calc/system/scale/count_of_annual_created_doc.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_annual_created_execution.php b/module/metric/test/calc/system/scale/count_of_annual_created_execution.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_annual_created_feedback.php b/module/metric/test/calc/system/scale/count_of_annual_created_feedback.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_annual_created_product.php b/module/metric/test/calc/system/scale/count_of_annual_created_product.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_annual_created_productplan.php b/module/metric/test/calc/system/scale/count_of_annual_created_productplan.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_annual_created_project.php b/module/metric/test/calc/system/scale/count_of_annual_created_project.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_annual_created_release.php b/module/metric/test/calc/system/scale/count_of_annual_created_release.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_annual_created_story.php b/module/metric/test/calc/system/scale/count_of_annual_created_story.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_annual_created_task.php b/module/metric/test/calc/system/scale/count_of_annual_created_task.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_annual_created_top_program.php b/module/metric/test/calc/system/scale/count_of_annual_created_top_program.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_annual_created_user.php b/module/metric/test/calc/system/scale/count_of_annual_created_user.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_annual_delivered_story.php b/module/metric/test/calc/system/scale/count_of_annual_delivered_story.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_annual_finished_productplan.php b/module/metric/test/calc/system/scale/count_of_annual_finished_productplan.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_annual_finished_project.php b/module/metric/test/calc/system/scale/count_of_annual_finished_project.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_annual_finished_story.php b/module/metric/test/calc/system/scale/count_of_annual_finished_story.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_annual_finished_task.php b/module/metric/test/calc/system/scale/count_of_annual_finished_task.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_annual_fixed_bug.php b/module/metric/test/calc/system/scale/count_of_annual_fixed_bug.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_bug.php b/module/metric/test/calc/system/scale/count_of_bug.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_case.php b/module/metric/test/calc/system/scale/count_of_case.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_closed_bug.php b/module/metric/test/calc/system/scale/count_of_closed_bug.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_closed_execution.php b/module/metric/test/calc/system/scale/count_of_closed_execution.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_closed_feedback.php b/module/metric/test/calc/system/scale/count_of_closed_feedback.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_closed_product.php b/module/metric/test/calc/system/scale/count_of_closed_product.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_closed_program.php b/module/metric/test/calc/system/scale/count_of_closed_program.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_closed_project.php b/module/metric/test/calc/system/scale/count_of_closed_project.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_closed_story.php b/module/metric/test/calc/system/scale/count_of_closed_story.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_closed_task.php b/module/metric/test/calc/system/scale/count_of_closed_task.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_closed_top_program.php b/module/metric/test/calc/system/scale/count_of_closed_top_program.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_daily_created_story.php b/module/metric/test/calc/system/scale/count_of_daily_created_story.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_daily_run_case.php b/module/metric/test/calc/system/scale/count_of_daily_run_case.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_delayed_finished_execution_which_annual_finished.php b/module/metric/test/calc/system/scale/count_of_delayed_finished_execution_which_annual_finished.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_delayed_finished_execution_which_finished.php b/module/metric/test/calc/system/scale/count_of_delayed_finished_execution_which_finished.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_delayed_finished_project_which_annual_finished.php b/module/metric/test/calc/system/scale/count_of_delayed_finished_project_which_annual_finished.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_delayed_finished_project_which_finished.php b/module/metric/test/calc/system/scale/count_of_delayed_finished_project_which_finished.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_delivered_story.php b/module/metric/test/calc/system/scale/count_of_delivered_story.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_doc.php b/module/metric/test/calc/system/scale/count_of_doc.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_doing_execution.php b/module/metric/test/calc/system/scale/count_of_doing_execution.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_doing_program.php b/module/metric/test/calc/system/scale/count_of_doing_program.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_doing_project.php b/module/metric/test/calc/system/scale/count_of_doing_project.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_execution.php b/module/metric/test/calc/system/scale/count_of_execution.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_feedback.php b/module/metric/test/calc/system/scale/count_of_feedback.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_finished_productplan.php b/module/metric/test/calc/system/scale/count_of_finished_productplan.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_finished_story.php b/module/metric/test/calc/system/scale/count_of_finished_story.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_finished_task.php b/module/metric/test/calc/system/scale/count_of_finished_task.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_fixed_bug.php b/module/metric/test/calc/system/scale/count_of_fixed_bug.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_invalid_story.php b/module/metric/test/calc/system/scale/count_of_invalid_story.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_line.php b/module/metric/test/calc/system/scale/count_of_line.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_marker_release.php b/module/metric/test/calc/system/scale/count_of_marker_release.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_monthly_closed_execution.php b/module/metric/test/calc/system/scale/count_of_monthly_closed_execution.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_monthly_closed_project.php b/module/metric/test/calc/system/scale/count_of_monthly_closed_project.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_monthly_created_bug.php b/module/metric/test/calc/system/scale/count_of_monthly_created_bug.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_monthly_created_execution.php b/module/metric/test/calc/system/scale/count_of_monthly_created_execution.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_monthly_created_project.php b/module/metric/test/calc/system/scale/count_of_monthly_created_project.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_monthly_created_release.php b/module/metric/test/calc/system/scale/count_of_monthly_created_release.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_monthly_created_story.php b/module/metric/test/calc/system/scale/count_of_monthly_created_story.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_monthly_created_task.php b/module/metric/test/calc/system/scale/count_of_monthly_created_task.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_monthly_finished_story.php b/module/metric/test/calc/system/scale/count_of_monthly_finished_story.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_monthly_finished_task.php b/module/metric/test/calc/system/scale/count_of_monthly_finished_task.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_monthly_fixed_bug.php b/module/metric/test/calc/system/scale/count_of_monthly_fixed_bug.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_normal_product.php b/module/metric/test/calc/system/scale/count_of_normal_product.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_product.php b/module/metric/test/calc/system/scale/count_of_product.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_productplan.php b/module/metric/test/calc/system/scale/count_of_productplan.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_program.php b/module/metric/test/calc/system/scale/count_of_program.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_project.php b/module/metric/test/calc/system/scale/count_of_project.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_release.php b/module/metric/test/calc/system/scale/count_of_release.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_resolved_bug.php b/module/metric/test/calc/system/scale/count_of_resolved_bug.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_story.php b/module/metric/test/calc/system/scale/count_of_story.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_suspended_execution.php b/module/metric/test/calc/system/scale/count_of_suspended_execution.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_suspended_program.php b/module/metric/test/calc/system/scale/count_of_suspended_program.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_suspended_project.php b/module/metric/test/calc/system/scale/count_of_suspended_project.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_task.php b/module/metric/test/calc/system/scale/count_of_task.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_top_program.php b/module/metric/test/calc/system/scale/count_of_top_program.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_unclosed_bug.php b/module/metric/test/calc/system/scale/count_of_unclosed_bug.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_unclosed_execution.php b/module/metric/test/calc/system/scale/count_of_unclosed_execution.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_unclosed_project.php b/module/metric/test/calc/system/scale/count_of_unclosed_project.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_unclosed_story.php b/module/metric/test/calc/system/scale/count_of_unclosed_story.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_unclosed_top_program.php b/module/metric/test/calc/system/scale/count_of_unclosed_top_program.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_undelayed_finished_execution_which_annual_finished.php b/module/metric/test/calc/system/scale/count_of_undelayed_finished_execution_which_annual_finished.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_undelayed_finished_execution_which_finished.php b/module/metric/test/calc/system/scale/count_of_undelayed_finished_execution_which_finished.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_undelayed_finished_project_which_annual_finished.php b/module/metric/test/calc/system/scale/count_of_undelayed_finished_project_which_annual_finished.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_undelayed_finished_project_which_annual_started.php b/module/metric/test/calc/system/scale/count_of_undelayed_finished_project_which_annual_started.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_undelayed_finished_project_which_finished.php b/module/metric/test/calc/system/scale/count_of_undelayed_finished_project_which_finished.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_unfinished_productplan.php b/module/metric/test/calc/system/scale/count_of_unfinished_productplan.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_unfinished_task.php b/module/metric/test/calc/system/scale/count_of_unfinished_task.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_user.php b/module/metric/test/calc/system/scale/count_of_user.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_valid_bug.php b/module/metric/test/calc/system/scale/count_of_valid_bug.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_valid_story.php b/module/metric/test/calc/system/scale/count_of_valid_story.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_wait_execution.php b/module/metric/test/calc/system/scale/count_of_wait_execution.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_wait_program.php b/module/metric/test/calc/system/scale/count_of_wait_program.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_wait_project.php b/module/metric/test/calc/system/scale/count_of_wait_project.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_weekly_created_release.php b/module/metric/test/calc/system/scale/count_of_weekly_created_release.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/count_of_weekly_finished_story.php b/module/metric/test/calc/system/scale/count_of_weekly_finished_story.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/scale_of_annual_closed_story.php b/module/metric/test/calc/system/scale/scale_of_annual_closed_story.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/scale_of_annual_delivered_story.php b/module/metric/test/calc/system/scale/scale_of_annual_delivered_story.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/scale_of_annual_finished_story.php b/module/metric/test/calc/system/scale/scale_of_annual_finished_story.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/scale_of_finished_story.php b/module/metric/test/calc/system/scale/scale_of_finished_story.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/scale_of_invalid_story.php b/module/metric/test/calc/system/scale/scale_of_invalid_story.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/scale_of_monthly_closed_story.php b/module/metric/test/calc/system/scale/scale_of_monthly_closed_story.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/scale_of_monthly_delivered_story.php b/module/metric/test/calc/system/scale/scale_of_monthly_delivered_story.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/scale_of_monthly_finished_story.php b/module/metric/test/calc/system/scale/scale_of_monthly_finished_story.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/scale_of_story.php b/module/metric/test/calc/system/scale/scale_of_story.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/scale_of_valid_story.php b/module/metric/test/calc/system/scale/scale_of_valid_story.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/system/scale/scale_of_weekly_finished_story.php b/module/metric/test/calc/system/scale/scale_of_weekly_finished_story.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/user/scale/count_of_assigned_bug_in_user.php b/module/metric/test/calc/user/scale/count_of_assigned_bug_in_user.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/user/scale/count_of_assigned_feedback_in_user.php b/module/metric/test/calc/user/scale/count_of_assigned_feedback_in_user.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/user/scale/count_of_assigned_task_in_user.php b/module/metric/test/calc/user/scale/count_of_assigned_task_in_user.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/user/scale/count_of_daily_finished_task_in_user.php b/module/metric/test/calc/user/scale/count_of_daily_finished_task_in_user.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/user/scale/count_of_daily_fixed_bug_in_user.php b/module/metric/test/calc/user/scale/count_of_daily_fixed_bug_in_user.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/user/scale/count_of_daily_review_feedback_in_user.php b/module/metric/test/calc/user/scale/count_of_daily_review_feedback_in_user.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/user/scale/count_of_daily_review_story_in_user.php b/module/metric/test/calc/user/scale/count_of_daily_review_story_in_user.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/user/scale/count_of_pending_story_in_user.php b/module/metric/test/calc/user/scale/count_of_pending_story_in_user.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/user/scale/count_of_reviewing_feedback_in_user.php b/module/metric/test/calc/user/scale/count_of_reviewing_feedback_in_user.php old mode 100644 new mode 100755 diff --git a/module/metric/test/calc/user/scale/count_of_reviewing_story_in_user.php b/module/metric/test/calc/user/scale/count_of_reviewing_story_in_user.php old mode 100644 new mode 100755 diff --git a/module/metric/test/groupData/notime.php b/module/metric/test/groupData/notime.php new file mode 100644 index 0000000000..fa964ad1b7 --- /dev/null +++ b/module/metric/test/groupData/notime.php @@ -0,0 +1,18 @@ + 'value', 'title' => '数值', 'width' => 96); +$resultHeader[] = array('name' => 'calcTime', 'title' => '采集时间', 'width' => 128); + +$resultData[] = (object) array('value' => 2, 'calcTime' => '2021-11-23 0:01'); +$resultData[] = (object) array('value' => 2, 'calcTime' => '2021-12-22 1:23'); +$resultData[] = (object) array('value' => 2, 'calcTime' => '2021-12-23 1:11'); +$resultData[] = (object) array('value' => 2, 'calcTime' => '2022-9-23 2:22'); +$resultData[] = (object) array('value' => 2, 'calcTime' => '2022-10-23 0:01'); +$resultData[] = (object) array('value' => 2, 'calcTime' => '2022-11-23 0:00'); +$resultData[] = (object) array('value' => 3, 'calcTime' => '2023-10-21 0:02'); +$resultData[] = (object) array('value' => 1, 'calcTime' => '2023-11-23 0:00'); diff --git a/module/metric/test/groupData/notimeobject.php b/module/metric/test/groupData/notimeobject.php new file mode 100644 index 0000000000..18be3d72f1 --- /dev/null +++ b/module/metric/test/groupData/notimeobject.php @@ -0,0 +1,20 @@ + 'scope', 'title' => '项目名称', 'width' => 96); +$resultHeader[] = array('name' => 'value', 'title' => '数值', 'width' => 96); +$resultHeader[] = array('name' => 'calcTime', 'title' => '采集时间', 'width' => 128); + +$resultData[] = (object) array('scope' => '企业管理系统', 'scopeID' => 7, 'value' => 739245, 'calcTime' => '2023-11-24 9:20'); +$resultData[] = (object) array('scope' => '开源', 'scopeID' => 8, 'value' => 1992, 'calcTime' => '2023-11-24 9:20'); +$resultData[] = (object) array('scope' => '项目型项目', 'scopeID' => 9, 'value' => 19684, 'calcTime' => '2023-11-24 9:20'); + +$resultData[] = (object) array('scope' => '企业管理系统', 'scopeID' => 7, 'value' => 739225, 'calcTime' => '2023-11-23 9:20'); +$resultData[] = (object) array('scope' => '开源', 'scopeID' => 8, 'value' => 1993, 'calcTime' => '2023-11-23 9:20'); + +$resultData[] = (object) array('scope' => '企业管理系统', 'scopeID' => 7, 'value' => 7325, 'calcTime' => '2022-11-23 9:20'); +$resultData[] = (object) array('scope' => '开源', 'scopeID' => 8, 'value' => 3, 'calcTime' => '2022-11-23 9:20'); diff --git a/module/metric/test/groupData/object-year.php b/module/metric/test/groupData/object-year.php new file mode 100644 index 0000000000..e6062f29f4 --- /dev/null +++ b/module/metric/test/groupData/object-year.php @@ -0,0 +1,17 @@ + 'scope', 'title' => '产品名称', 'width' => 160); +$resultHeader[] = array('name' => 'date', 'title' => '日期', 'width' => 96); +$resultHeader[] = array('name' => 'value', 'title' => '数值', 'width' => 96); +$resultHeader[] = array('name' => 'calcTime', 'title' => '采集时间', 'width' => 128); + +$resultData[] = (object) array('date' => '2021年', 'dateString' => '2021', 'dateType' => 'year', 'scope' => '开源', 'value' => 1, 'calcTime' => '2021-11-23 0:23'); +$resultData[] = (object) array('date' => '2021年', 'dateString' => '2021', 'dateType' => 'year', 'scope' => 'ddddw', 'value' => 3, 'calcTime' => '2021-11-23 0:23'); +$resultData[] = (object) array('date' => '2022年', 'dateString' => '2022', 'dateType' => 'year', 'scope' => '开源', 'value' => 2, 'calcTime' => '2022-11-23 0:23'); +$resultData[] = (object) array('date' => '2022年', 'dateString' => '2022', 'dateType' => 'year', 'scope' => 'ddddw', 'value' => 9, 'calcTime' => '2022-11-23 0:23'); +$resultData[] = (object) array('date' => '2023年', 'dateString' => '2023', 'dateType' => 'year', 'scope' => '开源', 'value' => 3, 'calcTime' => '2023-11-23 0:23'); diff --git a/module/metric/test/groupData/time-day.php b/module/metric/test/groupData/time-day.php new file mode 100644 index 0000000000..839c46c61b --- /dev/null +++ b/module/metric/test/groupData/time-day.php @@ -0,0 +1,24 @@ + 'date', 'title' => '日期', 'width' => 96); +$resultHeader[] = array('name' => 'value', 'title' => '数值', 'width' => 96); +$resultHeader[] = array('name' => 'calcTime', 'title' => '采集时间', 'width' => 128); + +$resultData[] = (object) array('date' => '2021-11-12', 'dateString' => '2021-11-12', 'dateType' => 'day', 'value' => 1, 'calcTime' => '2021-11-23 0:23'); +$resultData[] = (object) array('date' => '2022-11-12', 'dateString' => '2022-11-12', 'dateType' => 'day', 'value' => 1, 'calcTime' => '2021-11-23 0:23'); +$resultData[] = (object) array('date' => '2022-12-11', 'dateString' => '2022-12-11', 'dateType' => 'day', 'value' => 1, 'calcTime' => '2021-11-23 0:23'); +$resultData[] = (object) array('date' => '2023-1-12', 'dateString' => '2023-1-12', 'dateType' => 'day', 'value' => 1, 'calcTime' => '2021-11-23 0:23'); +$resultData[] = (object) array('date' => '2023-10-12', 'dateString' => '2023-10-12', 'dateType' => 'day', 'value' => 1, 'calcTime' => '2021-11-23 0:23'); +$resultData[] = (object) array('date' => '2023-10-13', 'dateString' => '2023-10-13', 'dateType' => 'day', 'value' => 1, 'calcTime' => '2021-11-23 0:23'); +$resultData[] = (object) array('date' => '2023-10-14', 'dateString' => '2023-10-14', 'dateType' => 'day', 'value' => 1, 'calcTime' => '2021-11-23 0:23'); +$resultData[] = (object) array('date' => '2023-10-15', 'dateString' => '2023-10-15', 'dateType' => 'day', 'value' => 1, 'calcTime' => '2021-11-23 0:23'); +$resultData[] = (object) array('date' => '2023-10-18', 'dateString' => '2023-10-18', 'dateType' => 'day', 'value' => 1, 'calcTime' => '2021-11-23 0:23'); +$resultData[] = (object) array('date' => '2023-10-19', 'dateString' => '2023-10-19', 'dateType' => 'day', 'value' => 1, 'calcTime' => '2021-11-23 0:23'); +$resultData[] = (object) array('date' => '2023-10-20', 'dateString' => '2023-10-20', 'dateType' => 'day', 'value' => 1, 'calcTime' => '2021-11-23 0:23'); +$resultData[] = (object) array('date' => '2023-11-12', 'dateString' => '2023-11-12', 'dateType' => 'day', 'value' => 1, 'calcTime' => '2021-11-23 0:23'); +$resultData[] = (object) array('date' => '2023-11-13', 'dateString' => '2023-11-13', 'dateType' => 'day', 'value' => 1, 'calcTime' => '2021-11-23 0:23'); diff --git a/module/metric/test/groupData/time-month.php b/module/metric/test/groupData/time-month.php new file mode 100644 index 0000000000..53fa8bb874 --- /dev/null +++ b/module/metric/test/groupData/time-month.php @@ -0,0 +1,20 @@ + 'date', 'title' => '日期', 'width' => 96); +$resultHeader[] = array('name' => 'value', 'title' => '数值', 'width' => 96); +$resultHeader[] = array('name' => 'calcTime', 'title' => '采集时间', 'width' => 128); + +$resultData[] = (object) array('date' => '2021年11月', 'dateString' => '2021-11', 'dateType' => 'month', 'value' => 1, 'calcTime' => '2021-11-23 0:23'); +$resultData[] = (object) array('date' => '2022年11月', 'dateString' => '2022-11', 'dateType' => 'month', 'value' => 2, 'calcTime' => '2022-11-23 0:23'); +$resultData[] = (object) array('date' => '2023年5月', 'dateString' => '2023-5', 'dateType' => 'month', 'value' => 3, 'calcTime' => '2023-11-23 0:23'); +$resultData[] = (object) array('date' => '2023年6月', 'dateString' => '2023-6', 'dateType' => 'month', 'value' => 2, 'calcTime' => '2023-11-23 0:23'); +$resultData[] = (object) array('date' => '2023年7月', 'dateString' => '2023-7', 'dateType' => 'month', 'value' => 1, 'calcTime' => '2023-11-23 0:23'); +$resultData[] = (object) array('date' => '2023年8月', 'dateString' => '2023-8', 'dateType' => 'month', 'value' => 3, 'calcTime' => '2023-11-23 0:23'); +$resultData[] = (object) array('date' => '2023年9月', 'dateString' => '2023-9', 'dateType' => 'month', 'value' => 4, 'calcTime' => '2023-11-23 0:23'); +$resultData[] = (object) array('date' => '2023年10月', 'dateString' => '2023-10', 'dateType' => 'month', 'value' => 5, 'calcTime' => '2023-11-23 0:23'); +$resultData[] = (object) array('date' => '2023年11月', 'dateString' => '2023-11', 'dateType' => 'month', 'value' => 3, 'calcTime' => '2023-11-23 0:23'); diff --git a/module/metric/test/groupData/time-week.php b/module/metric/test/groupData/time-week.php new file mode 100644 index 0000000000..fbf3c49112 --- /dev/null +++ b/module/metric/test/groupData/time-week.php @@ -0,0 +1,20 @@ + 'date', 'title' => '日期', 'width' => 96); +$resultHeader[] = array('name' => 'value', 'title' => '数值', 'width' => 96); +$resultHeader[] = array('name' => 'calcTime', 'title' => '采集时间', 'width' => 128); + +$resultData[] = (object) array('date' => '2021年11周', 'dateString' => '2021-11', 'dateType' => 'week', 'value' => 1, 'calcTime' => '2021-11-23 0:23'); +$resultData[] = (object) array('date' => '2022年11周', 'dateString' => '2022-11', 'dateType' => 'week', 'value' => 2, 'calcTime' => '2022-11-23 0:23'); +$resultData[] = (object) array('date' => '2023年5周', 'dateString' => '2023-5', 'dateType' => 'week', 'value' => 3, 'calcTime' => '2023-11-23 0:23'); +$resultData[] = (object) array('date' => '2023年6周', 'dateString' => '2023-6', 'dateType' => 'week', 'value' => 2, 'calcTime' => '2023-11-23 0:23'); +$resultData[] = (object) array('date' => '2023年7周', 'dateString' => '2023-7', 'dateType' => 'week', 'value' => 1, 'calcTime' => '2023-11-23 0:23'); +$resultData[] = (object) array('date' => '2023年8周', 'dateString' => '2023-8', 'dateType' => 'week', 'value' => 3, 'calcTime' => '2023-11-23 0:23'); +$resultData[] = (object) array('date' => '2023年9周', 'dateString' => '2023-9', 'dateType' => 'week', 'value' => 4, 'calcTime' => '2023-11-23 0:23'); +$resultData[] = (object) array('date' => '2023年10周', 'dateString' => '2023-10', 'dateType' => 'week', 'value' => 5, 'calcTime' => '2023-11-23 0:23'); +$resultData[] = (object) array('date' => '2023年11周', 'dateString' => '2023-11', 'dateType' => 'week', 'value' => 3, 'calcTime' => '2023-11-23 0:23'); diff --git a/module/metric/test/groupData/time-year.php b/module/metric/test/groupData/time-year.php new file mode 100644 index 0000000000..5a8112853a --- /dev/null +++ b/module/metric/test/groupData/time-year.php @@ -0,0 +1,14 @@ + 'date', 'title' => '日期', 'width' => 96); +$resultHeader[] = array('name' => 'value', 'title' => '数值', 'width' => 96); +$resultHeader[] = array('name' => 'calcTime', 'title' => '采集时间', 'width' => 128); + +$resultData[] = (object) array('date' => '2021年', 'dateString' => '2021', 'dateType' => 'year', 'value' => 1, 'calcTime' => '2021-11-23 0:23'); +$resultData[] = (object) array('date' => '2022年', 'dateString' => '2022', 'dateType' => 'year', 'value' => 2, 'calcTime' => '2022-11-23 0:23'); +$resultData[] = (object) array('date' => '2023年', 'dateString' => '2023', 'dateType' => 'year', 'value' => 3, 'calcTime' => '2023-11-23 0:23'); diff --git a/module/metric/ui/ajaxgetmetricsidetree.html.php b/module/metric/ui/ajaxgetmetricsidetree.html.php new file mode 100644 index 0000000000..269d35f545 --- /dev/null +++ b/module/metric/ui/ajaxgetmetricsidetree.html.php @@ -0,0 +1,41 @@ + + * @package company + * @link https://www.zentao.net + */ +namespace zin; + +$metricTrees = array(); +foreach($groupMetrics as $key => $metrics) +{ + if(empty($metrics)) continue; + $metricCheckItems = array(); + foreach($metrics as $metric) + { + $class = in_array($metric->id, $checkedList) ? 'metric-current' : ''; + $class .= ' font-medium checkbox'; + $metricCheckItems[] = item + ( + set::text($metric->name), + set::value($metric->id), + set::scope($metric->scope), + set::typeClass($class), + set::checked(in_array($metric->id, $checkedList)), + bind::change('window.handleCheckboxChange($element)') + ); + } + $metricTrees[] = div(setClass('check-list-title') ,$this->lang->metric->objectList[$key]); + $metricTrees[] = checkList + ( + set::className('check-list-metric'), + set::primary(true), + set::name('metric'), + set::inline(false), + $metricCheckItems + ); +} diff --git a/module/metric/ui/ajaxgetmultiplemetricbox.html.php b/module/metric/ui/ajaxgetmultiplemetricbox.html.php new file mode 100644 index 0000000000..f28da1b330 --- /dev/null +++ b/module/metric/ui/ajaxgetmultiplemetricbox.html.php @@ -0,0 +1,230 @@ + + * @package company + * @link https://www.zentao.net + */ +namespace zin; + +$metricID = $metric->id; + +$fnGenerateQueryForm = function() use($metricRecordType, $metric, $metricID, $dateLabels, $defaultDate) +{ + if(!$metricRecordType) return null; + $formGroups = array(); + if($metric->scope != 'system') $objectPairs = $this->metric->getPairsByScope($metric->scope); + + if($metricRecordType == 'scope' || $metricRecordType == 'scope-date') + { + $formGroups[] = formGroup + ( + setClass('query-inline picker-nowrap w-40'), + set::label($this->lang->metric->query->scope[$metric->scope]), + set::name('scope_' . $metricID), + set::control(array('type' => 'picker', 'multiple' => true)), + set::items($objectPairs), + set::placeholder($this->lang->metric->placeholder->{$metric->scope}) + ); + } + + if($metricRecordType == 'scope' || $metricRecordType == 'system') + { + $btnLabels = array(); + foreach($this->lang->metric->query->dayLabels as $key => $label) + { + $active = $key == '7' ? ' selected' : ''; + $btnLabels[] = btn + ( + setClass("$active default w-16 p-0"), + set::key($key), + $label + ); + } + $formGroups[] = formGroup + ( + setClass('query-calc-date query-inline w-64'), + btngroup + ( + $btnLabels + ), + on::click('.query-calc-date button.btn', 'window.handleCalcDateClick(target)'), + ); + } + + if($metricRecordType == 'date' || $metricRecordType == 'scope-date') + { + $btnLabels = array(); + foreach($dateLabels as $key => $label) + { + $active = $key == $defaultDate ? ' selected' : ''; + $btnLabels[] = btn + ( + setClass("$active default w-16 p-0"), + set::key($key), + $label + ); + } + $formGroups[] = formGroup + ( + setClass('query-date query-inline w-64'), + btngroup + ( + $btnLabels + ), + on::click('.query-date button.btn', 'window.handleDateLabelClick(target)'), + ); + + $formGroups[] = formGroup + ( + setClass('query-inline w-80'), + // set::label($this->lang->metric->date), + inputGroup + ( + datePicker + ( + setClass('query-date-picker'), + set::name('dateBegin'), + set('id', 'dateBegin' . $metricID), + set::placeholder($this->lang->metric->placeholder->select) + ), + $this->lang->metric->to, + datePicker + ( + setClass('query-date-picker'), + set::name('dateEnd'), + set('id', 'dateEnd' . $metricID), + set::placeholder($this->lang->metric->placeholder->select) + ) + ), + on::change('.query-date-picker', 'window.handleDatePickerChange(target)'), + ); + } + + return form + ( + set::id('queryForm' . $metricID), + setClass('ml-4'), + formRow + ( + set::width('max'), + $formGroups, + !empty($formGroups) ? formGroup + ( + setClass('query-btn'), + btn + ( + setClass('btn secondary'), + set::text($this->lang->metric->query->action), + set::onclick("window.handleQueryClick($metricID, 'multiple')") + ) + ) : null + ), + set::actions(array()) + ); +}; + +div +( + set::id('metricBox' . $metricID), + set('metric-id', $metricID), + setClass('metricBox'), + div + ( + setClass('metric-name metric-name-notfirst flex flex-between items-center'), + div + ( + span + ( + setClass('metric-name-weight'), + $metric->name + ) + ), + div + ( + setClass('flex-start'), + toolbar + ( + haspriv('metric', 'details') ? item(set(array + ( + 'text' => $this->lang->metric->details, + 'class' => 'ghost details', + 'url' => helper::createLink('metric', 'details', "metricID=$metricID"), + 'data-toggle' => 'modal' + ))) : null, + item(set(array + ( + 'text' => $this->lang->metric->remove, + 'class' => 'ghost metric-remove', + 'onclick' => "window.handleRemoveLabel($metricID)" + ))), + haspriv('metric', 'filters') ? item(set(array + ( + 'icon' => 'menu-backend', + 'text' => $this->lang->metric->filters, + 'class' => 'ghost hidden', + 'url' => '#' + ))) : null, + haspriv('metric', 'zAnalysis') ? item(set(array + ( + 'icon' => 'chart-line', + 'text' => $this->lang->metric->zAnalysis, + 'class' => 'ghost chart-line-margin hidden', + 'url' => '#' + ))) : null + ) + ) + ), + $fnGenerateQueryForm(), + div + ( + setClass('table-and-chart table-and-chart-multiple'), + div + ( + setClass('table-side'), + setStyle(array('flex-basis' => $tableWidth . 'px')), + div + ( + $groupData ? dtable + ( + set::height(310), + set::bordered(true), + set::cols($groupHeader), + set::data(array_values($groupData)), + ($metricRecordType == 'scope' || $metricRecordType == 'scope-date') ? set::footPager(usePager('dtablePager')) : null, + $headerGroup ? set::plugins(array('header-group')) : null, + set::onRenderCell(jsRaw('window.renderDTableCell')) + ) : null + ) + ), + div + ( + setClass('chart-side'), + div + ( + setClass('chart-type'), + $echartOptions ? picker + ( + set::name('chartType'), + set::items($chartTypeList), + set::value('line'), + set::required(true), + set::onchange("window.handleChartTypeChange($metricID, 'multiple')") + ) : null + ), + div + ( + setClass('chart chart-multiple'), + $echartOptions ? echarts + ( + set::xAxis($echartOptions['xAxis']), + set::yAxis($echartOptions['yAxis']), + set::series($echartOptions['series']) + )->size('100%', '100%') : null + ) + ) + ) +); diff --git a/module/metric/ui/ajaxgettableandcharts.html.php b/module/metric/ui/ajaxgettableandcharts.html.php new file mode 100644 index 0000000000..67188d5600 --- /dev/null +++ b/module/metric/ui/ajaxgettableandcharts.html.php @@ -0,0 +1,60 @@ + + * @package company + * @link https://www.zentao.net + */ +namespace zin; + +div +( + setClass("table-and-chart table-and-chart-{$viewType}"), + div + ( + setClass('table-side'), + setStyle(array('flex-basis' => $tableWidth . 'px')), + div + ( + $groupData ? dtable + ( + $viewType == 'multiple' ? set::height(310) : null, + set::bordered(true), + set::cols($groupHeader), + set::data(array_values($groupData)), + ($metricRecordType == 'scope' || $metricRecordType == 'scope-date') ? set::footPager(usePager('dtablePager')) : null, + $headerGroup ? set::plugins(array('header-group')) : null, + set::onRenderCell(jsRaw('window.renderDTableCell')) + ) : null + ) + ), + div + ( + setClass('chart-side'), + div + ( + setClass('chart-type'), + $echartOptions ? picker + ( + set::name('chartType'), + set::items($chartTypeList), + set::value('line'), + set::required(true), + set::onchange("window.handleChartTypeChange($metric->id, '$viewType')") + ) : null + ), + div + ( + setClass("chart chart-{$viewType}"), + $echartOptions ? echarts + ( + set::xAxis($echartOptions['xAxis']), + set::yAxis($echartOptions['yAxis']), + set::series($echartOptions['series']) + )->size('100%', '100%') : null + ) + ) +); diff --git a/module/metric/ui/browse.html.php b/module/metric/ui/browse.html.php old mode 100644 new mode 100755 index 8da7cf6c32..0cfe1028d4 --- a/module/metric/ui/browse.html.php +++ b/module/metric/ui/browse.html.php @@ -28,7 +28,7 @@ $fnGenerateScopeMenu = function() use ($scope, $scopeText, $scopeList) set::caret(false), set::popWidth(200), set::popClass('popup text-md'), - set::data(array('search' => false, 'checkIcon' => false, 'link' => $link, 'data' => $scopeList)), + set::data(array('search' => false, 'checkIcon' => false, 'link' => $link, 'data' => $scopeList)) ); }; @@ -37,7 +37,7 @@ featureBar to::before($fnGenerateScopeMenu($scope, $scopeText, $scopeList)), set::current($stage), set::linkParams("scope=$scope&status={key}¶m=$param&type=$type"), - li(searchToggle(set::open($type == 'bysearch'), set::module('metric'))), + li(searchToggle(set::open($type == 'bysearch'), set::module('metric'))) ); toolbar @@ -47,11 +47,11 @@ toolbar ( setClass('btn primary-outline'), set::url(helper::createLink('metric', 'preview')), - $lang->metric->exitManage, + $lang->metric->exitManage ), common::hasPriv('metric', 'create') ? div ( - setClass('btn-divider'), + setClass('btn-divider') ) : null, common::hasPriv('metric', 'create') ? btn ( @@ -60,7 +60,7 @@ toolbar set::url(helper::createLink('metric', 'create')), set('data-toggle', 'modal'), $lang->metric->create - ) : null, + ) : null ); sidebar @@ -70,7 +70,7 @@ sidebar 'modules' => $metricTree, 'activeKey' => $type == 'byTree' ? $param : 0, 'closeLink' => $closeLink, - 'showDisplay' => false, + 'showDisplay' => false ))) ); @@ -83,7 +83,7 @@ dtable set::cols($this->config->metric->dtable->definition->fieldList), set::data($tableData), set::onRenderCell(jsRaw('window.onRenderCell')), - set::footPager(usePager()), + set::footPager(usePager()) ); render(); diff --git a/module/metric/ui/create.html.php b/module/metric/ui/create.html.php index 87106381f4..923e31c7af 100644 --- a/module/metric/ui/create.html.php +++ b/module/metric/ui/create.html.php @@ -46,19 +46,19 @@ formPanel set::items($lang->metric->purposeList), set::value('scale'), set::required(true) - ), + ) ), formGroup ( set::label($lang->metric->name), set::name('name'), - set::required(true), + set::required(true) ), formGroup ( set::label($lang->metric->code), set::name('code'), - set::required(true), + set::required(true) ), formRow ( @@ -75,7 +75,7 @@ formPanel picker ( set::name('unit'), - set::items($lang->metric->unitList), + set::items($lang->metric->unitList) ) ), div @@ -84,7 +84,7 @@ formPanel checkbox ( set::name('customUnit'), - set::text($lang->metric->customUnit), + set::text($lang->metric->customUnit) ) ) ) @@ -103,7 +103,7 @@ formPanel div ( setClass('grow'), - input(set::name('addunit')), + input(set::name('addunit')) ), div ( @@ -111,7 +111,7 @@ formPanel checkbox ( set::name('customUnit'), - set::text($lang->metric->customUnit), + set::text($lang->metric->customUnit) ) ) ) @@ -123,14 +123,14 @@ formPanel set::label($lang->metric->desc), set::control(array('type' => 'textarea', 'rows' => 3)), set::name('desc'), - set::placeholder($lang->metric->descTip), + set::placeholder($lang->metric->descTip) ), formGroup ( set::label($lang->metric->definition), set::control(array('type' => 'textarea', 'rows' => 3)), set::name('definition'), - set::placeholder($lang->metric->definitionTip), + set::placeholder($lang->metric->definitionTip) ), formGroup ( @@ -139,7 +139,7 @@ formPanel set::label($lang->metric->afterCreate), set::control(array('type' => 'radioList', 'inline' => true)), set::items($lang->metric->afterCreateList), - set::value('implement'), + set::value('implement') ), - set::submitBtnText($lang->save), + set::submitBtnText($lang->save) ); diff --git a/module/metric/ui/details.html.php b/module/metric/ui/details.html.php index 77acdf66e7..6b76aa1a0a 100644 --- a/module/metric/ui/details.html.php +++ b/module/metric/ui/details.html.php @@ -25,7 +25,7 @@ $buildItems = function($items): array !empty($item['attr']) && is_array($item['attr']) ? set($item['attr']) : null, html($item['text']) ) : html($item['text']), - set::collapse(!empty($item['text'])), + set::collapse(!empty($item['text'])) ); } @@ -40,8 +40,8 @@ detailHeader ( set::level(1), set::text($lang->metric->details) - ), - ), + ) + ) ); panel @@ -58,14 +58,14 @@ panel $lang->metric->legendBasicInfo, setClass('gray-pale text-md font-bold') - ), + ) ), div ( tableData ( - $buildItems($legendBasic), - ), + $buildItems($legendBasic) + ) ), h1 ( @@ -74,16 +74,16 @@ panel ( $lang->metric->legendCreateInfo, setClass('gray-pale text-md font-bold') - ), + ) ), div ( tableData ( - $buildItems($createEditInfo), - ), - ), - ), + $buildItems($createEditInfo) + ) + ) + ) ); render(); diff --git a/module/metric/ui/edit.html.php b/module/metric/ui/edit.html.php index 10d4824992..cb08329311 100644 --- a/module/metric/ui/edit.html.php +++ b/module/metric/ui/edit.html.php @@ -20,7 +20,7 @@ $afterEdit = $isDisabled ? '' : formGroup set::label($lang->metric->afterCreate), set::control(array('type' => 'radioList', 'inline' => true)), set::items($lang->metric->afterCreateList), - set::value('implement'), + set::value('implement') ); formPanel @@ -41,7 +41,7 @@ formPanel set::items($lang->metric->scopeList), set::value($metric->scope), set::required(true), - set::disabled($isDisabled), + set::disabled($isDisabled) ), formGroup ( @@ -51,7 +51,7 @@ formPanel set::items($lang->metric->objectList), set::value($metric->object), set::required(true), - set::disabled($isDisabled), + set::disabled($isDisabled) ), formGroup ( @@ -61,15 +61,15 @@ formPanel set::items($lang->metric->purposeList), set::value($metric->purpose), set::required(true), - set::disabled($isDisabled), - ), + set::disabled($isDisabled) + ) ), formGroup ( set::label($lang->metric->name), set::name('name'), set::value($metric->name), - set::required(true), + set::required(true) ), formGroup ( @@ -77,7 +77,7 @@ formPanel set::name('code'), set::value($metric->code), set::required(true), - set::disabled($isDisabled), + set::disabled($isDisabled) ), formRow ( @@ -97,7 +97,7 @@ formPanel set::name('unit'), set::items($lang->metric->unitList), set::value($isCustomUnit ? '' : $metric->unit), - set::disabled($isDisabled), + set::disabled($isDisabled) ) ), div @@ -108,7 +108,7 @@ formPanel set::name('customUnit'), set::text($lang->metric->customUnit), set::checked($isCustomUnit), - set::disabled($isDisabled), + set::disabled($isDisabled) ) ) ) @@ -127,7 +127,7 @@ formPanel div ( setClass('grow'), - input(set::name('addunit'), set::value($isCustomUnit ? $metric->unit : '')), + input(set::name('addunit'), set::value($isCustomUnit ? $metric->unit : '')) ), div ( @@ -136,7 +136,7 @@ formPanel ( set::name('customUnit'), set::text($lang->metric->customUnit), - set::checked($isCustomUnit), + set::checked($isCustomUnit) ) ) ) @@ -149,7 +149,7 @@ formPanel set::control(array('type' => 'textarea', 'rows' => 3)), set::name('desc'), set::value($metric->desc), - set::placeholder($lang->metric->descTip), + set::placeholder($lang->metric->descTip) ), formGroup ( @@ -158,8 +158,8 @@ formPanel set::name('definition'), set::value($metric->definition), set::placeholder($lang->metric->definitionTip), - set::disabled($isDisabled), + set::disabled($isDisabled) ), $afterEdit, - set::submitBtnText($lang->save), + set::submitBtnText($lang->save) ); diff --git a/module/metric/ui/emptycollect.html.php b/module/metric/ui/emptycollect.html.php index 20b6a94c7b..068c0b1d21 100644 --- a/module/metric/ui/emptycollect.html.php +++ b/module/metric/ui/emptycollect.html.php @@ -14,7 +14,7 @@ featureBar ( set::load(''), set::current($scope), - set::linkParams("scope={key}"), + set::linkParams("scope={key}") ); div @@ -24,8 +24,8 @@ div ( set::cols(array()), set::data(array()), - set::emptyTip($lang->metric->emptyCollect), - ), + set::emptyTip($lang->metric->emptyCollect) + ) ); render(); diff --git a/module/metric/ui/implement.html.php b/module/metric/ui/implement.html.php index 03f8f5a1ff..ba89c99dba 100644 --- a/module/metric/ui/implement.html.php +++ b/module/metric/ui/implement.html.php @@ -33,8 +33,8 @@ detailHeader )), set::text($lang->metric->implement->tip), setClass('label ghost') - ), - ), + ) + ) ); $fnGenerateInstructions = function() use($lang) @@ -46,7 +46,7 @@ $fnGenerateInstructions = function() use($lang) ( set::className('font-medium text-md'), setStyle('padding-top', '12px'), - html($tip), + html($tip) ); } @@ -70,7 +70,7 @@ $fnGenerateDataDisplay = function() use($resultData, $resultHeader, $lang, $metr ( set::className('card-title'), $lang->metric->objectList[$metric->object] - ), + ) ) ); @@ -79,7 +79,7 @@ $fnGenerateDataDisplay = function() use($resultData, $resultHeader, $lang, $metr ( set::height(400), set::cols($resultHeader), - set::data($resultData), + set::data($resultData) ); }; @@ -92,7 +92,7 @@ panel setClass('ghost btn-download'), $lang->metric->implement->downloadPHP, set::url(helper::createLink('metric', 'downloadTemplate', "metricID={$metric->id}")), - set::target('_blank'), + set::target('_blank') ), div ( @@ -104,12 +104,12 @@ panel $lang->metric->implement->instruction, setClass('gray-pale text-md font-bold') - ), + ) ), div ( setClass('leading-loose'), - $fnGenerateInstructions(), + $fnGenerateInstructions() ), h1 ( @@ -118,7 +118,7 @@ panel ( $lang->metric->verifyResult, setClass('gray-pale text-md font-bold') - ), + ) ), empty($result) ? div ( diff --git a/module/metric/ui/preview.html.php b/module/metric/ui/preview.html.php index 23b7572f6d..d4efb6a365 100644 --- a/module/metric/ui/preview.html.php +++ b/module/metric/ui/preview.html.php @@ -27,6 +27,7 @@ jsVar('errorDateRange', $lang->metric->errorDateRange); jsVar('errorCalcTimeRange', $lang->metric->errorCalcTimeRange); jsVar('queryScopeLang', $lang->metric->query->scope); jsVar('collectStar', $lang->metric->collectStar); +jsVar('dateType', $dateType); // jsVar('pager', usePager()); if($scope == 'collect' and empty($current)) diff --git a/module/metric/ui/previewmultiple.html.php b/module/metric/ui/previewmultiple.html.php index 03cfe78e28..5a6ec9234d 100644 --- a/module/metric/ui/previewmultiple.html.php +++ b/module/metric/ui/previewmultiple.html.php @@ -37,7 +37,7 @@ div ( setClass('gray-pale-div'), set('title', '{name}'), - '{name}', + '{name}' ), button ( @@ -45,10 +45,10 @@ div set('onclick', 'window.handleRemoveLabel({id})'), span ( - setClass('close'), - ), - ), - ), + setClass('close') + ) + ) + ) ); div @@ -68,8 +68,8 @@ div span ( setClass('metric-name-weight'), - "{name}", - ), + "{name}" + ) ), div ( @@ -80,7 +80,7 @@ div ( 'text' => $this->lang->metric->details, 'class' => 'ghost details', - 'url' => helper::createLink('metric', 'details', "metricID={id}"), + 'url' => helper::createLink('metric', 'details', "metricID=$current->id"), 'data-toggle' => 'modal' ))) : null, item(set(array @@ -94,17 +94,17 @@ div 'icon' => 'menu-backend', 'text' => $this->lang->metric->filters, 'class' => 'ghost hidden', - 'url' => '#', + 'url' => '#' ))) : null, haspriv('metric', 'zAnalysis') ? item(set(array ( 'icon' => 'chart-line', 'text' => $this->lang->metric->zAnalysis, 'class' => 'ghost chart-line-margin hidden', - 'url' => '#', - ))) : null, - ), - ), + 'url' => '#' + ))) : null + ) + ) ), div ( @@ -114,23 +114,23 @@ div setClass('table-side'), div ( - setClass('dtable'), - ), + setClass('dtable') + ) ), div ( setClass('chart-side'), div ( - setClass('chart-type'), + setClass('chart-type') ), div ( - setClass('chart chart-multiple'), + setClass('chart chart-multiple') ) ) - ), - ), + ) + ) ); $fnGenerateFilterPanel = function($code, $filterItem) use($lang) @@ -142,7 +142,7 @@ $fnGenerateFilterPanel = function($code, $filterItem) use($lang) ( 'class' => 'text-primary ghost', 'text' => sprintf($lang->metric->filter->clearAction, $lang->metric->filter->$code), - 'onclick' => 'window.handleFilterClearItem(this)', + 'onclick' => 'window.handleFilterClearItem(this)' ); return panel ( @@ -155,9 +155,9 @@ $fnGenerateFilterPanel = function($code, $filterItem) use($lang) set::primary(true), set::name($code), set::inline(true), - set::items($items), + set::items($items) ), - set::headingActions(array($removeAction)), + set::headingActions(array($removeAction)) ); }; @@ -181,7 +181,7 @@ nav span ( setClass('checked'), - ), + ) ), panel ( @@ -192,14 +192,14 @@ nav array ( array('type' => 'primary', 'text' => $lang->metric->filter->common, 'onclick' => 'window.handleFilterClick(this)'), - array('type' => 'default', 'text' => $lang->metric->filter->clear, 'onclick' => 'window.handleFilterClearAll(this)'), + array('type' => 'default', 'text' => $lang->metric->filter->clear, 'onclick' => 'window.handleFilterClearAll(this)') ) ), $fnGenerateFilterPanel('scope', $filterItems['scope']), $fnGenerateFilterPanel('object', $filterItems['object']), - $fnGenerateFilterPanel('purpose', $filterItems['purpose']), - ), - ), + $fnGenerateFilterPanel('purpose', $filterItems['purpose']) + ) + ) ); $firstScope = current(array_keys($this->lang->metric->featureBar['preview'])); @@ -212,37 +212,168 @@ toolbar set::icon('exchange'), set::iconClass('icon-18'), set::url(helper::createLink('metric', 'preview', "scope=$exchangeScope&viewType=single&metricID={$current->id}")), - $lang->metric->viewType->single, - ), + $lang->metric->viewType->single + ) /* common::hasPriv('metric', 'preview') ? btn ( setClass('btn primary'), set::url(helper::createLink('metric', 'browse')), $lang->metric->manage - ) : null, + ) : null */ ); -$metricCheckItems = array(); -foreach($metrics as $key => $metric) +$fnGenerateQueryForm = function() use($metricRecordType, $current, $dateLabels, $defaultDate) { - $class = $metric->id == $current->id ? 'metric-current' : ''; - $class .= " font-medium metric-{$metric->id} checkbox"; - $metricCheckItems[] = item + if(!$metricRecordType) return null; + $formGroups = array(); + if($current->scope != 'system') $objectPairs = $this->metric->getPairsByScope($current->scope); + + if($metricRecordType == 'scope' || $metricRecordType == 'scope-date') + { + $formGroups[] = formGroup + ( + setClass('query-inline picker-nowrap w-40'), + set::label($this->lang->metric->query->scope[$current->scope]), + set::name('scope_' . $current->id), + set::control(array('type' => 'picker', 'multiple' => true)), + set::items($objectPairs), + set::placeholder($this->lang->metric->placeholder->{$current->scope}) + ); + } + + if($metricRecordType == 'scope' || $metricRecordType == 'system') + { + $btnLabels = array(); + foreach($this->lang->metric->query->dayLabels as $key => $label) + { + $active = $key == '7' ? ' selected' : ''; + $btnLabels[] = btn + ( + setClass("$active default w-16 p-0"), + set::key($key), + $label + ); + } + $formGroups[] = formGroup + ( + setClass('query-calc-date query-inline w-64'), + btngroup + ( + $btnLabels + ), + on::click('.query-calc-date button.btn', 'window.handleCalcDateClick(target)'), + ); + } + + if($metricRecordType == 'date' || $metricRecordType == 'scope-date') + { + $btnLabels = array(); + foreach($dateLabels as $key => $label) + { + $active = $key == $defaultDate ? ' selected' : ''; + $btnLabels[] = btn + ( + setClass("$active default w-16 p-0"), + set::key($key), + $label + ); + } + $formGroups[] = formGroup + ( + setClass('query-date query-inline w-64'), + btngroup + ( + $btnLabels + ), + on::click('.query-date button.btn', 'window.handleDateLabelClick(target)'), + ); + + $formGroups[] = formGroup + ( + setClass('query-inline w-80'), + // set::label($this->lang->metric->date), + inputGroup + ( + datePicker + ( + setClass('query-date-picker'), + set::name('dateBegin'), + set('id', 'dateBegin' . $current->id), + set::placeholder($this->lang->metric->placeholder->select) + ), + $this->lang->metric->to, + datePicker + ( + setClass('query-date-picker'), + set::name('dateEnd'), + set('id', 'dateEnd' . $current->id), + set::placeholder($this->lang->metric->placeholder->select) + ) + ), + on::change('.query-date-picker', 'window.handleDatePickerChange(target)'), + ); + } + + return form ( - set::text($metric->name), - set::value($metric->id), - set::scope($metric->scope), - set::typeClass($class), - set::checked($metric->id == $current->id), - bind::change('window.handleCheckboxChange($element)'), + set::id('queryForm' . $current->id), + setClass('ml-4'), + formRow + ( + set::width('max'), + $formGroups, + !empty($formGroups) ? formGroup + ( + setClass('query-btn'), + btn + ( + setClass('btn secondary'), + set::text($this->lang->metric->query->action), + set::onclick("window.handleQueryClick($current->id, 'multiple')") + ) + ) : null + ), + set::actions(array()) ); +}; + + +$metricTrees = array(); +foreach($groupMetrics as $key => $metrics) +{ + if(empty($metrics)) continue; + $metricCheckItems = array(); + foreach($metrics as $metric) + { + $class = $metric->id == $current->id ? 'metric-current' : ''; + $class .= ' font-medium checkbox'; + $metricCheckItems[] = item + ( + set::text($metric->name), + set::value($metric->id), + set::scope($metric->scope), + set::typeClass($class), + set::checked($metric->id == $current->id), + bind::change('window.handleCheckboxChange($element)') + ); + } + $metricTrees[] = div(setClass('check-list-title') ,$this->lang->metric->objectList[$key]); + $metricTrees[] = checkList + ( + set::className('check-list-metric'), + set::primary(true), + set::name('metric'), + set::inline(false), + $metricCheckItems + ); } div ( - setClass('side'), + setClass('side sidebar sidebar-left'), + setStyle('overflow', 'visible'), div ( setClass('canvas'), @@ -253,26 +384,132 @@ div ( setClass('name-color side-title'), $metricList - ), + ) ), div ( setClass('metric-tree'), - checkList - ( - set::className('check-list-metric'), - set::primary(true), - set::name('metric'), - set::inline(false), - $metricCheckItems, - ), - ), + $metricTrees + ) ), + div + ( + on::click('.sidebar-gutter', 'window.toggleCollapsed()'), + setClass('sidebar-gutter gutter gutter-horz'), + button + ( + setClass('gutter-toggle'), + span(setClass('chevron-left')) + ) + ) +); + +$metricBoxs = div +( + set::id('metricBox' . $current->id), + set('metric-id', $current->id), + setClass('metricBox'), + div + ( + setClass('metric-name flex flex-between items-center'), + div + ( + span + ( + setClass('metric-name-weight'), + isset($current) ? $current->name : null + ) + ), + div + ( + setClass('flex-start'), + toolbar + ( + haspriv('metric', 'details') ? item(set(array + ( + 'text' => $this->lang->metric->details, + 'class' => 'ghost details', + 'url' => helper::createLink('metric', 'details', "metricID=$current->id"), + 'data-toggle' => 'modal' + ))) : null, + item(set(array + ( + 'text' => $this->lang->metric->remove, + 'class' => 'ghost metric-remove hidden', + 'onclick' => "window.handleRemoveLabel($current->id)" + ))), + haspriv('metric', 'filters') ? item(set(array + ( + 'icon' => 'menu-backend', + 'text' => $this->lang->metric->filters, + 'class' => 'ghost hidden', + 'url' => '#' + ))) : null, + haspriv('metric', 'zAnalysis') ? item(set(array + ( + 'icon' => 'chart-line', + 'text' => $this->lang->metric->zAnalysis, + 'class' => 'ghost chart-line-margin hidden', + 'url' => '#' + ))) : null + ) + ) + ), + $fnGenerateQueryForm(), + div + ( + setClass('table-and-chart table-and-chart-multiple'), + div + ( + setClass('table-side'), + setStyle(array('flex-basis' => $tableWidth . 'px')), + div + ( + $groupData ? dtable + ( + set::height(310), + set::bordered(true), + set::cols($groupHeader), + set::data(array_values($groupData)), + ($metricRecordType == 'scope' || $metricRecordType == 'scope-date') ? set::footPager(usePager('dtablePager')) : null, + $headerGroup ? set::plugins(array('header-group')) : null, + set::onRenderCell(jsRaw('window.renderDTableCell')) + ) : null + ) + ), + div + ( + setClass('chart-side'), + div + ( + setClass('chart-type'), + $echartOptions ? picker + ( + set::name('chartType'), + set::items($chartTypeList), + set::value('line'), + set::required(true), + set::onchange("window.handleChartTypeChange($current->id, 'multiple')") + ) : null + ), + div + ( + setClass('chart chart-multiple'), + $echartOptions ? echarts + ( + set::xAxis($echartOptions['xAxis']), + set::yAxis($echartOptions['yAxis']), + set::series($echartOptions['series']), + )->size('100%', '100%') : null + ) + ) + ) ); div ( setClass('main'), + setStyle('flex', 'auto'), div ( setClass('canvas'), @@ -285,7 +522,7 @@ div cell ( setClass('checked-label-content'), - set::flex('auto'), + set::flex('auto') ), cell ( @@ -297,184 +534,25 @@ div span ( setClass('checked-tip'), - html(sprintf($lang->metric->selectCount, 1)), + html(sprintf($lang->metric->selectCount, 1)) ), btn ( setClass('btn ghost square size-sm rounded primary-hover-500 dropdown-icon visibility-hidden'), set::icon('angle-double-right'), - set::iconClass('icon-18'), + set::iconClass('icon-18') ), - on::click('.dropdown-icon', 'setDropDown()'), - ), - ), - ), + on::click('.dropdown-icon', 'setDropDown()') + ) + ) + ) ), div ( setClass('table-and-charts'), - div - ( - set::id('metricBox' . $current->id), - set('metric-id', $current->id), - setClass('metricBox'), - div - ( - setClass('metric-name flex flex-between items-center'), - div - ( - span - ( - setClass('metric-name-weight'), - isset($current) ? $current->name : null, - ), - ), - div - ( - setClass('flex-start'), - toolbar - ( - haspriv('metric', 'details') ? item(set(array - ( - 'text' => $this->lang->metric->details, - 'class' => 'ghost details', - 'url' => helper::createLink('metric', 'details', "metricID=$current->id"), - 'data-toggle' => 'modal' - ))) : null, - item(set(array - ( - 'text' => $this->lang->metric->remove, - 'class' => 'ghost metric-remove hidden', - 'onclick' => "window.handleRemoveLabel($current->id)" - ))), - haspriv('metric', 'filters') ? item(set(array - ( - 'icon' => 'menu-backend', - 'text' => $this->lang->metric->filters, - 'class' => 'ghost hidden', - 'url' => '#', - ))) : null, - haspriv('metric', 'zAnalysis') ? item(set(array - ( - 'icon' => 'chart-line', - 'text' => $this->lang->metric->zAnalysis, - 'class' => 'ghost chart-line-margin hidden', - 'url' => '#', - ))) : null, - ), - ), - ), - div - ( - setClass('table-and-chart table-and-chart-multiple'), - div - ( - setClass('table-side'), - div - ( - setClass('dtable'), - ) - ), - div - ( - setClass('chart-side'), - div - ( - setClass('chart-type'), - ), - div - ( - setClass('chart chart-multiple'), - ) - ), - ), - ), - ), - ), -); - -form -( - set::id('queryFormTpl'), - setClass('hidden'), - formRow - ( - set::width('full'), - formGroup - ( - setClass('query-inline query-scope hidden picker-nowrap'), - set::width('248px'), - set::label($this->lang->metric->scope), - set::name('scope'), - set::items(array()), - ), - formGroup - ( - setClass('query-inline query-date-range hidden'), - set::width('360px'), - set::label($this->lang->metric->date), - inputGroup - ( - datePicker - ( - set::name('dateBegin'), - set('id', 'dateBegin'), - ), - $this->lang->metric->to, - datePicker - ( - set::name('dateEnd'), - set('id', 'dateEnd'), - ), - ), - ), - formGroup - ( - setClass('query-inline query-calc-time-range hidden'), - set::width('360px'), - set::label($this->lang->metric->calcTime), - inputGroup - ( - datePicker - ( - set::name('calcBegin'), - set('id', 'calcBegin'), - ), - $this->lang->metric->to, - datePicker - ( - set::name('calcEnd'), - set('id', 'calcEnd'), - ), - ), - ), - formGroup - ( - setClass('query-inline query-calc-time hidden'), - set::width('200px'), - set::label($this->lang->metric->calcTime), - inputGroup - ( - datePicker - ( - set::name('calcTime'), - set('id', 'calcTime'), - set::required(true), - set::value(helper::today()), - ), - ), - ), - formGroup - ( - setClass('query-btn'), - btn - ( - setClass('btn secondary'), - set::text($this->lang->metric->query->action), - ), + $metricBoxs ) - ), - set::actions(array()), + ) ); render(); diff --git a/module/metric/ui/previewsingle.html.php b/module/metric/ui/previewsingle.html.php index 893b6e0bee..5162d12ded 100644 --- a/module/metric/ui/previewsingle.html.php +++ b/module/metric/ui/previewsingle.html.php @@ -12,24 +12,34 @@ namespace zin; $currentID = $current->id ?? 0; -$fnGenerateSide = function() use($metrics, $current, $viewType, $scope, $filtersBase64) +$fnGenerateSide = function() use($groupMetrics, $current, $viewType, $scope, $lang, $filtersBase64) { $metricList = array(); - foreach($metrics as $key => $metric) + foreach($groupMetrics as $key => $metrics) { - $class = $metric->id == $current->id ? 'metric-current' : ''; - $class .= " metric-{$metric->id}"; - $params = "scope=$scope&viewType=$viewType&metricID={$metric->id}"; - if(!empty($filtersBase64)) $params .= "&filtersBase64={$filtersBase64}"; + if(empty($metrics)) continue; $metricList[] = li ( - set::className($class . ' metric-item font-medium'), - a( - $metric->name, - set::href(helper::createLink('metric', 'preview', $params)), - ) + set::className('metric-group'), + $lang->metric->objectList[$key] ); + + foreach($metrics as $metric) + { + $class = $metric->id == $current->id ? 'metric-current' : ''; + $params = "scope=$scope&viewType=$viewType&metricID={$metric->id}"; + if(!empty($filtersBase64)) $params .= "&filtersBase64={$filtersBase64}"; + + $metricList[] = li + ( + set::className($class . ' metric-item font-medium'), + a( + $metric->name, + set::href(helper::createLink('metric', 'preview', $params)) + ) + ); + } } return ul($metricList); @@ -45,7 +55,7 @@ $fnGenerateFilterPanel = function($code, $filterItem) use($lang) ( 'class' => 'text-primary ghost', 'text' => sprintf($lang->metric->filter->clearAction, $lang->metric->filter->$code), - 'onclick' => 'window.handleFilterClearItem(this)', + 'onclick' => 'window.handleFilterClearItem(this)' ); return panel ( @@ -58,15 +68,16 @@ $fnGenerateFilterPanel = function($code, $filterItem) use($lang) set::primary(true), set::name($code), set::inline(true), - set::items($items), + set::items($items) ), - set::headingActions(array($removeAction)), + set::headingActions(array($removeAction)) ); }; $filterItems = $this->metric->buildFilterCheckList($filters); featureBar ( + set::load(''), set::current($scope), set::linkParams("scope={key}"), li @@ -83,8 +94,8 @@ featureBar ), span ( - setClass('checked'), - ), + setClass('checked') + ) ), panel ( @@ -95,14 +106,14 @@ featureBar array ( array('type' => 'primary', 'text' => $lang->metric->filter->common, 'onclick' => 'window.handleFilterClick(this)'), - array('type' => 'default', 'text' => $lang->metric->filter->clear, 'onclick' => 'window.handleFilterClearAll(this)'), + array('type' => 'default', 'text' => $lang->metric->filter->clear, 'onclick' => 'window.handleFilterClearAll(this)') ) ), $fnGenerateFilterPanel('scope', $filterItems['scope']), $fnGenerateFilterPanel('object', $filterItems['object']), - $fnGenerateFilterPanel('purpose', $filterItems['purpose']), - ), - ), + $fnGenerateFilterPanel('purpose', $filterItems['purpose']) + ) + ) ); $firstScope = current(array_keys($this->lang->metric->featureBar['preview'])); @@ -123,13 +134,11 @@ toolbar setClass('btn primary'), set::url(helper::createLink('metric', 'browse')), $lang->metric->manage - ) : null, + ) : null */ ); -$metricRecordType = $this->metric->getMetricRecordType(current($resultData)); - -$fnGenerateQueryForm = function() use($metricRecordType, $current) +$fnGenerateQueryForm = function() use($metricRecordType, $current, $dateLabels, $defaultDate) { if(!$metricRecordType) return null; $formGroups = array(); @@ -139,101 +148,107 @@ $fnGenerateQueryForm = function() use($metricRecordType, $current) { $formGroups[] = formGroup ( - setClass('query-inline picker-nowrap'), - set::width('248px'), + setClass('query-inline picker-nowrap w-40'), set::label($this->lang->metric->query->scope[$current->scope]), set::name('scope'), set::control(array('type' => 'picker', 'multiple' => true)), set::items($objectPairs), + set::placeholder($this->lang->metric->placeholder->{$current->scope}) + ); + } + + if($metricRecordType == 'scope' || $metricRecordType == 'system') + { + $btnLabels = array(); + foreach($this->lang->metric->query->dayLabels as $key => $label) + { + $active = $key == '7' ? ' selected' : ''; + $btnLabels[] = btn + ( + setClass("$active default w-16 p-0"), + set::key($key), + $label + ); + } + $formGroups[] = formGroup + ( + setClass('query-calc-date query-inline w-64'), + btngroup + ( + $btnLabels + ), + on::click('.query-calc-date button.btn', 'window.handleCalcDateClick(target)'), ); } if($metricRecordType == 'date' || $metricRecordType == 'scope-date') { + $btnLabels = array(); + foreach($dateLabels as $key => $label) + { + $active = $key == $defaultDate ? ' selected' : ''; + $btnLabels[] = btn + ( + setClass("$active default w-16 p-0"), + set::key($key), + $label + ); + } $formGroups[] = formGroup ( - setClass('query-inline'), - set::width('360px'), - set::label($this->lang->metric->date), + setClass('query-date query-inline w-64'), + btngroup + ( + $btnLabels + ), + on::click('.query-date button.btn', 'window.handleDateLabelClick(target)'), + ); + + $formGroups[] = formGroup + ( + setClass('query-inline w-80'), inputGroup ( datePicker ( + setClass('query-date-picker'), set::name('dateBegin'), set('id', 'dateBegin'), + set::placeholder($this->lang->metric->placeholder->select) ), $this->lang->metric->to, datePicker ( + setClass('query-date-picker'), set::name('dateEnd'), set('id', 'dateEnd'), - ), - ), - ); - } - - if($metricRecordType == 'system') - { - $formGroups[] = formGroup - ( - setClass('query-inline'), - set::width('360px'), - set::label($this->lang->metric->calcTime), - inputGroup - ( - datePicker - ( - set::name('calcBegin'), - set('id', 'calcBegin'), - ), - $this->lang->metric->to, - datePicker - ( - set::name('calcEnd'), - set('id', 'calcEnd'), - ), - ), - ); - } - else - { - $formGroups[] = formGroup - ( - setClass('query-inline'), - set::width('200px'), - set::label($this->lang->metric->calcTime), - inputGroup - ( - datePicker - ( - set::name('calcTime'), - set('id', 'calcTime'), - set::required(true), - set::value(helper::today()), - ), + set::placeholder($this->lang->metric->placeholder->select) + ) ), + on::change('.query-date-picker', 'window.handleDatePickerChange(target)'), ); } return form ( - set::id('queryForm'), + set::id('queryForm' . $current->id), + setClass('ml-4'), formRow ( - set::width('full'), + set::width('max'), $formGroups, - formGroup + !empty($formGroups) ? formGroup ( setClass('query-btn'), btn ( setClass('btn secondary'), set::text($this->lang->metric->query->action), - set::onclick('window.handleQueryClick()'), - ), - ) + set::onclick("window.handleQueryClick($current->id, 'single')") + ) + ) : null ), - set::actions(array()), + set::actions(array()) ); }; @@ -241,7 +256,8 @@ $sideTitle = $scope == 'filter' ? sprintf($lang->metric->filter->filterTotal, co $star = (!empty($current->collector) and strpos($current->collector, ',' . $app->user->account . ',') !== false) ? 'star' : 'star-empty'; div ( - setClass('side'), + setClass('side sidebar sidebar-left'), + setStyle('overflow', 'visible'), div ( setClass('canvas'), @@ -252,18 +268,29 @@ div ( setClass('name-color'), $sideTitle - ), + ) ), div ( setClass('metric-tree'), - $fnGenerateSide($metrics, $current, $viewType, $scope), - ), + $fnGenerateSide($groupMetrics, $current, $viewType, $scope, $lang) + ) ), + div + ( + on::click('.sidebar-gutter', 'window.toggleCollapsed()'), + setClass('sidebar-gutter gutter gutter-horz'), + button + ( + setClass('gutter-toggle'), + span(setClass('chevron-left')) + ) + ) ); div ( setClass('main'), + setStyle('flex', 'auto'), empty($current) ? div(setClass('canvas')) : div ( @@ -277,7 +304,7 @@ div span ( setClass('metric-name-weight'), - isset($current) ? $current->name : null, + isset($current) ? $current->name : null ), btn ( @@ -288,8 +315,8 @@ div set::square(true), set::size('sm'), set::title($lang->metric->collectStar), - on::click('.metric-collect', "window.collectMetric({$current->id})"), - ), + on::click('.metric-collect', "window.collectMetric({$current->id})") + ) ), div ( @@ -308,18 +335,17 @@ div 'icon' => 'menu-backend', 'text' => $this->lang->metric->filters, 'class' => 'ghost hidden', - 'url' => '#', + 'url' => '#' ))) : null, haspriv('metric', 'zAnalysis') ? item(set(array ( 'icon' => 'chart-line', 'text' => $this->lang->metric->zAnalysis, 'class' => 'ghost chart-line-margin hidden', - 'url' => '#', - ))) : null, - + 'url' => '#' + ))) : null ) - ), + ) ), $fnGenerateQueryForm(), div @@ -328,9 +354,18 @@ div div ( setClass('table-side'), + setStyle(array('flex-basis' => $tableWidth . 'px')), div ( - setClass('dtable'), + $groupData ? dtable + ( + set::bordered(true), + set::cols($groupHeader), + set::data(array_values($groupData)), + ($metricRecordType == 'scope' || $metricRecordType == 'scope-date') ? set::footPager(usePager('dtablePager')) : null, + $headerGroup ? set::plugins(array('header-group')) : null, + set::onRenderCell(jsRaw('window.renderDTableCell')) + ) : null ) ), div @@ -339,14 +374,29 @@ div div ( setClass('chart-type'), + $echartOptions ? picker + ( + set::name('chartType'), + set::items($chartTypeList), + set::value('line'), + set::required(true), + set::onchange("window.handleChartTypeChange($current->id, 'single')") + ) : null ), div ( setClass('chart chart-single'), - ), - ), - ), - ), + $echartOptions ? echarts + ( + set::xAxis($echartOptions['xAxis']), + set::yAxis($echartOptions['yAxis']), + set::legend($echartOptions['legend']), + set::series($echartOptions['series']) + )->size('100%', '100%') : null + ) + ) + ) + ) ); render(); diff --git a/module/metric/ui/viewphpmetric.html.php b/module/metric/ui/viewphpmetric.html.php index 052c08574b..36a206fc7c 100644 --- a/module/metric/ui/viewphpmetric.html.php +++ b/module/metric/ui/viewphpmetric.html.php @@ -32,7 +32,7 @@ $buildItems = function($items): array !empty($item['attr']) && is_array($item['attr']) ? set($item['attr']) : null, $item['text'] ) : $item['text'], - set::collapse(!empty($item['text'])), + set::collapse(!empty($item['text'])) ); } @@ -104,7 +104,7 @@ $fnGenerateDataDisplay = function() use($resultData, $resultHeader, $lang, $metr ( set::height(400), set::cols($resultHeader), - set::data($resultData), + set::data($resultData) ); }; @@ -113,7 +113,7 @@ if(!$this->metric->checkCalcExists($metric)) $metricDataSection = section ( set::title($lang->metric->metricData), - set::content($lang->metric->noCalc), + set::content($lang->metric->noCalc) ); } else @@ -121,7 +121,7 @@ else $metricDataSection = section ( set::title($lang->metric->metricData), - $fnGenerateDataDisplay($resultData, $resultHeader, $lang, $metric), + $fnGenerateDataDisplay($resultData, $resultHeader, $lang, $metric) ); } @@ -142,9 +142,12 @@ detailBody set::content(empty(trim($metric->definition)) ? $lang->metric->noFormula : $metric->definition), set::useHtml(true) ), - $metricDataSection, + $metricDataSection + ), + history + ( + set::commentUrl(createLink('action', 'comment', array('objectType' => 'metric', 'objectID' => $metric->id))) ), - history(), floatToolbar ( isAjaxRequest('modal') ? null : to::prefix(backBtn(set::icon('back'), $lang->goback)), @@ -178,7 +181,7 @@ detailBody ) ) ), - $oldMetricTabs, + $oldMetricTabs ) ); diff --git a/module/metric/ui/viewsqlmetric.html.php b/module/metric/ui/viewsqlmetric.html.php index 8cb24d0507..40d83dd7c5 100644 --- a/module/metric/ui/viewsqlmetric.html.php +++ b/module/metric/ui/viewsqlmetric.html.php @@ -35,7 +35,7 @@ $buildItems = function($items): array !empty($item['attr']) && is_array($item['attr']) ? set($item['attr']) : null, $item['text'] ) : $item['text'], - set::collapse(!empty($item['text'])), + set::collapse(!empty($item['text'])) ); } @@ -47,7 +47,7 @@ $formAction = array( 'text' => $lang->metric->testMetric, 'class' => 'secondary', 'type' => 'submit', - 'onclick' => 'window.testMetric()', + 'onclick' => 'window.testMetric()' ) ); @@ -72,10 +72,10 @@ $buildValueControl = function($paramName, $controlType, $value, $optionType, $va datePicker ( set::name($name), - set::value($value), + set::value($value) ), setClass("form-body-item {$paramName}-{$varID}-date"), - setClass($controlType !== 'date' ? 'hidden' : ''), + setClass($controlType !== 'date' ? 'hidden' : '') ); $selectControl = formGroup ( @@ -85,10 +85,10 @@ $buildValueControl = function($paramName, $controlType, $value, $optionType, $va ( set::name($name), set::items($options), - set::disabled($controlType !== 'select' ? true : false), + set::disabled($controlType !== 'select' ? true : false) ), setClass("form-body-item {$paramName}-{$varID}-select"), - setClass($controlType !== 'select' ? 'hidden' : ''), + setClass($controlType !== 'select' ? 'hidden' : '') ); $inputControl = formGroup ( @@ -98,10 +98,10 @@ $buildValueControl = function($paramName, $controlType, $value, $optionType, $va ( set::name($name), set::value($value), - set::disabled($controlType !== 'input' ? true : false), + set::disabled($controlType !== 'input' ? true : false) ), setClass("form-body-item {$paramName}-{$varID}-input"), - setClass($controlType !== 'input' ? 'hidden' : ''), + setClass($controlType !== 'input' ? 'hidden' : '') ); return div @@ -109,7 +109,7 @@ $buildValueControl = function($paramName, $controlType, $value, $optionType, $va $dateControl, $selectControl, $inputControl, - setClass("{$paramName}-{$varID}-group"), + setClass("{$paramName}-{$varID}-group") ); return $control; @@ -122,39 +122,39 @@ $formHeader = div setClass('form-header-item'), setStyle('width', '50px'), setStyle('text-align', 'center'), - $lang->metric->param->varName, + $lang->metric->param->varName ), div ( setClass('form-header-item'), setStyle('width', '150px'), setStyle('text-align', 'center'), - $lang->metric->param->showName, + $lang->metric->param->showName ), div ( setClass('form-header-item'), setStyle('width', '300px'), setStyle('text-align', 'center'), - $lang->metric->param->varType, + $lang->metric->param->varType ), div ( setClass('form-header-item'), setStyle('width', '150px'), $lang->metric->param->defaultValue, - setStyle('text-align', 'center'), + setStyle('text-align', 'center') ), div ( setClass('form-header-item'), setStyle('width', '150px'), setStyle('text-align', 'center'), - $lang->metric->param->queryValue, + $lang->metric->param->queryValue ), setClass('flex form-header'), setStyle('justify-content', 'space-between'), - setStyle('flex', '1'), + setStyle('flex', '1') ); /** @@ -174,7 +174,7 @@ $buildParamControlGroup = function($param, $buildValueControl, $typeList, $optio ( $param['varName'], setStyle('width', '50px'), - setClass("form-body-item varName-{$varID}"), + setClass("form-body-item varName-{$varID}") ); $showNameControl = formGroup ( @@ -182,7 +182,7 @@ $buildParamControlGroup = function($param, $buildValueControl, $typeList, $optio set::control('input'), set::name('showName[]'), set::value($param['showName']), - setClass("form-body-item showName-{$varID}"), + setClass("form-body-item showName-{$varID}") ); $varTypeControl = formGroup ( @@ -192,7 +192,7 @@ $buildParamControlGroup = function($param, $buildValueControl, $typeList, $optio set::items($typeList), set::value(zget($param, 'varType')), set::label(''), - setClass("form-body-item varType-{$varID}"), + setClass("form-body-item varType-{$varID}") ); $optionsControl = formGroup ( @@ -202,7 +202,7 @@ $buildParamControlGroup = function($param, $buildValueControl, $typeList, $optio set::items($optionList), set::value($param['options']), setClass("form-body-item options-{$varID}"), - set::label(''), + set::label('') ); $defaultValueControl = $buildValueControl('defaultValue', $varType, zget($param, 'defaultValue', ''), $param['options'], $varID); $queryValueControl = $buildValueControl('queryValue', $varType, zget($param, 'queryValue', ''), $param['options'], $varID); @@ -212,7 +212,7 @@ $buildParamControlGroup = function($param, $buildValueControl, $typeList, $optio set::control('hidden'), set::name('varName[]'), set::value($param['varName']), - setClass("form-body-item varNameLabel-{$varID}"), + setClass("form-body-item varNameLabel-{$varID}") ); $paramControlGroup = formRow @@ -224,7 +224,7 @@ $buildParamControlGroup = function($param, $buildValueControl, $typeList, $optio $varTypeControl, $optionsControl, setClass('flex form-body-group'), - setStyle('justify-content', 'flex-start'), + setStyle('justify-content', 'flex-start') ), $defaultValueControl, $queryValueControl, @@ -233,7 +233,7 @@ $buildParamControlGroup = function($param, $buildValueControl, $typeList, $optio setStyle('justify-content', 'space-between'), setStyle('align-items', 'center'), setStyle('flex', '1'), - setStyle('width', '100%'), + setStyle('width', '100%') ); return $paramControlGroup; @@ -247,7 +247,7 @@ $formAction = array( 'text' => $lang->metric->testMetric, 'class' => 'secondary', 'type' => 'submit', - 'onclick' => 'testMetric({id})', + 'onclick' => 'testMetric({id})' ) ); @@ -305,12 +305,15 @@ detailBody set::actions($formAction), div ( - setClass('response-box'), - ), + setClass('response-box') + ) ) - ), + ) + ), + history + ( + set::commentUrl(createLink('action', 'comment', array('objectType' => 'metric', 'objectID' => $metric->id))) ), - history(), floatToolbar ( isAjaxRequest('modal') ? null : to::prefix(backBtn(set::icon('back'), $lang->goback)), @@ -333,8 +336,8 @@ detailBody ( $buildItems($legendBasic) ) - ), - ), + ) + ) ) ); diff --git a/module/metric/view/browse.html.php b/module/metric/view/browse.html.php old mode 100644 new mode 100755 diff --git a/module/metric/zen.php b/module/metric/zen.php index 91f5305f30..6e6c3f2c65 100644 --- a/module/metric/zen.php +++ b/module/metric/zen.php @@ -173,38 +173,33 @@ class metricZen extends metric * 根据度量项计算的结果,构建可插入表的度量数据。 * Build measurements that can be inserted into tables based on the results of the measurements computed. * - * @param array $calcList + * @param array $calcList + * @param bool $isFirstGenerate * @access protected * @return array */ - protected function prepareMetricRecord($calcList) + protected function prepareMetricRecord($calcList, $isFirstGenerate = false) { - $now = helper::now(); + $options = $isFirstGenerate ? array() : array('year' => date('Y'), 'month' => date('n'), 'week' => date('W'), 'day' => date('j')); + + $now = helper::now(); $records = array(); foreach($calcList as $code => $calc) { - $results = $calc->getResult(); - + $results = $calc->getResult($options); if(!is_array($results) || count($results) == 0) continue; - $record = (object)current($results); + $system = (int)$this->metric->isSystemMetric($results); - $system = 1; - foreach($this->config->metric->excludeGlobal as $exclude) - { - if(isset($record->$exclude)) - { - $system = 0; - break; - } - } + $firstRecord = (object)current($results); + $cycle = $this->metric->getMetricCycle($firstRecord); + $this->metric->clearOutDatedRecords($code, $cycle); foreach($results as $record) { $record = (object)$record; if(empty($record->value)) $record->value = 0; - $record->metricID = $calc->id; $record->metricCode = $code; $record->date = $now; @@ -382,15 +377,26 @@ class metricZen extends metric * @access protected * @return array|false */ - protected function getViewTableHeader($result) + protected function getViewTableHeader($metric) { - if(empty($result)) return array + $dataFields = $this->metric->getMetricRecordDateField($metric->code); + if($metric->scope != 'system') $dataFields[] = $metric->scope; + + $dataFieldStr = implode(', ', $dataFields); + if(!empty($dataFieldStr)) $dataFieldStr .= ', '; + + $result = $this->dao->select("id, {$dataFieldStr} value, date") + ->from(TABLE_METRICLIB) + ->where('metricCode')->eq($metric->code) + ->fetch(); + + if(!$result) return array ( - array('name' => 'value', 'title' => $this->lang->metric->value), + array('name' => 'value', 'title' => $this->lang->metric->value, 'width' => 96), array('name' => 'calcTime', 'title' => $this->lang->metric->calcTime, 'width' => 150) ); - $fieldList = array_keys((array)current($result)); + $fieldList = array_keys((array)$result); $scopeList = array_intersect($fieldList, $this->config->metric->scopeList); $dateList = array_intersect($fieldList, $this->config->metric->dateList); $scope = current($scopeList); @@ -428,7 +434,7 @@ class metricZen extends metric $dateList = array_intersect($fieldList, $this->config->metric->dateList); $row = new stdclass(); - if(!empty($dateList)) $row->date = $this->metric->buildDateCell($record); + if(!empty($dateList)) $row = $this->metric->buildDateCell($row, $record); if($scope != 'system') { $row->scope = isset($objectPairs[$record[$scope]]) ? $objectPairs[$record[$scope]] : $record[$scope]; @@ -443,6 +449,193 @@ class metricZen extends metric return $tableData; } + /** + * 获取度量数据表的宽度。 + * Get width of result table in view. + * + * @param array $headers + * @access protected + * @return int + */ + protected function getViewTableWidth($headers) + { + $width = 0; + foreach($headers as $header) $width += isset($header['width']) ? $header['width'] : 160; + + return $width; + } + + /** + * 对 headers 进行分组满足表头合并单元格, 返回经过分组的 headers 和 data。 + * Return grouped headers and data for table headers merges cell. + * + * @param array $header + * @param array $data + * @access protected + * @return array + */ + protected function getGroupTable($header, $data) + { + if(!$header or !$data) return array(array(), array()); + + $headerLength = count($header); + + if($headerLength == 2) + { + return $this->getTimeTable($data); + } + elseif($headerLength == 3) + { + if($this->metric->isObjectMetric($header)) + { + return $this->getObjectTable($header, $data); + } + else + { + $dateType = current($data)->dateType; + return $this->getTimeTable($data, $dateType); + } + } + elseif($headerLength == 4) + { + $dateType = current($data)->dateType; + return $this->getObjectTable($header, $data, $dateType); + } + + return array($header, $data); + } + + protected function getObjectTable($header, $data, $dateType = 'day') + { + $groupHeader = array(); + $groupData = array(); + + $headerField = current($header)['name']; + $headerTitle = current($header)['title']; + + $groupHeader[] = array('name' => $headerField, 'title' => $headerTitle); + $dateField = ($dateType == 'day' and !isset(current($data)->dateString)) ? 'calcTime' : 'dateString'; + usort($data, function($a, $b) use($dateField) + { + $dateA = strtotime($a->$dateField); + $dateB = strtotime($b->$dateField); + + if ($dateA == $dateB) { + return 0; + } + + return ($dateA > $dateB) ? -1 : 1; + }); + + $times = array(); + $objects = array(); + foreach($data as $dataInfo) + { + $time = substr($dataInfo->$dateField, 0, 10); + $object = $dataInfo->scope; + $value = $dataInfo->value; + + if(!isset($times[$time])) $times[$time] = $time; + if(!isset($objects[$object])) $objects[$object] = array(); + $objects[$object][$time] = $value; + } + /* e.g $times = array('2023-10-14', '2023-10-15'), $objects = array('object1' => array('2023-10-14' => 2, '2023-10-15 => 3)) */ + + foreach($times as $time) + { + $year = substr($time, 0, 4) . $this->lang->year; + + if($dateType == 'year') + { + $title = $year; + $groupHeader[] = array('name' => $time, 'title' => $title, 'align' => 'center'); + } + elseif($dateType == 'month') + { + $month = substr($time, 5, 2) . $this->lang->month; + $groupHeader[] = array('name' => $time, 'title' => $month, 'headerGroup' => $year, 'align' => 'center'); + } + elseif($dateType == 'week') + { + $week = sprintf($this->lang->metric->week, substr($time, 5, 2)); + $groupHeader[] = array('name' => $time, 'title' => $week, 'headerGroup' => $year, 'align' => 'center'); + } + elseif($dateType == 'day') + { + $day = substr($time, 5, 5); + $groupHeader[] = array('name' => $time, 'title' => $day, 'headerGroup' => $year, 'align' => 'center'); + } + } + + foreach($objects as $object => $datas) + { + $objectData = array($headerField => $object); + foreach($times as $time) + { + $objectData[$time] = isset($datas[$time]) ? $datas[$time] : 0; + } + + $groupData[] = $objectData; + } + + return array($groupHeader, $groupData); + } + + protected function getTimeTable($data, $dateType = 'day') + { + // 没有时间属性的度量项,也加上天的属性,此度量项数据的 year month week day 字段均为0, 此时使用 calcTime 来做计算 + $dateField = ($dateType == 'day' and !isset(current($data)->dateString)) ? 'calcTime' : 'dateString'; + usort($data, function($a, $b) use ($dateField) + { + $dateA = strtotime($a->$dateField); + $dateB = strtotime($b->$dateField); + + if ($dateA == $dateB) { + return 0; + } + + return ($dateA > $dateB) ? -1 : 1; + }); + + $groupHeader = array(); + $groupData = array(array()); + + foreach($data as $dataInfo) + { + if($dateType == 'year') + { + $year = substr($dataInfo->$dateField, 0, 4) . $this->lang->year; + $name = "year{$year}"; + $groupHeader[] = array('name' => $name, 'title' => $year, 'align' => 'center'); + } + elseif($dateType == 'month') + { + $year = substr($dataInfo->$dateField, 0, 4) . $this->lang->year; + $month = substr($dataInfo->$dateField, 5, 2) . $this->lang->month; + $name = "year{$year}month{$month}"; + $groupHeader[] = array('name' => $name, 'title' => $month, 'headerGroup' => $year, 'align' => 'center'); + } + elseif($dateType == 'week') + { + $year = substr($dataInfo->$dateField, 0, 4) . $this->lang->year; + $week = sprintf($this->lang->metric->week, substr($dataInfo->dateString, 5, 2)); + $name = "year{$year}week{$week}"; + $groupHeader[] = array('name' => $name, 'title' => $week, 'headerGroup' => $year, 'align' => 'center'); + } + elseif($dateType == 'day') + { + $year = substr($dataInfo->$dateField, 0, 4) . $this->lang->year; + $day = substr($dataInfo->$dateField, 5, 5); + $name = "year{$year}day{$day}"; + $groupHeader[] = array('name' => $name, 'title' => $day, 'headerGroup' => $year, 'align' => 'center'); + } + + $groupData[0][$name] = $dataInfo->value; + } + + return array($groupHeader, $groupData); + } + /** * 根据后台配置的估算单位对列表赋值。 * Assign unitList['measure'] by custom hourPoint.