Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
99a190cf
Commit
99a190cf
authored
Mar 23, 2022
by
Winnie
Committed by
Bob Van Landuyt
Mar 23, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Provide Web Terminal paths to Core frontend
parent
24f7775a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
32 deletions
+17
-32
app/assets/javascripts/ide/stores/plugins/terminal.js
app/assets/javascripts/ide/stores/plugins/terminal.js
+4
-4
app/helpers/ide_helper.rb
app/helpers/ide_helper.rb
+5
-3
ee/app/helpers/ee/ide_helper.rb
ee/app/helpers/ee/ide_helper.rb
+0
-17
spec/frontend/ide/stores/plugins/terminal_spec.js
spec/frontend/ide/stores/plugins/terminal_spec.js
+8
-8
No files found.
app/assets/javascripts/ide/stores/plugins/terminal.js
View file @
99a190cf
...
@@ -3,10 +3,10 @@ import terminalModule from '../modules/terminal';
...
@@ -3,10 +3,10 @@ import terminalModule from '../modules/terminal';
function
getPathsFromData
(
el
)
{
function
getPathsFromData
(
el
)
{
return
{
return
{
webTerminalSvgPath
:
el
.
dataset
.
eeW
ebTerminalSvgPath
,
webTerminalSvgPath
:
el
.
dataset
.
w
ebTerminalSvgPath
,
webTerminalHelpPath
:
el
.
dataset
.
eeW
ebTerminalHelpPath
,
webTerminalHelpPath
:
el
.
dataset
.
w
ebTerminalHelpPath
,
webTerminalConfigHelpPath
:
el
.
dataset
.
eeW
ebTerminalConfigHelpPath
,
webTerminalConfigHelpPath
:
el
.
dataset
.
w
ebTerminalConfigHelpPath
,
webTerminalRunnersHelpPath
:
el
.
dataset
.
eeW
ebTerminalRunnersHelpPath
,
webTerminalRunnersHelpPath
:
el
.
dataset
.
w
ebTerminalRunnersHelpPath
,
};
};
}
}
...
...
app/helpers/ide_helper.rb
View file @
99a190cf
...
@@ -20,7 +20,11 @@ module IdeHelper
...
@@ -20,7 +20,11 @@ module IdeHelper
'fork-info'
=>
@fork_info
&
.
to_json
,
'fork-info'
=>
@fork_info
&
.
to_json
,
'project'
=>
convert_to_project_entity_json
(
@project
),
'project'
=>
convert_to_project_entity_json
(
@project
),
'enable-environments-guidance'
=>
enable_environments_guidance?
.
to_s
,
'enable-environments-guidance'
=>
enable_environments_guidance?
.
to_s
,
'preview-markdown-path'
=>
@project
&&
preview_markdown_path
(
@project
)
'preview-markdown-path'
=>
@project
&&
preview_markdown_path
(
@project
),
'web-terminal-svg-path'
=>
image_path
(
'illustrations/web-ide_promotion.svg'
),
'web-terminal-help-path'
=>
help_page_path
(
'user/project/web_ide/index.md'
,
anchor:
'interactive-web-terminals-for-the-web-ide'
),
'web-terminal-config-help-path'
=>
help_page_path
(
'user/project/web_ide/index.md'
,
anchor:
'web-ide-configuration-file'
),
'web-terminal-runners-help-path'
=>
help_page_path
(
'user/project/web_ide/index.md'
,
anchor:
'runner-configuration'
)
}
}
end
end
...
@@ -44,5 +48,3 @@ module IdeHelper
...
@@ -44,5 +48,3 @@ module IdeHelper
current_user
.
dismissed_callout?
(
feature_name:
'web_ide_ci_environments_guidance'
)
current_user
.
dismissed_callout?
(
feature_name:
'web_ide_ci_environments_guidance'
)
end
end
end
end
::
IdeHelper
.
prepend_mod_with
(
'IdeHelper'
)
ee/app/helpers/ee/ide_helper.rb
deleted
100644 → 0
View file @
24f7775a
# frozen_string_literal: true
module
EE
module
IdeHelper
extend
::
Gitlab
::
Utils
::
Override
override
:ide_data
def
ide_data
super
.
merge
({
"ee-web-terminal-svg-path"
=>
image_path
(
'illustrations/web-ide_promotion.svg'
),
"ee-web-terminal-help-path"
=>
help_page_path
(
'user/project/web_ide/index.md'
,
anchor:
'interactive-web-terminals-for-the-web-ide'
),
"ee-web-terminal-config-help-path"
=>
help_page_path
(
'user/project/web_ide/index.md'
,
anchor:
'web-ide-configuration-file'
),
"ee-web-terminal-runners-help-path"
=>
help_page_path
(
'user/project/web_ide/index.md'
,
anchor:
'runner-configuration'
)
})
end
end
end
spec/frontend/ide/stores/plugins/terminal_spec.js
View file @
99a190cf
...
@@ -6,10 +6,10 @@ import { SET_BRANCH_WORKING_REFERENCE } from '~/ide/stores/mutation_types';
...
@@ -6,10 +6,10 @@ import { SET_BRANCH_WORKING_REFERENCE } from '~/ide/stores/mutation_types';
import
createTerminalPlugin
from
'
~/ide/stores/plugins/terminal
'
;
import
createTerminalPlugin
from
'
~/ide/stores/plugins/terminal
'
;
const
TEST_DATASET
=
{
const
TEST_DATASET
=
{
eeW
ebTerminalSvgPath
:
`
${
TEST_HOST
}
/web/terminal/svg`
,
w
ebTerminalSvgPath
:
`
${
TEST_HOST
}
/web/terminal/svg`
,
eeW
ebTerminalHelpPath
:
`
${
TEST_HOST
}
/web/terminal/help`
,
w
ebTerminalHelpPath
:
`
${
TEST_HOST
}
/web/terminal/help`
,
eeW
ebTerminalConfigHelpPath
:
`
${
TEST_HOST
}
/web/terminal/config/help`
,
w
ebTerminalConfigHelpPath
:
`
${
TEST_HOST
}
/web/terminal/config/help`
,
eeW
ebTerminalRunnersHelpPath
:
`
${
TEST_HOST
}
/web/terminal/runners/help`
,
w
ebTerminalRunnersHelpPath
:
`
${
TEST_HOST
}
/web/terminal/runners/help`
,
};
};
Vue
.
use
(
Vuex
);
Vue
.
use
(
Vuex
);
...
@@ -40,10 +40,10 @@ describe('ide/stores/extend', () => {
...
@@ -40,10 +40,10 @@ describe('ide/stores/extend', () => {
it
(
'
dispatches terminal/setPaths
'
,
()
=>
{
it
(
'
dispatches terminal/setPaths
'
,
()
=>
{
expect
(
store
.
dispatch
).
toHaveBeenCalledWith
(
'
terminal/setPaths
'
,
{
expect
(
store
.
dispatch
).
toHaveBeenCalledWith
(
'
terminal/setPaths
'
,
{
webTerminalSvgPath
:
TEST_DATASET
.
eeW
ebTerminalSvgPath
,
webTerminalSvgPath
:
TEST_DATASET
.
w
ebTerminalSvgPath
,
webTerminalHelpPath
:
TEST_DATASET
.
eeW
ebTerminalHelpPath
,
webTerminalHelpPath
:
TEST_DATASET
.
w
ebTerminalHelpPath
,
webTerminalConfigHelpPath
:
TEST_DATASET
.
eeW
ebTerminalConfigHelpPath
,
webTerminalConfigHelpPath
:
TEST_DATASET
.
w
ebTerminalConfigHelpPath
,
webTerminalRunnersHelpPath
:
TEST_DATASET
.
eeW
ebTerminalRunnersHelpPath
,
webTerminalRunnersHelpPath
:
TEST_DATASET
.
w
ebTerminalRunnersHelpPath
,
});
});
});
});
...
...
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