Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add placeholders for using scaffold #844

Merged
merged 8 commits into from
Jan 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions pkg/apiserver/apiserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ import (
"github.com/pingcap-incubator/tidb-dashboard/pkg/apiserver/metrics"
"github.com/pingcap-incubator/tidb-dashboard/pkg/apiserver/profiling"
"github.com/pingcap-incubator/tidb-dashboard/pkg/apiserver/queryeditor"

// "github.com/pingcap-incubator/tidb-dashboard/pkg/apiserver/__APP_NAME__"
// NOTE: Don't remove above comment line, it is a placeholder for code generator
"github.com/pingcap-incubator/tidb-dashboard/pkg/apiserver/slowquery"
"github.com/pingcap-incubator/tidb-dashboard/pkg/apiserver/statement"
"github.com/pingcap-incubator/tidb-dashboard/pkg/apiserver/user"
Expand Down Expand Up @@ -123,6 +126,8 @@ func (s *Service) Start(ctx context.Context) error {
metrics.NewService,
queryeditor.NewService,
configuration.NewService,
// __APP_NAME__.NewService,
// NOTE: Don't remove above comment line, it is a placeholder for code generator
),
fx.Populate(&s.apiHandlerEngine),
fx.Invoke(
Expand All @@ -138,6 +143,8 @@ func (s *Service) Start(ctx context.Context) error {
metrics.RegisterRouter,
queryeditor.RegisterRouter,
configuration.RegisterRouter,
// __APP_NAME__.RegisterRouter,
// NOTE: Don't remove above comment line, it is a placeholder for code generator
// Must be at the end
s.status.Register,
),
Expand Down
4 changes: 4 additions & 0 deletions ui/dashboardApp/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ import AppSearchLogs from '@lib/apps/SearchLogs/index.meta'
import AppInstanceProfiling from '@lib/apps/InstanceProfiling/index.meta'
import AppQueryEditor from '@lib/apps/QueryEditor/index.meta'
import AppConfiguration from '@lib/apps/Configuration/index.meta'
// import __APP_NAME__ from '@lib/apps/__APP_NAME__/index.meta'
// NOTE: Don't remove above comment line, it is a placeholder for code generator

function removeSpinner() {
const spinner = document.getElementById('dashboard_page_spinner')
Expand Down Expand Up @@ -109,6 +111,8 @@ async function main() {
.register(AppInstanceProfiling)
.register(AppQueryEditor)
.register(AppConfiguration)
// .register(__APP_NAME__)
// NOTE: Don't remove above comment line, it is a placeholder for code generator

if (routing.isLocationMatch('/')) {
singleSpa.navigateToUrl('#' + registry.getDefaultRouter())
Expand Down
2 changes: 2 additions & 0 deletions ui/dashboardApp/layout/main/Sider/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ function Sider({
useAppMenuItem(registry, 'system_report'),
useAppMenuItem(registry, 'diagnose'),
useAppMenuItem(registry, 'search_logs'),
// useAppMenuItem(registry, '__APP_NAME__'),
// NOTE: Don't remove above comment line, it is a placeholder for code generator
debugSubMenu,
]

Expand Down