Add image location and documentation link fields to plugins
This commit is contained in:
parent
5526168725
commit
d7655ebb3c
|
|
@ -17,6 +17,11 @@ import java.util.List;
|
|||
@Document
|
||||
public class Plugin extends BaseDomain {
|
||||
|
||||
public enum ResponseType {
|
||||
TABLE,
|
||||
JSON,
|
||||
}
|
||||
|
||||
String name;
|
||||
|
||||
PluginType type;
|
||||
|
|
@ -25,6 +30,12 @@ public class Plugin extends BaseDomain {
|
|||
|
||||
String jarLocation;
|
||||
|
||||
String iconLocation;
|
||||
|
||||
String documentationLink;
|
||||
|
||||
ResponseType responseType;
|
||||
|
||||
List<PluginParameterType> datasourceParams;
|
||||
|
||||
List<PluginParameterType> actionParams;
|
||||
|
|
|
|||
|
|
@ -418,4 +418,29 @@ public class DatabaseChangelog {
|
|||
);
|
||||
}
|
||||
|
||||
@ChangeSet(order = "015", id = "set-plugin-image-and-docs-link", author = "")
|
||||
public void setPluginImageAndDocsLink(MongoTemplate mongoTemplate) {
|
||||
for (Plugin plugin : mongoTemplate.findAll(Plugin.class)) {
|
||||
if ("postgres-plugin".equals(plugin.getPackageName())) {
|
||||
plugin.setIconLocation("https://s3.us-east-2.amazonaws.com/assets.appsmith.com/Postgress.png");
|
||||
plugin.setDocumentationLink("https://www.postgresql.org/docs/12/index.html");
|
||||
plugin.setResponseType(Plugin.ResponseType.TABLE);
|
||||
|
||||
} else if ("restapi-plugin".equals(plugin.getPackageName())) {
|
||||
plugin.setIconLocation("https://s3.us-east-2.amazonaws.com/assets.appsmith.com/RestAPI.png");
|
||||
|
||||
} else if ("mongo-plugin".equals(plugin.getPackageName())) {
|
||||
plugin.setIconLocation("https://s3.us-east-2.amazonaws.com/assets.appsmith.com/MongoDB.png");
|
||||
plugin.setDocumentationLink("https://docs.mongodb.com/manual/reference/command/nav-crud/");
|
||||
plugin.setResponseType(Plugin.ResponseType.JSON);
|
||||
|
||||
} else {
|
||||
continue;
|
||||
|
||||
}
|
||||
|
||||
mongoTemplate.save(plugin);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user