Skip to content
This repository was archived by the owner on Jun 11, 2025. It is now read-only.
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@ nohup.out

.kl/secret*
__debug_bin
cmd/struct-to-graphql
9 changes: 9 additions & 0 deletions .tools/__http__/console/msvc.graphql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ global:
name: s1
---

label: List Managed Service Templates
query: |+
query Core_listMsvcTemplates {
core_listManagedServiceTemplates
}

---

label: List Managed Services
query: |+
query Core_listRouters($namespace: String!) {
Expand Down Expand Up @@ -95,4 +103,5 @@ query: |+
variables:
namespace: '{{.namespace}}'
name: "{{.name}}"

---
14 changes: 2 additions & 12 deletions .tools/gqlenv.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,7 @@
mode: dev
map:
dev:
# url: https://gateway.kloudlite.io
# url: https://gateway.dev.kloudlite.io
# url: ***REMOVED***
# url: http://localhost:3000/query
# url: http://auth-api.kl-core.svc.cluster.local/query
# url: http://finance-api.kl-core.svc.cluster.local/query
# url: http://localhost:3000/query
# url: http://console-api.kl-core.svc.cluster.local/query
# url: http://auth-api.kl-core.svc.cluster.local/query
# url: http://infra-api.kl-core.svc.cluster.local/query
# url: http://infra-api.kl-core.svc.cluster.local/query
url: http://gateway-api.kl-core.svc.cluster.local/query
url: http://localhost:3000/query
# url: http://gateway-api.kl-core.svc.cluster.local/query
headers:
cookie: hotspot-session=ses-ykthtwm9so4cnklyocuckywjx6ro; domain=.kloudlite.io; path=/; HttpOnly; secure; SameSite=None;kloudlite-account=kloudlite-dev;kloudlite-cluster=sample2;
235 changes: 209 additions & 26 deletions apps/console/internal/app/graph/generated/generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions apps/console/internal/app/graph/schema.graphqls
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ type Query {
core_getRouter(namespace: String!, name: String!): Router @isLoggedIn @hasAccountAndCluster
core_resyncRouter(namespace: String!, name: String!): Boolean! @isLoggedIn @hasAccountAndCluster

core_listManagedServiceTemplates: Any
core_getManagedServiceTemplate(category: String!, name: String!): Any

core_listManagedServices(namespace: String!): [ManagedService!] @isLoggedIn @hasAccountAndCluster
core_getManagedService(namespace: String!, name: String!): ManagedService @isLoggedIn @hasAccountAndCluster
core_resyncManagedService(namespace: String!, name: String!): Boolean! @isLoggedIn @hasAccountAndCluster
Expand Down
11 changes: 10 additions & 1 deletion apps/console/internal/app/graph/schema.resolvers.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions apps/console/internal/domain/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,11 @@ type Domain interface {
UpdateManagedService(ctx ConsoleContext, msvc entities.MSvc) (*entities.MSvc, error)
DeleteManagedService(ctx ConsoleContext, namespace, name string) error

// Managed Service Templates

ListManagedSvcTemplates() ([]*entities.MsvcTemplate, error)
GetManagedSvcTemplate(category string, name string) (*entities.MsvcTemplateEntry, error)

OnApplyManagedServiceError(ctx ConsoleContext, errMsg string, namespace string, name string) error
OnDeleteManagedServiceMessage(ctx ConsoleContext, msvc entities.MSvc) error
OnUpdateManagedServiceMessage(ctx ConsoleContext, msvc entities.MSvc) error
Expand Down
Loading