Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
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
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ophélie Gagnard
slapos.core
Commits
7548f696
Commit
7548f696
authored
May 25, 2021
by
Lu Xu
👀
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_jio: add Base_getContextualHelpList.py for panel
parent
69095b74
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
120 additions
and
3 deletions
+120
-3
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/Base_getContextualHelpList.py
...skins/slapos_hal_json_style/Base_getContextualHelpList.py
+120
-3
No files found.
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/Base_getContextualHelpList.py
View file @
7548f696
import
json
contextual_help_list
=
[]
web_site
=
context
.
getWebSiteValue
()
#contextual_help_list.append(
# {"title": "XX", "href": "LLLL"}
#)
if
web_site
is
None
:
return
json
.
dumps
(
contextual_help_list
)
web_site_id
=
web_site
.
getRelativeUrl
().
split
(
'/'
)[
1
]
if
web_site_id
not
in
[
"rapidspacejs"
,
"hostingjs"
]:
return
json
.
dumps
(
contextual_help_list
)
if
context
.
getPortalType
()
==
"Hosting Subscription"
:
if
web_site_id
==
"hostingjs"
and
context
.
getSourceReference
()
==
"kvm-cluster"
:
contextual_help_list
.
extend
([
{
"title"
:
"Connect noVNC Over IPv4"
,
"href"
:
"https://handbook.rapid.space/user/rapidspace-HowTo.Connect.To.A.VPS.Via.VNC.Over.IPv4.On.Rapid.Space"
},
{
"title"
:
"Connect noVNC Over IPv6"
,
"href"
:
"https://handbook.rapid.space/user/rapidspace-HowTo.Connect.To.A.VPS.Via.VNC.Over.IPv6.On.Rapid.Space"
},
{
"title"
:
"Install Default Debian OS"
,
"href"
:
"https://handbook.rapid.space/user/rapidspace-HowTo.VPS.Install.Default.Linux"
},
{
"title"
:
"Install Other Linux OS"
,
"href"
:
"https://handbook.rapid.space/user/rapidspace-HowTo.Deploy.A.VPS.With.A.Different.Linux.Distribution.On.Rapid.Space"
},
{
"title"
:
"Redirect VPS Ports"
,
"href"
:
"https://handbook.rapid.space/user/rapidspace-HowTo.Redirect.VPS.Ports.On.Rapid.Space"
},
{
"title"
:
"Install IPv6 Inside VPS"
,
"href"
:
"https://handbook.rapid.space/user/rapidspace-HowTo.Install.IPv6.Inside.VM"
},
{
"title"
:
"SSH to VPS"
,
"href"
:
"https://handbook.rapid.space/user/rapidspace-HowTo.Access.A.VPS.Via.Ssh.On.Rapid.Space"
},
{
"title"
:
"SSH to VPS"
,
"href"
:
"https://handbook.rapid.space/user/rapidspace-HowTo.Access.A.VPS.Via.Ssh.On.Rapid.Space"
},
{
"title"
:
"Install Other OS"
,
"href"
:
"https://handbook.rapid.space/user/rapidspace-HowTo.Deploy.A.VPS.With.Other.OS.On.Rapid.Space"
},
{
"title"
:
"Install Windows OS"
,
"href"
:
"https://handbook.rapid.space/user/rapidspace-HowTo.Deploy.A.VPS.With.Windows.On.Rapid.Space"
},
{
"title"
:
"Configure IPv6 For Windows"
,
"href"
:
"https://handbook.rapid.space/user/rapidspace-HowTo.Configure.IPv6.Address.To.Get.Remote.Access.To.Windows.VPS"
},
{
"title"
:
"Monitor VPS"
,
"href"
:
"https://handbook.rapid.space/user/rapidspace-HowTo.Monitor.A.VPS.On.Rapid.Space"
}
])
elif
context
.
getPortalType
()
==
"Accounting Transaction Module"
:
if
web_site_id
==
"hostingjs"
:
contextual_help_list
.
extend
([
{
"title"
:
"Payment Options"
,
"href"
:
"https://handbook.rapid.space/user/faq/rapidspace-Faq.What.Are.The.Payment.Options"
}
])
elif
context
.
getPortalType
()
==
"Hosting Subscription Module"
:
if
web_site_id
==
"hostingjs"
:
contextual_help_list
.
extend
([
{
"title"
:
"Access Services"
,
"href"
:
"https://handbook.rapid.space/user/rapidspace-HowTo.Access.Rapid.Space.Services"
},
{
"title"
:
"Use Panel"
,
"href"
:
"https://handbook.rapid.space/user/rapidspace-HowTo.Use.Rapid.Space.Panel"
},
{
"title"
:
"Order A Second Machine"
,
"href"
:
"https://handbook.rapid.space/user/faq/rapidspace-Faq.Can.I.Order.A.Second.Machine"
},
{
"title"
:
"Get Free Services"
,
"href"
:
"https://handbook.rapid.space/user/faq/rapidspace-Faq.Is.There.Any.Free.Services.I.Can.Access"
},
{
"title"
:
"Purchase Other Services"
,
"href"
:
"https://handbook.rapid.space/user/faq/rapidspace-Faq.Can.I.Purchase.Other.Types.Of.Service"
},
{
"title"
:
"Know More Services"
,
"href"
:
"https://handbook.rapid.space/user/faq/rapidspace-What.Are.The.Services.That.Rapid.Space.Cloud.Can.Provide"
}
])
elif
context
.
getPortalType
()
==
"Person Module"
:
if
web_site_id
==
"hostingjs"
:
contextual_help_list
.
extend
([
{
"title"
:
"Request A Test Account"
,
"href"
:
"https://handbook.rapid.space/user/faq/rapidspace-Can.I.Request.A.Test.Account.To.Try"
},
{
"title"
:
"Associate With More VMs"
,
"href"
:
"http://handbook.rapid.space/user/faq/rapidspace-Faq.My.Account.Is.Associate.With.Only.One.VM"
}
])
elif
context
.
getPortalType
()
==
"Support Request Module"
:
if
web_site_id
==
"hostingjs"
:
contextual_help_list
.
extend
([
{
"title"
:
"Add Tickets"
,
"href"
:
"https://handbook.rapid.space/user/rapidspace-HowTo.Add.A.Ticket.To.Contact.Rapid.Space.Team"
},
{
"title"
:
"Use Panel"
,
"href"
:
"https://handbook.rapid.space/user/rapidspace-HowTo.Use.Rapid.Space.Panel"
},
{
"title"
:
"User Handbook"
,
"href"
:
"https://handbook.rapid.space/user"
},
{
"title"
:
"Learning Track"
,
"href"
:
"https://handbook.rapid.space/user/rapidspace-Learning.Track"
},
{
"title"
:
"User FAQ"
,
"href"
:
"https://handbook.rapid.space/user/faq"
},
{
"title"
:
"Contacts"
,
"href"
:
"https://handbook.rapid.space/contact"
}
])
elif
context
.
getPortalType
()
==
"Software Release Module"
:
if
web_site_id
==
"hostingjs"
:
contextual_help_list
.
extend
([
{
"title"
:
"Get Free Services"
,
"href"
:
"https://handbook.rapid.space/user/faq/rapidspace-Faq.Is.There.Any.Free.Services.I.Can.Access"
}
])
elif
context
.
getPortalType
()
==
"Project Module"
:
if
web_site_id
==
"hostingjs"
:
contextual_help_list
.
extend
([
{
"title"
:
"Add Projects"
,
"href"
:
"https://handbook.rapid.space/user/rapidspace-HowTo.Add.A.New.Project"
}
])
elif
context
.
getPortalType
()
==
"Computer Module"
:
if
web_site_id
==
"hostingjs"
:
contextual_help_list
.
extend
([
{
"title"
:
"Install SlapOS Node On PC"
,
"href"
:
"https://handbook.rapid.space/user/rapidspace-HowTo.Install.Slapos.Node.Comp.123"
},
{
"title"
:
"Install SlapOS Node On KVM"
,
"href"
:
"https://handbook.rapid.space/user/rapidspace-Install.SlapOS.Node.Comp.123.On.Rapid.Space.KVM"
},
{
"title"
:
"Associate Computers"
,
"href"
:
"https://handbook.rapid.space/user/rapidspace-HowTo.Associate.A.Computer"
}
])
elif
context
.
getPortalType
()
==
"Computer Network Module"
:
if
web_site_id
==
"hostingjs"
:
contextual_help_list
.
extend
([
{
"title"
:
"Add Networks"
,
"href"
:
"https://handbook.rapid.space/user/rapidspace-HowTo.Add.A.New.Network"
}
])
elif
context
.
getPortalType
()
==
"Organisation Module"
:
if
web_site_id
==
"hostingjs"
:
contextual_help_list
.
extend
([
{
"title"
:
"Classify Nodes"
,
"href"
:
"https://handbook.rapid.space/user/slapos-HowTo.Classify.Node.In.A.Network"
}
])
# Translate titles
for
contextual_help
in
contextual_help_list
:
contextual_help
[
'title'
]
=
context
.
Base_translateString
(
contextual_help
[
'title'
])
return
json
.
dumps
(
contextual_help_list
)
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