Skip to content

Commit 528bc4e

Browse files
Rename to openDesk
1 parent cb0ac9b commit 528bc4e

39 files changed

+213
-203
lines changed

Gemfile.lock

+89-82
Original file line numberDiff line numberDiff line change
@@ -1,150 +1,157 @@
11
PATH
22
remote: .
33
specs:
4-
openproject-souvap (0.0.1)
4+
openproject-open_desk (0.0.1)
55
rails (~> 7.0)
66

77
GEM
88
remote: https://rubygems.org/
99
specs:
10-
actioncable (7.0.4)
11-
actionpack (= 7.0.4)
12-
activesupport (= 7.0.4)
10+
actioncable (7.0.8)
11+
actionpack (= 7.0.8)
12+
activesupport (= 7.0.8)
1313
nio4r (~> 2.0)
1414
websocket-driver (>= 0.6.1)
15-
actionmailbox (7.0.4)
16-
actionpack (= 7.0.4)
17-
activejob (= 7.0.4)
18-
activerecord (= 7.0.4)
19-
activestorage (= 7.0.4)
20-
activesupport (= 7.0.4)
15+
actionmailbox (7.0.8)
16+
actionpack (= 7.0.8)
17+
activejob (= 7.0.8)
18+
activerecord (= 7.0.8)
19+
activestorage (= 7.0.8)
20+
activesupport (= 7.0.8)
2121
mail (>= 2.7.1)
2222
net-imap
2323
net-pop
2424
net-smtp
25-
actionmailer (7.0.4)
26-
actionpack (= 7.0.4)
27-
actionview (= 7.0.4)
28-
activejob (= 7.0.4)
29-
activesupport (= 7.0.4)
25+
actionmailer (7.0.8)
26+
actionpack (= 7.0.8)
27+
actionview (= 7.0.8)
28+
activejob (= 7.0.8)
29+
activesupport (= 7.0.8)
3030
mail (~> 2.5, >= 2.5.4)
3131
net-imap
3232
net-pop
3333
net-smtp
3434
rails-dom-testing (~> 2.0)
35-
actionpack (7.0.4)
36-
actionview (= 7.0.4)
37-
activesupport (= 7.0.4)
38-
rack (~> 2.0, >= 2.2.0)
35+
actionpack (7.0.8)
36+
actionview (= 7.0.8)
37+
activesupport (= 7.0.8)
38+
rack (~> 2.0, >= 2.2.4)
3939
rack-test (>= 0.6.3)
4040
rails-dom-testing (~> 2.0)
4141
rails-html-sanitizer (~> 1.0, >= 1.2.0)
42-
actiontext (7.0.4)
43-
actionpack (= 7.0.4)
44-
activerecord (= 7.0.4)
45-
activestorage (= 7.0.4)
46-
activesupport (= 7.0.4)
42+
actiontext (7.0.8)
43+
actionpack (= 7.0.8)
44+
activerecord (= 7.0.8)
45+
activestorage (= 7.0.8)
46+
activesupport (= 7.0.8)
4747
globalid (>= 0.6.0)
4848
nokogiri (>= 1.8.5)
49-
actionview (7.0.4)
50-
activesupport (= 7.0.4)
49+
actionview (7.0.8)
50+
activesupport (= 7.0.8)
5151
builder (~> 3.1)
5252
erubi (~> 1.4)
5353
rails-dom-testing (~> 2.0)
5454
rails-html-sanitizer (~> 1.1, >= 1.2.0)
55-
activejob (7.0.4)
56-
activesupport (= 7.0.4)
55+
activejob (7.0.8)
56+
activesupport (= 7.0.8)
5757
globalid (>= 0.3.6)
58-
activemodel (7.0.4)
59-
activesupport (= 7.0.4)
60-
activerecord (7.0.4)
61-
activemodel (= 7.0.4)
62-
activesupport (= 7.0.4)
63-
activestorage (7.0.4)
64-
actionpack (= 7.0.4)
65-
activejob (= 7.0.4)
66-
activerecord (= 7.0.4)
67-
activesupport (= 7.0.4)
58+
activemodel (7.0.8)
59+
activesupport (= 7.0.8)
60+
activerecord (7.0.8)
61+
activemodel (= 7.0.8)
62+
activesupport (= 7.0.8)
63+
activestorage (7.0.8)
64+
actionpack (= 7.0.8)
65+
activejob (= 7.0.8)
66+
activerecord (= 7.0.8)
67+
activesupport (= 7.0.8)
6868
marcel (~> 1.0)
6969
mini_mime (>= 1.1.0)
70-
activesupport (7.0.4)
70+
activesupport (7.0.8)
7171
concurrent-ruby (~> 1.0, >= 1.0.2)
7272
i18n (>= 1.6, < 2)
7373
minitest (>= 5.1)
7474
tzinfo (~> 2.0)
7575
builder (3.2.4)
76-
concurrent-ruby (1.1.10)
76+
concurrent-ruby (1.2.2)
7777
crass (1.0.6)
78-
erubi (1.11.0)
79-
globalid (1.0.0)
80-
activesupport (>= 5.0)
81-
i18n (1.12.0)
78+
date (3.3.3)
79+
erubi (1.12.0)
80+
globalid (1.2.1)
81+
activesupport (>= 6.1)
82+
i18n (1.14.1)
8283
concurrent-ruby (~> 1.0)
83-
loofah (2.19.0)
84+
loofah (2.21.3)
8485
crass (~> 1.0.2)
85-
nokogiri (>= 1.5.9)
86-
mail (2.7.1)
86+
nokogiri (>= 1.12.0)
87+
mail (2.8.1)
8788
mini_mime (>= 0.1.1)
89+
net-imap
90+
net-pop
91+
net-smtp
8892
marcel (1.0.2)
8993
method_source (1.0.0)
90-
mini_mime (1.1.2)
91-
minitest (5.16.3)
92-
net-imap (0.3.1)
94+
mini_mime (1.1.5)
95+
minitest (5.20.0)
96+
net-imap (0.3.7)
97+
date
9398
net-protocol
9499
net-pop (0.1.2)
95100
net-protocol
96-
net-protocol (0.1.3)
101+
net-protocol (0.2.1)
97102
timeout
98103
net-smtp (0.3.3)
99104
net-protocol
100-
nio4r (2.5.8)
101-
nokogiri (1.13.9-x86_64-linux)
105+
nio4r (2.5.9)
106+
nokogiri (1.15.4-arm64-darwin)
102107
racc (~> 1.4)
103-
racc (1.6.0)
104-
rack (2.2.4)
105-
rack-test (2.0.2)
108+
racc (1.7.1)
109+
rack (2.2.8)
110+
rack-test (2.1.0)
106111
rack (>= 1.3)
107-
rails (7.0.4)
108-
actioncable (= 7.0.4)
109-
actionmailbox (= 7.0.4)
110-
actionmailer (= 7.0.4)
111-
actionpack (= 7.0.4)
112-
actiontext (= 7.0.4)
113-
actionview (= 7.0.4)
114-
activejob (= 7.0.4)
115-
activemodel (= 7.0.4)
116-
activerecord (= 7.0.4)
117-
activestorage (= 7.0.4)
118-
activesupport (= 7.0.4)
112+
rails (7.0.8)
113+
actioncable (= 7.0.8)
114+
actionmailbox (= 7.0.8)
115+
actionmailer (= 7.0.8)
116+
actionpack (= 7.0.8)
117+
actiontext (= 7.0.8)
118+
actionview (= 7.0.8)
119+
activejob (= 7.0.8)
120+
activemodel (= 7.0.8)
121+
activerecord (= 7.0.8)
122+
activestorage (= 7.0.8)
123+
activesupport (= 7.0.8)
119124
bundler (>= 1.15.0)
120-
railties (= 7.0.4)
121-
rails-dom-testing (2.0.3)
122-
activesupport (>= 4.2.0)
125+
railties (= 7.0.8)
126+
rails-dom-testing (2.2.0)
127+
activesupport (>= 5.0.0)
128+
minitest
123129
nokogiri (>= 1.6)
124-
rails-html-sanitizer (1.4.3)
125-
loofah (~> 2.3)
126-
railties (7.0.4)
127-
actionpack (= 7.0.4)
128-
activesupport (= 7.0.4)
130+
rails-html-sanitizer (1.6.0)
131+
loofah (~> 2.21)
132+
nokogiri (~> 1.14)
133+
railties (7.0.8)
134+
actionpack (= 7.0.8)
135+
activesupport (= 7.0.8)
129136
method_source
130137
rake (>= 12.2)
131138
thor (~> 1.0)
132139
zeitwerk (~> 2.5)
133140
rake (13.0.6)
134-
thor (1.2.1)
135-
timeout (0.3.0)
136-
tzinfo (2.0.5)
141+
thor (1.2.2)
142+
timeout (0.4.0)
143+
tzinfo (2.0.6)
137144
concurrent-ruby (~> 1.0)
138-
websocket-driver (0.7.5)
145+
websocket-driver (0.7.6)
139146
websocket-extensions (>= 0.1.0)
140147
websocket-extensions (0.1.5)
141-
zeitwerk (2.6.6)
148+
zeitwerk (2.6.11)
142149

143150
PLATFORMS
144151
ruby
145152

146153
DEPENDENCIES
147-
openproject-souvap!
154+
openproject-open_desk!
148155

149156
BUNDLED WITH
150157
2.2.32

README.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
# OpenProject Souvereign work place plugin
1+
# OpenProject openDesk integration
22

3-
This plugin provides extensions and hooks into the souvereign work place suite, such as, but not limited to:
3+
This plugin provides extensions and hooks into the openDesk application suite, such as, but not limited to:
44

55
- Navigation UI changes to match style
66
- Integration into central navigation portal
77
- Custom seeder to provide another base theme
88
- Extensions to the ENV configuration to provide settings
99

10-
1110
## Copyright and License
1211

1312
OpenProject is licensed under the terms of the GNU General Public License version 3.
File renamed without changes.
File renamed without changes.
File renamed without changes.

app/models/souvap.rb app/models/open_desk.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
# See COPYRIGHT and LICENSE files for more details.
2727
#++
2828

29-
module Souvap
29+
module OpenDesk
3030
LinkedApplication = Struct.new(:identifier, :icon, :name, :link, keyword_init: true)
3131
ApplicationGroup = Struct.new(:identifier, :name, :items, keyword_init: true)
3232
end
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
module DemoData
2+
module OpenDesk
3+
class ThemeSeeder < Seeder
4+
def seed_data!
5+
puts "*** Seeding openDesk specifics"
6+
7+
theme = OpenProject::CustomStyles::ColorThemes.themes.find do |t|
8+
t[:theme] == OpenProject::CustomStyles::ColorThemes::OPEN_DESK_THEME_NAME
9+
end
10+
11+
::Design::UpdateDesignService
12+
.new(theme)
13+
.call
14+
15+
custom_style = CustomStyle.current
16+
custom_style.logo = File.new(OpenProject::OpenDesk::Engine.root.join('app', 'assets', 'images', 'open_desk', 'logo.svg'))
17+
custom_style.favicon = File.new(OpenProject::OpenDesk::Engine.root.join('app', 'assets', 'images', 'open_desk', 'favicon.ico'))
18+
custom_style.save!
19+
custom_style.touch
20+
end
21+
22+
def applicable?
23+
DesignColor.all.empty?
24+
end
25+
end
26+
end
27+
end

app/seeders/demo_data/souvap/souvap_token_seeder.rb app/seeders/demo_data/open_desk/token_seeder.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
module DemoData
2-
module Souvap
3-
class SouvapTokenSeeder < Seeder
2+
module OpenDesk
3+
class TokenSeeder < Seeder
44
def seed_data!
5-
puts "*** Seeding Souvap license from ENV"
5+
puts "*** Seeding openDesk license from ENV"
66

77
token = Setting.enterprise_token
88
if token.present?

app/seeders/demo_data/souvap/souvap_theme_seeder.rb

-27
This file was deleted.

app/services/souvap/central_navigation_service.rb app/services/open_desk/central_navigation_service.rb

+16-12
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
# See COPYRIGHT and LICENSE files for more details.
2727
#++
2828

29-
module Souvap
29+
module OpenDesk
3030
class CentralNavigationService
3131
attr_reader :login, :locale
3232

@@ -53,19 +53,23 @@ def map_locale(language)
5353

5454
def make_request
5555
Rails.logger.debug { "Performing souvap request for #{login} with locale #{locale}." }
56-
response = RestClient
57-
.get(
58-
Setting.souvap_navigation_url,
59-
{
60-
params: { language: locale },
61-
'Accept' => "application/json",
62-
'Authorization' => "Basic #{credentials}"
63-
}
64-
)
65-
66-
raise "Failed to fetch central navigation data." if response.code >= 400
56+
uri = URI.parse(Setting.souvap_navigation_url)
57+
uri.query = URI.encode_www_form({ language: locale })
58+
response = Net::HTTP.get_response(
59+
uri,
60+
{
61+
'Accept' => "application/json",
62+
'Authorization' => "Basic #{credentials}"
63+
}
64+
)
6765

66+
case response
67+
when Net::HTTPSuccess
6868
response.body
69+
else
70+
Rails.logger.error "Failed to perform open_desk navigation request: #{response.code}"
71+
raise "Failed to fetch openDesk central navigation data"
72+
end
6973
end
7074

7175
def credentials
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<%= angular_component_tag 'op-opendesk-central-navigation' %>

app/views/souvap/menu/_top_menu_node.html.erb

-1
This file was deleted.

config/locales/de.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,5 @@
2727
#++
2828

2929
en:
30-
souvap:
30+
open_desk:
3131
central_navigation_menu: "openDesk navigation"

config/locales/en.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,5 @@
2727
#++
2828

2929
en:
30-
souvap:
30+
open_desk:
3131
central_navigation_menu: "openDesk navigation"

0 commit comments

Comments
 (0)