Skip to content

Comments

Add feature to disable terminal tab.#50

Open
jkupferer wants to merge 3 commits intoopenshift-homeroom:developfrom
jkupferer:develop
Open

Add feature to disable terminal tab.#50
jkupferer wants to merge 3 commits intoopenshift-homeroom:developfrom
jkupferer:develop

Conversation

@jkupferer
Copy link

This commit adds the ability to set TERMINAL_TAB=disable in order to
disable the terminal tab for workshops that do not require it.

resolves #49

This commit adds the ability to set TERMINAL_TAB=disable in order to
disable the terminal tab for workshops that do not require it.

resolves openshift-homeroom#49
@GrahamDumpleton
Copy link
Collaborator

Variable corresponding to ENABLE_TERMINAL should be passed through and changes to UI should be based off that rather than TERMINAL_TAB. Changing TERMINAL_TAB wouldn't actually disable the terminal access and it could still be accessed if using the correct URL. So better to trigger of ENABLE_TERMINAL instead.

@GrahamDumpleton
Copy link
Collaborator

More changes would be needed than that also. The problem is that the terminal tab is the initially selected tab. If none of the tabs have the selected attribute you end up with a blank pane as bootstrap doesn't know which to show. So you need to somehow work out which would be the first tab and mark it as selected instead.

@GrahamDumpleton
Copy link
Collaborator

The alternative is that setting of ENABLE_TERMINAL to anything but true results in TERMINAL_TAB then being set which triggers UI changed. Thus have option of still having terminal active but no UI shown, as could set separately. Either way need to resolve issue with working out which tab to mark as enabled so bootstrap is happy.

@GrahamDumpleton
Copy link
Collaborator

Should still perhaps pass ENABLE_TERMINAL through as variable into page template as when the tab is disabled, you can still have "Open Terminal" menu item if know underlying terminal is not disabled.

@jkupferer
Copy link
Author

Thanks for the quick response. I changed it to set terminal_tab based on the value of ENABLE_TERMINAL, but I'm not sure how to resolve the bootstrap issues.

@GrahamDumpleton
Copy link
Collaborator

Out of curiosity, what is the workshop you are creating going to cover, such that the terminal isn't needed?

@jkupferer
Copy link
Author

@GrahamDumpleton The workshop I had in mind is a workshop for installing OpenShift on OpenStack. For the OpenStack setup we are considering using VNC access to the VMs and command should be entered through the VNC consoles. The presence of the terminal may cause confusion in places about where to run commands.

@GrahamDumpleton
Copy link
Collaborator

You know there is a workshop content only mode? Or do you really want slides as well. The OpenShift web console will be useless to you if not working with the same cluster as homeroom is deployed into.

Set WORKSHOP_ONLY=true environment variable. This will result in full screen workshop content only.

@jkupferer
Copy link
Author

Right, and that is super helpful, but we're trying to leave open the possibility for workshops that don't want the terminal but may want slides or the console.

@GrahamDumpleton
Copy link
Collaborator

A way of fudging having the first tab be selected regardless, would be to add to the end of the last script section in the template:

$($('#workarea-nav>li>a')[0]).trigger("click");

@jkupferer
Copy link
Author

Ah! That works great. I found and fixed another bug while testing this and was able to validate it working now without the terminal tab.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add feature to disable terminal

2 participants