Skip to content
Snippets Groups Projects
Verified Commit 8ae66941 authored by Ezekiel Kigbo's avatar Ezekiel Kigbo :two: Committed by GitLab
Browse files

Merge branch...

Merge branch '454637-follow-up-from-add-utils-and-constants-for-the-ai-impact-dashboard' into 'master' 

Minor AI impact utils improvements

See merge request !148734



Merged-by: default avatarEzekiel Kigbo <3397881-ekigbo@users.noreply.gitlab.com>
Approved-by: default avatarDiana Zubova <dzubova@gitlab.com>
Approved-by: default avatarAlex Pennells <apennells@gitlab.com>
Reviewed-by: default avatarEzekiel Kigbo <3397881-ekigbo@users.noreply.gitlab.com>
Reviewed-by: default avatarAlex Pennells <apennells@gitlab.com>
Co-authored-by: default avatarEzekiel Kigbo <ekigbo@gitlab.com>
parents fe99bb18 201af645
No related branches found
No related tags found
No related merge requests found
Pipeline #1256124663 passed
Pipeline: E2E Omnibus GitLab EE

#1256167143

    Pipeline: GitLab

    #1256138381

      Pipeline: E2E GDK

      #1256131075

        +2
        ...@@ -243,7 +243,7 @@ export const METRIC_TOOLTIPS = { ...@@ -243,7 +243,7 @@ export const METRIC_TOOLTIPS = {
        }, },
        [AI_METRICS.CODE_SUGGESTIONS_USAGE_RATE]: { [AI_METRICS.CODE_SUGGESTIONS_USAGE_RATE]: {
        description: s__( description: s__(
        'ValueStreamAnalytics|Monthly user engagement with AI Code Suggestions. Percentage ratio calculated as monthly unique Code Suggestions users / total monthly unique code contributors.', 'AiImpactAnalytics|Monthly user engagement with AI Code Suggestions. Percentage ratio calculated as monthly unique Code Suggestions users / total monthly unique code contributors.',
        ), ),
        groupLink: '', groupLink: '',
        projectLink: '', projectLink: '',
        ......
        ...@@ -18,7 +18,7 @@ import { ...@@ -18,7 +18,7 @@ import {
        generateTableRows, generateTableRows,
        } from '../utils'; } from '../utils';
        import { import {
        TABLE_METRICS, AI_IMPACT_TABLE_METRICS,
        SUPPORTED_DORA_METRICS, SUPPORTED_DORA_METRICS,
        SUPPORTED_FLOW_METRICS, SUPPORTED_FLOW_METRICS,
        SUPPORTED_VULNERABILITY_METRICS, SUPPORTED_VULNERABILITY_METRICS,
        ...@@ -99,7 +99,7 @@ export default { ...@@ -99,7 +99,7 @@ export default {
        // Return an array of the failed metric IDs // Return an array of the failed metric IDs
        return result return result
        .reduce((acc, { reason = [] }) => acc.concat(reason), []) .reduce((acc, { reason = [] }) => acc.concat(reason), [])
        .map((metric) => TABLE_METRICS[metric].label); .map((metric) => AI_IMPACT_TABLE_METRICS[metric].label);
        }, },
        async fetchTableMetrics({ metrics, queryFn }) { async fetchTableMetrics({ metrics, queryFn }) {
        ......
        ...@@ -20,14 +20,14 @@ export const SUPPORTED_VULNERABILITY_METRICS = [VULNERABILITY_METRICS.CRITICAL]; ...@@ -20,14 +20,14 @@ export const SUPPORTED_VULNERABILITY_METRICS = [VULNERABILITY_METRICS.CRITICAL];
        export const SUPPORTED_AI_METRICS = [AI_METRICS.CODE_SUGGESTIONS_USAGE_RATE]; export const SUPPORTED_AI_METRICS = [AI_METRICS.CODE_SUGGESTIONS_USAGE_RATE];
        export const TABLE_METRICS = { export const AI_IMPACT_TABLE_METRICS = {
        ...pick(VSD_TABLE_METRICS, [ ...pick(VSD_TABLE_METRICS, [
        ...SUPPORTED_FLOW_METRICS, ...SUPPORTED_FLOW_METRICS,
        ...SUPPORTED_DORA_METRICS, ...SUPPORTED_DORA_METRICS,
        ...SUPPORTED_VULNERABILITY_METRICS, ...SUPPORTED_VULNERABILITY_METRICS,
        ]), ]),
        [AI_METRICS.CODE_SUGGESTIONS_USAGE_RATE]: { [AI_METRICS.CODE_SUGGESTIONS_USAGE_RATE]: {
        label: s__('DORA4Metrics|Code Suggestions usage'), label: s__('AiImpactAnalytics|Code Suggestions usage'),
        units: UNITS.PERCENT, units: UNITS.PERCENT,
        }, },
        }; };
        ...@@ -7,10 +7,10 @@ import { ...@@ -7,10 +7,10 @@ import {
        nSecondsBefore, nSecondsBefore,
        } from '~/lib/utils/datetime_utility'; } from '~/lib/utils/datetime_utility';
        import { formatMetric, percentChange, isMetricInTimePeriods } from '../utils'; import { formatMetric, percentChange, isMetricInTimePeriods } from '../utils';
        import { TABLE_METRICS } from './constants'; import { AI_IMPACT_TABLE_METRICS } from './constants';
        const getStartOfMonth = (now) => dateAtFirstDayOfMonth(getStartOfDay(now));
        const getColumnKeyForMonth = (monthsAgo) => `${monthsAgo}-months-ago`; const getColumnKeyForMonth = (monthsAgo) => `${monthsAgo}-months-ago`;
        const getStartOfMonth = (now) => dateAtFirstDayOfMonth(getStartOfDay(now));
        /** /**
        * Generates the time period columns, from This month -> 5 months ago. * Generates the time period columns, from This month -> 5 months ago.
        ...@@ -76,7 +76,7 @@ export const generateTableColumns = (now) => [ ...@@ -76,7 +76,7 @@ export const generateTableColumns = (now) => [
        * @returns {Array} array of data-less table rows * @returns {Array} array of data-less table rows
        */ */
        export const generateSkeletonTableData = () => export const generateSkeletonTableData = () =>
        Object.entries(TABLE_METRICS).map(([identifier, { label, invertTrendColor }]) => ({ Object.entries(AI_IMPACT_TABLE_METRICS).map(([identifier, { label, invertTrendColor }]) => ({
        metric: { identifier, value: label }, metric: { identifier, value: label },
        invertTrendColor, invertTrendColor,
        })); }));
        ...@@ -118,7 +118,7 @@ const buildTableRow = ({ identifier, units, timePeriods }) => { ...@@ -118,7 +118,7 @@ const buildTableRow = ({ identifier, units, timePeriods }) => {
        * @returns {Object} object containing the same data, formatted for the table * @returns {Object} object containing the same data, formatted for the table
        */ */
        export const generateTableRows = (timePeriods) => export const generateTableRows = (timePeriods) =>
        Object.entries(TABLE_METRICS).reduce((acc, [identifier, { units }]) => { Object.entries(AI_IMPACT_TABLE_METRICS).reduce((acc, [identifier, { units }]) => {
        if (!isMetricInTimePeriods(identifier, timePeriods)) return acc; if (!isMetricInTimePeriods(identifier, timePeriods)) return acc;
        return Object.assign(acc, { return Object.assign(acc, {
        ......
        ...@@ -4,7 +4,7 @@ import { joinPaths, mergeUrlParams } from '~/lib/utils/url_utility'; ...@@ -4,7 +4,7 @@ import { joinPaths, mergeUrlParams } from '~/lib/utils/url_utility';
        import { METRIC_TOOLTIPS } from '~/analytics/shared/constants'; import { METRIC_TOOLTIPS } from '~/analytics/shared/constants';
        import { s__ } from '~/locale'; import { s__ } from '~/locale';
        import { TABLE_METRICS } from '../constants'; import { TABLE_METRICS } from '../constants';
        import { TABLE_METRICS as AI_IMPACT_TABLE_METRICS } from '../ai_impact/constants'; import { AI_IMPACT_TABLE_METRICS } from '../ai_impact/constants';
        export default { export default {
        name: 'MetricTableCell', name: 'MetricTableCell',
        ......
        ...@@ -4654,6 +4654,12 @@ msgstr "" ...@@ -4654,6 +4654,12 @@ msgstr ""
        msgid "AiAnalytics|the ClickHouse data store is not available" msgid "AiAnalytics|the ClickHouse data store is not available"
        msgstr "" msgstr ""
           
        msgid "AiImpactAnalytics|Code Suggestions usage"
        msgstr ""
        msgid "AiImpactAnalytics|Monthly user engagement with AI Code Suggestions. Percentage ratio calculated as monthly unique Code Suggestions users / total monthly unique code contributors."
        msgstr ""
        msgid "Akismet" msgid "Akismet"
        msgstr "" msgstr ""
           
        ...@@ -15976,9 +15982,6 @@ msgstr "" ...@@ -15976,9 +15982,6 @@ msgstr ""
        msgid "DORA4Metrics|Change failure rate (percentage)" msgid "DORA4Metrics|Change failure rate (percentage)"
        msgstr "" msgstr ""
           
        msgid "DORA4Metrics|Code Suggestions usage"
        msgstr ""
        msgid "DORA4Metrics|Contributor count" msgid "DORA4Metrics|Contributor count"
        msgstr "" msgstr ""
           
        ...@@ -56230,9 +56233,6 @@ msgstr "" ...@@ -56230,9 +56233,6 @@ msgstr ""
        msgid "ValueStreamAnalytics|Merge request analytics" msgid "ValueStreamAnalytics|Merge request analytics"
        msgstr "" msgstr ""
           
        msgid "ValueStreamAnalytics|Monthly user engagement with AI Code Suggestions. Percentage ratio calculated as monthly unique Code Suggestions users / total monthly unique code contributors."
        msgstr ""
        msgid "ValueStreamAnalytics|New Value Stream" msgid "ValueStreamAnalytics|New Value Stream"
        msgstr "" msgstr ""
           
        0% Loading or .
        You are about to add 0 people to the discussion. Proceed with caution.
        Finish editing this message first!
        Please register or to comment