Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
tdkscms
gitlab-foss
Commits
938210b2
Commit
938210b2
authored
Jul 16, 2024
by
徐豪
Browse files
新增2个菜单
parent
1b5fffbb
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
99 additions
and
1 deletion
+99
-1
app/controllers/dashboard/jenkins_controller.rb
app/controllers/dashboard/jenkins_controller.rb
+7
-0
app/controllers/dashboard/sonarqube_controller.rb
app/controllers/dashboard/sonarqube_controller.rb
+7
-0
app/views/dashboard/jenkins/index.html.haml
app/views/dashboard/jenkins/index.html.haml
+4
-0
app/views/dashboard/sonarqube/index.html.haml
app/views/dashboard/sonarqube/index.html.haml
+4
-0
lib/gitlab/content_security_policy/directives.rb
lib/gitlab/content_security_policy/directives.rb
+1
-1
lib/sidebars/your_work/menus/jenkins_menu.rb
lib/sidebars/your_work/menus/jenkins_menu.rb
+34
-0
lib/sidebars/your_work/menus/sonarqube_menu.rb
lib/sidebars/your_work/menus/sonarqube_menu.rb
+34
-0
lib/sidebars/your_work/panel.rb
lib/sidebars/your_work/panel.rb
+2
-0
locale/gitlab.pot
locale/gitlab.pot
+6
-0
No files found.
app/controllers/dashboard/jenkins_controller.rb
0 → 100644
View file @
938210b2
# frozen_string_literal: true
class
Dashboard::JenkinsController
<
Dashboard
::
ApplicationController
def
index
# do something
end
end
app/controllers/dashboard/sonarqube_controller.rb
0 → 100644
View file @
938210b2
# frozen_string_literal: true
class
Dashboard::SonarQubeController
<
Dashboard
::
ApplicationController
def
index
# do something
end
end
app/views/dashboard/jenkins/index.html.haml
0 → 100644
View file @
938210b2
-
page_title
_
(
"Jenkins"
)
%section
%iframe
{
src:
"http://10.21.0.42:8000"
,
style:
"position:absolute; height:100%; width: 85%; left: 15%; overflow: hidden; border: 0;"
}
\ No newline at end of file
app/views/dashboard/sonarqube/index.html.haml
0 → 100644
View file @
938210b2
-
page_title
_
(
"SonarQube"
)
%section
%iframe
{
src:
"http://10.21.0.42:9000"
,
style:
"position:absolute; height:100%; width: 85%; left: 15%; overflow: hidden; border: 0;"
}
\ No newline at end of file
lib/gitlab/content_security_policy/directives.rb
View file @
938210b2
...
...
@@ -12,7 +12,7 @@ def self.connect_src
end
def
self
.
frame_src
"https://www.google.com/recaptcha/ https://www.recaptcha.net/ http
s
://
www.googletagmanager.com/ns.html
"
"https://www.google.com/recaptcha/ https://www.recaptcha.net/ http://
10.21.0.42:7000 http://10.21.0.42:8000 http://10.21.0.42:9000
"
end
def
self
.
script_src
...
...
lib/sidebars/your_work/menus/jenkins_menu.rb
0 → 100644
View file @
938210b2
# frozen_string_literal: true
module
Sidebars
module
YourWork
module
Menus
class
JenkinsMenu
<
::
Sidebars
::
Menu
override
:link
def
link
dashboard_jenkins_path
end
override
:title
def
title
_
(
'Jenkins'
)
end
override
:sprite_icon
def
sprite_icon
'rocket'
end
override
:render?
def
render?
!!
context
.
current_user
end
override
:active_routes
def
active_routes
{
path:
'dashboard/jenkins#index'
}
end
end
end
end
end
lib/sidebars/your_work/menus/sonarqube_menu.rb
0 → 100644
View file @
938210b2
# frozen_string_literal: true
module
Sidebars
module
YourWork
module
Menus
class
SonarQubeMenu
<
::
Sidebars
::
Menu
override
:link
def
link
dashboard_sonarqube_path
end
override
:title
def
title
_
(
'SonarQube'
)
end
override
:sprite_icon
def
sprite_icon
'search'
end
override
:render?
def
render?
!!
context
.
current_user
end
override
:active_routes
def
active_routes
{
path:
'dashboard/sonarqube#index'
}
end
end
end
end
end
lib/sidebars/your_work/panel.rb
View file @
938210b2
...
...
@@ -32,6 +32,8 @@ def add_menus
add_menu
(
Sidebars
::
YourWork
::
Menus
::
MilestonesMenu
.
new
(
context
))
add_menu
(
Sidebars
::
YourWork
::
Menus
::
SnippetsMenu
.
new
(
context
))
add_menu
(
Sidebars
::
YourWork
::
Menus
::
ActivityMenu
.
new
(
context
))
add_menu
(
Sidebars
::
YourWork
::
Menus
::
JenkinsMenu
.
new
(
context
))
add_menu
(
Sidebars
::
YourWork
::
Menus
::
SonarQubeMenu
.
new
(
context
))
end
end
end
...
...
locale/gitlab.pot
View file @
938210b2
...
...
@@ -2987,6 +2987,12 @@ msgstr ""
msgid "Activity"
msgstr ""
msgid "Jenkins"
msgstr ""
msgid "SonarQube"
msgstr ""
msgid "Activity|An error occurred while retrieving activity. Reload the page to try again."
msgstr ""
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment