Skip to content

Commit

Permalink
Rename driver connectors list
Browse files Browse the repository at this point in the history
  • Loading branch information
niveathika committed Sep 15, 2024
1 parent 3b12b3a commit 93de675
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
8 changes: 4 additions & 4 deletions dashboard/constants.bal
Original file line number Diff line number Diff line change
Expand Up @@ -50,28 +50,28 @@ const HEADER_LIBRARY_MODULES_DASHBOARD = "| Level | Name | Latest Version | Buil
const HEADER_EXTENDED_MODULES_DASHBOARD = "| Name | Latest Version | Build | Security Check | Code Coverage | Bugs | Open PRs | Load Test Results | GraalVM Check |";
const HEADER_HANDWRITTEN_CONNECTOR_DASHBOARD = "| Name | Latest Version | Build | Security Check | Code Coverage | Bugs | Open PRs | Load Test Results | GraalVM Check |";
const HEADER_GENERATED_CONNECTOR_DASHBOARD = "| Name | Latest Version | Build | Security Check | Bugs | Open PRs | GraalVM Check |";
const HEADER_DRIVER_CONNECTOR_DASHBOARD = "| Name | Latest Version | Build | Security Check |";
const HEADER_DRIVER_MODULES_DASHBOARD = "| Name | Latest Version | Build | Security Check |";
const HEADER_TOOLS_DASHBOARD = "| Name | Latest Version | Build | Security Check | Code Coverage | Bugs | Open PRs |";

const HEADER_SEPARATOR_LIBRARY_MODULES = "|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|";
const HEADER_SEPARATOR_EXTENDED_MODULES = "|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|";
const HEADER_SEPARATOR_HANDWRITTEN_CONNECTORS = "|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|";
const HEADER_SEPARATOR_GENERATED_CONNECTORS = "|:---:|:---:|:---:|:---:|:---:|:---:|:---:|";
const HEADER_SEPARATOR_DRIVER_CONNECTORS = "|:---:|:---:|:---:|:---:|";
const HEADER_SEPARATOR_DRIVER_MODULES = "|:---:|:---:|:---:|:---:|";
const HEADER_SEPARATOR_TOOLS = "|:---:|:---:|:---:|:---:|:---:|:---:|:---:|";

const TITLE_LIBRARY_MODULES = "### Ballerina Modules";
const TITLE_EXTENDED_MODULES = "### Ballerina Extended Modules";
const TITLE_HANDWRITTEN_CONNECTORS = "### Ballerina Handwritten Connector Modules";
const TITLE_GENERATED_CONNECTORS = "### Ballerina Generated Connector Modules";
const TITLE_DRIVER_CONNECTORS = "### Ballerina Driver Modules";
const TITLE_DRIVER_MODULES = "### Ballerina Driver Modules";
const TITLE_TOOLS = "### Ballerina Tools";

const DESCRIPTION_LIBRARY_MODULES = "These modules are published under the `ballerina` organization and packed with the Ballerina distribution.";
const DESCRIPTION_EXTENDED_MODULES = "These modules are protocol modules that are not packed with the Ballerina distribution.";
const DESCRIPTION_HANDWRITTEN_CONNECTORS = "These are the handwritten Ballerina connector modules that are used to connect to third-party services. They are published under the `ballerinax` organization ";
const DESCRIPTION_GENERATED_CONNECTORS = "These are the generated Ballerina connector modules that are used to connect to third-party services. They are published under the `ballerinax` organization. The modules are generated using the Ballerina OpenAPI tool using the third-party service's OpenAPI definition. Since these are auto-generated, they only contain a smoke test suite rather than a comprehensive test suite. Due to this nature, the code coverage and load test results are not applicable for these modules. Some repositories such as `sap.s4hana.sales` contain multiple connectors which are highly co-related. These have multiple releases and thus not indicated here.";
const DESCRIPTION_DRIVER_CONNECTORS = "These Ballerina modules bundle database drivers, making it easier to use Ballerina database connectors. They are published under the `ballerinax` organization. These modules only bundle drivers, so only build, latest release, and security checks are applicable to these modules.";
const DESCRIPTION_DRIVER_MODULES = "These Ballerina modules bundle database drivers, making it easier to use Ballerina database connectors. They are published under the `ballerinax` organization. These modules only bundle drivers, so only build, latest release, and security checks are applicable to these modules.";
const DESCRIPTION_TOOLS = "These are the Ballerina CLI tools maintained by the Ballerina Library team.";

// Workflow files
Expand Down
14 changes: 7 additions & 7 deletions dashboard/main.bal
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ public function main() returns error? {
Module[] extendedModules = moduleDetails.extended_modules;
Module[] handwrittenConnectors = moduleDetails.handwritten_connectors;
Module[] generatedConnectors = moduleDetails.generated_connectors;
Module[] driver_connectors = moduleDetails.driver_connectors;
Module[] driver_modules = moduleDetails.driver_modules;
Module[] tools = moduleDetails.tools;

Module[] modules = [
...libraryModules,
...extendedModules,
...handwrittenConnectors,
...generatedConnectors,
...driver_connectors,
...driver_modules,
...tools
];

Expand All @@ -60,7 +60,7 @@ function getSortedModuleNameList() returns List|error {
extended_modules: sortModuleArray(moduleList.extended_modules),
handwritten_connectors: sortModuleArray(moduleList.handwritten_connectors),
generated_connectors: sortModuleArray(moduleList.generated_connectors),
driver_connectors: sortModuleArray(moduleList.driver_connectors),
driver_modules: sortModuleArray(moduleList.driver_modules),
tools: sortModuleArray(moduleList.tools)
};

Expand All @@ -80,7 +80,7 @@ function initializeModuleDetails(List moduleNameList) returns List|error {
extended_modules: check initializeModuleList(moduleNameList.extended_modules),
handwritten_connectors: check initializeModuleList(moduleNameList.handwritten_connectors, MAX_LEVEL),
generated_connectors: check initializeModuleList(moduleNameList.generated_connectors, MAX_LEVEL),
driver_connectors: check initializeModuleList(moduleNameList.driver_connectors),
driver_modules: check initializeModuleList(moduleNameList.driver_modules),
tools: check initializeModuleList(moduleNameList.tools)
};
}
Expand Down Expand Up @@ -286,7 +286,7 @@ function updateDashboard(List moduleDetails) returns error? {
updatedReadmeFile += check getExtendedModulesDashboard(moduleDetails.extended_modules);
updatedReadmeFile += check getHandwrittenConnectorDashboard(moduleDetails.handwritten_connectors);
updatedReadmeFile += check getGeneratedConnectorDashboard(moduleDetails.generated_connectors);
updatedReadmeFile += check getDriverModulesDashboard(moduleDetails.driver_connectors);
updatedReadmeFile += check getDriverModulesDashboard(moduleDetails.driver_modules);
updatedReadmeFile += check getBallerinaToolsDashboard(moduleDetails.tools);

io:Error? fileWriteString = io:fileWriteString(README_FILE, updatedReadmeFile);
Expand Down Expand Up @@ -348,8 +348,8 @@ function getDriverModulesDashboard(Module[] modules) returns string|error {
foreach Module module in modules {
data += check getDriverConnectorsDashboardRow(module) + "\n";
}
return getDashboard(TITLE_DRIVER_CONNECTORS, DESCRIPTION_DRIVER_CONNECTORS,
HEADER_DRIVER_CONNECTOR_DASHBOARD, HEADER_SEPARATOR_DRIVER_CONNECTORS, data);
return getDashboard(TITLE_DRIVER_MODULES, DESCRIPTION_DRIVER_MODULES,
HEADER_DRIVER_MODULES_DASHBOARD, HEADER_SEPARATOR_DRIVER_MODULES, data);
}

isolated function getBallerinaToolsDashboard(Module[] modules) returns string|error {
Expand Down
2 changes: 1 addition & 1 deletion dashboard/types.bal
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ type List record {|
Module[] extended_modules;
Module[] handwritten_connectors;
Module[] generated_connectors;
Module[] driver_connectors;
Module[] driver_modules;
Module[] tools;
|};

Expand Down
2 changes: 1 addition & 1 deletion release/resources/module_list.json
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@
"name": "module-ballerinax-zendesk"
}
],
"driver_connectors": [
"driver_modules": [
{
"name": "module-ballerinax-activemq.driver",
"version_key": "activeMQDriverVersion"
Expand Down
2 changes: 1 addition & 1 deletion release/resources/stdlib_modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -1123,7 +1123,7 @@
"is_multiple_connectors": false
}
],
"driver_connectors": [
"driver_modules": [
{
"name": "module-ballerinax-activemq.driver",
"module_version": "1.0.2-SNAPSHOT",
Expand Down

0 comments on commit 93de675

Please sign in to comment.