Commit 5dad1cf7 authored by Bob Van Landuyt's avatar Bob Van Landuyt

Merge branch 'winniehell-web-ide-terminal' into 'master'

Provide Web Terminal paths to Core frontend

See merge request gitlab-org/gitlab!82145
parents 1cffa4a3 99a190cf
......@@ -3,10 +3,10 @@ import terminalModule from '../modules/terminal';
function getPathsFromData(el) {
return {
webTerminalSvgPath: el.dataset.eeWebTerminalSvgPath,
webTerminalHelpPath: el.dataset.eeWebTerminalHelpPath,
webTerminalConfigHelpPath: el.dataset.eeWebTerminalConfigHelpPath,
webTerminalRunnersHelpPath: el.dataset.eeWebTerminalRunnersHelpPath,
webTerminalSvgPath: el.dataset.webTerminalSvgPath,
webTerminalHelpPath: el.dataset.webTerminalHelpPath,
webTerminalConfigHelpPath: el.dataset.webTerminalConfigHelpPath,
webTerminalRunnersHelpPath: el.dataset.webTerminalRunnersHelpPath,
};
}
......
......@@ -20,7 +20,11 @@ module IdeHelper
'fork-info' => @fork_info&.to_json,
'project' => convert_to_project_entity_json(@project),
'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
......@@ -44,5 +48,3 @@ module IdeHelper
current_user.dismissed_callout?(feature_name: 'web_ide_ci_environments_guidance')
end
end
::IdeHelper.prepend_mod_with('IdeHelper')
# 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
......@@ -6,10 +6,10 @@ import { SET_BRANCH_WORKING_REFERENCE } from '~/ide/stores/mutation_types';
import createTerminalPlugin from '~/ide/stores/plugins/terminal';
const TEST_DATASET = {
eeWebTerminalSvgPath: `${TEST_HOST}/web/terminal/svg`,
eeWebTerminalHelpPath: `${TEST_HOST}/web/terminal/help`,
eeWebTerminalConfigHelpPath: `${TEST_HOST}/web/terminal/config/help`,
eeWebTerminalRunnersHelpPath: `${TEST_HOST}/web/terminal/runners/help`,
webTerminalSvgPath: `${TEST_HOST}/web/terminal/svg`,
webTerminalHelpPath: `${TEST_HOST}/web/terminal/help`,
webTerminalConfigHelpPath: `${TEST_HOST}/web/terminal/config/help`,
webTerminalRunnersHelpPath: `${TEST_HOST}/web/terminal/runners/help`,
};
Vue.use(Vuex);
......@@ -40,10 +40,10 @@ describe('ide/stores/extend', () => {
it('dispatches terminal/setPaths', () => {
expect(store.dispatch).toHaveBeenCalledWith('terminal/setPaths', {
webTerminalSvgPath: TEST_DATASET.eeWebTerminalSvgPath,
webTerminalHelpPath: TEST_DATASET.eeWebTerminalHelpPath,
webTerminalConfigHelpPath: TEST_DATASET.eeWebTerminalConfigHelpPath,
webTerminalRunnersHelpPath: TEST_DATASET.eeWebTerminalRunnersHelpPath,
webTerminalSvgPath: TEST_DATASET.webTerminalSvgPath,
webTerminalHelpPath: TEST_DATASET.webTerminalHelpPath,
webTerminalConfigHelpPath: TEST_DATASET.webTerminalConfigHelpPath,
webTerminalRunnersHelpPath: TEST_DATASET.webTerminalRunnersHelpPath,
});
});
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment