diff --git a/app/assets/javascripts/analytics/shared/constants.js b/app/assets/javascripts/analytics/shared/constants.js index 144f02582ef58915a935c651c1676cc90bc5f8e9..7cbb3e686508c19acdfc584c06a7085087e5de56 100644 --- a/app/assets/javascripts/analytics/shared/constants.js +++ b/app/assets/javascripts/analytics/shared/constants.js @@ -234,7 +234,7 @@ export const METRIC_TOOLTIPS = { }, [AI_METRICS.CODE_SUGGESTIONS_USAGE_RATE]: { 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: '', projectLink: '', diff --git a/ee/app/assets/javascripts/analytics/dashboards/ai_impact/components/metric_table.vue b/ee/app/assets/javascripts/analytics/dashboards/ai_impact/components/metric_table.vue index e0ce5cafea573a52c3a2fb59d98567c550cbc1e3..dfc0e8428df81018496ae08c1f4ec40a6f9b499b 100644 --- a/ee/app/assets/javascripts/analytics/dashboards/ai_impact/components/metric_table.vue +++ b/ee/app/assets/javascripts/analytics/dashboards/ai_impact/components/metric_table.vue @@ -18,7 +18,7 @@ import { generateTableRows, } from '../utils'; import { - TABLE_METRICS, + AI_IMPACT_TABLE_METRICS, SUPPORTED_DORA_METRICS, SUPPORTED_FLOW_METRICS, SUPPORTED_VULNERABILITY_METRICS, @@ -99,7 +99,7 @@ export default { // Return an array of the failed metric IDs return result .reduce((acc, { reason = [] }) => acc.concat(reason), []) - .map((metric) => TABLE_METRICS[metric].label); + .map((metric) => AI_IMPACT_TABLE_METRICS[metric].label); }, async fetchTableMetrics({ metrics, queryFn }) { diff --git a/ee/app/assets/javascripts/analytics/dashboards/ai_impact/constants.js b/ee/app/assets/javascripts/analytics/dashboards/ai_impact/constants.js index 80cbf9bb04f32470d91ea85a73326e74d674b2dc..a3ad95a7770767aa623b170e82f6e40388a79d54 100644 --- a/ee/app/assets/javascripts/analytics/dashboards/ai_impact/constants.js +++ b/ee/app/assets/javascripts/analytics/dashboards/ai_impact/constants.js @@ -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 TABLE_METRICS = { +export const AI_IMPACT_TABLE_METRICS = { ...pick(VSD_TABLE_METRICS, [ ...SUPPORTED_FLOW_METRICS, ...SUPPORTED_DORA_METRICS, ...SUPPORTED_VULNERABILITY_METRICS, ]), [AI_METRICS.CODE_SUGGESTIONS_USAGE_RATE]: { - label: s__('DORA4Metrics|Code Suggestions usage'), + label: s__('AiImpactAnalytics|Code Suggestions usage'), units: UNITS.PERCENT, }, }; diff --git a/ee/app/assets/javascripts/analytics/dashboards/ai_impact/utils.js b/ee/app/assets/javascripts/analytics/dashboards/ai_impact/utils.js index e9dbba29371ba3af651f6c3d855d087dbab272fa..258f870de3a931f3d9c534825dc96ccafd00fe0c 100644 --- a/ee/app/assets/javascripts/analytics/dashboards/ai_impact/utils.js +++ b/ee/app/assets/javascripts/analytics/dashboards/ai_impact/utils.js @@ -7,10 +7,10 @@ import { nSecondsBefore, } from '~/lib/utils/datetime_utility'; 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 getStartOfMonth = (now) => dateAtFirstDayOfMonth(getStartOfDay(now)); /** * Generates the time period columns, from This month -> 5 months ago. @@ -76,7 +76,7 @@ export const generateTableColumns = (now) => [ * @returns {Array} array of data-less table rows */ 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 }, invertTrendColor, })); @@ -118,7 +118,7 @@ const buildTableRow = ({ identifier, units, timePeriods }) => { * @returns {Object} object containing the same data, formatted for the table */ 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; return Object.assign(acc, { diff --git a/ee/app/assets/javascripts/analytics/dashboards/components/metric_table_cell.vue b/ee/app/assets/javascripts/analytics/dashboards/components/metric_table_cell.vue index 925b59838266b4d23ad22a364acc364834822149..ffa11f2df5bb90da9aa3f40a8b357233bc090306 100644 --- a/ee/app/assets/javascripts/analytics/dashboards/components/metric_table_cell.vue +++ b/ee/app/assets/javascripts/analytics/dashboards/components/metric_table_cell.vue @@ -4,7 +4,7 @@ import { joinPaths, mergeUrlParams } from '~/lib/utils/url_utility'; import { METRIC_TOOLTIPS } from '~/analytics/shared/constants'; import { s__ } from '~/locale'; 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 { name: 'MetricTableCell', diff --git a/locale/gitlab.pot b/locale/gitlab.pot index a0f8363796cfb2fba8c970fbf6842dc99ebbb587..7a22b15b298569ccc2f5027dc4c65d7bb48a287a 100644 --- a/locale/gitlab.pot +++ b/locale/gitlab.pot @@ -4642,6 +4642,12 @@ msgstr "" msgid "AiAnalytics|the ClickHouse data store is not available" 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" msgstr "" @@ -15970,9 +15976,6 @@ msgstr "" msgid "DORA4Metrics|Change failure rate (percentage)" msgstr "" -msgid "DORA4Metrics|Code Suggestions usage" -msgstr "" - msgid "DORA4Metrics|Contributor count" msgstr "" @@ -56215,9 +56218,6 @@ msgstr "" msgid "ValueStreamAnalytics|Merge request analytics" 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" msgstr ""