Skip to content

Commit

Permalink
Merge pull request #476 from kube-tarian/plugin-data-with-uimodule
Browse files Browse the repository at this point in the history
adding plugin uimoduleendpoint
  • Loading branch information
vramk23 authored May 2, 2024
2 parents d96d6cb + 1388f23 commit d7ecad2
Show file tree
Hide file tree
Showing 33 changed files with 2,792 additions and 4,611 deletions.
6 changes: 3 additions & 3 deletions capten/agent/internal/api/agent_cluster_apps.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,16 +76,16 @@ func (a *Agent) GetClusterAppLaunches(ctx context.Context, request *agentpb.GetC
}

appConfig := r.GetConfig()
if len(appConfig.LaunchURL) == 0 {
if len(appConfig.UiEndpoint) == 0 {
continue
}

cfgs = append(cfgs, &agentpb.AppLaunchConfig{
ReleaseName: r.GetConfig().GetReleaseName(),
Category: r.GetConfig().GetCategory(),
Description: r.GetConfig().GetLaunchUIDescription(),
Description: r.GetConfig().GetDescription(),
Icon: r.GetConfig().GetIcon(),
LaunchURL: r.GetConfig().GetLaunchURL(),
UiEndpoint: r.GetConfig().GetUiEndpoint(),
SsoSupported: ssoSupported,
})
}
Expand Down
5 changes: 3 additions & 2 deletions capten/agent/internal/api/capten_plugin_apis.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ func (a *Agent) GetCaptenPlugins(ctx context.Context, request *captenpluginspb.G
plugins = append(plugins, &captenpluginspb.CaptenPlugin{
PluginName: r.GetConfig().GetPluginName(),
PluginDescription: r.GetConfig().GetPluginDescription(),
LaunchIcon: r.GetConfig().GetIcon(),
LaunchURL: r.GetConfig().GetLaunchURL(),
Icon: r.GetConfig().GetIcon(),
UiEndpoint: r.GetConfig().GetUiEndpoint(),
UiModuleEndpoint: r.GetConfig().GetUiModuleEndpoint(),
ApiEndpoint: r.GetConfig().GetApiEndpoint(),
InstallStatus: r.GetConfig().GetInstallStatus(),
RuntimeStatus: r.GetConfig().GetRuntimeStatus(),
Expand Down
16 changes: 8 additions & 8 deletions capten/agent/internal/capten-store/app_config_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const (
appName, description, category = "app_name", "description", "category"
chartName, repoName, repoUrl = "chart_name", "repo_name", "repo_url"
namespace, releaseName, version = "namespace", "release_name", "version"
launchUrl, launchUIDesc = "launch_url", "launch_redirect_url"
uiEndpoint, uiModuleEndpoint = "ui_endpoint", "ui_module_endpoint"
createNamespace, privilegedNamespace = "create_namespace", "privileged_namespace"
overrideValues, launchUiValues = "override_values", "launch_ui_values"
templateValues, defaultApp = "template_values", "default_app"
Expand All @@ -51,7 +51,7 @@ var (
appName, description, category,
chartName, repoName, repoUrl,
namespace, releaseName, version,
launchUrl, launchUIDesc,
uiEndpoint, uiModuleEndpoint,
createNamespace, privilegedNamespace,
overrideValues, launchUiValues,
templateValues, defaultApp,
Expand Down Expand Up @@ -97,7 +97,7 @@ func (a *Store) GetAppConfig(appReleaseName string) (*agentpb.SyncAppData, error
&config.AppName, &config.Description, &config.Category,
&config.ChartName, &config.RepoName, &config.RepoURL,
&config.Namespace, &config.ReleaseName, &config.Version,
&config.LaunchURL, &config.LaunchUIDescription,
&config.UiEndpoint, &config.UiModuleEndpoint,
&config.CreateNamespace, &config.PrivilegedNamespace,
&overrideValues, &launchUiValues,
&templateValues, &config.DefualtApp,
Expand Down Expand Up @@ -135,7 +135,7 @@ func (a *Store) GetAllApps() ([]*agentpb.SyncAppData, error) {
&config.AppName, &config.Description, &config.Category,
&config.ChartName, &config.RepoName, &config.RepoURL,
&config.Namespace, &config.ReleaseName, &config.Version,
&config.LaunchURL, &config.LaunchUIDescription,
&config.UiEndpoint, &config.UiEndpoint,
&config.CreateNamespace, &config.PrivilegedNamespace,
&overrideValues, &launchUiValues,
&templateValues, &config.DefualtApp,
Expand Down Expand Up @@ -197,14 +197,14 @@ func formUpdateKvPairs(config *agentpb.SyncAppData) (string, bool) {
fmt.Sprintf("%s = true", privilegedNamespace))
}

if config.Config.LaunchURL != "" {
if config.Config.UiEndpoint != "" {
params = append(params,
fmt.Sprintf("%s = '%s'", launchUrl, config.Config.LaunchURL))
fmt.Sprintf("%s = '%s'", uiEndpoint, config.Config.UiEndpoint))
}

if config.Config.LaunchUIDescription != "" {
if config.Config.UiModuleEndpoint != "" {
params = append(params,
fmt.Sprintf("%s = '%s'", launchUIDesc, config.Config.LaunchUIDescription))
fmt.Sprintf("%s = '%s'", uiModuleEndpoint, config.Config.UiModuleEndpoint))
}

if config.Config.AppName != "" {
Expand Down
889 changes: 450 additions & 439 deletions capten/agent/internal/pb/captenpluginspb/capten_plugins.pb.go

Large diffs are not rendered by default.

539 changes: 264 additions & 275 deletions capten/common-pkg/agentpb/agent.pb.go

Large diffs are not rendered by default.

221 changes: 116 additions & 105 deletions capten/common-pkg/cluster-plugins/clusterpluginspb/cluster_plugins.pb.go

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions capten/common-pkg/pluginconfig-store/app_config_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const (
appName, description, category = "app_name", "description", "category"
chartName, repoName, repoUrl = "chart_name", "repo_name", "repo_url"
namespace, releaseName, version = "namespace", "release_name", "version"
launchUrl, launchUIDesc = "launch_url", "launch_redirect_url"
appUiEndpoint, uiModuleEndpoint = "ui_endpoint", "ui_module_endpoint"
createNamespace, privilegedNamespace = "create_namespace", "privileged_namespace"
overrideValues, launchUiValues = "override_values", "launch_ui_values"
templateValues, defaultApp = "template_values", "default_app"
Expand All @@ -51,7 +51,7 @@ var (
appName, description, category,
chartName, repoName, repoUrl,
namespace, releaseName, version,
launchUrl, launchUIDesc,
appUiEndpoint, uiModuleEndpoint,
createNamespace, privilegedNamespace,
overrideValues, launchUiValues,
templateValues, defaultApp,
Expand Down Expand Up @@ -97,7 +97,7 @@ func (a *Store) GetAppConfig(appReleaseName string) (*agentpb.SyncAppData, error
&config.AppName, &config.Description, &config.Category,
&config.ChartName, &config.RepoName, &config.RepoURL,
&config.Namespace, &config.ReleaseName, &config.Version,
&config.LaunchURL, &config.LaunchUIDescription,
&config.UiEndpoint, &config.UiModuleEndpoint,
&config.CreateNamespace, &config.PrivilegedNamespace,
&overrideValues, &launchUiValues,
&templateValues, &config.DefualtApp,
Expand Down Expand Up @@ -134,7 +134,7 @@ func (a *Store) GetAllApps() ([]*agentpb.SyncAppData, error) {
&config.AppName, &config.Description, &config.Category,
&config.ChartName, &config.RepoName, &config.RepoURL,
&config.Namespace, &config.ReleaseName, &config.Version,
&config.LaunchURL, &config.LaunchUIDescription,
&config.UiEndpoint, &config.UiModuleEndpoint,
&config.CreateNamespace, &config.PrivilegedNamespace,
&overrideValues, &launchUiValues,
&templateValues, &config.DefualtApp,
Expand Down Expand Up @@ -195,14 +195,14 @@ func formUpdateKvPairs(config *agentpb.SyncAppData) (string, bool) {
fmt.Sprintf("%s = true", privilegedNamespace))
}

if config.Config.LaunchURL != "" {
if config.Config.UiEndpoint != "" {
params = append(params,
fmt.Sprintf("%s = '%s'", launchUrl, config.Config.LaunchURL))
fmt.Sprintf("%s = '%s'", appUiEndpoint, config.Config.UiEndpoint))
}

if config.Config.LaunchUIDescription != "" {
if config.Config.UiModuleEndpoint != "" {
params = append(params,
fmt.Sprintf("%s = '%s'", launchUIDesc, config.Config.LaunchUIDescription))
fmt.Sprintf("%s = '%s'", uiModuleEndpoint, config.Config.UiModuleEndpoint))
}

if config.Config.AppName != "" {
Expand Down
Loading

0 comments on commit d7ecad2

Please sign in to comment.