Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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
29 changes: 28 additions & 1 deletion l10n/bundle.l10n.json
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,8 @@
"Session Details": "Session Details",
"Changing environment...": "Changing environment...",
"Current": "Current",
"Local": "Local",
"Local Site": "Local Site",
"Site management URL not found for the selected site. Please try again after refreshing the environment.": "Site management URL not found for the selected site. Please try again after refreshing the environment.",
"Be careful when you're updating public sites. The changes you make are visible to anyone immediately. Do you want to continue?": "Be careful when you're updating public sites. The changes you make are visible to anyone immediately. Do you want to continue?",
"Current site path not found.": "Current site path not found.",
Expand Down Expand Up @@ -345,17 +347,42 @@
"Deleted locally": "Deleted locally",
"Download is complete. You can now view the report.": "Download is complete. You can now view the report.",
"Select an environment to compare with": "Select an environment to compare with",
"Select a website to compare with": "Select a website to compare with",
"No sites found in the selected environment.": "No sites found in the selected environment.",
"Matching Site": "Matching Site",
"Enhanced Data Model": "Enhanced Data Model",
"Standard Data Model": "Standard Data Model",
"The website you selected is different from the local site. Are you sure you want to compare with this website?": "The website you selected is different from the local site. Are you sure you want to compare with this website?",
"Yes, Don't Ask Again": "Yes, Don't Ask Again",
"The website was not found in the selected environment. Please select a different environment.": "The website was not found in the selected environment. Please select a different environment.",
"Fetching websites from the selected environment...": "Fetching websites from the selected environment...",
"Discard Changes": "Discard Changes",
"Show Diff": "Show Diff",
"All changed files are binary files (e.g., images) and cannot be displayed in the diff viewer. You can view them individually in the file tree.": "All changed files are binary files (e.g., images) and cannot be displayed in the diff viewer. You can view them individually in the file tree.",
"1 file changed": "1 file changed",
"Fetching websites from '{0}'.../Message shown while fetching websites from an environment. {0} is the environment name.": {
"message": "Fetching websites from '{0}'...",
"comment": [
"Message shown while fetching websites from an environment. {0} is the environment name."
]
},
"Downloading {0} site metadata ([details](command:microsoft.powerplatform.pages.actionsHub.showOutputChannel \"Show download output\")).../This is a markdown formatting which must persist across translations.": {
"message": "Downloading {0} site metadata ([details](command:microsoft.powerplatform.pages.actionsHub.showOutputChannel \"Show download output\"))...",
"comment": [
"This is a markdown formatting which must persist across translations."
]
},
"{0} ({1}) ↔ {2} (Local)/Comparison label showing remote and local sites. Format: 'Remote (Env) ↔ Local (Local)'.": {
"message": "{0} ({1}) ↔ {2} (Local)",
"comment": [
"Comparison label showing remote and local sites. Format: 'Remote (Env) ↔ Local (Local)'."
]
},
"{0} files changed/Description showing the number of changed files. 'files' is plural.": {
"message": "{0} files changed",
"comment": [
"Description showing the number of changed files. 'files' is plural."
]
},
"{0} ({1} file)/This is the site label showing the number of changed files. 'file' is singular.": {
"message": "{0} ({1} file)",
"comment": [
Expand Down
46 changes: 44 additions & 2 deletions loc/translations-export/vscode-powerplatform.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
<trans-unit id="++CODE++08833dda22312dacb09f1d185caedf751289ee89a4c75682a09f4a262bf67ac4">
<source xml:lang="en"> End of Code Block </source>
</trans-unit>
<trans-unit id="++CODE++32dfcdbc5d61fc73e1012a0b09b6d9121d37e4a5e95726456066acfc313468a1">
<source xml:lang="en">1 file changed</source>
</trans-unit>
<trans-unit id="++CODE++29bb69945e50cb632fabf16f3f89a25d813910c19059d8a792f66262a952039d">
<source xml:lang="en">@PowerPages is not yet available in your region.</source>
</trans-unit>
Expand Down Expand Up @@ -340,6 +343,9 @@ The {3} represents Solution's Type (Managed or Unmanaged), but that test is loca
<trans-unit id="++CODE++ac72407b10d30bf47faf11da09b605a85fc649bd3f2e33acb281655cb9021d9d">
<source xml:lang="en">Edit the site</source>
</trans-unit>
<trans-unit id="++CODE++102f547594eb0c68a16e0e5eb6661fa576c7a5fb6ce224ea36194e9fd4f87dac">
<source xml:lang="en">Enhanced Data Model</source>
</trans-unit>
<trans-unit id="++CODE++0feefedc5916a0c9a464f4ef9f28fab835a23e1d035878f397e38053381aa3fa">
<source xml:lang="en">Enter Organization ID</source>
</trans-unit>
Expand Down Expand Up @@ -460,8 +466,9 @@ The {3} represents Solution's Type (Managed or Unmanaged), but that test is loca
<trans-unit id="++CODE++aac77df347205252b074d45aff7891debdba0ff1466cc0c351416d1662bb71ab">
<source xml:lang="en">Feedback</source>
</trans-unit>
<trans-unit id="++CODE++adab78b8f35901e7816538a4b89ee6e3cbd40b3df8a43be64bac0da0091b6d8f">
<source xml:lang="en">Fetching websites from the selected environment...</source>
<trans-unit id="++CODE++1b600fc82f2c98dc384adb9fa255ff5914978d978928c8aa5e56bf5fc64980b2">
<source xml:lang="en">Fetching websites from '{0}'...</source>
<note>Message shown while fetching websites from an environment. {0} is the environment name.</note>
</trans-unit>
<trans-unit id="++CODE++2a8ddde521f14ecd4a8717f2bcf9a2b021fa38a578518066d2ae32271aa95237">
<source xml:lang="en">Fetching your file ...</source>
Expand Down Expand Up @@ -578,6 +585,12 @@ Return to this chat and @powerpages can help you write and edit your website cod
<trans-unit id="++CODE++47dc2e01d9ad434bd03a870bdfd91281bc31d38da2cdc36c0d46a593b1d6d60c">
<source xml:lang="en">Line: {0}</source>
</trans-unit>
<trans-unit id="++CODE++8c31e6e7223097e2e4847773c47a4efab6aaf79deeecc92a7759891c74976dde">
<source xml:lang="en">Local</source>
</trans-unit>
<trans-unit id="++CODE++dff4c0c879ea2e4011d45f5b3caa7c64d15feac1416a9e90b4ba4723f7cfc6fa">
<source xml:lang="en">Local Site</source>
</trans-unit>
<trans-unit id="++CODE++9d6322c1f4d9d3f38aed8bfbe0b2bcadf66ad82c008476fa62541fa069138e94">
<source xml:lang="en">Login</source>
</trans-unit>
Expand All @@ -597,6 +610,9 @@ Return to this chat and @powerpages can help you write and edit your website cod
<trans-unit id="++CODE++8f2de600bf940a26c63a7ac23984a12ca8970fcf1a85947aa5566c34e23eea07">
<source xml:lang="en">Managed</source>
</trans-unit>
<trans-unit id="++CODE++8f10b38db6f69f493504d7eca9d7f6e0c4453855fe741c99a0df61c699ad33f6">
<source xml:lang="en">Matching Site</source>
</trans-unit>
<trans-unit id="++CODE++8a194d5287e3da019883144787cd5f282753f5ce892d933be0833b3818c25503">
<source xml:lang="en">Maximum 30 characters allowed</source>
</trans-unit>
Expand Down Expand Up @@ -672,6 +688,9 @@ The {3} represents Dataverse Environment's Organization ID (GUID)</note>
<trans-unit id="++CODE++b8a162cd305ec78bd85f8e1b5a31a3e2c944fd560aa5f0e17e6b76de4c008e6b">
<source xml:lang="en">No sites found</source>
</trans-unit>
<trans-unit id="++CODE++81ecc0ba0812a908a0b4cc9e87e2a562a6346ee0d40becf34d439d5fb723da7f">
<source xml:lang="en">No sites found in the selected environment.</source>
</trans-unit>
<trans-unit id="++CODE++abb85d7bb3ea846c90ad6348fd3a1154436cdde8f06db3d86711dd6e23cf1e21">
<source xml:lang="en">No webpages found</source>
</trans-unit>
Expand Down Expand Up @@ -855,6 +874,9 @@ The {3} represents Dataverse Environment's Organization ID (GUID)</note>
<trans-unit id="++CODE++a40f78f3a7f5c5ab1b101e95cdf044552542712fdcf45a83dfea3f455b6f638a">
<source xml:lang="en">Select Type</source>
</trans-unit>
<trans-unit id="++CODE++84744ab78214e2fc629e2925963080b5ad6c4ab1db6cce278900c3e6403bbc2f">
<source xml:lang="en">Select a website to compare with</source>
</trans-unit>
<trans-unit id="++CODE++87468e6a845b82466220c11dd0ca315a4389dc1cb8e0ee102035bb4ce5cb7e39">
<source xml:lang="en">Select an environment</source>
</trans-unit>
Expand Down Expand Up @@ -923,6 +945,9 @@ The {3} represents Dataverse Environment's Organization ID (GUID)</note>
<trans-unit id="++CODE++189f24adc299ea91ceab21d8100a58d89294ed17395c4e4dbc4733c9b92543df">
<source xml:lang="en">Something went wrong. Don’t worry, you can try again.</source>
</trans-unit>
<trans-unit id="++CODE++9363df99329b30b2e856758ea1e1f08e117936f1a8116e29f8d64b4bc62f9ab6">
<source xml:lang="en">Standard Data Model</source>
</trans-unit>
<trans-unit id="++CODE++1cb2204ec480119230ac755787106a1550d9329553d146abd56da1947079d577">
<source xml:lang="en">Starting CodeQL analysis for: {0}</source>
</trans-unit>
Expand Down Expand Up @@ -975,6 +1000,9 @@ The {3} represents Dataverse Environment's Organization ID (GUID)</note>
<trans-unit id="++CODE++1f362261e8bb9564245fa7e590732de71b5f6cbb3e9963a8d8573b51ae18cbfe">
<source xml:lang="en">The website was not found in the selected environment. Please select a different environment.</source>
</trans-unit>
<trans-unit id="++CODE++6f309003581fafdd78e247cd0fe8b4b7f57ed89a60325b01e6725e8c078f23de">
<source xml:lang="en">The website you selected is different from the local site. Are you sure you want to compare with this website?</source>
</trans-unit>
<trans-unit id="++CODE++18f3be2933741b96e56b1e1f70818fcba46ec9c5b3dcd0e28d801eab15791d84">
<source xml:lang="en">There was a permissions problem with the server</source>
</trans-unit>
Expand Down Expand Up @@ -1124,6 +1152,9 @@ The {3} represents Dataverse Environment's Organization ID (GUID)</note>
<trans-unit id="++CODE++85a39ab345d672ff8ca9b9c6876f3adcacf45ee7c1e2dbd2408fd338bd55e07e">
<source xml:lang="en">Yes</source>
</trans-unit>
<trans-unit id="++CODE++229b025b2c8158fda1948dc79cdd581547f97bbdbc239f9d89b056e48a397591">
<source xml:lang="en">Yes, Don't Ask Again</source>
</trans-unit>
<trans-unit id="++CODE++5f1325c0fc2f8e2e8732d6545bcc100f0e7e0d8ea1740b2d519fc83c43ae1fc2">
<source xml:lang="en">You are currently connected to a different environment. Would you like to switch to the required environment?</source>
</trans-unit>
Expand Down Expand Up @@ -1154,6 +1185,10 @@ The {3} represents Dataverse Environment's Organization ID (GUID)</note>
<source xml:lang="en">{0} ({1} files)</source>
<note>This is the site label showing the number of changed files. 'files' is plural.</note>
</trans-unit>
<trans-unit id="++CODE++dcbed1e6ea38a3f7f5e64925ed3898dc74721389792c65218b5216538214e3b7">
<source xml:lang="en">{0} ({1}) ↔ {2} (Local)</source>
<note>Comparison label showing remote and local sites. Format: 'Remote (Env) ↔ Local (Local)'.</note>
</trans-unit>
<trans-unit id="++CODE++7ec0c807a987e15ebf5bcf7dab23b8fea20b59ed72cae0172465ad0fdd200882">
<source xml:lang="en">{0} binary file(s) (e.g., images) were skipped as they cannot be displayed in the diff viewer. You can view them individually in the file tree.</source>
<note>Message shown when binary files are skipped in the multi-diff view.</note>
Expand All @@ -1162,6 +1197,10 @@ The {3} represents Dataverse Environment's Organization ID (GUID)</note>
<source xml:lang="en">{0} created!</source>
<note>{0} will be replaced by the entity type.</note>
</trans-unit>
<trans-unit id="++CODE++d1873d011f27513d3bc27f9a9da5c28141a066578e847d1120ddef316f638ef4">
<source xml:lang="en">{0} files changed</source>
<note>Description showing the number of changed files. 'files' is plural.</note>
</trans-unit>
<trans-unit id="++CODE++21471e6993c28688e252bf884db38022cef15af0126d3d7f68c5e4a6c4dfd9d3">
<source xml:lang="en">{0}: {1} (Remote ↔ Local)</source>
<note>Title for the diff editor when comparing a single file.</note>
Expand Down Expand Up @@ -1410,6 +1449,9 @@ The second line should be '[TRANSLATION HERE](command:powerplatform-walkthrough.
<trans-unit id="pacCLI.pacSolutionHelp.title">
<source xml:lang="en">Show PAC Solution Help</source>
</trans-unit>
<trans-unit id="microsoft.powerplatform.pages.actionsHub.configuration.confirmDifferentWebsiteComparison.description">
<source xml:lang="en">Show a confirmation dialog when comparing with a different website than the local site. Set to false to suppress this confirmation.</source>
</trans-unit>
<trans-unit id="microsoft.powerplatform.pages.actionsHub.siteDetails.title">
<source xml:lang="en">Site Details</source>
</trans-unit>
Expand Down
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -703,6 +703,11 @@
"type": "string",
"description": "%microsoft.powerplatform.pages.actionsHub.configuration.downloadSite.description%",
"default": ""
},
"powerPlatform.pages.confirmDifferentWebsiteComparison": {
"type": "boolean",
"description": "%microsoft.powerplatform.pages.actionsHub.configuration.confirmDifferentWebsiteComparison.description%",
"default": true
}
}
},
Expand Down
1 change: 1 addition & 0 deletions package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@
"microsoft.powerplatform.pages.actionsHub.inactiveSite.reactivateSite.title": "Reactivate Site",
"microsoft.powerplatform.pages.actionsHub.currentActiveSite.runCodeQLScreening.title": "Run CodeQL Screening",
"microsoft.powerplatform.pages.actionsHub.configuration.downloadSite.description": "The folder where site will be downloaded when using Power Pages Actions. Leave this empty to ask for a folder every time you download a site.",
"microsoft.powerplatform.pages.actionsHub.configuration.confirmDifferentWebsiteComparison.description": "Show a confirmation dialog when comparing with a different website than the local site. Set to false to suppress this confirmation.",
"microsoft.powerplatform.pages.actionsHub.activeSite.compareWithLocal.title": "Compare with Local",
"microsoft.powerplatform.pages.actionsHub.metadataDiff.openFile.title": "Open Comparison",
"microsoft.powerplatform.pages.actionsHub.metadataDiff.openAll.title": "Open All Diffs",
Expand Down
4 changes: 2 additions & 2 deletions src/client/lib/EnvAndSolutionTreeView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export class EnvAndSolutionTreeView implements vscode.TreeDataProvider<EnvOrSolu
vscode.env.clipboard.writeText((item.model as OrgListOutput).FriendlyName);
}),
vscode.commands.registerCommand("pacCLI.envAndSolutionsPanel.copyEnvironmentId", (item: EnvOrSolutionTreeItem) => {
vscode.env.clipboard.writeText((item.model as OrgListOutput).EnvironmentId);
vscode.env.clipboard.writeText((item.model as OrgListOutput).EnvironmentIdentifier.Id);
}),
vscode.commands.registerCommand("pacCLI.envAndSolutionsPanel.copyEnvironmentUrl", (item: EnvOrSolutionTreeItem) => {
vscode.env.clipboard.writeText((item.model as OrgListOutput).EnvironmentUrl);
Expand Down Expand Up @@ -135,7 +135,7 @@ class EnvOrSolutionTreeItem extends vscode.TreeItem {
this.tooltip = vscode.l10n.t(
{
message: "Name: {0}\nURL: {1}\nEnvironment ID: {2}\nOrganization ID: {3}",
args: [model.FriendlyName, model.EnvironmentUrl, model.EnvironmentId, model.OrganizationId],
args: [model.FriendlyName, model.EnvironmentUrl, model.EnvironmentIdentifier.Id, model.OrganizationId],
comment: [
"This is a multi-line tooltip",
"The {0} represents Dataverse Environment's Friendly / Display name",
Expand Down
7 changes: 5 additions & 2 deletions src/client/pac/PacTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,12 @@ export type PacSolutionListOutput = PacOutputWithResultList<SolutionListing>;
export type OrgListOutput = {
FriendlyName: string,
OrganizationId: string,
EnvironmentId: string,
EnvironmentIdentifier: {
Id: string
},
EnvironmentUrl: string,
IsActive: boolean
IsActive: boolean,
UniqueName: string
}

export type PacOrgListOutput = PacOutputWithResultList<OrgListOutput>;
Expand Down
11 changes: 9 additions & 2 deletions src/client/pac/PacWrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -310,10 +310,17 @@ export class PacWrapper {
public async downloadSiteWithProgress(
downloadPath: string,
websiteId: string,
dataModelVersion: 1 | 2
dataModelVersion: 1 | 2,
environmentUrl?: string
): Promise<boolean> {
const pacArguments = ["pages", "download", "--path", downloadPath, "--webSiteId", websiteId, "--modelVersion", dataModelVersion.toString(), "--overwrite"];

if (environmentUrl) {
pacArguments.push("--environment", environmentUrl);
}

return this.pacInterop.executeCommandWithProgress(
new PacArguments("pages", "download", "--path", downloadPath, "--webSiteId", websiteId, "--modelVersion", dataModelVersion.toString(), "--overwrite")
new PacArguments(...pacArguments)
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export class ActionsHubTreeDataProvider implements vscode.TreeDataProvider<Actio
if (this._loadWebsites) {
try {
vscode.commands.executeCommand('setContext', 'microsoft.powerplatform.pages.actionsHub.loadingWebsites', true);
const websites = await fetchWebsites();
const websites = await fetchWebsites(PacContext.OrgInfo! , true);
this._activeSites = websites.activeSites;
this._inactiveSites = websites.inactiveSites;
this._otherSites = websites.otherSites;
Expand Down
7 changes: 3 additions & 4 deletions src/client/power-pages/actions-hub/ActionsHubUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ import os from "os";
import { traceError, traceInfo } from "./TelemetryHelper";
import { Constants } from "./Constants";
import { IOtherSiteInfo, IWebsiteDetails, WebsiteYaml } from "../../../common/services/Interfaces";
import PacContext from "../../pac/PacContext";
import ArtemisContext from "../../ArtemisContext";
import { getActiveWebsites, getAllWebsites } from "../../../common/utilities/WebsiteUtil";
import { ServiceEndpointCategory } from "../../../common/services/Constants";
import { getWebsiteRecordId, getWebsiteYamlPath, hasWebsiteYaml } from "../../../common/utilities/WorkspaceInfoFinderUtil";
import { POWERPAGES_SITE_FOLDER, UTF8_ENCODING } from "../../../common/constants";
import { OrgInfo } from "../../pac/PacTypes";

export function createKnownSiteIdsSet(
activeSites: IWebsiteDetails[] | undefined,
Expand Down Expand Up @@ -134,10 +134,9 @@ const sortByCreatedOn = <T extends { createdOn?: string | null }>(item1: T, item
return date2 - date1; // Sort in descending order (newest first)
}

export const fetchWebsites = async (): Promise<{ activeSites: IWebsiteDetails[], inactiveSites: IWebsiteDetails[], otherSites: IOtherSiteInfo[] }> => {
export const fetchWebsites = async (orgInfo: OrgInfo, shouldReturnOtherSites: boolean): Promise<{ activeSites: IWebsiteDetails[], inactiveSites: IWebsiteDetails[], otherSites: IOtherSiteInfo[] }> => {
traceInfo(Constants.EventNames.ACTIONS_HUB_FETCH_WEBSITES_CALLED, { methodName: fetchWebsites.name });
try {
const orgInfo = PacContext.OrgInfo;
if (ArtemisContext.ServiceResponse?.stamp && orgInfo) {
let allSites: IWebsiteDetails[] = [];
let activeWebsiteDetails: IWebsiteDetails[] = [];
Expand Down Expand Up @@ -167,7 +166,7 @@ export const fetchWebsites = async (): Promise<{ activeSites: IWebsiteDetails[],
inactiveWebsiteDetails.sort(sortByCreatedOn);

const currentEnvSiteIds = createKnownSiteIdsSet(activeWebsiteDetails, inactiveWebsiteDetails);
const otherSites = findOtherSites(currentEnvSiteIds);
const otherSites = shouldReturnOtherSites ? findOtherSites(currentEnvSiteIds) : [];

return { activeSites: activeWebsiteDetails, inactiveSites: inactiveWebsiteDetails, otherSites: otherSites };
}
Expand Down
Loading