<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                # Insights > 原文:[https://docs.gitlab.com/ee/user/project/insights/](https://docs.gitlab.com/ee/user/project/insights/) * [View your project’s Insights](#view-your-projects-insights) * [Configure your Insights](#configure-your-insights) * [Permissions](#permissions) * [Writing your `.gitlab/insights.yml`](#writing-your-gitlabinsightsyml) * [Configuration parameters](#configuration-parameters) * [Parameter details](#parameter-details) * [`title`](#title) * [`description`](#description) * [`type`](#type) * [`query`](#query) * [`query.issuable_type`](#queryissuable_type) * [`query.issuable_state`](#queryissuable_state) * [`query.filter_labels`](#queryfilter_labels) * [`query.collection_labels`](#querycollection_labels) * [`query.group_by`](#querygroup_by) * [`query.period_limit`](#queryperiod_limit) * [`query.period_field`](#queryperiod_field) * [`projects`](#projects) * [`projects.only`](#projectsonly) * [Complete example](#complete-example) # Insights[](#insights-ultimate "Permalink") [Introduced](https://gitlab.com/groups/gitlab-org/-/epics/725) in [GitLab Ultimate](https://about.gitlab.com/pricing/) 12.0. 配置對您的項目至關重要的見解,以探索數據,例如分類診斷,在給定期間內創建/關閉的問題,合并請求的平均合并時間等等. [![Insights example bar chart](https://img.kancloud.cn/df/a6/dfa68c0c403c880443ae2ce243dd2e83_2544x880.png)](img/project_insights.png) **注意:**此功能[在組級別也可用](../../group/insights/index.html) . ## View your project’s Insights[](#view-your-projects-insights "Permalink") 您可以通過點擊左側欄中的**Analytics(分析)> Insights**鏈接來訪問項目的 Insights: [![Insights sidebar link](https://img.kancloud.cn/18/7b/187b438a5412abbe103ff79458ef27af_230x260.png)](img/insights_sidebar_link_v12_8.png) ## Configure your Insights[](#configure-your-insights "Permalink") 使用項目中名為`.gitlab/insights.yml`的 YAML 文件配置`.gitlab/insights.yml` . 該文件將在項目的"見解"頁面中使用. 有關此文件內容的詳細信息,請參見下面的[編寫`.gitlab/insights.yml`](#writing-your-gitlabinsightsyml) . **注意:**一旦創建了配置文件,您也可以[將其用于項目的 group](../../group/insights/index.html#configure-your-insights) .**注意:**如果項目沒有任何配置文件,則將盡可能嘗試使用組配置. 如果該組沒有任何配置,將使用默認配置. ## Permissions[](#permissions "Permalink") 如果您有權查看項目,則可以查看其見解. **注意:**您無法訪問的問題或合并請求(因為您無法訪問它們所屬的項目,或者因為它們是機密的)會從 Insights 圖表中過濾掉. 您也可以查閱[組權限表](../../permissions.html#group-members-permissions) . ## Writing your `.gitlab/insights.yml`[](#writing-your-gitlabinsightsyml "Permalink") `.gitlab/insights.yml`文件定義了將在項目或組的每個 Insights 頁面中顯示的 Insights 圖表的結構和順序. 每個頁面都有一個唯一的鍵以及一組要獲取和顯示的圖表. 例如,這是 Insights 的單個定義,它將顯示一個帶有一個圖表的頁面: ``` bugsCharts: title: "Charts for bugs" charts: - title: "Monthly bugs created" description: "Open bugs created per month" type: bar query: issuable_type: issue issuable_state: opened filter_labels: - bug group_by: month period_limit: 24 ``` 每個圖表定義均由鍵值對組成的哈希組成. 例如,這是單個圖表定義: ``` - title: "Monthly bugs created" description: "Open bugs created per month" type: bar query: issuable_type: issue issuable_state: opened filter_labels: - bug group_by: month period_limit: 24 ``` ## Configuration parameters[](#configuration-parameters "Permalink") 圖表被定義為定義圖表行為的參數列表. 下表列出了圖表的可用參數: | Keyword | Description | | --- | --- | | [`title`](#title) | 圖表標題. 這將顯示在"見解"頁面上. | | [`description`](#description) | 單個圖表的描述. 這將顯示在相關圖表上方. | | [`type`](#type) | 圖表類型: `bar` , `line`或`stacked-bar` . | | [`query`](#query) | 散列,用于定義要成為圖表一部分的問題/合并請求的條件. | ## Parameter details[](#parameter-details "Permalink") 以下是用于配置 Insights 圖表的參數的詳細說明. ### `title`[](#title "Permalink") `title`是圖表的標題,它將顯示在 Insights 頁面上. 例如: ``` monthlyBugsCreated: title: "Monthly bugs created" ``` ### `description`[](#description "Permalink") `description`文字顯示在圖表上方,但標題下方. 它用于提供有關圖表的更多詳細信息,例如: ``` monthlyBugsCreated: title: "Monthly bugs created" description: "Open bugs created per month" ``` ### `type`[](#type "Permalink") `type`是圖表類型. 例如: ``` monthlyBugsCreated: title: "Monthly bugs created" type: bar ``` Supported values are: | Name | Example | | --- | --- | | `bar` | [![Insights example bar chart](https://img.kancloud.cn/e4/8e/e48e63bbbfa19015a0ce21b27ac7c740_1200x293.png)](img/insights_example_bar_chart.png) | | `bar` (time series, i.e. when `group_by` is used) | [![Insights example bar time series chart](https://img.kancloud.cn/69/1c/691ce2ea7b889a65a8a103560c8213c9_1200x301.png)](img/insights_example_bar_time_series_chart.png) | | `line` | [![Insights example stacked bar chart](https://img.kancloud.cn/26/26/2626b2b74b1967cae53a7c9d6e4c6692_1200x320.png)](img/insights_example_line_chart.png) | | `stacked-bar` | [![Insights example stacked bar chart](https://img.kancloud.cn/87/e8/87e88e09ea8f3e505e06385bdbf1aa99_1200x319.png)](img/insights_example_stacked_bar_chart.png) | ### `query`[](#query "Permalink") `query`允許定義條件/合并請求成為圖表的一部分. Example: ``` monthlyBugsCreated: title: "Monthly bugs created" description: "Open bugs created per month" type: bar query: issuable_type: issue issuable_state: opened filter_labels: - bug collection_labels: - S1 - S2 - S3 - S4 group_by: week period_limit: 104 ``` #### `query.issuable_type`[](#queryissuable_type "Permalink") 定義要為其創建圖表的"可發行"的類型. 支持的值為: * `issue` :圖表將顯示問題的數據. * `merge_request` :圖表將顯示合并請求的數據. #### `query.issuable_state`[](#queryissuable_state "Permalink") 按查詢的"可發行"狀態過濾. 默認情況下,將使用`opened`狀態過濾器. 支持的值為: * `opened` :未解決問題/合并請求. * `closed` :已關閉未解決的問題/合并請求. * `locked` :已鎖定討論的問題/合并請求. * `merged` :合并的合并請求. * `all` :在所有狀態下發出/合并請求 #### `query.filter_labels`[](#queryfilter_labels "Permalink") 按應用于查詢的"可發行"的標簽過濾. 默認情況下,不應用標簽過濾器. 必須將所有定義的標簽應用于"可發行",才能對其進行選擇. Example: ``` monthlyBugsCreated: title: "Monthly regressions created" type: bar query: issuable_type: issue issuable_state: opened filter_labels: - bug - regression ``` #### `query.collection_labels`[](#querycollection_labels "Permalink") 通過配置的標簽將"可發行"分組. 默認情況下,不會進行分組. 使用此關鍵字時,需要將`type`設置為`line`或`stacked-bar` . Example: ``` weeklyBugsBySeverity: title: "Weekly bugs by severity" type: stacked-bar query: issuable_type: issue issuable_state: opened filter_labels: - bug collection_labels: - S1 - S2 - S3 - S4 ``` #### `query.group_by`[](#querygroup_by "Permalink") 定義圖表的 X 軸. 支持的值為: * `day` : `day`組數據. * `week` : `week`組數據. * `month` : `month`組數據. #### `query.period_limit`[](#queryperiod_limit "Permalink") 定義過去查詢"可耗材"的距離. 該單位與您定義的`query.group_by`有關. 例如,如果您定義了`query.group_by: 'day'`則`query.period_limit: 365`意思是"收集并顯示最近 365 天的數據". 默認情況下,將根據您定義的`query.group_by`應用默認值. | `query.group_by` | 默認值 | | --- | --- | | `day` | 30 | | `week` | 4 | | `month` | 12 | #### `query.period_field`[](#queryperiod_field "Permalink") 定義用于將"可耗材"分組的時間戳字段. 支持的值為: * `created_at` (默認):使用`created_at`字段對數據進行分組. * `closed_at` :使用`closed_at`字段對數據進行`closed_at` (僅針對問題). * `merged_at` :使用`merged_at`字段對數據進行`merged_at` (僅適用于合并請求). `period_field`自動設置為: * `closed_at` if `query.issuable_state` is `closed` * `merged_at` if `query.issuable_state` is `merged` * `created_at` otherwise **注意:**在解決[此錯誤](https://gitlab.com/gitlab-org/gitlab/-/issues/26911)之前,您可能會看到`created_at`代替`merged_at` . 將使用`created_at`代替. ### `projects`[](#projects "Permalink") [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/10904) in [GitLab Ultimate](https://about.gitlab.com/pricing/) 12.4. 您可以限制從以下位置查詢"可耗材"的位置: * 如果`.gitlab/insights.yml`用于一[組的見解](../../group/insights/index.html#configure-your-insights) ,有`projects` ,你可以限制要查詢的項目. 默認情況下,將使用該組下的所有項目. * 如果將`.gitlab/insights.yml`用于項目的見解,則指定任何其他項目均不會產生任何結果. 默認情況下,將使用項目本身. #### `projects.only`[](#projectsonly "Permalink") `projects.only`選項指定應從中查詢"可發行物品"的項目. 在以下情況下,此處列出的項目將被忽略: * 它們不存在. * 當前用戶沒有足夠的權限來讀取它們. * 他們不在小組中. 在以下`insights.yml`示例中,我們指定將在其中使用查詢的項目. 設置小組的見解時,此示例非常有用: ``` monthlyBugsCreated: title: "Monthly bugs created" description: "Open bugs created per month" type: bar query: issuable_type: issue issuable_state: opened filter_labels: - bug projects: only: - 3 # You can use the project ID - groupA/projectA # Or full project path - groupA/subgroupB/projectC # Projects in subgroups can be included - groupB/project # Projects outside the group will be ignored ``` ## Complete example[](#complete-example "Permalink") ``` .projectsOnly: &projectsOnly projects: only: - 3 - groupA/projectA - groupA/subgroupB/projectC bugsCharts: title: "Charts for bugs" charts: - title: "Monthly bugs created" description: "Open bugs created per month" type: bar <<: *projectsOnly query: issuable_type: issue issuable_state: opened filter_labels: - bug group_by: month period_limit: 24 - title: "Weekly bugs by severity" type: stacked-bar <<: *projectsOnly query: issuable_type: issue issuable_state: opened filter_labels: - bug collection_labels: - S1 - S2 - S3 - S4 group_by: week period_limit: 104 - title: "Monthly bugs by team" type: line <<: *projectsOnly query: issuable_type: merge_request issuable_state: opened filter_labels: - bug collection_labels: - Manage - Plan - Create group_by: month period_limit: 24 ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看