summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/models/concerns/enums/package_metadata.rb18
-rw-r--r--app/views/admin/application_settings/_localization.html.haml2
-rw-r--r--app/views/admin/applications/index.html.haml4
-rw-r--r--app/views/admin/system_info/show.html.haml8
-rw-r--r--app/views/layouts/_snowplow.html.haml7
-rw-r--r--app/views/projects/environments/show.html.haml2
-rw-r--r--app/views/projects/pages_domains/_certificate.html.haml2
7 files changed, 31 insertions, 12 deletions
diff --git a/app/models/concerns/enums/package_metadata.rb b/app/models/concerns/enums/package_metadata.rb
index 69108ae9cc4..3f107987ef6 100644
--- a/app/models/concerns/enums/package_metadata.rb
+++ b/app/models/concerns/enums/package_metadata.rb
@@ -22,6 +22,16 @@ module Enums
trivy: 2
}.with_indifferent_access.freeze
+ DATA_TYPES = {
+ advisories: 1,
+ licenses: 2
+ }.with_indifferent_access.freeze
+
+ VERSION_FORMATS = {
+ v1: 1,
+ v2: 2
+ }.with_indifferent_access.freeze
+
def self.purl_types
PURL_TYPES
end
@@ -33,5 +43,13 @@ module Enums
def self.advisory_sources
ADVISORY_SOURCES
end
+
+ def self.data_types
+ DATA_TYPES
+ end
+
+ def self.version_formats
+ VERSION_FORMATS
+ end
end
end
diff --git a/app/views/admin/application_settings/_localization.html.haml b/app/views/admin/application_settings/_localization.html.haml
index 9ec4afec484..669c47bafba 100644
--- a/app/views/admin/application_settings/_localization.html.haml
+++ b/app/views/admin/application_settings/_localization.html.haml
@@ -20,7 +20,7 @@
= _('Default language')
= f.select :default_preferred_language, default_preferred_language_choices, {}, class: 'gl-form-select custom-select'
.form-text.text-muted
- = s_('Default language for users who are not logged in.')
+ = _('Default language for users who are not logged in.')
= f.submit _('Save changes'), pajamas_button: true
diff --git a/app/views/admin/applications/index.html.haml b/app/views/admin/applications/index.html.haml
index 60aa7ae1c56..e32a50e252d 100644
--- a/app/views/admin/applications/index.html.haml
+++ b/app/views/admin/applications/index.html.haml
@@ -15,12 +15,12 @@
.gl-max-w-full.gl-m-auto
%h1.h4.gl-font-size-h-display= s_('AdminArea|No applications found')
= render Pajamas::ButtonComponent.new(href: new_admin_application_path, variant: :confirm, button_options: { data: { qa_selector: 'new_application_button' } }) do
- = s_('New application')
+ = _('New application')
- else
%hr
= render Pajamas::ButtonComponent.new(href: new_admin_application_path, variant: :confirm, button_options: { data: { qa_selector: 'new_application_button' } }) do
- = s_('New application')
+ = _('New application')
.table-responsive
%table.b-table.gl-table.gl-w-full{ role: 'table' }
diff --git a/app/views/admin/system_info/show.html.haml b/app/views/admin/system_info/show.html.haml
index 097329a027c..75d23ee3094 100644
--- a/app/views/admin/system_info/show.html.haml
+++ b/app/views/admin/system_info/show.html.haml
@@ -7,7 +7,7 @@
= c.body do
%h4
= sprite_icon('pod', size: 18, css_class: 'gl-text-gray-700')
- = s_('CPU')
+ = _('CPU')
.data
- if @cpus
%h2= _('%{cores} cores') % { cores: @cpus.length }
@@ -19,7 +19,7 @@
= c.body do
%h4
= sprite_icon('status-health', size: 18, css_class: 'gl-text-gray-700')
- = s_('Memory Usage')
+ = _('Memory Usage')
.data
- if @memory
%h2 #{number_to_human_size(@memory.active_bytes)} / #{number_to_human_size(@memory.total_bytes)}
@@ -31,7 +31,7 @@
= c.body do
%h4
= sprite_icon('clock', size: 18, css_class: 'gl-text-gray-700')
- = s_('System started')
+ = _('System started')
.data
%h2= time_ago_with_tooltip(Rails.application.config.booted_at)
.col-sm
@@ -39,7 +39,7 @@
= c.body do
%h4
= sprite_icon('disk', size: 18, css_class: 'gl-text-gray-700')
- = s_('Disk Usage')
+ = _('Disk Usage')
.data
- @disks.each do |disk|
%h2 #{number_to_human_size(disk[:bytes_used])} / #{number_to_human_size(disk[:bytes_total])}
diff --git a/app/views/layouts/_snowplow.html.haml b/app/views/layouts/_snowplow.html.haml
index 2288ffa620d..399a826d611 100644
--- a/app/views/layouts/_snowplow.html.haml
+++ b/app/views/layouts/_snowplow.html.haml
@@ -8,9 +8,10 @@
gl = window.gl || {};
gl.snowplowStandardContext = #{Gitlab::Tracking::StandardContext.new(
- namespace: namespace,
- project: @project,
- user: current_user,
+ namespace_id: namespace&.id,
+ plan_name: namespace&.actual_plan_name,
+ project_id: @project&.id,
+ user_id: current_user&.id,
new_nav: show_super_sidebar?
).to_context.to_json.to_json}
gl.snowplowPseudonymizedPageUrl = #{masked_page_url(group: namespace, project: @project).to_json};
diff --git a/app/views/projects/environments/show.html.haml b/app/views/projects/environments/show.html.haml
index 4666ee738d7..e97cae911d9 100644
--- a/app/views/projects/environments/show.html.haml
+++ b/app/views/projects/environments/show.html.haml
@@ -21,7 +21,7 @@
= html_escape(_("Define environments in the deploy stage(s) in %{code_open}.gitlab-ci.yml%{code_close} to track deployments here.")) % { code_open: '<code>'.html_safe, code_close: '</code>'.html_safe }
.text-center
= render Pajamas::ButtonComponent.new(variant: :confirm, href: help_page_path("ci/environments/index.md")) do
- = s_('Read more')
+ = _('Read more')
- else
.table-holder.gl-overflow-visible
diff --git a/app/views/projects/pages_domains/_certificate.html.haml b/app/views/projects/pages_domains/_certificate.html.haml
index 3433958a397..f3bf07bb487 100644
--- a/app/views/projects/pages_domains/_certificate.html.haml
+++ b/app/views/projects/pages_domains/_certificate.html.haml
@@ -32,7 +32,7 @@
.col-sm-10.offset-sm-2
= render Pajamas::CardComponent.new(body_options: { class: 'gl-display-flex gl-align-items-center gl-justify-content-space-between gl-p-5' }) do |c|
- c.header do
- = s_('Certificate')
+ = _('Certificate')
- c.body do
%span
= domain_presenter.pages_domain.subject || _('missing')