Skip to content

Commit efe6c88

Browse files
committed
Apply review suggestions
1 parent 29242ab commit efe6c88

4 files changed

Lines changed: 11 additions & 10 deletions

File tree

  • workspaces
    • ballerina
      • ballerina-core/src/rpc-types/platform-ext
      • ballerina-visualizer/src/views/BI/ServiceDesigner/Forms/SMBForm
      • type-editor/src/TypeEditor/ContextBasedTypeEditor
    • bi/bi-extension/src/test/e2e-playwright-tests/file-integration

workspaces/ballerina/ballerina-core/src/rpc-types/platform-ext/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import { DevantScopes } from "@wso2/wso2-platform-core";
2020

2121
const INTEGRATION_API_MODULES = ["http", "graphql", "tcp"];
2222
const EVENT_INTEGRATION_MODULES = ["kafka", "rabbitmq", "salesforce", "trigger.github", "mqtt", "asb"];
23-
const FILE_INTEGRATION_MODULES = ["ftp", "file"];
23+
const FILE_INTEGRATION_MODULES = ["ftp", "smb", "file"];
2424
const AI_AGENT_MODULE = "ai";
2525

2626
export function findDevantScopeByModule(moduleName: string): DevantScopes | undefined {

workspaces/ballerina/ballerina-visualizer/src/views/BI/ServiceDesigner/Forms/SMBForm/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ export function SMBForm(props: SMBFormProps) {
9494
setFunctionModel(props.functionModel);
9595
setSelectedFileFormat(props.functionModel?.name?.metadata?.label || '');
9696
}
97-
}, [model, selectedHandler]);
97+
}, [model, selectedHandler, isNew]);
9898

9999
useEffect(() => {
100100
if (isNew && selectedHandler && nonEnabledFunctions.length > 0) {
@@ -204,7 +204,7 @@ export function SMBForm(props: SMBFormProps) {
204204
if (param.kind === "DATA_BINDING") {
205205
const updatedType = {
206206
...param.type,
207-
value: selectType(typeValue, functionModel.properties.stream?.enabled)
207+
value: selectType(typeValue, functionModel.properties?.stream?.enabled)
208208
};
209209
if (imports) {
210210
updatedType.imports = imports;

workspaces/ballerina/type-editor/src/TypeEditor/ContextBasedTypeEditor/GenericImportTab.tsx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -579,12 +579,14 @@ export function GenericImportTab(props: GenericImportTabProps) {
579579
<Codicon name="wand" sx={{ fontSize: '14px' }} />
580580
Generate Sample JSON
581581
</LinkButton>
582-
<Typography
583-
variant="body3"
584-
sx={{ color: 'var(--vscode-input-placeholderForeground)', textAlign: 'center' }}
585-
>
586-
or
587-
</Typography>
582+
{payloadContext?.protocol !== Protocol.FTP && payloadContext?.protocol !== Protocol.SMB && (
583+
<Typography
584+
variant="body3"
585+
sx={{ color: 'var(--vscode-input-placeholderForeground)', textAlign: 'center' }}
586+
>
587+
or
588+
</Typography>
589+
)}
588590
</>
589591
)}
590592
{payloadContext?.protocol!==Protocol.FTP && payloadContext?.protocol!==Protocol.SMB && (<LinkButton

workspaces/bi/bi-extension/src/test/e2e-playwright-tests/file-integration/smb.spec.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ export default function createTests() {
103103
const deleteButton = page.page.getByRole('button', { name: 'Delete' }).first();
104104
await deleteButton.waitFor({ timeout: 5000 });
105105
await deleteButton.click();
106-
await page.page.waitForTimeout(500);
107106
await expect(serviceTreeItem).not.toBeVisible({ timeout: 10000 });
108107
});
109108
});

0 commit comments

Comments
 (0)