Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(vscode): Fix command bar redux store and remote logic apps resolver #6438

Merged
merged 2 commits into from
Jan 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions Localize/lang/strings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"++ZVe/": "Testing",
"+0H8Or": "Warning: input node type does not match the schema node's type",
"+0ua83": "Parameters",
"+0yxlR": "Function display",
"+3rROX": "Protected",
"+5Jp42": "By",
Expand Down Expand Up @@ -977,7 +978,6 @@
"Xnn0uj": "Request",
"XqamWZ": "Delete",
"XsktQ/": "Limit Logic Apps to not include workflow metadata headers in the response.",
"XtVOMn": "Something went wrong",
"XtuP5e": "Math functions",
"Xv5CGN": "(UTC-05:00) Indiana (East)",
"Xx/naD": "Required. The name of the action whose body outputs you want.",
Expand Down Expand Up @@ -1041,9 +1041,11 @@
"Zi9gQK": "Add new item",
"ZihyUf": "Close",
"ZkjTbp": "Learn more about dynamic content.",
"ZvAp7m": "Save",
"ZyDq4/": "Show a different suggestion",
"_++ZVe/.comment": "Title for testing section",
"_+0H8Or.comment": "Warning message for when input node type does not match schema node type",
"_+0ua83.comment": "Button text for parameters",
"_+0yxlR.comment": "Label for the function display radio group",
"_+3rROX.comment": "Label in the chatbot header stating that the users information is protected in this chatbot",
"_+5Jp42.comment": "Title for publisher",
Expand Down Expand Up @@ -2020,7 +2022,6 @@
"_Xnn0uj.comment": "Header text for request",
"_XqamWZ.comment": "Label of Delete Token Button",
"_XsktQ/.comment": "description of workflow headers on response setting",
"_XtVOMn.comment": "Something went wrong text",
"_XtuP5e.comment": "Label for math functions",
"_Xv5CGN.comment": "Time zone value ",
"_Xx/naD.comment": "Required string parameter to determine action's body output wanted",
Expand Down Expand Up @@ -2084,6 +2085,7 @@
"_Zi9gQK.comment": "Label to add item to property editor",
"_ZihyUf.comment": "Label for the close button in the chatbot header",
"_ZkjTbp.comment": "Text for dynamic content link",
"_ZvAp7m.comment": "Button text for save",
"_ZyDq4/.comment": "Text for the show different suggestion flow button",
"_a7j3gS.comment": "Required number parameter to divide in mod function",
"_aAXnqw.comment": "Required number of occurrences to get nthIndexOf function with",
Expand Down Expand Up @@ -2229,7 +2231,6 @@
"_fNlJSh.comment": "Error message to show when all connections are not connected",
"_fSMyDJ.comment": "title for request options setting",
"_fVG5aD.comment": "Time zone value ",
"_fZJWBR.comment": "Loading designer text",
"_faUrud.comment": "Message to show under the loading icon when loading connection parameters",
"_fg/34o.comment": "Label for logical functions",
"_fifSPb.comment": "Time zone value ",
Expand Down Expand Up @@ -2495,6 +2496,7 @@
"_oZMhX/.comment": "Text of Tooltip to expand",
"_ocW+RF.comment": "Title for the details section in the template overview tab",
"_odQ554.comment": "Response body for test map API",
"_ohOaXj.comment": "Button text for errors",
"_ohpbkw.comment": "title for retry policy exponential interval setting",
"_onXUu0.comment": "Text to tell users to click to add comments",
"_oqgNX3.comment": "Accessibility label for workflow name",
Expand Down Expand Up @@ -2589,6 +2591,7 @@
"_sFbnCs.comment": "Time zone value ",
"_sFwHQc.comment": "aria label description for cancel button",
"_sKy720.comment": "Error message when the workflow name is empty.",
"_sOnphB.comment": "Button text for resubmit",
"_sRpETS.comment": "Warning message for when custom value does not match schema node type",
"_sVQe34.comment": "The description for the test tab parameters.",
"_sVcvcG.comment": "The tab label for the monitoring name and state tab on the create workflow panel",
Expand Down Expand Up @@ -2979,7 +2982,6 @@
"fNlJSh": "All connections must be connected for workflow creation",
"fSMyDJ": "Request options - Timeout",
"fVG5aD": "(UTC-05:00) Haiti",
"fZJWBR": "Loading designer",
"faUrud": "Loading connection data...",
"fg/34o": "Logical functions",
"fifSPb": "(UTC-03:30) Newfoundland",
Expand Down Expand Up @@ -3245,6 +3247,7 @@
"oZMhX/": "Expand",
"ocW+RF": "Details",
"odQ554": "Response body",
"ohOaXj": "Errors",
"ohpbkw": "Exponential interval",
"onXUu0": "Add a note",
"oqgNX3": "Workflow name",
Expand Down Expand Up @@ -3339,6 +3342,7 @@
"sFbnCs": "(UTC-05:00) Chetumal",
"sFwHQc": "Cancel creating a connection",
"sKy720": "Must provide value for workflow name.",
"sOnphB": "Resubmit",
"sRpETS": "Warning: custom value does not match the schema node's type",
"sVQe34": "Provide parameters to test the output.",
"sVcvcG": "Basics",
Expand Down
1 change: 0 additions & 1 deletion apps/vs-code-designer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"@azure/arm-appservice": "^13.0.3",
"@azure/arm-resourcegraph": "^4.2.1",
"@azure/arm-storage": "17.2.1",
"@azure/identity": "^4.5.0",
"@azure/ms-rest-js": "^2.6.4",
"@azure/storage-file-share": "^12.16.0",
"@microsoft/logic-apps-shared": "workspace:*",
Expand Down
12 changes: 8 additions & 4 deletions apps/vs-code-designer/src/LogicAppResolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { ResourceGraphClient } from '@azure/arm-resourcegraph';
import { LogicAppResourceTree } from './app/tree/LogicAppResourceTree';
import { logicAppFilter } from './constants';
import { ext } from './extensionVariables';
import { DefaultAzureCredential } from '@azure/identity';

export class LogicAppResolver implements AppResourceResolver {
private siteCacheLastUpdated = 0;
Expand Down Expand Up @@ -48,8 +47,7 @@ export class LogicAppResolver implements AppResourceResolver {
subContext: ISubscriptionContext
): Promise<{ logicApps: Map<string, Site>; hybridLogicApps: Map<string, ContainerApp> }> {
const client = await createWebSiteClient({ ...context, ...subContext });
const credential = new DefaultAzureCredential();
const resourceGraphClient = new ResourceGraphClient(credential);
const resourceGraphClient = new ResourceGraphClient(subContext.credentials);

if (this.siteCacheLastUpdated < Date.now() - 1000 * 3) {
this.siteCacheLastUpdated = Date.now();
Expand Down Expand Up @@ -98,8 +96,14 @@ export class LogicAppResolver implements AppResourceResolver {
});
});

const resolverPromises = [promiseLogicApp];

if (subContext.environment.resourceManagerEndpointUrl === 'https://management.azure.com/') {
resolverPromises.push(promiseHybridLogicApp);
}

this.listLogicAppsTask = new Promise((resolve, reject) => {
Promise.all([promiseLogicApp, promiseHybridLogicApp])
Promise.all(resolverPromises)
.then(() => {
resolve();
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import { ExtensionCommand } from '@microsoft/vscode-extension-logic-apps';
import { useContext, useMemo } from 'react';
import { useIntl } from 'react-intl';
import { useMutation } from '@tanstack/react-query';
import { useDispatch } from 'react-redux';

export interface DesignerCommandBarProps {
isRefreshing: boolean;
Expand All @@ -30,7 +29,7 @@ export interface DesignerCommandBarProps {
export const DesignerCommandBar: React.FC<DesignerCommandBarProps> = ({ isRefreshing, isDisabled, onRefresh, isDarkMode }) => {
const intl = useIntl();
const vscode = useContext(VSCodeContext);
const dispatch = useDispatch();
const dispatch = DesignerStore.dispatch;
const designerState = DesignerStore.getState();

const isMonitoringView = designerState.designerOptions.isMonitoringView;
Expand Down
3 changes: 0 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading