mirror of
https://github.com/grafana/grafana.git
synced 2025-07-30 08:22:44 +08:00
Connections: Support standalone plugin pages (#57772)
* feat(Connections): create sub-pages wrapped by `<Page>` * feat(Connections): rename the Connections page and update routes * feat(Connections): use new url for editing datasources * refactor(Connections): remove unused tab components * feat(Connections): update routes and nav titles * tests: fix tests for Connections * tests: fix typo in backend tests
This commit is contained in:
@ -534,29 +534,37 @@ func (s *ServiceImpl) buildDataConnectionsNavLink(c *models.ReqContext) *navtree
|
||||
var children []*navtree.NavLink
|
||||
var navLink *navtree.NavLink
|
||||
|
||||
baseId := "connections"
|
||||
baseUrl := s.cfg.AppSubURL + "/" + baseId
|
||||
baseUrl := s.cfg.AppSubURL + "/connections"
|
||||
|
||||
// Your connections
|
||||
children = append(children, &navtree.NavLink{
|
||||
Id: baseId + "-datasources",
|
||||
Text: "Data sources",
|
||||
Icon: "database",
|
||||
SubTitle: "Add and configure data sources",
|
||||
Url: baseUrl + "/datasources",
|
||||
Id: "connections-your-connections",
|
||||
Text: "Your connections",
|
||||
SubTitle: "Manage your existing connections",
|
||||
Url: baseUrl + "/your-connections",
|
||||
// Datasources
|
||||
Children: []*navtree.NavLink{{
|
||||
Id: "connections-your-connections-datasources",
|
||||
Text: "Datasources",
|
||||
SubTitle: "Manage your existing datasource connections",
|
||||
Url: baseUrl + "/your-connections/datasources",
|
||||
}},
|
||||
})
|
||||
|
||||
// Connect data
|
||||
children = append(children, &navtree.NavLink{
|
||||
Id: baseId + "-connect-data",
|
||||
Text: "Connect Data",
|
||||
Icon: "plug",
|
||||
SubTitle: "Manage data sources",
|
||||
Url: baseUrl + "/connect-data",
|
||||
Id: "connections-connect-data",
|
||||
Text: "Connect data",
|
||||
SubTitle: "Browse and create new connections",
|
||||
Url: s.cfg.AppSubURL + "/connections/connect-data",
|
||||
Children: []*navtree.NavLink{},
|
||||
})
|
||||
|
||||
// Connections (main)
|
||||
navLink = &navtree.NavLink{
|
||||
Text: "Connections",
|
||||
Icon: "link",
|
||||
Id: baseId,
|
||||
Id: "connections",
|
||||
Url: baseUrl,
|
||||
Children: children,
|
||||
Section: navtree.NavSectionCore,
|
||||
|
Reference in New Issue
Block a user