Skip to content

Commit

Permalink
added changes
Browse files Browse the repository at this point in the history
  • Loading branch information
sondermanish committed Sep 11, 2024
1 parent d7544bf commit 32187de
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ public class DatasourceConfiguration implements AppsmithDomain {
@JsonView({Views.Public.class, FromRequest.class})
AuthenticationDTO authentication;

@JsonView({Views.Public.class, FromRequest.class})
SSHConnection sshProxy;

@JsonView({Views.Public.class, FromRequest.class})
Boolean sshProxyEnabled;

@JsonView({Views.Public.class, FromRequest.class, Git.class})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1237,7 +1237,7 @@ public static void setThemeSettings(Application.ThemeSetting themeSetting) {
}
}

public static boolean conditionForDefaultRestDatasourceMigration(NewAction action) {
public static boolean conditionForDefaultRestDatasource(NewAction action) {
if (action.getUnpublishedAction() == null
|| action.getUnpublishedAction().getDatasource() == null) {
return false;
Expand All @@ -1259,8 +1259,12 @@ public static boolean conditionForDefaultRestDatasourceMigration(NewAction actio

// Two separate types of checks over here, it's either the obvious certain way to identify or
// the likely chance that the datasource is present.
boolean isActionDefaultRestDatasource =
certainCheckForDefaultRestDatasource || probableCheckForDefaultRestDatasource;
return certainCheckForDefaultRestDatasource || probableCheckForDefaultRestDatasource;
}

private static boolean conditionForDefaultRestDatasourceMigration(NewAction action) {
boolean isActionDefaultRestDatasource = conditionForDefaultRestDatasource(action);
Datasource actionDatasource = action.getUnpublishedAction().getDatasource();

// condition to check if the action has missing url or has no config at all
boolean isDatasourceConfigurationOrUrlMissing = actionDatasource.getDatasourceConfiguration() == null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public Mono<ApplicationJson> addDatasourceConfigurationToDefaultRestApiActions(
return newActionService
.findAllByApplicationIdAndViewMode(
branchedApplication.getId(), Boolean.FALSE, Optional.empty(), Optional.empty())
.filter(MigrationHelperMethods::conditionForDefaultRestDatasourceMigration)
.filter(MigrationHelperMethods::conditionForDefaultRestDatasource)
.collectMap(NewAction::getGitSyncId);
})
.map(newActionMap -> {
Expand Down

0 comments on commit 32187de

Please sign in to comment.